Cookie clicker hacks.

loads o fun

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey, το Greasemonkey ή το Violentmonkey για να εγκαταστήσετε αυτόν τον κώδικα.

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

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey ή το Violentmonkey για να εγκαταστήσετε αυτόν τον κώδικα.

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey ή το Userscripts για να εγκαταστήσετε αυτόν τον κώδικα.

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

Θα χρειαστεί να εγκαταστήσετε μια επέκταση διαχείρισης κώδικα χρήστη για να εγκαταστήσετε αυτόν τον κώδικα.

(Έχω ήδη έναν διαχειριστή κώδικα χρήστη, επιτρέψτε μου να τον εγκαταστήσω!)

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.

(Έχω ήδη έναν διαχειριστή στυλ χρήστη, επιτρέψτε μου να τον εγκαταστήσω!)

// ==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
})();