CookieClicker Cheating
CookieClicker Cheating
Cheating
For the sake of organization, all scripts will follow this format:
Example:
*game.unlock(<neuromancy>) = wrong
*Game.Unlock("Neuromancy") = right
Contents
3. Save Editing
5. Debug Cheats
6. Defining shortcuts
7. Cookies Related
8. Buildings Related
9. Golden/Wrath Cookies Related
17. Utilities
Chrome
Microsoft Windows: Either press CTRL + SHIFT + J or press F12 to open the Developer
Tools
Firefox
Microsoft Windows Alternate: Press CTRL + SHIFT + K to open the console. Make sure
Console is selected at the top left, and that JS is selected below it. At the bottom of the
console, you will see >>, indicating that this is where you enter your code. Enter what you
need, and hit 'enter' to run it. The results should be displayed. Note that a return of
'undefined' does not mean that it failed to execute, just that there was nothing to display back
to the user.
Internet Explorer 9+
Microsoft Windows: Press F12 to open the developer tools. Click the "Console" tab.
Opera GX: Press Ctrl + Shift + C to open the developer tools (Another way to do this is
by pressing right click and going down the menu to inspect element)
Microsoft Windows: Press CTRL + SHIFT + I to open Dragonfly. Click on the "Console"
tab.
Safari
Mac OS: Press ⌘ + OPTION + C to open the Error Console. (Make sure you check the
"Show Develop menu in menu bar" box in the "Advanced" tab of the "Preferences"
menu first.)
Universal
Type "javascript:[your code here]" on the address bar, then press Enter.
Bookmark
Code Expand
Developer Console
TamperMonkey/GreaseMonkey
Open your Monkey.
Add a new UserScript.
Copy/paste the following code into your Monkey editor. (The link to the source code
can be found on the wiki page of the corresponding interface.)
Code Expand
Save.
Go to your newly created UserScript.
Open the parameters tab.
Add a new user include.
Copy/paste the game URL. (http://orteil.dashnet.org/cookieclicker/)
Reboot your browser.
Now, whenever you open Cookie Clicker, the cheat interface will automatically be
enabled.
Save Editing
The most simple cheat you can do is import a save. You can make your own save codes by
editing an exported save file. If you wish to do that, here are the instructions:
Save Format
The decoded save follows a certain format, take this save for example:
Code Expand
The vertical bars divide the save into sections. Following are the formats of each individual
section.
Version number
Reserved for future use
Unix timestamps
Code Expand
Code Expand
Cookie stats
Code Expand
Buildings
Code Expand
Upgrades
Code Expand
Achievements
Code Expand
Upon finishing the save editing, the following tools may be helpful in returning the save to
its original format:
Setting Cookies in bank to be greater than Cookies baked all time. (The amount may
need to be adjusted depending on the CpS.)
You can also remove the achievement by typing this line in the console:
Debug Cheats
These are cheats built into the game itself to aid in debugging and testing the game.
Debug Upgrades
As of V2, debug upgrades no longer appear in the store. However, they can still be gotten
with the unlock and buy cheat.
Debug upgrades come in the form of upgrades that can only be enabled by using cheats. To
enable them, refer to upgrades section below. There are currently 10 debug upgrades
available:
Game.RuinTheFun();
Sesame Menu
As of V2, the game contains a debugging menu with a multitude of useful features, such as
spawning Golden Cookies with various effects. To unlock it, you can put
saysopensesame at the end of your bakery name. Alternatively, you can use the
following code:
Game.OpenSesame();
Defining shortcuts
If you find yourself constantly typing or copypasting cheats or commands, you may want to
consider defining a function. So instead of typing 3 lines of code, you could also type a
single word to use the exact same cheat. A function is defined as follows:
function <name>()
</code>
alert(<variable>)
</code>
Game.recalculateGains = 1;
</code>
alert(text);
alert(text2);
}</code>
Cookies Related
Gaining Cookies
Game.cookies = <amount>;
Game.Earn(<amount adding>);
Removing Cookies
Infinity Cookies
To make it look like you have infinity amount of cookies but you won't really, use:
Game.cookies = NaN;
Game.cookies = Infinity;
Beware: The number of cookies displayed above the big cookie will not change from infinity
if you reset the game and/or change the number of cookies in your bank. To fix this, reset the
displayed number using:
Game.cookies = 0;
Also, you can clear your cookies forever without gaining more using:
Game.cookies = -Infinity;
Code Expand
Changing CpS
To change the CpS (will self-correct when new buildings/upgrades are bought), use:
Game.cookiesPs = <CpS>;
Code Expand
clearInterval(autoClicker);
Faster Auto-Click
The auto-click cheat above can only click as fast as the CPU can handle. To produce an even
faster effect, use:
Code Expand
Code Expand
AutoClick
Holding the assigned key (~) repeatedly clicks the object under the mouse:
Code Expand
Buildings Related
Prices Stay at Base Price
If you want all the prices to stay at base price despite amount owned, use:
Code Expand
Code Expand
Game.Objects['Temple'].minigame.swaps = 3;
Game.Objects['Farm'].minigame.onRuinTheFun;
Change Profits
Game.Objects['Bank'].minigame.profit = <amount>;
Game.ObjectsById[<index>].level = <amount>;
Game.recalculateGains=1;
Sacrifice Towers
Code Expand
Build N Buildings
Game.buyBulk=N;
If you want to spawn a golden cookie that starts a cookie chain, add the following script in
addition to the ones provided above:
Game.shimmer.chain = <stage>;
If you want to start the cookie chain at 6 cookies, use "1" as the stage. 66 cookies = "2", 666
cookies = "3", and so on.
If you want the golden cookies to spawn one after another without delay, use:
Code Expand
Get Golden Cookie Effects without a cookie
var
effectDurMod=1; Game.gainBuff('<effect>',Math.ceil(<seconds
it lasts>*effectDurMod),<multiplier amount>);
If you just want to set the amount of golden cookies clicked, use:
Game.goldenClicks = <amount>;
If you want to earn the related achievements, use one of the auto-click's below.
If you want the golden cookies to be auto-clicked as soon as they appear, use:
Code Expand
Alternatively, if you only want to click golden cookies, and not wrath cookies as they appear,
use:
Code Expand
If you want to automatically spawn and click a set amount of golden cookies instantaneously,
use:
Code Expand
To spawn an amount as well as increment the cookies clicked stat and reset the spawn timer,
use:
Code Expand
If you want to automatically click all spawned cookies then spawn a cookie at set interval,
use:
Code Expand
Frenzy
Clicking Frenzy
Code Expand
Grandmapocalypse Related
Change Elder Pledge Time Left
If you want to change the time remained on the Elder Pledge, use:
Code Expand
Auto-Click Wrinklers
If you want the wrinklers to be auto-clicked as a set interval (note, it must run three times to
kill them):
Code Expand
Code Expand
If you want to instantly spawn all twelve wrinklers so you can get the bonus after letting
them feed a while:
Or, if you want to instantly spawn all twelve wrinklers and make them shiny:
Spam-Kill Wrinklers
Code Expand
clearInterval(noWrinkler);
Bingo Center
setInterval(function(){Game.researchT=0;}, 0);
Achievements Related
There are two ways to refer to an achievement: its ID and its name. You must type the name
EXACTLY as it appears in game for these scripts to work, including capitalization. If you are
concerned about typing the name wrong, copy it from the table at the bottom of this page, or
just use the ID.
Unlocking an Achievement
Game.Win(<name>);
or
Game.Win(Game.AchievementsById[<ID>].name);
If you only want to unlock non-shadow achievements, remove the double slash (//);
Removing an Achievement
Game.Achievements[<name>].won = 0;
or
Game.AchievementsById[<ID>].won = 0;
Code Expand
If you only want to remove shadow achievements, remove the double slash (//);
Milk Progress
To Change your milk progress, use:
Game.milkProgress=<progress amount>;
Upgrades Related
Similar to achievements, upgrades can also be referred by either ID or name. A list of them
can also be found at the bottom of this page.
Unlocking/Buying an Upgrade
Game.Unlock(Game.UpgradesById[<ID>].name);
or
Game.Unlock(<name>);
or
Game.Upgrades[<name>].earn()
Code Expand
Code Expand
Code Expand
Adding cursors:
Removing an Upgrade
Game.Upgrades[<name>].bought = 0;
or
Game.UpgradesById[<ID>].bought = 0;
Free Upgrades
Code Expand
Instant Research
Code Expand
Code Expand
This will make it so that when you refresh the page, the amount of heavenly chips returns
back to normal. If you want it to be permanent, use:
Code Expand
Use this code to pull up a menu where you have the option to set your Heavenly Chips.
(Note, the game says the menu can be only be used once. Disregard it. This code can be used
as many times as you want to.)
Game.FreeHeavenlyChips();
If you want to obtain the maximum amount of heavenly chips possible permanently, use:
Code Expand
Code Expand
Note: Changing the prestige level will not affect your amount of heavenly chips. If you want
your heavenly chips amount to be correct, enter the following into the console.
Game.heavenlyChips = Game.prestige - Game.heavenlyChipsSpent
Dungeons Related
Change Dungeon Level
Game.Objects.Factory.dungeon.level = <level>;
The level affects amount of cookies rewarded and spawning of monsters. The new level goes
into effect after the boss is defeated.
If you want to change the speed at which the hero goes through the dungeon, use:
Code Expand
Game.lumps = <amount>
If you want to change a sugar lump to a bifuricated, golden, meaty, or caramelized lump, use:
Note that you will have to replace <value> with either 0 for normal, 1 for bifuricated, 2 for
golden, 3 for meaty, or 4 for caramelized.
Game.lumpCurrentType = <value>
Utilities
Cosmetic Tweaks
Make the Game "Party"
EPILEPSY/SEIZURE WARNING
Game.PARTY = true;
To add custom tickers use the following code in the console (F12):
Game.customTickers.push(customTickersFunction);
To add a grandma face on the big cookie (may be disturbing for some), use:
Game.addClass("elderWrath");
Game.removeClass("elderWrath");
Changing FPS
Game.fps = <FPS>;
Note: This represents how many frames of animation you see per second and does not make
the animations run more smoother. For example, setting this to 60 which is twice the default
will make the animations run twice as fast, the opposite is also true. Also, changing this can
cause current buffs duration and current golden cookie spawn time to be altered. Setting
this value to negative can "freeze" Cookie Clicker, making the tab unable to close and
requiring a device restart to fix.
To find out how many cookies you'll have baked all-time at a given time, use:
alert(Beautify(
Game.cookiesEarned + (new Date("<YYYY-MM-DD
HH:MM:SS>") - new Date().getTime()) / 1000 *
Game.cookiesPs, 1));
To find out how many heavenly chips you can get by resetting at a given time, use:
alert(Beautify(Math.floor((Math.pow(1 + 8 *
(Game.cookiesEarned + Game.cookiesReset + (new Date("<YYYY-
MM-DD HH:MM:SS>") - new Date().getTime()) / 1000 *
Game.cookiesPs) / 10e12, 0.5) - 1) / 2)));
Note that this assumes that you do not click the big cookie, buy new upgrades/buildings, or
click golden cookies in this time period.
To make it so that the title of the webpage changes to an exclamation point whenever a
golden/red cookie appears, use:
Code Expand
To make it so that a desktop notification pops up whenever a golden/red cookie appears, use:
Code Expand
To make it so that a beeping sound is played whenever a golden/red cookie spawns, use:
Code Expand
Auto-Buying Scripts
For instructions on using these scripts refer to above.
Build Script X
Build Script X is a placeholder name to differentiate it from the other scripts. The creator(s)
should change it accordingly, but who wants to sit in that debate? Build Script X is a great
placeholder name anyway. Fancy.
The script automatically buys the most effective item only in terms of cookies per second and
price. It also tells you how long it'll take until it buys, based on your CPS. (Doesn't buy
upgrades nor take manual clicks, especially golden cookie clicks, into consideration)
Certain upgrades are not taken into consideration in the calculations, although this may
now be fixed.
The script also allows for toggling the automatic buy function by pressing the A key.
The script uses a proven formula (which includes your CPS rate) to calculate the order
of buildings to be bought.
Build Script Y
This script is an improvement of Build Script X, it buys the most effective buildings or
upgrades automatically and tells you details about it in the news bar. This script calculates
the effectiveness of each building and each upgrades using the same formula as Build Script
X. This script voluntarily ignores the Bingo Center because otherwise it would spam the
screen with "research has begun" and bring you to the grandmapocalypse.
Executing this code may cause lag on some machines, when the cookie count is high.
This script is an "improvement" of Build Script Y, after a quick passage to Y* and Y**. It
performs exactly the same operation as the Build Script Y, except that it lags even less.
Build Script Y* removed the recurrent call to the calculation of the best item to buy from the
Y script in order to remove the lag caused by the constant calculation.
Note: If the script is activated at the start of a brand new game, you will immediately get the
first 7 of the CpS achievements. Removing the achievements using the method shown here
technically does work but you will get them again almost instantly. Also, if it's activated after
buying the Bingo Center or when One mind is available to be bought, it will spam "research
has begun" and start the grandmapocalypse. This applies to both Y and Y***.
This script present the same build mechanism as Build Script Y, but it adds the possibility to
keep 20 or 140 minutes (depending if you have the last golden cookie upgrade or not) worth
of production, enabling the 'Lucky' effect to give you tons of cookies. Option is activated by
default and can be removed by pressing 'G'.
Note that after buying an item, it won't have a full 140 minutes stock because of the
production of the new building. But it is the optimized way.
There are currently 1 known problems : - On small screen the text indicating the new feature
status is hidden
Reindeer Related
To auto click reindeer, use the following:
setInterval( function() {
Game.shimmers.forEach(function(shimmer) { if (shimmer.type
== 'reindeer') { shimmer.pop() } }) }, 500);
To spawn a reindeer based on timer (will count towards stats & make a sound) use the
following:
Game.shimmerTypes.reindeer.time =
Game.shimmerTypes.reindeer.maxTime
or
To spawn a reindeer (the essence of redoubled luck way, won't count towards stats) use the
following:
new Game.shimmer('reindeer');
Game.Ascend(1); // Ascend
Game.cookies/=1000;Game.cookiesEarned/=1000; // /1k
Upgrades overview
Upgrades
Research: Grandmapocalypse • Wrath Cookies • Wrinklers • Shiny
wrinklers
Minigames overview
Minigames
Garden • Stock Market • Pantheon • Grimoire
Further Gameplay
reading This box: view • talk • edit
Categories