Catalog / Scratch Programming Cheatsheet
Scratch Programming Cheatsheet
A quick reference guide to Scratch, a visual programming language for creating interactive stories, games, and animations. This cheatsheet covers essential blocks, concepts, and best practices.
Motion Blocks
Basic Movement
|
Moves the sprite forward by the specified number of steps. Use negative values to move backward. |
|
Rotates the sprite clockwise by the specified number of degrees. |
|
Rotates the sprite counter-clockwise by the specified number of degrees. |
|
Moves the sprite to a random location on the stage. |
|
Moves the sprite to the specified x and y coordinates. |
|
Smoothly animates the sprite moving to the specified x and y coordinates over the given number of seconds. |
Direction and Rotation
|
Sets the sprite’s direction to the specified angle (0=up, 90=right, 180=down, -90=left). |
|
Points the sprite towards the mouse pointer or another sprite. |
|
Changes the sprite’s horizontal position by the specified amount. |
|
Sets the sprite’s horizontal position to the specified value. |
|
Changes the sprite’s vertical position by the specified amount. |
|
Sets the sprite’s vertical position to the specified value. |
Edge Bouncing
|
Looks Blocks
Speech and Thought
|
Displays a speech bubble with the specified text for the given duration. |
|
Displays a speech bubble with the specified text indefinitely. |
|
Displays a thought bubble with the specified text for the given duration. |
|
Displays a thought bubble with the specified text indefinitely. |
Costumes and Backdrops
|
Changes the sprite’s appearance to the specified costume. |
|
Switches to the next costume in the sprite’s costume list. |
|
Changes the stage’s background to the specified backdrop. |
|
Switches to the next backdrop in the stage’s backdrop list. |
Effects
|
Changes the specified visual effect (color, fisheye, whirl, pixelate, mosaic, brightness, ghost) by the given amount. |
|
Sets the specified visual effect to the given value. |
|
Removes all visual effects applied to the sprite. |
|
Changes the sprite’s size by the specified amount. |
|
Sets the sprite’s size to the specified percentage. |
Visibility
|
Makes the sprite visible. |
|
Hides the sprite from view. |
|
Moves the sprite to the front or back layer, controlling its stacking order. |
Control Blocks
Events
|
Starts the script when the green flag is clicked. |
|
Starts the script when the sprite is clicked. |
|
Starts the script when the specified key is pressed. |
|
Starts the script when the backdrop changes to the specified backdrop. |
|
Starts the script when the loudness (from the microphone) exceeds the specified threshold. |
|
Starts the script when a broadcast message is received. |
Loops
|
Pauses the script execution for the specified number of seconds. |
|
Executes the blocks inside the loop the specified number of times. |
|
Executes the blocks inside the loop indefinitely. |
|
Executes the blocks inside the |
|
Executes the blocks inside the |
|
Pauses the script execution until the specified condition is true. |
|
Executes the blocks inside the loop until the specified condition is true. |
Stopping Scripts
|
Stops the specified scripts (all, this script, other scripts in sprite). |
|
Creates a clone of the sprite. |
|
Deletes the current clone. |
Broadcasting
|
Sends a message to all sprites and the stage without waiting for a response. |
|
Sends a message and pauses the script execution until all receiving scripts have finished running. |
Sound and Pen Blocks
Sound Blocks
|
Plays the specified sound and waits until it finishes before continuing the script. |
|
Starts playing the sound without waiting for it to finish. |
|
Stops all currently playing sounds. |
|
Changes the volume by the specified amount. |
|
Sets the volume to the specified percentage. |
|
Changes the tempo (speed) of the music by the specified amount. |
|
Sets the tempo to the specified beats per minute. |
Pen Blocks
|
Clears all pen drawings from the stage. |
|
Starts drawing when the sprite moves. |
|
Stops drawing when the sprite moves. |
|
Sets the pen color to the specified RGB value. |
|
Changes the pen color by the specified amount. |
|
Sets the pen size to the specified value. |
|
Changes the pen size by the specified amount. |