(Redirected from Define ())

"Custom Block" redirects here. For the block itself, see () (Custom block).
SandCastleIcon.png This page has links to websites or programs not trusted by Scratch or hosted by Wikipedia. Remember to stay safe while using the Internet, as we can't guarantee the safety of other websites.
define custom block
The define block in Scratch 3.0.
My Blocks (known as More Blocks in Scratch 2.0) is one of the ten categories of Scratch blocks. It holds procedures for the selected sprite. They are color-coded pink. Before any blocks are created, it is empty, except for a "Make a Block" button. Clicking this button brings up a dialogue asking for the block name. Then, enter the desired name as well as any inputs, and create the block.
A define block from More Blocks in Scratch 2.0
The past versions of the Define block

This category can technically have an unlimited amount of blocks, due to its blocks being user-created, but it has 1 type of Stack block and 1 type of Hat block (albeit modified).


Note Note: Click on a block to learn more about it!

Scratch 3.0 has the following 1 Hat block in More Blocks:

Scratch 3.0 has the following 1 Stack block in More Blocks:

Uses of Custom Blocks

Custom blocks are useful in many programming situations, such as the following:

The Make a Block dialog
  • reducing project file size
  • running a script without screen refresh
  • organization of scripts instead of duplicating large scripts with minor edits

Custom blocks allow for number, string, and Boolean inputs to be inserted into the definition and title, which the input of can be edited in the stack block. For example, if you have a number input inserted into a custom block's definition, you can run the custom procedure entering any number into the custom stack block, and that number will be rendered as all the number inputs in the definition. This easy input insertion method allows a project to perform large, customizable scripts without having to duplicate the scripts, edit a few blocks, and waste file space.

Using custom blocks is the only way to run scripts without screen refresh. Screen refresh is the very miniscule wait between each block in a script. When creating the title of a custom block, there are buttons to add inputs and a checkbox that allows you to disable screen refresh (by default it is enabled.) When the box is checked and the custom block runs, it will perform in an instant, which can be beneficial for setting up a particular scene in a project or performing large mathematical calculations, possibly in a game with artificial intelligence.


Main article: List of Block Workarounds

The workaround for custom blocks does not allow features such as inputs, for they would require variables, or disabling screen refresh, but it works well for basic scripts. It uses a broadcasting method instead of a procedure. When the broadcast is received, in a way the sprite or stage performs its own procedure.

when gf clicked
broadcast [jump v] and wait
when I receive [jump v]
repeat (5)
change y by (6)
repeat (5)
change y by (-6)

Procedures in Snap!

Snap!, previously called BYOB, is a graphical programming language based on Scratch. Among other things (the most important of which are first class procedures and first class lists) Snap! allows making reporters and predicates as well as stack blocks.

Common Suggestions

Document.png Please expand this article or section. You can help by adding more information if you are an editor. More information might be found in a section of the talk page. (April 2019)

Many Scratchers would like the ability to make custom reporter and Boolean blocks.[1] Additionally, dropdown inputs as arguments have also been requested, to the extent that some people used JSON hacking to insert them into custom blocks (this does not work in Scratch 3.0.)


  1. topic:20661