When the engine quits running pull off a plug wire asap and check for fire to your plug. If there's no fire replace the condenser. If that doesen't fix the problem you probably need a new coil.
If you have fire you probably have a fuel problem. Check the flow from the tank to the carburetor. Should see a full stream of gas and if that looks ok pull the tube fitting where your gas line connects and look for a screen that may be plugged. If that screen isn't plugged clean your carburetor by soaking in carb cleaner and blowing out the jets using air pressure. Hal