Greasy Fork is available in English.

Melon Hub (bloxd.io)

like steroids for bloxd.io, open source on github.

As of 2025-02-02. See the latest version.

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