AutoClicker(GSRHackZ & Quinn Brittain)

Auto Clicker for Browsers!!

  1. // ==UserScript==
  2. // @name AutoClicker(GSRHackZ & Quinn Brittain)
  3. // @namespace http://tampermonkey.net/
  4. // @version 1.0
  5. // @description Auto Clicker for Browsers!!
  6. // @author thc282 ori:GSRHackZ & Quinn Brittain
  7. // @match *://*/*
  8. // @grant none
  9. // @icon https://image.flaticon.com/icons/svg/99/99188.svg
  10. // @license MIT
  11. // @compatible chrome
  12. // @compatible firefox
  13. // @compatible opera
  14. // @compatible safari
  15. // ==/UserScript==
  16.  
  17. let x,y,set,cps=10;
  18.  
  19. document.addEventListener('keydown',function(evt){
  20. if(evt.keyCode==77&&evt.altKey){
  21. if(!set==true){
  22. set=true;
  23. let inp=prompt("How many clicks would you like per second? \nRecommended Max : 100,000 cps");
  24. if(!isNaN(inp)&&inp.trim().length>0){
  25. if(inp>100000){
  26. let check=confirm(`${inp} clicks per second may crash your browser! Are you sure you would like to continue?`)
  27. if(check){
  28. alert("Ok whatever you say...");
  29. console.warn("Idiot...");
  30. cps=inp;
  31. }
  32. else{
  33. set=false;
  34. alert("Thanks for understanding. Please click Alt + m to try again.")
  35. }
  36. }else if(inp < 0){
  37. cps=1
  38. }else{
  39. cps=inp;
  40. }
  41. }
  42. alert(`AutoClick now set to ${cps} cps.\nYou may now press \` to Autoclick. Have fun !!`);
  43.  
  44. function AutoClick(){
  45. if (window.attachEvent) {
  46. document.attachEvent("onmousemove", MouseMv);
  47. } else {
  48. document.addEventListener("mousemove", MouseMv, false);
  49. }
  50. document.addEventListener('keydown', KeyDown);
  51.  
  52. function MouseMv(e) {
  53. if (!e) e = window.event;
  54.  
  55. if (typeof e.pageY == 'number') {
  56. x = e.pageX;
  57. y = e.pageY;
  58. } else {
  59. x = e.clientX;
  60. y = e.clientY;
  61. }
  62. }
  63.  
  64. function KeyDown(e) {
  65. if (e.type == 'keydown') {
  66. var char = e.key
  67. if (char == '`' || char == '~') {
  68. let autoClick=setTimeout(function(){
  69. if(x!==undefined&&y!==undefined&&set==true){
  70. for(let i=0;i<cps;i++){
  71. click(x,y);
  72. }
  73. }
  74. },1)
  75. }
  76. }
  77. }
  78. }
  79. setInterval(AutoClick(), 1)
  80. }
  81. else{
  82. alert("Auto Click canceled! Press Alt+M to set again.")
  83. set=false
  84. }
  85. }
  86. })
  87.  
  88.  
  89. function click(x, y){
  90. let ev = new MouseEvent('click', {
  91. 'view': window,
  92. 'bubbles': true,
  93. 'cancelable': true,
  94. 'screenX': x,
  95. 'screenY': y
  96. });
  97.  
  98. let el = document.elementFromPoint(x, y);
  99. el.dispatchEvent(ev);
  100. }

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址