Jopiz,
Replace your spark plug cap. I know it sounds silly, but I had one with very similar symptoms. It would heat up as the RPMs would rise, & create an open circuit, coast to a stop & it would fire right back up. Tried a new CDI, Stator, & Coil only to find it was the silly cap.
Hope its as simple as this, keep us posted!
DoldGuy