Set a cupcake limit on the player, and made a victory screen appear once they reach that limit. Players can restart from 0 cupcakes (keeping their upgrades) when they hit the cupcake limit.