Your Web News in One Place

Help Webnuz

Referal links:

Sign up for GreenGeeks web hosting
February 2, 2021 05:58 pm GMT

How I Hacked Cookie Clicker Game with Inspect Element

How I Hacked Cookie Clicker Game with Inspect Element

Cookie Clicker is a very popular browser-based game. It revolves around producing cookies for the world. This game gets more interesting over time which keeps the player engaged.

Basically, there are a few ways to get cookies. These cookies can then be used to create new buildings or purchase upgrades. At first, Im going to mention a few genuine ways to earn cookies.

  • By clicking the big Cookie shown on the user interface.
  • By creating new buildings. There are different types of buildings and each type can only produce a specified number of cookies per second. Initially, all buildings are locked, but they will get unlocked over time as the game progresses.
  • By enhancing the efficiency of your cookie store through upgrades.

Now, here comes the actual hacking stuff youre waiting for.

Getting Started

As I mentioned earlier, this is a browser-based game. Meaning that it is developed using HTML5, CSS3, and JavaScript. All of these are client-side languages that can be modified through programs like Chrome DevTools.

Lets open this game in Google Chrome.

Now to open Chrome DevTools, right-click anywhere on the game and select Inspect from the context menu. For now, we will only be focusing on its functionality that is written in JavaScript. So, open the Console tab.

Another way is to press Ctrl+Shift+J on Windows or +Option+J on Mac.

Youve to execute the below-mentioned codes here.

Its time to hack different features of this Cookie Clicker game.

Hack Cookies

As everything in this game depends on cookies, so I hacked them!

Basically, after analyzing its source code, I found that the functionality of this game is written inside a file called main.js.

This file initializes an object Game through which we can easily access different features of Cookie Clicker. For example, we can modify the number of cookies we have using the Game.cookies property.

Lets do that now!

Simply copy the below code and paste it inside the Console tab of Chrome DevTools. Press Enter to execute it.

Game.cookies = 57000
Enter fullscreen mode Exit fullscreen mode

Once executed, you will get 57000 cookies absolutely FREE. You can add any number here.

For example, the below code will give you Infinity Cookies.

Game.cookies = 999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999
Enter fullscreen mode Exit fullscreen mode

Keep Getting Cookies

This game also has the functionality of earning cookies per second. Game.cookiesPs property will give us a specified number of cookies for one second.

So, why not wrap it inside a setInterval of one second to continuously get more and more cookies?

Heres the code snippet to do so.

setInterval(function(){    Game.cookiesPs = 50}, 1000);
Enter fullscreen mode Exit fullscreen mode

This code will add 50 cookies to your account every second.

Unlock All Upgrades and Purchase Them

Finally, the developers of Cookie Clicker have also provided a cheat to get all upgrades for free.

Basically, the below method will give you all upgrades as well as unlocks all types of buildings. Additionally, you will get 1.000 nonillion cookies.

Game.RuinTheFun();
Enter fullscreen mode Exit fullscreen mode

Now you might be wondering can we hack other browser-based games too?

And the answer is "Yes, definitely!"

You can hack any game no matter whether it is browser-based, Android, or even PC.

I would like to mention that I learned game hacking from guidedhacking.com. It is the best community forum that helps us understand all the concepts of game hacking in a step-by-step manner.

Spend some time there!

You'll find game hacking tutorials and guides right from their main menu. If you find something difficult then you can always ask questions from fellow hackers.

At last, I would say that game hacking is not very difficult. It just depends on how much time you can dedicate to learn it.


Original Link: https://dev.to/trulyfurqan/how-i-hacked-cookie-clicker-game-with-inspect-element-cd8

Share this article:    Share on Facebook
View Full Article

Dev To

An online community for sharing and discovering great ideas, having debates, and making friends

More About this Source Visit Dev To