Auto Clicker

Auto Clicker for Browsers!!

  1. // ==UserScript==
  2. // @name Auto Clicker
  3. // @namespace http://tampermonkey.net/
  4. // @version 1.6
  5. // @description Auto Clicker for Browsers!!
  6. // @author GSRHackZ
  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. let x,y,set,cps=10;
  17. document.addEventListener('keyup',function(evt){
  18. if(evt.keyCode==81){
  19. if(!set==true){
  20. set=true;
  21. let inp=prompt("How many clicks would you like per second? Recommended Max : 100,000 cps");
  22. if(!isNaN(inp)&&inp.trim().length>0){
  23. if(inp>100000){
  24. let check=confirm(`${inp} clicks per second may crash your browser! Are you sure you would like to continue?`)
  25. if(check){
  26. alert("Ok whatever you say...");
  27. console.warn("Idiot...");
  28. cps=inp;
  29. }
  30. else{
  31. set=false;
  32. alert("Thanks for understanding. Please click ctrl + m to try again.")
  33. }
  34. }
  35. else if(inp<1000){
  36. cps=1000;
  37. }
  38. else{
  39. cps=inp;
  40. }
  41. }
  42. alert("You may now click on any point in this tab to set the autoclicker to it. Have fun !!");
  43. onmousedown = function(e){
  44. x=e.clientX;
  45. y=e.clientY;
  46. };
  47. let autoClick=setInterval(function(){
  48. if(x!==undefined&&y!==undefined&&set==true){
  49. for(let i=0;i<cps/1000;i++){
  50. click(x,y);
  51. }
  52. }
  53. },1)}
  54. else{
  55. set=false
  56. }
  57. }
  58. })
  59. function click(x, y){
  60. let ev = new MouseEvent('click', {
  61. 'view': window,
  62. 'bubbles': true,
  63. 'cancelable': true,
  64. 'screenX': x,
  65. 'screenY': y
  66. });
  67. let el = document.elementFromPoint(x, y);
  68. el.dispatchEvent(ev);
  69. }
  70.  
  71. document.addEventListener('keyup',function(evt){
  72. if(evt.keyCode==81){
  73. var points = new Array(100);
  74. for (var i = 0; i < 100; i++) {
  75. points[i] = i + 1; //This populates the array. +1 is necessary because arrays are 0 index based and you want to store 1-100 in it, NOT 0-99.
  76. }
  77.  
  78. for (var i = 0; i < points.length; i++) {
  79. console.log(points[i])
  80. App.game.party.gainPokemonById(points[i],true,true)
  81.  
  82. }
  83. }
  84. })

QingJ © 2025

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