🍎 Step 6: Feed Your Pet Game
🌟 What's New?
Let's make a game where you feed your pet to get a high score! We will use a Variable to keep track of your points.
🛠️ What to Do
- Make a Score:
- Go to the
Variablestoolbox and clickMake a Variable. Name itScore. - Set the Score to Zero:
- Grab the
set score to 0block and put it in youron startblock. - Gain Points:
- Whenever you feed your pet (like pressing Button B), let's get a point!
- Grab the
change score by 1block and put it in youron button B pressedblock. - Show Your Score:
- Grab the
show numberblock from theBasictoolbox. - Put your
Scorevariable block inside it. Put this at the end of your feed button code!
Leave a screenshot of your feeding game code here:

🏆 Challenge!
- Make it so you lose a point if you shake the pet while it's eating!
- Can you add a winning sound if your score reaches 10?