Commodore Clicker Exploit

An exploit that will add useful features!

  1. // ==UserScript==
  2. // @name Commodore Clicker Exploit
  3. // @namespace https://waa.ai/spinpy
  4. // @version 1.5
  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. const spin = document.createElement('p'); // if you steal my code and change it, youre a big poopie head and no one likes you.
  15. spin.innerHTML = '<br><img src="https://www.google.com/s2/favicons?domain=www.spinfal.ga" draggable="false"> Exploit made by <a href="https://waa.ai/spinpy" target="_blank">Spin, aka Spinfal <3</a>';
  16. document.getElementsByClassName('foot')[0].appendChild(spin);
  17.  
  18. function setPrice() {
  19. if (localStorage.getItem('c64click.units.0.currPrice') === '16' || localStorage.getItem('ran') === null) {
  20. for (let i=0; i < 9; i++) {
  21. console.log(`${i} set to 0`);
  22. localStorage.setItem(`c64click.units.${i}.currPrice`, 0);
  23. }
  24. localStorage.setItem('ran', true);
  25. window.location.reload();
  26. }
  27. }
  28. setPrice();
  29.  
  30. function loadButtons() {
  31. const mod = document.createElement('li'); // change pixel amount
  32. mod.innerHTML = '<img src="https://www.google.com/s2/favicons?domain=www.spinfal.ga" draggable="false"> Change pixel count';
  33. mod.setAttribute('id', 'option2');
  34. mod.setAttribute('class', 'active');
  35. mod.setAttribute('onclick', "let amount = prompt('new amount'); if (isNaN(parseInt(amount))) { alert('that wasnt a number!'); } else { localStorage.setItem('c64click.bank', parseInt(amount)); localStorage.setItem('c64click.produced', parseInt(amount)); window.location.reload(); }");
  36. document.getElementsByTagName('ul')[3].append(mod);
  37.  
  38. const cps = document.createElement('li'); // change cps amount
  39. cps.innerHTML = '<img src="https://www.google.com/s2/favicons?domain=www.spinfal.ga" draggable="false"> Change cps count';
  40. cps.setAttribute('id', 'option3');
  41. cps.setAttribute('class', 'active');
  42. 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(); }");
  43. document.getElementsByTagName('ul')[3].append(cps);
  44.  
  45. const power = document.createElement('li'); // change click power
  46. power.innerHTML = '<img src="https://www.google.com/s2/favicons?domain=www.spinfal.ga" draggable="false"> Change click power';
  47. power.setAttribute('id', 'option4');
  48. power.setAttribute('class', 'active');
  49. 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(); }");
  50. document.getElementsByTagName('ul')[3].append(power);
  51.  
  52. const load = document.createElement('button'); // reload exploit
  53. load.innerText = 'Reload Exploit';
  54. load.setAttribute('onclick', "for (let i=0; i < 9; i++) { console.log(`${i} set to 0`); localStorage.setItem(`c64click.units.${i}.currPrice`, 0); } localStorage.setItem('ran', true); window.location.reload();");
  55. document.getElementsByClassName('status')[0].append(load);
  56.  
  57. const br = document.createElement('br'); // just a br
  58. document.getElementsByClassName('status')[0].append(br);
  59.  
  60. const disk = document.createElement('button'); // toggle disk selector
  61. disk.innerText = 'Toggle Disk Selection';
  62. disk.setAttribute('onclick', "document.getElementsByTagName('div')[19].classList.toggle('hidden');");
  63. document.getElementsByClassName('status')[0].append(disk);
  64.  
  65. const br2 = document.createElement('br'); // just a br
  66. document.getElementsByClassName('status')[0].append(br2);
  67.  
  68. var status = 'off';
  69. var auto;
  70. const click = document.createElement('button'); // toggle autoclicker
  71. click.innerText = 'Toggle Auto Clicker';
  72. click.setAttribute('onclick', "if (status === '' || status === 'off') { auto = setInterval(function() { document.getElementById('click').click(); }, 0); status = 'on'; } else if (status === 'on') { clearInterval(auto); status = 'off'; }");
  73. document.getElementsByClassName('status')[0].append(click);
  74. }
  75. setTimeout(function() { loadButtons(); }, 300);
  76. })();