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



Step-by-step guide to Unlock the Pizzas on Scratch!
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
Step 10
Program each Key so it can be collected: in a Key sprite add "when green flag clicked show" then "forever if
Step 11
Program each Pizza to unlock: in a Pizza sprite add "when green flag clicked switch costume to [locked] show" then "forever if
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!


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!
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!


Only $6.99 after trial. No credit card required