When implementing cryptography, I want to wipe any secret data once the project is stopped, mainly to avoid accidentally saving the project when the variables contain private keys etc. This is based on @Sheep_maker's timer-based method for detecting the stop button being pressed ( https://scratch.mit.edu/discuss/topic/377661/?page=1#post-3770968 ) (I'm not sure who actually came up with it first though). However, that method can trigger false-positives when the project is lagging (e.g. when executing a complex cryptographic algorithm!), so I added an additional check. The idea is that clones get deleted when the project is stopped, so I use the touching-colour block to detect whether the clone still exists or not. The obvious caveat is that you need to avoid putting another sprite on top of the detector sprite, because that would mess with the touching-colour detection. Putting the detector in the bottom-left corner makes it invisible (due to the scratch player's rounded corners)