How to Make a Clicker Game in Scratch (2025)

Introduction: How to Make a Clicker Game in Scratch

By Kodeclik - Coding for Kids and TeensKodeclik

About: Kodeclik is an online coding academy for kids and teens to learn real world programming. Kids are introduced to coding in a fun and exciting way and are challenged to higher levels with engaging, high quality … More About Kodeclik - Coding for Kids and Teens »

In this Instructable, we will show you how to create a personalized clicker game from very simple Scratch blocks. Clicker games are a popular video game genre. You’ve probably heard of Cookie Clicker, one of the most popular clicker games out there. It's time to make your own!

Supplies

You will need a Scratch 3.0 account. You can create one for free on the Scratch website: https://scratch.mit.edu/.

Step 1: Setup

The first thing you'll need to do is open up a new project in the Scratch editor. After you open up the project, we will add a few sprites – these will be the characters in your game – and give each one logic commands reflecting the rules of the game. You'll also want to create some user interface elements such as a score counter, events that allow players to trigger certain actions, and other interactive elements like sound effects or images.

In more detail, to make your clicker game, you need to choose two sprites, one to represent your mouse/cursor as it moves and one for the object that you are trying to click (e.g., a cake or a ball). Then we will write code for each object so that you receive points when the cursor correctly clicks on the object.

We will use a cursor sprite and a cake sprite in our clicker game.

Step 2: Choose the Cursor Sprite

Let's make a cursor that follows our mouse in the game. We will choose the above cursor sprite for our game. Feel free to use your own by downloading one off the internet and importing it into Scratch.

Step 3: Write Code for the Cursor Sprite

The code can be seen in the below image. This program is simply a forever (infinite) loop that moves the sprite (x and y coordinates) to wherever the mouse goes (i.e., the mouse’s x and y coordinates).

Essentially, the above code sets the cursor position to always be at our mouse, achieving our goal!

Step 4: Setup the Cake Sprite

We will choose a cake sprite as shown below but you can choose any sprite you like! Choose a sprite that has two costumes that you can change between when the sprite is clicked. In Scratch, costumes are basically different versions of the sprite, and each costume has something different about the looks of the sprite.

Step 5: Create a Variable Called Points

Go to the variables tab and create a new variable for all sprites named “Points”. This variable will hold the score as points are awarded for successful clicking.

Step 6: Trigger an Event When the Cake Is Clicked

Now let's make an event that triggers when the cake is clicked by our cursor sprite. The code is as shown below. Whenever the cursor sprite is touching the cake we increase our Points variable by 1 and broadcast a message called “CLICKED!”

Basically if we click our mouse on the cursor (because our mouse is always on top of the cursor) and our cursor is touching our cake, then our Points (which is a variable) goes up by one and we broadcast the message “CLICKED!” which we will come back to later.

Step 7: Modify the Cake When It Is Clicked

Now let’s look at the cake’s code. When the cake receives the message broadcast earlier, its costume switches so it goes from a candle not lit state, to a candlelit state, and it decreases in size, to add a click effect. After a fraction of a second, the cake settings go back to normal. This gives feedback to the user that the cake has been successfully clicked.

Step 8: Write Code to Initialize the Game

Finally lets make code for the start of the game in the cake sprite. Essentially here we are restarting everything. The cake’s position, size, and costume are reverted to what we want it to be, and we set the Points to zero to restart the game. Note that we start with the cake-b costume.

Once you've coded all the necessary logic for your game, it's time to test it out! Make sure everything works as expected—if not, debug any errors until they're resolved. Once that's done, you're ready to share your clicker game with friends and family!

Step 9: You're Done!

Now you have learnt how to make your own clicker game! Making a clicker game may seem intimidating at first but once broken down into its various components it becomes quite manageable! With Scratch's intuitive interface and easy-to-understand code blocks anyone can make their own clicker game without prior coding experience. So what are you waiting for? Get started on your clicker adventure today!

How to Make a Clicker Game in Scratch (2025)

FAQs

How do you make clicks on Scratch? ›

One of the easiest ways to control the mouse click is to use the "when Stage clicked" block. This event will trigger no matter where you click on the backdrop of your Scratch game. So put your game in full screen mode, and you should be able to click away!

