Super Auto Clicker

Dominate the web with your auto clicking powers! Install this script and this power is yours! Click Alt+M on a webpage to enable the autoclicker. Press Alt+M again to turn it off. You need this extension to use Super Auto Clicker: https://chrome.google.com/webstore/detail/tampermonkey/dhdgffkkebhmkfjojejmpbldmpobfkfo?hl=en

  1. // ==UserScript==
  2. // @name Super Auto Clicker
  3. // @namespace http://tampermonkey.net/
  4. // @version 3.0
  5. // @description Dominate the web with your auto clicking powers! Install this script and this power is yours! Click Alt+M on a webpage to enable the autoclicker. Press Alt+M again to turn it off. You need this extension to use Super Auto Clicker: https://chrome.google.com/webstore/detail/tampermonkey/dhdgffkkebhmkfjojejmpbldmpobfkfo?hl=en
  6. // @author Super Coder
  7. // @match *://*/*
  8. // @grant none
  9. // @icon https://www.google.com/s2/favicons?sz=64&domain=autoclicker.org
  10. // @license MIT
  11. // @grant GM.registerMenuCommand
  12. // @grant GM_registerMenuCommand
  13. // @grant GM_unregisterMenuCommand
  14. // @grant GM.setValue
  15. // @grant GM.getValue
  16. // @grant GM.xmlHttpRequest
  17. // @grant GM.info
  18. // ==/UserScript==
  19. let x,y,set,cps=10;
  20. document.addEventListener('keyup',function(evt){
  21. if(evt.keyCode==77&&evt.altKey){
  22. if(!set==true){
  23. set=true;
  24. let inp=prompt("Please set your CPS value. Do not include symbols/letters in your response. Recommended Max : 100,000 cps");
  25. if(!isNaN(inp)&&inp.trim().length>0){
  26. if(inp>100000){
  27. let check=confirm(`${inp} CPS may crash your browser! Are you sure you would like to continue?`)
  28. if(check){
  29. alert("The CPS value has been set. Please note that this CPS value may crash your browser.");
  30. console.warn("Please note that this CPS value may crash your browser.");
  31. cps=inp;
  32. }
  33. else{
  34. set=false;
  35. alert("Click Alt+M to set the CPS setting again.")
  36. }
  37. }
  38. else if(inp<1000){
  39. cps=1000;
  40. }
  41. else{
  42. cps=inp;
  43. }
  44. }
  45. alert("You may now click on any point in this tab to lock the autoclicker to it. Click Alt+M to turn off the autoclicker.");
  46. onmousedown = function(e){
  47. x=e.clientX;
  48. y=e.clientY;
  49. };
  50. let autoClick=setInterval(function(){
  51. if(x!==undefined&&y!==undefined&&set==true){
  52. for(let i=0;i<cps/1000;i++){
  53. click(x,y);
  54. }
  55. }
  56. },1)}
  57. else{
  58. set=false
  59. }
  60. }
  61. })
  62. function click(x, y){
  63. let ev = new MouseEvent('click', {
  64. 'view': window,
  65. 'bubbles': true,
  66. 'cancelable': true,
  67. 'screenX': x,
  68. 'screenY': y
  69. });
  70. let el = document.elementFromPoint(x, y);
  71. el.dispatchEvent(ev);
  72. }