← Years 5–6 Creating Digital Solutions

Event block: when green flag clicked

An event block that starts the script stacked under it. It is a hat block that sits at the top, and the program begins when you click the green flag.

Understanding Event block: when green flag clicked in Years 5–6 Creating Digital Solutions

What it does: The event block is first, and the blocks stacked under it run after the green flag is clicked. It is a hat block, so it sits at the top. Its curved top shows that no block can go above it. Hat blocks are named for their shape. They go on top of a stack and start the script. It starts a program. A Looks block such as 'say' is what makes a sprite speak.

Common mistakes: The move block counts in steps, not degrees. Degrees belong to the turn block. The line should be 'move (10) steps'. This script should start when the green flag is clicked. 'when space key pressed' is a different event block, so clicking the green flag would not run the script. Line 1 should be 'when green flag clicked'.

Class: _____________________  ·  Name: _____________________  ·  Date: _________

Free printable worksheet with full answer key — or add this module to a class and your students practise it interactively.

This module's key terms are also in a printable crossword (Modules 41–50) and word search (Modules 41–74).

Take this worksheet further — free with Cloodit

Each concept is reinforced from every angle — learned, then applied, then tested.

Learning
Duo
Which block is used to start a script when you click the green flag?
when green flag clickedforever
Matches
move 10 steps say Hello! when green flag clicked
↓
The event block is at the bottom. A hat block must be at the top of the script, or the blocks above it will not start when the flag is clicked.
Applying
Meanings
Term
when green flag clicked
Meaning
An event block that starts the script stacked under it. It is a hat block that sits at the top, and the program begins when you click the green flag.
Practice
when green flag clicked
Testing
Gaps
Check Answer
Spots
2say [Ready!] for 2 seconds
3move (10) degrees

Cloodit turns curriculum-aligned coding content into journeys students work through one biome at a time.

The 'Moray Eel' badge — Lurking Debugger, one of Cloodit's 106 collectible badges
Students earn collectable badges

Over 100 of them, across seven natural biomes.

Study Buddy
Students build a real study resource

Turns their work into revision material ready for Flash Cards and Exam study.

Diamond Dash — one of Cloodit's live, competitive Sprint games
Students lock in with Sprints

Live, competitive practice for the start of the lesson or a teacher-led lesson finisher.

A Cloodit certificate of achievement, ready to personalise and print
Custom printable certificates

Honour your top performers, or encourage a student who's trying hard — ready to print in seconds.

Quick Questions

1. Which block is used to start a script when you click the green flag?
A. forever
B. when green flag clicked ✓
The 'when green flag clicked' event block starts the script stacked under it. 'forever' is a loop, not a way to start a program.
2. Where does the 'when green flag clicked' block go in a script?
A. At the bottom of the stack
B. At the top of the stack ✓
It is a hat block, so it sits at the top. Its curved top shows that no block can go above it.
3. True or false: The blocks stacked under 'when green flag clicked' run when you click the green flag.
A. True ✓
B. False
Clicking the green flag fires the event, and the script stacked beneath the hat block starts running.
4. What happens to a stack of blocks that has NO event block at the top?
A. It does not start when the green flag is clicked ✓
B. It starts by itself when the green flag is clicked
Without an event block, nothing tells the script to begin. You need a hat block like 'when green flag clicked' at the top.
5. Why is 'when green flag clicked' called a hat block?
A. It has a rounded top and sits on top of a script like a hat ✓
B. It makes the sprite wear a hat
Hat blocks are named for their shape. They go on top of a stack and start the script.

Match the Pairs

when green flag clicked → An event block that starts the script stacked under it when the green flag is clicked
hat block → A block with a rounded top that sits at the very top of a script and starts it
To start a program when the green flag is clicked, put the event block at the top of the script, with the other blocks stacked underneath → when green flag clicked say Hello! for 2 seconds move 10 steps
Two separate scripts can both start at the same time when the green flag is clicked → when green flag clicked move 10 steps when green flag clicked say Hi!
move 10 steps say Hello! when green flag clicked → The event block is at the bottom. A hat block must be at the top of the script, or the blocks above it will not start when the flag is clicked.
when green flag clicked move 10 steps (separate stack) → The move block is not joined to the hat block. A block that is not stacked under the event block will not run when the green flag is clicked.

Key Term

when green flag clicked
An event block that starts the script stacked under it. It is a hat block that sits at the top, and the program begins when you click the green flag.

Fill in the Blanks

1. when green flag clicked say [Hello!] for (2) seconds
Hint: Type the event block that starts the script when the green flag is clicked.
2. when green flag clicked say [Let's start!] for (2) seconds
Hint: Type the two words for the thing you click to run the program.
3. when green flag clicked move (10) steps
Hint: Type the motion block that moves the sprite forward. It sits under the hat block.
4. when green flag clicked say [Go!] for (2) seconds turn (15) degrees
Hint: Type the motion block that rotates the sprite. It runs after the say block.
5. when green flag clicked think [Ready?] for (2) seconds
Hint: Type the looks block that shows a thought bubble when the program starts.

Spot the Error

Question 1
A when green flag clicked
B say [Ready!] for 2 seconds
C move (10) degrees
D turn right (15) degrees
Line C — The move block counts in steps, not degrees. Degrees belong to the turn block. The line should be 'move (10) steps'.
Question 2
A when space key pressed
B set [score v] to (0)
C say [Go!] for 2 seconds
Line A — This script should start when the green flag is clicked. 'when space key pressed' is a different event block, so clicking the green flag would not run the script. Line 1 should be 'when green flag clicked'.
Question 3
A when green flag clicked
B go to x: 0 y: 0
C say [Hi!] for 2 seconds
D when green flag clicked
Line D — A hat block such as 'when green flag clicked' must sit at the top of a script. It cannot go at the bottom. This line should be 'turn right (15) degrees'.
Question 4
A when green flag clicked
B say [Hello!] for 2 seconds
C move (10) steps
D say [Bye!] for seconds
Line D — The 'say for' block needs a number of seconds. The number is missing. It should be 'say [Bye!] for 2 seconds'.
Question 5
A when green flag clicked
B set [score v] to (0)
C change [score v] to (1)
D say (score) for 2 seconds
Line C — The 'change' block uses 'by' to add to a variable. 'to' belongs to the 'set' block. It should be 'change [score v] by (1)'.

Student with a class code? Join your class →