How do you beat the clicker game? ›

If the player wants to use stealth, clickers can be killed by either using a shiv, bow and arrow or crossbow. However, using arrows to kill a clicker requires a headshot or two chest shots, which will alert them, so unless done fast enough, the player will be detected.

What are the codes for Roblox clicker on Scratch? ›

Roblox Clicker On Scratch Codes
CodeReward
10k10k free clicks, 10k Robux per second, 10k click power!
GameXLegend1231k clicks, 1k Robux a second, free click power!

How do you make hello on Scratch? ›

Code Your Bear to Say “Hello” with A Speech Bubble

Every script of code that you create for your sprite to follow must begin with an Events block! Next, go to the Looks category in the Blocks Palette. This category has blocks that will change how your sprite looks. Select the “Say Hello for 2 Seconds” block.

When sprite is clicked Scratch? ›

This block indicates that the project will begin when the sprite(s) on the stage is clicked. In other words, the sprite will only act out what it has been programmed to do when it is clicked. Consider the purpose of the assignment. Write down any relevant information that will enhance the Scratch project.

What kills clickers? ›

The most efficient way to deal with Clickers in The Last of Us is to perform a stealth takedown. To do this, players simply need to crouch and sneak up behind one, then grab and shiv them when prompted. Clickers will alert nearby infected when they spot players, so taking them down quietly is the best approach.

Can I choke a clicker? ›

Clickers and bloaters cannot be strangled because of their strength. The strangling pop-ups do not appear on Hard, Survivor and Grounded Difficulty, meaning that players have to know what the buttons are.

What is a clicker zombie? ›

Clickers are people who have been infected for at least one year. The long time elapse has allowed the fungus to spread all over their bodies, blinding them and forcing them to use echolocation to find prey. However, the fungus has granted them enhanced strength, making them fearsome foes in close-quarters combat.

How to code a clicker game on Scratch? ›

Clicker Game on Scratch
  1. Step 1: Create the Project. ...
  2. Step 2: Choose Your Sprite. ...
  3. Step 3: Make the Sprite Move and Set a Score. ...
  4. Step 4: Change What the Sprite Does When Clicked. ...
  5. Step 5: OPTIONAL: Choose a Sound. ...
  6. Step 6: OPTIONAL: Choose a Backdrop. ...
  7. Step 7: You're Done.

How to create a game in Scratch? ›

From Scratch!
  1. Step 1 – Write out the steps for your Scratch game. ...
  2. Step 2 – Make a design for your Scratch game. ...
  3. Step 3 – Add sprites or characters. ...
  4. Step 4 – Add code to each sprite with blocks. ...
  5. Step 5 – Add logic using code blocks. ...
  6. Step 6 – Test your Scratch game and play with friends!

How do you make a game on Scratch code? ›

From Scratch!
  1. Step 1 – Write out the steps for your Scratch game. ...
  2. Step 2 – Make a design for your Scratch game. ...
  3. Step 3 – Add sprites or characters. ...
  4. Step 4 – Add code to each sprite with blocks. ...
  5. Step 5 – Add logic using code blocks. ...
  6. Step 6 – Test your Scratch game and play with friends!

What is clicker codes? ›

Race Clicker codes are free rewards, mostly free wins, that are given out by the devs at 48h games to celebrate new like milestones and updates.

References

Top Articles
Latest Posts
Recommended Articles
Article information

Author: Catherine Tremblay

Last Updated:

Views: 5639

Rating: 4.7 / 5 (47 voted)

Reviews: 94% of readers found this page helpful

Author information

Name: Catherine Tremblay

Birthday: 1999-09-23

Address: Suite 461 73643 Sherril Loaf, Dickinsonland, AZ 47941-2379

Phone: +2678139151039

Job: International Administration Supervisor

Hobby: Dowsing, Snowboarding, Rowing, Beekeeping, Calligraphy, Shooting, Air sports

Introduction: My name is Catherine Tremblay, I am a precious, perfect, tasty, enthusiastic, inexpensive, vast, kind person who loves writing and wants to share my knowledge and understanding with you.