Cookie Clicker Autoclicker

A simple script for cookie clicker that will autoclick cookies for you

  1. // ==UserScript==
  2. // @name Cookie Clicker Autoclicker
  3. // @namespace http://tampermonkey.net/
  4. // @license sovietarctic777@outlook.com
  5. // @version 1.2
  6. // @description A simple script for cookie clicker that will autoclick cookies for you
  7. // @author You
  8. // @match http://sunset-nova-group.glitch.me/
  9. // @match https://orteil.dashnet.org/cookieclicker/
  10. // @match https://eli-schwartz.github.io/cookieclicker/
  11. // @match https://cookieclickercity.com/
  12. // @match https://sites.google.com/site/unblockedgames66ez/cookie-clicker
  13. // @match https://trixter9994.github.io/Cookie-Clicker-Source-Code/
  14. // @match https://www.tynker.com/community/projects/play/cookie-clicker-2/59a2f5655ae0295c7e8b4582/
  15. // @match https://watchdocumentaries.com/cookie-clicker-game/
  16. // @icon https://www.google.com/s2/favicons?sz=64&domain=google.com
  17. // @grant none
  18. // ==/UserScript==
  19.  
  20. (function() {
  21. 'use strict';
  22.  
  23. let autoClickerIntervalId;
  24.  
  25. function startAutoClicker() {
  26. autoClickerIntervalId = setInterval(() => {
  27. // click the cookie
  28. document.getElementById("bigCookie").click();
  29. }, 10); // click the cookie every 10 milliseconds
  30. }
  31.  
  32. function stopAutoClicker() {
  33. clearInterval(autoClickerIntervalId);
  34. }
  35.  
  36. document.addEventListener("keydown", (event) => {
  37. if (event.key === "s") {
  38. startAutoClicker();
  39. } else if (event.key === "Escape") {
  40. stopAutoClicker();
  41. }
  42. });
  43.  
  44. //Add an event listener for the key 1 that gives you 10000 cookies
  45. document.addEventListener("keydown", function(event) {
  46. if (event.keyCode === 49) {
  47. console.log("Giving you 10000 Cookies!");
  48. Game.Earn(10000)
  49. }
  50. });
  51. //Add an event listener for the key 2 that gives you 1,000,000 cookeis
  52. document.addEventListener("keydown", function(event) {
  53. if (event.keyCode === 50) {
  54. console.log("Giving you 1000000 Cookies!");
  55.  
  56. Game.Earn(1000000)
  57. }
  58. });
  59. //Add an event listener for the key 3 that gives you 1 Billion Cookies
  60. document.addEventListener("keydown", function(event) {
  61. if (event.keyCode === 51) {
  62. console.log("Giving you 1Billion Cookies");
  63. Game.Earn(1000000000)
  64. }
  65. });
  66. //Add an event listener for the key 4 that makes your cps 1000
  67. document.addEventListener("keydown", function(event) {
  68. if (event.keyCode === 52) {
  69. console.log("Setting your cps to 1000");
  70. Game.computedMouseCps=1000
  71. }
  72. });
  73. //Add an event listener for the key 5 that makes your cps 1 Million
  74. document.addEventListener("keydown", function(event) {
  75. if (event.keyCode === 53) { // 53 is the keyCode for the key "5"
  76. console.log("Setting your Cps to 1 Million");
  77. Game.computedMouseCps=1000000;
  78. }
  79. });
  80.  
  81. //Add an event listener for the key 6 that makes your Cps 1 Trillion
  82. document.addEventListener("keydown", function(event) {
  83. if (event.keyCode === 54) {
  84. console.log("Setting your Cps to 100 Trillion cuz its fun");
  85. var a = Game.computedMouseCps=1000000000000;
  86. a = true > Infinity
  87. }
  88. });
  89. document.addEventListener("keydown", function(event) {
  90. if (event.keyCode === 48) {
  91. console.log("Resets the game cuz you ruined it");
  92. Game.SesameReset();
  93. }
  94. });
  95.  
  96. document.addEventListener("keydown", function(event) {
  97. if (event.keyCode === 55) {
  98. console.log("Gives you all achievements");
  99. Game.SetAllAchievs(1);
  100. }
  101. });
  102.  
  103. document.addEventListener("keydown", function(event) {
  104. if (event.keyCode === 56) {
  105. console.log("Gives you all Upgrades");
  106. Game.SetAllUpgrade(1);
  107. }
  108. });
  109.  
  110. document.addEventListener("keydown", function(event) {
  111. if (event.keyCode === 57) {
  112. console.log("Ruining the games fun!");
  113. Game.RuinTheFun(1);
  114. }
  115. });
  116.  
  117. })();