A script is a collection of blocks assembled in a particular order. The order and blocks used are very important, as they choose how different actions and values interact with each other. (scripts.)
Scripts are easy to work with. Some "rules" are as follows:
- To create a script, simply drag blocks out of the palettes and assemble them.
- To assemble blocks, drag them next to each other.
- To disassemble blocks, drag them apart (from the bottom).
- To remove a script, drag it into one of the block palettes.
Every block shape is designed so that it can do one or more of the following:
- Start a script
- Add to the end of a script
- End a script
- Fit inside other blocks.
- Contain other blocks.
Because of that, blocks can be assembled to create a script like a jigsaw puzzle. This prevents a syntax error.
A script is defined within the Scratch program as one or a set of blocks that begins with a Hat Block - even a single block can qualify. However, scripts are usually referred to as sets of blocks that consist of at least two blocks.