runs good, then bad, then shuts down

If it is dropping spark for sure then the pick up is on its way out.