Simple and addictive, the classic clicker game is easy and fun for everyone in the family Our party-themed Cookie Clicker shows kids how to make a clicker game on Scratch that displays a score counter. In this game, kids bake cookies with every click and watch their cookie count increase. The goal is to bake 999 cookies. Try this easy Scratch tutorial for kids to customize your own clicker game.

📌 [Download] Printable Scratch Coding Tutorials Get 2 printable Scratch tutorials, Rocket Landing and Flying Space Cat, to code your own games step by step. Download Now

You can also learn to code from the experts in our top-rated Scratch coding classes

Cookie clicker game complete

Play and remix the Cookie Clicker game now.

Table of Contents

  • Step 2: Add a backdrop
  • Step 1: Create a new Scratch project
  • Step 3: Draw the cookie sprite
  • Step 4: Add game logic to increase the cookie count
  • Step 5: Animate the cookie click
  • Step 6: Create the ones counter
  • Step 7: Create the tens counter
  • Step 8: Create the hundreds counter
  • Step 9: Stop the counter at 999 cookies

What you need:

No coding experience is necessary for this Scratch tutorial. Beginner-friendly for kids ages 8 and up. Give it a try!

Step 1: Create a new Scratch project

Let’s start by creating a new project. 

Create a new Scratch project

A new project will open up and you will see the Scratch interface.

Rename Scratch projectRem

Hint: You can also remix shared projects by clicking the green Remix button on the project page.

Step 2: Add a backdrop to your game

Now we can code our clicker game! In the new project, we can add a background to our game.

Choose a backdrop button
Find the party backdrop

The backdrop will appear in the preview screen and sets the scene for your game.

Clicker step 2 gif

Hint: Choose any backdrop from the library or upload your own to fit your game design.

Every clicker game needs a clickable object. For this game, draw a cookie sprite using the Paint option.

Select paint icon
Draw a cookie in costumes

The cookie sprite should now be visible. However, nothing happens when we click the cookie. 

We’ll add that next, keep going! 

Draw the cookie sprite gif

Hint: Draw or select any sprite you want to fit your game design.

Every time we click on the cookie, we bake one cookie for the party. So, the number of cookies increases by one with every click. We’ll use a variable to represent the increasing number of cookies.

Rename variable
rename variable cookies
Check off cookies variable
Add game logic to cookies gif

The variable counter will now appear in the preview screen. We should start the number of cookies at 0 when the game starts.

Set cookies variable

Click the green flag to test your game. The variable “cookies” should start at 0 and increase every time you click the cookie sprite. 

Good job so far, let’s keep going!

Add game logic to cookies gif

Hint: You can add other sprites that increase the number of cookies by different amounts.

The cookie is pretty boring, let’s animate the cookie when it’s clicked by making the size of the cookie change.

Cookie animation

Try it out by clicking the Cookie sprite. Do you see the animation working? Great job!

Animate the cookie click gif

Hint: Change the animation by increasing the size or wait time.

Step 6: Create the ones counter sprite

The counter is made up of three different sprites. Let’s start with the sprite that represents the ones.

Choose a sprite
Select glow 0 sprite
Rename the sprite
position and resize sprite

Now,  we’ll add costumes for numbers 0 through 9 to the same sprite.

Add costumes for 0 to 9
Create the ones counter sprite gif

Now we can add code to connect the “ones” sprite to the cookie clicks. Start with the cookie.

broadcast count

 The sprite changes costumes each time the cookie is clicked.

switch costumes

You should see the first part of your counter on your screen. Click the cookie 9 times and watch it change! 

Create the ones counter sprite gif

But, it doesn’t go past 9, so we’ll add the rest of our counter in the next step.

Hint: You can draw or choose your own number sprite, just make sure to include costumes for numbers 0 to 9. 

Step 7: Create the tens counter sprite

We have a sprite to represent the ones, now let’s add another sprite to represent the tens.

Right click ones
Rename the sprite tens
Add if then loop with condition
Create the tens counter sprite gif

Hint: Double-check that your counter matches the tens number in the “cookies” variable. 

Step 8: Create the hundreds counter sprite

After that, create one more sprite to represent the hundreds.

Right click tens sprite
Rename hundreds sprite
Change mod block

