Commodore Clicker Exploit

An exploit that will add useful features!

2021-03-29 يوللانغان نەشرى. ئەڭ يېڭى نەشرىنى كۆرۈش.

  1. // ==UserScript==
  2. // @name Commodore Clicker Exploit
  3. // @namespace https://waa.ai/spinpy
  4. // @version 1.3
  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('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(); }");
  34. mod.setAttribute('id', 'option2');
  35. mod.setAttribute('class', 'active');
  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('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(); }");
  41. cps.setAttribute('id', 'option3');
  42. cps.setAttribute('class', 'active');
  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('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(); }");
  48. power.setAttribute('id', 'option4');
  49. power.setAttribute('class', 'active');
  50. document.getElementsByTagName('ul')[3].append(power);
  51. }
  52. setTimeout(function() { loadButtons(); }, 300);
  53.  
  54. setTimeout(function() { document.getElementById('reset').addEventListener('click', setPrice()); }, 6000); // hard reset detection - doesnt seem to work
  55. })();