Eng:Making Scratch Close (1.4)

It is simple to make a project that closes when the Green Flag is clicked. This has been one way users try to prevent remixing, though it is actively discouraged by the Scratch Team. It has also not been successful, as you can open a remixed project without ever pressing the Green Flag.

Method 1: Variables

 * 1) Create your project.
 * 2) Make a personal variable called "variable".
 * 3) Add the following code to your sprite:

when gf clicked hide set [variable v] to [2] repeat (variable) set [variable v] to ((variable) * (variable)) repeat (variable) set [variable v] to ((variable) * (variable)) end end

Or

when gf clicked hide set [variable v] to [2] repeat (variable) change [variable v] by ([10 ^ v] of (variable)) repeat (variable) change [variable v] by ([10 ^ v] of (variable)) end end

Or

when gf clicked hide set [variable v] to [12] forever set [variable v] to ((variable) * (variable))

Explanation
This script will fill Squeak's memory, and will force it to close. Squeak automatically crashes when a variable reaches a very high amount as it does not have the memory to maintain it. Since Scratch runs within the Squeak environment, Scratch closes when the Squeak environment closes. If a high RAM has been allotted to Scratch, it may just say "Infinity", and not close.

Method 2: Graphic Effects
when gf clicked set [water ripple v] effect to (1)
 * 1) Get into the Scratch 1.4 Source Code and open the System Browser.
 * 2) Add   near the rest of the graphic effect names in
 * 3) Save your changes and close the System Browser.
 * 4) Drag out a Set  Effect to  block and choose "water ripple" from the dropdown and set the value to 1 or higher. When the block is clicked, it will crash Scratch. Note that Squeak doesn't have enough memory to run the effect, so it crashes instead.

Method 3: Hacked Block
closeScratch Smalltalk snapshot: false andQuit: true when gf clicked close Scratch // category=control
 * 1) Get into the Scratch 1.4 Source Code and open the System Browser.
 * 2) In   add   at the end of the   section
 * 3) Add the following in
 * 1) Save both your changes and close the System Browser.
 * 2) Drag out the close Scratch block that you just made, and run the block. Instead of crashing, Scratch closes without a warning.