Blocks

*This article or section documents the current version of Scratch (version 3.0). For this article in Scratch 2.0, see Blocks (2.0). For this article in Scratch 1.4, see Blocks (1.4).*This article is about pieces of code used in the editor. For other uses, see Blocks (disambiguation) and Program (disambiguation).
<sb>move (10) steps</sb> <scratchblocks>
when gf clicked
move (10) steps
say [Hello!] for (2) seconds
forever
if <<(score::variables) \> (50)> and <touching (mouse-pointer v)?>> then
dance for (2) seconds::custom
broadcast (Win v)
play sound (Cheer v) until done
repeat (100)
beep note (pitch::variables) for (0.1) secs
change [pitch v] by (1)

</scratchblocks>
**Blocks** are puzzle-piece shapes that are used to create code in Scratch. The blocks connect to each other vertically like a jigsaw puzzle, where each block type (hat, stack, reporter, boolean, or cap) has its own shape and its own slot shape for it to be inserted into, which prevents syntax errors. Series of connected blocks are called scripts.

Blocks are often easier to work with than text-based programming, as blocks do not need to be memorized like typed commands and syntax errors cannot occur. However, text-based programming is more flexible, as text can easily be edited without having to drag another block into the editor.

There are ten categories of blocks: Motion, Looks, Sound, Event, Control, Sensing, Operators, Variables, List, and My Blocks. The list blocks are shown under the Variables Blocks.

In total, there are eight Hat Blocks, five C Blocks, 34 Reporter Blocks, 14 Boolean Blocks, two Cap Blocks and 62 Stack Blocks, for a total of 125 blocks. (Block numbers do not include extensions.)

## Block Shapes

There are six different block shapes: Hat, Stack, Boolean, Reporter, C and Cap.

### Hat blocks

Main article: Hat Block
 File:Hat block grey.svg
**Hat blocks** are the blocks that start every script. They are shaped with a rounded top and a bump at the bottom

 this is so that a user can only place blocks below them. There are eight Hat blocks in the Scratch editor, six of which are in the Events category, one in the Control category, and one in the category My Blocks (if one has created one custom block).

### Stack blocks

 File:Stack block grey.svg
Main article: Stack Block
**Stack blocks** are the blocks that perform specific commands. They are shaped with a notch at the top and a bump on the bottom

 this is so blocks can be placed above and below them. There are 62 Stack blocks

 the most common block shape.

### Boolean blocks

 File:Boolean block grey.svg
Main article: Boolean Block
**Boolean blocks** are conditions

 they are either true or false. Think of them as "yes-no" questions. For example, if you asked a computer "does 2 + 2 = 4?", it would either tell you "True" or "False". With a hexagonal shape, there are 14 of these blocks.

### Reporter blocks

 File:Reporter block grey.svg
Main article: Reporter Block
**Reporter blocks** are the values. Reporter blocks can hold numbers and strings. It is like asking a friend, for example, "What is 2 + 2?", and they would answer "4". It can also report a variable. For example, "What is your age?" and they may answer: "15". Shaped with rounded edges, there are 34 of these blocks

 not counting the theoretically infinite amount of Reporter blocks that can be made for each variable and list.

### C blocks

 File:C block grey.svg
Main article: C Block
**C blocks** are blocks that take the shape of "C's". Also known as "Wrap blocks", these blocks loop the blocks within the Cs or check if a condition is true. There are five C blocks, and they can be found in the Control category. C blocks can be bumped at the bottom, allowing blocks to be attached below, or capped, which does not allow any blocks to be placed below.

### Cap blocks

 File:Cap block grey.svg
Main article: Cap Block
**Cap blocks** are the blocks that end scripts. They are shaped with a notch at the top and a flat bottom

 this is so you cannot place any blocks below them. There are two Cap blocks, which can both be found in the Control category.

## Block Categories

Main article: Block Categories
 File:Block categories with all extensions.png
Blocks are divided into 9 categories: Motion, Looks, Sound, Events, Control, Sensing, Operators, Variables, and My Blocks. Each category has blocks that perform a different function. There are also 11 extension categories that can be added to the block list by selecting them, and 3 Raspberry Pi extensions that are not available on other versions of Scratch. The block categories appear in the categories to the left of the Block Palette, and extensions will appear there when they are added.

