Krunker Cheating Software 0.8.0

Enhanced Krunker Cheat Script (v0.8.0) with AimBot, AimAssist, ESP, High Jump, FPS Boost, Speed Boost, Auto Shoot, Auto Jump and Recoil Compensation

  1. // ==UserScript==
  2. // @name Krunker Cheating Software 0.8.0
  3. // @name:de Krunker Cheating Software 0.8.0
  4. // @namespace http://tampermonkey.net/
  5. // @version 0.8.0
  6. // @description Enhanced Krunker Cheat Script (v0.8.0) with AimBot, AimAssist, ESP, High Jump, FPS Boost, Speed Boost, Auto Shoot, Auto Jump and Recoil Compensation
  7. // @description:de Gratis Krunker Cheating Software; Mod Menu; ESP, AimBot, Recoil Comp und viel mehr. Erlebe Krunker.io wie nie zuvor mit diesem leistungsstarken Mod-Menü! Aktiviere Aimbot für perfektes automatisches Zielen, nutze ESP (Wallhack), um Gegner durch Wände zu sehen, verbessere dein Gameplay mit Aim-Assist, springe höher als je zuvor mit High Jump und eliminiere den Rückstoß deiner Waffen dank Recoil-Kompensation. Hol dir den ultimativen Vorteil und dominiere jede Runde mit Leichtigkeit!
  8. // @match krunker.io/*
  9. // @match browserfps.com/*
  10. // @exclude *://krunker.io/social*
  11. // @exclude *://krunker.io/editor*
  12. // @icon https://www.google.com/s2/favicons?domain=krunker.io
  13. // @grant none
  14. // @run-at document-end
  15. // @require https://unpkg.com/three@0.150.0/build/three.min.js
  16. // ==/UserScript==
  17.  
  18. (function() {
  19. 'use strict';
  20.  
  21. /************* CSS Styles *************/
  22. const style = document.createElement('style');
  23. style.innerHTML = `
  24. .msg {
  25. position: absolute;
  26. left: 10px;
  27. bottom: 10px;
  28. color:#fff;
  29. background: rgba(0, 0, 0, 0.6);
  30. font-weight: bolder;
  31. padding: 15px;
  32. animation: msg 0.5s forwards, msg 0.5s reverse forwards 3s;
  33. z-index: 999999;
  34. pointer-events: none;
  35. font-family: Arial, sans-serif;
  36. }
  37. @keyframes msg {
  38. from {transform: translate(-120%, 0);}
  39. to {transform: none;}
  40. }
  41. .zui {
  42. position: fixed;
  43. right: 10px;
  44. top: 10px;
  45. z-index: 9999;
  46. display: flex;
  47. flex-direction: column;
  48. font-family: Arial, sans-serif;
  49. font-size: 14px;
  50. color:#fff;
  51. width: 250px;
  52. user-select: none;
  53. border-radius: 8px;
  54. overflow: hidden;
  55. background: linear-gradient(135deg, #333, #222);
  56. box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
  57. border: 1px solid #000;
  58. color:#fff;
  59. }
  60. .zui-header {
  61. background: linear-gradient(135deg, #333, #222);
  62. padding: 10px;
  63. font-weight: bold;
  64. font-size: 16px;
  65. text-align: center;
  66. position: relative;
  67. cursor: pointer;
  68. color:#fff;
  69. }
  70. .zui-item {
  71. padding: 10px 8px;
  72. display: flex;
  73. justify-content: space-between;
  74. align-items: center;
  75. background: rgba(0, 0, 0);
  76. border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  77. transition: background 0.3s;
  78. cursor: pointer;
  79. color:#fff;
  80. }
  81. .zui-item:last-child {
  82. border-bottom: none;
  83. }
  84. .zui-item:hover {
  85. color: rgba(5, 5, 5);
  86. }
  87. .zui-item.text {
  88. justify-content: center;
  89. cursor: unset;
  90. text-align: center;
  91. background: none;
  92. border-bottom: none;
  93. color:#fff;
  94. }
  95. .zui-item-value {
  96. font-weight: bold;
  97. color:#fff;
  98. }
  99. .zui-content {
  100. color:#fff;
  101. display: block;
  102. }
  103. `;
  104. document.head.appendChild(style);
  105.  
  106. /************* Common Variables and Functions *************/
  107.  
  108. const COOKIE_NAME = "krunker_access_auth";
  109. const COOKIE_VALID_DAYS = 7;
  110.  
  111. function setCookie(name, value, days) {
  112. const date = new Date();
  113. date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000));
  114. const expires = "expires=" + date.toUTCString();
  115. document.cookie = name + "=" + encodeURIComponent(value) + ";" + expires + ";path=/";
  116. }
  117.  
  118. function getCookie(name) {
  119. const decodedCookie = decodeURIComponent(document.cookie);
  120. const ca = decodedCookie.split(';');
  121. const cookieName = name + "=";
  122. for (let i = 0; i < ca.length; i++) {
  123. let c = ca[i].trim();
  124. if (c.indexOf(cookieName) === 0) {
  125. return c.substring(cookieName.length, c.length);
  126. }
  127. }
  128. return "";
  129. }
  130.  
  131. function checkAccess() {
  132. const storedValue = getCookie(COOKIE_NAME);
  133. if (storedValue) {
  134. const storedTime = parseInt(storedValue, 10);
  135. const elapsedTime = Date.now() - storedTime;
  136. if (elapsedTime < COOKIE_VALID_DAYS * 24 * 60 * 60 * 1000) {
  137. return true;
  138. }
  139. }
  140. setCookie(COOKIE_NAME, Date.now().toString(), COOKIE_VALID_DAYS);
  141. return false;
  142. }
  143.  
  144. if (!checkAccess()) {
  145. console.log("Access denied. Please redownload the script.");
  146. return;
  147. }
  148.  
  149. console.log("KCS v0.8.0 is loaded.");
  150.  
  151. const THREE = window.THREE;
  152. delete window.THREE;
  153.  
  154. // Settings
  155. const settings = {
  156. aimbotEnabled: false,
  157. espEnabled: true,
  158. espLines: false,
  159. aimAssistEnabled: false,
  160. recoilCompEnabled: true,
  161. highJumpEnabled: false
  162. };
  163.  
  164. const addOnSettings = {
  165. 'FPS Boost': false,
  166. 'Speed Boost': false,
  167. 'Auto Shoot': false,
  168. 'Auto Jump': false,
  169. 'Krunker Hardcore Mode': false
  170. };
  171.  
  172. const keyToSetting = {
  173. KeyB: 'aimbotEnabled',
  174. KeyM: 'espEnabled',
  175. KeyN: 'espLines',
  176. KeyV: 'aimAssistEnabled',
  177. KeyL: 'highJumpEnabled',
  178. };
  179.  
  180. let scene;
  181. let myPlayer;
  182.  
  183. const x = {
  184. window: window,
  185. document: document,
  186. querySelector: document.querySelector.bind(document),
  187. consoleLog: console.log,
  188. ReflectApply: Reflect.apply,
  189. ArrayPrototype: Array.prototype,
  190. ArrayPush: Array.prototype.push,
  191. ObjectPrototype: Object.prototype,
  192. clearInterval: window.clearInterval,
  193. setTimeout: window.setTimeout,
  194. indexOf: String.prototype.indexOf,
  195. requestAnimationFrame: window.requestAnimationFrame
  196. };
  197.  
  198. x.consoleLog('Waiting to inject...');
  199.  
  200. const proxied = function (object) {
  201. try {
  202. if (typeof object === 'object' &&
  203. typeof object.parent === 'object' &&
  204. object.parent.type === 'Scene' &&
  205. object.parent.name === 'Main') {
  206. x.consoleLog('Found Scene!');
  207. scene = object.parent;
  208. x.ArrayPrototype.push = x.ArrayPush;
  209. }
  210. } catch (error) {}
  211. return x.ArrayPush.apply(this, arguments);
  212. };
  213.  
  214. const tempVector = new THREE.Vector3();
  215. const tempObject = new THREE.Object3D();
  216. tempObject.rotation.order = 'YXZ';
  217.  
  218. const geometry = new THREE.EdgesGeometry(new THREE.BoxGeometry(5, 15, 5).translate(0, 7.5, 0));
  219. const material = new THREE.RawShaderMaterial({
  220. vertexShader: `
  221. attribute vec3 position;
  222. uniform mat4 projectionMatrix;
  223. uniform mat4 modelViewMatrix;
  224. void main() {
  225. gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);
  226. gl_Position.z = 1.0;
  227. }
  228. `,
  229. fragmentShader: `
  230. void main() {
  231. gl_FragColor = vec4(1.0, 0.0, 0.0, 1.0);
  232. }
  233. `
  234. });
  235.  
  236. const line = new THREE.LineSegments(new THREE.BufferGeometry(), material);
  237. line.frustumCulled = false;
  238. const linePositions = new THREE.BufferAttribute(new Float32Array(100 * 2 * 3), 3);
  239. line.geometry.setAttribute('position', linePositions);
  240.  
  241. let injectTimer = null;
  242.  
  243. function showMsg(message, bool) {
  244. let msgDiv = document.querySelector('.msg');
  245. if (!msgDiv) {
  246. msgDiv = document.createElement('div');
  247. msgDiv.className = 'msg';
  248. document.body.appendChild(msgDiv);
  249. }
  250. msgDiv.innerText = message;
  251. msgDiv.style.background = bool ? 'rgba(0, 128, 0, 0.6)' : 'rgba(128, 0, 0, 0.6)';
  252. msgDiv.style.display = 'block';
  253. setTimeout(() => {
  254. msgDiv.style.display = 'none';
  255. }, 3000);
  256. }
  257.  
  258. function aimAtTarget(myPlayer, targetPlayer, factor) {
  259. tempVector.setScalar(0);
  260. if (targetPlayer && targetPlayer.children && targetPlayer.children[0] && targetPlayer.children[0].children && targetPlayer.children[0].children[0]) {
  261. targetPlayer.children[0].children[0].localToWorld(tempVector);
  262. } else {
  263. tempVector.copy(targetPlayer.position);
  264. }
  265.  
  266. tempObject.position.copy(myPlayer.position);
  267. tempObject.lookAt(tempVector);
  268.  
  269. myPlayer.children[0].rotation.x += factor * (-tempObject.rotation.x - myPlayer.children[0].rotation.x);
  270. myPlayer.rotation.y += factor * ((tempObject.rotation.y + Math.PI) - myPlayer.rotation.y);
  271. }
  272.  
  273. function aimAssist(myPlayer, targetPlayer) {
  274. const maxDistance = 600;
  275. const baseVector = new THREE.Vector3();
  276.  
  277. if (targetPlayer && targetPlayer.children && targetPlayer.children[0] && targetPlayer.children[0].children && targetPlayer.children[0].children[0]) {
  278. targetPlayer.children[0].children[0].localToWorld(baseVector);
  279. } else {
  280. baseVector.copy(targetPlayer.position);
  281. }
  282.  
  283. const dist = baseVector.distanceTo(myPlayer.position);
  284. if (dist > maxDistance) {
  285. return;
  286. }
  287.  
  288. aimAtTarget(myPlayer, targetPlayer, 1.0);
  289. }
  290.  
  291. let shooting = false;
  292. let stableRotationX = 0;
  293. let noRecoilInterval = null;
  294. function startNoRecoilLoop() {
  295. if (noRecoilInterval) return;
  296. noRecoilInterval = setInterval(() => {
  297. if (!myPlayer || !shooting || !settings.recoilCompEnabled) return;
  298. myPlayer.children[0].rotation.x = stableRotationX;
  299. }, 10);
  300. }
  301.  
  302. function stopNoRecoilLoop() {
  303. if (noRecoilInterval) {
  304. clearInterval(noRecoilInterval);
  305. noRecoilInterval = null;
  306. }
  307. }
  308.  
  309. window.addEventListener('pointerdown', function(event) {
  310. if (!myPlayer) return;
  311. if (event.button === 0) {
  312. shooting = true;
  313. stableRotationX = myPlayer.children[0].rotation.x;
  314. if (settings.recoilCompEnabled) {
  315. startNoRecoilLoop();
  316. }
  317. }
  318. });
  319.  
  320. window.addEventListener('pointerup', function(event) {
  321. if (event.button === 0) {
  322. shooting = false;
  323. stopNoRecoilLoop();
  324. }
  325. });
  326.  
  327. // High Jump
  328. function doHighJump() {
  329. if (!myPlayer) return;
  330. myPlayer.position.y += 10;
  331. console.log("High jump performed");
  332. }
  333.  
  334. // Auto Shoot
  335. const raycaster = new THREE.Raycaster();
  336. const shootInterval = 200;
  337. let autoShootLoop = null;
  338.  
  339. function startAutoShootLoop() {
  340. if (autoShootLoop) return;
  341. autoShootLoop = setInterval(() => {
  342. if (!myPlayer || !addOnSettings['Auto Shoot']) return;
  343. // Only shoot if Aimbot or AimAssist is active
  344. if (!settings.aimbotEnabled && !settings.aimAssistEnabled) return;
  345.  
  346. const target = findClosestVisibleEnemy(100);
  347. if (target) {
  348. simulateShoot();
  349. }
  350. }, shootInterval);
  351. }
  352.  
  353. function stopAutoShootLoop() {
  354. if (autoShootLoop) {
  355. clearInterval(autoShootLoop);
  356. autoShootLoop = null;
  357. }
  358. }
  359.  
  360. function findClosestVisibleEnemy(maxDist) {
  361. if (!scene || !myPlayer) return null;
  362. const enemies = [];
  363. for (let i = 0; i < scene.children.length; i++) {
  364. const c = scene.children[i];
  365. if (c !== myPlayer && c.type === 'Object3D') {
  366. try {
  367. if (!c.children[0].children[0].type === 'PerspectiveCamera') {
  368. enemies.push(c);
  369. }
  370. } catch {}
  371. }
  372. }
  373.  
  374. let closest = null;
  375. let closestDist = Infinity;
  376.  
  377. for (const e of enemies) {
  378. const dist = e.position.distanceTo(myPlayer.position);
  379. if (dist <= maxDist && dist < closestDist) {
  380. if (hasLineOfSight(myPlayer, e)) {
  381. closestDist = dist;
  382. closest = e;
  383. }
  384. }
  385. }
  386. return closest;
  387. }
  388.  
  389. function hasLineOfSight(myPlayer, target) {
  390. raycaster.set(myPlayer.position.clone().add(new THREE.Vector3(0,10,0)),
  391. target.position.clone().sub(myPlayer.position).normalize());
  392. const intersects = raycaster.intersectObjects(scene.children, true);
  393. if (intersects.length > 0) {
  394. for (const inter of intersects) {
  395. if (inter.object && (target === inter.object || target.children.includes(inter.object) || target.children[0].children.includes(inter.object))) {
  396. return true;
  397. }
  398. if (inter.distance < target.position.distanceTo(myPlayer.position)) {
  399. return false;
  400. }
  401. }
  402. }
  403. return false;
  404. }
  405.  
  406. function simulateShoot() {
  407. const event = new MouseEvent('pointerdown', {button:0});
  408. window.dispatchEvent(event);
  409. setTimeout(() => {
  410. const eventUp = new MouseEvent('pointerup', {button:0});
  411. window.dispatchEvent(eventUp);
  412. }, 50);
  413. }
  414.  
  415. // Auto Jump
  416. let autoJumpInterval = null;
  417. function startAutoJump() {
  418. if (autoJumpInterval) return;
  419. autoJumpInterval = setInterval(() => {
  420. if (!myPlayer || !addOnSettings['Auto Jump']) return;
  421. const event = new KeyboardEvent('keydown', { key: ' ', code: 'Space', bubbles: true });
  422. window.dispatchEvent(event);
  423. myPlayer.position.y += 2;
  424. }, 2500);
  425. }
  426.  
  427. function stopAutoJump() {
  428. if (autoJumpInterval) {
  429. clearInterval(autoJumpInterval);
  430. autoJumpInterval = null;
  431. }
  432. }
  433.  
  434. // FPS Boost
  435. let fpsBoostActive = false;
  436. function enableFPSBoost(){
  437. console.log("FPS Boost enabled");
  438. fpsBoostActive = true;
  439. if (scene && scene.fog) {
  440. scene.fog = null;
  441. }
  442. let canvas = document.querySelector('canvas');
  443. if (canvas) {
  444. canvas.style.width = (canvas.clientWidth / 2) + "px";
  445. canvas.style.height = (canvas.clientHeight / 2) + "px";
  446. }
  447. }
  448.  
  449. function disableFPSBoost(){
  450. console.log("FPS Boost disabled");
  451. fpsBoostActive = false;
  452. let canvas = document.querySelector('canvas');
  453. if (canvas) {
  454. canvas.style.width = "";
  455. canvas.style.height = "";
  456. }
  457. }
  458.  
  459. // Speed Boost
  460. let originalSpeed = null;
  461. function enableSpeedBoost(){
  462. console.log("Speed Boost enabled");
  463. if (!myPlayer) return;
  464. if (!originalSpeed && typeof myPlayer.speed !== 'undefined') {
  465. originalSpeed = myPlayer.speed;
  466. myPlayer.speed = myPlayer.speed * 2;
  467. } else if (myPlayer.controls && typeof myPlayer.controls.moveSpeed !== 'undefined') {
  468. if (!originalSpeed) originalSpeed = myPlayer.controls.moveSpeed;
  469. myPlayer.controls.moveSpeed = originalSpeed * 2;
  470. }
  471. }
  472.  
  473. function disableSpeedBoost(){
  474. console.log("Speed Boost disabled");
  475. if (!myPlayer) return;
  476. if (originalSpeed !== null) {
  477. if (typeof myPlayer.speed !== 'undefined') {
  478. myPlayer.speed = originalSpeed;
  479. } else if (myPlayer.controls && typeof myPlayer.controls.moveSpeed !== 'undefined') {
  480. myPlayer.controls.moveSpeed = originalSpeed;
  481. }
  482. originalSpeed = null;
  483. }
  484. }
  485.  
  486. function enableAutoShoot(){
  487. console.log("Auto Shoot enabled");
  488. startAutoShootLoop();
  489. }
  490.  
  491. function disableAutoShoot(){
  492. console.log("Auto Shoot disabled");
  493. stopAutoShootLoop();
  494. }
  495.  
  496. function enableAutoJump(){
  497. console.log("Auto Jump enabled");
  498. startAutoJump();
  499. }
  500.  
  501. function disableAutoJump(){
  502. console.log("Auto Jump disabled");
  503. stopAutoJump();
  504. }
  505.  
  506. function enablekrunkerhardcore(){
  507. console.log("Krunker Hardcore Mode enabled");
  508. if (scene) {
  509. scene.fog = new THREE.Fog(0x000000, 10, 50);
  510. }
  511. }
  512.  
  513. function disablekrunkerhardcore(){
  514. console.log("Krunker Hardcore Mode disabled");
  515. if (scene) {
  516. scene.fog = null;
  517. }
  518. }
  519.  
  520. function animate() {
  521. x.requestAnimationFrame.call(x.window, animate);
  522.  
  523. if (!scene && !injectTimer) {
  524. const el = x.querySelector('#loadingBg');
  525. if (el && el.style.display === 'none') {
  526. x.consoleLog('Inject timer started!');
  527. injectTimer = x.setTimeout.call(x.window, () => {
  528. x.consoleLog('Injected!');
  529. x.ArrayPrototype.push = proxied;
  530. if (scene && !scene.getObjectByName('espLine')) {
  531. line.name = 'espLine';
  532. scene.add(line);
  533. }
  534. }, 2000);
  535. }
  536. }
  537.  
  538. if (!scene) return;
  539.  
  540. const players = [];
  541. myPlayer = null;
  542.  
  543. for (let i = 0; i < scene.children.length; i++) {
  544. const child = scene.children[i];
  545. if (child.type === 'Object3D') {
  546. try {
  547. if (child.children[0].children[0].type === 'PerspectiveCamera') {
  548. myPlayer = child;
  549. } else {
  550. players.push(child);
  551. }
  552. } catch (err) {}
  553. }
  554. }
  555.  
  556. if (!myPlayer) {
  557. x.consoleLog('No player found.');
  558. x.ArrayPrototype.push = proxied;
  559. return;
  560. }
  561.  
  562. let counter = 0;
  563. let targetPlayer;
  564. let minDistance = Infinity;
  565. const maxAimbotDistance = 255;
  566.  
  567. tempObject.matrix.copy(myPlayer.matrix).invert();
  568.  
  569. for (let i = 0; i < players.length; i++) {
  570. const player = players[i];
  571.  
  572. if (!player.box) {
  573. const box = new THREE.LineSegments(geometry, material);
  574. box.frustumCulled = false;
  575. player.add(box);
  576. player.box = box;
  577. }
  578.  
  579. if (player.position.x === myPlayer.position.x && player.position.z === myPlayer.position.z) {
  580. player.box.visible = false;
  581. if (line.parent !== player) {
  582. player.add(line);
  583. }
  584. continue;
  585. }
  586.  
  587. if (settings.espLines) {
  588. linePositions.setXYZ(counter++, 0, 10, -5);
  589.  
  590. tempVector.copy(player.position);
  591. tempVector.y += 9;
  592. tempVector.applyMatrix4(tempObject.matrix);
  593.  
  594. linePositions.setXYZ(
  595. counter++,
  596. tempVector.x,
  597. tempVector.y,
  598. tempVector.z
  599. );
  600. }
  601.  
  602. player.box.visible = settings.espEnabled;
  603.  
  604. const distance = player.position.distanceTo(myPlayer.position);
  605. if (distance < minDistance && distance <= maxAimbotDistance) {
  606. targetPlayer = player;
  607. minDistance = distance;
  608. }
  609. }
  610.  
  611. if (settings.espLines) {
  612. linePositions.needsUpdate = true;
  613. line.geometry.setDrawRange(0, counter);
  614. line.visible = true;
  615. } else {
  616. line.visible = false;
  617. }
  618.  
  619. if (!targetPlayer) return;
  620.  
  621. if (settings.aimbotEnabled) {
  622. aimAtTarget(myPlayer, targetPlayer, 1.0);
  623. } else if (settings.aimAssistEnabled && !settings.aimbotEnabled) {
  624. aimAssist(myPlayer, targetPlayer);
  625. }
  626. }
  627.  
  628. window.addEventListener('keydown', function(event) {
  629. if (event.code === 'Space' && myPlayer) {
  630. if (settings.highJumpEnabled) {
  631. doHighJump();
  632. }
  633. }
  634. });
  635.  
  636. function fromHtml(html) {
  637. const div = document.createElement('div');
  638. div.innerHTML = html;
  639. return div.children[0];
  640. }
  641.  
  642. function createGUI() {
  643. const guiEl = fromHtml(`
  644. <div class="zui">
  645. <div class="zui-header">
  646. Krunker Cheating Software v.0.8.0
  647. <span class="zui-item-value">+</span>
  648. </div>
  649. <div class="zui-content">
  650. <div class="zui-section normal-settings-section">
  651. <div class="zui-item" data-setting="aimbotEnabled">
  652. <span>Aimbot</span>
  653. <span class="zui-item-value">OFF</span>
  654. </div>
  655. <div class="zui-item" data-setting="espEnabled">
  656. <span>ESP</span>
  657. <span class="zui-item-value">OFF</span>
  658. </div>
  659. <div class="zui-item" data-setting="espLines">
  660. <span>ESP Lines</span>
  661. <span class="zui-item-value">OFF</span>
  662. </div>
  663. <div class="zui-item" data-setting="aimAssistEnabled">
  664. <span>Aim Assist</span>
  665. <span class="zui-item-value">OFF</span>
  666. </div>
  667. <div class="zui-item" data-setting="recoilCompEnabled">
  668. <span>Recoil Compensation</span>
  669. <span class="zui-item-value">OFF</span>
  670. </div>
  671. <div class="zui-item" data-setting="highJumpEnabled">
  672. <span>High Jump</span>
  673. <span class="zui-item-value">OFF</span>
  674. </div>
  675. <div class="zui-item toggle-more-settings">
  676. <span>More Settings</span>
  677. <span class="zui-item-value">➕</span>
  678. </div>
  679. </div>
  680. <div class="zui-section add-on-settings-section" style="display:none;">
  681. <strong>Add-On Settings</strong>
  682. <div class="zui-item" data-addon-setting="FPS Boost">
  683. <span>FPS Boost</span>
  684. <span class="zui-item-value">OFF</span>
  685. </div>
  686. <div class="zui-item" data-addon-setting="Speed Boost">
  687. <span>Speed Boost</span>
  688. <span class="zui-item-value">OFF</span>
  689. </div>
  690. <div class="zui-item" data-addon-setting="Auto Shoot">
  691. <span>Auto Shoot</span>
  692. <span class="zui-item-value">OFF</span>
  693. </div>
  694. <div class="zui-item" data-addon-setting="Auto Jump">
  695. <span>Auto Jump</span>
  696. <span class="zui-item-value">OFF</span>
  697. </div>
  698. <div class="zui-item" data-addon-setting="Krunker Hardcore Mode">
  699. <span>Krunker Hardcore Mode</span>
  700. <span class="zui-item-value">OFF</span>
  701. </div>
  702. <div class="zui-item toggle-back-settings">
  703. <span>Back</span>
  704. <span class="zui-item-value">⬅️</span>
  705. </div>
  706. </div>
  707. <div class="zui-item text">
  708. <span>Dev: wi1lliott8411</span>
  709. </div>
  710. </div>
  711. </div>
  712. `);
  713.  
  714. const toggleMoreSettingsBtn = guiEl.querySelector('.toggle-more-settings');
  715. const toggleBackSettingsBtn = guiEl.querySelector('.toggle-back-settings');
  716.  
  717. toggleMoreSettingsBtn.addEventListener('click', function() {
  718. const normalSection = guiEl.querySelector('.normal-settings-section');
  719. const addOnSection = guiEl.querySelector('.add-on-settings-section');
  720. normalSection.style.display = 'none';
  721. addOnSection.style.display = 'block';
  722. });
  723.  
  724. toggleBackSettingsBtn.addEventListener('click', function() {
  725. const normalSection = guiEl.querySelector('.normal-settings-section');
  726. const addOnSection = guiEl.querySelector('.add-on-settings-section');
  727. normalSection.style.display = 'block';
  728. addOnSection.style.display = 'none';
  729. });
  730.  
  731. const normalToggleItems = guiEl.querySelectorAll('.normal-settings-section .zui-item[data-setting]');
  732. normalToggleItems.forEach(item => {
  733. const settingKey = item.getAttribute('data-setting');
  734. const valueEl = item.querySelector('.zui-item-value');
  735. updateSettingDisplay(settingKey, settings[settingKey], valueEl);
  736.  
  737. item.addEventListener('click', function() {
  738. settings[settingKey] = !settings[settingKey];
  739. updateSettingDisplay(settingKey, settings[settingKey], valueEl);
  740. showMsg(`${fromCamel(settingKey)} ${settings[settingKey] ? 'enabled' : 'disabled'}`, settings[settingKey]);
  741. applyImmediateEffects(settingKey, settings[settingKey]);
  742. });
  743. });
  744.  
  745. const addOnToggleItems = guiEl.querySelectorAll('.add-on-settings-section .zui-item[data-addon-setting]');
  746. addOnToggleItems.forEach(item => {
  747. const settingName = item.getAttribute('data-addon-setting');
  748. const valueEl = item.querySelector('.zui-item-value');
  749. updateAddOnSettingDisplay(settingName, addOnSettings[settingName], valueEl);
  750.  
  751. item.addEventListener('click', function() {
  752. addOnSettings[settingName] = !addOnSettings[settingName];
  753. updateAddOnSettingDisplay(settingName, addOnSettings[settingName], valueEl);
  754. showMsg(`${settingName} ${addOnSettings[settingName] ? 'enabled' : 'disabled'}`, addOnSettings[settingName]);
  755. applyImmediateAddOnEffects(settingName, addOnSettings[settingName]);
  756. });
  757. });
  758.  
  759. return guiEl;
  760. }
  761.  
  762. function updateSettingDisplay(settingKey, isActive, valueEl) {
  763. valueEl.innerText = isActive ? 'ON' : 'OFF';
  764. valueEl.style.color = isActive ? '#0f0' : '#f00';
  765. }
  766.  
  767. function updateAddOnSettingDisplay(settingName, isActive, valueEl) {
  768. valueEl.innerText = isActive ? 'ON' : 'OFF';
  769. valueEl.style.color = isActive ? '#0f0' : '#f00';
  770. }
  771.  
  772. function applyImmediateEffects(settingKey, value) {
  773. console.log(`Setting ${settingKey} turned ${value ? 'ON' : 'OFF'}`);
  774.  
  775. switch(settingKey) {
  776. case 'aimbotEnabled':
  777. if(value) { enableAimbot(); } else { disableAimbot(); }
  778. break;
  779. case 'espEnabled':
  780. if(value) { enableESP(); } else { disableESP(); }
  781. break;
  782. case 'espLines':
  783. if(value) { enableESPLines(); } else { disableESPLines(); }
  784. break;
  785. case 'aimAssistEnabled':
  786. if(value) { enableAimAssist(); } else { disableAimAssist(); }
  787. break;
  788. case 'recoilCompEnabled':
  789. if(value) { enableRecoilCompensation(); } else { disableRecoilCompensation(); }
  790. break;
  791. case 'highJumpEnabled':
  792. if(value) { enableHighJump(); } else { disableHighJump(); }
  793. break;
  794. default:
  795. console.log(`No action for setting: ${settingKey}`);
  796. }
  797. }
  798.  
  799. function applyImmediateAddOnEffects(settingName, value) {
  800. console.log(`Add-On setting ${settingName} turned ${value ? 'ON' : 'OFF'}`);
  801.  
  802. switch(settingName) {
  803. case 'FPS Boost':
  804. if(value) { enableFPSBoost(); } else { disableFPSBoost(); }
  805. break;
  806. case 'Speed Boost':
  807. if(value) { enableSpeedBoost(); } else { disableSpeedBoost(); }
  808. break;
  809. case 'Auto Shoot':
  810. if(value) { enableAutoShoot(); } else { disableAutoShoot(); }
  811. break;
  812. case 'Auto Jump':
  813. if(value) { enableAutoJump(); } else { disableAutoJump(); }
  814. break;
  815. case 'Krunker Hardcore Mode':
  816. if(value) { enablekrunkerhardcore(); } else { disablekrunkerhardcore(); }
  817. break;
  818. default:
  819. console.log(`No action for Add-On setting: ${settingName}`);
  820. }
  821. }
  822.  
  823. function fromCamel(text) {
  824. const result = text.replace(/([A-Z])/g, ' $1');
  825. return result.charAt(0).toUpperCase() + result.slice(1);
  826. }
  827.  
  828. // Dummy functions
  829. function enableAimbot(){console.log("Aimbot enabled");}
  830. function disableAimbot(){console.log("Aimbot disabled");}
  831. function enableESP(){console.log("ESP enabled");}
  832. function disableESP(){console.log("ESP disabled");}
  833. function enableESPLines(){console.log("ESP Lines enabled");}
  834. function disableESPLines(){console.log("ESP Lines disabled");}
  835. function enableAimAssist(){console.log("Aim Assist enabled");}
  836. function disableAimAssist(){console.log("Aim Assist disabled");}
  837. function enableRecoilCompensation(){console.log("Recoil Compensation enabled");}
  838. function disableRecoilCompensation(){console.log("Recoil Compensation disabled");}
  839. function enableHighJump(){console.log("High Jump enabled");}
  840. function disableHighJump(){console.log("High Jump disabled");}
  841.  
  842. window.addEventListener('keyup', function (event) {
  843. if (document.activeElement && document.activeElement.value !== undefined) return;
  844. if (keyToSetting[event.code]) {
  845. toggleSetting(keyToSetting[event.code]);
  846. }
  847. });
  848.  
  849. function toggleSetting(key) {
  850. settings[key] = !settings[key];
  851. showMsg(`${fromCamel(key)} ${settings[key] ? 'enabled' : 'disabled'}`, settings[key]);
  852. const item = document.querySelector(`.normal-settings-section .zui-item[data-setting="${key}"]`);
  853. if(item) {
  854. const valueEl = item.querySelector('.zui-item-value');
  855. updateSettingDisplay(key, settings[key], valueEl);
  856. }
  857. applyImmediateEffects(key, settings[key]);
  858. }
  859.  
  860. function appendGUI() {
  861. const gui = createGUI();
  862. document.body.appendChild(gui);
  863. }
  864.  
  865. if (document.readyState === 'loading') {
  866. window.addEventListener('DOMContentLoaded', appendGUI);
  867. } else {
  868. appendGUI();
  869. }
  870.  
  871. animate();
  872.  
  873. })();