Unlock the Pizzas on Scratch!
Green highlight

Create a Scratch game where you program characters to unlock pizza levels, learn sprites, blocks, variables, and simple animation with playful rewards.

Orange shooting star
Download Guide
Collect Badge
Background blob
Challenge Image
Skill Badge
Table of contents

Step-by-step guide to Unlock the Pizzas on Scratch!

What you need
Colouring materials for drawing sprites (optional), scratch account or scratch app

Step 1

Open Scratch and create a new project.

Step 2

Rename your project to "Unlock the Pizzas".

Step 3

Add a Player sprite by choosing one from the library or painting your own.

Step 4

Add a Pizza sprite from the Sprite library.

Step 5

Duplicate the Pizza sprite two times so you have three pizzas.

Step 6

Add a Key sprite from the library and duplicate it two times so you have three keys.

Step 7

Drag the three pizzas and three keys to different places on the stage so each pizza has a nearby key.

Step 8

Create a variable called Keys for all sprites and add the block "when green flag clicked set Keys to 0".

Step 9

Program the Player to move: in the Player sprite add "when green flag clicked" then "forever" and inside place four "if " blocks to change x by 10 for right arrow change x by -10 for left arrow change y by 10 for up arrow and change y by -10 for down arrow.

Step 10

Program each Key so it can be collected: in a Key sprite add "when green flag clicked show" then "forever if " then "change Keys by 1 play sound [pop] hide".

Step 11

Program each Pizza to unlock: in a Pizza sprite add "when green flag clicked switch costume to [locked] show" then "forever if and <(Keys) > 0> then change Keys by -1 play sound [cheer] switch costume to [unlocked] repeat 10 change y by 5 wait 0.05 change y by -5 wait 0.05".

Step 12

Test your game by clicking the green flag and play through collecting keys and unlocking pizzas and fix any blocks or positions that don't work.

Step 13

Save your project in Scratch and share your finished creation on DIY.org.

Final steps

You're almost there! Complete all the steps, bring your creation to life, post it, and conquer the challenge!

Complete & Share
Challenge badge placeholder
Challenge badge

Help!?

What can we use if we can't find a Key or Pizza sprite or the pop/cheer sounds in the Scratch library?

Choose or paint any similar library sprite (for example use a coin or cake instead of a key or pizza) and pick any available sound in the Sounds tab, then update the scripts so the Player touches the new sprite names and the Key/Pizza scripts use those sounds.

Why don't my Keys increase when I touch a key or why do I sometimes pass through a key without collecting it?

Make sure you created the Keys variable 'for all sprites' and have 'when green flag clicked set Keys to 0' plus each Key script uses 'show' before the touch check and 'hide' after changing Keys, and if the Player skips over keys reduce the movement step from 10 to 5 in the Player's arrow key blocks so collisions register.

How can I adapt this Unlock the Pizzas project for different ages?

For younger kids, simplify by using one pizza/key pair, enlarge the Pizza and Key sprites and increase Player step size to make collection easier, while older kids can keep three pizzas/keys, require more Keys per pizza by changing the '(Keys) > 0' test, or add a timer and score for challenge.

What are some easy ways to extend or personalize the game after it works?

Add a Score or Level variable, broadcast a 'next level' message to reposition pizzas/keys for new layouts, create extra unlock costumes and custom sounds for each Pizza, and let the child design custom Player, Pizza, and Key costumes before saving and sharing on DIY.org.

Watch videos on how to Unlock the Pizzas on Scratch!

0:00/0:00

Here at SafeTube, we're on a mission to create a safer and more delightful internet. 😊

Make your own PIZZA GAME in scratch 3//Full Tutorial//By Mousree//game link in the description box

3 Videos

Facts about Scratch programming for kids

🧱 Block-based coding helps beginners by preventing most syntax errors since blocks only snap where they belong!

🍕 Over 5 billion pizzas are eaten worldwide every year—perfect inspiration for a pizza-themed game!

🐱 Scratch was created at the MIT Media Lab so kids can code by snapping colorful blocks together!

🎉 Small playful rewards (like unlocking pizza levels) boost player excitement and keep learners practicing!

🧩 Sprites are like actors in your game—each sprite can have multiple costumes you switch to animate them!

How do I make the "Unlock the Pizzas" game on Scratch?

To make 'Unlock the Pizzas' in Scratch, start a new project and create sprites: a player character, pizza targets, and locks. Use arrow-key blocks to move the player and 'if touching' blocks to detect pizza or lock collisions. Create variables like Score and Level, increase them when a pizza is collected, and broadcast messages to unlock the next level. Add simple costume changes or 'next costume' and 'wait' blocks for animation, plus sound effects as playful rewards.

What materials do I need for the "Unlock the Pizzas" Scratch project?

You'll need a computer or tablet with internet access (or the Scratch desktop app), a modern browser, and a free Scratch account if you want to save and share. Also useful: a mouse or trackpad, headphones or speakers for sound, and the Scratch costume editor or basic drawing tools to design sprites and backgrounds. Optional: a printed storyboard or checklist to plan levels, and colored pencils if you sketch ideas on paper.

What ages is the "Unlock the Pizzas" activity suitable for?

This game is great for ages 7–13 as an introduction to block coding, sprites, and variables; younger children (5–6) can play with close adult help using pre-made blocks, while older kids and teens can extend mechanics with lists, clones, or custom blocks. Adjust complexity—simpler movement and fewer variables for beginners, added levels, timers, or scoring challenges for advanced learners. Supervision is recommended for account setup and online sharing.

What are the benefits and safety tips for kids building Scratch pizza games?

Building 'Unlock the Pizzas' boosts problem-solving, sequencing, and creativity; kids learn variables, event broadcasts, and simple animation while enjoying immediate rewards. Safety tips: set a Scratch account to child-safe settings, avoid sharing personal info in projects or usernames, and review comments or remixes before allowing public sharing. Variation ideas: add timed levels, multiplayer unlocks, or create pizza-themed power-ups to teach branching logic and increase replay value.
DIY Yeti Character
Join Frame
Flying Text Box

One subscription, many ways to play and learn.

Try for free

Only $6.99 after trial. No credit card required

Unlock the Pizzas on Scratch. Activities for Kids.