It could be an air leak. Start the motor and use starting fluid and and spray it around the top end gaskets, and take particular notice to the intake boot attaching carburetor to the motor. If there is a leak, there will be a hesittion when the starting fluid hits the leaking area when the motor is running. Another thing I would try is a new spark plug, and check the coil to be sure the wire is connected properly, and you can OHM the coil out to test the resistance to see if it is good. I had a bad coil on my X one time, and it did the same as you are describing. Specs via service manual. Good luck!
THE 80's RAGE! Currently owns:
81, 85 Yamaha Tri Moto 125
83 Yamaha Tri Moto 200 x2
82,83 Yamaha Tri Moto 175 project
85 Yamaha Tri Z 250
84 Kawasaki Tecate 250
84 Honda ATC 70
85 Honda ATC 350X
84 Honda ATC 250R
(2) 84 Honda ATC 200x
82, 83 Honda ATC 185s
81 ATC 200
Lots of other parts and bikes