Commodore Clicker Exploit

An exploit that will add useful features!

As of 2021-03-29. See the latest version.

  1. // ==UserScript==
  2. // @name Commodore Clicker Exploit
  3. // @namespace https://waa.ai/spinpy
  4. // @version 1.0
  5. // @description An exploit that will add useful features!
  6. // @author Spinfal
  7. // @match http://c64clicker.com/
  8. // @grant none
  9. // ==/UserScript==
  10.  
  11. (function() {
  12. 'use strict';
  13.  
  14. function setPrice() {
  15. if (localStorage.getItem('c64click.units.0.currPrice') === '16' || localStorage.getItem('ran') === null) {
  16. for (let i=0; i < 9; i++) {
  17. console.log(`${i} set to 0`);
  18. localStorage.setItem(`c64click.units.${i}.currPrice`, 0);
  19. }
  20. localStorage.setItem('ran', true);
  21. window.location.reload();
  22. }
  23. }
  24. setPrice();
  25.  
  26. const mod = document.createElement('button');
  27. mod.innerText = 'change pixel count';
  28. mod.setAttribute('onclick', "let amount = prompt('new amount'); if (isNaN(parseInt(amount))) { alert('that wasnt a number!'); } else { localStorage.setItem('c64click.bank', parseInt(amount)); window.location.reload(); }");
  29. document.getElementById('joy_down').appendChild(mod);
  30.  
  31. const cps = document.createElement('button');
  32. cps.innerText = 'change cps count';
  33. cps.setAttribute('onclick', "let amount = prompt('new amount'); if (isNaN(parseInt(amount))) { alert('that wasnt a number!'); } else { localStorage.setItem('c64click.cps', parseInt(amount)); window.location.reload(); }");
  34. document.getElementById('joy_down').appendChild(cps);
  35.  
  36. const power = document.createElement('button');
  37. power.innerText = 'change click power';
  38. power.setAttribute('onclick', "let amount = prompt('new amount'); if (isNaN(parseInt(amount))) { alert('that wasnt a number!'); } else { localStorage.setItem('c64click.clickPower', parseInt(amount)); window.location.reload(); }");
  39. document.getElementById('joy_down').appendChild(power);
  40. setTimeout(function() { document.getElementById('reset').addEventListener('click', setPrice()); }, 6000);
  41. })();