637275

Cookie clicker mods tampermonkey script

Jul 22nd, 2019
522
0
Never
1
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // ==UserScript==
  2. // @name Cookie Clicker Add-Ons
  3. // @namespace Cookie
  4. // @include https://orteil.dashnet.org/cookieclicker/
  5. // @version 0.0.1
  6. // @grant none
  7. // ==/UserScript==
  8.  
  9. (function() {
  10.     const mods = [
  11.         'https://aktanusa.github.io/CookieMonster/CookieMonster.js',
  12.         'https://bitbucket.org/Acharvak/cookie-clicker-agronomicon/downloads/Agronomicon.js',
  13.     ]
  14.  
  15.     function tryLoadMods(delay_ms) {
  16.         if(typeof window.Game !== undefined && window.Game.ready) {
  17.             console.log('Loading mods!')
  18.             mods.forEach(window.Game.LoadMod)
  19.         } else {
  20.             console.log('Game not ready, trying again in ' + delay_ms/1000 + ' seconds...')
  21.             // exponential backoff
  22.             setTimeout(() => tryLoadMods(delay_ms * 2), delay_ms)
  23.         }
  24.     }
  25.  
  26.     setTimeout(() => tryLoadMods(200), 1000)
  27. })()
Advertisement
Comments
  • User was banned
Add Comment
Please, Sign In to add comment