Ultimate Auto Clicker (Compact UI, Cursor-based)

Best auto-clicker: clean, compact UI, Ctrl+E toggle, and cursor-based clicking (Mac-friendly too!) 🚀🖱️💻

  1. // ==UserScript==
  2. // @name Ultimate Auto Clicker (Compact UI, Cursor-based)
  3. // @namespace http://tampermonkey.net/
  4. // @version 3.0
  5. // @description Best auto-clicker: clean, compact UI, Ctrl+E toggle, and cursor-based clicking (Mac-friendly too!) 🚀🖱️💻
  6. // @author Marley
  7. // @match *://*/*
  8. // @grant none
  9. // ==/UserScript==
  10.  
  11. (function () {
  12. 'use strict';
  13.  
  14. // ✅ Prevent duplicate UI
  15. if (window.__ultimateClickerLoaded) return;
  16. window.__ultimateClickerLoaded = true;
  17.  
  18. let autoClicking = false;
  19. let intervalId = null;
  20. const intervalMs = 100;
  21.  
  22. // ✅ Track cursor position
  23. let mouseX = 0, mouseY = 0;
  24. document.addEventListener('mousemove', e => {
  25. mouseX = e.clientX;
  26. mouseY = e.clientY;
  27. });
  28.  
  29. // ✅ Auto-click function
  30. function clickUnderCursor() {
  31. const el = document.elementFromPoint(mouseX, mouseY);
  32. if (el) el.click();
  33. }
  34.  
  35. // ✅ Toggle function
  36. function toggleClicker() {
  37. autoClicking = !autoClicking;
  38. statusDot.style.backgroundColor = autoClicking ? '#00ff80' : '#ff4d4d';
  39. toggleBtn.textContent = autoClicking ? 'Stop' : 'Start';
  40.  
  41. if (autoClicking) {
  42. intervalId = setInterval(clickUnderCursor, intervalMs);
  43. } else {
  44. clearInterval(intervalId);
  45. }
  46. }
  47.  
  48. // ✅ Keyboard toggle: Ctrl + E
  49. document.addEventListener('keydown', e => {
  50. if (e.ctrlKey && e.key.toLowerCase() === 'e') {
  51. toggleClicker();
  52. }
  53. });
  54.  
  55. // === ✅ UI CREATION ===
  56. const panel = document.createElement('div');
  57. panel.style.position = 'fixed';
  58. panel.style.bottom = '20px';
  59. panel.style.left = '20px';
  60. panel.style.zIndex = '999999';
  61. panel.style.background = '#1e1e1e';
  62. panel.style.border = '1px solid #444';
  63. panel.style.borderRadius = '6px';
  64. panel.style.padding = '6px 10px';
  65. panel.style.display = 'flex';
  66. panel.style.alignItems = 'center';
  67. panel.style.gap = '8px';
  68. panel.style.fontFamily = 'Arial, sans-serif';
  69. panel.style.fontSize = '12px';
  70. panel.style.color = '#eee';
  71. panel.style.boxShadow = '0 2px 8px rgba(0, 0, 0, 0.4)';
  72.  
  73. const toggleBtn = document.createElement('button');
  74. toggleBtn.textContent = 'Start';
  75. toggleBtn.style.padding = '4px 8px';
  76. toggleBtn.style.fontSize = '12px';
  77. toggleBtn.style.backgroundColor = '#007bff';
  78. toggleBtn.style.color = 'white';
  79. toggleBtn.style.border = 'none';
  80. toggleBtn.style.borderRadius = '4px';
  81. toggleBtn.style.cursor = 'pointer';
  82. toggleBtn.addEventListener('click', toggleClicker);
  83.  
  84. const statusDot = document.createElement('div');
  85. statusDot.style.width = '10px';
  86. statusDot.style.height = '10px';
  87. statusDot.style.borderRadius = '50%';
  88. statusDot.style.backgroundColor = '#ff4d4d';
  89. statusDot.title = 'Clicker Status';
  90.  
  91. const label = document.createElement('span');
  92. label.textContent = 'Auto-Clicker';
  93.  
  94. panel.appendChild(label);
  95. panel.appendChild(statusDot);
  96. panel.appendChild(toggleBtn);
  97. document.body.appendChild(panel);
  98. })();

QingJ © 2025

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