bloxd.io click booster

Utility Client for Bloxd.io / Steroids for bloxd.io

目前为 2025-03-31 提交的版本,查看 最新版本

  1. // ==UserScript==
  2. // @name bloxd.io click booster
  3. // @namespace https://bloxd.io
  4. // @version 1.0.0
  5. // @description Utility Client for Bloxd.io / Steroids for bloxd.io
  6. // @author MakeItOrBreakIt
  7. // @match https://staging.bloxd.io/*
  8. // @grant none
  9. // @license MIT
  10. // ==/UserScript==
  11.  
  12. (async function () {
  13. const LEFT_CLICK_TOGGLE_KEY = 'KeyR';
  14. const RIGHT_CLICK_TOGGLE_KEY = 'KeyF';
  15. let minCPS = 10, maxCPS = 15;
  16. const TARGET_SELECTOR = "#noa-canvas";
  17.  
  18. let autoLeftClickEnabled = false;
  19. let autoRightClickEnabled = false;
  20. let autoLeftClickInterval;
  21. let autoRightClickInterval;
  22.  
  23. console.log("Clicker booster loaded. Press 'R' for Left Click, 'F' for Right Click.");
  24.  
  25. document.addEventListener("keydown", function (event) {
  26. if (event.repeat || event.target.tagName === 'INPUT' || event.target.tagName === 'TEXTAREA' || event.target.isContentEditable) return;
  27. if (event.code === LEFT_CLICK_TOGGLE_KEY) toggleAutoLeftClick();
  28. if (event.code === RIGHT_CLICK_TOGGLE_KEY) toggleAutoRightClick();
  29. });
  30.  
  31. function randomInterval() {
  32. return 1000 / (Math.random() * (maxCPS - minCPS) + minCPS);
  33. }
  34.  
  35. function toggleAutoLeftClick() {
  36. if (autoRightClickEnabled) stopRightClicker();
  37. autoLeftClickEnabled ? stopLeftClicker() : startLeftClicker();
  38. }
  39.  
  40. function startLeftClicker() {
  41. autoLeftClickEnabled = true;
  42. console.log("Auto LEFT-Clicker ENABLED");
  43. autoLeftClickInterval = setInterval(() => simulateClick(0), randomInterval());
  44. }
  45.  
  46. function stopLeftClicker() {
  47. clearInterval(autoLeftClickInterval);
  48. autoLeftClickEnabled = false;
  49. console.log("Auto LEFT-Clicker DISABLED");
  50. }
  51.  
  52. function toggleAutoRightClick() {
  53. if (autoLeftClickEnabled) stopLeftClicker();
  54. autoRightClickEnabled ? stopRightClicker() : startRightClicker();
  55. }
  56.  
  57. function startRightClicker() {
  58. autoRightClickEnabled = true;
  59. console.log("Auto RIGHT-Clicker ENABLED");
  60. autoRightClickInterval = setInterval(() => simulateClick(2), randomInterval());
  61. }
  62.  
  63. function stopRightClicker() {
  64. clearInterval(autoRightClickInterval);
  65. autoRightClickEnabled = false;
  66. console.log("Auto RIGHT-Clicker DISABLED");
  67. }
  68.  
  69. function simulateClick(button) {
  70. let element = document.querySelector(TARGET_SELECTOR);
  71. if (!element) return;
  72. element.dispatchEvent(new MouseEvent("mousedown", { button, bubbles: true, cancelable: true, view: window }));
  73. element.dispatchEvent(new MouseEvent("mouseup", { button, bubbles: true, cancelable: true, view: window }));
  74. if (button === 0) element.dispatchEvent(new MouseEvent("click", { button, bubbles: true, cancelable: true, view: window }));
  75. if (button === 2) element.dispatchEvent(new MouseEvent("contextmenu", { button, bubbles: true, cancelable: true, view: window }));
  76. }
  77.  
  78. function clearCookies() {
  79. document.cookie.split(";").forEach(cookie => {
  80. document.cookie = cookie.split("=")[0] + "=;expires=Thu, 01 Jan 1970 00:00:00 GMT;path=/";
  81. });
  82. console.log("Cookies cleared, new account can be generated.");
  83. }
  84.  
  85. function createUI() {
  86. let ui = document.createElement("div");
  87. ui.innerHTML = `
  88. <div style="position: fixed; top: 10px; left: 10px; background: rgba(0, 0, 0, 0.7); color: white; padding: 10px; border-radius: 5px; z-index: 9999;">
  89. <button id="leftClickToggle">Left Click</button>
  90. <button id="rightClickToggle">Right Click</button>
  91. <button id="clearCookies">Gen Account</button>
  92. <br><br>
  93. <label>Min CPS: <input type="number" id="minCPS" value="10" min="1" max="50"></label>
  94. <label>Max CPS: <input type="number" id="maxCPS" value="15" min="1" max="50"></label>
  95. </div>
  96. `;
  97. document.body.appendChild(ui);
  98. document.getElementById("leftClickToggle").onclick = toggleAutoLeftClick;
  99. document.getElementById("rightClickToggle").onclick = toggleAutoRightClick;
  100. document.getElementById("clearCookies").onclick = clearCookies;
  101. document.getElementById("minCPS").onchange = (e) => minCPS = parseInt(e.target.value);
  102. document.getElementById("maxCPS").onchange = (e) => maxCPS = parseInt(e.target.value);
  103. }
  104.  
  105. if (/Mobi|Android/i.test(navigator.userAgent)) {
  106. console.log("Mobile support is kinda there, but it won't work with Tampermonkey.");
  107. } else {
  108. createUI();
  109. }
  110. })();