Celestial Client Remix

A Bloxd.io custom client.

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