bloxd.io auto clicker, account gen (Draggable UI, Notifications, Right Default)

Auto clicker for bloxd.io with draggable UI (defaults top right), notifications, arraylist, and simultaneous modules

  1. // ==UserScript==
  2. // @name bloxd.io auto clicker, account gen (Draggable UI, Notifications, Right Default)
  3. // @namespace https://bloxd.io
  4. // @version 1.1
  5. // @description Auto clicker for bloxd.io with draggable UI (defaults top right), notifications, arraylist, and simultaneous modules
  6. // @author MakeItOrBreakIt
  7. // @match https://staging.bloxd.io/*
  8. // @grant none
  9. // @license MIT
  10. // ==/UserScript==
  11.  
  12. (function () {
  13. const config = JSON.parse(localStorage.getItem('bloxdConfig')) || {
  14. leftClickKey: 'KeyR',
  15. rightClickKey: 'KeyF'
  16. };
  17.  
  18. let minCPS = 10, maxCPS = 15;
  19. let leftClickActive = false, rightClickActive = false;
  20. let leftClickInterval, rightClickInterval;
  21.  
  22. let arraylistVisible = true;
  23. let arraylist = [];
  24.  
  25. // Notification system
  26. function showNotification(msg, duration = 1800) {
  27. let notif = document.createElement("div");
  28. notif.className = "bloxd-notification";
  29. notif.textContent = msg;
  30. document.body.appendChild(notif);
  31. setTimeout(() => {
  32. notif.style.opacity = "0";
  33. setTimeout(() => notif.remove(), 400);
  34. }, duration);
  35. }
  36.  
  37. // Original click simulation: dispatchEvent on canvas
  38. const TARGET_SELECTOR = "#noa-canvas";
  39. function simulateClick(button) {
  40. const element = document.querySelector(TARGET_SELECTOR);
  41. if (!element) return;
  42. element.dispatchEvent(new MouseEvent("mousedown", { button, bubbles: true }));
  43. element.dispatchEvent(new MouseEvent("mouseup", { button, bubbles: true }));
  44. if (button === 0) element.dispatchEvent(new MouseEvent("click", { button, bubbles: true }));
  45. if (button === 2) element.dispatchEvent(new MouseEvent("contextmenu", { button, bubbles: true }));
  46. }
  47.  
  48. function randomInterval() {
  49. return 1000 / (Math.random() * (maxCPS - minCPS) + minCPS);
  50. }
  51.  
  52. function startLeftClick() {
  53. if (leftClickActive) return;
  54. leftClickActive = true;
  55. function loop() {
  56. if (!leftClickActive) return;
  57. simulateClick(0);
  58. leftClickInterval = setTimeout(loop, randomInterval());
  59. }
  60. loop();
  61. updateArraylist();
  62. }
  63. function stopLeftClick() {
  64. leftClickActive = false;
  65. clearTimeout(leftClickInterval);
  66. updateArraylist();
  67. }
  68. function toggleLeftClick() {
  69. leftClickActive ? stopLeftClick() : startLeftClick();
  70. }
  71.  
  72. function startRightClick() {
  73. if (rightClickActive) return;
  74. rightClickActive = true;
  75. function loop() {
  76. if (!rightClickActive) return;
  77. simulateClick(2);
  78. rightClickInterval = setTimeout(loop, randomInterval());
  79. }
  80. loop();
  81. updateArraylist();
  82. }
  83. function stopRightClick() {
  84. rightClickActive = false;
  85. clearTimeout(rightClickInterval);
  86. updateArraylist();
  87. }
  88. function toggleRightClick() {
  89. rightClickActive ? stopRightClick() : startRightClick();
  90. }
  91.  
  92. function saveConfig() {
  93. localStorage.setItem('bloxdConfig', JSON.stringify(config));
  94. }
  95.  
  96. function clearCookies() {
  97. document.cookie.split(";").forEach(cookie => {
  98. document.cookie = cookie.split("=")[0] + "=;expires=Thu, 01 Jan 1970 00:00:00 GMT;path=/";
  99. });
  100. setTimeout(() => location.reload(), 1000);
  101. }
  102.  
  103. function updateArraylist() {
  104. arraylist = [];
  105. if (leftClickActive) arraylist.push("Auto Left Click");
  106. if (rightClickActive) arraylist.push("Auto Right Click");
  107. renderArraylist();
  108. }
  109.  
  110. function renderArraylist() {
  111. const arrDiv = document.getElementById("bloxd-arraylist");
  112. arrDiv.innerHTML = arraylist.length
  113. ? arraylist.map(f => `<span class="arraylist-item">${f}</span>`).join("<br>")
  114. : `<span style="color:#888;">No features active</span>`;
  115. arrDiv.style.display = arraylistVisible ? "block" : "none";
  116. }
  117.  
  118. function createUI() {
  119. // Load saved position or use default (right: 10px, top: 10px)
  120. let saved = JSON.parse(localStorage.getItem('bloxdUIPos') || '{}');
  121. let useCustom = typeof saved.x === "number" && typeof saved.y === "number";
  122. let startX = saved.x || 0, startY = saved.y || 10;
  123.  
  124. // Main UI container
  125. let ui = document.createElement("div");
  126. ui.id = "bloxd-ui-container";
  127. if (useCustom) {
  128. ui.setAttribute("style", `position: fixed; top: ${startY}px; left: ${startX}px; right: auto; background: rgba(0,0,0,0.8); color: white; padding: 10px; border-radius: 8px; z-index: 9999; font-size: 14px; min-width: 320px; max-width: 440px; box-shadow: 0 2px 8px #0008; cursor: move;`);
  129. } else {
  130. ui.setAttribute("style", `position: fixed; top: 10px; right: 10px; left: auto; background: rgba(0,0,0,0.8); color: white; padding: 10px; border-radius: 8px; z-index: 9999; font-size: 14px; min-width: 320px; max-width: 440px; box-shadow: 0 2px 8px #0008; cursor: move;`);
  131. }
  132. ui.innerHTML = `
  133. <div style="display: flex; flex-direction: row; gap: 10px; margin-bottom: 8px; cursor: move;">
  134. <button id="leftClickToggle" class="action-button">Left Click</button>
  135. <button id="rightClickToggle" class="action-button">Right Click</button>
  136. <button id="clearCookies" class="action-button">Gen Account</button>
  137. <button id="arraylistToggle" class="action-button">Arraylist</button>
  138. </div>
  139. <div style="display: flex; flex-direction: row; gap: 8px;">
  140. <label class="cps-label">Min CPS: <input type="number" id="minCPS" value="${minCPS}" min="1" max="50"></label>
  141. <label class="cps-label">Max CPS: <input type="number" id="maxCPS" value="${maxCPS}" min="1" max="50"></label>
  142. <label class="key-label">Left Key: <input id="keyLeft" type="text" value="${config.leftClickKey}" size="8"></label>
  143. <label class="key-label">Right Key: <input id="keyRight" type="text" value="${config.rightClickKey}" size="8"></label>
  144. <button id="saveKeys" class="action-button">Save Keys</button>
  145. </div>
  146. `;
  147. document.body.appendChild(ui);
  148.  
  149. // Arraylist display
  150. let arrDiv = document.createElement("div");
  151. arrDiv.id = "bloxd-arraylist";
  152. arrDiv.className = "arraylist-container";
  153. if (useCustom) {
  154. arrDiv.setAttribute("style", `position: fixed; top: ${startY+140}px; left: ${startX}px; right: auto; background: rgba(30,30,30,0.97); color: #00ffb0; padding: 10px 22px; border-radius: 8px; z-index: 10000; font-size: 16px; min-width: 120px; text-align: left; box-shadow: 0 2px 8px #0008; user-select: none; margin-top: 10px;`);
  155. } else {
  156. arrDiv.setAttribute("style", `position: fixed; top: 150px; right: 10px; left: auto; background: rgba(30,30,30,0.97); color: #00ffb0; padding: 10px 22px; border-radius: 8px; z-index: 10000; font-size: 16px; min-width: 120px; text-align: left; box-shadow: 0 2px 8px #0008; user-select: none; margin-top: 10px;`);
  157. }
  158. document.body.appendChild(arrDiv);
  159.  
  160. // Drag logic
  161. let isDragging = false, dragOffsetX = 0, dragOffsetY = 0;
  162. ui.addEventListener('mousedown', function(e) {
  163. if (e.target.tagName === "INPUT" || e.target.tagName === "BUTTON") return;
  164. isDragging = true;
  165. dragOffsetX = e.clientX - ui.getBoundingClientRect().left;
  166. dragOffsetY = e.clientY - ui.getBoundingClientRect().top;
  167. document.body.style.userSelect = "none";
  168. });
  169. document.addEventListener('mousemove', function(e) {
  170. if (!isDragging) return;
  171. let x = e.clientX - dragOffsetX;
  172. let y = e.clientY - dragOffsetY;
  173. // Clamp to window
  174. x = Math.max(0, Math.min(window.innerWidth - ui.offsetWidth, x));
  175. y = Math.max(0, Math.min(window.innerHeight - ui.offsetHeight, y));
  176. ui.style.left = x + "px";
  177. ui.style.top = y + "px";
  178. ui.style.right = "auto";
  179. // Move arraylist too
  180. arrDiv.style.left = x + "px";
  181. arrDiv.style.top = (y + 140) + "px";
  182. arrDiv.style.right = "auto";
  183. });
  184. document.addEventListener('mouseup', function(e) {
  185. if (isDragging) {
  186. isDragging = false;
  187. document.body.style.userSelect = "";
  188. // Save position
  189. localStorage.setItem('bloxdUIPos', JSON.stringify({
  190. x: parseInt(ui.style.left),
  191. y: parseInt(ui.style.top)
  192. }));
  193. }
  194. });
  195.  
  196. // Event listeners
  197. document.getElementById("leftClickToggle").onclick = () => { toggleLeftClick(); };
  198. document.getElementById("rightClickToggle").onclick = () => { toggleRightClick(); };
  199. document.getElementById("clearCookies").onclick = clearCookies;
  200.  
  201. document.getElementById("minCPS").onchange = e => { minCPS = parseInt(e.target.value); };
  202. document.getElementById("maxCPS").onchange = e => { maxCPS = parseInt(e.target.value); };
  203.  
  204. document.getElementById("saveKeys").onclick = () => {
  205. config.leftClickKey = document.getElementById("keyLeft").value;
  206. config.rightClickKey = document.getElementById("keyRight").value;
  207. saveConfig();
  208. showNotification("Keybinds saved!");
  209. };
  210.  
  211. document.getElementById("arraylistToggle").onclick = () => {
  212. arraylistVisible = !arraylistVisible;
  213. renderArraylist();
  214. };
  215.  
  216. // Initial render
  217. updateArraylist();
  218. }
  219.  
  220. // Keybinds for toggling features
  221. document.addEventListener("keydown", (event) => {
  222. if (event.repeat || ["INPUT", "TEXTAREA"].includes(event.target.tagName) || event.target.isContentEditable) return;
  223. if (event.code === config.leftClickKey) toggleLeftClick();
  224. if (event.code === config.rightClickKey) toggleRightClick();
  225. });
  226.  
  227. if (!/Mobi|Android/i.test(navigator.userAgent)) {
  228. createUI();
  229. }
  230.  
  231. // Extra CSS for buttons/inputs and notifications
  232. const styles = `
  233. #bloxd-ui-container .action-button {
  234. background-color: #444;
  235. color: white;
  236. border: none;
  237. padding: 9px 18px;
  238. border-radius: 6px;
  239. margin: 0 2px;
  240. cursor: pointer;
  241. font-size: 15px;
  242. transition: background-color 0.3s;
  243. }
  244. #bloxd-ui-container .action-button:hover {
  245. background-color: #888;
  246. }
  247. #bloxd-ui-container .action-button:active {
  248. background-color: #333;
  249. }
  250. #bloxd-ui-container .cps-label, #bloxd-ui-container .key-label {
  251. margin: 0 4px;
  252. font-size: 13px;
  253. }
  254. #bloxd-ui-container input[type="number"], #bloxd-ui-container input[type="text"] {
  255. padding: 4px 7px;
  256. font-size: 13px;
  257. width: 55px;
  258. margin-left: 2px;
  259. border-radius: 3px;
  260. border: 1px solid #333;
  261. background: #222;
  262. color: #fff;
  263. }
  264. #bloxd-arraylist .arraylist-item {
  265. color: #00ffb0;
  266. font-weight: bold;
  267. }
  268. .bloxd-notification {
  269. position: fixed;
  270. top: 20px;
  271. right: 20px;
  272. background: #222d;
  273. color: #fff;
  274. padding: 12px 24px;
  275. border-radius: 8px;
  276. font-size: 16px;
  277. z-index: 10001;
  278. box-shadow: 0 2px 8px #0008;
  279. opacity: 1;
  280. transition: opacity 0.4s;
  281. pointer-events: none;
  282. }
  283. `;
  284. let styleSheet = document.createElement("style");
  285. styleSheet.type = "text/css";
  286. styleSheet.innerText = styles;
  287. document.head.appendChild(styleSheet);
  288. })();