Scratch Block Reference Cheat Sheet
A one-page printable reference for Scratch 3 blocks: motion, looks, sound, events, control, sensing, operators and variables. Pin it next to your monitor!
A one-page printable reference for Scratch 3 blocks: motion, looks, sound, events, control, sensing, operators and variables. Pin it next to your monitor!
| move() steps | Move sprite forward by N steps |
| turn right () degrees | Turn clockwise N degrees |
| turn left () degrees | Turn counter-clockwise N degrees |
| go to x: () y: () | Teleport to position |
| go to [random position] | Move to random spot on stage |
| glide () secs to x: () y: () | Smooth move over time |
| point in direction () | Face a compass direction (0-360) |
| point towards (mouse-pointer) | Turn to face the mouse or another sprite |
| set rotation style () | left-right, don't rotate, or all around |
| if on edge, bounce | Reverse at stage edges |
| set x to () | Set horizontal position |
| set y to () | Set vertical position |
| change x by () | Move horizontally |
| change y by () | Move vertically |
| x position | Reporter: current X |
| y position | Reporter: current Y |
| say () for () secs | Show speech bubble with timer |
| say () | Show speech bubble (until changed) |
| think () for () secs | Show thought bubble with timer |
| think () | Show thought bubble (until changed) |
| show | Make sprite visible |
| hide | Make sprite invisible |
| switch costume to () | Change sprite appearance |
| next costume | Cycle to next costume |
| switch backdrop to () | Change stage background |
| next backdrop | Cycle to next backdrop |
| change size by () | Grow or shrink by percent |
| set size to () % | Set exact size |
| change graphic effect by () | Alter visual effect |
| clear graphic effects | Reset all effects |
| go to (front) layer | Move to the front or back of the pile |
| costume (number) | The costume number showing right now |
| play sound () until done | Play full sound, then continue |
| start sound () | Play sound without waiting |
| stop all sounds | Halt every playing sound |
| play drum () for () beats | Play a drum pattern |
| play note () for () beats | Play a musical note |
| set instrument to () | Change MIDI instrument |
| change volume by () | Adjust volume up/down |
| set volume to () % | Set exact volume |
| volume | Reporter: current volume |
| change pitch effect by () | Alter pitch |
| set pitch effect to () | Set exact pitch |
| clear sound effects | Reset pitch and volume effects |
| when green flag clicked | Start script on play |
| when [space] key pressed | Key press trigger |
| when this sprite clicked | Click/tap on sprite |
| when backdrop switches to () | Backdrop change trigger |
| when I receive () | Listen for a broadcast |
| broadcast () | Send message to all sprites |
| broadcast () and wait | Send and wait for all to finish |
| when loudness > () | Microphone threshold trigger |
| when timer > () | Timer threshold trigger |
| wait () seconds | Pause the script for a moment |
| repeat () | Run the blocks inside that many times |
| forever | Run the blocks inside again and again (game loop) |
| if <> then | Run the blocks inside only if the condition is true |
| if <> then else | Choose one of two paths |
| wait until <> | Pause until the condition turns true |
| repeat until <> | Keep looping until the condition turns true |
| stop (all) | Stop every script in the project |
| stop (this script) | Stop only this script |
| stop (other scripts in sprite) | Stop the sprite's other scripts |
| create clone of (myself) | Make a copy of a sprite |
| when I start as a clone | Runs when a clone is created |
| delete this clone | Remove this clone |
| touching (mouse-pointer)? | Is it touching the mouse, the edge or a sprite? |
| touching color ()? | Is it touching this colour? |
| color () is touching ()? | Do these two colours overlap? |
| distance to (mouse-pointer) | How far away is it? |
| ask () and wait | Show a box for the player to type in |
| answer | The last thing the player typed |
| key () pressed? | Is this key held down? |
| mouse down? | Is the mouse button held down? |
| mouse x | Where the mouse is across the stage |
| mouse y | Where the mouse is up the stage |
| loudness | How loud the microphone hears |
| timer | Seconds since the project started |
| reset timer | Set the timer back to 0 |
| x position of (Sprite2) | A value read from another sprite |
| current (year) | The date or time right now |
| days since 2000 | Days since 1 January 2000 |
| username | The logged-in Scratch username |
โโ ARITHMETIC โโ ( 4 + 2 ) -- addition ( 4 - 2 ) -- subtraction ( 4 * 2 ) -- multiplication ( 4 / 2 ) -- division pick random (1) to (10) โโ COMPARISON โโ ( 5 > 3 ) -- greater than ( 5 < 3 ) -- less than ( 5 = 5 ) -- equals โโ LOGIC โโ <> and <> -- both true <> or <> -- either true not <> -- invert โโ STRINGS โโ join ("hello") (" world") letter (1) of ("scratch") length of ("scratch") <> contains <> โโ MATH FUNCTIONS โโ round (4.5) (10 mod 3) abs, floor, ceiling, sqrt sin, cos, tan, asin, acos, atan
โโ VARIABLES โโ set [score] to (0) change [score] by (1) show variable [score] hide variable [score] โโ LISTS โโ add ("apple") to [inventory] delete (1) of [inventory] insert ("banana") at (2) of [inventory] replace item (1) of [inventory] with ("cherry") item (1) of [inventory] length of [inventory] item # of ("apple") in [inventory] โโ MY BLOCKS โโ define my block (input1) (input2) -- custom procedure with inputs -- reusable across all sprites
Move with the arrow keys. Put this script on the sprite you want to control.
when green flag clicked forever if key left arrow pressed? then change x by (-5) if key right arrow pressed? then change x by (5) if key up arrow pressed? then change y by (5) if key down arrow pressed? then change y by (-5)
Collect a coin and add to the score. Put this on the Coin sprite.
when green flag clicked forever if touching Player? then change [score] by (1) go to x: pick random (-200) to (200) y: pick random (-150) to (150)
Count down from 60. Make a variable called time first.
when green flag clicked set [time] to (60) repeat until time = 0 wait (1) seconds change [time] by (-1) say Game over!
Drop falling enemies with clones.
when green flag clicked forever wait (2) seconds create clone of (myself) when I start as a clone go to x: pick random (-220) to (220) y: (180) repeat until touching edge? change y by (-3) delete this clone
New to Scratch? Start with the Scratch Starter Guide, then keep this sheet beside you as you build.
๐ฑ Scratch Starter Guide โ ๐ง Browse Workshops โ