您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Improved aimbot and ESP with an in-game GUI for toggles.
当前为
// ==UserScript== // @name Enhanced Krunker.IO Aimbot & ESP with GUI // @namespace http://tampermonkey.net/ // @version 1.3.0 // @description Improved aimbot and ESP with an in-game GUI for toggles. // @author Loki // @match *://krunker.io/* // @exclude *://krunker.io/social* // @exclude *://krunker.io/editor* // @grant none // @run-at document-start // ==/UserScript== (() => { const config = { aimbot: { enabled: true, mode: 'snap' }, esp: { enabled: true }, }; let gameState = { scene: null, players: [], myPlayer: null }; /** Hook into game scene */ const hookScene = () => { const originalAdd = Object.prototype.add; Object.prototype.add = function (obj) { if (obj?.type === 'Scene' && obj.name === 'Main') { gameState.scene = obj; console.log('Scene hooked successfully!'); } return originalAdd?.call(this, obj); }; }; /** Find players and my player */ const findPlayers = () => { const { scene } = gameState; if (!scene) return { players: [], myPlayer: null }; const players = []; let myPlayer = null; scene.children.forEach((child) => { if (child.type !== 'Object3D') return; const camera = child.children[0]?.children[0]; if (camera?.type === 'PerspectiveCamera') { myPlayer = child; } else if (child.children[0]) { players.push(child); } }); return { players, myPlayer }; }; /** Aimbot logic */ const aimbotLogic = (targetPlayer, myPlayer) => { if (!config.aimbot.enabled || !targetPlayer || !myPlayer) return; const targetPos = targetPlayer.children[0]?.children[0]?.getWorldPosition(new THREE.Vector3()); const direction = targetPos?.sub(myPlayer.position).normalize(); if (config.aimbot.mode === 'snap') { myPlayer.lookAt(targetPos); } else { const factor = config.aimbot.mode === 'soft' ? 0.1 : 0.05; myPlayer.rotation.x = THREE.MathUtils.lerp(myPlayer.rotation.x, direction.x, factor); myPlayer.rotation.y = THREE.MathUtils.lerp(myPlayer.rotation.y, direction.y, factor); } }; /** ESP logic */ const renderESP = (players) => { if (!config.esp.enabled) return; const canvas = document.getElementById('espCanvas') || createCanvas(); const ctx = canvas.getContext('2d'); ctx.clearRect(0, 0, canvas.width, canvas.height); players.forEach((player) => { const screenPos = toScreenPosition(player.position, gameState.myPlayer.children[0]?.children[0]); if (!screenPos) return; ctx.beginPath(); ctx.moveTo(screenPos.x, screenPos.y); ctx.lineTo(window.innerWidth / 2, window.innerHeight); // Example: line to bottom center ctx.strokeStyle = 'red'; ctx.stroke(); }); }; const createCanvas = () => { const canvas = document.createElement('canvas'); canvas.id = 'espCanvas'; canvas.width = window.innerWidth; canvas.height = window.innerHeight; canvas.style.position = 'absolute'; canvas.style.top = '0'; canvas.style.left = '0'; canvas.style.pointerEvents = 'none'; document.body.appendChild(canvas); return canvas; }; const toScreenPosition = (position, camera) => { if (!camera) return null; const vector = position.clone().project(camera); return { x: (vector.x + 1) * window.innerWidth / 2, y: (-vector.y + 1) * window.innerHeight / 2, }; }; /** GUI creation */ const createGUI = () => { // Create hacks button const button = document.createElement('button'); button.innerHTML = 'Hacks'; button.style.position = 'absolute'; button.style.top = '10px'; button.style.left = '10px'; button.style.padding = '10px'; button.style.zIndex = '10000'; button.style.backgroundColor = '#333'; button.style.color = '#fff'; button.style.border = 'none'; button.style.borderRadius = '5px'; button.style.cursor = 'pointer'; button.onclick = toggleGUI; // Create GUI container const gui = document.createElement('div'); gui.id = 'hacksGUI'; gui.style.position = 'absolute'; gui.style.top = '50px'; gui.style.left = '10px'; gui.style.padding = '10px'; gui.style.backgroundColor = '#222'; gui.style.color = '#fff'; gui.style.border = '1px solid #444'; gui.style.borderRadius = '5px'; gui.style.display = 'none'; gui.style.zIndex = '10000'; // Add toggles const aimbotToggle = createToggle('Enable Aimbot', config.aimbot, 'enabled'); const espToggle = createToggle('Enable ESP', config.esp, 'enabled'); const modeToggle = createButton('Toggle Aimbot Mode', () => { const modes = ['snap', 'soft', 'assist']; const currentIndex = modes.indexOf(config.aimbot.mode); config.aimbot.mode = modes[(currentIndex + 1) % modes.length]; alert(`Aimbot mode: ${config.aimbot.mode}`); }); gui.appendChild(aimbotToggle); gui.appendChild(espToggle); gui.appendChild(modeToggle); document.body.appendChild(button); document.body.appendChild(gui); }; const createToggle = (label, obj, key) => { const container = document.createElement('div'); const checkbox = document.createElement('input'); checkbox.type = 'checkbox'; checkbox.checked = obj[key]; checkbox.onchange = () => { obj[key] = checkbox.checked; alert(`${label}: ${obj[key]}`); }; const labelElement = document.createElement('label'); labelElement.innerText = label; labelElement.style.marginLeft = '5px'; container.appendChild(checkbox); container.appendChild(labelElement); return container; }; const createButton = (label, onClick) => { const button = document.createElement('button'); button.innerHTML = label; button.style.marginTop = '5px'; button.style.display = 'block'; button.onclick = onClick; return button; }; const toggleGUI = () => { const gui = document.getElementById('hacksGUI'); gui.style.display = gui.style.display === 'none' ? 'block' : 'none'; }; /** Game loop */ const gameLoop = () => { requestAnimationFrame(gameLoop); const { players, myPlayer } = findPlayers(); gameState.players = players; gameState.myPlayer = myPlayer; if (!players.length || !myPlayer) return; let closestPlayer = null; let minDist = Infinity; players.forEach((player) => { const dist = player.position.distanceTo(myPlayer.position); if (dist < minDist) { minDist = dist; closestPlayer = player; } }); aimbotLogic(closestPlayer, myPlayer); renderESP(players); }; const initialize = () => { hookScene(); createGUI(); gameLoop(); }; initialize(); })();
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址