runs good, then bad, then shuts down

I’d check the bulkhead connections and the coil. I’ve had issues with hot coil killing engine then runs fine after sitting for awhile.