Some slight failiure..!

I have a vespa 50 S that has been running well untill recently. Suddenly i couldnt get the horn or the headlight working, and the engine lost ignition and refused to start again at a couple of ocations when the engine was warm. From all that i guess its probably an electronic issue… But can someone tell me what it could be and how i should find out? Ignition problems, light and horn not working / suddenly working then disapearing, and the engine giving off ‚bang‘-sounds. Thanks!

try another stator plate to start with