## List of Blocks

There are 125 normal blocks in Scratch 3.0 (not including extensions or hidden blocks). There are 80 extension blocks (not including Raspberry Pi blocks). There are also many Hidden Blocks that cannot be accessed normally.

### Motion blocks

Main article: Motion Blocks
**Motion blocks** are the blocks that control a Sprite's movement. There are 17 Motion blocks in Scratch 3.0. The stage has no motion blocks, as it cannot move.

Motion has 15 stack blocks and 3 reporter blocks:

* <sb>move () steps</sb>  Moves the sprite forward the number of steps in the direction the sprite is facing.
* <sb>turn cw () degrees</sb>  Turns the sprite (clockwise) the specified amount.
* <sb>turn ccw () degrees</sb>  Turns the sprite (counter-clockwise) the specified amount.
* <sb>go to ( v)</sb>  Moves the sprite to the mouse-pointer, a random position, or another sprite.
* <sb>go to x: () y: ()</sb>  Moves the sprite to the specified X and Y position.
* <sb>glide () secs to ( v)</sb>  Glides the sprite to the mouse-pointer, a random position, or another sprite, taking as long as the specified amount of time
* <sb>glide () secs to x: () y: ()</sb>  Glides the sprite to the location, taking as long as the specified amount of time.
* <sb>point in direction ()</sb>  Points the sprite in the direction.
* <sb>point towards ( v)</sb>  Points the sprite towards the mouse-pointer or another sprite.
* <sb>change x by ()</sb>  Changes the sprite's X position by the amount.
* <sb>set x to ()</sb>  Sets the sprite's X position to the specified amount.
* <sb>change y by ()</sb>  Changes the sprite's Y position by the specified amount.
* <sb>set y to ()</sb>  Sets the sprite's Y position to the amount.
* <sb>if on edge, bounce</sb>  If touching the edge of the screen, the sprite's direction flips over
* <sb>set rotation style [ v]</sb>  Sets the rotation style of a sprite.
* <sb>(x position)</sb>  The X position of the sprite.
* <sb>(y position)</sb>  The Y position of the sprite.
* <sb>(direction)</sb>  The direction of the sprite.

### Looks blocks

Main article: Looks Blocks
**Looks blocks** are the blocks that control how a sprite looks. There are 23 Looks blocks in Scratch 3.0. Three of the 19 sprite Looks blocks have a counterpart for the Stage.

Looks has 18 stack blocks and 3 reporter blocks:

* <sb>say [] for () seconds</sb>  A speech bubble appears over the sprite and stays for the specified amount of time.
* <sb>say []</sb>  A speech bubble appears over the sprite and will only go away if the sprite says or thinks something else.
* <sb>think [] for () seconds</sb>  A thought bubble appears over the sprite and stays for the specified amount of time.
* <sb>think []</sb>  A thought bubble appears over the sprite and will only go away if the sprite says or thinks something else.
* <sb>switch costume to ( v)</sb>  Changes the sprite's costume to the specified one.
* <sb>next costume</sb>  Changes the sprite's costume to the next one in the costume list.
* <sb>switch backdrop to ( v)</sb>  Changes the stage's backdrop to the specified one.
* <sb>switch backdrop to ( v) and wait</sb>  Like the Switch to Backdrop () block, though it waits until all of the hat blocks triggered by this have completed. (Stage only)
* <sb>next backdrop</sb>  Changes the stage's backdrop to the next one in the costume list
* <sb>change size by ()</sb>  Changes the sprite's size by the amount.
* <sb>set size to ()%</sb>  Sets the sprite's size to the amount.
* <sb>change [ v] effect by ()</sb>  Changes the specified effect by the amount.
* <sb>set [ v] effect to ()</sb>  Sets the specified effect to the amount.
* <sb>clear graphic effects</sb>  Clears all graphic effects on the sprite.
* <sb>show</sb>  Shows the sprite.
* <sb>hide</sb>  Hides the sprite.
* <sb>go to [ v] layer</sb>  Puts a sprite in the front or back.
* <sb>go [ v] () layers</sb>  Changes the sprite's layer value by the amount.
* <sb>(costume [ v])</sb>  The number or name of the sprite current costume in the list.
* <sb>(backdrop [ v])</sb>  The number or name of the Stage's current backdrop in the list.
* <sb>(size)</sb>  The sprite's size.

