Skip to main content

Stage 10: Final Score Screen

Course progressStage 10 of 10
~90 min
Your workspace

Keep your Scratch project tab open all week. Open in a new tab so you don’t leave the course.

Build

a Message sprite with win and lose screens plus a fish-name cascade

Learn

how a chain of if/then turns a number into a story

Ship

a finished arcade game, complete from green flag to final score

Teacher demo

Show the room — this is the final stage of the course. Walk slow:

  1. Paint a new sprite called Message. Costume 1 = "Oh no, you've become fish food!" (lose screen). Costume 2 = "Congratulations!" (win screen).
  2. Paint another new sprite called Timer with a simple "Time" label costume.
  3. Create a sizeCategory variable (For all sprites), set initial value to "Anchovy".
  4. Build the Message sprite's scripts:
    • when green flag clicked: initialize variables, hide.
    • when I receive playerEaten: switch to lose costume.
    • when I receive playerWon: switch to win costume.
    • when I receive gameover: the big sizeCategory cascade — Anchovy → Mackerel → Salmon → Swordfish → Tiger Shark → Blue Whale based on score. Then show + position + show variables.
  5. Click the green flag. Play through. Win or lose triggers the right screen.

This is the moment the whole game ends the way a real game ends.

The big idea

For nine stages we've been BUILDING. Today we finish. Stage 10 is the final score screen — the moment the game tells the player how they did.

The key design move today is turning a number into a story. The player's score is just a number — 47 or 213 or 812. By itself, that doesn't mean much. But what if we categorize the score?

score 0–50 → "Anchovy" (a tiny fish)
score 50–150 → "Mackerel"
score 150–300 → "Salmon"
score 300–500 → "Swordfish"
score 500–750 → "Tiger Shark"
score 750+ → "Blue Whale" (the biggest creature in the ocean!)

Now the player's number has a name. "I got Tiger Shark!" is a story — way better than "I got 547." Game designers use this trick everywhere — letter grades, star ratings, named tiers (Bronze, Silver, Gold). Naming the outcome makes it memorable.

The cascade is built with a series of if/then blocks — not if/else. Each one is independent. We start with sizeCategory = Anchovy and then upgrade it as the score passes each threshold:

set sizeCategory to Anchovy
if score > 50 then set sizeCategory to Mackerel
if score > 150 then set sizeCategory to Salmon
if score > 300 then set sizeCategory to Swordfish
if score > 500 then set sizeCategory to Tiger Shark
if score > 750 then set sizeCategory to Blue Whale

Score of 200 passes the first two checks (Mackerel, Salmon) but not the rest — final value is Salmon. Score of 600 passes the first four (Mackerel through Tiger Shark) — final value is Tiger Shark. The last passing check wins.

