// ==UserScript== // @name Cookie Clicker Cheat // @namespace http://tampermonkey.net/ // @version 0.2 // @description A cookie clicker cheat that doesn't give you the cheater achievement! // @author vxi // @license GPLv3 // @match https://orteil.dashnet.org/cookieclicker/ // @icon https://www.google.com/s2/favicons?domain=dashnet.org // @grant none // @downloadURL none // ==/UserScript== /* Hi, since you're looking at the source code of this: If you know a lot about the game and wanna help me make this better then contact me on Discord (vxi#1337) */ var unsafeWindow = window.wrappedJSObject; let Game = unsafeWindow["Game"] /* disabling this for now, really just a useless visual thing window.onload=function() { if (!Game.ready) { if (top!=self) Game.ErrorFrame(); else { console.log('[=== '+choose([ 'Cheat achievement bypassed!', 'Lol, I just had to overwrite these too', ])+' ===]'); Game.Load(); } } }; */ let injectionCheck = setInterval(() => { if (Object.keys(Game).length > 200) { InjectMods() clearInterval(injectionCheck) } }, 1500); function mlog(text, sv) { if(!sv) { let css = "border: 2px solid green;background-color:green;padding: 0px 3px;border-radius: 6px;"; console.log("%cvcm", css, text); } else { let css = "border: 2px solid darkred;background-color:darkred;padding: 0px 3px;border-radius: 6px;"; console.log("%cvcm", css, text); } } function Protection () { Game.Win= function(what) { if (what == "Cheated cookies taste awful") return; if (typeof what==='string') { if (Game.Achievements[what]) { if (Game.Achievements[what].won==0) { var name=Game.Achievements[what].shortName?Game.Achievements[what].shortName:Game.Achievements[what].name; Game.Achievements[what].won=1; if (Game.prefs.popups) Game.Popup('Achievement unlocked :
'+name); else Game.Notify('Achievement unlocked','
'+name+'
',Game.Achievements[what].icon); if (Game.CountsAsAchievementOwned(Game.Achievements[what].pool)) Game.AchievementsOwned++; Game.recalculateGains=1; } } } else {for (var i in what) {Game.Win(what[i]);}} } // end win overwrite if (Game.Achievements["Cheated cookies taste awful"].won = 1) { Game.Achievements["Cheated cookies taste awful"].won = 0 // remove previous cheat achievement if exists } let protectionInterval = setInterval(() => { if (Game.cookiesEarned < Game.cookies) { Game.cookiesEarned = Game.cookies; // make sure values add up just incase someone stops using script so they dont get cheat achievement (untested) } }, 5000) mlog(`bypass injected (1/3)`) } function InternalMods() { // COOKIE EDITING Game.mEditCookies = function (amount) { if (amount < 0) return; if (typeof amount === "number") { Game.cookiesEarned = amount; Game.cookies = amount; Game.Notify(`Cookies modified!`,"",false, true) } } Game.EditCookiesPrompt = function () { let amount = prompt("What would you like your new cookie amount to be?") if (amount == null) return; if (isNaN(Number(amount))) return; Game.mEditCookies(Number(amount)); } // COOKIE ADDING Game.mAddCookies = function (amount) { Game.cookiesEarned += amount; Game.cookies += amount; Game.Notify(`Cookies added!`,"",false, true) } Game.AddCookiesPrompt = function () { let amount = prompt("How many cookies would you like to add to your current total?") if (amount == null) return; if(isNaN(Number(amount))) return; Game.mAddCookies(Number(amount)) } // ACHIEVEMENTS Game.achieve = function (what) { if (what == "give") { Object.keys(Game.Achievements).forEach(achievement=>{ if (Game.Achievements[achievement].name == "Cheated cookies taste awful") return; Game.Achievements[achievement].won = 1; }); Game.WriteSave() Game.Notify(`All achievements unlocked!`,"",false, true) } else if (what == "take") { Object.keys(Game.Achievements).forEach(achievement=>{ if (Game.Achievements[achievement].name == "Cheated cookies taste awful") return; Game.Achievements[achievement].won = 0; }); Game.Notify(`All achievements removed!`,"",false, true) Game.WriteSave() } else { return; } } // SEASONS Game.mChangeSeason = function(season) { if (season == "christmas") { Game.baseSeason = "christmas" Game.season = "christmas" } else if (season == "valentines") { Game.baseSeason = "valentines" Game.season = "valentines" } else if (season == "fools") { Game.baseSeason = "fools" Game.season = "fools" } else if (season == "halloween") { Game.baseSeason = "halloween" Game.season = "halloween" } else if (season == "easter") { Game.baseSeason = "easter" Game.season = "easter" } else if (season == "none") { Game.baseSeason = "" Game.season = "" Game.Notify(`Season changed to normal`,"",false, true) return; } else { return; } Game.Notify(`Season changed to ${season}`,"",false, true) } // WRINKLERS Game.mWrinklers = function () { Game.LoadWrinklers(1, 10, 10, 10) // pretty sure this doesn't trigger cheat achievement } Game.mLumps = function (total) { if (Game.lumpsTotal==-1){Game.lumpsTotal=0;Game.lumps=0;} Game.lumps+=total; Game.lumpsTotal+=total; } mlog(`cheat functions injected (2/3)`) } function VisualMods() { Game.updateLog = `
Cheats
Main Options :
Change Cookies

Add Cookies

Give Achievements

Take Achievements

10 Wrinklers

100 Lumps

Seasons

Cheat Info
I made this because I was bored so here's some info:

This completely overwrites achievement functions so you can safely cheat without getting the cheater achievement.

You should be able to turn this cheat off whenever and still not have the cheater achievement (can't guarantee that if you use dev console with this)

I plan on adding almost all dev console features to the cheat and making them 100% safe to use whenever and turn off whenever eventually, but I'll need someone who knows the game to contact me and help (I don't really know much about the game)
If you would like to help, contact me on Discord: vxi#1337
` + Game.updateLog; mlog(`visuals injected (3/3)`) } function InjectMods() { Protection() InternalMods() VisualMods() mlog("Finished loading! You can find the options in the in-game Info menu") Game.Notify("vxi's cookie mod", "cheat successfully loaded, you can find the options in the Info tab", "", false, true) }