### Sound blocks

Main article: Sound Blocks
**Sound blocks** are the blocks that control sound. There are 9 Sound blocks in Scratch 3.0. The note blocks in 3.0 have been moved to the Music Extension.

Sound has 8 stack blocks and 1 reporter block:

* <sb>play sound ( v) until done</sb>  Plays a sound and pauses the script until it finishes.
* <sb>start sound ( v)</sb>  Plays a sound without pausing the script.
* <sb>stop all sounds</sb>  Stops all playing sounds.
* <sb>change [pitch v] effect by ()</sb>  Change the pan left/right or pitch by the amount.
* <sb>set [pan left/right v] effect to ()</sb>  Set the pan left/right or pitch to the amount.
* <sb>clear sound effects</sb>  Clears any sound effects currently in place.
* <sb>change volume by ()</sb>  Changes the volume by the amount.
* <sb>set volume to ()%</sb>  Sets the volume to the amount.
* <sb>(volume)</sb>  The volume.

### Events blocks

Main article: Events Blocks
**Events blocks** are blocks that control events and the triggering of scripts. There are 8 Event blocks in Scratch 3.0.

Events has 6 hat blocks and 2 stack blocks:

* <sb>when green flag clicked</sb>  When the flag is clicked, the script activates.
* <sb>when [ v] key pressed</sb>  When the specified key is pressed, the script activates. The event will only be triggered again after the event is released.
* <sb>when this sprite clicked</sb>  When the sprite is clicked, the script activates.
* <sb>when backdrop switches to [ v]</sb>  When the backdrop switches to the one chosen, the script activates.
* <sb>when [ v] > ()</sb>  When the first value is greater than the second value, the script activates.
* <sb>when I receive [ v]</sb>  When the broadcast is received, the script activates.
* <sb>broadcast ( v)</sb>  Sends a broadcast throughout the Scratch program, activating When I Receive () blocks that are set to that broadcast.
* <sb>broadcast ( v) and wait</sb>  Like the Broadcast () block, but pauses the script until all scripts activated by the broadcast are completed.

### Control blocks

Main article: Control Blocks
**Control blocks** are the blocks that control scripts. There are 11 Control blocks in Scratch 3.0.

Control has 1 hat block, 3 stack blocks, and 5 C blocks:

* <sb>wait () seconds</sb>  Pauses the script for the amount of time.
* <sb>repeat ()</sb>  A loop that repeats the specified amount of times.
* <sb>forever</sb>  A loop that will never end unless the Stop Sign is pressed or the script is stopped by the Stop () block.
* <sb>if <> then</sb>  Checks the condition so that if the condition is true, the blocks inside it will activate.
* <scratchblocks>if <> then
else</scratchblocks>└ Checks the condition so that if the condition is true, the blocks inside the first C will activate and if the condition is false, the blocks inside the second C will activate.
* <sb>wait until <></sb>  Pauses the script until the condition is true.
* <sb>repeat until <></sb>  A loop that will stop once the condition is true.
* <sb>stop [ v]</sb>  Stops the scripts chosen through the drop-down menu. Can also be a stack block when "other scripts in this sprite" is chosen.
* <sb>when I start as a clone</sb> (sprites only)  This hat block is triggered whenever a clone is created, and will only be run by that clone.
* <sb>create clone of ( v)</sb>  Creates the specified clone.
* <sb>delete this clone</sb> (sprites only)  Deletes a clone.

### Sensing blocks

Main article: Sensing Blocks
**Sensing blocks** are the blocks that detect things. There are 18 Sensing blocks in Scratch 3.0.

Sensing has 3 stack blocks, 5 boolean blocks, and 10 reporter blocks:

* <sb><touching ( v)?></sb>  The condition for checking if the sprite is touching the mouse-pointer or another sprite.
* <sb><touching color [#0000ff]?></sb>  The condition for checking if the sprite is touching a specific color.
* <sb><color [#0000ff] is touching [#ff0000]?></sb>  The condition for checking if a color on the sprite is touching a specific color.
* <sb>(distance to ( v))</sb>  The distance from the sprite to the mouse-pointer or another sprite.
* <sb>ask [] and wait</sb>  An input box appears  you type the value in and it stores the value in the <sb>(answer)</sb> variable.
* <sb>(answer)</sb>  The most recent input with the Ask () And Wait block.
* <sb><key ( v) pressed?></sb>  The condition for checking if the specified key is being pressed.
* <sb><mouse down?></sb>  The condition for checking if the mouse is down.
* <sb>(mouse x)</sb>  The mouse-pointer's X position.
* <sb>(mouse y)</sb>  The mouse-pointer's Y position.
* <sb>set drag mode [ v]</sb>  Sets the sprite to draggable or not draggable.
* <sb>(loudness)</sb>  How loud the noise is that the microphone is sensing.
* <sb>(timer)</sb>  How much time has passed since the Scratch program was opened or the timer reset.
* <sb>reset timer</sb>  Resets the timer.
* <sb>([ v] of ( v))</sb>  The X position, Y position, direction, costume, size or volume of the Stage or a sprite.
* <sb>(current [ v])</sb>  The specified time unit selected.
* <sb>(days since 2000)</sb>  The number of days since 2000.
* <sb>(username)</sb>  The username of a user.

### Operators blocks

Main article: Operators Blocks
**Operators blocks** are the blocks that perform math functions and string handling. There are 18 Operators blocks in Scratch 3.0.

Operators has 7 boolean blocks and 11 reporter blocks:

* <sb>(() + ())</sb>  The value of the addition.
* <sb>(() - ())</sb>  The value of the subtraction.
* <sb>(() \* ())</sb>  The value of the multiplication.
* <sb>(() / ())</sb>  The value of the division.
* <sb>(pick random () to ())</sb>  Picks a random number between the two limits.
* <sb><[] > []></sb>  The condition for checking if a value is greater than the other.
* <sb><[] < []></sb>  The condition for checking if a value is less than the other.
* <sb><[] = []></sb>  The condition for checking if two values are equal.
* <sb><<> and <>></sb>  True if both conditions are true.
* <sb><<> or <>></sb>  True if either condition is true.
* <sb><not <>></sb>  Makes the condition checked if it is false, not true, or true, not false.
* <sb>(join [] [])</sb>  The two values put right next to each other.
* <sb>(letter () of [])</sb>  The specified character of the value.
* <sb>(length of [])</sb>  The length of the value.
* <sb><[] contains []?></sb> Checks if the first parameter's text contains the second parameter's text  if it does, the block returns true.
* <sb>(() mod ())</sb>  The remainder of the division.
* <sb>(round ())</sb>  Rounds the value to the nearest whole number.
* <sb>([abs v] of ())</sb>  The absolute value (abs), square root (sqrt), sine (sin), cosine (cos), tangent (tan), asine (asin), acosine (acos), atangent (atan), natural logarithm (ln), logarithm (log), exponential function (e^), or base 10 exponential function (10^) of a specified value.

Right-clicking some of the blocks will yield more choices of its type.

### Variables blocks

Main article: Variables Blocks
**Variables blocks** are the blocks that hold variables and lists. There are 5 Variables blocks and 11 list blocks in Scratch 3.0.

Variables has 4 stack blocks and one reporter block for each variable created:

* <sb>(variable)</sb>  The variable's value.
* <sb>set [ v] to ()</sb>  Sets the specified variable to the amount.
* <sb>change [ v] by ()</sb>  Changes the specified variable by the amount.
* <sb>show variable [ v]</sb>  Shows the variable's Stage Monitor.
* <sb>hide variable [ v]</sb>  Hides the variable's Stage Monitor.

#### List blocks

Main article: List Blocks
**List blocks** are the blocks that manage lists. They are located in the Variables category and are not found in the bar to the left. There are 12 List blocks in Scratch 3.0.

List has 7 stack blocks, 3 reporter blocks (one additional reporter block for each list created), and 1 boolean block:

* <sb>(list::list)</sb>  The list's value.
* <sb>add [] to [ v]</sb>  Adds an item to the list (the item goes at the bottom of the list of items) with the specified content in it.
* <sb>delete () of [ v]</sb>  Deletes the item of the list.
* <sb>delete all of [ v]</sb>  Deletes all items of the list.
* <sb>insert [] at () of [ v]</sb>  Adds an item to the list (the item goes where you specify in the list of items) with the specified content in it.
* <sb>replace item () of [ v] with []</sb>  Replaces the item's content with the specified content.
* <sb>(item () of [ v])</sb>  The item's value.
* <sb>(item # of [] in [ v])</sb>  Reports the index in a list where an item first appears.
* <sb>(length of [ v])</sb>  How many items there are in the specified list.
* <sb><[ v] contains []?></sb>  The condition for checking if an item's content is the specified text.
* <sb>show list [ v]</sb>  Shows a list.
* <sb>hide list [ v]</sb>  Hides a list.

### My Blocks

Main article: My Blocks
**My Blocks** (also known as Custom Blocks), are user-made custom blocks. There are 4 different, unique kinds of My Blocks in Scratch 3.0.
Scratch 3.0 has the following My Blocks Hat block:

* <sb>define custom block</sb>  Defines a custom block.

Scratch 3.0 has the following My Blocks Stack block:

* <sb>custom block :: custom</sb>  A custom block.

Scratch 3.0 has the following My Blocks Boolean block:

* <sb><custom boolean::custom></sb>  A true/false value.

Scratch 3.0 has the following My Blocks Reporter block:

* <sb>(custom reporter::custom)</sb>  An input for a value, set by the definition My Block.

## Extensions

Main article: Extension
Scratch 3.0 has a number of extensions that can be added to the block list. To choose an extension, press the blue button below the regular block sections.

### Music Extension

Main article: Music Extension
The Music extension allows one to play MIDI Notes with different instruments. There are seven Music extension blocks in Scratch 3.0.

Scratch 3.0 has six Music stack blocks and one Music reporter block:

* <sb>play drum ( v) for (0.25) beats</sb>
* <sb>rest for () beats</sb>
* <sb>play note () for () beats</sb>
* <sb>set instrument to ( v)</sb>
* <sb>set tempo to ()</sb>
* <sb>change tempo by ()</sb>
* <sb>tempo::reporter</sb>

### Pen Extension

Main article: Pen Extension
The Pen extension allows one to draw on the stage with the pen. Scratch 3.0 has nine Pen stack blocks:

* <sb>erase all</sb>
* <sb>stamp</sb>
* <sb>pen up</sb>
* <sb>pen down</sb>
* <sb>set pen color to [#cd4f39]</sb>
* <sb>change pen ( v) by ()</sb>
* <sb>set pen ( v) to ()</sb>
* <sb>change pen size by ()</sb>
* <sb>set pen size to ()</sb>

### Video Sensing Extension

Main article: Video Sensing Extension
The Video Sensing extension lets projects interact with a webcam. There are four Video Sensing blocks in Scratch 3.0.

Scratch 3.0 has one Video Sensing hat block, one reporter block, and two stack blocks:

* <sb>when video motion > ()</sb>
* <sb>video ( v) on ( v)</sb>
* <sb>turn video ( v)</sb>
* <sb>set video transparency to ()
</sb>

### Text to Speech Extension

Main article: Text to Speech Extension
The Text to Speech extension allows text to be read aloud. Scratch 3.0 has three Text to Speech stack blocks:

* <sb>speak ()</sb>
* <sb>set voice to ( v)</sb>
* <sb>set language to ( v)</sb>

### Translate Extension

Main article: Translate Extension
The Translate extension allows text to be translated to other languages. Scratch 3.0 has two Translate reporter blocks:

* <sb>(translate () to ( v))</sb>
* <sb>language</sb>

### Makey Makey Extension

Main article: Makey Makey Extension
The Makey Makey extension lets projects interact with the Makey Makey. Scratch 3.0 has two Makey Makey hat blocks:

* <sb>when ( v) key pressed::makeymakey</sb>
* <sb>when ( v) pressed in order</sb>

### micro:bit Extension

Main article: micro:bit Extension
The micro:bit extension lets proejcts interact with the micro:bit. There are 10 micro:bit blocks in Scratch 3.0.

Scratch 3.0 has four micro:bit hat blocks, three stack blocks, two boolean blocks, and one reporter block:

* <sb>when ( v) button pressed</sb>
* <sb><( v) button pressed?></sb>
* <sb>when ( v)::microbit</sb>
* <sb>display ( v)::microbit</sb>
* <sb>display text ()::microbit</sb>
* <sb>clear display::microbit</sb>
* <sb>when tilted ( v)::microbit hat</sb>
* <sb><tilted ( v)?::microbit></sb>
* <sb>tilt angle ( v)::microbit</sb>
* <sb>when pin ( v) connected</sb>

### LEGO MINDSTORMS EV3 Extension

Main article: LEGO Mindstorms EV3 Extension
The LEGO MINDSTORMS EV3 extension lets projects interact with the LEGO MINDSTORMS EV3. There are 11 EV3 blocks in Scratch 3.0.

Scratch 3.0 has four EV3 stack blocks, three hat blocks, three reporter blocks, and one boolean block.

* <sb>motor ( v) turn this way for () seconds</sb>
* <sb>motor ( v) turn that way for () seconds</sb>
* <sb>motor ( v) set power ()%</sb>
* <sb>(motor ( v) position::ev3)</sb>
* <sb>when button ( v) pressed</sb>
* <sb>when distance \<()</sb>
* <sb>when brightness \<()</sb>
* <sb><button ( v) pressed?::ev3></sb>
* <sb>distance::ev3</sb>
* <sb>brightness::ev3</sb>
* <sb>beep note () for () secs</sb>

### LEGO BOOST Extension

Main article: LEGO BOOST Extension
The LEGO BOOST extension lets projects interact with the LEGO BOOST. There are 12 LEGO BOOST blocks in Scratch 3.0.

Scratch 3.0 has seven Lego BOOST stack blocks, two reporter blocks, two hat blocks, and one boolean block:

* <sb>turn motor ( v) for () seconds</sb>
* <sb>turn motor ( v) for () rotations</sb>
* <sb>turn motor ( v) on</sb>
* <sb>turn motor ( v) off</sb>
* <sb>set motor ( v) speed to ()%</sb>
* <sb>set motor ( v) direction ( v)</sb>
* <sb>motor ( v) position::boost</sb>
* <sb>when ( v) brick seen</sb>
* <sb>seeing ( v) brick?</sb>
* <sb>when tilted ( v)::boost</sb>
* <sb>tilt angle ( v)::boost</sb>
* <sb>set light color to ()::boost</sb>

### LEGO Education WeDo 2.0 Extension

Main article: LEGO Education WeDo 2.0 Extension
The Lego Education WeDo 2.0 extension lets projects interact with the LEGO WeDo Construction Set. There are 11 blocks in Scratch 3.0.

Scratch 3.0 contains six Lego Education WeDo 2.0 stack blocks, two hat blocks, two reporter blocks, and one boolean block:

* <sb>turn ( v) on for () seconds</sb>
* <sb>turn ( v) on</sb>
* <sb>turn ( v) off</sb>
* <sb>set ( v) power to ()</sb>
* <sb>set ( v) direction to ( v)</sb>
* <sb>set light color to ()</sb>
* <sb>when distance ( v) ()</sb>
* <sb>when tilted ( v)::wedo</sb>
* <sb>distance::wedo</sb>
* <sb>tilted ( v)?::wedo</sb>
* <sb>tilt angle ( v)::wedo</sb>

### Go Direct Force & Acceleration Extension

Main article: Go Direct Force & Acceleration Extension
The Go Direct Force & Acceleration Extension allows users to interact with the Go Direct force sensor.

Scratch 3.0 contains 4 Go Direct Force & Acceleration reporter blocks, three hat blocks, and two boolean blocks.

* <sb>when (shaken v)</sb>
* <sb>when force sensor ( v)</sb>
* <sb>(force)</sb>
* <sb>when tilted ( v)::gdxfor</sb>
* <sb><tilted ( v)?::gdxfor></sb>
* <sb>tilt angle ( v)::gdxfor</sb>
* <sb><falling?></sb>
* <sb>(spin speed ( v))</sb>
* <sb>(acceleration ( v))</sb>

### Raspberry Pi Only Extensions

Main article: Raspberry Pi
There are also three extensions that are only available on the Raspberry Pi version of Scratch.

#### Raspberry Pi GPIO Extension

Main article: Raspberry Pi GPIO Extension
Scratch 3.0 contains 2 Raspberry Pi GPIO stack blocks, one hat block, and one boolean block.

* <sb>when gpio (0 v) is [high v]:: extension hat</sb>
* <sb><gpio (0 v) is [high v]?:: extension></sb>
* <sb>set gpio (0 v) to output [high v]:: extension</sb>
* <sb>set gpio (0 v) to input [pulled high v]:: extension</sb>

#### Raspberry Pi Sense HAT Extension

Main article: Raspberry Pi Sense HAT Extension
Scratch 3.0 contains ten Raspberry Pi Sense HAT stack blocks, three hat blocks, one boolean block, and six reporter blocks.

* <sb>display text [Hello!]:: extension</sb>
* <sb>display character [A]:: extension</sb>
* File:Display () Sense HAT.png
* <sb>display sprite:: extension</sb>
* <sb>display stage:: extension</sb>
* <sb>clear display:: extension</sb>
* <sb>set colour to [#2d184f]:: extension</sb>
* <sb>set background to [#4160b5]:: extension</sb>
* <sb>set pixel x (0 v) y (0 v) to [#5eb87c]:: extension</sb>
* <sb>set rotation to [0 v] degrees:: extension</sb>
* <sb>when joystick pushed [up v]:: extension hat</sb>
* <sb><joystick pushed [up v]?:: extension></sb>
* <sb>when shaken:: extension hat</sb>
* <sb>when tilted [forward v]:: extension hat</sb>
* <sb>(temperature:: extension)</sb>
* <sb>(pressure:: extension)</sb>
* <sb>(humidity:: extension</sb>
* <sb>(roll:: extension)</sb>
* <sb>(pitch:: extension)</sb>
* <sb>(yaw:: extension)</sb>

#### Raspberry Pi Simple Electronics Extension

Main article: Raspberry Pi Simple Electronics Extension
Scratch 3.0 contains two Raspberry Pi Simple Electronics stack blocks, one boolean block, and one hat block.

* <sb>when button (0 v) is [pressed v]:: extension hat</sb>
* <sb><button (0 v) is [pressed v]?:: extension></sb>
* <sb>turn LED (0 v) [on v]:: extension</sb>
* <sb>toggle LED (0 v):: extension</sb>

## Scratch Block Plugin

Main article: Block Plugin
The Block Plugin allows one to write blocks and scripts to appear on the Scratch Forums and Scratch Wiki, as well as other websites with the included JavaScript. It is written by the Scratcher blob8108. The dedicated forum topic for testing this plugin out can be found here.

## In Other Programming Languages

Scratch is one of the original languages ever to use blocks, inspiring other languages to inherit the idea. Scratch modifications contain many new blocks typically that are not present in Scratch. MIT, where Scratch is made, has also created other languages using blocks such as the MIT App Inventor. Stencyl is a highly-professional language that features an entire block interface for programming real-time apps and online games. Scratch Jr also has blocks which are even more friendly for younger children to understand.

## See Also

* Edit Block Colors

de:Alle Blöcke = Übersichts-Liste
ru:Блок
id:Balok
nl:Scratch blokken
fr:Scratch Wiki Accueil/les blocs
ja:ブロック
es:Bloques
pt:Blocos
tr:Bloklar
zh:积木
ko:블록
uk:Блок
sq:Kuba
gu:બ્લોક્સ