Bloxd.io Mod Menu | Made by iron web10

Mod menu for Bloxd.io

  1. // ==UserScript==
  2. // @name Bloxd.io Mod Menu | Made by iron web10
  3. // @namespace http://tampermonkey.net/
  4. // @version 0.3
  5. // @description Mod menu for Bloxd.io
  6. // @author iron web10
  7. // @match https://bloxd.io/*
  8. // @icon https://www.google.com/s2/favicons?sz=64&domain=bloxd.io
  9. // @grant none
  10. // @license iron web10
  11. // ==/UserScript==
  12.  
  13. (function () {
  14. 'use strict';
  15.  
  16. function getStorage(name) {
  17. return localStorage.getItem(name);
  18. }
  19.  
  20. function setStorage(name, value) {
  21. localStorage.setItem(name, value);
  22. }
  23.  
  24. const clickerConfig = JSON.parse(localStorage.getItem('bloxdClickerConfig')) || {
  25. leftClickKey: 'KeyR',
  26. rightClickKey: 'KeyF'
  27. };
  28.  
  29. let minCPS = 10, maxCPS = 15;
  30. let leftClickActive = false, rightClickActive = false;
  31. let leftClickInterval, rightClickInterval;
  32.  
  33. // Auto Clicker Functions
  34. function simulateClick(button) {
  35. const element = document.querySelector("#noa-canvas");
  36. if (!element) return;
  37. element.dispatchEvent(new MouseEvent("mousedown", { button, bubbles: true }));
  38. element.dispatchEvent(new MouseEvent("mouseup", { button, bubbles: true }));
  39. if (button === 0) element.dispatchEvent(new MouseEvent("click", { button, bubbles: true }));
  40. if (button === 2) element.dispatchEvent(new MouseEvent("contextmenu", { button, bubbles: true }));
  41. }
  42.  
  43. function randomInterval() {
  44. return 1000 / (Math.random() * (maxCPS - minCPS) + minCPS);
  45. }
  46.  
  47. function startLeftClick() {
  48. if (leftClickActive) return;
  49. leftClickActive = true;
  50. function loop() {
  51. if (!leftClickActive) return;
  52. simulateClick(0);
  53. leftClickInterval = setTimeout(loop, randomInterval());
  54. }
  55. loop();
  56. }
  57.  
  58. function stopLeftClick() {
  59. leftClickActive = false;
  60. clearTimeout(leftClickInterval);
  61. }
  62.  
  63. function toggleLeftClick() {
  64. leftClickActive ? stopLeftClick() : startLeftClick();
  65. }
  66.  
  67. function startRightClick() {
  68. if (rightClickActive) return;
  69. rightClickActive = true;
  70. function loop() {
  71. if (!rightClickActive) return;
  72. simulateClick(2);
  73. rightClickInterval = setTimeout(loop, randomInterval());
  74. }
  75. loop();
  76. }
  77.  
  78. function stopRightClick() {
  79. rightClickActive = false;
  80. clearTimeout(rightClickInterval);
  81. }
  82.  
  83. function toggleRightClick() {
  84. rightClickActive ? stopRightClick() : startRightClick();
  85. }
  86.  
  87. function saveClickerConfig() {
  88. localStorage.setItem('bloxdClickerConfig', JSON.stringify(clickerConfig));
  89. }
  90.  
  91. function createMenu() {
  92. if (document.getElementById('modMenu')) return;
  93.  
  94. let menu = document.createElement('div');
  95. menu.id = 'modMenu';
  96. menu.style.position = 'fixed';
  97. menu.style.top = getStorage('menuTop') || '50px';
  98. menu.style.left = getStorage('menuLeft') || '50px';
  99. menu.style.width = '200px';
  100. menu.style.background = 'rgba(0, 0, 0, 0.9)';
  101. menu.style.color = 'white';
  102. menu.style.padding = '15px';
  103. menu.style.borderRadius = '10px';
  104. menu.style.zIndex = '9999';
  105. menu.style.fontFamily = 'Arial';
  106. menu.style.boxShadow = '0 0 10px rgba(255, 255, 255, 0.2)';
  107. menu.style.display = getStorage('menuMinimized') === 'true' ? 'none' : 'flex';
  108. menu.style.flexDirection = 'column';
  109. menu.style.alignItems = 'center';
  110.  
  111. let titleBar = document.createElement('div');
  112. titleBar.style.display = 'flex';
  113. titleBar.style.justifyContent = 'space-between';
  114. titleBar.style.alignItems = 'center';
  115. titleBar.style.cursor = 'move';
  116. titleBar.style.width = '100%';
  117. titleBar.style.padding = '5px';
  118. titleBar.style.background = '#333';
  119. titleBar.style.borderRadius = '5px';
  120.  
  121. let title = document.createElement('h3');
  122. title.textContent = 'Bloxd.io Mod Menu';
  123. title.style.margin = '0';
  124. title.style.flexGrow = '1';
  125. title.style.color = 'white';
  126.  
  127. let minimizeButton = document.createElement('button');
  128. minimizeButton.textContent = '-';
  129. minimizeButton.style.background = 'transparent';
  130. minimizeButton.style.color = 'white';
  131. minimizeButton.style.border = 'none';
  132. minimizeButton.style.cursor = 'pointer';
  133.  
  134. titleBar.appendChild(title);
  135. titleBar.appendChild(minimizeButton);
  136. menu.appendChild(titleBar);
  137.  
  138. let content = document.createElement('div');
  139. content.style.display = getStorage('menuMinimized') === 'true' ? 'none' : 'block';
  140. menu.appendChild(content);
  141.  
  142. document.body.appendChild(menu);
  143.  
  144. minimizeButton.addEventListener('click', function () {
  145. let isHidden = content.style.display === 'none';
  146. content.style.display = isHidden ? 'block' : 'none';
  147. setStorage('menuMinimized', !isHidden);
  148. });
  149.  
  150. function createSwitch(name, callback) {
  151. let container = document.createElement('div');
  152. container.style.display = 'flex';
  153. container.style.justifyContent = 'space-between';
  154. container.style.alignItems = 'center';
  155. container.style.width = '100%';
  156. container.style.marginBottom = '5px';
  157.  
  158. let label = document.createElement('span');
  159. label.textContent = name;
  160. label.style.flexGrow = '1';
  161.  
  162. let switchContainer = document.createElement('label');
  163. switchContainer.style.position = 'relative';
  164. switchContainer.style.display = 'inline-block';
  165. switchContainer.style.width = '34px';
  166. switchContainer.style.height = '18px';
  167.  
  168. let input = document.createElement('input');
  169. input.type = 'checkbox';
  170. input.style.opacity = '0';
  171. input.style.width = '0';
  172. input.style.height = '0';
  173. input.checked = getStorage(name) === 'true';
  174.  
  175. let slider = document.createElement('span');
  176. slider.style.position = 'absolute';
  177. slider.style.cursor = 'pointer';
  178. slider.style.top = '0';
  179. slider.style.left = '0';
  180. slider.style.right = '0';
  181. slider.style.bottom = '0';
  182. slider.style.backgroundColor = input.checked ? '#4CAF50' : '#ccc';
  183. slider.style.transition = '.4s';
  184. slider.style.borderRadius = '18px';
  185.  
  186. let circle = document.createElement('span');
  187. circle.style.position = 'absolute';
  188. circle.style.height = '14px';
  189. circle.style.width = '14px';
  190. circle.style.left = '2px';
  191. circle.style.bottom = '2px';
  192. circle.style.backgroundColor = 'white';
  193. circle.style.borderRadius = '50%';
  194. circle.style.transition = '.4s';
  195. circle.style.transform = input.checked ? 'translateX(16px)' : 'translateX(0)';
  196.  
  197. slider.appendChild(circle);
  198. switchContainer.appendChild(input);
  199. switchContainer.appendChild(slider);
  200. container.appendChild(label);
  201. container.appendChild(switchContainer);
  202. content.appendChild(container);
  203.  
  204. input.addEventListener('change', function () {
  205. slider.style.backgroundColor = this.checked ? '#4CAF50' : '#ccc';
  206. circle.style.transform = this.checked ? 'translateX(16px)' : 'translateX(0)';
  207. setStorage(name, this.checked);
  208. callback(this.checked);
  209. });
  210.  
  211. if (input.checked) {
  212. callback(true);
  213. }
  214. }
  215.  
  216. function createAutoClickerControls() {
  217. let container = document.createElement('div');
  218. container.style.width = '100%';
  219. container.style.marginTop = '10px';
  220. container.style.paddingTop = '10px';
  221. container.style.borderTop = '1px solid #333';
  222.  
  223. let title = document.createElement('h4');
  224. title.textContent = 'Auto Clicker';
  225. title.style.margin = '0 0 10px 0';
  226. title.style.color = 'white';
  227. title.style.textAlign = 'center';
  228. container.appendChild(title);
  229.  
  230. let leftClickContainer = document.createElement('div');
  231. leftClickContainer.style.display = 'flex';
  232. leftClickContainer.style.justifyContent = 'space-between';
  233. leftClickContainer.style.alignItems = 'center';
  234. leftClickContainer.style.width = '100%';
  235. leftClickContainer.style.marginBottom = '5px';
  236.  
  237. let leftClickLabel = document.createElement('span');
  238. leftClickLabel.textContent = 'Left Click';
  239. leftClickLabel.style.flexGrow = '1';
  240.  
  241. let leftClickToggle = document.createElement('button');
  242. leftClickToggle.textContent = leftClickActive ? 'ON' : 'OFF';
  243. leftClickToggle.style.background = leftClickActive ? '#4CAF50' : '#ccc';
  244. leftClickToggle.style.color = 'white';
  245. leftClickToggle.style.border = 'none';
  246. leftClickToggle.style.padding = '3px 10px';
  247. leftClickToggle.style.borderRadius = '3px';
  248. leftClickToggle.style.cursor = 'pointer';
  249.  
  250. leftClickToggle.addEventListener('click', function() {
  251. toggleLeftClick();
  252. leftClickToggle.textContent = leftClickActive ? 'ON' : 'OFF';
  253. leftClickToggle.style.background = leftClickActive ? '#4CAF50' : '#ccc';
  254. });
  255.  
  256. leftClickContainer.appendChild(leftClickLabel);
  257. leftClickContainer.appendChild(leftClickToggle);
  258. container.appendChild(leftClickContainer);
  259.  
  260. let rightClickContainer = document.createElement('div');
  261. rightClickContainer.style.display = 'flex';
  262. rightClickContainer.style.justifyContent = 'space-between';
  263. rightClickContainer.style.alignItems = 'center';
  264. rightClickContainer.style.width = '100%';
  265. rightClickContainer.style.marginBottom = '5px';
  266.  
  267. let rightClickLabel = document.createElement('span');
  268. rightClickLabel.textContent = 'Right Click';
  269. rightClickLabel.style.flexGrow = '1';
  270.  
  271. let rightClickToggle = document.createElement('button');
  272. rightClickToggle.textContent = rightClickActive ? 'ON' : 'OFF';
  273. rightClickToggle.style.background = rightClickActive ? '#4CAF50' : '#ccc';
  274. rightClickToggle.style.color = 'white';
  275. rightClickToggle.style.border = 'none';
  276. rightClickToggle.style.padding = '3px 10px';
  277. rightClickToggle.style.borderRadius = '3px';
  278. rightClickToggle.style.cursor = 'pointer';
  279.  
  280. rightClickToggle.addEventListener('click', function() {
  281. toggleRightClick();
  282. rightClickToggle.textContent = rightClickActive ? 'ON' : 'OFF';
  283. rightClickToggle.style.background = rightClickActive ? '#4CAF50' : '#ccc';
  284. });
  285.  
  286. rightClickContainer.appendChild(rightClickLabel);
  287. rightClickContainer.appendChild(rightClickToggle);
  288. container.appendChild(rightClickContainer);
  289.  
  290. let cpsContainer = document.createElement('div');
  291. cpsContainer.style.display = 'flex';
  292. cpsContainer.style.flexDirection = 'column';
  293. cpsContainer.style.width = '100%';
  294. cpsContainer.style.marginTop = '10px';
  295.  
  296. let minCPSControl = document.createElement('div');
  297. minCPSControl.style.display = 'flex';
  298. minCPSControl.style.justifyContent = 'space-between';
  299. minCPSControl.style.alignItems = 'center';
  300. minCPSControl.style.width = '100%';
  301. minCPSControl.style.marginBottom = '5px';
  302.  
  303. let minCPSLabel = document.createElement('span');
  304. minCPSLabel.textContent = 'Min CPS:';
  305. minCPSLabel.style.flexGrow = '1';
  306.  
  307. let minCPSInput = document.createElement('input');
  308. minCPSInput.type = 'number';
  309. minCPSInput.value = minCPS;
  310. minCPSInput.min = '1';
  311. minCPSInput.max = '50';
  312. minCPSInput.style.width = '50px';
  313. minCPSInput.style.padding = '2px';
  314.  
  315. minCPSInput.addEventListener('change', function() {
  316. minCPS = parseInt(this.value);
  317. });
  318.  
  319. minCPSControl.appendChild(minCPSLabel);
  320. minCPSControl.appendChild(minCPSInput);
  321. cpsContainer.appendChild(minCPSControl);
  322.  
  323. let maxCPSControl = document.createElement('div');
  324. maxCPSControl.style.display = 'flex';
  325. maxCPSControl.style.justifyContent = 'space-between';
  326. maxCPSControl.style.alignItems = 'center';
  327. maxCPSControl.style.width = '100%';
  328. maxCPSControl.style.marginBottom = '5px';
  329.  
  330. let maxCPSLabel = document.createElement('span');
  331. maxCPSLabel.textContent = 'Max CPS:';
  332. maxCPSLabel.style.flexGrow = '1';
  333.  
  334. let maxCPSInput = document.createElement('input');
  335. maxCPSInput.type = 'number';
  336. maxCPSInput.value = maxCPS;
  337. maxCPSInput.min = '1';
  338. maxCPSInput.max = '50';
  339. maxCPSInput.style.width = '50px';
  340. maxCPSInput.style.padding = '2px';
  341.  
  342. maxCPSInput.addEventListener('change', function() {
  343. maxCPS = parseInt(this.value);
  344. });
  345.  
  346. maxCPSControl.appendChild(maxCPSLabel);
  347. maxCPSControl.appendChild(maxCPSInput);
  348. cpsContainer.appendChild(maxCPSControl);
  349.  
  350. container.appendChild(cpsContainer);
  351.  
  352. let keybindContainer = document.createElement('div');
  353. keybindContainer.style.display = 'flex';
  354. keybindContainer.style.flexDirection = 'column';
  355. keybindContainer.style.width = '100%';
  356. keybindContainer.style.marginTop = '10px';
  357.  
  358. let leftKeyControl = document.createElement('div');
  359. leftKeyControl.style.display = 'flex';
  360. leftKeyControl.style.justifyContent = 'space-between';
  361. leftKeyControl.style.alignItems = 'center';
  362. leftKeyControl.style.width = '100%';
  363. leftKeyControl.style.marginBottom = '5px';
  364.  
  365. let leftKeyLabel = document.createElement('span');
  366. leftKeyLabel.textContent = 'Left Key:';
  367. leftKeyLabel.style.flexGrow = '1';
  368.  
  369. let leftKeyInput = document.createElement('input');
  370. leftKeyInput.type = 'text';
  371. leftKeyInput.value = clickerConfig.leftClickKey;
  372. leftKeyInput.style.width = '50px';
  373. leftKeyInput.style.padding = '2px';
  374.  
  375. leftKeyControl.appendChild(leftKeyLabel);
  376. leftKeyControl.appendChild(leftKeyInput);
  377. keybindContainer.appendChild(leftKeyControl);
  378.  
  379. let rightKeyControl = document.createElement('div');
  380. rightKeyControl.style.display = 'flex';
  381. rightKeyControl.style.justifyContent = 'space-between';
  382. rightKeyControl.style.alignItems = 'center';
  383. rightKeyControl.style.width = '100%';
  384. rightKeyControl.style.marginBottom = '5px';
  385.  
  386. let rightKeyLabel = document.createElement('span');
  387. rightKeyLabel.textContent = 'Right Key:';
  388. rightKeyLabel.style.flexGrow = '1';
  389.  
  390. let rightKeyInput = document.createElement('input');
  391. rightKeyInput.type = 'text';
  392. rightKeyInput.value = clickerConfig.rightClickKey;
  393. rightKeyInput.style.width = '50px';
  394. rightKeyInput.style.padding = '2px';
  395.  
  396. rightKeyControl.appendChild(rightKeyLabel);
  397. rightKeyControl.appendChild(rightKeyInput);
  398. keybindContainer.appendChild(rightKeyControl);
  399.  
  400. let saveButton = document.createElement('button');
  401. saveButton.textContent = 'Save Keybinds';
  402. saveButton.style.width = '100%';
  403. saveButton.style.padding = '5px';
  404. saveButton.style.marginTop = '5px';
  405. saveButton.style.background = '#4CAF50';
  406. saveButton.style.color = 'white';
  407. saveButton.style.border = 'none';
  408. saveButton.style.borderRadius = '3px';
  409. saveButton.style.cursor = 'pointer';
  410.  
  411. saveButton.addEventListener('click', function() {
  412. clickerConfig.leftClickKey = leftKeyInput.value;
  413. clickerConfig.rightClickKey = rightKeyInput.value;
  414. saveClickerConfig();
  415. alert('Keybinds saved!');
  416. });
  417.  
  418. keybindContainer.appendChild(saveButton);
  419. container.appendChild(keybindContainer);
  420.  
  421. content.appendChild(container);
  422. }
  423.  
  424. let isDragging = false;
  425. let offsetX, offsetY;
  426.  
  427. titleBar.addEventListener('mousedown', function (event) {
  428. isDragging = true;
  429. offsetX = event.clientX - menu.getBoundingClientRect().left;
  430. offsetY = event.clientY - menu.getBoundingClientRect().top;
  431. titleBar.style.cursor = 'grabbing';
  432. });
  433.  
  434. document.addEventListener('mousemove', function (event) {
  435. if (isDragging) {
  436. let left = event.clientX - offsetX;
  437. let top = event.clientY - offsetY;
  438. menu.style.left = `${left}px`;
  439. menu.style.top = `${top}px`;
  440. setStorage('menuLeft', left);
  441. setStorage('menuTop', top);
  442. }
  443. });
  444.  
  445. document.addEventListener('mouseup', function () {
  446. isDragging = false;
  447. titleBar.style.cursor = 'move';
  448. });
  449.  
  450. createSwitch('Full Screen Bypass', function (enabled) {
  451. if (enabled) {
  452. if (!window.fullScreenBypassInterval) {
  453. window.fullScreenBypassInterval = setInterval(function () {
  454. let elementToDelete = document.querySelector('.ForceRotateBackground.FullyFancyText');
  455. if (elementToDelete) {
  456. elementToDelete.remove();
  457. }
  458. }, 100);
  459. }
  460. } else {
  461. clearInterval(window.fullScreenBypassInterval);
  462. window.fullScreenBypassInterval = null;
  463. }
  464. });
  465.  
  466. createSwitch('Bunny Jump', function (enabled) {
  467. if (enabled) {
  468. if (!window.infiniteJumpInterval) {
  469. window.infiniteJumpInterval = setInterval(function () {
  470. let event = new KeyboardEvent('keydown', {
  471. key: ' ',
  472. code: 'Space',
  473. keyCode: 32,
  474. which: 32,
  475. bubbles: true
  476. });
  477. document.dispatchEvent(event);
  478. }, 100);
  479. }
  480. } else {
  481. clearInterval(window.infiniteJumpInterval);
  482. window.infiniteJumpInterval = null;
  483. }
  484. });
  485.  
  486. createSwitch('Add Remover', function (enabled) {
  487. if (enabled) {
  488. function hideAds() {
  489. var elementsToHide = document.querySelectorAll(
  490. '#gameadsbanner, .AdContainer, #cmpbox, .CookieConsent, [id*="fc-"], [class*="fc-"]'
  491. );
  492.  
  493. elementsToHide.forEach(function(element) {
  494. if (element) {
  495. element.style.opacity = '0';
  496. element.style.width = '0';
  497. element.style.height = '0';
  498. element.style.overflow = 'hidden';
  499. element.style.position = 'absolute';
  500. }
  501. });
  502.  
  503. console.log("🚀 Add removed!");
  504. }
  505.  
  506. setInterval(hideAds, 2000);
  507. }
  508. });
  509.  
  510. createSwitch('Custom Crosshair', function (enabled) {
  511. if (enabled) {
  512. let crosshairUrl = prompt("Ingrese la URL de la imagen para la Crosshair:", getStorage('crosshairURL') || '');
  513. if (crosshairUrl) {
  514. setStorage('crosshairURL', crosshairUrl);
  515. applyCrosshair(crosshairUrl);
  516. }
  517. } else {
  518. applyCrosshair(null);
  519. }
  520. });
  521.  
  522. let isLMBCounterEnabled = false;
  523. let isRMBCounterEnabled = false;
  524.  
  525. createSwitch('Enable LMB CPS Counter', function (enabled) {
  526. isLMBCounterEnabled = enabled;
  527. });
  528.  
  529. createSwitch('Enable RMB CPS Counter', function (enabled) {
  530. isRMBCounterEnabled = enabled;
  531. });
  532.  
  533. let LMBclickTimes = [];
  534. let RMBclickTimes = [];
  535. document.addEventListener('mousedown', function (event) {
  536. if (event.button === 0 && isLMBCounterEnabled) {
  537. LMBcountClick();
  538. } else if (event.button === 2 && isRMBCounterEnabled) {
  539. RMBcountClick();
  540. }
  541. });
  542.  
  543. function LMBcountClick() {
  544. var LMBcurrentTime = new Date().getTime();
  545. LMBclickTimes.push(LMBcurrentTime);
  546. LMBupdateCPS();
  547. if (new Date().getTime() - LMBcurrentTime >= 1000) {
  548. LMBValue.textContent = '0';
  549. }
  550. }
  551.  
  552. function RMBcountClick() {
  553. var RMBcurrentTime = new Date().getTime();
  554. RMBclickTimes.push(RMBcurrentTime);
  555. RMBupdateCPS();
  556. if (new Date().getTime() - RMBcurrentTime >= 1000) {
  557. RMBValue.textContent = '0';
  558. }
  559. }
  560.  
  561. function LMBupdateCPS() {
  562. var currentTime = new Date().getTime();
  563. var oneSecondAgo = currentTime - 1000;
  564. var LMBcount = 0;
  565.  
  566. for (var i = LMBclickTimes.length - 1; i >= 0; i--) {
  567. if (LMBclickTimes[i] >= oneSecondAgo) {
  568. LMBcount++;
  569. } else {
  570. break;
  571. }
  572. }
  573.  
  574. LMBValue.textContent = LMBcount;
  575. }
  576.  
  577. function RMBupdateCPS() {
  578. var currentTime = new Date().getTime();
  579. var oneSecondAgo = currentTime - 1000;
  580. var RMBcount = 0;
  581.  
  582. for (var i = RMBclickTimes.length - 1; i >= 0; i--) {
  583. if (RMBclickTimes[i] >= oneSecondAgo) {
  584. RMBcount++;
  585. } else {
  586. break;
  587. }
  588. }
  589.  
  590. RMBValue.textContent = RMBcount;
  591. }
  592.  
  593. var cpsButton = document.createElement('div');
  594. cpsButton.style.position = 'fixed';
  595. cpsButton.style.top = '10px';
  596. cpsButton.style.left = '745px';
  597. cpsButton.style.backgroundColor = 'black';
  598. cpsButton.style.color = 'white';
  599. cpsButton.style.padding = '5px';
  600. cpsButton.style.fontFamily = 'Arial';
  601. cpsButton.style.fontSize = '20px';
  602. cpsButton.style.zIndex = '9999';
  603. cpsButton.textContent = '';
  604.  
  605. var LMBValue = document.createElement('span');
  606. LMBValue.textContent = '0';
  607. var cpsLabel = document.createElement('span');
  608. cpsLabel.textContent = ' | ';
  609. var RMBValue = document.createElement('span');
  610. RMBValue.textContent = '0';
  611.  
  612. cpsButton.appendChild(LMBValue);
  613. cpsButton.appendChild(cpsLabel);
  614. cpsButton.appendChild(RMBValue);
  615. document.body.appendChild(cpsButton);
  616.  
  617. function applyCrosshair(url) {
  618. let crosshair = document.querySelector('.CrossHair');
  619. if (crosshair) {
  620. crosshair.textContent = "";
  621. if (url) {
  622. crosshair.style.backgroundImage = `url(${url})`;
  623. crosshair.style.backgroundRepeat = "no-repeat";
  624. crosshair.style.backgroundSize = "contain";
  625. crosshair.style.width = "50px";
  626. crosshair.style.height = "50px";
  627. } else {
  628. crosshair.style.backgroundImage = "";
  629. }
  630. }
  631. }
  632.  
  633. let savedCrosshair = getStorage('crosshairURL');
  634. if (savedCrosshair) {
  635. applyCrosshair(savedCrosshair);
  636. }
  637.  
  638. let reloadContainer = document.createElement('div');
  639. reloadContainer.style.display = 'flex';
  640. reloadContainer.style.flexDirection = 'column';
  641. reloadContainer.style.alignItems = 'center';
  642. reloadContainer.style.width = '100%';
  643. reloadContainer.style.marginBottom = '5px';
  644.  
  645. let reloadLabel = document.createElement('span');
  646. reloadLabel.textContent = 'Account Generator';
  647. reloadLabel.style.flexGrow = '1';
  648. reloadLabel.style.textAlign = 'center';
  649.  
  650. let reloadButtonContainer = document.createElement('label');
  651. reloadButtonContainer.style.position = 'relative';
  652. reloadButtonContainer.style.display = 'inline-block';
  653. reloadButtonContainer.style.width = 'auto';
  654.  
  655. let reloadButton = document.createElement('button');
  656. reloadButton.textContent = 'Account Gen';
  657. reloadButton.style.backgroundColor = '#4CAF50';
  658. reloadButton.style.color = 'white';
  659. reloadButton.style.border = 'none';
  660. reloadButton.style.padding = '5px 10px';
  661. reloadButton.style.marginTop = '10px';
  662. reloadButton.style.cursor = 'pointer';
  663. reloadButton.style.borderRadius = '5px';
  664. reloadButton.disabled = true;
  665.  
  666. reloadButton.addEventListener('click', function () {
  667. location.reload();
  668. var cookies = document.cookie.split(";");
  669. for (var _i = 0, cookies_1 = cookies; _i < cookies_1.length; _i++) {
  670. var cookie = cookies_1[_i];
  671. var eqPos = cookie.indexOf("=");
  672. var name_1 = eqPos > -1 ? cookie.substr(0, eqPos) : cookie;
  673. document.cookie = name_1 + "=;expires=Thu, 01 Jan 1970 00:00:00 GMT;path=/";
  674. }
  675. });
  676.  
  677. reloadButtonContainer.appendChild(reloadButton);
  678. reloadContainer.appendChild(reloadLabel);
  679. reloadContainer.appendChild(reloadButtonContainer);
  680. content.appendChild(reloadContainer);
  681.  
  682. setTimeout(function () {
  683. reloadButton.disabled = false;
  684. }, 3000);
  685.  
  686. createAutoClickerControls();
  687. }
  688.  
  689. document.addEventListener("keydown", (event) => {
  690. if (event.repeat || ["INPUT", "TEXTAREA"].includes(event.target.tagName) || event.target.isContentEditable) return;
  691. if (event.code === clickerConfig.leftClickKey) toggleLeftClick();
  692. if (event.code === clickerConfig.rightClickKey) toggleRightClick();
  693. });
  694.  
  695. if (document.readyState === 'loading') {
  696. document.addEventListener('DOMContentLoaded', createMenu);
  697. } else {
  698. createMenu();
  699. }
  700. })();