There are lots of maybes... Start w/ a compression test 120psi or above is good.
The stator or cdi could be on the way out so test for spark when it is giving you a hard time. Also pull off the fuel line to see if the petcock is closing when the bike is mot running.
The things I would do first are, replace the spark plug/air filter/fuel filter, and rebuild the carb. COMPLETELY tear down the carb to all it's bits, and run a wire thru everything. Blow it all out w/ a can of Carb Clean.
Have you tried to adjust the idle mix screw? It's the smaller screw on the left side of the carb. Turn it in either direction to make the rpm as high as it will go. Turn the idle down using the bigger screw, and keep doing this until you have the best setting. Then turn the small screw 1/4 turn counter clockwise to slightly enrich the circuit.
Go for the new parts first. Old parts will never work right no matter what you adjust. It'll run you less than 20 bucks