Lunar client

A Bloxd.io custom client.

  1. // ==UserScript==
  2. // @name Lunar client
  3. // @namespace http://tampermonkey.net/
  4. // @version 0.2
  5. // @description A Bloxd.io custom client.
  6. // @author Its_courruptedYT
  7. // @match https://bloxd.io/
  8. // @icon data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wCEAAoHCBIREREQERISEBEREBEPEhERERESERIPGBQZGRgUGRkcIS4lHB4rHxgZJjgmKzAxNTU1GiQ7QzszPy40NTEBDAwMEA8QGBERGDQhGB0xMTExMTExPzExNDE/NDQ0MTE0MTE0NDExPzE0MTExNDExNDQ/NDE0MTQxMTExMTExMf/AABEIAOEA4QMBIgACEQEDEQH/xAAcAAACAgMBAQAAAAAAAAAAAAAAAQIDBAYHBQj/xABKEAACAQMBBAUGCgcFCAMAAAABAgADBBESBQYhMRNBUWFxByIygZGzNEJSU2JydJPR0hQjJZKhorEVNVSUwSQzY4KD4ePwFkRW/8QAFgEBAQEAAAAAAAAAAAAAAAAAAAEC/8QAGxEBAQEAAwEBAAAAAAAAAAAAABEBEjFBIQL/2gAMAwEAAhEDEQA/AOR4hmRhNQp6oswhKCEISocIo5AQhCUEIR4gKEcMQFCPEMQCEeIoDhCEgIQhAIQhAI4hHAICEIBCEIFcIQgEJJGwQcA46jykYBCEIBCEcAjgJICUKGJICSAgQxDEsxHpkFeIYlmmGmBViGJYRIkSiEJLEWJAoRxQCEIQCOEIBCEIBCOECqEIQCEIQCPEMRgQpR4kgskFhEQJMCSCxhYCCxhZMLLETMCoLJBJ6ezdlVbh1p0qbVHbkiDJ8T2DvM6DsvyT12UNcVko5+Iimo4HeeAz4ZijlugaeR1Z59WnEgVnW9oeSRwCbe5RzjgtVCmT9Zc/0mgba2BXtH0XFNqbdRPFHHarDgRJVeCVkSsyHTErIlFRWIiTIkSIEcRSREiRAUIQiAzDMUIEswzFDMBwizCUQhJYhiZqwsQEeI8RSCMCMCSAikAEYWSCyxUihDJAGeAzgdmZNUlqUszZN3N1Lm+b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ghnCYGBjx6/ZGCQQQigjkemHP2yDO7AYNRDk5DPUORwwf6yB6T5bfvPLBZUumXmo4jPBgRjxEjUusHHBuRyrcOXhKjVdDxOSRzJbOM8ucj+lt/6z/jII1H1EnGMnOBIZg7liSeZkZkOEUcAhHCAQhCBTCAEejtkUoBZLgIFoUBIAiLMUJUi0A0jCUT1ntPtMNZ7T7TIRwifSHtPtMtpsvAtnUDnnw7uoygQzLRk9KfnD/PDpT84f55j5hLRkdKfnD/PDpD84fa8x44oyKjoctx1HjwJxq9kq1ntPtMhCSiWs9p9phrPafaYoYkqg98UeI4IUcI4IWIYksQghAR4hDMgMQhCFUlpHMMR4gKEliGIRGOSxDEpEcQxJYjxBEI5LEeIIhiPEliGIpEcQxJQgLEMRxwpQjxDEAhHCQEIQlBCGYi0CUJDVEWhKshmVZhmBZrhK4QEI4QkU4QhAcUISqccIQFCEJEEIQlBCEIDEcIQCEISBiKEIAZEwhLhqJiMISoIQhIYUYhCA4QhCv//Z
  9. // @grant none
  10. // @license GPLv3
  11. // ==/UserScript==
  12.  
  13. (function() {
  14. 'use strict';
  15.  
  16.  
  17. // Define Main Menu
  18. let clientMainMenu;
  19. clientMainMenu = document.createElement("div");
  20. clientMainMenu.textContent ="Lunar client";
  21. clientMainMenu.style.position = "fixed";
  22. clientMainMenu.style.color = "#ffffff";
  23. clientMainMenu.style.top = "50%";
  24. clientMainMenu.style.left = "50%";
  25. clientMainMenu.style.transform = "translate(-50%, -50%)";
  26. clientMainMenu.style.zIndex = "10000";
  27. clientMainMenu.style.borderRadius = "10px";
  28. clientMainMenu.style.backgroundImage = "url(https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcS7-wKwbIWcs1Pw92CfTZKoaimAav4AfRl27w&usqp=CAU)";
  29. clientMainMenu.style.backgroundRepeat = "no-repeat";
  30. clientMainMenu.style.backgroundSize = "cover";
  31. clientMainMenu.style.backgroundPosition = "center";
  32. clientMainMenu.style.boxShadow = "0px 0px 20px rgba(0, 0, 0, 0.5)";
  33. clientMainMenu.style.fontSize = "24px";
  34. clientMainMenu.style.height = "650px";
  35. clientMainMenu.style.width = "1200px";
  36. clientMainMenu.style.textAlign = "center";
  37. clientMainMenu.style.lineHeight = "50px";
  38. clientMainMenu.style.visibility = "hidden";
  39. clientMainMenu.style.opacity = "100%";
  40. clientMainMenu.style.userSelect = "none";
  41.  
  42.  
  43. // Define Button Elements
  44. let wkey;
  45. wkey = document.createElement('div');
  46. wkey.style.position = "relative";
  47. wkey.style.color = "#ffffff";
  48. wkey.textContent = "W";
  49. wkey.style.top = "0px";
  50. wkey.style.left = "0px";
  51. wkey.style.zIndex = "10000";
  52. wkey.style.fontWeight = "bold";
  53. wkey.style.borderRadius = "10px";
  54. wkey.style.backgroundColor = "#66ccff";
  55. wkey.style.fontSize = "48px";
  56. wkey.style.height = "50px";
  57. wkey.style.width = "50px";
  58. wkey.style.textAlign = "center";
  59. wkey.style.lineHeight = "50px";
  60. wkey.style.filter = "blur(1px)";
  61.  
  62.  
  63. let skey;
  64. skey = document.createElement('div');
  65. skey.style.position = "relative";
  66. skey.style.color = "#ffffff";
  67. skey.textContent = "S";
  68. skey.style.top = "5px";
  69. skey.style.left = "50%";
  70. skey.style.transform = "translateX(-50%)";
  71. skey.style.zIndex = "10000";
  72. skey.style.fontWeight = "bold";
  73. skey.style.borderRadius = "10px";
  74. skey.style.backgroundColor = "#66ccff";
  75. skey.style.fontSize = "24px";
  76. skey.style.height = "50px";
  77. skey.style.width = "50px";
  78. skey.style.textAlign = "center";
  79. skey.style.lineHeight = "50px";
  80. skey.style.filter = "blur(1px)";
  81.  
  82. let akey;
  83. akey = document.createElement('div');
  84. akey.style.position = "relative";
  85. akey.style.color = "#ffffff";
  86. akey.textContent = "A";
  87. akey.style.top = "60px";
  88. akey.style.left = "46.3%";
  89. akey.style.transform = "translateX(-50%)";
  90. akey.style.zIndex = "10000";
  91. akey.style.fontWeight = "bold";
  92. akey.style.borderRadius = "10px";
  93. akey.style.backgroundColor = "#66ccff";
  94. akey.style.fontSize = "24px";
  95. akey.style.height = "50px";
  96. akey.style.width = "50px";
  97. akey.style.textAlign = "center";
  98. akey.style.lineHeight = "50px";
  99. akey.style.filter = "blur(1px)";
  100.  
  101. let dkey;
  102. dkey = document.createElement('div');
  103. dkey.style.position = "relative";
  104. dkey.style.color = "#ffffff";
  105. dkey.textContent = "D";
  106. dkey.style.top = "60px";
  107. dkey.style.left = "53.7%";
  108. dkey.style.transform = "translateX(-50%)";
  109. dkey.style.zIndex = "10000";
  110. dkey.style.fontWeight = "bold";
  111. dkey.style.borderRadius = "10px";
  112. dkey.style.backgroundColor = "#66ccff";
  113. dkey.style.fontSize = "24px";
  114. dkey.style.height = "50px";
  115. dkey.style.width = "50px";
  116. dkey.style.textAlign = "center";
  117. dkey.style.lineHeight = "50px";
  118. dkey.style.filter = "blur(1px)";
  119.  
  120. let lmb;
  121. lmb = document.createElement('div');
  122. lmb.style.position = "relative";
  123. lmb.style.color = "#ffffff";
  124. lmb.textContent = "LMB";
  125. lmb.style.top = "115px";
  126. lmb.style.left = "50%";
  127. lmb.style.transform = "translateX(-50%)";
  128. lmb.style.zIndex = "10000";
  129. lmb.style.fontWeight = "bold";
  130. lmb.style.borderRadius = "10px";
  131. lmb.style.backgroundColor = "#66ccff";
  132. lmb.style.fontSize = "18px";
  133. lmb.style.height = "50px";
  134. lmb.style.width = "50px";
  135. lmb.style.textAlign = "center";
  136. lmb.style.lineHeight = "50px";
  137. lmb.style.filter = "blur(1px)";
  138.  
  139. let rmb;
  140. rmb = document.createElement('div');
  141. rmb.style.position = "relative";
  142. rmb.style.color = "#ffffff";
  143. rmb.textContent = "RMB";
  144. rmb.style.top = "115px";
  145. rmb.style.left = "53.7%";
  146. rmb.style.transform = "translateX(-50%)";
  147. rmb.style.zIndex = "10000";
  148. rmb.style.fontWeight = "bold";
  149. rmb.style.borderRadius = "10px";
  150. rmb.style.backgroundColor = "#66ccff";
  151. rmb.style.fontSize = "18px";
  152. rmb.style.height = "50px";
  153. rmb.style.width = "50px";
  154. rmb.style.textAlign = "center";
  155. rmb.style.lineHeight = "50px";
  156. rmb.style.filter = "blur(1px)";
  157.  
  158. // Add the elements to the body and the clientMainMenu
  159. //document.body.appendChild(wkey);
  160. //document.body.appendChild(skey);
  161. //document.body.appendChild(akey);
  162. //document.body.appendChild(dkey);
  163. //document.body.appendChild(lmb);
  164. //document.body.appendChild(rmb);
  165. document.body.appendChild(clientMainMenu);
  166.  
  167. // Add Event Listeners for the Keybinds
  168.  
  169. document.addEventListener('keydown', function(event) {
  170. if (event.key === 'w') {
  171. wkey.style.backgroundColor = "#3366ff";
  172. }
  173. if (event.key === 's') {
  174. skey.style.backgroundColor = "#3366ff";
  175. }
  176. if (event.key === 'a') {
  177. akey.style.backgroundColor = "#3366ff";
  178. }
  179. if (event.key === 'd') {
  180. dkey.style.backgroundColor = "#3366ff";
  181. }
  182. });
  183.  
  184. document.addEventListener('keyup', function(event) {
  185. if (event.key === 'w') {
  186. wkey.style.backgroundColor = "#66ccff";
  187. }
  188. if (event.key === 's') {
  189. skey.style.backgroundColor = "#66ccff";
  190. }
  191. if (event.key === 'a') {
  192. akey.style.backgroundColor = "#66ccff";
  193. }
  194. if (event.key === 'd') {
  195. dkey.style.backgroundColor = "#66ccff";
  196. }
  197. });
  198.  
  199. document.addEventListener('mousedown', function(event) {
  200. if (event.button === 0) {
  201. lmb.style.backgroundColor = "#3366ff";
  202. }
  203. if (event.button === 2) {
  204. rmb.style.backgroundColor = "#3366ff";
  205. }
  206. });
  207.  
  208. document.addEventListener('mouseup', function(event) {
  209. if (event.button === 0) {
  210. lmb.style.backgroundColor = "#66ccff";
  211. }
  212. if (event.button === 2) {
  213. rmb.style.backgroundColor = "#66ccff";
  214. }
  215. });
  216.  
  217. // Define Main Menu dragging
  218.  
  219. let isDragging = false;
  220. let offsetX = 0;
  221. let offsetY = 0;
  222.  
  223. clientMainMenu.addEventListener('mousedown', function(event) {
  224. if (event.target.nodeName !== 'INPUT') {
  225. isDragging = false;
  226. offsetX = event.clientX;
  227. offsetY = event.clientY;
  228. }
  229. });
  230.  
  231. document.addEventListener('mousemove', function(event) {
  232. if (isDragging) {
  233. const left = event.clientX;
  234. const top = event.clientY;
  235.  
  236. clientMainMenu.style.left = left + "px";
  237. clientMainMenu.style.top = top + "px";
  238. }
  239. });
  240.  
  241. document.addEventListener('mouseup', function() {
  242. isDragging = false;
  243. });
  244.  
  245. document.addEventListener('keydown', function(event) {
  246. if (event.key === 'L' || event.key === 'l') {
  247. clientMainMenu.style.visibility = clientMainMenu.style.visibility === "hidden" ? "visible" : "hidden";
  248. }
  249. });
  250.  
  251. // Define imputs and main menu text
  252.  
  253. let clientheader
  254. clientheader = document.createElement("div");
  255. clientheader.textContent = "Made By Its_courruptedYT";
  256. clientheader.style.position = "absolute";
  257. clientheader.style.top = "20px";
  258. clientheader.style.left = "50%";
  259. clientheader.style.transform = "translateX(-50%)";
  260. clientheader.style.fontSize = "15px";
  261. clientMainMenu.appendChild(clientheader);
  262.  
  263. // Create the button element
  264. const discordbutton = document.createElement("div");
  265. discordbutton.style.position = "absolute";
  266. discordbutton.style.top = "60px";
  267. discordbutton.style.left = "50%";
  268. discordbutton.style.transform = "translateX(-50%)";
  269. discordbutton.style.cursor = "crosshair";
  270. discordbutton.style.backgroundColor = "#3e473f";
  271. discordbutton.style.color = "#000000";
  272. discordbutton.style.borderRadius = "10px";
  273. discordbutton.style.height = "25px";
  274. discordbutton.style.padding = "8px";
  275. discordbutton.addEventListener("click", function() {
  276. window.location.href = "https://discord.gg/tJJasV2SHe";
  277. });
  278.  
  279. // Create the text element
  280. const discordButtonText = document.createElement("div");
  281. discordButtonText.textContent = "Join The Discord Server";
  282. discordButtonText.style.fontSize = "15px";
  283. discordButtonText.style.textAlign = "center";
  284. discordButtonText.style.top = "50%";
  285. discordButtonText.style.transform = "translateY(-25%)";
  286.  
  287. // Append the text element to the button element
  288. discordbutton.appendChild(discordButtonText);
  289.  
  290. // Append the button element to the desired parent element
  291. clientMainMenu.appendChild(discordbutton);
  292.  
  293.  
  294. let clientsettingstext;
  295. clientsettingstext = document.createElement("div");
  296. clientsettingstext.textContent = "- Client Settings -";
  297. clientsettingstext.style.position = "absolute";
  298. clientsettingstext.style.top = "150px";
  299. clientsettingstext.style.left = "50%";
  300. clientsettingstext.style.transform = "translateX(-50%)";
  301. clientsettingstext.style.fontSize = "20px";
  302. clientMainMenu.appendChild(clientsettingstext);
  303.  
  304. let clientsettingsinput
  305. clientsettingsinput = document.createElement("input");
  306. clientsettingsinput.type = "text";
  307. clientsettingsinput.placeholder = "client background url";
  308. clientsettingsinput.style.position = "absolute";
  309. clientsettingsinput.style.top = "160px";
  310. clientsettingsinput.style.left = "50%";
  311. clientsettingsinput.style.transform = "translateX(-50%)";
  312. clientMainMenu.appendChild(clientsettingsinput);
  313.  
  314. clientsettingsinput.addEventListener('input', function() {
  315. clientMainMenu.style.backgroundImage = `url(${clientsettingsinput.value})`;
  316. });
  317.  
  318. clientsettingsinput.addEventListener('mousedown', function(event) {
  319. event.stopPropagation();
  320. });
  321.  
  322. let hotbarsettingstext;
  323. hotbarsettingstext = document.createElement("div");
  324. hotbarsettingstext.textContent = "- HotBar Settings -";
  325. hotbarsettingstext.style.position = "absolute";
  326. hotbarsettingstext.style.top = "220px";
  327. hotbarsettingstext.style.left = "50%";
  328. hotbarsettingstext.style.transform = "translateX(-50%)";
  329. hotbarsettingstext.style.fontSize = "20px";
  330. clientMainMenu.appendChild(hotbarsettingstext);
  331.  
  332. let hotbarmaincolorinput
  333. hotbarmaincolorinput = document.createElement("input");
  334. hotbarmaincolorinput.type = "color";
  335. hotbarmaincolorinput.value = "#3d4b79"
  336. hotbarmaincolorinput.style.top = "250px";
  337. hotbarmaincolorinput.style.marginTop = "10px";
  338. hotbarmaincolorinput.style.position = "absolute";
  339. hotbarmaincolorinput.style.left = "44%";
  340. hotbarmaincolorinput.style.transform = "translateX(-50%)";
  341. clientMainMenu.appendChild(hotbarmaincolorinput);
  342.  
  343. hotbarmaincolorinput.addEventListener("input", function() {
  344. const color = hotbarmaincolorinput.value;
  345. hotbarmaincolorinput.value = color;
  346. const hotbars = document.querySelectorAll(".item");
  347.  
  348. hotbars.forEach(function(hotbar) {
  349. hotbar.style.backgroundColor = color;
  350. });
  351. });
  352.  
  353. let hotbarbordercolorinput;
  354. hotbarbordercolorinput = document.createElement("input");
  355. hotbarbordercolorinput.type = "color";
  356. hotbarbordercolorinput.style.top = "250px";
  357. hotbarbordercolorinput.value = "#303a59";
  358. hotbarbordercolorinput.style.marginTop = "5px";
  359. hotbarbordercolorinput.style.position = "absolute";
  360. hotbarbordercolorinput.style.left = "56%";
  361. hotbarbordercolorinput.style.transform = "translateX(-50%)";
  362. clientMainMenu.appendChild(hotbarbordercolorinput);
  363.  
  364. hotbarbordercolorinput.addEventListener("input", function() {
  365. const color = hotbarbordercolorinput.value;
  366. hotbarbordercolorinput.value = color;
  367. const hotbars = document.querySelectorAll(".item");
  368.  
  369. hotbars.forEach(function(hotbar) {
  370. hotbar.style.borderColor = color;
  371. });
  372. });
  373.  
  374. let hotbarborderradiusinput;
  375. hotbarborderradiusinput = document.createElement("input");
  376. hotbarborderradiusinput.type = "range";
  377. hotbarborderradiusinput.style.top = "280px";
  378. hotbarborderradiusinput.style.marginTop = "5px";
  379. hotbarborderradiusinput.style.position = "absolute";
  380. hotbarborderradiusinput.value = "0";
  381. hotbarborderradiusinput.style.left = "50%";
  382. hotbarborderradiusinput.min = "0";
  383. hotbarborderradiusinput.max = "50";
  384. hotbarborderradiusinput.style.transform = "translateX(-50%)";
  385. clientMainMenu.appendChild(hotbarborderradiusinput);
  386.  
  387. hotbarborderradiusinput.addEventListener("input", function() {
  388. const hotbarrounding = hotbarborderradiusinput.value;
  389. const hotbars = document.querySelectorAll(".item");
  390.  
  391. hotbars.forEach(function(hotbar) {
  392. hotbar.style.borderRadius = hotbarrounding + "px";
  393. });
  394. });
  395.  
  396. let crosshairsettingstext
  397. crosshairsettingstext = document.createElement("div");
  398. crosshairsettingstext.textContent = "- Crosshair Settings -";
  399. crosshairsettingstext.style.position = "absolute";
  400. crosshairsettingstext.style.top = "320px";
  401. crosshairsettingstext.style.left = "50%";
  402. crosshairsettingstext.style.transform = "translateX(-50%)";
  403. crosshairsettingstext.style.fontSize = "20px";
  404. clientMainMenu.appendChild(crosshairsettingstext);
  405.  
  406. let crosshairsettingsinput;
  407. crosshairsettingsinput = document.createElement("input");
  408. crosshairsettingsinput.type = "text";
  409. crosshairsettingsinput.placeholder = "Crosshair URL";
  410. crosshairsettingsinput.style.position = "absolute";
  411. crosshairsettingsinput.style.top = "360px";
  412. crosshairsettingsinput.value = "https://piskel-imgstore-b.appspot.com/img/15ed6123-c3a5-11ee-9501-c7b63267fd1e.gif";
  413. crosshairsettingsinput.style.left = "50%";
  414. crosshairsettingsinput.style.transform = "translateX(-50%)";
  415. clientMainMenu.appendChild(crosshairsettingsinput);
  416.  
  417. let crosshairurl;
  418.  
  419. crosshairsettingsinput.addEventListener('input', function() {
  420. const crosshair = document.querySelector(".CrossHair");
  421. if (crosshair) {
  422. crosshair.style.backgroundImage = `url(${crosshairsettingsinput.value})`;
  423. crosshairurl = `url(${crosshairsettingsinput.value})`;
  424. }
  425. });
  426.  
  427. crosshairsettingsinput.addEventListener('mousedown', function(event) {
  428. event.stopPropagation();
  429. });
  430.  
  431. let keybindsettingstext;
  432. keybindsettingstext = document.createElement("div");
  433. keybindsettingstext.textContent = "- Keybind Settings -";
  434. keybindsettingstext.style.position = "absolute";
  435. keybindsettingstext.style.top = "420px";
  436. keybindsettingstext.style.left = "50%";
  437. keybindsettingstext.style.transform = "translateX(-50%)";
  438. keybindsettingstext.style.fontSize = "20px";
  439. clientMainMenu.appendChild(keybindsettingstext);
  440.  
  441. setInterval(function() {
  442. const color1 = hotbarmaincolorinput.value;
  443. const color2 = hotbarbordercolorinput.value
  444. const hotbarrounding = hotbarborderradiusinput.value;
  445. const hotbars = document.querySelectorAll(".item");
  446. hotbars.forEach(function(hotbar) {
  447. hotbar.style.borderRadius = hotbarrounding + "px";
  448. hotbar.style.borderColor = color2;
  449. hotbar.style.backgroundColor = color1;
  450. });
  451. const crosshair = document.querySelector(".CrossHair");
  452. if (crosshair) {
  453. crosshair.textContent = "";
  454. crosshair.style.backgroundImage = crosshairurl; // Use the crosshairurl variable here
  455. crosshair.style.backgroundRepeat = "no-repeat";
  456. crosshair.style.backgroundSize = "contain";
  457. crosshair.style.width = "30px";
  458. crosshair.style.height = "30px";
  459. }
  460. }, 1000);
  461. })();

QingJ © 2025

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