When it shuts down or stops, if you put a little fuel down the carb throat will it start right back up until it burns that out?
Does the accelerator pump still push a little fuel into the throat when you work the throttle shaft?
If it starts right back up you might can eliminate electrical problems. If it won't, might double check the spark at the plug when you you have a no start situation.