here is how to detect when people press the "stop" button. press "stop" to see the script I used !
it's been known for a while that you can make a sprite, have it set its "ghost" effect to 100, and it will appear when you press "stop" (due to the stop button resetting graphical effects). however you can't add any script you want to that, just make the sprite appear. so here is how to make the stop button do whatever you want :) (yes, that includes restarting the project)