blackhack

Cheat for brofist.io

  1. // ==UserScript==
  2. // @name blackhack
  3. // @version 1.14-beta4
  4. // @description Cheat for brofist.io
  5. // @author CiNoP
  6. // @match https://brofist.io/
  7. // @match https://brofist.io/modes/twoPlayer/c/index.html
  8. // @match https://brofist.io/modes/hideAndSeek/c/index.html
  9. // @match https://brofist.io/modes/sandbox/c/index.html
  10. // @match http://brofist.io/
  11. // @match http://brofist.io/modes/twoPlayer/c/index.html
  12. // @match http://brofist.io/modes/hideAndSeek/c/index.html
  13. // @match http://brofist.io/modes/sandbox/c/index.html
  14. // @match http://www.brofist.io/
  15. // @match http://www.brofist.io/modes/twoPlayer/c/index.html
  16. // @match http://www.brofist.io/modes/hideAndSeek/c/index.html
  17. // @match http://www.brofist.io/modes/sandbox/c/index.html
  18. // @icon https://www.google.com/s2/favicons?sz=64&domain=brofist.io
  19. // @grant none
  20. // @license GPL-3.0-only
  21. // @namespace brofist.io 1st-cheat (FOR ALL MODES)
  22. // ==/UserScript==
  23. /* jshint esversion: 11 */
  24. /* jshint asi: true */
  25.  
  26.  
  27.  
  28.  
  29.  
  30.  
  31. // Функция для переключения вкладок (пример реализации)
  32. window.openTab = function(tabName, event) {
  33. const tabContents = document.querySelectorAll(".tab-content");
  34. tabContents.forEach(tab => tab.style.display = "none");
  35. const buttons = document.querySelectorAll(".tab-button");
  36. buttons.forEach(btn => btn.classList.remove("active"));
  37. document.getElementById(tabName + "Tab").style.display = "block";
  38. event.currentTarget.classList.add("active");
  39. }
  40.  
  41.  
  42.  
  43.  
  44. // Функция для обновления списка в контейнере
  45. window.updateBlacklistList = function() {
  46. const container = document.getElementById("blacklistContainer");
  47. container.innerHTML = "";
  48. hack.vars.blacklisted.names.forEach(name => {
  49. const row = document.createElement("div");
  50. row.className = "form-row";
  51. row.style.justifyContent = "flex-start";
  52. row.style.alignItems = "center";
  53. row.style.gap = "8px"; // Увеличиваем зазор между элементами
  54.  
  55. // Кнопка для удаления (эмодзи ❌) - сделана квадратной
  56. const delBtn = document.createElement("button");
  57. delBtn.className = "btn";
  58. delBtn.style.padding = "0";
  59. delBtn.style.width = "24px";
  60. delBtn.style.height = "24px";
  61. delBtn.style.lineHeight = "24px";
  62. delBtn.style.display = "flex";
  63. delBtn.style.alignItems = "center";
  64. delBtn.style.justifyContent = "center";
  65. delBtn.style.boxSizing = "border-box";
  66. delBtn.innerText = "❌";
  67. delBtn.onclick = function() {
  68. window.removeBlacklistName(name);
  69. };
  70.  
  71. // Эмодзи белой точки
  72. const whiteDot = document.createElement("span");
  73. whiteDot.innerText = "⚪";
  74. whiteDot.style.marginRight = "4px"; // расстояние между белой точкой и никнеймом
  75.  
  76. const nameSpan = document.createElement("span");
  77. nameSpan.innerText = name;
  78.  
  79. row.appendChild(delBtn);
  80. row.appendChild(whiteDot);
  81. row.appendChild(nameSpan);
  82. container.appendChild(row);
  83. });
  84. }
  85.  
  86. // Функция добавления никнейма
  87. window.addBlacklistName = function() {
  88. const input = document.getElementById("blacklistInput");
  89. const name = input.value.trim();
  90. if (name !== "" && !hack.vars.blacklisted.names.includes(name)) {
  91. hack.vars.blacklisted.names.push(name);
  92. input.value = "";
  93. window.updateBlacklistList();
  94. }
  95. }
  96.  
  97.  
  98. // Функция удаления никнейма по клику на ❌
  99. window.removeBlacklistName = function(name) {
  100. hack.vars.blacklisted.names = hack.vars.blacklisted.names.filter(e => e !== name);
  101. window.updateBlacklistList();
  102. }
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120. // Функция, возвращающая противоположный (инвертированный) цвет в формате HEX
  121. window.getComplementaryColor = function(hex) {
  122. hex = hex.replace("#", "");
  123. if (hex.length === 3) {
  124. hex = hex.split("").map(ch => ch + ch).join("");
  125. }
  126. const r = parseInt(hex.substring(0, 2), 16);
  127. const g = parseInt(hex.substring(2, 4), 16);
  128. const b = parseInt(hex.substring(4, 6), 16);
  129. const compR = (255 - r).toString(16).padStart(2, '0');
  130. const compG = (255 - g).toString(16).padStart(2, '0');
  131. const compB = (255 - b).toString(16).padStart(2, '0');
  132. return `#${compR}${compG}${compB}`;
  133. }
  134.  
  135. // Преобразование HEX в RGBA с учетом прозрачности
  136. window.hexToRGBA = function(hex, opacity) {
  137. hex = hex.replace("#", "");
  138. if (hex.length === 3) {
  139. hex = hex.split("").map(ch => ch + ch).join("");
  140. }
  141. const r = parseInt(hex.substring(0, 2), 16);
  142. const g = parseInt(hex.substring(2, 4), 16);
  143. const b = parseInt(hex.substring(4, 6), 16);
  144. return `rgba(${r}, ${g}, ${b}, ${opacity})`;
  145. };
  146.  
  147. // Функция для применения выбранных настроек косметики
  148. window.applyCosmetics = function() {
  149. const bgColor = document.getElementById("bgColorInput").value;
  150. const textColor = document.getElementById("textColorInput").value;
  151. const bgOpacity = parseFloat(document.getElementById("bgOpacityInput").value);
  152. const outlineEnabled = document.getElementById("textOutlineCheckbox").checked;
  153.  
  154. const background = window.hexToRGBA(bgColor, bgOpacity);
  155. const elementIds = ["someData", "controlPanel", "mapCredits", "leaderboard", "timer"];
  156.  
  157. elementIds.forEach(id => {
  158. const el = document.getElementById(id);
  159. if (el) {
  160. el.style.setProperty("background-color", background, "important");
  161. el.style.setProperty("opacity", "1", "important");
  162.  
  163. // Меняем цвет текста и добавляем обводку, если это не leaderboard
  164. if (id !== "leaderboard") {
  165. el.style.setProperty("color", textColor, "important");
  166.  
  167. if (outlineEnabled) {
  168. const outlineColor = getComplementaryColor(textColor);
  169. el.style.setProperty("text-shadow", `
  170. 0.75px 0.75px 0 ${outlineColor},
  171. -0.75px -0.75px 0 ${outlineColor},
  172. 0.75px -0.75px 0 ${outlineColor},
  173. -0.75px 0.75px 0 ${outlineColor},
  174. 0.75px 0 0 ${outlineColor},
  175. 0 0.75px 0 ${outlineColor},
  176. -0.75px 0 0 ${outlineColor},
  177. 0 -0.75px 0 ${outlineColor}
  178. `, "important");
  179. } else {
  180. el.style.setProperty("text-shadow", "none", "important");
  181. }
  182. }
  183. }
  184. });
  185.  
  186. localStorage.setItem("cosmeticsSettings", JSON.stringify({
  187. bgColor,
  188. textColor,
  189. bgOpacity,
  190. outlineEnabled
  191. }));
  192. };
  193.  
  194. // Функция для загрузки сохраненных настроек
  195. window.loadCosmetics = function() {
  196. const savedSettings = localStorage.getItem("cosmeticsSettings");
  197. if (savedSettings) {
  198. const {
  199. bgColor,
  200. textColor,
  201. bgOpacity,
  202. outlineEnabled
  203. } = JSON.parse(savedSettings);
  204.  
  205. document.getElementById("bgColorInput").value = bgColor;
  206. document.getElementById("textColorInput").value = textColor;
  207. document.getElementById("bgOpacityInput").value = bgOpacity;
  208. if (typeof outlineEnabled !== "undefined") {
  209. document.getElementById("textOutlineCheckbox").checked = outlineEnabled;
  210. }
  211.  
  212. window.applyCosmetics();
  213. }
  214. };
  215.  
  216.  
  217.  
  218.  
  219.  
  220. const roomButtons = document.querySelectorAll('.button.rooms');
  221. roomButtons.forEach(button => {
  222. button.addEventListener('click', function() {
  223. setTimeout(function() {
  224. window.loadCosmetics();
  225. }, 30);
  226. });
  227. });
  228.  
  229.  
  230.  
  231.  
  232.  
  233.  
  234.  
  235.  
  236.  
  237.  
  238.  
  239. let sandboxURL = ['https://brofist.io/modes/sandbox/c/index.html', 'http://brofist.io/modes/sandbox/c/index.html', 'http://www.brofist.io/modes/sandbox/c/index.html']
  240. let twoPlayerURL = ['https://brofist.io/modes/twoPlayer/c/index.html', 'http://brofist.io/modes/twoPlayer/c/index.html','http://www.brofist.io/modes/twoPlayer/c/index.html']
  241. let hideAndSeekURL = ['https://brofist.io/modes/hideAndSeek/c/index.html', 'http://brofist.io/modes/hideAndSeek/c/index.html', 'http://www.brofist.io/modes/hideAndSeek/c/index.html']
  242. let brofioURL = ['https://brofist.io', 'http://brofist.io/']
  243.  
  244. document.body.insertAdjacentHTML("beforebegin",
  245. `<button id="infoPanelBtn" style="display: inherit; width: 30px; height: 30px; position: fixed; top: 50%; left: 0px; background: rgba(0, 0, 0, 0.3); color: rgb(255, 255, 255); border: none; cursor: pointer;">ⓘ</button>`
  246. );
  247.  
  248. document.body.insertAdjacentHTML("beforebegin",
  249. `<div id="infoPanelArrow" style="position: fixed; left: 35px; top: 50%; font-size: 30px; color: #FF4136; opacity: 0; transform: translateY(-50%);">➤</div>`
  250. );
  251.  
  252. document.getElementById('infoPanelBtn').addEventListener('click', () => {
  253. const panel = document.getElementById('cheatInfoPanel');
  254. panel.style.display = (panel.style.display === 'none') ? 'block' : 'none';
  255. });
  256.  
  257. document.body.insertAdjacentHTML("beforebegin",
  258. `<div id="cheatInfoPanel" style="display: none; position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); background: rgba(0, 0, 0, 0.8); color: rgb(255, 255, 255); padding: 15px; border-radius: 5px; font-size: 20px; text-align: center; z-index: 1000; font-family: Arial, sans-serif; cursor: move; max-width: 90%; max-height: 90%; overflow: auto; user-select: none;">
  259. <div style="margin-bottom: 10px;">
  260. <button id="decreaseFont" style="margin-right: 5px;">-</button>
  261. <button id="increaseFont">+</button>
  262. </div>
  263. <div id="cheatInfoText">
  264. ${getCheatInfoText()}
  265. </div>
  266. </div>`
  267. );
  268.  
  269. makePanelDraggable(document.getElementById('cheatInfoPanel'));
  270.  
  271. function getCheatInfoText() {
  272. if (brofioURL.includes(window.location.href)) {
  273. return "Зайдите в любой режим";
  274. } else if (twoPlayerURL.includes(window.location.href)) {
  275. return `
  276. <b>Функционал чита:</b><br>
  277. английская <b>C</b> - Рывок (во все стороны)<br>
  278. англ. <b>Z</b> - Прыжок с возможностью второго прыжка<br>
  279. <b>F2</b> - Режим бога<br>
  280. <b>ё</b> или <b>\`</b> - Изменение скорости в режиме бога<br>
  281. <b>F4</b> - Невосприимчивость к яду<br>
  282. <b>F9</b> - Невосприимчивость к смерти (по умолчанию вкл.)<br>
  283. <b>Home</b>/<b>End</b> - тп к спавну/двери<br>
  284. Зажатие англ. <b>S</b> - Увеличение массы в 3 раза<br>
  285. <b>Insert</b> - Тп к игроку<br>
  286. <b>Колесо мыши</b> - Выдача вертикальной скорости<br>
  287. <b>Правый клик</b> - Телепорт к месту на котором ваш курсор<br><br>
  288.  
  289. <b так же:</b><br>
  290. Информация об игроке, скриптовых переменных и т.п. во вкладке Info<br>
  291. Изменение стиля интерфейса во вкладке Cosmetics<br>
  292. Переключение между новым и старым передвижением в левой нижней панели<br>
  293. Нажмите <b>Esc</b> чтобы скрыть новые панели<br>
  294. `;
  295. } else {
  296. return `
  297. <b>Функционал чита:</b><br>
  298. английская <b>C</b> - Рывок (во все стороны)<br>
  299. англ. <b>Z</b> - Прыжок с возможностью второго прыжка<br>
  300. <b>F2</b> - Режим бога<br>
  301. <b>ё</b> или <b>\`</b> - Изменение скорости в режиме бога<br>
  302. Зажатие англ. <b>S</b> - Увеличение массы в 3 раза<br>
  303. <b>Колесо мыши</b> - Выдача вертикальной скорости<br><br>
  304.  
  305. <b так же:</b><br>
  306. Информация об игроке, скриптовых переменных и т.п. в левой верхней панели<br>
  307. Переключение между новым и старым передвижением в левой нижней панели<br>
  308. Нажмите <b>Esc</b> чтобы скрыть новые панели<br>
  309. `;
  310. }
  311. }
  312.  
  313. function makePanelDraggable(panel) {
  314. let isDragging = false;
  315. let startX, startY, initialX, initialY;
  316.  
  317. panel.addEventListener('mousedown', dragStart);
  318. document.addEventListener('mouseup', dragEnd);
  319. document.addEventListener('mousemove', drag);
  320.  
  321. function dragStart(e) {
  322. isDragging = true;
  323. startX = e.clientX;
  324. startY = e.clientY;
  325. const rect = panel.getBoundingClientRect();
  326. initialX = rect.left;
  327. initialY = rect.top;
  328. panel.style.transform = 'none';
  329. }
  330.  
  331. function drag(e) {
  332. if (!isDragging) return;
  333.  
  334. const offsetX = e.clientX - startX;
  335. const offsetY = e.clientY - startY;
  336.  
  337. let newX = initialX + offsetX;
  338. let newY = initialY + offsetY;
  339.  
  340. const windowWidth = window.innerWidth;
  341. const windowHeight = window.innerHeight;
  342. const panelRect = panel.getBoundingClientRect();
  343.  
  344. const scrollbarWidth = window.innerWidth - document.documentElement.clientWidth;
  345. const scrollbarHeight = window.innerHeight - document.documentElement.clientHeight;
  346.  
  347. newX = Math.max(0, Math.min(windowWidth - panelRect.width - scrollbarWidth, newX));
  348. newY = Math.max(0, Math.min(windowHeight - panelRect.height - scrollbarHeight, newY));
  349.  
  350. panel.style.left = `${newX}px`;
  351. panel.style.top = `${newY}px`;
  352. }
  353.  
  354. function dragEnd() {
  355. isDragging = false;
  356. }
  357. }
  358.  
  359. const cheatInfoPanel = document.getElementById('cheatInfoPanel');
  360. const cheatInfoText = document.getElementById('cheatInfoText');
  361. const decreaseFontBtn = document.getElementById('decreaseFont');
  362. const increaseFontBtn = document.getElementById('increaseFont');
  363.  
  364. let fontSize = 20;
  365.  
  366. decreaseFontBtn.addEventListener('click', () => {
  367. fontSize = Math.max(10, fontSize - 2);
  368. cheatInfoText.style.fontSize = fontSize + 'px';
  369. });
  370.  
  371. increaseFontBtn.addEventListener('click', () => {
  372. fontSize = Math.min(40, fontSize + 2);
  373. cheatInfoText.style.fontSize = fontSize + 'px';
  374. });
  375.  
  376. const infoPanelArrow = document.getElementById('infoPanelArrow');
  377. let animationCount = 0;
  378. let animationRunning = false;
  379.  
  380. function initializeArrow() {
  381. infoPanelArrow.style.position = 'fixed';
  382. infoPanelArrow.style.top = '50%';
  383. infoPanelArrow.style.left = '35px';
  384. infoPanelArrow.style.transform = 'translateY(-50%) rotate(180deg)';
  385. infoPanelArrow.style.opacity = 0;
  386. infoPanelArrow.style.top = 'calc(50% + 15px)'
  387. }
  388.  
  389. function animateArrow() {
  390. if (animationRunning) return;
  391.  
  392. animationRunning = true;
  393. let opacity = 0;
  394. let fadeIn = true;
  395.  
  396. const animationSpeed = 25;
  397.  
  398. const animation = setInterval(() => {
  399. if (fadeIn) {
  400. opacity += 0.1;
  401. if (opacity >= 1) {
  402. fadeIn = false;
  403. }
  404. } else {
  405. opacity -= 0.1;
  406. if (opacity <= 0) {
  407. fadeIn = true;
  408. animationCount++;
  409. if (animationCount >= 10) {
  410. clearInterval(animation);
  411. animationRunning = false;
  412. infoPanelArrow.style.opacity = 0;
  413. }
  414. }
  415. }
  416.  
  417. infoPanelArrow.style.opacity = opacity;
  418. }, animationSpeed);
  419. }
  420.  
  421.  
  422. initializeArrow();
  423. animateArrow();
  424.  
  425.  
  426.  
  427.  
  428.  
  429. function sandboxHack() {
  430. function activateMain(temp1) {
  431. const hack = {
  432. keyBindings: {
  433. isCPressed: false,
  434. cTimer: null,
  435. isZPressed: false
  436. },
  437. playerMoveData: {
  438. lastHorizontalDirection: 1,
  439. isDashingDown: false,
  440. isDashingUp: false,
  441. lastDashTime: 0,
  442. dashDuration: 100,
  443. dashEndTime: 0,
  444. isDoubleJumpAllowed: false,
  445. airDashAvailable: true,
  446. newMovementIsOn: false,
  447. },
  448. bindKeys: function() {
  449. document.addEventListener('keydown', function(event) {
  450. if (event.key === 'Escape') {
  451. const panel = document.getElementById('someData')
  452. const panel1 = document.getElementById('controlPanel')
  453. if (panel.style.display === 'none') {
  454. panel.style.display = 'inherit'
  455. } else {
  456. panel.style.display = 'none'
  457. }
  458. if (panel1.style.display === 'none') {
  459. panel1.style.display = 'inherit'
  460. } else {
  461. panel1.style.display = 'none'
  462. }
  463. }
  464. if (event.key.toLowerCase() === 's' && event.repeat) {
  465. if (!hack.vars.modeIsOn) {
  466. hack.getters.me.p.mass = 3
  467. }
  468. }
  469. if (event.key.toLowerCase() === 'z' && !event.repeat) {
  470. hack.keyBindings.isZPressed = true
  471. } else if (event.repeat) {
  472. hack.keyBindings.isZPressed = false
  473. }
  474. if (event.key.toLowerCase() === 'c') {
  475. hack.keyBindings.isCPressed = true
  476. if (!hack.keyBindings.cTimer) {
  477. hack.keyBindings.cTimer = setTimeout(() => {
  478. hack.keyBindings.isCPressed = false
  479. hack.keyBindings.cTimer = null
  480. }, 250)
  481. }
  482. }
  483. })
  484. document.addEventListener('keyup', function(event) {
  485. if (event.key.toLowerCase() === 's') {
  486. if (!hack.vars.modeIsOn) {
  487. hack.getters.me.p.mass = 1
  488. }
  489. }
  490. if (event.key.toLowerCase() === 'z') {
  491. hack.keyBindings.isZPressed = false
  492. }
  493. if (event.key.toLowerCase() === 'c') {
  494. hack.keyBindings.isCPressed = false
  495. if (hack.keyBindings.cTimer) {
  496. clearTimeout(hack.keyBindings.cTimer)
  497. hack.keyBindings.cTimer = null
  498. }
  499. }
  500. })
  501. },
  502. getters: {
  503. get client() {
  504. return temp1[38].exports
  505. },
  506. get gf() {
  507. return temp1[42].exports
  508. },
  509. get gp() {
  510. return temp1[43].exports
  511. },
  512. get graphics() {
  513. return temp1[44].exports
  514. },
  515. get mode() {
  516. return temp1[48].exports
  517. },
  518. get envirData() {
  519. return temp1[53].exports
  520. },
  521. get network() {
  522. return temp1[66].exports
  523. },
  524. get physics() {
  525. return temp1[362].exports
  526. },
  527. get me() {
  528. return hack.getters.mode.player.gpData
  529. },
  530. get ray() {
  531. return hack.getters.me.ray
  532. },
  533. get velocity() {
  534. return hack.getters.me.p.velocity
  535. },
  536. get otherPlayers() {
  537. return hack.getters.mode.otherPlayers
  538. },
  539. get velocity() {
  540. return this.mode.player.gpData.p.velocity
  541. },
  542. get otherPlayers() {
  543. return this.mode.otherPlayers
  544. },
  545. ghost: false,
  546. get me() {
  547. return hack.getters.mode.player.gpData
  548. },
  549. get ray() {
  550. return hack.getters.me.ray
  551. },
  552. get velocity() {
  553. return hack.getters.me.p.velocity
  554. },
  555. get otherPlayers() {
  556. return hack.getters.mode.otherPlayers
  557. }
  558. },
  559. vars: {
  560. get isGround() {
  561. return isGrounded()
  562. },
  563. mult: 1,
  564. lrSpd: 3,
  565. udSpd: 3,
  566. 'POSITION INFO ': '-----------------------',
  567. get currentPosX() {
  568. return Math.round(hack.getters.me.getX() * 100) / 100
  569. },
  570. get currentPosY() {
  571. return Math.round(hack.getters.me.getY() * 100) / 100
  572. },
  573. 'SPEED INFO ': '----------------------------',
  574. get totalSpd() {
  575. return (((this.lrSpd + this.udSpd) / 2) * this.mult)
  576. },
  577. get currentSpdX() {
  578. return Math.round(hack.getters.me.p.velocity[0] * 100) / 100
  579. },
  580. get currentSpdY() {
  581. return Math.round(hack.getters.me.p.velocity[1] * 100) / 100
  582. },
  583. 'SCRIPT VALUES ': '----------------------',
  584. multSpdIsOn: false,
  585. modeIsOn: false,
  586. ghost1: false,
  587. 'MOVEMENT VALUES ': '---------------'
  588. },
  589. suppFuncs: {
  590. getMult: () => {
  591. if (hack.vars.mult < 3) {
  592. return 1
  593. } else if (hack.vars.mult < 4) {
  594. return 2
  595. }
  596. },
  597. setMult: function(e) {
  598. if (e != undefined) {
  599. hack.vars.lrSpd = hack.vars.udSpd = e
  600. return
  601. }
  602. if (hack.suppFuncs.getMult() === 1) {
  603. hack.vars.mult++
  604. } else if (hack.suppFuncs.getMult() === 2) {
  605. hack.vars.mult += 2
  606. } else {
  607. hack.vars.mult = 1
  608. }
  609. },
  610. getIndexByName: function(playerName) {
  611. const index = hack.getters.otherPlayers.findIndex(player => player?.myName === playerName)
  612. return index === -1 ? false : index
  613. }
  614. },
  615. functions: {
  616. godModeEnable: () => {
  617. hack.vars.ghost1 = true
  618. hack.getters.me.p.collisionResponse = false
  619. hack.getters.me.p.mass = 0
  620. hack.vars.modeIsOn = true
  621. hack.getters.velocity[0] = 0
  622. hack.getters.velocity[1] = 0
  623. },
  624. godModeDisable: () => {
  625. hack.vars.ghost1 = false
  626. hack.getters.me.p.collisionResponse = true
  627. hack.getters.me.p.mass = 1
  628. hack.vars.modeIsOn = false
  629. hack.getters.velocity[0] = 0
  630. hack.getters.velocity[1] = 0
  631. },
  632. multSpdEnable: () => {
  633. hack.vars.lrSpd *= hack.vars.mult
  634. hack.vars.udSpd *= hack.vars.mult
  635. hack.vars.multSpdIsOn = true
  636. },
  637. multSpdDisable: () => {
  638. hack.vars.lrSpd /= hack.vars.mult
  639. hack.vars.udSpd /= hack.vars.mult
  640. hack.vars.multSpdIsOn = false
  641. }
  642. },
  643. logFuncs: {
  644. logModeIsOn: () => {
  645. console.log('modeIsOn:', hack.vars.modeIsOn)
  646. },
  647. logSpd: () => {
  648. console.log('speed:', ((hack.vars.lrSpd + hack.vars.udSpd) / 2) * hack.vars.mult)
  649. }
  650. }
  651. }
  652. document.body.insertAdjacentHTML("beforebegin", `
  653. <div id="someData" style="display: inherit; width: auto; position: fixed; top: 0px; left: 0px; height: auto; text-align: left; font-size: 14px; background: rgb(0, 0, 0); color: rgb(255, 255, 255); opacity: 0.7; padding: 2px 2px;"></div>
  654. `)
  655.  
  656. const updateData = () => {
  657. const o = []
  658. for (let i in hack.vars) {
  659. const res = ''
  660. for (let char of i) {
  661. res += char
  662. if (char === char.toUpperCase()) {
  663. res += ''
  664. }
  665. }
  666. o.push(`${res}: ${hack.vars[i]}`)
  667. }
  668. for (let i in hack.playerMoveData) {
  669. o.push(`${i}: ${hack.playerMoveData[i]}`)
  670. }
  671. document.getElementById("someData").innerHTML = o.join('<br>')
  672. }
  673.  
  674. document.body.insertAdjacentHTML("beforebegin", `
  675. <div id="controlPanel" style="display: inherit; width: auto; position: fixed; bottom: 0px; left: 0px; height: auto; text-align: left; font-size: 14px; background: rgb(0, 0, 0); color: rgb(255, 255, 255); opacity: 0.7; padding: 2px 2px;">
  676. <div>
  677. <span>new movement: </span>
  678. <button id="newMoveBtn" style="background: rgba(255, 255, 255, 0.7); color: black;">${hack.playerMoveData.newMovementIsOn}</button>
  679. </div>
  680. </div>
  681. `)
  682.  
  683. const updateButtonStates = () => {
  684. document.getElementById("newMoveBtn").innerText = hack.playerMoveData.newMovementIsOn
  685. }
  686.  
  687. document.getElementById("newMoveBtn").addEventListener("click", () => {
  688. if (!hack.playerMoveData.newMovementIsOn) {
  689. newMovement()
  690. } else {
  691. oldMovement()
  692. }
  693. updateButtonStates()
  694. })
  695.  
  696. setInterval(updateData, 100 / 6)
  697. updateButtonStates()
  698. setInterval(updateButtonStates, 100 / 6)
  699. hack.bindKeys()
  700.  
  701. let scrActivate = function() {
  702. hack.getters.client.loopFunctions[2].timeOut = 100 / 6
  703. hack.getters.client.loopFunctions[3].timeOut = 0
  704. oldMovement()
  705. Object.defineProperty(hack.vars, 'mult', {
  706. enumerable: false
  707. })
  708. Object.defineProperty(hack.vars, 'lrSpd', {
  709. enumerable: false
  710. })
  711. Object.defineProperty(hack.vars, 'udSpd', {
  712. enumerable: false
  713. })
  714. Object.defineProperty(hack.vars, 'multSpdIsOn', {
  715. enumerable: false
  716. })
  717. Object.defineProperty(hack.vars, 'ghost1', {
  718. enumerable: false
  719. })
  720. Object.defineProperty(hack.playerMoveData, 'lastDashTime', {
  721. enumerable: false
  722. })
  723. Object.defineProperty(hack.playerMoveData, 'lastHorizontalDirection', {
  724. enumerable: false
  725. })
  726. Object.defineProperty(hack.playerMoveData, 'lastDashTime', {
  727. enumerable: false
  728. })
  729. Object.defineProperty(hack.playerMoveData, 'dashDuration', {
  730. enumerable: false
  731. })
  732. Object.defineProperty(hack.playerMoveData, 'dashEndTime', {
  733. enumerable: false
  734. })
  735. Object.defineProperty(hack.playerMoveData, 'newMovementIsOn', {
  736. enumerable: false
  737. })
  738. }
  739.  
  740. hack.getters.client.findUntilFound = function(e, t, n) {
  741. hack.getters.network.gsip = e;
  742. hack.getters.network.gsrn = t;
  743. hack.getters.network.getSID?.((sid) => {
  744. hack.getters.network.sid = sid;
  745. hack.getters.network.connectToGs?.(hack.getters.network.gsip, () => {
  746. console.log("connected to gs");
  747.  
  748. hack.getters.client.verifyIsHuman?.(() => {
  749. hack.getters.network.registerSidOnGs?.((verifyStatus) => {
  750. console.log("verified on gs server", verifyStatus);
  751.  
  752. if (verifyStatus === "") {
  753. alert("You are already playing the game in another browser tab.");
  754. location.reload();
  755. n(2);
  756. } else {
  757. hack.getters.network.joinRoom?.(hack.getters.network.gsrn, (joinStatus) => {
  758. if (joinStatus === 1) {
  759. hack.getters.client.sendPlayingInfo?.(hack.getters.client.roomId, () => {
  760. hack.getters.client.onReady?.();
  761. n(1);
  762. scrActivate()
  763. });
  764. } else {
  765. console.log("else");
  766. hack.getters.network.gsSockehack?.getters.client.disconnect?.();
  767.  
  768. do {
  769. hack.getters.client.rIndex++;
  770. const currentDataCenter = hack.getters.network.dataCenters?.[hack.getters.client.dcIndex];
  771.  
  772. if (!currentDataCenter?.[hack.getters.client.rIndex]) {
  773. hack.getters.client.dcIndex++;
  774. hack.getters.client.rIndex = 0;
  775.  
  776. if (!hack.getters.network.dataCenters?.[hack.getters.client.dcIndex]) {
  777. alert("It seems all servers are full. Please refresh your page and try again.");
  778. location.reload();
  779. return;
  780. }
  781. }
  782. } while (hack.getters.network.dataCenters?.[hack.getters.client.dcIndex]?.[hack.getters.client.rIndex]?.[2] !== hack.getters.client.modeInfo.mp);
  783.  
  784. const newGsip = hack.getters.network.dataCenters?.[hack.getters.client.dcIndex]?.[hack.getters.client.rIndex]?.[1];
  785. const newGsrn = hack.getters.network.dataCenters?.[hack.getters.client.dcIndex]?.[hack.getters.client.rIndex]?.[3];
  786. hack.getters.client.roomId = hack.getters.network.dataCenters?.[hack.getters.client.dcIndex]?.[hack.getters.client.rIndex]?.[4];
  787.  
  788. hack.getters.client.findUntilFound(newGsip, newGsrn, n);
  789. }
  790. });
  791. }
  792. });
  793. });
  794. });
  795. });
  796. };
  797.  
  798. document.body.onkeyup = (event) => {
  799. const key = event.key
  800. switch (key) {
  801. case 'PageUp':
  802. if (!hack.vars.modeIsOn) {
  803. hack.getters.me.p.gravityScale = 1
  804. hack.getters.me.p.collisionResponse = 1
  805. }
  806. break;
  807. case 'PageDown':
  808. if (!hack.vars.modeIsOn) {
  809. hack.getters.me.p.collisionResponse = 1
  810. }
  811. break;
  812. }
  813. }
  814.  
  815. document.body.onkeydown = (event) => {
  816. const key = event.key;
  817. switch (key) {
  818. case 'PageUp':
  819. if (!hack.vars.modeIsOn) {
  820. hack.getters.me.p.gravityScale = -1
  821. hack.getters.me.p.collisionResponse = 0
  822. }
  823. break;
  824. case 'PageDown':
  825. if (!hack.vars.modeIsOn) {
  826. hack.getters.me.p.gravityScale = 1
  827. hack.getters.me.p.collisionResponse = 0
  828. }
  829. break;
  830. case 'F2':
  831. if (!hack.vars.modeIsOn) {
  832. hack.functions.godModeEnable();
  833. hack.logFuncs.logModeIsOn();
  834. hack.functions.multSpdEnable();
  835. } else {
  836. hack.functions.godModeDisable();
  837. hack.logFuncs.logModeIsOn();
  838. hack.functions.multSpdDisable();
  839. }
  840. break;
  841. case '`': // Backtick (`)
  842. case 'ё'.toLowerCase(): // Cyrillic Yo (часто на той же клавише, что и Backtick)
  843. if (hack.vars.modeIsOn) {
  844. hack.suppFuncs.setMult();
  845. hack.logFuncs.logSpd();
  846. }
  847. break;
  848. }
  849. };
  850.  
  851. function isGrounded() {
  852. const meX = hack.getters.me.getX()
  853. const meY = hack.getters.me.getY()
  854. const ray = hack.getters.ray
  855. const physics = hack.getters.physics
  856. const gpPWorld = hack.getters.gp.pWorld
  857. const rayResult = hack.getters.me.ray.result
  858. const rayHitPoint = (hack.getters.ray.hitPoint = [Infinity, Infinity])
  859.  
  860. const verticalOffset = 50
  861. const checkYPosition = meY + 45
  862.  
  863. for (let i = 0; i < 121; i++) {
  864. const o = meX - 15 + i * (30 / 120)
  865. const s = checkYPosition
  866. const u = s + verticalOffset
  867.  
  868. ray.from = [physics.xAxis(o, 0), physics.yAxis(s, 0)]
  869. ray.to = [physics.xAxis(o, 0), physics.yAxis(u, 0)]
  870.  
  871. ray.update()
  872. rayResult.reset()
  873.  
  874. if (gpPWorld.raycast(rayResult, ray)) {
  875. rayResult.getHitPoint(rayHitPoint, ray)
  876. const hitDistance = rayResult.getHitDistance(ray)
  877.  
  878. if (rayResult.shape.ref.getCollision() && hitDistance < 0.1) {
  879. return true
  880. }
  881. }
  882. }
  883.  
  884. return false
  885. }
  886.  
  887. function newMovement() {
  888. hack.getters.client.loopFunctions[2].fun = function() {
  889. const currentTime = Date.now()
  890. const dashCooldown = 250
  891. const dashDistance = 2.5
  892. const dashSpeed = 25
  893. const grounded = isGrounded()
  894.  
  895. if (grounded) {
  896. hack.playerMoveData.airDashAvailable = true
  897. }
  898.  
  899. if (hack.getters.mode.moveLeft) {
  900. hack.playerMoveData.lastHorizontalDirection = -1
  901. } else if (hack.getters.mode.moveRight) {
  902. hack.playerMoveData.lastHorizontalDirection = 1
  903. }
  904.  
  905. if (
  906. hack.keyBindings.isCPressed &&
  907. hack.getters.mode.moveDown &&
  908. currentTime - hack.playerMoveData.lastDashTime >= dashCooldown &&
  909. !hack.playerMoveData.isDashingDown &&
  910. (grounded || (!grounded && hack.playerMoveData.airDashAvailable))
  911. ) {
  912. hack.playerMoveData.lastDashTime = currentTime
  913. hack.playerMoveData.isDashingDown = true
  914. hack.playerMoveData.dashDuration = (dashDistance / dashSpeed) * 1000
  915. hack.playerMoveData.dashEndTime = currentTime + hack.playerMoveData.dashDuration
  916. if (!grounded) {
  917. hack.playerMoveData.airDashAvailable = false
  918. }
  919. }
  920.  
  921. if (
  922. hack.keyBindings.isCPressed &&
  923. hack.getters.mode.moveUp &&
  924. currentTime - hack.playerMoveData.lastDashTime >= dashCooldown &&
  925. !hack.playerMoveData.isDashingUp &&
  926. (grounded || (!grounded && hack.playerMoveData.airDashAvailable))
  927. ) {
  928. hack.playerMoveData.lastDashTime = currentTime
  929. hack.playerMoveData.isDashingUp = true
  930. hack.playerMoveData.dashDuration = (dashDistance / dashSpeed) * 1000
  931. hack.playerMoveData.dashEndTime = currentTime + hack.playerMoveData.dashDuration
  932. if (!grounded) {
  933. hack.playerMoveData.airDashAvailable = false
  934. }
  935. }
  936.  
  937. if (
  938. hack.keyBindings.isCPressed &&
  939. currentTime - hack.playerMoveData.lastDashTime >= dashCooldown &&
  940. !hack.playerMoveData.isDashing &&
  941. (grounded || (!grounded && hack.playerMoveData.airDashAvailable))
  942. ) {
  943. hack.playerMoveData.lastDashTime = currentTime
  944. hack.playerMoveData.isDashing = true
  945. hack.playerMoveData.dashVelocity = dashSpeed * hack.playerMoveData.lastHorizontalDirection
  946. hack.playerMoveData.dashDuration = (dashDistance / dashSpeed) * 1000
  947. hack.playerMoveData.dashEndTime = currentTime + hack.playerMoveData.dashDuration
  948. if (!grounded) {
  949. hack.playerMoveData.airDashAvailable = false
  950. }
  951. }
  952.  
  953. if (hack.playerMoveData.isDashingDown) {
  954. hack.getters.mode.player.gpData.p.velocity[1] = -dashSpeed
  955. hack.getters.mode.player.gpData.p.velocity[0] = 0
  956. hack.getters.me.p.collisionResponse = false
  957. if (currentTime >= hack.playerMoveData.dashEndTime) {
  958. hack.playerMoveData.isDashingDown = false
  959. hack.getters.mode.player.gpData.p.velocity[1] = 0
  960. if (!hack.vars.modeIsOn) {
  961. hack.getters.me.p.collisionResponse = true
  962. }
  963. }
  964. return
  965. }
  966.  
  967. if (hack.playerMoveData.isDashingUp) {
  968. hack.getters.mode.player.gpData.p.velocity[1] = dashSpeed
  969. hack.getters.mode.player.gpData.p.velocity[0] = 0
  970. hack.getters.me.p.collisionResponse = false
  971. if (currentTime >= hack.playerMoveData.dashEndTime) {
  972. hack.playerMoveData.isDashingUp = false
  973. hack.getters.mode.player.gpData.p.velocity[1] = 0
  974. if (!hack.vars.modeIsOn) {
  975. hack.getters.me.p.collisionResponse = true
  976. }
  977. }
  978. return
  979. }
  980.  
  981. if (hack.playerMoveData.isDashing) {
  982. hack.getters.mode.player.gpData.p.velocity[0] = hack.playerMoveData.dashVelocity
  983. hack.getters.mode.player.gpData.p.velocity[1] = 0
  984. hack.getters.me.p.collisionResponse = false
  985. if (currentTime >= hack.playerMoveData.dashEndTime) {
  986. hack.playerMoveData.isDashing = false
  987. hack.getters.mode.player.gpData.p.velocity[0] = 0
  988. if (!hack.vars.modeIsOn) {
  989. hack.getters.me.p.collisionResponse = true
  990. }
  991. }
  992. return
  993. } else {
  994. if (hack.getters.mode.moveRight) {
  995. hack.getters.mode.player.gpData.p.velocity[0] = hack.vars.lrSpd * hack.vars.mult
  996. } else if (hack.getters.mode.moveLeft) {
  997. hack.getters.mode.player.gpData.p.velocity[0] = -hack.vars.lrSpd * hack.vars.mult
  998. }
  999. }
  1000.  
  1001. if (grounded) {
  1002. hack.playerMoveData.isDoubleJumpAllowed = true
  1003. if (hack.keyBindings.isZPressed) {
  1004. hack.keyBindings.isZPressed = false
  1005. hack.getters.velocity[1] = 8 * (hack.getters.me.p.gravityScale)
  1006. }
  1007. } else if (hack.playerMoveData.isDoubleJumpAllowed && hack.keyBindings.isZPressed) {
  1008. hack.keyBindings.isZPressed = false
  1009. hack.getters.velocity[1] = 8 * (hack.getters.me.p.gravityScale)
  1010. hack.playerMoveData.isDoubleJumpAllowed = false
  1011. }
  1012.  
  1013. if (hack.vars.ghost1) {
  1014. if (hack.getters.mode.moveUp) {
  1015. hack.getters.velocity[1] = hack.vars.udSpd * hack.vars.mult
  1016. }
  1017. if (hack.getters.mode.moveDown) {
  1018. hack.getters.velocity[1] = -hack.vars.udSpd * hack.vars.mult
  1019. }
  1020. if (!hack.getters.mode.moveUp && !hack.getters.mode.moveDown) {
  1021. hack.getters.velocity[1] = 0
  1022. }
  1023. }
  1024. }
  1025. hack.playerMoveData.newMovementIsOn = true
  1026. }
  1027.  
  1028. function oldMovement() {
  1029. hack.getters.client.loopFunctions[2].fun = function() {
  1030. const grounded = isGrounded()
  1031.  
  1032. if (hack.getters.mode.moveRight) {
  1033. hack.getters.mode.player.gpData.p.velocity[0] = hack.vars.lrSpd * hack.vars.mult
  1034. } else if (hack.getters.mode.moveLeft) {
  1035. hack.getters.mode.player.gpData.p.velocity[0] = -hack.vars.lrSpd * hack.vars.mult
  1036. }
  1037. if (grounded) {
  1038. if (hack.getters.mode.moveUp) {
  1039. hack.getters.velocity[1] = 8
  1040. }
  1041. }
  1042. if (hack.vars.ghost1) {
  1043. if (hack.getters.mode.moveUp) {
  1044. hack.getters.velocity[1] = hack.vars.udSpd * hack.vars.mult
  1045. }
  1046. if (hack.getters.mode.moveDown) {
  1047. hack.getters.velocity[1] = -hack.vars.udSpd * hack.vars.mult
  1048. }
  1049. if (!hack.getters.mode.moveUp && !hack.getters.mode.moveDown) {
  1050. hack.getters.velocity[1] = 0
  1051. }
  1052. }
  1053. }
  1054. hack.playerMoveData.newMovementIsOn = false
  1055. }
  1056.  
  1057. addEventListener("mousewheel", e => {
  1058. window.tweenObjects.map(x => {
  1059. try {
  1060. if (e.shiftKey) {
  1061. hack.getters.mode.player.gpData.p.velocity[0] = -Math.sign(e.deltaY) * 15;
  1062. } else {
  1063. hack.getters.mode.player.gpData.p.velocity[1] = -Math.sign(e.deltaY) * 15;
  1064. }
  1065. } catch (err) {
  1066. console.error(err);
  1067. }
  1068. });
  1069. });
  1070.  
  1071. }
  1072.  
  1073. let temp1 = {};
  1074. const _call = Function.prototype.call;
  1075. new Promise((resolve, reject) => {
  1076. Function.prototype.call = function(...args) {
  1077. if (args[2]?.exports) {
  1078. temp1 = args[6]
  1079. Function.prototype.call = _call
  1080. console.log(temp1)
  1081. resolve(temp1)
  1082. }
  1083. return _call.apply(this, args)
  1084. };
  1085. }).then((result) => {
  1086. if (Object.keys(result).length > 0) {
  1087. activateMain(result)
  1088. } else {
  1089. console.log("temp1 is empty")
  1090. }
  1091. }).catch((error) => {
  1092. console.error("An error occurred:", error)
  1093. })
  1094. }
  1095.  
  1096. function twoPlayerHack() {
  1097. function activateMain(temp1) {
  1098.  
  1099. function handleKeyDown(event) {
  1100. if (event.repeat) return;
  1101.  
  1102. const mode = hack.getters.mode;
  1103. const velocity = mode.player.gpData.p.velocity
  1104.  
  1105. switch (event.key) {
  1106. case "ArrowLeft":
  1107. mode.moveLeft = true;
  1108. mode.moveRight = false;
  1109. break;
  1110. case "ArrowRight":
  1111. mode.moveRight = true;
  1112. mode.moveLeft = false;
  1113. break;
  1114. case "ArrowUp":
  1115. mode.moveUp = true;
  1116. mode.moveDown = false;
  1117. break;
  1118. case "ArrowDown":
  1119. mode.moveDown = true;
  1120. mode.moveUp = false;
  1121. break;
  1122. }
  1123. }
  1124.  
  1125. function handleKeyUp(event) {
  1126. const mode = hack.getters.mode;
  1127. const velocity = mode.player.gpData.p.velocity
  1128.  
  1129. switch (event.key) {
  1130. case "ArrowLeft":
  1131. mode.moveLeft = false;
  1132. velocity[0] = 0;
  1133. break;
  1134. case "ArrowRight":
  1135. mode.moveRight = false;
  1136. velocity[0] = 0
  1137. break;
  1138. case "ArrowUp":
  1139. mode.moveUp = false;
  1140. break;
  1141. case "ArrowDown":
  1142. mode.moveDown = false;
  1143. break;
  1144. }
  1145. }
  1146.  
  1147.  
  1148. const hack = {
  1149. keyBindings: {
  1150. isCPressed: false,
  1151. cTimer: null,
  1152. isZPressed: false
  1153. },
  1154. playerMoveData: {
  1155. lastHorizontalDirection: 1,
  1156. isDashingDown: false,
  1157. isDashingUp: false,
  1158. lastDashTime: 0,
  1159. dashDuration: 100,
  1160. dashEndTime: 0,
  1161. isDoubleJumpAllowed: false,
  1162. airDashAvailable: true,
  1163. newMovementIsOn: true,
  1164. division: 120,
  1165. meYplus: 45,
  1166. },
  1167. bindKeys: function() {
  1168.  
  1169.  
  1170.  
  1171.  
  1172. document.addEventListener("keydown", (event) => {
  1173. if (event.key === "Shift") {
  1174. hack.vars.shiftPressed = true;
  1175. }
  1176. });
  1177.  
  1178. document.addEventListener("keyup", (event) => {
  1179. if (event.key === "Shift") {
  1180. hack.vars.shiftPressed = false;
  1181. }
  1182. });
  1183.  
  1184.  
  1185.  
  1186.  
  1187.  
  1188. document.addEventListener('keydown', function(event) {
  1189. if (event.key === 'Escape') {
  1190. const panel = document.getElementById('someData')
  1191. const panel1 = document.getElementById('controlPanel')
  1192. if (panel.style.display === 'none') {
  1193. panel.style.display = 'inherit'
  1194. } else {
  1195. panel.style.display = 'none'
  1196. }
  1197. if (panel1.style.display === 'none') {
  1198. panel1.style.display = 'inherit'
  1199. } else {
  1200. panel1.style.display = 'none'
  1201. }
  1202. }
  1203. if (event.key.toLowerCase() === 's' && event.repeat) {
  1204. if (!hack.vars.modeIsOn) {
  1205. hack.getters.me.p.mass = 3
  1206. }
  1207. }
  1208.  
  1209. if (event.key.toLowerCase() === 'z' && !hack.keyBindings.isZPressed) {
  1210. hack.keyBindings.isZPressed = true;
  1211. }
  1212.  
  1213. if (event.key.toLowerCase() === 'c') {
  1214. hack.keyBindings.isCPressed = true
  1215. if (!hack.keyBindings.cTimer) {
  1216. hack.keyBindings.cTimer = setTimeout(() => {
  1217. hack.keyBindings.isCPressed = false
  1218. hack.keyBindings.cTimer = null
  1219. }, 250)
  1220. }
  1221. }
  1222. })
  1223. document.addEventListener('keyup', function(event) {
  1224. if (event.key.toLowerCase() === 's') {
  1225. if (!hack.vars.modeIsOn) {
  1226. hack.getters.me.p.mass = 1
  1227. }
  1228. }
  1229. if (event.key.toLowerCase() === 'z') {
  1230. hack.keyBindings.isZPressed = false;
  1231. }
  1232. if (event.key.toLowerCase() === 'c') {
  1233. hack.keyBindings.isCPressed = false
  1234. if (hack.keyBindings.cTimer) {
  1235. clearTimeout(hack.keyBindings.cTimer)
  1236. hack.keyBindings.cTimer = null
  1237. }
  1238. }
  1239. })
  1240. },
  1241. getters: {
  1242. get client() {
  1243. return temp1[38].exports
  1244. },
  1245. get gf() {
  1246. return temp1[42].exports
  1247. },
  1248. get gp() {
  1249. return temp1[43].exports
  1250. },
  1251. get graphics() {
  1252. return temp1[44].exports
  1253. },
  1254. get guiComponentsKick() {
  1255. return temp1[46].exports
  1256. },
  1257. get mode() {
  1258. return temp1[48].exports
  1259. },
  1260. get envirData() {
  1261. return temp1[52].exports
  1262. },
  1263. get remote_kickPlayer() {
  1264. return temp1[54].exports
  1265. },
  1266. get myStatus() {
  1267. return temp1[57].exports
  1268. },
  1269. get rBio() {
  1270. return temp1[62].exports
  1271. },
  1272. get rGho() {
  1273. return temp1[63].exports
  1274. },
  1275. get modules_resultScreen() {
  1276. return temp1[72].exports
  1277. },
  1278. get network() {
  1279. return temp1[73].exports
  1280. },
  1281. get keyboardjs() {
  1282. return temp1[107].exports
  1283. },
  1284. get physics() {
  1285. return temp1[369].exports
  1286. },
  1287. get me() {
  1288. return hack.getters.mode.player.gpData
  1289. },
  1290. get ray() {
  1291. return hack.getters.me.ray
  1292. },
  1293. get velocity() {
  1294. return hack.getters.me.p.velocity
  1295. },
  1296. get otherPlayers() {
  1297. return hack.getters.mode.otherPlayers
  1298. },
  1299. },
  1300. vars: {
  1301. shiftPressed: false,
  1302. blacklisted: {
  1303. data: [],
  1304. names: []
  1305. },
  1306. get isGround() {
  1307. return isGrounded()
  1308. },
  1309. tpToOtherByClickIsOn: false,
  1310. indexByClick: 0,
  1311. mult: 1,
  1312. lrSpd: 3,
  1313. udSpd: 3,
  1314. get currentPosX() {
  1315. return Math.round(hack.getters.me.getX() * 100) / 100
  1316. },
  1317. get currentPosY() {
  1318. return Math.round(hack.getters.me.getY() * 100) / 100
  1319. },
  1320. pX: 0,
  1321. pY: 0,
  1322. get totalSpd() {
  1323. return (((this.lrSpd + this.udSpd) / 2) * this.mult)
  1324. },
  1325. get currentSpdX() {
  1326. return Math.round(hack.getters.me.p.velocity[0] * 100) / 100
  1327. },
  1328. get currentSpdY() {
  1329. return Math.round(hack.getters.me.p.velocity[1] * 100) / 100
  1330. },
  1331. multSpdIsOn: false,
  1332. modeIsOn: false,
  1333. immIsOn: false,
  1334. MMGIsOn: false,
  1335. interTpToOtherIsOn: false,
  1336. ghost1: false,
  1337. ghost2: false,
  1338. isPlayerDead: false,
  1339. tpSpawnCounter: 0,
  1340. },
  1341. suppFuncs: {
  1342. getMult: () => {
  1343. if (hack.vars.mult < 3) {
  1344. return 1
  1345. } else if (hack.vars.mult < 4) {
  1346. return 2
  1347. }
  1348. },
  1349. setMult: function(e) {
  1350. if (e != undefined) {
  1351. hack.vars.lrSpd = hack.vars.udSpd = e
  1352. return
  1353. }
  1354. if (hack.suppFuncs.getMult() === 1) {
  1355. hack.vars.mult++
  1356. } else if (hack.suppFuncs.getMult() === 2) {
  1357. hack.vars.mult += 2
  1358. } else {
  1359. hack.vars.mult = 1
  1360. }
  1361. },
  1362. getIndexByName: function(playerName) {
  1363. const index = hack.getters.otherPlayers.findIndex(player => player?.myName === playerName)
  1364. return index === -1 ? false : index
  1365. },
  1366. processBlacklistData: function() {
  1367. // 1. Добавляем новых игроков
  1368. for (let name of hack.vars.blacklisted.names) {
  1369. const index = hack.suppFuncs.getIndexByName(name);
  1370.  
  1371. if (index) {
  1372. const alreadyExists = hack.vars.blacklisted.data.some(entry => {
  1373. return entry && entry[1] === name;
  1374. });
  1375.  
  1376. if (!alreadyExists) {
  1377. hack.vars.blacklisted.data.push([index, name]);
  1378. }
  1379. }
  1380. }
  1381. // 2. Удаляем устаревшие записи
  1382. if (hack.vars.blacklisted.data.length) {
  1383. hack.vars.blacklisted.data = hack.vars.blacklisted.data.filter(entry => {
  1384. return entry && entry[1] && hack.vars.blacklisted.names.includes(entry[1]);
  1385. });
  1386. }
  1387. }
  1388. },
  1389. functions: {
  1390. getBio: function(index) {
  1391. let i = hack.getters.mode.otherPlayers[index]
  1392. return {
  1393. get gpData() {
  1394. return hack.getters.me
  1395. },
  1396. get myName() {
  1397. return i.myName
  1398. },
  1399. get mySkin() {
  1400. return i.mySkin
  1401. },
  1402. get whatBro() {
  1403. return i.whatBro
  1404. },
  1405. get chatColor() {
  1406. return i.chatColor
  1407. },
  1408. get teamColor() {
  1409. return i.teamColor
  1410. },
  1411. }
  1412. },
  1413. setBio: function(bio) {
  1414. let mode = hack.getters.mode
  1415. mode.setBio(
  1416. bio.gpData,
  1417. bio.myName,
  1418. bio.mySkin,
  1419. bio.whatBro,
  1420. bio.chatColor,
  1421. bio.teamColor
  1422. )
  1423. },
  1424. prevPos: function() {
  1425. hack.vars.pX = hack.getters.mode.player.gpData.getX()
  1426. hack.vars.pY = hack.getters.mode.player.gpData.getY()
  1427. },
  1428. tpSpawn: function() {
  1429. if (hack.vars.tpSpawnCounter == 0) {
  1430. this.tp(hack.vars.pX, hack.vars.pY);
  1431. hack.vars.tpSpawnCounter++
  1432. return
  1433. } else if (hack.vars.tpSpawnCounter == 1) {
  1434. this.tp(
  1435. hack.getters.mode.spawn.refP.getX(),
  1436. hack.getters.mode.spawn.refP.getY()
  1437. )
  1438. }
  1439. hack.vars.tpSpawnCounter = 0
  1440. },
  1441. tpDoor: function() {
  1442. this.prevPos()
  1443. hack.vars.tpSpawnCounter = 0
  1444. this.tp(
  1445. hack.getters.mode.exitGate.exitGateCounter.refP.getX(),
  1446. hack.getters.mode.exitGate.exitGateCounter.refP.getY()
  1447. )
  1448. },
  1449. tp: function(x, y) {
  1450. hack.getters.mode.player.gpData.setX(x)
  1451. hack.getters.mode.player.gpData.setY(y)
  1452. },
  1453. setTpToOther: function(playerIndex) {
  1454. if (!hack.vars.interTpToOtherIsOn && playerIndex !== false) {
  1455. this.interTpToOther = setInterval(() => {
  1456. hack.getters.me.p.position[0] = hack.getters.otherPlayers[playerIndex].gpData.p.position[0]
  1457. hack.getters.me.p.position[1] = hack.getters.otherPlayers[playerIndex].gpData.p.position[1]
  1458. }, 100 / 14.4)
  1459. hack.vars.interTpToOtherIsOn = true
  1460. } else if (playerIndex === false) {
  1461. try {
  1462. clearInterval(this.interTpToOther)
  1463. hack.vars.interTpToOtherIsOn = false
  1464. } catch {
  1465. console.log('не существующий интервал')
  1466. }
  1467. }
  1468. },
  1469. MMGEnable: function() {
  1470. hack.getters.mode.makeMeGhost = function() {
  1471. hack.getters.me.setAlpha(0.3)
  1472. hack.getters.me.p.shapes[0].sensor = true
  1473. hack.getters.me.p.gravityScale = 0
  1474. hack.getters.velocity[0] = 0
  1475. hack.getters.velocity[1] = 0
  1476. hack.getters.me.me = void 0
  1477. hack.vars.ghost2 = true
  1478. hack.vars.isPlayerDead = true
  1479. hack.getters.rGho.fire(hack.getters.network.gsSocket)
  1480. if (hack.getters.mode.md.mobile()) {
  1481. hack.getters.mode.setupTouchButtons(true)
  1482. }
  1483. }
  1484. hack.vars.MMGIsOn = true
  1485. },
  1486. MMGDisable: function() {
  1487. hack.getters.mode.makeMeGhost = () => {}
  1488. hack.vars.MMGIsOn = false
  1489. },
  1490. immEnable: () => {
  1491. hack.getters.me.me = void 0
  1492. hack.vars.immIsOn = true
  1493. },
  1494. immDisable: () => {
  1495. hack.getters.me.me = true
  1496. hack.vars.immIsOn = false
  1497. },
  1498. godModeEnable: () => {
  1499. hack.vars.ghost1 = true
  1500. hack.getters.me.p.collisionResponse = false
  1501. hack.getters.me.p.mass = 0
  1502. hack.vars.modeIsOn = true
  1503. hack.getters.velocity[0] = 0
  1504. hack.getters.velocity[1] = 0
  1505. },
  1506. godModeDisable: () => {
  1507. hack.vars.ghost1 = false
  1508. hack.getters.me.p.collisionResponse = true
  1509. hack.getters.me.p.mass = 1
  1510. hack.vars.modeIsOn = false
  1511. hack.getters.velocity[0] = 0
  1512. hack.getters.velocity[1] = 0
  1513. },
  1514. multSpdEnable: () => {
  1515. hack.vars.lrSpd *= hack.vars.mult
  1516. hack.vars.udSpd *= hack.vars.mult
  1517. hack.vars.multSpdIsOn = true
  1518. },
  1519. multSpdDisable: () => {
  1520. hack.vars.lrSpd /= hack.vars.mult
  1521. hack.vars.udSpd /= hack.vars.mult
  1522. hack.vars.multSpdIsOn = false
  1523. }
  1524. },
  1525. logFuncs: {
  1526. logModeIsOn: () => {
  1527. console.log('modeIsOn:', hack.vars.modeIsOn)
  1528. },
  1529. logImmIsOn: () => {
  1530. console.log('immIsOn:', hack.vars.immIsOn)
  1531. },
  1532. logSpd: () => {
  1533. console.log('speed:', ((hack.vars.lrSpd + hack.vars.udSpd) / 2) * hack.vars.mult)
  1534. },
  1535. logMMGIsOn: () => {
  1536. console.log('MMGIsOn:', hack.vars.MMGIsOn)
  1537. }
  1538. }
  1539. }
  1540.  
  1541. window.hack = hack
  1542.  
  1543. /*
  1544. ***********************
  1545. * *
  1546. * infoPanel *
  1547. * *
  1548. ***********************
  1549. */
  1550.  
  1551.  
  1552. /* Добавляем общий стиль для всех элементов */
  1553. const style = document.createElement('style');
  1554. style.innerHTML = `
  1555. /* Глобальные стили для фиксированных контейнеров */
  1556. .fixed-container {
  1557. position: fixed;
  1558. z-index: 1000;
  1559. font-family: Arial, sans-serif;
  1560. color: #fff;
  1561. }
  1562. /* Фон с альфа-прозрачностью */
  1563. .transparent-bg {
  1564. background-color: rgba(0, 0, 0, 0.7);
  1565. }
  1566. /* Контейнер без фона */
  1567. .no-bg {
  1568. background-color: transparent;
  1569. }
  1570. /* Стили для контейнера кнопок */
  1571. .button-container {
  1572. display: flex;
  1573. justify-content: flex-start;
  1574. gap: 10px;
  1575. top: 0;
  1576. left: 0;
  1577. padding: 4px;
  1578. }
  1579. .tab-button {
  1580. font-size: 0.6em;
  1581. cursor: pointer;
  1582. }
  1583. /* Стили для блока данных */
  1584. .data-container {
  1585. top: 25px;
  1586. left: -12px;
  1587. padding: 5px;
  1588. margin-left: 10px;
  1589. text-align: left;
  1590. font-size: 14px;
  1591. }
  1592. .tab-content {
  1593. display: none;
  1594. }
  1595. .tab-content.active {
  1596. display: block;
  1597. }
  1598. /* Общие стили для форм */
  1599. .identity-container,
  1600. .cosmetics-container {
  1601. display: flex;
  1602. flex-direction: column;
  1603. gap: 10px;
  1604. margin-left: 1px;
  1605. }
  1606. .form-row {
  1607. display: flex;
  1608. align-items: center;
  1609. }
  1610. .form-row label {
  1611. width: 100px;
  1612. text-align: left;
  1613. margin: 0;
  1614. }
  1615. .form-row input {
  1616. width: 142px;
  1617. }
  1618. /* Стиль для кнопок */
  1619. .btn {
  1620. padding: 5px 10px;
  1621. cursor: pointer;
  1622. }
  1623. /* Панель управления */
  1624. .control-panel {
  1625. display: flex;
  1626. flex-direction: column;
  1627. gap: 10px;
  1628. margin-left: 1px;
  1629. bottom: 0;
  1630. left: 0;
  1631. font-size: 14px;
  1632. background-color: transparent;
  1633. color: rgba(255, 255, 255, 1);
  1634. }
  1635. .control-panel button {
  1636. padding: 2px 10px;
  1637. cursor: pointer;
  1638. }
  1639. `;
  1640. document.head.appendChild(style);
  1641.  
  1642. /* Вставляем HTML вкладок */
  1643. document.body.insertAdjacentHTML("beforeend", `
  1644. <div id="buttonContainer" class="fixed-container button-container no-bg">
  1645. <button class="tab-button active" onclick="openTab('info', event)">Info</button>
  1646. <button class="tab-button" onclick="openTab('cosmetics', event)">Cosmetics</button>
  1647. <button class="tab-button" onclick="openTab('blacklist', event)">Blacklist</button>
  1648. <button class="tab-button" onclick="openTab('identity', event)">Identity</button>
  1649. </div>
  1650. <div id="someData" class="fixed-container data-container transparent-bg">
  1651. <div id="infoTab" class="tab-content active"></div>
  1652. <div id="cosmeticsTab" class="tab-content"></div>
  1653. <div id="blacklistTab" class="tab-content">45345</div>
  1654. <div id="identityTab" class="tab-content"></div>
  1655. </div>
  1656. `);
  1657.  
  1658.  
  1659.  
  1660.  
  1661.  
  1662.  
  1663.  
  1664.  
  1665. // Обновляем содержимое вкладки blacklistTab
  1666. const blacklistTab = document.getElementById("blacklistTab");
  1667. blacklistTab.innerHTML = `
  1668. <div class="cosmetics-container no-bg" style="padding: 5px;">
  1669. <div class="form-row" style="display: flex; align-items: center; gap: 10px; width: max-content;">
  1670. <label for="blacklistInput" style="min-width: 70px; text-align: left;">Никнейм</label>
  1671. <input type="text" id="blacklistInput" style="width: 150px;">
  1672. <button class="btn">Добавить</button>
  1673. </div>
  1674. <div id="blacklistContainer" style="margin-top: 10px; max-height: 175px; overflow-y: auto; font-size: 12px;">
  1675. <!-- Здесь будут отображаться добавленные ники -->
  1676. </div>
  1677. </div>
  1678. `;
  1679.  
  1680.  
  1681.  
  1682.  
  1683.  
  1684.  
  1685. /* Обработка вкладки Identity */
  1686. const identityTab = document.getElementById("identityTab");
  1687. identityTab.innerHTML = `
  1688. <div class="identity-container no-bg" style="position: relative;">
  1689. <div class="form-row">
  1690. <label for="nicknameInput">Никнейм</label>
  1691. <input type="text" id="nicknameInput" value="">
  1692. </div>
  1693. <div class="form-row">
  1694. <label for="skinInput">Скин</label>
  1695. <input type="text" id="skinInput" value="">
  1696. </div>
  1697. <div class="form-row">
  1698. <label for="vipInput">Вип статус</label>
  1699. <input type="text" id="vipInput" value="">
  1700. </div>
  1701. <div class="form-row">
  1702. <label for="chatColorInput">Цв. чата</label>
  1703. <input type="text" id="chatColorInput" value="">
  1704. </div>
  1705. <div class="form-row">
  1706. <label for="teamColorInput">Цв. команды</label>
  1707. <input type="text" id="teamColorInput" value="">
  1708. </div>
  1709. <div style="text-align: center; margin-top: 10px;">
  1710. <button class="btn" onclick="
  1711. hack.getters.mode.setMyBio();
  1712. let skinValue = document.getElementById('skinInput').value;
  1713. if (!skinValue) {
  1714. skinValue = hack.getters.mode.mySkin;
  1715. }
  1716. let chatColorValue = document.getElementById('chatColorInput').value;
  1717. if (!chatColorValue) {
  1718. chatColorValue = hack.getters.mode.chatColor;
  1719. }
  1720. let vipValue = document.getElementById('vipInput').value;
  1721. if (!vipValue) {
  1722. vipValue = undefined;
  1723. }
  1724. hack.getters.mode.setBio(
  1725. hack.getters.mode.player.gpData,
  1726. document.getElementById('nicknameInput').value,
  1727. skinValue,
  1728. vipValue,
  1729. chatColorValue,
  1730. document.getElementById('teamColorInput').value
  1731. )">Применить</button>
  1732. </div>
  1733. <div style="position: absolute; bottom: 0; left: 0;">
  1734. <button class="btn" onclick="
  1735. hack.getters.mode.setMyBio();
  1736. const bio = hack.functions.getBio(hack.vars.indexByClick);
  1737. if (bio) {
  1738. document.getElementById('nicknameInput').value = bio.myName || '';
  1739. document.getElementById('skinInput').value = bio.mySkin || '';
  1740. document.getElementById('vipInput').value = bio.whatBro || '';
  1741. document.getElementById('chatColorInput').value = bio.chatColor || '';
  1742. document.getElementById('teamColorInput').value = bio.teamColor || '';
  1743. }
  1744. ">©</button>
  1745. </div>
  1746. </div>
  1747.  
  1748. <script>
  1749. document.addEventListener('DOMContentLoaded', function() {
  1750. document.getElementById('nicknameInput').value = hack.getters.mode.myName || "";
  1751. document.getElementById('skinInput').value = hack.getters.mode.mySkin || "";
  1752. document.getElementById('vipInput').value = hack.getters.mode.whatBro || "";
  1753. document.getElementById('chatColorInput').value = hack.getters.mode.chatColor || "";
  1754. document.getElementById('teamColorInput').value = hack.getters.mode.teamColor || "";
  1755. });
  1756. </script>
  1757. `;
  1758.  
  1759. /* Обработка вкладки Cosmetics */
  1760. const cosmeticsTab = document.getElementById("cosmeticsTab");
  1761. cosmeticsTab.innerHTML = `
  1762. <div class="cosmetics-container no-bg">
  1763. <div class="form-row" style="justify-content: flex-end;">
  1764. <label for="bgColorInput" style="width: 70px; text-align: left; margin-right: 10px;">Фон:</label>
  1765. <input type="color" id="bgColorInput" style="width: 150px;" value="#000000">
  1766. </div>
  1767. <div class="form-row" style="justify-content: flex-end;">
  1768. <label for="textColorInput" style="width: 70px; text-align: left; margin-right: 10px;">Текст:</label>
  1769. <input type="color" id="textColorInput" style="width: 150px;" value="#ffffff">
  1770. </div>
  1771. <div class="form-row" style="justify-content: flex-end;">
  1772. <label for="bgOpacityInput" style="width: 70px; text-align: left; margin-right: 10px;">Прозрачн. фона:</label>
  1773. <input type="number" id="bgOpacityInput" min="0" max="1" step="0.1" value="0.7" style="width: 142px;">
  1774. </div>
  1775. <div class="form-row" style="justify-content: flex-end;">
  1776. <label for="textOutlineCheckbox" style="width: 70px; text-align: left; margin-right: 10px;">Обводка:</label>
  1777. <input type="checkbox" id="textOutlineCheckbox">
  1778. </div>
  1779. <div style="text-align: center; margin-top: 10px;">
  1780. <button class="btn" onclick="applyCosmetics()">Применить</button>
  1781. </div>
  1782. </div>
  1783. `;
  1784.  
  1785. /* Обновление данных в вкладке Info */
  1786. const infoTab = document.getElementById("infoTab");
  1787. const updateData = () => {
  1788. const o = [];
  1789. // POSITION INFO
  1790. o.push("<b>POSITION INFO</b>");
  1791. o.push(` current Pos X: ${hack.vars.currentPosX}`);
  1792. o.push(` current Pos Y: ${hack.vars.currentPosY}`);
  1793. // SPEED INFO
  1794. o.push("<br><b>SPEED INFO</b>");
  1795. o.push(` total Spd: ${hack.vars.totalSpd}`);
  1796. o.push(` current Spd X: ${hack.vars.currentSpdX}`);
  1797. o.push(` current Spd Y: ${hack.vars.currentSpdY}`);
  1798. // SCRIPT VALUES
  1799. o.push("<br><b>SCRIPT VALUES</b>");
  1800. o.push(` mult Spd Is On: ${hack.vars.multSpdIsOn}`);
  1801. o.push(` mode Is On: ${hack.vars.modeIsOn}`);
  1802. o.push(` imm Is On: ${hack.vars.immIsOn}`);
  1803. o.push(` MMG Is On: ${hack.vars.MMGIsOn}`);
  1804. o.push(` inter Tp To Other Is On: ${hack.vars.interTpToOtherIsOn}`);
  1805. o.push(` is Player Dead: ${hack.vars.isPlayerDead}`);
  1806. // MOVEMENT VALUES
  1807. o.push("<br><b>MOVEMENT VALUES</b>");
  1808. o.push(` new Movement Is On: ${hack.playerMoveData.newMovementIsOn}`);
  1809. infoTab.innerHTML = o.join('<br>');
  1810. };
  1811. setInterval(updateData, 100 / 6);
  1812.  
  1813. /* Вставляем панель управления */
  1814. document.body.insertAdjacentHTML("beforebegin", `
  1815. <div id="controlPanel" style="display: flex; flex-direction: column; gap: 5px; position: fixed; bottom: 0px; left: 0px; height: auto; text-align: left; font-size: 14px; background-color: rgba(0, 0, 0, 0.7); color: rgba(255, 255, 255, 1); font-family: Arial, sans-serif; padding: 5px;">
  1816. <div style="display: flex; align-items: center; gap: 5px;">
  1817. <span>new movement:</span>
  1818. <button id="newMoveBtn" style="padding: 0 6px; height: 18px; line-height: 18px; display: flex; align-items: center; justify-content: center; box-sizing: border-box;">${hack.playerMoveData.newMovementIsOn}</button>
  1819. </div>
  1820. <div style="display: flex; align-items: center; gap: 5px;">
  1821. <span>poison immunity:</span>
  1822. <button id="immBtn" style="padding: 0 6px; height: 18px; line-height: 18px; display: flex; align-items: center; justify-content: center; box-sizing: border-box;">${hack.vars.immIsOn}</button>
  1823. </div>
  1824. <div style="display: flex; align-items: center; gap: 5px;">
  1825. <span>death immunity:</span>
  1826. <button id="MMGBtn" style="padding: 0 6px; height: 18px; line-height: 18px; display: flex; align-items: center; justify-content: center; box-sizing: border-box;">${!hack.vars.MMGIsOn}</button>
  1827. </div>
  1828. </div>
  1829. `);
  1830.  
  1831.  
  1832.  
  1833.  
  1834.  
  1835.  
  1836.  
  1837.  
  1838. const updateButtonStates = () => {
  1839. const newMoveBtn = document.getElementById("newMoveBtn");
  1840. const immBtn = document.getElementById("immBtn");
  1841. const MMGBtn = document.getElementById("MMGBtn");
  1842. if (newMoveBtn) newMoveBtn.innerText = hack.playerMoveData.newMovementIsOn;
  1843. if (immBtn) immBtn.innerText = hack.vars.immIsOn;
  1844. if (MMGBtn) MMGBtn.innerText = !hack.vars.MMGIsOn;
  1845. }
  1846.  
  1847. document.getElementById("newMoveBtn").addEventListener("click", () => {
  1848. if (!hack.playerMoveData.newMovementIsOn) {
  1849. newMovement();
  1850. } else {
  1851. oldMovement();
  1852. }
  1853. updateButtonStates();
  1854. });
  1855.  
  1856. document.getElementById("immBtn").addEventListener("click", () => {
  1857. if (hack.vars.immIsOn) {
  1858. hack.functions.immDisable();
  1859. } else {
  1860. hack.functions.immEnable();
  1861. }
  1862. updateButtonStates();
  1863. });
  1864.  
  1865. document.getElementById("MMGBtn").addEventListener("click", () => {
  1866. if (hack.vars.MMGIsOn) {
  1867. hack.functions.MMGDisable();
  1868. } else {
  1869. hack.functions.MMGEnable();
  1870. }
  1871. updateButtonStates();
  1872. });
  1873.  
  1874. updateButtonStates();
  1875.  
  1876. setInterval(updateButtonStates, 100 / 6);
  1877.  
  1878.  
  1879.  
  1880. hack.functions.MMGDisable()
  1881.  
  1882. function scrActivate() {
  1883.  
  1884.  
  1885. hack.getters.mode.createKickGui = function(e) {
  1886. e.myIndex = e.myIndex;
  1887. e.interactive = true;
  1888. e.buttonMode = true;
  1889. let flag = false;
  1890. function t() {
  1891. if (hack.vars.shiftPressed) {
  1892. let name = this.ref.refP.name.getText();
  1893. if (!hack.vars.blacklisted.names.includes(name)) {
  1894. hack.vars.blacklisted.names.push(name);
  1895. }
  1896. window.updateBlacklistList();
  1897. flag = true;
  1898. }
  1899. if (flag) {
  1900. flag = false;
  1901. return;
  1902. }
  1903. let kickIndex = hack.getters.mode.kickIndex = this.ref.refP.g.myIndex;
  1904. hack.getters.guiComponentsKick.showLoading(this.ref.refP.name.getText(), this.ref.refP.g.myIndex);
  1905. hack.vars.indexByClick = kickIndex;
  1906. }
  1907. e.on("click", t).on("touchstart", t);
  1908. }
  1909.  
  1910. setTimeout(function() {
  1911. window.loadCosmetics();
  1912. }, 0);
  1913. hack.getters.client.loopFunctions[3].timeOut = 0
  1914. hack.getters.client.loopFunctions[2].timeOut = 100 / 6
  1915. oldMovement()
  1916. Object.defineProperty(hack.vars, 'mult', {
  1917. enumerable: false
  1918. })
  1919. Object.defineProperty(hack.vars, 'lrSpd', {
  1920. enumerable: false
  1921. })
  1922. Object.defineProperty(hack.vars, 'udSpd', {
  1923. enumerable: false
  1924. })
  1925. Object.defineProperty(hack.vars, 'ghost2', {
  1926. enumerable: false
  1927. })
  1928. Object.defineProperty(hack.vars, 'pX', {
  1929. enumerable: false
  1930. })
  1931. Object.defineProperty(hack.vars, 'pY', {
  1932. enumerable: false
  1933. })
  1934. Object.defineProperty(hack.vars, 'tpSpawnCounter', {
  1935. enumerable: false
  1936. })
  1937. Object.defineProperty(hack.vars, 'multSpdIsOn', {
  1938. enumerable: false
  1939. })
  1940. Object.defineProperty(hack.vars, 'ghost1', {
  1941. enumerable: false
  1942. })
  1943. Object.defineProperty(hack.playerMoveData, 'lastDashTime', {
  1944. enumerable: false
  1945. })
  1946. Object.defineProperty(hack.playerMoveData, 'lastHorizontalDirection', {
  1947. enumerable: false
  1948. })
  1949. Object.defineProperty(hack.playerMoveData, 'lastDashTime', {
  1950. enumerable: false
  1951. })
  1952. Object.defineProperty(hack.playerMoveData, 'dashDuration', {
  1953. enumerable: false
  1954. })
  1955. Object.defineProperty(hack.playerMoveData, 'dashEndTime', {
  1956. enumerable: false
  1957. })
  1958. Object.defineProperty(hack.playerMoveData, 'newMovementIsOn', {
  1959. enumerable: false
  1960. })
  1961. Object.defineProperty(hack.playerMoveData, 'division', {
  1962. enumerable: false
  1963. })
  1964. Object.defineProperty(hack.playerMoveData, 'meYplus', {
  1965. enumerable: false
  1966. })
  1967. document.getElementById('timer').style.background = 'rgb(0, 0, 0)'
  1968. document.getElementById('timer').style.color = 'rgb(255, 255, 255)'
  1969. document.getElementById('mapCredits').style.background = 'rgb(0, 0, 0)'
  1970. document.getElementById('mapCredits').style.color = 'rgb(255, 255, 255)'
  1971. document.getElementById('leaderboard').style.background = 'rgb(0, 0, 0)'
  1972. document.getElementById('timer').style.opacity = 0.7
  1973. document.getElementById('leaderboard').style.opacity = 0.7
  1974. document.getElementById('mapCredits').style.opacity = 0.7
  1975. }
  1976.  
  1977. hack.bindKeys()
  1978.  
  1979.  
  1980.  
  1981.  
  1982.  
  1983.  
  1984.  
  1985.  
  1986.  
  1987.  
  1988.  
  1989. hack.getters.mode.processOthersPlayerData = function() {
  1990. hack.suppFuncs.processBlacklistData()
  1991. let flag = false
  1992. if (0 != hack.getters.mode.othersPlayerNetworkData.length) {
  1993. var currentPlayersIndex = [];
  1994. for (var x = 0; x < hack.getters.mode.othersPlayerNetworkData.length; x++) {
  1995. for (var y = 0; y < hack.getters.mode.othersPlayerNetworkData[x].length; y++) {
  1996. var data = hack.getters.mode.othersPlayerNetworkData[x][y];
  1997. var index = data[0];
  1998. var xVelo = data[1];
  1999. var yVelo = data[2];
  2000. var xAxis = data[3];
  2001. var yAxis = data[4];
  2002. for (let iterator = 0; iterator < hack.vars.blacklisted.data.length; iterator++) {
  2003. if (hack.vars.blacklisted.data[iterator].includes(index)) {
  2004. flag = true;
  2005. }
  2006. }
  2007. if (flag) {
  2008. flag = false;
  2009. continue
  2010. }
  2011.  
  2012. if (typeof hack.getters.mode.otherPlayers[index] == "undefined" || hack.getters.mode.otherPlayers[index] == null) { // ИСПРАВЛЕННОЕ УСЛОВИЕ
  2013. hack.getters.mode.oldPlayersIndex[hack.getters.mode.oldPlayersIndex.length] = index;
  2014. var person = new Object();
  2015. person.myName = "";
  2016. person.mySkin = 0,
  2017. person.reset = Infinity; // changed from 1 / 0 to Infinity for readability, same value
  2018. person.gpData = hack.getters.mode.createPlayer();
  2019. person.gpData.g.myIndex = index;
  2020. hack.getters.mode.otherPlayers[index] = person;
  2021. hack.getters.mode.enableEmit && hack.getters.rBio.fire(hack.getters.network.gsSocket, index);
  2022. hack.getters.gp.gWorld.removeChild(person.gpData.g);
  2023. hack.getters.gp.gWorld.mid.addChild(person.gpData.g)
  2024. }
  2025.  
  2026.  
  2027. if (10 < hack.getters.mode.otherPlayers[index].reset) {
  2028. hack.getters.mode.otherPlayers[index].gpData.setX(xAxis);
  2029. hack.getters.mode.otherPlayers[index].gpData.setY(yAxis);
  2030. hack.getters.mode.otherPlayers[index].reset = 0
  2031. }
  2032. hack.getters.mode.otherPlayers[index].reset++;
  2033. hack.getters.mode.otherPlayers[index].gpData.p.velocity[0] = xVelo;
  2034. hack.getters.mode.otherPlayers[index].gpData.p.velocity[1] = yVelo;
  2035. currentPlayersIndex[currentPlayersIndex.length] = index;
  2036. }
  2037. }
  2038. var result = hack.getters.gf.difference(hack.getters.mode.oldPlayersIndex, currentPlayersIndex);
  2039. for (var i = 0; i < result.length; i++) {
  2040. var person = hack.getters.mode.otherPlayers[result[i]];
  2041. if (null != person) {
  2042. hack.getters.gp.gWorld.children[1].removeChild(person.gpData.g);
  2043. hack.getters.gp.pWorld.removeBody(person.gpData.p);
  2044. hack.getters.gp.list[hack.getters.gp.list.indexOf(person.gpData)] = null;
  2045. hack.getters.gp.deleteCounter++;
  2046. hack.getters.mode.otherPlayers[result[i]] = null;
  2047. }
  2048.  
  2049. }
  2050. hack.getters.mode.oldPlayersIndex = currentPlayersIndex;
  2051. hack.getters.mode.othersPlayerNetworkData = [];
  2052. }
  2053. }
  2054.  
  2055.  
  2056.  
  2057.  
  2058.  
  2059.  
  2060.  
  2061.  
  2062.  
  2063.  
  2064.  
  2065.  
  2066.  
  2067.  
  2068.  
  2069.  
  2070. hack.getters.mode.onChangeMap = function(e) {
  2071. try {
  2072. scrActivate()
  2073. scrActivate = null
  2074. } catch {}
  2075. let mode = hack.getters.mode;
  2076. let gp = hack.getters.gp;
  2077. let resultScreen = hack.getters.modules_resultScreen;
  2078. let client = hack.getters.client
  2079. clearInterval(mode.startTimeId);
  2080. clearTimeout(mode.smallStepTimeId);
  2081. resultScreen.hideResultScreen();
  2082. e = e;
  2083. gp.unload(gp);
  2084. gp.list = gp.load(e, gp);
  2085. mode.syncArr = [];
  2086. mode.ghost = !1;
  2087. mode.tweenObjects = [];
  2088. mode.defineBehaviours(gp.list, mode.syncArr, gp);
  2089. mode.md.mobile() && mode.setupTouchButtons(!1);
  2090. mode.setMyBio();
  2091. mode.setBio(mode.player.gpData, mode.myName, mode.mySkin, mode.whatBro, mode.chatColor, mode.teamColor);
  2092. for (var t, n = 0; n < mode.otherPlayers.length; n++)
  2093. void 0 !== mode.otherPlayers[n] && null != mode.otherPlayers[n] && (t = mode.otherPlayers[n].gpData.g.myIndex,
  2094. mode.otherPlayers[n].gpData = mode.createPlayer(),
  2095. mode.otherPlayers[n].gpData.g.myIndex = t,
  2096. mode.otherPlayers[n].gpData.p.gravityScale = 0,
  2097. gp.gWorld.removeChild(mode.otherPlayers[n].gpData.g),
  2098. gp.gWorld.mid.addChild(mode.otherPlayers[n].gpData.g),
  2099. mode.setBio(mode.otherPlayers[n].gpData, mode.otherPlayers[n].myName, mode.otherPlayers[n].mySkin, mode.otherPlayers[n].whatBro, mode.otherPlayers[n].chatColor, mode.otherPlayers[n].teamColor));
  2100. void 0 === mode.firstTimeMapChange && (mode.firstTimeMapChange = !0);
  2101. mode.smallStepTimeId = setTimeout(function() {
  2102. document.getElementById("startTime").style.display = "inherit";
  2103. document.getElementById("startTime").innerHTML = mode.startTime;
  2104. client.runPhysics = !1;
  2105. mode.startTimeId = setInterval(function() {
  2106. mode.startTime++;
  2107. document.getElementById("startTime").innerHTML = mode.startTime;
  2108. 3 == mode.startTime && (mode.startTime = 0,
  2109. client.runPhysics = !0,
  2110. clearInterval(mode.startTimeId),
  2111. document.getElementById("startTime").style.display = "none");
  2112. }, 1e3);
  2113. }, 0);
  2114. hack.getters.me.me = true
  2115. if (hack.vars.modeIsOn) {
  2116. hack.functions.godModeEnable()
  2117. } else {
  2118. hack.functions.godModeDisable()
  2119. }
  2120. if (hack.vars.immIsOn) {
  2121. hack.functions.immEnable()
  2122. } else {
  2123. hack.functions.immDisable()
  2124. }
  2125. hack.vars.ghost2 = false
  2126. hack.vars.isPlayerDead = false
  2127.  
  2128.  
  2129.  
  2130.  
  2131.  
  2132.  
  2133. const keyboardjs = hack.getters.keyboardjs
  2134. for (let i in keyboardjs._listeners) {
  2135. if (i != 0) {
  2136. delete keyboardjs._listeners[i]
  2137. }
  2138. }
  2139. document.addEventListener("keyup", handleKeyUp)
  2140. document.addEventListener("keydown", handleKeyDown)
  2141.  
  2142.  
  2143.  
  2144.  
  2145.  
  2146.  
  2147.  
  2148. }
  2149.  
  2150. document.body.onkeyup = (event) => {
  2151. const key = event.key
  2152. switch (key) {
  2153. case 'PageUp':
  2154. if (!hack.vars.modeIsOn) {
  2155. hack.getters.me.p.gravityScale = 1
  2156. hack.getters.me.p.collisionResponse = 1
  2157. }
  2158. break;
  2159. case 'PageDown':
  2160. if (!hack.vars.modeIsOn) {
  2161. hack.getters.me.p.collisionResponse = 1
  2162. }
  2163. break;
  2164. }
  2165. }
  2166.  
  2167. document.body.onkeydown = (event) => {
  2168. const key = event.key;
  2169. switch (key) {
  2170. case 'Delete':
  2171. if (!hack.vars.tpToOtherByClickIsOn) {
  2172. hack.vars.tpToOtherByClickIsOn = true
  2173. hack.functions.setTpToOther(hack.vars.indexByClick)
  2174. } else {
  2175. hack.vars.tpToOtherByClickIsOn = false
  2176. hack.functions.setTpToOther(false)
  2177. }
  2178. break
  2179. case 'PageUp':
  2180. if (!hack.vars.modeIsOn) {
  2181. hack.getters.me.p.gravityScale = -1
  2182. hack.getters.me.p.collisionResponse = 0
  2183. }
  2184. break;
  2185. case 'PageDown':
  2186. if (!hack.vars.modeIsOn) {
  2187. hack.getters.me.p.gravityScale = 1
  2188. hack.getters.me.p.collisionResponse = 0
  2189. }
  2190. break;
  2191. case 'Control':
  2192. hack.getters.mode.makeMeGhost();
  2193. break;
  2194. case 'F2':
  2195. if (!hack.vars.modeIsOn) {
  2196. hack.functions.godModeEnable();
  2197. hack.logFuncs.logModeIsOn();
  2198. hack.functions.multSpdEnable();
  2199. } else {
  2200. hack.functions.godModeDisable();
  2201. hack.logFuncs.logModeIsOn();
  2202. hack.functions.multSpdDisable();
  2203. }
  2204. break;
  2205. case 'Home':
  2206. hack.functions.tpSpawn();
  2207. break;
  2208. case 'End':
  2209. hack.functions.tpDoor();
  2210. break;
  2211. case 'F9':
  2212. if (!hack.vars.MMGIsOn) {
  2213. hack.functions.MMGEnable();
  2214. hack.logFuncs.logMMGIsOn();
  2215. } else {
  2216. hack.functions.MMGDisable();
  2217. hack.logFuncs.logMMGIsOn();
  2218. }
  2219. break;
  2220. case '`': // Backtick (`)
  2221. case 'ё'.toLowerCase(): // Cyrillic Yo (часто на той же клавише, что и Backtick)
  2222. if (hack.vars.modeIsOn) {
  2223. hack.suppFuncs.setMult();
  2224. hack.logFuncs.logSpd();
  2225. }
  2226. break;
  2227. case 'Insert':
  2228. case 'NumPad0': // Клавиша 0 на цифровой клавиатуре
  2229. hack.functions.setTpToOther(hack.suppFuncs.getIndexByName(prompt('Введите корректный никнейм. Чтобы выйти из интервала нажмите Esc.')));
  2230. break;
  2231. case 'F4':
  2232. if (!hack.vars.immIsOn) {
  2233. hack.functions.immEnable();
  2234. hack.logFuncs.logImmIsOn();
  2235. } else {
  2236. hack.functions.immDisable();
  2237. hack.logFuncs.logImmIsOn();
  2238. }
  2239. break;
  2240. }
  2241. };
  2242.  
  2243.  
  2244. function isGrounded() {
  2245. // Кэшируем необходимые геттеры и данные
  2246. const {
  2247. me,
  2248. ray,
  2249. physics,
  2250. gp
  2251. } = hack.getters;
  2252. const {
  2253. division,
  2254. meYplus
  2255. } = hack.playerMoveData;
  2256. const meX = me.getX();
  2257. const meY = me.getY();
  2258. const gpPWorld = gp.pWorld;
  2259. const rayResult = me.ray.result;
  2260. // Сброс точки попадания
  2261. const rayHitPoint = ray.hitPoint = [Infinity, Infinity];
  2262.  
  2263. // Предварительные вычисления
  2264. const verticalOffset = 50;
  2265. const checkYPosition = meY + meYplus;
  2266. const startYPosition = physics.yAxis(checkYPosition, 0);
  2267. const endYPosition = physics.yAxis(checkYPosition + verticalOffset, 0);
  2268. const leftX = meX - 15;
  2269. const step = 30 / division;
  2270.  
  2271. // Пробегаем по ряду лучей от левого до правого края игрока
  2272. for (let i = 0; i <= division; i++) {
  2273. const currentX = leftX + i * step;
  2274. const xPos = physics.xAxis(currentX, 0);
  2275.  
  2276. // Задаём начальную и конечную точки луча
  2277. ray.from = [xPos, startYPosition];
  2278. ray.to = [xPos, endYPosition];
  2279.  
  2280. ray.update();
  2281. rayResult.reset();
  2282.  
  2283. if (gpPWorld.raycast(rayResult, ray)) {
  2284. rayResult.getHitPoint(rayHitPoint, ray);
  2285. const hitDistance = rayResult.getHitDistance(ray);
  2286.  
  2287. if (rayResult.shape.ref.getCollision() && hitDistance < 0.1) {
  2288. return true;
  2289. }
  2290. }
  2291. }
  2292. return false;
  2293. }
  2294.  
  2295.  
  2296. // Основная функция движения с улучшенной логикой дэшинга и обработкой ввода
  2297. function newMovement() {
  2298. // Настройки для проверки земли
  2299. hack.playerMoveData.division = 120;
  2300. hack.playerMoveData.meYplus = 45;
  2301.  
  2302. // Константы для дэшинга
  2303. const dashCooldown = 250;
  2304. const dashDistance = 2.5;
  2305. const dashSpeed = 25;
  2306. const dashDuration = (dashDistance / dashSpeed) * 1000; // в мс
  2307.  
  2308. // Вспомогательная функция для старта дэша
  2309. function startDash(type, currentTime, grounded) {
  2310. hack.playerMoveData.lastDashTime = currentTime;
  2311. if (type === 'Down') {
  2312. hack.playerMoveData.isDashingDown = true;
  2313. } else if (type === 'Up') {
  2314. hack.playerMoveData.isDashingUp = true;
  2315. } else if (type === 'Horizontal') {
  2316. hack.playerMoveData.isDashing = true;
  2317. hack.playerMoveData.dashVelocity = dashSpeed * hack.playerMoveData.lastHorizontalDirection;
  2318. }
  2319. hack.playerMoveData.dashDuration = dashDuration;
  2320. hack.playerMoveData.dashEndTime = currentTime + dashDuration;
  2321. if (!grounded) {
  2322. hack.playerMoveData.airDashAvailable = false;
  2323. }
  2324. }
  2325.  
  2326. // Вспомогательная функция для обновления движения во время дэша
  2327. function updateDash(type, currentTime) {
  2328. const player = hack.getters.mode.player.gpData.p;
  2329. const me = hack.getters.me.p;
  2330. if (type === 'Down') {
  2331. player.velocity[1] = -dashSpeed;
  2332. player.velocity[0] = 0;
  2333. } else if (type === 'Up') {
  2334. player.velocity[1] = dashSpeed;
  2335. player.velocity[0] = 0;
  2336. } else if (type === 'Horizontal') {
  2337. player.velocity[0] = hack.playerMoveData.dashVelocity;
  2338. player.velocity[1] = 0;
  2339. }
  2340. // Отключаем стандартную реакцию столкновений во время дэша
  2341. me.collisionResponse = false;
  2342. if (currentTime >= hack.playerMoveData.dashEndTime) {
  2343. if (type === 'Down') {
  2344. hack.playerMoveData.isDashingDown = false;
  2345. player.velocity[1] = 0;
  2346. } else if (type === 'Up') {
  2347. hack.playerMoveData.isDashingUp = false;
  2348. player.velocity[1] = 0;
  2349. } else if (type === 'Horizontal') {
  2350. hack.playerMoveData.isDashing = false;
  2351. player.velocity[0] = 0;
  2352. }
  2353. if (!hack.vars.modeIsOn) {
  2354. me.collisionResponse = true;
  2355. }
  2356. }
  2357. }
  2358.  
  2359. // Основной цикл обновления движения
  2360. hack.getters.client.loopFunctions[2].fun = function() {
  2361. const currentTime = Date.now();
  2362. const grounded = isGrounded();
  2363.  
  2364. // Если игрок на земле – сбрасываем возможность воздушного дэша
  2365. if (grounded) {
  2366. hack.playerMoveData.airDashAvailable = true;
  2367. }
  2368.  
  2369. // Обновляем последнее горизонтальное направление движения
  2370. if (hack.getters.mode.moveLeft) {
  2371. hack.playerMoveData.lastHorizontalDirection = -1;
  2372. } else if (hack.getters.mode.moveRight) {
  2373. hack.playerMoveData.lastHorizontalDirection = 1;
  2374. }
  2375.  
  2376. // Если кнопка дэша нажата и прошло достаточно времени, пытаемся запустить дэш
  2377. if (hack.keyBindings.isCPressed &&
  2378. currentTime - hack.playerMoveData.lastDashTime >= dashCooldown &&
  2379. (grounded || hack.playerMoveData.airDashAvailable)
  2380. ) {
  2381. if (hack.getters.mode.moveDown && !hack.playerMoveData.isDashingDown) {
  2382. startDash('Down', currentTime, grounded);
  2383. } else if (hack.getters.mode.moveUp && !hack.playerMoveData.isDashingUp) {
  2384. startDash('Up', currentTime, grounded);
  2385. } else if (!hack.playerMoveData.isDashing) {
  2386. startDash('Horizontal', currentTime, grounded);
  2387. }
  2388. }
  2389.  
  2390. // Обновление дэш-движения
  2391. if (hack.playerMoveData.isDashingDown) {
  2392. updateDash('Down', currentTime);
  2393. return;
  2394. } else if (hack.playerMoveData.isDashingUp) {
  2395. updateDash('Up', currentTime);
  2396. return;
  2397. } else if (hack.playerMoveData.isDashing) {
  2398. updateDash('Horizontal', currentTime);
  2399. return;
  2400. } else {
  2401. // Обычное горизонтальное движение
  2402. const player = hack.getters.mode.player.gpData.p;
  2403. if (hack.getters.mode.moveRight) {
  2404. hack.getters.mode.moveLeft = false
  2405. player.velocity[0] = hack.vars.lrSpd * hack.vars.mult;
  2406. } else if (hack.getters.mode.moveLeft) {
  2407. hack.getters.mode.moveRight
  2408. player.velocity[0] = -hack.vars.lrSpd * hack.vars.mult;
  2409. }
  2410. }
  2411.  
  2412.  
  2413.  
  2414.  
  2415.  
  2416. /*
  2417. // Обработка прыжка и двойного прыжка
  2418. if (grounded) {
  2419. hack.playerMoveData.isDoubleJumpAllowed = true;
  2420. if (hack.keyBindings.isZPressed) {
  2421. hack.keyBindings.isZPressed = false;
  2422. hack.getters.velocity[1] = 8 * hack.getters.me.p.gravityScale;
  2423. }
  2424. } else if (hack.playerMoveData.isDoubleJumpAllowed && hack.keyBindings.isZPressed) {
  2425. hack.keyBindings.isZPressed = false;
  2426. hack.getters.velocity[1] = 8 * hack.getters.me.p.gravityScale;
  2427. hack.playerMoveData.isDoubleJumpAllowed = false;
  2428. }
  2429. */
  2430.  
  2431. // Если клавиша прыжка нажата, обрабатываем её
  2432. if (hack.keyBindings.isZPressed) {
  2433. hack.keyBindings.isZPressed = false;
  2434.  
  2435. if (grounded) {
  2436. // Прыжок с земли: прыгаем и разрешаем двойной прыжок
  2437. hack.getters.velocity[1] = 8 * hack.getters.me.p.gravityScale;
  2438. hack.playerMoveData.isDoubleJumpAllowed = true;
  2439. } else if (hack.playerMoveData.isDoubleJumpAllowed) {
  2440. // Двойной прыжок в воздухе: прыгаем и запрещаем дальнейшие прыжки в воздухе
  2441. hack.getters.velocity[1] = 8 * hack.getters.me.p.gravityScale;
  2442. hack.playerMoveData.isDoubleJumpAllowed = false;
  2443. }
  2444. }
  2445.  
  2446. // Если игрок на земле, всегда разрешаем двойной прыжок
  2447. if (grounded) {
  2448. hack.playerMoveData.isDoubleJumpAllowed = true;
  2449. }
  2450.  
  2451.  
  2452.  
  2453.  
  2454.  
  2455.  
  2456.  
  2457.  
  2458.  
  2459. // Обработка движения в режиме "призрака"
  2460. if (hack.vars.ghost1 || hack.vars.ghost2) {
  2461. if (hack.getters.mode.moveUp) {
  2462. hack.getters.velocity[1] = hack.vars.udSpd * hack.vars.mult;
  2463. }
  2464. if (hack.getters.mode.moveDown) {
  2465. hack.getters.velocity[1] = -hack.vars.udSpd * hack.vars.mult;
  2466. }
  2467. if (!hack.getters.mode.moveUp && !hack.getters.mode.moveDown) {
  2468. hack.getters.velocity[1] = 0;
  2469. }
  2470. }
  2471. };
  2472.  
  2473. hack.playerMoveData.newMovementIsOn = true;
  2474. }
  2475.  
  2476. function oldMovement() {
  2477. hack.playerMoveData.division = 12
  2478. hack.playerMoveData.meYplus = 49
  2479. hack.getters.client.loopFunctions[2].fun = function() {
  2480. const grounded = isGrounded()
  2481.  
  2482. if (hack.getters.mode.moveRight) {
  2483. hack.getters.mode.player.gpData.p.velocity[0] = hack.vars.lrSpd * hack.vars.mult
  2484. } else if (hack.getters.mode.moveLeft) {
  2485. hack.getters.mode.player.gpData.p.velocity[0] = -hack.vars.lrSpd * hack.vars.mult
  2486. }
  2487. if (grounded) {
  2488. if (hack.getters.mode.moveUp) {
  2489. hack.getters.velocity[1] = 8
  2490. }
  2491. }
  2492. if (hack.vars.ghost1 || hack.vars.ghost2) {
  2493. if (hack.getters.mode.moveUp) {
  2494. hack.getters.velocity[1] = hack.vars.udSpd * hack.vars.mult
  2495. }
  2496. if (hack.getters.mode.moveDown) {
  2497. hack.getters.velocity[1] = -hack.vars.udSpd * hack.vars.mult
  2498. }
  2499. if (!hack.getters.mode.moveUp && !hack.getters.mode.moveDown) {
  2500. hack.getters.velocity[1] = 0
  2501. }
  2502. }
  2503. }
  2504. hack.playerMoveData.newMovementIsOn = false
  2505. }
  2506. addEventListener("mousewheel", e => {
  2507. window.tweenObjects.map(x => {
  2508. try {
  2509. if (e.shiftKey) {
  2510. hack.getters.mode.player.gpData.p.velocity[0] = -Math.sign(e.deltaY) * 15;
  2511. } else {
  2512. hack.getters.mode.player.gpData.p.velocity[1] = -Math.sign(e.deltaY) * 15;
  2513. }
  2514. } catch (err) {
  2515. console.error(err);
  2516. }
  2517. });
  2518. });
  2519.  
  2520.  
  2521.  
  2522.  
  2523. window.window = this
  2524.  
  2525. function teleportToClick(event) {
  2526. event.preventDefault()
  2527. const gameWidthFactor = window.innerWidth / hack.getters.mode.horizontalFOV
  2528. const gameHeightFactor = window.innerHeight / (hack.getters.mode.horizontalFOV * (window.innerHeight / window.innerWidth))
  2529. const targetX = (hack.getters.me.g.x + (event.clientX - window.innerWidth / 2) / gameWidthFactor) / 100;
  2530. const targetY = -(hack.getters.me.g.y - hack.getters.me.shapes[1].getHeight() / 2 + (event.clientY - window.innerHeight / 2) / gameHeightFactor) / 100
  2531. hack.getters.me.p.position[0] = targetX
  2532. hack.getters.me.p.position[1] = targetY
  2533. }
  2534. document.addEventListener("contextmenu", teleportToClick)
  2535. }
  2536.  
  2537. let temp1 = {};
  2538. const _call = Function.prototype.call;
  2539. new Promise((resolve, reject) => {
  2540. Function.prototype.call = function(...args) {
  2541. if (args[2]?.exports) {
  2542. temp1 = args[6]
  2543. Function.prototype.call = _call
  2544. console.log(temp1)
  2545. resolve(temp1)
  2546. }
  2547. return _call.apply(this, args)
  2548. };
  2549. }).then((result) => {
  2550. if (Object.keys(result).length > 0) {
  2551. activateMain(result)
  2552. } else {
  2553. console.log("temp1 is empty")
  2554. }
  2555. }).catch((error) => {
  2556. console.error("An error occurred:", error)
  2557. })
  2558. }
  2559.  
  2560. function hideAndSeekHack() {
  2561. function activateMain(temp1) {
  2562. const hack = {
  2563. keyBindings: {
  2564. isCPressed: false,
  2565. cTimer: null,
  2566. isZPressed: false
  2567. },
  2568. playerMoveData: {
  2569. lastHorizontalDirection: 1,
  2570. isDashingDown: false,
  2571. isDashingUp: false,
  2572. lastDashTime: 0,
  2573. dashDuration: 100,
  2574. dashEndTime: 0,
  2575. isDoubleJumpAllowed: false,
  2576. airDashAvailable: true,
  2577. newMovementIsOn: true
  2578. },
  2579. bindKeys: function() {
  2580. document.addEventListener('keydown', function(event) {
  2581. if (event.key === 'Escape') {
  2582. const panel = document.getElementById('someData')
  2583. const panel1 = document.getElementById('controlPanel')
  2584. if (panel.style.display === 'none') {
  2585. panel.style.display = 'inherit'
  2586. } else {
  2587. panel.style.display = 'none'
  2588. }
  2589. if (panel1.style.display === 'none') {
  2590. panel1.style.display = 'inherit'
  2591. } else {
  2592. panel1.style.display = 'none'
  2593. }
  2594. }
  2595. if (event.key.toLowerCase() === 's' && event.repeat) {
  2596. if (!hack.vars.modeIsOn) {
  2597. hack.getters.me.p.mass = 3
  2598. }
  2599. }
  2600. if (event.key.toLowerCase() === 'z' && !event.repeat) {
  2601. hack.keyBindings.isZPressed = true
  2602. } else if (event.repeat) {
  2603. hack.keyBindings.isZPressed = false
  2604. }
  2605. if (event.key.toLowerCase() === 'c') {
  2606. hack.keyBindings.isCPressed = true
  2607. if (!hack.keyBindings.cTimer) {
  2608. hack.keyBindings.cTimer = setTimeout(() => {
  2609. hack.keyBindings.isCPressed = false
  2610. hack.keyBindings.cTimer = null
  2611. }, 250)
  2612. }
  2613. }
  2614. })
  2615. document.addEventListener('keyup', function(event) {
  2616. if (event.key.toLowerCase() === 's') {
  2617. if (!hack.vars.modeIsOn) {
  2618. hack.getters.me.p.mass = 1
  2619. }
  2620. }
  2621. if (event.key.toLowerCase() === 'z') {
  2622. hack.keyBindings.isZPressed = false
  2623. }
  2624. if (event.key.toLowerCase() === 'c') {
  2625. hack.keyBindings.isCPressed = false
  2626. if (hack.keyBindings.cTimer) {
  2627. clearTimeout(hack.keyBindings.cTimer)
  2628. hack.keyBindings.cTimer = null
  2629. }
  2630. }
  2631. })
  2632. },
  2633. getters: {
  2634. get client() {
  2635. return temp1[38].exports
  2636. },
  2637. get gf() {
  2638. return temp1[42].exports
  2639. },
  2640. get gp() {
  2641. return temp1[43].exports
  2642. },
  2643. get graphics() {
  2644. return temp1[44].exports
  2645. },
  2646. get mode() {
  2647. return temp1[48].exports
  2648. },
  2649. get envirData() {
  2650. return temp1[53].exports
  2651. },
  2652. get network() {
  2653. return temp1[74].exports
  2654. },
  2655. get physics() {
  2656. return temp1[370].exports
  2657. },
  2658. get me() {
  2659. return hack.getters.mode.player.gpData
  2660. },
  2661. get ray() {
  2662. return hack.getters.me.ray
  2663. },
  2664. get velocity() {
  2665. return hack.getters.me.p.velocity
  2666. },
  2667. get otherPlayers() {
  2668. return hack.getters.mode.otherPlayers
  2669. },
  2670. get ray() {
  2671. return this.mode.player.gpData.ray
  2672. },
  2673. get velocity() {
  2674. return this.mode.player.gpData.p.velocity
  2675. },
  2676. get otherPlayers() {
  2677. return this.mode.otherPlayers
  2678. },
  2679. ghost: false,
  2680. get me() {
  2681. return hack.getters.mode.player.gpData
  2682. },
  2683. get ray() {
  2684. return hack.getters.me.ray
  2685. },
  2686. get velocity() {
  2687. return hack.getters.me.p.velocity
  2688. },
  2689. get otherPlayers() {
  2690. return hack.getters.mode.otherPlayers
  2691. }
  2692. },
  2693. vars: {
  2694. get isGround() {
  2695. return isGrounded()
  2696. },
  2697. mult: 1,
  2698. lrSpd: 3,
  2699. udSpd: 3,
  2700. 'POSITION INFO ': '-----------------------',
  2701. get currentPosX() {
  2702. return Math.round(hack.getters.me.getX() * 100) / 100
  2703. },
  2704. get currentPosY() {
  2705. return Math.round(hack.getters.me.getY() * 100) / 100
  2706. },
  2707. 'SPEED INFO ': '----------------------------',
  2708. get totalSpd() {
  2709. return (((this.lrSpd + this.udSpd) / 2) * this.mult)
  2710. },
  2711. get currentSpdX() {
  2712. return Math.round(hack.getters.me.p.velocity[0] * 100) / 100
  2713. },
  2714. get currentSpdY() {
  2715. return Math.round(hack.getters.me.p.velocity[1] * 100) / 100
  2716. },
  2717. 'SCRIPT VALUES ': '----------------------',
  2718. multSpdIsOn: false,
  2719. modeIsOn: false,
  2720. ghost1: false,
  2721. isPlayerDead: false,
  2722. 'MOVEMENT VALUES ': '---------------'
  2723. },
  2724. suppFuncs: {
  2725. getMult: () => {
  2726. if (hack.vars.mult < 3) {
  2727. return 1
  2728. } else if (hack.vars.mult < 4) {
  2729. return 2
  2730. }
  2731. },
  2732. setMult: function(e) {
  2733. if (e != undefined) {
  2734. hack.vars.lrSpd = hack.vars.udSpd = e
  2735. return
  2736. }
  2737. if (hack.suppFuncs.getMult() === 1) {
  2738. hack.vars.mult++
  2739. } else if (hack.suppFuncs.getMult() === 2) {
  2740. hack.vars.mult += 2
  2741. } else {
  2742. hack.vars.mult = 1
  2743. }
  2744. },
  2745. getIndexByName: function(playerName) {
  2746. const index = hack.getters.otherPlayers.findIndex(player => player?.myName === playerName)
  2747. return index === -1 ? false : index
  2748. }
  2749. },
  2750. functions: {
  2751. godModeEnable: () => {
  2752. hack.vars.ghost1 = true
  2753. hack.getters.me.p.collisionResponse = false
  2754. hack.getters.me.p.mass = 0
  2755. hack.vars.modeIsOn = true
  2756. hack.getters.velocity[0] = 0
  2757. hack.getters.velocity[1] = 0
  2758. },
  2759. godModeDisable: () => {
  2760. hack.vars.ghost1 = false
  2761. hack.getters.me.p.collisionResponse = true
  2762. hack.getters.me.p.mass = 1
  2763. hack.vars.modeIsOn = false
  2764. hack.getters.velocity[0] = 0
  2765. hack.getters.velocity[1] = 0
  2766. },
  2767. multSpdEnable: () => {
  2768. hack.vars.lrSpd *= hack.vars.mult
  2769. hack.vars.udSpd *= hack.vars.mult
  2770. hack.vars.multSpdIsOn = true
  2771. },
  2772. multSpdDisable: () => {
  2773. hack.vars.lrSpd /= hack.vars.mult
  2774. hack.vars.udSpd /= hack.vars.mult
  2775. hack.vars.multSpdIsOn = false
  2776. }
  2777. },
  2778. logFuncs: {
  2779. logModeIsOn: () => {
  2780. console.log('modeIsOn:', hack.vars.modeIsOn)
  2781. },
  2782. logSpd: () => {
  2783. console.log('speed:', ((hack.vars.lrSpd + hack.vars.udSpd) / 2) * hack.vars.mult)
  2784. }
  2785. }
  2786. }
  2787.  
  2788. document.body.insertAdjacentHTML("beforebegin", `
  2789. <div id="someData" style="display: inherit; width: auto; position: fixed; top: 25px; left: 0px; height: auto; text-align: left; font-size: 14px; background: rgb(0, 0, 0); color: rgb(255, 255, 255); opacity: 0.7; padding: 2px 2px;"></div>
  2790. `)
  2791.  
  2792. const updateData = () => {
  2793. const o = []
  2794. for (let i in hack.vars) {
  2795. o.push(`${i}: ${hack.vars[i]}`)
  2796. }
  2797. for (let i in hack.playerMoveData) {
  2798. o.push(`${i}: ${hack.playerMoveData[i]}`)
  2799. }
  2800. document.getElementById("someData").innerHTML = o.join('<br>')
  2801. }
  2802.  
  2803. document.body.insertAdjacentHTML("beforebegin", `
  2804. <div id="controlPanel" style="display: inherit; width: auto; position: fixed; bottom: 0px; left: 0px; height: auto; text-align: left; font-size: 14px; background: rgb(0, 0, 0); color: rgb(255, 255, 255); opacity: 0.7; padding: 2px 2px;">
  2805. <div>
  2806. <span>new movement: </span>
  2807. <button id="newMoveBtn" style="background: rgba(255, 255, 255, 0.7); color: black;">${hack.playerMoveData.newMovementIsOn}</button>
  2808. </div>
  2809. </div>
  2810. `)
  2811.  
  2812. const updateButtonStates = () => {
  2813. document.getElementById("newMoveBtn").innerText = hack.playerMoveData.newMovementIsOn
  2814. }
  2815.  
  2816. document.getElementById("newMoveBtn").addEventListener("click", () => {
  2817. if (!hack.playerMoveData.newMovementIsOn) {
  2818. newMovement()
  2819. } else {
  2820. oldMovement()
  2821. }
  2822. updateButtonStates()
  2823. })
  2824.  
  2825. setInterval(updateData, 100 / 6)
  2826. updateButtonStates()
  2827. setInterval(updateButtonStates, 100 / 6)
  2828. hack.bindKeys()
  2829.  
  2830. let scrActivate = function() {
  2831. hack.getters.client.loopFunctions[2].timeOut = 100 / 6
  2832. hack.getters.client.loopFunctions[3].timeOut = 0
  2833. oldMovement()
  2834. Object.defineProperty(hack.vars, 'mult', {
  2835. enumerable: false
  2836. })
  2837. Object.defineProperty(hack.vars, 'lrSpd', {
  2838. enumerable: false
  2839. })
  2840. Object.defineProperty(hack.vars, 'udSpd', {
  2841. enumerable: false
  2842. })
  2843. Object.defineProperty(hack.vars, 'multSpdIsOn', {
  2844. enumerable: false
  2845. })
  2846. Object.defineProperty(hack.vars, 'ghost1', {
  2847. enumerable: false
  2848. })
  2849. Object.defineProperty(hack.playerMoveData, 'lastDashTime', {
  2850. enumerable: false
  2851. })
  2852. Object.defineProperty(hack.playerMoveData, 'lastHorizontalDirection', {
  2853. enumerable: false
  2854. })
  2855. Object.defineProperty(hack.playerMoveData, 'lastDashTime', {
  2856. enumerable: false
  2857. })
  2858. Object.defineProperty(hack.playerMoveData, 'dashDuration', {
  2859. enumerable: false
  2860. })
  2861. Object.defineProperty(hack.playerMoveData, 'dashEndTime', {
  2862. enumerable: false
  2863. })
  2864. Object.defineProperty(hack.playerMoveData, 'newMovementIsOn', {
  2865. enumerable: false
  2866. })
  2867. document.getElementById('timer').style.opacity = 0.7
  2868. document.getElementById('timer').style.background = 'rgb(0, 0, 0)'
  2869. document.getElementById('timer').style.color = 'rgb(255, 255, 255)'
  2870. document.getElementById('seekerDistance').style.opacity = 0.7
  2871. document.getElementById('seekerDistance').style.background = 'rgb(0, 0, 0)'
  2872. document.getElementById('seekerDistance').style.color = 'rgb(255, 255, 255)'
  2873. document.getElementById('hidersCount').style.color = 'rgb(255, 255, 255)'
  2874. document.getElementById('hidersCount').style.opacity = 0.7
  2875. }
  2876.  
  2877. setTimeout(() => {
  2878. if (hack.vars.modeIsOn) {
  2879. hack.functions.godModeEnable()
  2880. }
  2881. }, 300)
  2882.  
  2883. hack.getters.client.findUntilFound = function(e, t, n) {
  2884. hack.getters.network.gsip = e;
  2885. hack.getters.network.gsrn = t;
  2886. hack.getters.network.getSID?.((sid) => {
  2887. hack.getters.network.sid = sid;
  2888. hack.getters.network.connectToGs?.(hack.getters.network.gsip, () => {
  2889. console.log("connected to gs");
  2890.  
  2891. hack.getters.client.verifyIsHuman?.(() => {
  2892. hack.getters.network.registerSidOnGs?.((verifyStatus) => {
  2893. console.log("verified on gs server", verifyStatus);
  2894.  
  2895. if (verifyStatus === "") {
  2896. alert("You are already playing the game in another browser tab.");
  2897. location.reload();
  2898. n(2);
  2899. } else {
  2900. hack.getters.network.joinRoom?.(hack.getters.network.gsrn, (joinStatus) => {
  2901. if (joinStatus === 1) {
  2902. hack.getters.client.sendPlayingInfo?.(hack.getters.client.roomId, () => {
  2903. hack.getters.client.onReady?.();
  2904. n(1);
  2905. scrActivate()
  2906. });
  2907. } else {
  2908. console.log("else");
  2909. hack.getters.network.gsSockehack?.getters.client.disconnect?.();
  2910.  
  2911. do {
  2912. hack.getters.client.rIndex++;
  2913. const currentDataCenter = hack.getters.network.dataCenters?.[hack.getters.client.dcIndex];
  2914.  
  2915. if (!currentDataCenter?.[hack.getters.client.rIndex]) {
  2916. hack.getters.client.dcIndex++;
  2917. hack.getters.client.rIndex = 0;
  2918.  
  2919. if (!hack.getters.network.dataCenters?.[hack.getters.client.dcIndex]) {
  2920. alert("It seems all servers are full. Please refresh your page and try again.");
  2921. location.reload();
  2922. return;
  2923. }
  2924. }
  2925. } while (hack.getters.network.dataCenters?.[hack.getters.client.dcIndex]?.[hack.getters.client.rIndex]?.[2] !== hack.getters.client.modeInfo.mp);
  2926.  
  2927. const newGsip = hack.getters.network.dataCenters?.[hack.getters.client.dcIndex]?.[hack.getters.client.rIndex]?.[1];
  2928. const newGsrn = hack.getters.network.dataCenters?.[hack.getters.client.dcIndex]?.[hack.getters.client.rIndex]?.[3];
  2929. hack.getters.client.roomId = hack.getters.network.dataCenters?.[hack.getters.client.dcIndex]?.[hack.getters.client.rIndex]?.[4];
  2930.  
  2931. hack.getters.client.findUntilFound(newGsip, newGsrn, n);
  2932. }
  2933. });
  2934. }
  2935. });
  2936. });
  2937. });
  2938. });
  2939. };
  2940.  
  2941. document.body.onkeydown = (event) => {
  2942. const key = event.key;
  2943. switch (key) {
  2944. case 'PageUp':
  2945. if (!hack.vars.modeIsOn) {
  2946. hack.getters.me.p.gravityScale = -1
  2947. hack.getters.me.p.collisionResponse = 0
  2948. }
  2949. break;
  2950. case 'PageDown':
  2951. if (!hack.vars.modeIsOn) {
  2952. hack.getters.me.p.gravityScale = 1
  2953. hack.getters.me.p.collisionResponse = 0
  2954. }
  2955. break;
  2956. case 'F2':
  2957. if (!hack.vars.modeIsOn) {
  2958. hack.functions.godModeEnable();
  2959. hack.logFuncs.logModeIsOn();
  2960. hack.functions.multSpdEnable();
  2961. } else {
  2962. hack.functions.godModeDisable();
  2963. hack.logFuncs.logModeIsOn();
  2964. hack.functions.multSpdDisable();
  2965. }
  2966. break;
  2967. case '`': // Backtick (`)
  2968. case 'ё'.toLowerCase(): // Cyrillic Yo (часто на той же клавише, что и Backtick)
  2969. if (hack.vars.modeIsOn) {
  2970. hack.suppFuncs.setMult();
  2971. hack.logFuncs.logSpd();
  2972. }
  2973. break;
  2974. }
  2975. };
  2976.  
  2977. function isGrounded() {
  2978. const meX = hack.getters.me.getX()
  2979. const meY = hack.getters.me.getY()
  2980. const ray = hack.getters.ray
  2981. const physics = hack.getters.physics
  2982. const gpPWorld = hack.getters.gp.pWorld
  2983. const rayResult = hack.getters.me.ray.result
  2984. const rayHitPoint = (hack.getters.ray.hitPoint = [Infinity, Infinity])
  2985.  
  2986. const verticalOffset = 50
  2987. const checkYPosition = meY + 45
  2988.  
  2989. for (let i = 0; i < 121; i++) {
  2990. const o = meX - 15 + i * (30 / 120)
  2991. const s = checkYPosition
  2992. const u = s + verticalOffset
  2993.  
  2994. ray.from = [physics.xAxis(o, 0), physics.yAxis(s, 0)]
  2995. ray.to = [physics.xAxis(o, 0), physics.yAxis(u, 0)]
  2996.  
  2997. ray.update()
  2998. rayResult.reset()
  2999.  
  3000. if (gpPWorld.raycast(rayResult, ray)) {
  3001. rayResult.getHitPoint(rayHitPoint, ray)
  3002. const hitDistance = rayResult.getHitDistance(ray)
  3003.  
  3004. if (rayResult.shape.ref.getCollision() && hitDistance < 0.1) {
  3005. return true
  3006. }
  3007. }
  3008. }
  3009.  
  3010. return false
  3011. }
  3012.  
  3013. function newMovement() {
  3014. hack.getters.client.loopFunctions[2].fun = function() {
  3015. const currentTime = Date.now()
  3016. const dashCooldown = 250
  3017. const dashDistance = 2.5
  3018. const dashSpeed = 25
  3019. const grounded = isGrounded()
  3020.  
  3021. if (grounded) {
  3022. hack.playerMoveData.airDashAvailable = true
  3023. }
  3024.  
  3025. if (hack.getters.mode.moveLeft) {
  3026. hack.playerMoveData.lastHorizontalDirection = -1
  3027. } else if (hack.getters.mode.moveRight) {
  3028. hack.playerMoveData.lastHorizontalDirection = 1
  3029. }
  3030.  
  3031. if (
  3032. hack.keyBindings.isCPressed &&
  3033. hack.getters.mode.moveDown &&
  3034. currentTime - hack.playerMoveData.lastDashTime >= dashCooldown &&
  3035. !hack.playerMoveData.isDashingDown &&
  3036. (grounded || (!grounded && hack.playerMoveData.airDashAvailable))
  3037. ) {
  3038. hack.playerMoveData.lastDashTime = currentTime
  3039. hack.playerMoveData.isDashingDown = true
  3040. hack.playerMoveData.dashDuration = (dashDistance / dashSpeed) * 1000
  3041. hack.playerMoveData.dashEndTime = currentTime + hack.playerMoveData.dashDuration
  3042. if (!grounded) {
  3043. hack.playerMoveData.airDashAvailable = false
  3044. }
  3045. }
  3046.  
  3047. if (
  3048. hack.keyBindings.isCPressed &&
  3049. hack.getters.mode.moveUp &&
  3050. currentTime - hack.playerMoveData.lastDashTime >= dashCooldown &&
  3051. !hack.playerMoveData.isDashingUp &&
  3052. (grounded || (!grounded && hack.playerMoveData.airDashAvailable))
  3053. ) {
  3054. hack.playerMoveData.lastDashTime = currentTime
  3055. hack.playerMoveData.isDashingUp = true
  3056. hack.playerMoveData.dashDuration = (dashDistance / dashSpeed) * 1000
  3057. hack.playerMoveData.dashEndTime = currentTime + hack.playerMoveData.dashDuration
  3058. if (!grounded) {
  3059. hack.playerMoveData.airDashAvailable = false
  3060. }
  3061. }
  3062.  
  3063. if (
  3064. hack.keyBindings.isCPressed &&
  3065. currentTime - hack.playerMoveData.lastDashTime >= dashCooldown &&
  3066. !hack.playerMoveData.isDashing &&
  3067. (grounded || (!grounded && hack.playerMoveData.airDashAvailable))
  3068. ) {
  3069. hack.playerMoveData.lastDashTime = currentTime
  3070. hack.playerMoveData.isDashing = true
  3071. hack.playerMoveData.dashVelocity = dashSpeed * hack.playerMoveData.lastHorizontalDirection
  3072. hack.playerMoveData.dashDuration = (dashDistance / dashSpeed) * 1000
  3073. hack.playerMoveData.dashEndTime = currentTime + hack.playerMoveData.dashDuration
  3074. if (!grounded) {
  3075. hack.playerMoveData.airDashAvailable = false
  3076. }
  3077. }
  3078.  
  3079. if (hack.playerMoveData.isDashingDown) {
  3080. hack.getters.mode.player.gpData.p.velocity[1] = -dashSpeed
  3081. hack.getters.mode.player.gpData.p.velocity[0] = 0
  3082. hack.getters.me.p.collisionResponse = false
  3083. if (currentTime >= hack.playerMoveData.dashEndTime) {
  3084. hack.playerMoveData.isDashingDown = false
  3085. hack.getters.mode.player.gpData.p.velocity[1] = 0
  3086. if (!hack.vars.modeIsOn) {
  3087. hack.getters.me.p.collisionResponse = true
  3088. }
  3089. }
  3090. return
  3091. }
  3092.  
  3093. if (hack.playerMoveData.isDashingUp) {
  3094. hack.getters.mode.player.gpData.p.velocity[1] = dashSpeed
  3095. hack.getters.mode.player.gpData.p.velocity[0] = 0
  3096. hack.getters.me.p.collisionResponse = false
  3097. if (currentTime >= hack.playerMoveData.dashEndTime) {
  3098. hack.playerMoveData.isDashingUp = false
  3099. hack.getters.mode.player.gpData.p.velocity[1] = 0
  3100. if (!hack.vars.modeIsOn) {
  3101. hack.getters.me.p.collisionResponse = true
  3102. }
  3103. }
  3104. return
  3105. }
  3106.  
  3107. if (hack.playerMoveData.isDashing) {
  3108. hack.getters.mode.player.gpData.p.velocity[0] = hack.playerMoveData.dashVelocity
  3109. hack.getters.mode.player.gpData.p.velocity[1] = 0
  3110. hack.getters.me.p.collisionResponse = false
  3111. if (currentTime >= hack.playerMoveData.dashEndTime) {
  3112. hack.playerMoveData.isDashing = false
  3113. hack.getters.mode.player.gpData.p.velocity[0] = 0
  3114. if (!hack.vars.modeIsOn) {
  3115. hack.getters.me.p.collisionResponse = true
  3116. }
  3117. }
  3118. return
  3119. } else {
  3120. if (hack.getters.mode.moveRight) {
  3121. hack.getters.mode.player.gpData.p.velocity[0] = hack.vars.lrSpd * hack.vars.mult
  3122. } else if (hack.getters.mode.moveLeft) {
  3123. hack.getters.mode.player.gpData.p.velocity[0] = -hack.vars.lrSpd * hack.vars.mult
  3124. }
  3125. }
  3126.  
  3127. if (grounded) {
  3128. hack.playerMoveData.isDoubleJumpAllowed = true
  3129. if (hack.keyBindings.isZPressed) {
  3130. hack.keyBindings.isZPressed = false
  3131. hack.getters.velocity[1] = 8 * (hack.getters.me.p.gravityScale)
  3132. }
  3133. } else if (hack.playerMoveData.isDoubleJumpAllowed && hack.keyBindings.isZPressed) {
  3134. hack.keyBindings.isZPressed = false
  3135. hack.getters.velocity[1] = 8 * (hack.getters.me.p.gravityScale)
  3136. hack.playerMoveData.isDoubleJumpAllowed = false
  3137. }
  3138.  
  3139. if (hack.vars.ghost1) {
  3140. if (hack.getters.mode.moveUp) {
  3141. hack.getters.velocity[1] = hack.vars.udSpd * hack.vars.mult
  3142. }
  3143. if (hack.getters.mode.moveDown) {
  3144. hack.getters.velocity[1] = -hack.vars.udSpd * hack.vars.mult
  3145. }
  3146. if (!hack.getters.mode.moveUp && !hack.getters.mode.moveDown) {
  3147. hack.getters.velocity[1] = 0
  3148. }
  3149. }
  3150. }
  3151. hack.playerMoveData.newMovementIsOn = true
  3152. }
  3153.  
  3154. function oldMovement() {
  3155. hack.getters.client.loopFunctions[2].fun = function() {
  3156. const grounded = isGrounded()
  3157.  
  3158. if (hack.getters.mode.moveRight) {
  3159. hack.getters.mode.player.gpData.p.velocity[0] = hack.vars.lrSpd * hack.vars.mult
  3160. } else if (hack.getters.mode.moveLeft) {
  3161. hack.getters.mode.player.gpData.p.velocity[0] = -hack.vars.lrSpd * hack.vars.mult
  3162. }
  3163. if (grounded) {
  3164. if (hack.getters.mode.moveUp) {
  3165. hack.getters.velocity[1] = 8
  3166. }
  3167. }
  3168. if (hack.vars.ghost1) {
  3169. if (hack.getters.mode.moveUp) {
  3170. hack.getters.velocity[1] = hack.vars.udSpd * hack.vars.mult
  3171. }
  3172. if (hack.getters.mode.moveDown) {
  3173. hack.getters.velocity[1] = -hack.vars.udSpd * hack.vars.mult
  3174. }
  3175. if (!hack.getters.mode.moveUp && !hack.getters.mode.moveDown) {
  3176. hack.getters.velocity[1] = 0
  3177. }
  3178. }
  3179. }
  3180. hack.playerMoveData.newMovementIsOn = false
  3181. }
  3182. addEventListener("mousewheel", e => {
  3183. window.tweenObjects.map(x => {
  3184. try {
  3185. if (e.shiftKey) {
  3186. hack.getters.mode.player.gpData.p.velocity[0] = -Math.sign(e.deltaY) * 15;
  3187. } else {
  3188. hack.getters.mode.player.gpData.p.velocity[1] = -Math.sign(e.deltaY) * 15;
  3189. }
  3190. } catch (err) {
  3191. console.error(err);
  3192. }
  3193. });
  3194. })
  3195. }
  3196.  
  3197. let temp1 = {};
  3198. const _call = Function.prototype.call;
  3199. new Promise((resolve, reject) => {
  3200. Function.prototype.call = function(...args) {
  3201. if (args[2]?.exports) {
  3202. temp1 = args[6]
  3203. Function.prototype.call = _call
  3204. console.log(temp1)
  3205. resolve(temp1)
  3206. }
  3207. return _call.apply(this, args)
  3208. };
  3209. }).then((result) => {
  3210. if (Object.keys(result).length > 0) {
  3211. activateMain(result)
  3212. } else {
  3213. console.log("temp1 is empty")
  3214. }
  3215. }).catch((error) => {
  3216. console.error("An error occurred:", error)
  3217. })
  3218. }
  3219.  
  3220. if (sandboxURL.includes(window.location.href)) {
  3221. sandboxHack();
  3222. } else if (twoPlayerURL.includes(window.location.href)) {
  3223. twoPlayerHack();
  3224. } else if (hideAndSeekURL.includes(window.location.href)) {
  3225. hideAndSeekHack();
  3226. }