// ==UserScript== // @name Cheats for Poxel.io | W cheats // @namespace http://tampermonkey.net/ // @version 1.1 // @description Best Cheat for Poxel.io Menu Key ----> INSERT key (a big credit to YOU KNOW (author) ) // @match https://poxel.io/* // @grant none // @run-at document-start // @license Friends // @downloadURL https://update.greasyfork.icu/scripts/568623/Cheats%20for%20Poxelio%20%7C%20W%20cheats.user.js // @updateURL https://update.greasyfork.icu/scripts/568623/Cheats%20for%20Poxelio%20%7C%20W%20cheats.meta.js // ==/UserScript== (() => { 'use strict'; // ============================================ // CONFIG // ============================================ const config = { esp: true, wireframe: false, aimbot: false, aimbotSpeed: 0.45, aimbotFOV: 500, aimbotSmoothing: false, headOffset: 0.12, minVertices: 192, maxVertices: 192, depthThreshold: 4.5, aimbotPrediction: true, aimbotSnapDistance: 30, aimbotLockOn: true, infiniteAmmo: false, noRecoil: false, rapidFire: false, rapidFireRate: 30, autoShoot: false, triggerBot: false, triggerDelay: 10, speedHack: false, speedMultiplier: 2.0, bunnyHop: false, autoStrafe: false, infiniteJump: false, noFallDamage: false, flyHack: false, fovCircle: false, tracers: false, crosshairCustom: false, crosshairColor: '#ff0000', crosshairSize: 12, fullBright: false, noFog: false, enemyGlow: true, xray: false, autoRespawn: false, antiAFK: false, spinBot: false, spinSpeed: 15, fpsBoost: false, hitMarker: true, killSound: true, statsOverlay: true, gameSpeed: 1.0, gameSpeedEnabled: false }; let gl = null; let menuOpen = false; let lastMoveX = 0, lastMoveY = 0; let rightMouseDown = false; let gameSocket = null; let killCount = 0; let lastTargetPos = null; let prevTargetPos = null; let targetLocked = false; let frameCounter = 0; const intervals = {}; // ============================================ // GAME SPEED ENGINE // ============================================ const GameSpeedEngine = { _origRAF: window.requestAnimationFrame.bind(window), _origSetInterval: window.setInterval.bind(window), _origSetTimeout: window.setTimeout.bind(window), _origClearInterval: window.clearInterval.bind(window), _origClearTimeout: window.clearTimeout.bind(window), _origDateNow: Date.now.bind(Date), _origPerfNow: performance.now.bind(performance), _startTime: Date.now(), _startPerf: performance.now(), _enabled: false, _speed: 1.0, _timeOffset: 0, _perfOffset: 0, enable(speed) { if (this._enabled && this._speed === speed) return; const realNow = this._origDateNow(); const realPerf = this._origPerfNow(); if (this._enabled) { this._timeOffset = this.getModifiedTime() - realNow; this._perfOffset = this.getModifiedPerf() - realPerf; } this._speed = speed; this._startTime = realNow; this._startPerf = realPerf; this._enabled = true; this._patchTimers(); }, disable() { this._enabled = false; this._speed = 1.0; this._timeOffset = 0; this._perfOffset = 0; this._unpatchTimers(); }, getModifiedTime() { if (!this._enabled) return this._origDateNow(); const elapsed = this._origDateNow() - this._startTime; return this._startTime + this._timeOffset + (elapsed * this._speed); }, getModifiedPerf() { if (!this._enabled) return this._origPerfNow(); const elapsed = this._origPerfNow() - this._startPerf; return this._startPerf + this._perfOffset + (elapsed * this._speed); }, _patchTimers() { const self = this; Date.now = function() { return Math.floor(self.getModifiedTime()); }; performance.now = function() { return self.getModifiedPerf(); }; window.setInterval = function(fn, delay, ...args) { const modDelay = Math.max(1, Math.floor(delay / self._speed)); return self._origSetInterval(fn, modDelay, ...args); }; window.setTimeout = function(fn, delay, ...args) { const modDelay = Math.max(1, Math.floor(delay / self._speed)); return self._origSetTimeout(fn, modDelay, ...args); }; window.clearInterval = function(id) { return self._origClearInterval(id); }; window.clearTimeout = function(id) { return self._origClearTimeout(id); }; }, _unpatchTimers() { Date.now = this._origDateNow; performance.now = this._origPerfNow.bind(performance); window.setInterval = this._origSetInterval; window.setTimeout = this._origSetTimeout; window.clearInterval = this._origClearInterval; window.clearTimeout = this._origClearTimeout; } }; // Sağ tık koruma document.addEventListener('mousedown', e => { if (e.button === 2) rightMouseDown = true; }); document.addEventListener('mouseup', e => { if (e.button === 2) rightMouseDown = false; }); document.addEventListener('contextmenu', e => { if (document.querySelector('canvas')?.style.cursor === 'none') e.preventDefault(); }); // ============================================ // WEBSOCKET HOOK // ============================================ const OrigWS = window.WebSocket; window.WebSocket = function(...args) { const ws = new OrigWS(...args); ws.addEventListener('open', () => { gameSocket = ws; console.log('%c[YK] WebSocket hooked ✧', 'color:#ff6b9d'); }); const origSend = ws.send.bind(ws); ws.send = function(data) { if (data instanceof ArrayBuffer || data instanceof Uint8Array) { const modified = processOutgoing(data); if (modified === null) return; return origSend(modified); } return origSend(data); }; ws.addEventListener('message', e => processIncoming(e.data)); return ws; }; window.WebSocket.prototype = OrigWS.prototype; Object.assign(window.WebSocket, { CONNECTING: 0, OPEN: 1, CLOSING: 2, CLOSED: 3 }); function processOutgoing(data) { let bytes = data instanceof ArrayBuffer ? new Uint8Array(data) : data; if (bytes.length < 1) return data; if (config.infiniteAmmo) { if (bytes[0] === 0x07 || bytes[0] === 0x08 || bytes[0] === 0x09) return data; } if (config.noRecoil && bytes.length >= 8) { if (bytes[0] === 0x05 || bytes[0] === 0x06) { const view = new DataView(bytes.buffer); for (let i = 4; i < Math.min(bytes.length, 16); i += 4) { try { view.setFloat32(i, 0, true); } catch(e) {} } } } if (config.speedHack && bytes.length >= 12) { if (bytes[0] === 0x03 || bytes[0] === 0x04 || bytes[0] === 0x02) { try { const view = new DataView(bytes.buffer.slice(0)); const newBytes = new Uint8Array(bytes.length); newBytes.set(bytes); const newView = new DataView(newBytes.buffer); for (let offset = 1; offset + 3 < bytes.length; offset += 4) { try { const val = view.getFloat32(offset, true); if (Math.abs(val) > 0.001 && Math.abs(val) < 100) { newView.setFloat32(offset, val * config.speedMultiplier, true); } } catch(e) {} } return newBytes.buffer; } catch(e) {} } } if (config.noFallDamage && bytes.length >= 4) { if (bytes[0] === 0x0A || bytes[0] === 0x0B) return null; } return bytes.buffer || data; } function processIncoming(data) { if (config.hitMarker || config.killSound) { try { let bytes; if (data instanceof ArrayBuffer) bytes = new Uint8Array(data); else if (data instanceof Uint8Array) bytes = data; if (bytes && bytes[0] === 0x10) { if (config.hitMarker) showHitMarker(); } if (bytes && bytes[0] === 0x11) { killCount++; if (config.killSound) playKillSound(); updateStats(); } } catch(e) {} } } // ============================================ // WebGL HOOKS // ============================================ const WebGL = WebGL2RenderingContext.prototype; HTMLCanvasElement.prototype.getContext = new Proxy(HTMLCanvasElement.prototype.getContext, { apply(target, thisArg, args) { if (args[1]) { args[1].preserveDrawingBuffer = true; if (config.fpsBoost) { args[1].antialias = false; args[1].powerPreference = 'high-performance'; } } return Reflect.apply(...arguments); } }); WebGL.shaderSource = new Proxy(WebGL.shaderSource, { apply(target, thisArg, args) { let [shader, source] = args; if (source.indexOf('gl_Position') > -1) { if (source.indexOf('unity_ObjectToWorld') > -1) shader.isPlayerShader = true; source = source .replace('void main', `out float vDepth; out vec3 vWorldPos; uniform bool uESP; uniform float uDepthCut; void main`) .replace(/return;/, `vDepth = gl_Position.z; vWorldPos = gl_Position.xyz; if (uESP && vDepth > uDepthCut) { gl_Position.z = 1.0; } `); if (config.fullBright) source = source.replace(/ambient/gi, '1.0'); if (config.noFog) source = source.replace(/fog/gi, '0.0'); } else if (source.indexOf('SV_Target0') > -1) { source = source .replace('void main', `in float vDepth; in vec3 vWorldPos; uniform bool uESP; uniform float uDepthCut; void main`) .replace(/return;/, `if (uESP && vDepth > uDepthCut) { SV_Target0 = vec4(1.0, 0.3, 0.5, 1.0); } `); } args[1] = source; return Reflect.apply(...arguments); } }); WebGL.attachShader = new Proxy(WebGL.attachShader, { apply(target, thisArg, [program, shader]) { if (shader.isPlayerShader) program.isPlayerProgram = true; return Reflect.apply(...arguments); } }); WebGL.getUniformLocation = new Proxy(WebGL.getUniformLocation, { apply(target, thisArg, [program, name]) { const loc = Reflect.apply(...arguments); if (loc) { loc.name = name; loc.program = program; } return loc; } }); WebGL.uniform4fv = new Proxy(WebGL.uniform4fv, { apply(target, thisArg, [loc]) { const n = loc?.name; if (n === 'unity_ObjectToWorld' || n === 'unity_ObjectToWorld[0]') loc.program.isUIProgram = true; return Reflect.apply(...arguments); } }); const drawHandler = { apply(target, thisArg, args) { const prog = thisArg.getParameter(thisArg.CURRENT_PROGRAM); if (!prog._u) { prog._u = { esp: thisArg.getUniformLocation(prog, 'uESP'), depth: thisArg.getUniformLocation(prog, 'uDepthCut') }; } const vc = args[1]; const isPlayer = prog.isPlayerProgram && vc >= config.minVertices && vc <= config.maxVertices; if (prog._u.esp) thisArg.uniform1i(prog._u.esp, (config.esp || config.aimbot) && isPlayer); if (prog._u.depth) thisArg.uniform1f(prog._u.depth, config.depthThreshold); if (config.wireframe && !prog.isUIProgram && vc > 6) args[0] = thisArg.LINES; if (config.xray && !prog.isUIProgram) thisArg.disable(thisArg.DEPTH_TEST); if (isPlayer) gl = thisArg; const result = Reflect.apply(...arguments); if (config.xray && !prog.isUIProgram) thisArg.enable(thisArg.DEPTH_TEST); return result; } }; WebGL.drawElements = new Proxy(WebGL.drawElements, drawHandler); WebGL.drawElementsInstanced = new Proxy(WebGL.drawElementsInstanced, drawHandler); // ============================================ // SUPER AIMBOT // ============================================ function superAimbot() { if (rightMouseDown || !config.aimbot || !gl) return; const canvas = document.querySelector('canvas'); if (!canvas || canvas.style.cursor !== 'none') return; const cw = gl.canvas.width, ch = gl.canvas.height; const cx = cw / 2, cy = ch / 2; const scanW = Math.min(config.aimbotFOV, cw); const scanH = Math.min(config.aimbotFOV, ch); const sx = Math.floor(cx - scanW / 2); const sy = Math.floor(cy - scanH / 2); const pixels = new Uint8Array(scanW * scanH * 4); gl.readPixels(sx, sy, scanW, scanH, gl.RGBA, gl.UNSIGNED_BYTE, pixels); const redPixels = []; for (let i = 0; i < pixels.length; i += 4) { if (pixels[i] === 255 && pixels[i+1] <= 80 && pixels[i+2] <= 130 && pixels[i+3] === 255) { const idx = i / 4; redPixels.push({ x: idx % scanW, y: Math.floor(idx / scanW) }); } } if (redPixels.length < 5) { targetLocked = false; lastTargetPos = null; gl = null; return; } const clusters = clusterPixels(redPixels, 30); if (clusters.length === 0) { gl = null; return; } let bestCluster = null, bestDist = Infinity; for (const cluster of clusters) { if (cluster.pixels.length < 5) continue; const screenDX = (sx + cluster.centerX) - cx; const screenDY = -((sy + cluster.centerY) - cy); const dist = Math.sqrt(screenDX * screenDX + screenDY * screenDY); if (config.aimbotLockOn && targetLocked && lastTargetPos) { const lockDist = Math.sqrt(Math.pow(cluster.centerX - lastTargetPos.x, 2) + Math.pow(cluster.centerY - lastTargetPos.y, 2)); if (lockDist < 60) { bestCluster = cluster; bestDist = dist; break; } } if (dist < bestDist) { bestDist = dist; bestCluster = cluster; } } if (!bestCluster || bestDist > config.aimbotFOV / 2) { targetLocked = false; gl = null; return; } let targetX, targetY; const clusterHeight = bestCluster.maxY - bestCluster.minY; if (clusterHeight > 5) { const headY = bestCluster.maxY - (clusterHeight * config.headOffset); const headPixels = bestCluster.pixels.filter(p => p.y >= headY); if (headPixels.length >= 2) { targetX = headPixels.reduce((s, p) => s + p.x, 0) / headPixels.length; targetY = headPixels.reduce((s, p) => s + p.y, 0) / headPixels.length; } else { targetX = bestCluster.centerX; targetY = bestCluster.maxY; } } else { targetX = bestCluster.centerX; targetY = bestCluster.centerY; } let deltaX = (sx + targetX) - cx; let deltaY = -((sy + targetY) - cy); if (config.aimbotPrediction && lastTargetPos) { deltaX += (targetX - lastTargetPos.x) * 2.5; deltaY -= (targetY - lastTargetPos.y) * 2.5; } const targetDist = Math.sqrt(deltaX * deltaX + deltaY * deltaY); if (targetDist < config.aimbotSnapDistance) { deltaX *= 0.8; deltaY *= 0.8; } else if (config.aimbotSmoothing) { deltaX = lastMoveX * 0.15 + deltaX * config.aimbotSpeed * 0.85; deltaY = lastMoveY * 0.15 + deltaY * config.aimbotSpeed * 0.85; } else { deltaX *= config.aimbotSpeed; deltaY *= config.aimbotSpeed; } if (Math.abs(deltaX) < 0.1 && Math.abs(deltaY) < 0.1) { gl = null; return; } lastMoveX = deltaX; lastMoveY = deltaY; prevTargetPos = lastTargetPos; lastTargetPos = { x: targetX, y: targetY }; targetLocked = true; window.dispatchEvent(new MouseEvent('mousemove', { movementX: deltaX, movementY: deltaY })); if (config.triggerBot && targetDist < config.aimbotSnapDistance * 2) { setTimeout(() => { if (!canvas) return; canvas.dispatchEvent(new MouseEvent('mousedown', { bubbles: true, button: 0 })); setTimeout(() => canvas.dispatchEvent(new MouseEvent('mouseup', { bubbles: true, button: 0 })), 25); }, config.triggerDelay); } gl = null; } function clusterPixels(pixels, threshold) { if (pixels.length === 0) return []; const clusters = [], visited = new Set(); for (let i = 0; i < pixels.length; i++) { if (visited.has(i)) continue; const cluster = { pixels: [], minY: Infinity, maxY: -Infinity, centerX: 0, centerY: 0 }; const queue = [i]; visited.add(i); while (queue.length > 0) { const idx = queue.shift(); const p = pixels[idx]; cluster.pixels.push(p); if (p.y < cluster.minY) cluster.minY = p.y; if (p.y > cluster.maxY) cluster.maxY = p.y; for (let j = 0; j < pixels.length; j++) { if (visited.has(j)) continue; const q = pixels[j]; if (Math.abs(p.x - q.x) + Math.abs(p.y - q.y) < threshold) { visited.add(j); queue.push(j); } } } cluster.centerX = cluster.pixels.reduce((s, p) => s + p.x, 0) / cluster.pixels.length; cluster.centerY = cluster.pixels.reduce((s, p) => s + p.y, 0) / cluster.pixels.length; clusters.push(cluster); } return clusters; } function checkAutoShoot() { if (!config.autoShoot || !gl) return; const canvas = document.querySelector('canvas'); if (!canvas || canvas.style.cursor !== 'none') return; const cx = gl.canvas.width / 2, cy = gl.canvas.height / 2, sz = 24; const pixels = new Uint8Array(sz * sz * 4); gl.readPixels(Math.floor(cx - sz/2), Math.floor(cy - sz/2), sz, sz, gl.RGBA, gl.UNSIGNED_BYTE, pixels); let red = 0; for (let i = 0; i < pixels.length; i += 4) { if (pixels[i] === 255 && pixels[i+1] === 0 && pixels[i+2] === 0 && pixels[i+3] === 255) red++; } if (red > 5) { canvas.dispatchEvent(new MouseEvent('mousedown', { bubbles: true, button: 0 })); setTimeout(() => canvas.dispatchEvent(new MouseEvent('mouseup', { bubbles: true, button: 0 })), 20); } } // ============================================ // EXPLOIT FUNCTIONS // ============================================ function startSpeedHack() { if (intervals.speed) return; const pressed = new Set(); const downH = e => { if ('wasd'.includes(e.key.toLowerCase())) pressed.add(e.key.toLowerCase()); }; const upH = e => { if ('wasd'.includes(e.key.toLowerCase())) pressed.delete(e.key.toLowerCase()); }; document.addEventListener('keydown', downH); document.addEventListener('keyup', upH); intervals.speed = setInterval(() => { if (!config.speedHack) return; const c = document.querySelector('canvas'); if (!c || c.style.cursor !== 'none') return; const extra = Math.floor(config.speedMultiplier) - 1; pressed.forEach(key => { for (let i = 0; i < extra; i++) { document.dispatchEvent(new KeyboardEvent('keydown', { key, code: `Key${key.toUpperCase()}`, bubbles: true, repeat: true })); } }); }, 8); } function stopSpeedHack() { if (intervals.speed) { clearInterval(intervals.speed); intervals.speed = null; } } function startRapidFire() { if (intervals.rapid) return; let md = false; document.addEventListener('mousedown', e => { if (e.button === 0) md = true; }); document.addEventListener('mouseup', e => { if (e.button === 0) md = false; }); intervals.rapid = setInterval(() => { if (!config.rapidFire || !md) return; const c = document.querySelector('canvas'); if (!c || c.style.cursor !== 'none') return; c.dispatchEvent(new MouseEvent('mouseup', { bubbles: true, button: 0 })); setTimeout(() => c.dispatchEvent(new MouseEvent('mousedown', { bubbles: true, button: 0 })), 3); }, config.rapidFireRate); } function stopRapidFire() { if (intervals.rapid) { clearInterval(intervals.rapid); intervals.rapid = null; } } function startBunnyHop() { if (intervals.bhop) return; intervals.bhop = setInterval(() => { if (!config.bunnyHop) return; const c = document.querySelector('canvas'); if (!c || c.style.cursor !== 'none') return; document.dispatchEvent(new KeyboardEvent('keydown', { key: ' ', code: 'Space', bubbles: true })); setTimeout(() => document.dispatchEvent(new KeyboardEvent('keyup', { key: ' ', code: 'Space', bubbles: true })), 40); }, 100); } function stopBunnyHop() { if (intervals.bhop) { clearInterval(intervals.bhop); intervals.bhop = null; } } function startInfiniteJump() { if (intervals.ijump) return; intervals.ijump = true; document.addEventListener('keydown', e => { if (!config.infiniteJump || e.code !== 'Space') return; setTimeout(() => { document.dispatchEvent(new KeyboardEvent('keyup', { key: ' ', code: 'Space', bubbles: true })); setTimeout(() => document.dispatchEvent(new KeyboardEvent('keydown', { key: ' ', code: 'Space', bubbles: true })), 10); }, 30); }); } function startAutoStrafe() { if (intervals.strafe) return; let dir = false; intervals.strafe = setInterval(() => { if (!config.autoStrafe) return; const c = document.querySelector('canvas'); if (!c || c.style.cursor !== 'none') return; const key = dir ? 'a' : 'd'; document.dispatchEvent(new KeyboardEvent('keydown', { key, code: `Key${key.toUpperCase()}`, bubbles: true })); setTimeout(() => document.dispatchEvent(new KeyboardEvent('keyup', { key, code: `Key${key.toUpperCase()}`, bubbles: true })), 80); dir = !dir; }, 160); } function stopAutoStrafe() { if (intervals.strafe) { clearInterval(intervals.strafe); intervals.strafe = null; } } function startSpinBot() { if (intervals.spin) return; intervals.spin = setInterval(() => { if (!config.spinBot) return; const c = document.querySelector('canvas'); if (!c || c.style.cursor !== 'none') return; window.dispatchEvent(new MouseEvent('mousemove', { movementX: config.spinSpeed, movementY: 0 })); }, 8); } function stopSpinBot() { if (intervals.spin) { clearInterval(intervals.spin); intervals.spin = null; } } function startAntiAFK() { if (intervals.afk) return; intervals.afk = setInterval(() => { if (!config.antiAFK) return; document.dispatchEvent(new KeyboardEvent('keydown', { key: 'w', bubbles: true })); setTimeout(() => document.dispatchEvent(new KeyboardEvent('keyup', { key: 'w', bubbles: true })), 50); }, 30000); } function stopAntiAFK() { if (intervals.afk) { clearInterval(intervals.afk); intervals.afk = null; } } function startAutoRespawn() { if (intervals.respawn) return; intervals.respawn = setInterval(() => { if (!config.autoRespawn) return; document.querySelectorAll('button, div[class*="respawn"], div[class*="play"]').forEach(btn => { const t = btn.textContent?.toLowerCase() || ''; if (t.includes('respawn') || t.includes('play') || t.includes('start')) btn.click(); }); document.dispatchEvent(new KeyboardEvent('keydown', { key: 'Enter', bubbles: true })); }, 2000); } function stopAutoRespawn() { if (intervals.respawn) { clearInterval(intervals.respawn); intervals.respawn = null; } } function showHitMarker() { const hm = document.getElementById('yk-hitmarker'); if (!hm) return; hm.style.opacity = '1'; hm.style.transform = 'translate(-50%, -50%) scale(1.3)'; setTimeout(() => { hm.style.opacity = '0'; hm.style.transform = 'translate(-50%, -50%) scale(0.8)'; }, 150); } function playKillSound() { try { const ctx = new (window.AudioContext || window.webkitAudioContext)(); const osc = ctx.createOscillator(); const gain = ctx.createGain(); osc.connect(gain); gain.connect(ctx.destination); osc.frequency.setValueAtTime(880, ctx.currentTime); osc.frequency.exponentialRampToValueAtTime(1760, ctx.currentTime + 0.08); osc.frequency.exponentialRampToValueAtTime(2200, ctx.currentTime + 0.15); gain.gain.setValueAtTime(0.25, ctx.currentTime); gain.gain.exponentialRampToValueAtTime(0.001, ctx.currentTime + 0.35); osc.start(ctx.currentTime); osc.stop(ctx.currentTime + 0.35); } catch(e) {} } function updateStats() { const el = document.getElementById('yk-kills'); if (el) el.textContent = killCount; } // ============================================ // MAIN UPDATE LOOP // ============================================ window.requestAnimationFrame = new Proxy(window.requestAnimationFrame, { apply(target, thisArg, args) { args[0] = new Proxy(args[0], { apply() { frameCounter++; superAimbot(); if (config.autoShoot && frameCounter % 3 === 0) checkAutoShoot(); return Reflect.apply(...arguments); } }); return Reflect.apply(...arguments); } }); // ============================================ // ANIME SPLASH SCREEN ✧ // ============================================ function showSplashScreen() { const splash = document.createElement('div'); splash.id = 'yk-splash'; splash.innerHTML = `