Click the green flag to reset your game, then click on the cookie to watch the numbers increase! 

Create the hundreds counter sprite gif

Hint: Double-check that your counter matches the hundreds in the “cookies” variable. Then uncheck the “cookies” variable to hide it from the screen.

Step 9: Stop the counter at 999 cookies

The goal is to bake 999 cookies, so when we reach that number the counter should stop. 

Add if then block

Click the sprite to watch the counter in action.

Stop the counter at 999 cookies gif

Hint: Use additional if-then statements to add effects and bonuses at different cookie counts.

Cookie clicker game complete gif

With that final step, your Cookie Clicker game is complete! Play Cookie Clicker game.

If you want to let other people see your project and remix it, click the “Share” button at the top.

Add upgrades to your clicker game!

Scratch has a number of sound effects and songs you can add to your project. Let’s play a sound each time we click on the cookie. 

Click the sound tab
Choose the suction cup sound

The sound has been created, now add the code the play the sound.

start sound block

Press the green flag and click your cookie to hear the sound! 

Hint: Select any sound or even record your own to match your game’s theme.

Bonus #2 – Add a balloon animation at 999 cookies

Celebrate when the player successfully bakes 999 cookies! In this game, we show a floating balloon animation.

Every time we click, we’ll check to see if we’ve made enough cookies. Once we reach 999, we will send a message that the cookies are done and the party is on.

broadcast block

Next, add the balloon sprite that receives the message and performs an action.

choose balloon 1 sprite
Rename and resize balloons
When green flag hide

Finally, add the code that makes the balloon float.

When i receive party

Your animation should work now!

To test it, update “if 999 = cookies” on the cookie sprite to “if 2 = cookies”. Then click the cookie to view the animation play. Change it back when you’re sure it works.

Hint: You can add any effect when you reach 999 cookies, just add it inside the “if 999 = cookies” loop.

Discover More Clicker Games on Scratch

You can find a lot of clicker games in Scratch to use for ideas and inspiration. You can also remix them to see the code inside. This is a great way to expand your knowledge and the kinds of games you can build in Scratch.

These are some of the top clicker games in Scratch.

Pokemon Clicker (51834 hearts)

Click your way to getting every pokemon in this popular Scratch clicker game. Keep clicking to get points that you can use to upgrade your pokeballs, and collect popular pokemon to become the very best.

Planet Clicker (31326 Hearts)

Click on the planet to generate energy. This game features a store to buy upgrades and add energy. Through your username, it also keeps tracks of your stats like clicks and time played that you can access in the menu.

Roblox Clicker #Games #All (25716 Hearts)

This Roblox Clicker in Scratch lets you generate dummy Robux with every click. You can use in-game codes for more Robux and even customize your clicker with different skins. 

Cookie Clicker (24525 Hearts)

A simple cookie clicker with upgrade options all on one page. The game uses cloud variables for an auto-save functionality that lets you save your game and come back to keep clicking.

Money Clicker (23267 hearts)

Click your way to a fortune in the Scratch Money Clicker and get help by hiring employees, building companies and factories, and digging mines. This game has a clean design and scrolling feature for the upgrades.

Minecraft Clicker (17770 hearts)

Minecraft-themed clicker game where you click a building block to earn points. You can also buy upgrades to earn points quicker, like hiring the miner for help.

See more of the best Scratch games.

Get More Fun Scratch Tutorials

Keep coding with more fun Scratch tutorial for kids.

Download Free Printable Scratch Coding Tutorials PDF

Get the Rocketship Landing game and Flying Space Cat Scratch tutorials in a printable format.

Try a Scratch Coding Class for Kids

Once kids complete the Cookie Clicker game they can customize it endlessly. Completing this tutorial is just one way that kids can learn about coding in Scratch. 

If this tutorial inspired your child to learn more coding, try a Scratch coding class at CodeWizardshQ. Our elementary school coding program is designed to teach kids, ages 8-11, how to think like programmers while building fun, interactive projects. It starts by teaching fundamental coding concepts in Scratch and then advances to text-based languages like JavaScript and Python. Classes are live, online so they’re fun and engaging for kids while being convenient for parents. 

Learn more and join our top-rated Scratch classes for kids.