Most Common Scripts

This article or section documents a feature not included in the current version of Scratch (2.0). It is only useful from a historical perspective.

A word-cloud-like rendition of these scripts.
There are over 38,265,000 scripts in use on the Scratch Website.[1] Many of these are used many times, for many reasons such as them being used in the sample projects, or in popular project types. This article lists and shows the most common scripts.[2]

Many of these scripts have counterparts. For example, a script with a "hide" block will often have a similar script with a "show" block.

Top 25 Scripts

1 —
when I receive [ v]
hide
This script is used in animations, games, simulations, almost any kind of project. At different times — controlled by broadcasts — the sprite must hide.
See script 4 for the opposite.
2 —
when gf clicked
hide
This script is very similar to the above one. Sprites also must set themselves up when the project starts.
See script 8 for the opposite.
3 —
when gf clicked
This is an empty When Green Flag Clicked block. Its usage likely means a feature that was tested and dropped before the final release, possibly because it was too glitchy. This shows how many people forget about "stray" bocks, and how accommodating Scratch is in allowing such things.
See scripts 5 and 12.
4 —
when I receive [ v]
show
This script is used in animations, games, simulations, almost any kind of project. At different times — controlled by broadcasts — the sprite must show.
See script 1 for the opposite.
5 —
when I receive [ v]
This is an empty When I Receive () block. Its usage likely means a feature that was tested and dropped before the final release, possibly because it was too glitchy.
See scripts 3 and 12.
6 —
when I receive [ v]
switch to background [ v]
This script is used in animations, games, simulations, almost any kind of project. At different times — controlled by broadcasts — a different background must be displayed.
See script 9 for the sprites' version.
7 —
when I am clicked
broadcast [ v]
This script is likely used for buttons.
See script 21 for a similar one.
8 —
when gf clicked
show
This script is used in animations, games, simulations, almost any kind of project. Sprites must set themselves up when the project starts.
See script 2 for the opposite.
9 —
when I receive [ v]
switch to costume [ v]
This script is used in animations, games, simulations, almost any kind of project. At different times — controlled by broadcasts — a different costume must be displayed.
See script 6 for the Stage's version.
10 —
//Comment
For technical reasons,[3] the comment block was counted as a script. It is often used to explain the script or project.
11 —
when [ v] key pressed
hide
A key being pressed can also be similar to a choice, and therefore the sprite(s) not chosen must hide.
See script 21 for the opposite.
12 —
when [ v] key pressed
This is an empty When () Key Pressed block. Its usage likely means a feature that was tested and dropped before the final release, possibly because it was too glitchy.
See scripts 3 and 5.
13 —
when gf clicked
forever
  play sound [ v] until done
This script is generally used for sounds playing in the background. Many animations and games have this. The most common argument is "recording1", implying that most Scratchers use sounds recorded using the microphone in Scratch.
14 —
when gf clicked
switch to costume [ v]
This script is used to set up a sprite that has multiple costumes.
See the next script for the Stage's version.
15 —
when gf clicked
switch to background [ v]
This script is used to set the Stage to the correct background when the project starts
See the previous script for a sprite's version.
16 —
when [ v] key pressed
point in direction (number v)
move () steps
This script is usually used for interactivity. It is most commonly used in having the arrow keys point the sprite, then move 10 steps.
17 —
when gf clicked
forever
  wait () secs
  next costume
18 —
when gf clicked
forever
  next costume
  wait () secs
These scripts are often used in stop-motion animation.
These two scripts work the same; the only difference is the placement of the Next Costume block either before or after the Wait () Secs block.
19 —
when gf clicked
set [ v] to []
This script is most often used for resetting variables to the value they need to be at.
20 —
when gf clicked
go to x:() y:()
This script is used for sending sprites to the right place when the project starts.
See script 24, which hides the sprite as well.
21 —
when [ v] key pressed
show
This is the opposite of script 11, and shows a sprite, such as the next choice, when a key is pressed.
22 —
when I am clicked
broadcast [ v]
hide
This script, like number 16, can also be used for interactivity, such as changing a display.
23 —
when [ v] key pressed
switch to costume [ v]
This script is used to change a value when a broadcast is received. An example is when the next level starts, reset the level's timer.
24 —
when I receive [ v]
set [ v] to []
This script is used for sending sprites to the right place when the project starts, then hiding them.
See script 20, which doesn't hide the sprite.
25 —
when gf clicked
go to x:() y:()
hide
This script constantly changes a graphic effect by a value. It can be used on a background that constantly changes its color.

References

  1. http://stats.scratch.mit.edu/community/
  2. https://spreadsheets.google.com/spreadsheet/ccc?key=0AjIVmkJy3aEZdGlfOWFza0oxX09VQmgxQURIZ1BENVE&hl=en_US
  3. Scratch Blog >> Here's What 44 million Scratch Scripts Look Like >> Above "Methodology" section
  • This page was last modified on 22 February 2014, at 04:53.