Melon Hub (bloxd.io)

hack client for bloxd.io, open source on github.

  1. // ==UserScript==
  2. // @name Melon Hub (bloxd.io)
  3. // @namespace https://github.com/OfficiallyMelon/Melon-Hub
  4. // @version v1.0
  5. // @description hack client for bloxd.io, open source on github.
  6. // @author melon
  7. // @match https://bloxd.io*
  8. // @icon https://bloxd.io*
  9. // @grant GM_getValue
  10. // @grant GM_setValue
  11. // @grant unsafeWindow
  12. // @run-at document-start
  13. // ==/UserScript==
  14.  
  15.  
  16. /******/ (() => { // webpackBootstrap
  17. /******/ "use strict";
  18. /******/ // The require scope
  19. /******/ var __webpack_require__ = {};
  20. /******/
  21. /************************************************************************/
  22. /******/ /* webpack/runtime/define property getters */
  23. /******/ (() => {
  24. /******/ // define getter functions for harmony exports
  25. /******/ __webpack_require__.d = (exports, definition) => {
  26. /******/ for(var key in definition) {
  27. /******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
  28. /******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
  29. /******/ }
  30. /******/ }
  31. /******/ };
  32. /******/ })();
  33. /******/
  34. /******/ /* webpack/runtime/hasOwnProperty shorthand */
  35. /******/ (() => {
  36. /******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
  37. /******/ })();
  38. /******/
  39. /************************************************************************/
  40. var __webpack_exports__ = {};
  41.  
  42. // EXPORTS
  43. __webpack_require__.d(__webpack_exports__, {
  44. n9: () => (/* binding */ addOutput),
  45. oP: () => (/* binding */ injectionStatus)
  46. });
  47.  
  48. // UNUSED EXPORTS: addError, reapplyLogs
  49.  
  50. ;// ./Inject/Inject.ts
  51.  
  52. var config = {
  53. coordinates: [null, null, null],
  54. methods: {},
  55. CurrentlyInjected: false,
  56. freecamPosition: [0, 0, 0]
  57. };
  58. // Functions
  59. function hookObjectAssign(target, prop, handler) {
  60. var originalMethod = target[prop];
  61. target[prop] = new Proxy(originalMethod, {
  62. apply: function (originalFunc, thisArg, argsList) {
  63. handler.apply(void 0, argsList);
  64. return Reflect.apply(originalFunc, thisArg, argsList);
  65. }
  66. });
  67. }
  68. // Hook Noa (thanks blackhole for injection method, yay!)
  69. hookObjectAssign(Object, 'assign', function () {
  70. var params = [];
  71. for (var _i = 0; _i < arguments.length; _i++) {
  72. params[_i] = arguments[_i];
  73. }
  74. var hasSwingTime = false;
  75. try {
  76. if (params[2].swingDuration !== undefined) {
  77. hasSwingTime = true;
  78. }
  79. }
  80. catch (err) {
  81. // Property swingDuration not found
  82. }
  83. var hasIdentifier = false;
  84. try {
  85. if (params[1].__id !== undefined) {
  86. hasIdentifier = true;
  87. }
  88. }
  89. catch (err) {
  90. // Property __id not found
  91. }
  92. if (hasSwingTime && hasIdentifier && params.length === 4 && params[2].swingDuration === 200 && params[1].__id === 1) {
  93. config.hookedObject = params[0];
  94. setTimeout(function () {
  95. config.babylonEngine = window.BABYLON;
  96. config.noaInstance = config.hookedObject.heldItem.noa;
  97. config.CurrentlyInjected = true;
  98. addOutput("Injection State:", config.noaInstance ? "Successfully hooked noa!" : "Unsuccessful, try reloading the page.");
  99. console.log("Successfully hooked noa!", config.noaInstance);
  100. window.noa = config.noaInstance;
  101. config.genericPlayerState = config.noaInstance.ents._storage.genericLifeForm.hash[config.noaInstance.playerEntity];
  102. setTimeout(function () {
  103. injectionStatus.style.cssText =
  104. "position:absolute;bottom:5px;right:5px;width:15px;height:15px;background:green;border-radius:50%;";
  105. }, 100);
  106. }, 1);
  107. }
  108. });
  109.  
  110.  
  111. ;// ./Modules/Packets.ts
  112. var _a;
  113. // Declare hookedSend globally
  114. var hookedSend = null;
  115. var Context = null;
  116. function interceptSockets() {
  117. (function () {
  118. var originalDefineProperty = Object.defineProperty;
  119. // Hooking into the send property of window
  120. Object.defineProperty = function (obj, prop, descriptor) {
  121. try {
  122. if (prop === "send" && typeof descriptor.value === "function") {
  123. console.log("[HOOK] Defining property: send");
  124. hookedSend = descriptor.value;
  125. descriptor.value = function () {
  126. var args = [];
  127. for (var _i = 0; _i < arguments.length; _i++) {
  128. args[_i] = arguments[_i];
  129. }
  130. //console.log(`[HOOK] Intercepted send() call with arguments:`, args);
  131. if (hookedSend) {
  132. Context = this;
  133. return hookedSend.apply(this, args);
  134. }
  135. else {
  136. console.error("[HOOK ERROR] hookedSend is null");
  137. }
  138. };
  139. }
  140. }
  141. catch (error) {
  142. console.error("[HOOK ERROR] Failed to hook send:", error);
  143. }
  144. return originalDefineProperty.apply(this, arguments);
  145. };
  146. // Attach a getter to get hookedSend globally if needed
  147. Object.defineProperty(window, "getHookedSend", {
  148. value: function () { return hookedSend; },
  149. writable: false,
  150. configurable: false
  151. });
  152. })();
  153. }
  154. // function PacketConverter(Y) {
  155. // const P = new Array(128).fill(0).map((_, index) => index);
  156. // const X = new s.e("$(Y)$(e.m)");
  157. // return function(Y: any[]) {
  158. // for (let P = 0; P < Y.length; P++) {
  159. // const q = P + Math.floor(X.next() * (Y.length - P));
  160. // [Y[P], Y[q]] = [Y[q], Y[P]];
  161. // }
  162. // return Y;
  163. // };
  164. // }
  165. var PacketType = {
  166. PLACE_BLOCK: 114,
  167. };
  168. var packets = (_a = {},
  169. _a[PacketType.PLACE_BLOCK] = {
  170. pos: null,
  171. toBlock: null,
  172. checker: null
  173. },
  174. _a);
  175. function sendPacket(packetType, data) {
  176. if (hookedSend && Context) {
  177. hookedSend.apply(Context, [packetType, data]);
  178. }
  179. else {
  180. console.error("[HOOK ERROR] hookedSend is null");
  181. }
  182. }
  183.  
  184.  
  185. ;// ./Modules/Modules.ts
  186. // Modules.ts
  187.  
  188.  
  189.  
  190. var ExecutionFunctions = /** @class */ (function () {
  191. function ExecutionFunctions() {
  192. }
  193. ExecutionFunctions.prototype.simulateLeftClick = function (element) {
  194. var mouseDownEvent = new MouseEvent("mousedown", {
  195. button: 0,
  196. bubbles: true,
  197. cancelable: true
  198. });
  199. element.dispatchEvent(mouseDownEvent);
  200. var mouseUpEvent = new MouseEvent("mouseup", {
  201. button: 0,
  202. bubbles: true,
  203. cancelable: true
  204. });
  205. element.dispatchEvent(mouseUpEvent);
  206. };
  207. ExecutionFunctions.prototype.calculateDistance = function (pos1, pos2) {
  208. var dx = pos2.x - pos1.x;
  209. var dy = pos2.y - pos1.y;
  210. var dz = pos2.z - pos1.z;
  211. return Math.sqrt(Math.pow(dx, 2) + Math.pow(dy, 2) + Math.pow(dz, 2));
  212. };
  213. ExecutionFunctions.prototype.simulateRightClick = function (element) {
  214. var mouseDownEvent = new MouseEvent("mousedown", {
  215. button: 2,
  216. bubbles: true,
  217. cancelable: true
  218. });
  219. element.dispatchEvent(mouseDownEvent);
  220. var mouseUpEvent = new MouseEvent("mouseup", {
  221. button: 2,
  222. bubbles: true,
  223. cancelable: true
  224. });
  225. element.dispatchEvent(mouseUpEvent);
  226. };
  227. ExecutionFunctions.prototype.distanceBetween = function (point1, point2) {
  228. var dx = point2[0] - point1[0];
  229. var dy = point2[1] - point1[1];
  230. var dz = point2[2] - point1[2];
  231. return dx * dx + dy * dy + dz * dz;
  232. };
  233. ExecutionFunctions.prototype.setDir = function (facing) {
  234. var heading = Math.atan2(facing[0], facing[2]);
  235. var pitch = Math.asin(-facing[1]);
  236. config.noaInstance.camera.heading = heading;
  237. config.noaInstance.camera.pitch = pitch;
  238. //cam(heading, pitch);
  239. };
  240. ExecutionFunctions.prototype.distanceBetweenSqrt = function (point1, point2) {
  241. return Math.sqrt(this.distanceBetween(point1, point2));
  242. };
  243. ExecutionFunctions.prototype.ChangeCrouchSpeed = function (speed) {
  244. config.noaInstance.serverSettings.crouchingSpeed = speed;
  245. };
  246. ExecutionFunctions.prototype.ChangeWalkSpeed = function (speed) {
  247. config.noaInstance.serverSettings.walkingSpeed = speed;
  248. };
  249. ExecutionFunctions.prototype.InstantRespawn = function () {
  250. var _a;
  251. if (config.noaInstance) {
  252. config.noaInstance.serverSettings.secsToRespawn = 0;
  253. (_a = document.querySelector(".NewButton.BlueButton.RespawnButton")) === null || _a === void 0 ? void 0 : _a.click();
  254. }
  255. };
  256. ExecutionFunctions.prototype.normalizeVector = function (vector) {
  257. var magnitude = vector[0] * vector[0] + vector[1] * vector[1] + vector[2] * vector[2];
  258. if (magnitude > 0) {
  259. var invMagnitude = 1 / Math.sqrt(magnitude);
  260. return [vector[0] * invMagnitude, vector[1] * invMagnitude, vector[2] * invMagnitude];
  261. }
  262. return vector;
  263. };
  264. ExecutionFunctions.prototype.killaura = function (range) {
  265. var targets = getAttackablePlayers();
  266. if (targets.length === 0) {
  267. addOutput("No targets found");
  268. return;
  269. }
  270. var nearestTarget = getNearestTarget(targets);
  271. var playerPosition = config.noaInstance.ents.getPosition(config.noaInstance.playerEntity);
  272. var targetPosition = config.noaInstance.ents.getPositionData(nearestTarget).position;
  273. if (Utilities.distanceBetweenSqrt(playerPosition, targetPosition) <= 5) {
  274. var originalDirection = config.noaInstance.camera._dirVector;
  275. config.noaInstance.camera._dirVector = Utilities.normalizeVector([
  276. targetPosition[0] - playerPosition[0],
  277. targetPosition[1] - playerPosition[1],
  278. targetPosition[2] - playerPosition[2]
  279. ]);
  280. var canvasElement = document.querySelector("#noa-canvas");
  281. if (canvasElement) {
  282. this.simulateLeftClick(canvasElement);
  283. }
  284. config.noaInstance.camera._dirVector = originalDirection;
  285. }
  286. };
  287. ExecutionFunctions.prototype.removeAllCookies = function () {
  288. var cookies = document.cookie.split(";");
  289. for (var _i = 0, cookies_1 = cookies; _i < cookies_1.length; _i++) {
  290. var cookie = cookies_1[_i];
  291. var eqPos = cookie.indexOf("=");
  292. var name_1 = eqPos > -1 ? cookie.substr(0, eqPos) : cookie;
  293. document.cookie = name_1 + "=;expires=Thu, 01 Jan 1970 00:00:00 GMT;path=/";
  294. }
  295. };
  296. return ExecutionFunctions;
  297. }());
  298. function getAllPlayers() {
  299. var _a = config.noaInstance, playerNames = _a.playerNames, playerEntity = _a.playerEntity, ents = _a.ents;
  300. var playerIds = [];
  301. for (var key in playerNames) {
  302. if (playerNames.hasOwnProperty(key)) {
  303. var id = Number(key);
  304. if (id !== playerEntity && ents.hasComponent(id, "position") && ents.hasComponent(id, 'genericLifeformState') && ents.genericLifeformState(id).isAlive) {
  305. playerIds.push(id);
  306. }
  307. }
  308. }
  309. return playerIds;
  310. }
  311. function getAttackablePlayers() {
  312. return getAllPlayers().filter(function (id) { var _a; return (_a = config.noaInstance.otherPlayerSettings[config.noaInstance.playerEntity][id]) === null || _a === void 0 ? void 0 : _a.canAttack; });
  313. }
  314. function getNearestTarget(targets) {
  315. var playerPosition = config.noaInstance.ents.getPosition(config.noaInstance.playerEntity);
  316. var nearestTarget = undefined;
  317. var nearestDistance = Infinity;
  318. for (var _i = 0, targets_1 = targets; _i < targets_1.length; _i++) {
  319. var target = targets_1[_i];
  320. var distance = Utilities.distanceBetween(playerPosition, config.noaInstance.ents.getPosition(target));
  321. if (nearestTarget === undefined || distance < nearestDistance) {
  322. nearestTarget = target;
  323. nearestDistance = distance;
  324. }
  325. }
  326. return nearestTarget;
  327. }
  328. var AutoTrigger = false;
  329. var Utilities = new ExecutionFunctions();
  330. var Exploits = [
  331. {
  332. type: "Combat",
  333. title: "Kill Aura",
  334. desc: "Detects and attacks nearby entities",
  335. pertick: function (state) {
  336. if (state) {
  337. var cDist_1 = 3.5;
  338. var cPlayer_1 = null;
  339. config.noaInstance.entities._storage.position.list.forEach(function (p) {
  340. if (typeof p.__id !== "number" && p.__id != 1 && p.__id !== config.noaInstance.serverPlayerEntity) {
  341. var lifeformState = config.noaInstance.entities.getGenericLifeformState(p.__id);
  342. if (lifeformState && lifeformState.isAlive) {
  343. var myPos = config.noaInstance.entities.getPosition(1);
  344. var enemyPos = p.position;
  345. var myPosObj = {
  346. x: myPos[0],
  347. y: myPos[1],
  348. z: myPos[2]
  349. };
  350. var enemyPosObj = {
  351. x: enemyPos[0],
  352. y: enemyPos[1],
  353. z: enemyPos[2]
  354. };
  355. if (myPos[0] === enemyPos[0] && myPos[1] === enemyPos[1] && myPos[2] === enemyPos[2]) {
  356. return;
  357. }
  358. var distance = Utilities.calculateDistance(myPosObj, enemyPosObj);
  359. if (distance < cDist_1) {
  360. cPlayer_1 = enemyPos;
  361. }
  362. }
  363. }
  364. });
  365. if (cPlayer_1) {
  366. var myPos = config.noaInstance.entities.getPosition(1);
  367. var dirVec = [cPlayer_1[0] - myPos[0], cPlayer_1[1] - myPos[1], cPlayer_1[2] - myPos[2]];
  368. var normVec = Utilities.normalizeVector(dirVec);
  369. Utilities.setDir(normVec);
  370. var element = document.querySelector("#noa-canvas");
  371. if (element) {
  372. element.dispatchEvent(new MouseEvent("mousedown", { button: 0, bubbles: true, cancelable: true }));
  373. element.dispatchEvent(new MouseEvent("mouseup", { button: 0, bubbles: true, cancelable: true }));
  374. }
  375. }
  376. }
  377. },
  378. },
  379. {
  380. type: "Combat",
  381. title: "Auto Clicker",
  382. desc: "Automatically clicks for you",
  383. pertick: function () {
  384. if (config.CurrentlyInjected && config.noaInstance) {
  385. var element = document.querySelector("#noa-canvas");
  386. if (element) {
  387. element.dispatchEvent(new MouseEvent("mousedown", { button: 0, bubbles: true, cancelable: true }));
  388. element.dispatchEvent(new MouseEvent("mouseup", { button: 0, bubbles: true, cancelable: true }));
  389. }
  390. }
  391. },
  392. },
  393. {
  394. type: "Combat",
  395. title: "Anti Shake",
  396. desc: "Disables camera shake on hit",
  397. pertick: function (status) {
  398. if (status) {
  399. if (config.CurrentlyInjected && config.noaInstance) {
  400. config.noaInstance.entities.getState(config.noaInstance.playerEntity, "cameraShake").shakePower = 0;
  401. }
  402. }
  403. }
  404. },
  405. {
  406. type: "Player",
  407. title: "Scaffold",
  408. desc: "Automatically places blocks under you. (BROKEN)",
  409. pertick: function (status) {
  410. if (status) {
  411. if (config.CurrentlyInjected && config.noaInstance) {
  412. var player = config.noaInstance.playerEntity;
  413. var position = config.noaInstance.ents.getPosition(player);
  414. var block = config.noaInstance.getBlock(position[0], position[1] - 1, position[2]);
  415. var f = config.noaInstance.ents.getInventoryState(config.noaInstance.playerEntity).selectedItem;
  416. var ObjID = f && ("CubeBlock" === f.typeObj.type || "TwoDBlock" === f.typeObj.type || "SlabBlock" === f.typeObj.type) ? f.typeObj.id : null;
  417. if (block === 0) {
  418. var roundedPosition = [
  419. Math.floor(position[0]),
  420. Math.floor(position[1] - 1),
  421. Math.floor(position[2])
  422. ];
  423. addOutput("Placing block at", roundedPosition.toString());
  424. addOutput("Block ID", block);
  425. if (ObjID) {
  426. sendPacket(PacketType.PLACE_BLOCK, {
  427. pos: roundedPosition,
  428. toBlock: ObjID,
  429. checker: ''
  430. });
  431. config.noaInstance.setBlock(roundedPosition[0], roundedPosition[1], roundedPosition[2], ObjID);
  432. }
  433. }
  434. }
  435. }
  436. },
  437. },
  438. {
  439. type: "Player",
  440. title: "Instant Respawn",
  441. desc: "Instantly respawns you when you die.",
  442. pertick: function () {
  443. if (config.CurrentlyInjected && config.noaInstance) {
  444. Utilities.InstantRespawn();
  445. }
  446. },
  447. },
  448. {
  449. type: "Combat",
  450. title: "Auto Trigger",
  451. desc: "Auto trigger for Aimbot (BROKEN)",
  452. pertick: function (state) {
  453. AutoTrigger = state;
  454. }
  455. },
  456. {
  457. type: "Player",
  458. title: "Account Gen",
  459. desc: "Generates accounts for you to use. (Requires Refresh)",
  460. pertick: function () {
  461. Utilities.removeAllCookies();
  462. location.reload();
  463. },
  464. },
  465. {
  466. type: "Combat",
  467. title: "Aimbot",
  468. desc: "Automatically aims at the nearest player.",
  469. pertick: function (state) {
  470. function normalizeVector(vector) {
  471. var magnitude = Math.sqrt(Math.pow(vector[0], 2) + Math.pow(vector[1], 2) + Math.pow(vector[2], 2));
  472. if (magnitude === 0) {
  473. return [0, 0, 0];
  474. }
  475. return vector.map(function (component) { return component / magnitude; });
  476. }
  477. function setDir(facing) {
  478. var heading = Math.atan2(facing[0], facing[2]);
  479. var pitch = Math.asin(-facing[1]);
  480. config.noaInstance.camera.heading = heading;
  481. config.noaInstance.camera.pitch = pitch;
  482. //cam(heading, pitch);
  483. }
  484. function calculateDistance(pos1, pos2) {
  485. var dx = pos2.x - pos1.x;
  486. var dy = pos2.y - pos1.y;
  487. var dz = pos2.z - pos1.z;
  488. return Math.sqrt(Math.pow(dx, 2) + Math.pow(dy, 2) + Math.pow(dz, 2));
  489. }
  490. if (!state) {
  491. return;
  492. }
  493. var cPlayer = null;
  494. var cDist = Infinity;
  495. config.noaInstance.entities._storage.position.list.forEach(function (p) {
  496. if (typeof p.__id !== "number" && p.__id != 1 && p.__id !== config.noaInstance.serverPlayerEntity) {
  497. var lifeformState = config.noaInstance.entities.getGenericLifeformState(p.__id);
  498. if (lifeformState && lifeformState.isAlive) {
  499. var myPos = config.noaInstance.entities.getPosition(1);
  500. var enemyPos = p.position;
  501. var myPosObj = {
  502. x: myPos[0],
  503. y: myPos[1],
  504. z: myPos[2]
  505. };
  506. var enemyPosObj = {
  507. x: enemyPos[0],
  508. y: enemyPos[1],
  509. z: enemyPos[2]
  510. };
  511. if (myPos[0] === enemyPos[0] && myPos[1] === enemyPos[1] && myPos[2] === enemyPos[2]) {
  512. return;
  513. }
  514. var distance = calculateDistance(myPosObj, enemyPosObj);
  515. if (distance < cDist) {
  516. cDist = distance;
  517. cPlayer = enemyPos;
  518. }
  519. }
  520. }
  521. });
  522. if (cPlayer && cDist <= 20) {
  523. var myPos = config.noaInstance.entities.getPosition(1);
  524. var dirVec = [cPlayer[0] - myPos[0], cPlayer[1] - myPos[1], cPlayer[2] - myPos[2]];
  525. var normVec = normalizeVector(dirVec);
  526. setDir(normVec);
  527. if (AutoTrigger) {
  528. config.noaInstance.ents.getHeldItem(config.noaInstance.playerEntity).upFirePrimary();
  529. }
  530. }
  531. }
  532. },
  533. {
  534. type: "Movement",
  535. title: "Auto Sprint",
  536. desc: "Automatically sprints when moving.",
  537. pertick: function () {
  538. if (config.CurrentlyInjected && config.noaInstance) {
  539. Utilities.ChangeWalkSpeed(config.noaInstance.serverSettings.runningSpeed);
  540. }
  541. },
  542. },
  543. {
  544. type: "Movement",
  545. title: "Fast Crouch",
  546. desc: "Increase crouching speed.",
  547. pertick: function (status) {
  548. if (status) {
  549. if (config.CurrentlyInjected && config.noaInstance) {
  550. Utilities.ChangeCrouchSpeed(config.noaInstance.serverSettings.runningSpeed);
  551. }
  552. }
  553. else {
  554. if (config.CurrentlyInjected && config.noaInstance) {
  555. Utilities.ChangeCrouchSpeed(2);
  556. }
  557. }
  558. },
  559. },
  560. {
  561. type: "Movement",
  562. title: "Auto Speed",
  563. desc: "Increase walking speed.",
  564. pertick: function (status) {
  565. if (status) {
  566. if (config.CurrentlyInjected && config.noaInstance) {
  567. Utilities.ChangeWalkSpeed(7.4);
  568. }
  569. }
  570. else {
  571. if (config.CurrentlyInjected && config.noaInstance) {
  572. Utilities.ChangeWalkSpeed(4.5);
  573. }
  574. }
  575. },
  576. },
  577. {
  578. type: "Movement",
  579. title: "Infinite Jump",
  580. desc: "Jump infinitely. (only works going up blocks)",
  581. pertick: function (status) {
  582. if (status) {
  583. if (config.CurrentlyInjected && config.noaInstance) {
  584. config.noaInstance.serverSettings.airJumpCount = Infinity;
  585. }
  586. }
  587. else {
  588. if (config.CurrentlyInjected && config.noaInstance) {
  589. config.noaInstance.serverSettings.airJumpCount = 0;
  590. }
  591. }
  592. },
  593. },
  594. {
  595. type: "Exploit",
  596. title: "Spider (VERY EXPERIMENTAL)",
  597. desc: "Climb walls.",
  598. pertick: function (status) {
  599. if (status) {
  600. if (config.CurrentlyInjected && config.noaInstance) {
  601. var noa = config.noaInstance;
  602. var player = noa.playerEntity;
  603. var position = noa.ents.getPosition(player); // [x, y, z]
  604. var x = position[0];
  605. var y = position[1];
  606. var z = position[2];
  607. var blockInFront = noa.getBlock(x, y, z + 1);
  608. if (blockInFront !== 0) {
  609. noa.ents.getPhysicsBody(player).applyImpulse([0, noa.serverSettings.jumpAmount * 0.03, 0]);
  610. }
  611. }
  612. }
  613. },
  614. }
  615. ];
  616.  
  617.  
  618. ;// ./Saves/Save.ts
  619. var Save_SaveManager = /** @class */ (function () {
  620. function SaveManager() {
  621. }
  622. SaveManager.saveBoolean = function (key, value, overwrite) {
  623. if (overwrite === void 0) { overwrite = true; }
  624. if (overwrite || localStorage.getItem(key) === null) {
  625. localStorage.setItem(key, JSON.stringify(value));
  626. }
  627. };
  628. SaveManager.importBoolean = function (key) {
  629. var value = localStorage.getItem(key);
  630. return value ? JSON.parse(value) : false;
  631. };
  632. SaveManager.saveString = function (key, value) {
  633. localStorage.setItem(key, value);
  634. };
  635. SaveManager.importString = function (key) {
  636. return localStorage.getItem(key);
  637. };
  638. SaveManager.saveObject = function (key, value) {
  639. localStorage.setItem(key, JSON.stringify(value));
  640. };
  641. SaveManager.importObject = function (key) {
  642. var value = localStorage.getItem(key);
  643. return value ? JSON.parse(value) : null;
  644. };
  645. return SaveManager;
  646. }());
  647.  
  648.  
  649. ;// ./UI/Keybinds.ts
  650. var loadKeybinds = function () {
  651. var savedKeybinds = localStorage.getItem('keybinds');
  652. if (savedKeybinds) {
  653. return JSON.parse(savedKeybinds);
  654. }
  655. else {
  656. return [
  657. {
  658. Module: "Kill Aura",
  659. Keybind: "",
  660. KeybindCode: "",
  661. },
  662. {
  663. Module: "Aimbot",
  664. Keybind: "",
  665. KeybindCode: "",
  666. },
  667. {
  668. Module: "Auto Clicker",
  669. Keybind: "",
  670. KeybindCode: "",
  671. },
  672. {
  673. Module: "Scaffold",
  674. Keybind: "",
  675. KeybindCode: "",
  676. },
  677. {
  678. Module: "Auto Trigger",
  679. Keybind: "",
  680. KeybindCode: "",
  681. },
  682. {
  683. Module: "Auto Sprint",
  684. Keybind: "",
  685. KeybindCode: "",
  686. },
  687. {
  688. Module: "Fast Crouch",
  689. Keybind: "",
  690. KeybindCode: "",
  691. },
  692. {
  693. Module: "Infinite Jump",
  694. Keybind: "",
  695. KeybindCode: "",
  696. },
  697. {
  698. Module: "Auto Speed",
  699. Keybind: "",
  700. KeybindCode: "",
  701. },
  702. ];
  703. }
  704. };
  705. var Keybinds = loadKeybinds();
  706. function ChangeKeybind(Module, Key, KeyCode) {
  707. for (var _i = 0, Keybinds_1 = Keybinds; _i < Keybinds_1.length; _i++) {
  708. var element = Keybinds_1[_i];
  709. if (element.Module === Module) {
  710. element.Keybind = Key !== null ? Key : element.Keybind;
  711. element.KeybindCode = KeyCode !== null ? KeyCode : element.KeybindCode;
  712. }
  713. }
  714. localStorage.setItem('keybinds', JSON.stringify(Keybinds));
  715. }
  716.  
  717.  
  718. ;// ./UI/UI.ts
  719. // Imports
  720.  
  721.  
  722.  
  723.  
  724.  
  725. // UI
  726. var UI_link = document.createElement('link');
  727. UI_link.rel = 'stylesheet';
  728. UI_link.href = 'https://fonts.googleapis.com/css2?family=Gabarito:wght@400;500&display=swap';
  729. var UI_frame = document.createElement('div');
  730. UI_frame.style.cssText = 'position:fixed;top:10px;right:10px;width:697.5px;height:448.5px;background-color:transparent;border-radius:10px;overflow:hidden;z-index:2147483646';
  731. var rightImage = document.createElement('img');
  732. rightImage.src = 'https://github.com/OfficiallyMelon/Melon-Hub/blob/main/Assets/bloxd.io/RightMelon.png?raw=true';
  733. rightImage.style.cssText = 'width:697.5px;height:448.5px';
  734. rightImage.style.position = 'relative';
  735. var leftImage = document.createElement('img');
  736. leftImage.src = 'https://github.com/OfficiallyMelon/Melon-Hub/blob/main/Assets/bloxd.io/LeftMelon.png?raw=true';
  737. leftImage.style.cssText = 'position:fixed;top:10px;right:495px;width:217.5px;height:448.5px;z-index:2147483646';
  738. var melonHubText = document.createElement('div');
  739. melonHubText.innerText = 'Melon Hub';
  740. melonHubText.style.cssText = 'position:absolute; top: 20px; left: 34px; font-family: Inter, sans-serif; font-size: 22px; font-weight: 500; color: white; z-index: 2147483647;';
  741. var versionText = document.createElement('div');
  742. versionText.innerText = '1.0';
  743. versionText.style.cssText = 'position:absolute; top: 20px; left: 145px; font-family: Inter, sans-serif; font-size: 14px; font-weight: 300; color: white; z-index: 2147483647;';
  744. var buttonContainer = document.createElement('div');
  745. buttonContainer.style.cssText = 'position:absolute;top:60px;left:-25px;width:217.5px;height:448.5px;z-index:2147483651;';
  746. var rightButtonContainer = document.createElement('div');
  747. rightButtonContainer.id = 'rightButtonContainer';
  748. rightButtonContainer.style.cssText = 'position: absolute; top: 50px; right: 10px; width: 470px; height: 380px; z-index: 2147483649; overflow-y: auto; overflow-x: hidden; padding-right: 10px; box-sizing: border-box;';
  749. var miniConsole = document.createElement('div');
  750. miniConsole.id = 'miniConsole';
  751. miniConsole.style.cssText = 'position: absolute; top: 40px; right: 5px; width: 470px; height: 380px; background-color: black; color: green; overflow-y: auto; padding: 10px; box-sizing: border-box; font-family: monospace; font-size: 14px; border: 2px solid gray; border-radius: 10px; box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); display: none; z-index: 20000000000;';
  752. var injectionStatus = document.createElement("div");
  753. injectionStatus.id = 'injectionStatus';
  754. injectionStatus.style.cssText =
  755. "position:absolute;bottom:5px;right:5px;width:15px;height:15px;background:red;border-radius:50%;";
  756. // Create UI
  757. document.head.appendChild(UI_link); // frame
  758. UI_frame.appendChild(rightImage); // frame
  759. UI_frame.appendChild(leftImage); // frame
  760. UI_frame.appendChild(melonHubText); // title
  761. UI_frame.appendChild(versionText); // version
  762. UI_frame.appendChild(buttonContainer); // buttons
  763. UI_frame.appendChild(rightButtonContainer); // right buttons
  764. UI_frame.appendChild(miniConsole); // debug console
  765. UI_frame.appendChild(injectionStatus); // injection status
  766. document.body.appendChild(UI_frame);
  767. // Intercept Sockets
  768. interceptSockets();
  769. // Debug Console
  770. var logs = [];
  771. function addOutput() {
  772. var args = [];
  773. for (var _i = 0; _i < arguments.length; _i++) {
  774. args[_i] = arguments[_i];
  775. }
  776. var text = args.join(' ');
  777. var output = document.createElement('div');
  778. output.textContent = "> ".concat(text);
  779. output.style.color = 'green';
  780. output.style.marginBottom = '5px';
  781. miniConsole.appendChild(output);
  782. miniConsole.scrollTop = miniConsole.scrollHeight;
  783. logs.push({ text: text, type: 'output' });
  784. }
  785. function addError() {
  786. var args = [];
  787. for (var _i = 0; _i < arguments.length; _i++) {
  788. args[_i] = arguments[_i];
  789. }
  790. var text = args.join(' ');
  791. var output = document.createElement('div');
  792. output.textContent = "> ".concat(text);
  793. output.style.color = 'red';
  794. output.style.marginBottom = '5px';
  795. miniConsole.appendChild(output);
  796. miniConsole.scrollTop = miniConsole.scrollHeight;
  797. logs.push({ text: text, type: 'error' });
  798. }
  799. function reapplyLogs() {
  800. miniConsole.innerHTML = '';
  801. logs.forEach(function (log) {
  802. if (log.type === 'output') {
  803. addOutput(log.text);
  804. }
  805. else if (log.type === 'error') {
  806. addError(log.text);
  807. }
  808. });
  809. }
  810. // Dragging
  811. var isDragging = false;
  812. var offsetX = 0;
  813. var offsetY = 0;
  814. UI_frame.addEventListener('mousedown', function (e) {
  815. isDragging = true;
  816. offsetX = e.clientX - UI_frame.getBoundingClientRect().left;
  817. offsetY = e.clientY - UI_frame.getBoundingClientRect().top;
  818. UI_frame.style.cursor = 'grabbing';
  819. });
  820. document.addEventListener('mousemove', function (e) {
  821. if (isDragging) {
  822. var newLeft = "".concat(e.clientX - offsetX, "px");
  823. var newTop = "".concat(e.clientY - offsetY, "px");
  824. UI_frame.style.left = newLeft;
  825. UI_frame.style.top = newTop;
  826. leftImage.style.left = "".concat(e.clientX - offsetX, "px");
  827. leftImage.style.top = "".concat(e.clientY - offsetY, "px");
  828. }
  829. });
  830. document.addEventListener('mouseup', function () {
  831. isDragging = false;
  832. UI_frame.style.cursor = 'default';
  833. });
  834. // Functions
  835. var buttonStateTable = {};
  836. function createRightButton(title, secondTitle, additionalInfo, onClick) {
  837. var btn = document.createElement("div");
  838. btn.style.cssText = "\n position:relative;width:450px;height:75px;margin-bottom:10px;border-radius: 10px; right: -5px;\n transition:transform 0.2s;cursor:pointer;\n background:url('https://raw.githubusercontent.com/OfficiallyMelon/files-cdn/refs/heads/main/bloxd-ui/ButtonHolder.png') no-repeat center/cover;\n transform-origin: top;\n";
  839. btn.onmouseenter = function () { return (btn.style.transform = "scaleY(1.05)"); };
  840. btn.onmouseleave = function () { return (btn.style.transform = "scaleY(1)"); };
  841. var titleContainer = document.createElement("div");
  842. titleContainer.style.cssText = "position:absolute;top:5px;left:5px;display:flex;align-items:center;";
  843. btn.appendChild(titleContainer);
  844. var titleText = document.createElement("div");
  845. titleText.innerText = title;
  846. titleText.style.cssText =
  847. "font-family:Gabarito,sans-serif;font-size:16px;font-weight:500;color:white;";
  848. titleContainer.appendChild(titleText);
  849. var secondTitleText = document.createElement("div");
  850. secondTitleText.innerText = secondTitle;
  851. secondTitleText.style.cssText =
  852. "margin-left:5px;font-family:Gabarito,sans-serif;font-size:13px;font-weight:400;color:rgba(255, 255, 255, 0.56);";
  853. titleContainer.appendChild(secondTitleText);
  854. var descriptionText = document.createElement("div");
  855. descriptionText.innerText = additionalInfo;
  856. descriptionText.style.cssText =
  857. "position:absolute;top:50px;left:5px;font-family:Gabarito,sans-serif;font-size:14px;font-weight:400;color:rgba(255, 255, 255, 0.71);";
  858. btn.appendChild(descriptionText);
  859. var redCircle = document.createElement("div");
  860. redCircle.style.cssText =
  861. "position:absolute;bottom:5px;right:5px;width:15px;height:15px;background:red;border-radius:50%;";
  862. btn.appendChild(redCircle);
  863. if (!(title in buttonStateTable)) {
  864. buttonStateTable[title] = false;
  865. }
  866. redCircle.style.backgroundColor = buttonStateTable[title] ? "green" : "red";
  867. var intervalId;
  868. Keybinds.forEach(function (keybind) {
  869. if (keybind.Module === title) {
  870. console.log("keybind");
  871. document.addEventListener('keydown', function (event) {
  872. console.log(event.key, keybind.Keybind);
  873. if (event.key !== keybind.Keybind) {
  874. return;
  875. }
  876. if (keybind.KeybindCode.length > 0 && event.code !== keybind.KeybindCode) {
  877. return;
  878. }
  879. console.log(keybind.Keybind);
  880. buttonStateTable[title] = !buttonStateTable[title];
  881. redCircle.style.backgroundColor = buttonStateTable[title] ? "green" : "red";
  882. if (intervalId === undefined) {
  883. intervalId = window.setInterval(function () {
  884. onClick(buttonStateTable[title]);
  885. }, 1);
  886. }
  887. else {
  888. window.clearInterval(intervalId);
  889. intervalId = undefined;
  890. }
  891. addOutput("Toggled", title, "to", buttonStateTable[title] ? "on" : "off");
  892. });
  893. }
  894. });
  895. btn.onclick = function () {
  896. buttonStateTable[title] = !buttonStateTable[title];
  897. Save_SaveManager.saveObject('buttonStates', buttonStateTable);
  898. if (!Save_SaveManager.importBoolean(title)) {
  899. Save_SaveManager.saveBoolean(title, buttonStateTable[title], true);
  900. }
  901. redCircle.style.backgroundColor = buttonStateTable[title] ? "green" : "red";
  902. addOutput("Toggled", title, "to", buttonStateTable[title] ? "on" : "off");
  903. if (title === "Account Gen") {
  904. if (intervalId === undefined) {
  905. onClick(buttonStateTable[title]);
  906. intervalId = window.setTimeout(function () { }, 1);
  907. }
  908. }
  909. else {
  910. if (intervalId === undefined) {
  911. if (config.noaInstance) {
  912. intervalId = window.setInterval(function () {
  913. onClick(buttonStateTable[title]);
  914. }, 1);
  915. }
  916. }
  917. else {
  918. window.clearInterval(intervalId);
  919. intervalId = undefined;
  920. }
  921. }
  922. };
  923. return btn;
  924. }
  925. function createRightSliderButton(title, secondTitle, additionalInfo, onClick, minSliderValue, maxSliderValue) {
  926. var btn = document.createElement("div");
  927. btn.style.cssText = "\n position:relative;width:450px;height:100px;margin-bottom:10px;border-radius: 10px; right: -5px;\n transition:transform 0.2s;cursor:pointer;\n background:url('https://raw.githubusercontent.com/OfficiallyMelon/files-cdn/refs/heads/main/bloxd-ui/ButtonHolder.png') no-repeat center/cover;\n transform-origin: top;\n";
  928. btn.onmouseenter = function () { return (btn.style.transform = "scaleY(1.05)"); };
  929. btn.onmouseleave = function () { return (btn.style.transform = "scaleY(1)"); };
  930. var titleContainer = document.createElement("div");
  931. titleContainer.style.cssText = "position:absolute;top:5px;left:5px;display:flex;align-items:center;";
  932. btn.appendChild(titleContainer);
  933. var titleText = document.createElement("div");
  934. titleText.innerText = title;
  935. titleText.style.cssText =
  936. "font-family:Gabarito,sans-serif;font-size:16px;font-weight:500;color:white;";
  937. titleContainer.appendChild(titleText);
  938. var secondTitleText = document.createElement("div");
  939. secondTitleText.innerText = secondTitle;
  940. secondTitleText.style.cssText =
  941. "margin-left:5px;font-family:Gabarito,sans-serif;font-size:13px;font-weight:400;color:rgba(255, 255, 255, 0.56);";
  942. titleContainer.appendChild(secondTitleText);
  943. var descriptionText = document.createElement("div");
  944. descriptionText.innerText = additionalInfo;
  945. descriptionText.style.cssText =
  946. "position:absolute;top:50px;left:5px;font-family:Gabarito,sans-serif;font-size:14px;font-weight:400;color:rgba(255, 255, 255, 0.71);";
  947. btn.appendChild(descriptionText);
  948. var slider = document.createElement("input");
  949. slider.type = "range";
  950. slider.min = minSliderValue.toString();
  951. slider.max = maxSliderValue.toString();
  952. slider.value = minSliderValue.toString();
  953. slider.style.cssText = "position:absolute;bottom:5px;right:5px;width:200px;";
  954. btn.appendChild(slider);
  955. slider.oninput = function () {
  956. var newSliderValue = parseInt(slider.value, 10);
  957. onClick(newSliderValue);
  958. };
  959. btn.onclick = function () {
  960. buttonStateTable[title] = !buttonStateTable[title];
  961. SaveManager.saveObject('buttonStates', buttonStateTable);
  962. var newSliderValue = parseInt(slider.value, 10);
  963. onClick(newSliderValue);
  964. };
  965. return btn;
  966. }
  967. function createRightThemeButton(title, secondTitle, additionalInfo, onClick) {
  968. var btn = document.createElement("div");
  969. btn.style.cssText = "\n position:relative;width:450px;height:75px;margin-bottom:10px;border-radius: 10px; right: -5px;\n transition:transform 0.2s;cursor:pointer;\n background:url('https://raw.githubusercontent.com/OfficiallyMelon/files-cdn/refs/heads/main/bloxd-ui/ButtonHolder.png') no-repeat center/cover;\n transform-origin: top;\n";
  970. btn.onmouseenter = function () { return (btn.style.transform = "scaleY(1.05)"); };
  971. btn.onmouseleave = function () { return (btn.style.transform = "scaleY(1)"); };
  972. var titleContainer = document.createElement("div");
  973. titleContainer.style.cssText = "position:absolute;top:5px;left:5px;display:flex;align-items:center;";
  974. btn.appendChild(titleContainer);
  975. var titleText = document.createElement("div");
  976. titleText.innerText = title;
  977. titleText.style.cssText =
  978. "font-family:Gabarito,sans-serif;font-size:16px;font-weight:500;color:white;";
  979. titleContainer.appendChild(titleText);
  980. var secondTitleText = document.createElement("div");
  981. secondTitleText.innerText = secondTitle;
  982. secondTitleText.style.cssText =
  983. "margin-left:5px;font-family:Gabarito,sans-serif;font-size:13px;font-weight:400;color:rgba(255, 255, 255, 0.56);";
  984. titleContainer.appendChild(secondTitleText);
  985. var descriptionText = document.createElement("div");
  986. descriptionText.innerText = additionalInfo;
  987. descriptionText.style.cssText =
  988. "position:absolute;top:50px;left:5px;font-family:Gabarito,sans-serif;font-size:14px;font-weight:400;color:rgba(255, 255, 255, 0.71);";
  989. btn.appendChild(descriptionText);
  990. if (!(title in buttonStateTable)) {
  991. buttonStateTable[title] = false;
  992. }
  993. btn.onclick = function () {
  994. buttonStateTable[title] = !buttonStateTable[title];
  995. Save_SaveManager.saveObject('buttonStates', buttonStateTable);
  996. onClick();
  997. };
  998. return btn;
  999. }
  1000. function createKeybindButton(title, secondTitle, additionalInfo) {
  1001. var _a;
  1002. var btn = document.createElement("div");
  1003. btn.style.cssText = "\n position:relative;width:450px;height:75px;margin-bottom:10px;border-radius: 10px; right: -5px;\n transition:transform 0.2s;cursor:pointer;\n background:url('https://raw.githubusercontent.com/OfficiallyMelon/files-cdn/refs/heads/main/bloxd-ui/ButtonHolder.png') no-repeat center/cover;\n transform-origin: top;\n";
  1004. btn.onmouseenter = function () { return (btn.style.transform = "scaleY(1.05)"); };
  1005. btn.onmouseleave = function () { return (btn.style.transform = "scaleY(1)"); };
  1006. var titleContainer = document.createElement("div");
  1007. titleContainer.style.cssText = "position:absolute;top:5px;left:5px;display:flex;align-items:center;";
  1008. btn.appendChild(titleContainer);
  1009. var titleText = document.createElement("div");
  1010. titleText.innerText = title;
  1011. titleText.style.cssText =
  1012. "font-family:Gabarito,sans-serif;font-size:16px;font-weight:500;color:white;";
  1013. titleContainer.appendChild(titleText);
  1014. var secondTitleText = document.createElement("div");
  1015. secondTitleText.innerText = secondTitle;
  1016. secondTitleText.style.cssText =
  1017. "margin-left:5px;font-family:Gabarito,sans-serif;font-size:13px;font-weight:400;color:rgba(255, 255, 255, 0.56);";
  1018. titleContainer.appendChild(secondTitleText);
  1019. var descriptionText = document.createElement("div");
  1020. descriptionText.innerText = additionalInfo;
  1021. descriptionText.style.cssText =
  1022. "position:absolute;top:50px;left:5px;font-family:Gabarito,sans-serif;font-size:14px;font-weight:400;color:rgba(255, 255, 255, 0.71);";
  1023. btn.appendChild(descriptionText);
  1024. var currentKeybind = ((_a = Keybinds.find(function (bind) { return bind.Module === title; })) === null || _a === void 0 ? void 0 : _a.Keybind) || "None";
  1025. var keybindBox = document.createElement("div");
  1026. keybindBox.innerText = currentKeybind;
  1027. keybindBox.style.cssText = "\n position: absolute;\n bottom: 5px;\n right: 5px;\n width: 50px;\n height: 20px;\n background: rgba(0, 0, 0, 0.5);\n color: white;\n font-family: Gabarito, sans-serif;\n font-size: 12px;\n font-weight: 400;\n text-align: center;\n line-height: 20px;\n border-radius: 5px;\n cursor: pointer;\n";
  1028. btn.appendChild(keybindBox);
  1029. btn.onclick = function () {
  1030. document.addEventListener("keydown", function (event) {
  1031. ChangeKeybind(title, event.key.toString(), event.code ? event.code.toString() : "");
  1032. keybindBox.innerText = event.key.toUpperCase();
  1033. }, { once: true });
  1034. };
  1035. keybindBox.onclick = function (event) {
  1036. event.stopPropagation();
  1037. ChangeKeybind(title, "", "");
  1038. keybindBox.innerText = "None";
  1039. };
  1040. return btn;
  1041. }
  1042. function createButton(button, index, buttonContainer) {
  1043. var btn = document.createElement('img');
  1044. btn.src = button.src;
  1045. btn.style.cssText = "\n position: absolute;\n width: 104px;\n height: 23.3px;\n left: 50%;\n transform: translateX(-50%);\n top: ".concat(15 + index * 35, "px;\n z-index: 2147483652;\n transition: transform 0.2s, scale 0.2s;\n cursor: pointer;\n ");
  1046. btn.addEventListener('mouseenter', function () {
  1047. btn.style.transform = 'translateX(-50%) scale(1.05)';
  1048. });
  1049. btn.addEventListener('mouseleave', function () {
  1050. btn.style.transform = 'translateX(-50%) scale(1)';
  1051. });
  1052. btn.addEventListener('click', button.onClick);
  1053. buttonContainer.appendChild(btn);
  1054. }
  1055. function ButtonType(BTN_TYPE) {
  1056. if (BTN_TYPE === void 0) { BTN_TYPE = ""; }
  1057. console.log("active" + BTN_TYPE);
  1058. var rightButtonContainer = document.getElementById("rightButtonContainer");
  1059. if (!rightButtonContainer)
  1060. return;
  1061. while (rightButtonContainer.firstChild) {
  1062. rightButtonContainer.removeChild(rightButtonContainer.firstChild);
  1063. }
  1064. if (BTN_TYPE === "Debug") {
  1065. miniConsole.style.display = 'block';
  1066. }
  1067. else {
  1068. miniConsole.style.display = 'none';
  1069. }
  1070. if (BTN_TYPE === "Themes") {
  1071. themes.forEach(function (theme) {
  1072. rightButtonContainer.appendChild(createRightThemeButton(theme.name, "(Theme)", theme.desc, function () {
  1073. addOutput("Theme", theme.name, "is now active.");
  1074. leftImage.src = theme.LeftImage;
  1075. rightImage.src = theme.RightImage;
  1076. Save_SaveManager.saveString('activeTheme', theme.name);
  1077. }));
  1078. });
  1079. }
  1080. if (BTN_TYPE === "Settings") {
  1081. Exploits.forEach(function (exploit) {
  1082. rightButtonContainer.appendChild(createKeybindButton(exploit.title, "Keybind", "Change keybind"));
  1083. });
  1084. }
  1085. Exploits.forEach(function (exploit) {
  1086. if (exploit.type === BTN_TYPE || BTN_TYPE === "") {
  1087. rightButtonContainer.appendChild(createRightButton(exploit.title, "(".concat(exploit.type, ")"), exploit.desc, exploit.pertick));
  1088. }
  1089. });
  1090. }
  1091. var themes = [
  1092. {
  1093. name: "(Default) Melon Hub",
  1094. LeftImage: "https://github.com/OfficiallyMelon/Melon-Hub/blob/main/Assets/bloxd.io/LeftMelon.png?raw=true",
  1095. RightImage: "https://github.com/OfficiallyMelon/Melon-Hub/blob/main/Assets/bloxd.io/RightMelon.png?raw=true",
  1096. desc: "The default Melon Hub theme.",
  1097. },
  1098. {
  1099. name: "Netflix",
  1100. LeftImage: "https://github.com/OfficiallyMelon/Melon-Hub/blob/main/Assets/bloxd.io/LeftNetflix.png?raw=true",
  1101. RightImage: "https://github.com/OfficiallyMelon/Melon-Hub/blob/main/Assets/bloxd.io/RIghtNetflix.png?raw=true",
  1102. desc: "Netflix theme including Red and Black colors, and Netlix logos.",
  1103. },
  1104. {
  1105. name: "McDonalds",
  1106. LeftImage: "https://github.com/OfficiallyMelon/Melon-Hub/blob/main/Assets/bloxd.io/LeftMaccas.png?raw=true",
  1107. RightImage: "https://github.com/OfficiallyMelon/Melon-Hub/blob/main/Assets/bloxd.io/RightMaccas.png?raw=true",
  1108. desc: "I ran out of theme ideas lmao"
  1109. },
  1110. {
  1111. name: "Minecraft",
  1112. LeftImage: "https://github.com/OfficiallyMelon/Melon-Hub/blob/main/Assets/bloxd.io/LeftMinecraft.png?raw=true",
  1113. RightImage: "https://github.com/OfficiallyMelon/Melon-Hub/blob/main/Assets/bloxd.io/RightMinecraft.png?raw=true",
  1114. desc: "Minecraft theme including grass and dirt blocks."
  1115. },
  1116. {
  1117. name: "Hatsune Miku",
  1118. LeftImage: "https://github.com/OfficiallyMelon/Melon-Hub/blob/main/Assets/bloxd.io/LeftMiku.png?raw=true",
  1119. RightImage: "https://github.com/OfficiallyMelon/Melon-Hub/blob/main/Assets/bloxd.io/RightMiku.png?raw=true",
  1120. desc: "I'm thinking Miku, Miku, oo-ee-oo"
  1121. }
  1122. ];
  1123. var buttonData = [
  1124. {
  1125. src: 'https://github.com/OfficiallyMelon/Melon-Hub/blob/main/Assets/bloxd.io/AllBTN.png?raw=true',
  1126. style: 'top:15px;',
  1127. onClick: function () { return ButtonType(""); },
  1128. },
  1129. {
  1130. src: 'https://github.com/OfficiallyMelon/Melon-Hub/blob/main/Assets/bloxd.io/CombatBTN.png?raw=true',
  1131. style: 'top:72px;',
  1132. onClick: function () { return ButtonType("Combat"); },
  1133. },
  1134. {
  1135. src: 'https://github.com/OfficiallyMelon/Melon-Hub/blob/main/Assets/bloxd.io/MovementBTN.png?raw=true',
  1136. style: 'top:119px;',
  1137. onClick: function () { return ButtonType("Movement"); },
  1138. },
  1139. {
  1140. src: 'https://github.com/OfficiallyMelon/Melon-Hub/blob/main/Assets/bloxd.io/PlayerBTN.png?raw=true',
  1141. style: 'top:166px;',
  1142. onClick: function () { return ButtonType("Player"); },
  1143. },
  1144. {
  1145. src: 'https://github.com/OfficiallyMelon/Melon-Hub/blob/main/Assets/bloxd.io/ExploitBTN.png?raw=true',
  1146. style: 'top:213px;',
  1147. onClick: function () { return ButtonType("Exploit"); },
  1148. },
  1149. {
  1150. src: 'https://github.com/OfficiallyMelon/Melon-Hub/blob/main/Assets/bloxd.io/OtherBTN.png?raw=true',
  1151. style: 'top:260px;',
  1152. onClick: function () { return ButtonType("Other"); },
  1153. },
  1154. {
  1155. src: 'https://github.com/OfficiallyMelon/Melon-Hub/blob/main/Assets/bloxd.io/SettingsBTN.png?raw=true',
  1156. style: 'top:354px;',
  1157. onClick: function () { return ButtonType("Settings"); },
  1158. },
  1159. {
  1160. src: 'https://github.com/OfficiallyMelon/Melon-Hub/blob/main/Assets/bloxd.io/ThemesBTN.png?raw=true',
  1161. style: 'top:401px;',
  1162. onClick: function () { return ButtonType("Themes"); },
  1163. },
  1164. {
  1165. src: 'https://github.com/OfficiallyMelon/Melon-Hub/blob/main/Assets/bloxd.io/DebugBTN.png?raw=true',
  1166. style: 'top:401px;',
  1167. onClick: function () { return ButtonType("Debug"); },
  1168. },
  1169. ];
  1170. buttonData.forEach(function (button, index) {
  1171. var btn = document.createElement('img');
  1172. btn.src = button.src;
  1173. btn.style.cssText = "position: absolute; width: 104px; height: 23.3px; left: 50%; transform: translateX(-50%); top: ".concat(15 + index * 35, "px; z-index: 2147483652; transition: transform 0.2s, scale 0.2s; cursor: pointer;");
  1174. btn.addEventListener('mouseenter', function () { return btn.style.transform = 'translateX(-50%) scale(1.05)'; });
  1175. btn.addEventListener('mouseleave', function () { return btn.style.transform = 'translateX(-50%) scale(1)'; });
  1176. btn.addEventListener('click', button.onClick);
  1177. buttonContainer.appendChild(btn);
  1178. });
  1179. ButtonType("");
  1180. window.ondragstart = function () { return false; };
  1181. // Save/Import
  1182. var savedTheme = Save_SaveManager.importString('activeTheme');
  1183. if (savedTheme) {
  1184. var theme = themes.find(function (t) { return t.name === savedTheme; });
  1185. if (theme) {
  1186. leftImage.src = theme.LeftImage;
  1187. rightImage.src = theme.RightImage;
  1188. }
  1189. }
  1190.  
  1191.  
  1192. /******/ })()
  1193. ;

QingJ © 2025

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