Bloxd.io Mod Menu | Made by iron web10

Mod menu for Bloxd.io

当前为 2025-03-19 提交的版本,查看 最新版本

  1. // ==UserScript==
  2. // @name Bloxd.io Mod Menu | Made by iron web10
  3. // @namespace http://tampermonkey.net/
  4. // @version 0.2
  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. function createMenu() {
  25. if (document.getElementById('modMenu')) return;
  26.  
  27. let menu = document.createElement('div');
  28. menu.id = 'modMenu';
  29. menu.style.position = 'fixed';
  30. menu.style.top = getStorage('menuTop') || '50px';
  31. menu.style.left = getStorage('menuLeft') || '50px';
  32. menu.style.width = '200px';
  33. menu.style.background = 'rgba(0, 0, 0, 0.9)';
  34. menu.style.color = 'white';
  35. menu.style.padding = '15px';
  36. menu.style.borderRadius = '10px';
  37. menu.style.zIndex = '9999';
  38. menu.style.fontFamily = 'Arial';
  39. menu.style.boxShadow = '0 0 10px rgba(255, 255, 255, 0.2)';
  40. menu.style.display = getStorage('menuMinimized') === 'true' ? 'none' : 'flex';
  41. menu.style.flexDirection = 'column';
  42. menu.style.alignItems = 'center';
  43.  
  44. let titleBar = document.createElement('div');
  45. titleBar.style.display = 'flex';
  46. titleBar.style.justifyContent = 'space-between';
  47. titleBar.style.alignItems = 'center';
  48. titleBar.style.cursor = 'move';
  49. titleBar.style.width = '100%';
  50. titleBar.style.padding = '5px';
  51. titleBar.style.background = '#333';
  52. titleBar.style.borderRadius = '5px';
  53.  
  54. let title = document.createElement('h3');
  55. title.textContent = 'Bloxd.io Mod Menu';
  56. title.style.margin = '0';
  57. title.style.flexGrow = '1';
  58. title.style.color = 'white';
  59.  
  60. let minimizeButton = document.createElement('button');
  61. minimizeButton.textContent = '-';
  62. minimizeButton.style.background = 'transparent';
  63. minimizeButton.style.color = 'white';
  64. minimizeButton.style.border = 'none';
  65. minimizeButton.style.cursor = 'pointer';
  66.  
  67. titleBar.appendChild(title);
  68. titleBar.appendChild(minimizeButton);
  69. menu.appendChild(titleBar);
  70.  
  71. let content = document.createElement('div');
  72. content.style.display = getStorage('menuMinimized') === 'true' ? 'none' : 'block';
  73. menu.appendChild(content);
  74.  
  75. document.body.appendChild(menu);
  76.  
  77. minimizeButton.addEventListener('click', function () {
  78. let isHidden = content.style.display === 'none';
  79. content.style.display = isHidden ? 'block' : 'none';
  80. setStorage('menuMinimized', !isHidden);
  81. });
  82.  
  83. function createSwitch(name, callback) {
  84. let container = document.createElement('div');
  85. container.style.display = 'flex';
  86. container.style.justifyContent = 'space-between';
  87. container.style.alignItems = 'center';
  88. container.style.width = '100%';
  89. container.style.marginBottom = '5px';
  90.  
  91. let label = document.createElement('span');
  92. label.textContent = name;
  93. label.style.flexGrow = '1';
  94.  
  95. let switchContainer = document.createElement('label');
  96. switchContainer.style.position = 'relative';
  97. switchContainer.style.display = 'inline-block';
  98. switchContainer.style.width = '34px';
  99. switchContainer.style.height = '18px';
  100.  
  101. let input = document.createElement('input');
  102. input.type = 'checkbox';
  103. input.style.opacity = '0';
  104. input.style.width = '0';
  105. input.style.height = '0';
  106. input.checked = getStorage(name) === 'true';
  107.  
  108. let slider = document.createElement('span');
  109. slider.style.position = 'absolute';
  110. slider.style.cursor = 'pointer';
  111. slider.style.top = '0';
  112. slider.style.left = '0';
  113. slider.style.right = '0';
  114. slider.style.bottom = '0';
  115. slider.style.backgroundColor = input.checked ? '#4CAF50' : '#ccc';
  116. slider.style.transition = '.4s';
  117. slider.style.borderRadius = '18px';
  118.  
  119. let circle = document.createElement('span');
  120. circle.style.position = 'absolute';
  121. circle.style.height = '14px';
  122. circle.style.width = '14px';
  123. circle.style.left = '2px';
  124. circle.style.bottom = '2px';
  125. circle.style.backgroundColor = 'white';
  126. circle.style.borderRadius = '50%';
  127. circle.style.transition = '.4s';
  128. circle.style.transform = input.checked ? 'translateX(16px)' : 'translateX(0)';
  129.  
  130. slider.appendChild(circle);
  131. switchContainer.appendChild(input);
  132. switchContainer.appendChild(slider);
  133. container.appendChild(label);
  134. container.appendChild(switchContainer);
  135. content.appendChild(container);
  136.  
  137. input.addEventListener('change', function () {
  138. slider.style.backgroundColor = this.checked ? '#4CAF50' : '#ccc';
  139. circle.style.transform = this.checked ? 'translateX(16px)' : 'translateX(0)';
  140. setStorage(name, this.checked);
  141. callback(this.checked);
  142. });
  143.  
  144. if (input.checked) {
  145. callback(true);
  146. }
  147. }
  148.  
  149. let isDragging = false;
  150. let offsetX, offsetY;
  151.  
  152. titleBar.addEventListener('mousedown', function (event) {
  153. isDragging = true;
  154. offsetX = event.clientX - menu.getBoundingClientRect().left;
  155. offsetY = event.clientY - menu.getBoundingClientRect().top;
  156. titleBar.style.cursor = 'grabbing';
  157. });
  158.  
  159. document.addEventListener('mousemove', function (event) {
  160. if (isDragging) {
  161. let left = event.clientX - offsetX;
  162. let top = event.clientY - offsetY;
  163. menu.style.left = `${left}px`;
  164. menu.style.top = `${top}px`;
  165. setStorage('menuLeft', left);
  166. setStorage('menuTop', top);
  167. }
  168. });
  169.  
  170. document.addEventListener('mouseup', function () {
  171. isDragging = false;
  172. titleBar.style.cursor = 'move';
  173. });
  174.  
  175. createSwitch('Full Screen Bypass', function (enabled) {
  176. if (enabled) {
  177. if (!window.fullScreenBypassInterval) {
  178. window.fullScreenBypassInterval = setInterval(function () {
  179. let elementToDelete = document.querySelector('.ForceRotateBackground.FullyFancyText');
  180. if (elementToDelete) {
  181. elementToDelete.remove();
  182. }
  183. }, 100);
  184. }
  185. } else {
  186. clearInterval(window.fullScreenBypassInterval);
  187. window.fullScreenBypassInterval = null;
  188. }
  189. });
  190.  
  191. createSwitch('Bunny Jump', function (enabled) {
  192. if (enabled) {
  193. if (!window.infiniteJumpInterval) {
  194. window.infiniteJumpInterval = setInterval(function () {
  195. let event = new KeyboardEvent('keydown', {
  196. key: ' ',
  197. code: 'Space',
  198. keyCode: 32,
  199. which: 32,
  200. bubbles: true
  201. });
  202. document.dispatchEvent(event);
  203. }, 100);
  204. }
  205. } else {
  206. clearInterval(window.infiniteJumpInterval);
  207. window.infiniteJumpInterval = null;
  208. }
  209. });
  210.  
  211. createSwitch('Add Remover', function (enabled) {
  212. if (enabled) {
  213. function hideAds() {
  214. var elementsToHide = document.querySelectorAll(
  215. '#gameadsbanner, .AdContainer, #cmpbox, .CookieConsent, [id*="fc-"], [class*="fc-"]'
  216. );
  217.  
  218. elementsToHide.forEach(function(element) {
  219. if (element) {
  220. element.style.opacity = '0';
  221. element.style.width = '0';
  222. element.style.height = '0';
  223. element.style.overflow = 'hidden';
  224. element.style.position = 'absolute';
  225. }
  226. });
  227.  
  228. console.log("🚀 Add removed!");
  229. }
  230.  
  231. setInterval(hideAds, 2000);
  232. }
  233. });
  234.  
  235. createSwitch('Custom Crosshair', function (enabled) {
  236. if (enabled) {
  237. let crosshairUrl = prompt("Ingrese la URL de la imagen para la Crosshair:", getStorage('crosshairURL') || '');
  238. if (crosshairUrl) {
  239. setStorage('crosshairURL', crosshairUrl);
  240. applyCrosshair(crosshairUrl);
  241. }
  242. } else {
  243. applyCrosshair(null);
  244. }
  245. });
  246. let isLMBCounterEnabled = false;
  247. let isRMBCounterEnabled = false;
  248.  
  249. createSwitch('Enable LMB CPS Counter', function (enabled) {
  250. isLMBCounterEnabled = enabled;
  251. });
  252.  
  253. createSwitch('Enable RMB CPS Counter', function (enabled) {
  254. isRMBCounterEnabled = enabled;
  255. });
  256.  
  257. let LMBclickTimes = [];
  258. let RMBclickTimes = [];
  259. document.addEventListener('mousedown', function (event) {
  260. if (event.button === 0 && isLMBCounterEnabled) {
  261. LMBcountClick();
  262. } else if (event.button === 2 && isRMBCounterEnabled) {
  263. RMBcountClick();
  264. }
  265. });
  266.  
  267. function LMBcountClick() {
  268. var LMBcurrentTime = new Date().getTime();
  269. LMBclickTimes.push(LMBcurrentTime);
  270. LMBupdateCPS();
  271. if (new Date().getTime() - LMBcurrentTime >= 1000) {
  272. LMBValue.textContent = '0';
  273. }
  274. }
  275.  
  276. function RMBcountClick() {
  277. var RMBcurrentTime = new Date().getTime();
  278. RMBclickTimes.push(RMBcurrentTime);
  279. RMBupdateCPS();
  280. if (new Date().getTime() - RMBcurrentTime >= 1000) {
  281. RMBValue.textContent = '0';
  282. }
  283. }
  284.  
  285. function LMBupdateCPS() {
  286. var currentTime = new Date().getTime();
  287. var oneSecondAgo = currentTime - 1000;
  288. var LMBcount = 0;
  289.  
  290. for (var i = LMBclickTimes.length - 1; i >= 0; i--) {
  291. if (LMBclickTimes[i] >= oneSecondAgo) {
  292. LMBcount++;
  293. } else {
  294. break;
  295. }
  296. }
  297.  
  298. LMBValue.textContent = LMBcount;
  299. }
  300.  
  301. function RMBupdateCPS() {
  302. var currentTime = new Date().getTime();
  303. var oneSecondAgo = currentTime - 1000;
  304. var RMBcount = 0;
  305.  
  306. for (var i = RMBclickTimes.length - 1; i >= 0; i--) {
  307. if (RMBclickTimes[i] >= oneSecondAgo) {
  308. RMBcount++;
  309. } else {
  310. break;
  311. }
  312. }
  313.  
  314. RMBValue.textContent = RMBcount;
  315. }
  316.  
  317. var cpsButton = document.createElement('div');
  318. cpsButton.style.position = 'fixed';
  319. cpsButton.style.top = '10px';
  320. cpsButton.style.left = '745px';
  321. cpsButton.style.backgroundColor = 'black';
  322. cpsButton.style.color = 'white';
  323. cpsButton.style.padding = '5px';
  324. cpsButton.style.fontFamily = 'Arial';
  325. cpsButton.style.fontSize = '20px';
  326. cpsButton.style.zIndex = '9999';
  327. cpsButton.textContent = '';
  328.  
  329. var LMBValue = document.createElement('span');
  330. LMBValue.textContent = '0';
  331. var cpsLabel = document.createElement('span');
  332. cpsLabel.textContent = ' | ';
  333. var RMBValue = document.createElement('span');
  334. RMBValue.textContent = '0';
  335.  
  336. cpsButton.appendChild(LMBValue);
  337. cpsButton.appendChild(cpsLabel);
  338. cpsButton.appendChild(RMBValue);
  339. document.body.appendChild(cpsButton);
  340.  
  341. function applyCrosshair(url) {
  342. let crosshair = document.querySelector('.CrossHair');
  343. if (crosshair) {
  344. crosshair.textContent = "";
  345. if (url) {
  346. crosshair.style.backgroundImage = `url(${url})`;
  347. crosshair.style.backgroundRepeat = "no-repeat";
  348. crosshair.style.backgroundSize = "contain";
  349. crosshair.style.width = "50px";
  350. crosshair.style.height = "50px";
  351. } else {
  352. crosshair.style.backgroundImage = "";
  353. }
  354. }
  355. }
  356.  
  357. let savedCrosshair = getStorage('crosshairURL');
  358. if (savedCrosshair) {
  359. applyCrosshair(savedCrosshair);
  360. }
  361.  
  362. let reloadContainer = document.createElement('div');
  363. reloadContainer.style.display = 'flex';
  364. reloadContainer.style.flexDirection = 'column';
  365. reloadContainer.style.alignItems = 'center';
  366. reloadContainer.style.width = '100%';
  367. reloadContainer.style.marginBottom = '5px';
  368.  
  369. let reloadLabel = document.createElement('span');
  370. reloadLabel.textContent = 'Account Generator';
  371. reloadLabel.style.flexGrow = '1';
  372. reloadLabel.style.textAlign = 'center';
  373.  
  374. let reloadButtonContainer = document.createElement('label');
  375. reloadButtonContainer.style.position = 'relative';
  376. reloadButtonContainer.style.display = 'inline-block';
  377. reloadButtonContainer.style.width = 'auto';
  378.  
  379. let reloadButton = document.createElement('button');
  380. reloadButton.textContent = 'Account Gen';
  381. reloadButton.style.backgroundColor = '#4CAF50';
  382. reloadButton.style.color = 'white';
  383. reloadButton.style.border = 'none';
  384. reloadButton.style.padding = '5px 10px';
  385. reloadButton.style.marginTop = '10px';
  386. reloadButton.style.cursor = 'pointer';
  387. reloadButton.style.borderRadius = '5px';
  388. reloadButton.disabled = true;
  389.  
  390. reloadButton.addEventListener('click', function () {
  391. location.reload();
  392. var cookies = document.cookie.split(";");
  393. for (var _i = 0, cookies_1 = cookies; _i < cookies_1.length; _i++) {
  394. var cookie = cookies_1[_i];
  395. var eqPos = cookie.indexOf("=");
  396. var name_1 = eqPos > -1 ? cookie.substr(0, eqPos) : cookie;
  397. document.cookie = name_1 + "=;expires=Thu, 01 Jan 1970 00:00:00 GMT;path=/";
  398. }
  399. });
  400.  
  401. reloadButtonContainer.appendChild(reloadButton);
  402. reloadContainer.appendChild(reloadLabel);
  403. reloadContainer.appendChild(reloadButtonContainer);
  404. content.appendChild(reloadContainer);
  405.  
  406. setTimeout(function () {
  407. reloadButton.disabled = false;
  408. }, 3000);
  409. }
  410.  
  411. if (document.readyState === 'loading') {
  412. document.addEventListener('DOMContentLoaded', createMenu);
  413. } else {
  414. createMenu();
  415. }
  416. })();