We also build a Message sprite with two costumes — one for the lose screen, one for the win screen. The same sprite tells two different stories. (Same pattern as the Player Fish's Fish-a / Party-Hat-a costumes in Stage 1.)

This is the final stage. The game ends here. You finish the course.

New words
cascading if/then
a chain of independent if-blocks that progressively narrow down a result
sizeCategory
our variable that holds the player's fish name (Anchovy through Blue Whale)
Paint a Sprite
create a sprite from scratch using Scratch's drawing tools
go to front layer
a Looks block that puts the sprite in front of everything else
show variable
a Variables block that makes a variable visible on the stage
Before you start

Stages 1–9 should be done. Your game has the Player Fish, the Enemy Fish swarm, eating mechanics, win/lose handlers, an underwater backdrop, music, and a timer.

Build it

Step 1 — Paint the Message sprite

In the sprite pane, hover over the cat-face button at the bottom-right. A menu pops up. Click the paint icon (a paintbrush) to create a sprite from scratch.

A blank painting canvas appears. At the top, name the sprite:

Message
sprite

Message

This sprite is the end-of-game popup. It stays hidden during gameplay and uses two costumes: one for losing and one for winning.

Step 2 — Make the lose screen (costume 1)

We'll make TWO costumes for the Message sprite — one for losing, one for winning. Start with the lose screen.

In the Costumes tab, you should be on a blank costume. Use the Text tool (the T icon) to type:

Oh no, you've become fish food!

Use a fun color. Below the text, use the Rectangle tool to draw a yellow box. This box is where the player's stats (fishEaten, sizeCategory, score) will appear.

The exact layout is up to you. Think about how parents will read it on Friday — keep it clean and clear.

Step 3 — Make the win screen (costume 2)

In the costumes list (left side of the Costumes tab), right-click your costume1 → duplicate. A copy appears as costume2.

Click costume2 and update the text. Change "Oh no, you've become fish food!" to:

Congratulations!

Add a celebratory color (green works well). Keep the same yellow stats box position so the variables show up in the same place on both costumes.

Step 4 — Paint the Timer sprite

Same process — hover the sprite-add button, click paint. Name it:

Timer

Costume: use the Text tool to type:

Time

This is just a label. The actual time value comes from your Time variable on the stage. We'll position this sprite at the bottom-left in the next step.

sprite

Timer

This sprite is only the label. The changing number is the Time variable from Stage 9.

Step 5 — Position the Timer sprite

Click the Timer sprite. Click the Code tab. Add this short script:

Timer label position

when green flag clicked
go to x: (-184) y: (-165)

(-184, -165) is the bottom-left of the Scratch stage. This positions the Timer label so the Time variable readout will sit next to it.

Step 6 — Create the sizeCategory variable

Click the Message sprite. In the block palette, click VariablesMake a Variable.

  • Name: sizeCategory
  • For all sprites.
  • OK.

Drag the sizeCategory readout onto the stage. Right-click → large readout.

Step 7 — Initialize and hide on green flag

The Message sprite hides during gameplay. It only shows up at the end.

In the Message sprite's code area, build:

Message setup script

when green flag clicked
set [fishEaten v] to (0)
set [sizeCategory v] to [Anchovy]
set [score v] to (0)
hide
hide variable [fishEaten v]
hide variable [sizeCategory v]
hide variable [score v]

For set sizeCategory to (Anchovy) — type Anchovy directly into the set-block's text field.

This script hides the Message sprite and hides the three stats variables. We don't want them on stage during play; we'll show them only at the end.

Step 8 — Build the costume-switching listeners

The Message sprite needs to remember whether the player won or lost, so it can show the right screen at the end.

Add two more event handlers:

Choose the ending costume

when I receive [playerEaten v]
switch costume to [costume1 v]
when I receive [playerWon v]
switch costume to [costume2 v]

costume1 is the lose screen; costume2 is the win screen. Either way, when the game truly ends (via the gameover broadcast in Step 9), the right costume is already loaded.

Step 9 — Build the gameover cascade

This is the big one. When the gameover broadcast fires, the Message sprite computes the sizeCategory based on the player's score, then shows itself with all the stats visible.

In the Message sprite's code area, build:

Gameover stats cascade

when I receive [gameover v]
set [sizeCategory v] to [Anchovy]
if <(score) > (50)> then
set [sizeCategory v] to [Mackerel]
end
if <(score) > (150)> then
set [sizeCategory v] to [Salmon]
end
if <(score) > (300)> then
set [sizeCategory v] to [Swordfish]
end
if <(score) > (500)> then
set [sizeCategory v] to [Tiger Shark]
end
if <(score) > (750)> then
set [sizeCategory v] to [Blue Whale]
end
go to x: (0) y: (0)
go to [front v] layer
show
show variable [fishEaten v]
show variable [sizeCategory v]
show variable [score v]

A few things to notice:

  • Six set sizeCategory blocks — one default (Anchovy) and five upgrades. Each if is independent. We start at Anchovy and the cascade upgrades the value as it passes higher thresholds.
  • go to x: 0 y: 0 — center of the stage. The Message sprite appears front and center.
  • go to front layer — makes sure the Message sprite is on top of the Player, the fish swarm, and the backdrop. Otherwise it might be hidden behind something.
  • show — finally make the Message sprite visible. (It was hidden the whole game.)
  • show variable for each of fishEaten, sizeCategory, score — make the stats appear on stage so the player can read them.

Step 10 — Test the full ending

Click the green flag. Play a full round.

  • Win path: eat enough small fish to grow playerSize > 100. Party Hat appears, Eggs sound plays, fade-out happens. Then gameover fires and the Congratulations screen appears with your stats.
  • Lose path: touch a bigger fish. Bubbles + pixelate. Then gameover fires and the Oh-no screen appears with your stats.

Test a few different score levels:

  • Eat 1 small fish (score ~30) → Anchovy.
  • Eat about 4 small fish (score ~100) → Mackerel.
  • Eat 8+ small fish (score ~250) → Salmon.

The right fish name should show every time.

Save your project. You finished the course.

Understand it

The most important pattern today is the cascading if/then. It's not an if/else chain — it's a sequence of independent checks. The chain works because each check overwrites the previous value:

score = 600
- set sizeCategory to Anchovy (Anchovy)
- if 600 > 50: set to Mackerel (Mackerel)
- if 600 > 150: set to Salmon (Salmon)
- if 600 > 300: set to Swordfish (Swordfish)
- if 600 > 500: set to Tiger Shark (Tiger Shark)
- if 600 > 750: FALSE, skip
final: Tiger Shark

We could have written this as one giant if/else if/else if chain — more efficient computationally — but the cascade is easier to read and easier to tune. To add a new tier (between Salmon and Swordfish, say), you just add one more if-block. The other lines don't change.

Putting the costume switch on the when I receive playerEaten / when I receive playerWon listeners means the Message sprite is ready by the time the gameover broadcast fires. The cascade runs once at game-end, but the costume was set the moment win or lose was decided — usually a few seconds earlier.

The go to front layer is small but critical. Without it, the Message sprite would appear behind the player, the swarm, or the backdrop — invisible to the player even though it's technically there. Real games handle layering all the time; "in front of everything" is the right answer for end-of-game UI.

The size names (Anchovy through Blue Whale) tell a story. Real Pokémon games do this — your final score is a rank or title, not just a number. Designers learn early that names beat numbers for emotional engagement. The kid who finishes at "Blue Whale" remembers it forever; "score: 800" they forget.

You just finished the course. Over 10 stages you built: a Player Fish with multiple costumes and sounds; keyboard-driven movement; growth via variables and broadcasts; win and lose handlers as mirror patterns; an Enemy Fish template with cloning; a swarm with random per-clone behavior; collision detection with eat-or-be-eaten branching; a stage with a backdrop, timer, and looping music; and finally a score screen that turns a number into a story.

Every Scratch game on Earth uses some combination of these patterns. You just learned the toolkit.

Try this

Learning beat

Try this

Three short experiments. Predict before you run, then test your guess.

Predict first

What size category does a player get with a score of exactly 200? Trace through the cascade in your head. (Hint: it passes the first two thresholds.) Now play a round and try to hit around 200 to verify.

Compare

Change the cascade thresholds — make them easier (every category at half the current threshold) or harder (double the thresholds). Play a few rounds at each setting. Which feels meaningful? Tier systems should be possible to reach but not easy.

Connect

Look back at all 10 stages. Pick the one stage where the most clicked for you — where you suddenly understood how a piece of Scratch works. Was it the keyboard loop (Stage 2)? The variables (Stage 3)? The clones (Stage 6)? The collision (Stage 8)? The reason it clicked is worth knowing about yourself as a coder.

Test your finished game

  • The Message sprite has two costumes: lose screen and win screen.
  • You have a Timer sprite positioned at the bottom-left.
  • You have a sizeCategory variable that updates to a fish name at game end.
  • When you LOSE, the lose costume appears with the fish-name + score + fishEaten.
  • When you WIN, the win costume appears with the fish-name + score + fishEaten.
  • Trying different score levels gives different fish names (Anchovy → Blue Whale).
  • Your project is saved.
  • Design check. Imagine handing your laptop to a parent on Friday. Can they read the final screen and understand: did you win, what's your score, what's your fish name, how many fish did you eat? All four pieces should be obvious.

If it breaks

  • The Message sprite shows up during play. The hide block in the initialize script is missing. Add it.
  • The Message sprite never shows at game end. Two suspects. First, is the when I receive (gameover) block listening for gameover (lowercase, one word)? Second, is the show block at the end of that script?
  • The wrong costume shows (e.g., win screen for a lose). Three suspects. First, are the broadcast names correct (playerEaten lowercase one word for lose; playerWon for win)? Second, are the costume names right (costume1 vs costume2)? Third, did you accidentally swap them?
  • The sizeCategory shows "Anchovy" no matter what. The cascade after the initial set sizeCategory to Anchovy is missing or its conditions are reversed. Check that each if score > N then uses > (greater than), not < (less than).
  • The Message sprite appears behind everything. The go to (front) layer block is missing. Add it just before the show block.
  • Variables show during gameplay (not just at end). The Message's initialize script needs to hide variable for each of fishEaten, sizeCategory, score. Re-check Step 7.
Coach notes

This is the final stage. It's dense but every block does something visible — kids will be motivated.

The single most common failure: variable initialization. Kids initialize fishEaten, score, and sizeCategory in the Enemy Fish setup but not on the Message sprite. The fix: walk the room after Step 7 and confirm the Message sprite's initialize script has the right blocks.

The second most common: missing go to front layer. Without it, the Message sprite appears UNDER the Player Fish on game-end. The kid sees the win/lose screen partially obscured. Catch it in the design check.

For pacing: Steps 1–4 (painting the sprites) ~25 min. Steps 5–7 (positioning + variable + init) ~20 min. Steps 8–9 (the cascade) ~30 min. Step 10 (testing) ~15 min.

This is the natural celebration moment of the entire course. After kids test their final game end-to-end and see the score screen tell them they're a "Salmon" or a "Blue Whale," take a beat. Acknowledge what they've built:

"You just shipped a complete arcade game. From an empty Scratch project to a playable game with collision, scoring, win/lose states, music, and a finale screen. In five days."

If your camp has a parent demo, this is the moment to start prep. Have campers practice their demo: hit the green flag, narrate what's on screen, play a 30-second round, show their final score. Practice three times.

If a camper finishes by minute 70, push them into the medium stretch (add categories) — it's quick and satisfying. The hard stretch (personal best) is a meaningful add for kids who'll keep coming back to Scratch after camp.