I doubt you need a new engine. It sounds as if the engine is mechanically sound. But to be sure, do a compression check immediately after the engine quits. If it is good, and it isn't bellowing smoke out of the exhaust, then you've got a fuel delivery or spark issue. You may need nothing more than a carb rebuild or ignition module.