Cookie clicker hacks.

loads o fun

K instalaci tototo skriptu si budete muset nainstalovat rozšíření jako Tampermonkey, Greasemonkey nebo Violentmonkey.

You will need to install an extension such as Tampermonkey to install this script.

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Violentmonkey.

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Userscripts.

You will need to install an extension such as Tampermonkey to install this script.

K instalaci tohoto skriptu si budete muset nainstalovat manažer uživatelských skriptů.

(Už mám manažer uživatelských skriptů, nechte mě ho nainstalovat!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(Už mám manažer uživatelských stylů, nechte mě ho nainstalovat!)

// ==UserScript==
// @name         Cookie clicker hacks.
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  loads o fun
// @author       You
// @match        https://orteil.dashnet.org/*
// @license MIT
// @grant        none
// ==/UserScript==

(function() {
    let y = 0;

    function SpawnGC() {
        if (y >= 10) { // spawn golden cookie every 10 ticks
            if (Game.goldenCookie) Game.goldenCookie.spawn();
            y = 0;
        }
    }

    function Crazy() {
        SpawnGC();
        const z = Math.floor(Math.random() * Game.ObjectsById.length);
        Game.Earn(Game.ObjectsById[z].price);
        Game.ObjectsById[z].buy();
        console.log("Bought object ID:", z);
    }

    // Save game every 1 second
    setInterval(() => { Game.WriteSave(); }, 1000);

    // Ask user for mode
    const mode = prompt("What mode?\nSpeed=1\nNormal=2\nHardcore=3\nCrazy=4");

    // Main loop every 100ms for fast automation
    setInterval(() => {
        y++;

        if (mode == "1") Game.priceIncrease = 1;
        else if (mode == "2") Game.priceIncrease = 1.15;
        else if (mode == "3") Game.priceIncrease = 1.45;

        if (mode == "4") Crazy();
    }, 10); // 100ms is much faster than 9999999ms
})();