Cookie Clicker hack

Just a cookie clicker hack.

Verze ze dne 14. 11. 2019. Zobrazit nejnovější verzi.

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 hack
// @namespace    https://greasyfork.org/ru/scripts/392425-cookie-clicker-hack
// @version      v.1.0
// @description  Just a cookie clicker hack.
// @author       hasha2982
// @match        *://orteil.dashnet.org/cookieclicker/*
// @match        *://orteil.dashnet.org/cookieclicker/
// @grant        none
// ==/UserScript==

// NOTE: Don't works in IE!

console.log('[== Starting hack... ==]');

var ans = '';
var confirm = false;


document.onkeydown = function(e){
    e = e || window.event;
    var key = e.which || e.keyCode;
    if(key===72){
        hackMenu();
    }
}; // thx StackOverflow

function hackMenu() {
     // if (event.code = 'KeyH') {
        ans = prompt('Welcome to hasha2982\'s Cookie Clicker hack v.0.1.1indv!\nPlease select an option below:\n1) Earn free cookies\n2) Spawn a golden cookie');
        if (ans == '1') {
            ans = prompt('How many cookies do you want to earn?');
            if (ans === "" || ans === null) {
                alert('Cancelled.');
            } else {
                Game.cookies += Number(ans);
                Game.cookiesEarned += Number(ans);
            }
        } else if (ans == '2') {
            ans = prompt('How many golden cookies do you want to spawn?');
            if (ans === "" || ans === null) {
                alert('Cancelled.');
            } else if (Number(ans) > 25) {
                confirm = confirm('That\'s a little bit too much\nAlso, it can lag very much!\nAre you sure that you want to spawn ' + ans + ' cookies?');
                if (confirm === true) {
                    for (var forCookies = 0; forCookies < Number(ans); forCookies) {
                        var newShimmer=new Game.shimmer("golden");
                    }
                } else {
                    alert('Cancelled.');
                }
            }
        }
        else {
            alert('Function not found.');
        }
    // }
}

console.log('[== Hack is started. ==]\nVersion: 0.1.1indv');