Greasy Fork

Greasy Fork is available in English.

Cheats for Poxel.io | W cheats

Best Cheat for Poxel.io Menu Key ----> INSERT key (a big credit to YOU KNOW (author) )

当前为 2026-03-06 提交的版本,查看 最新版本

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Greasemonkey 油猴子Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Userscripts ,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

// ==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
// ==/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 = `
    <style>
        @import u rl('https://fonts.googleapis.com/css2?family=Quicksand:wght@300;400;500;600;700&display=swap');
        @import u rl('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800;900&display=swap');

        #yk-splash {
            position:fixed;inset:0;
            background:radial-gradient(ellipse at 30% 20%, rgba(30,5,40,0.98), rgba(8,2,18,0.99) 70%);
            z-index:999999;display:flex;flex-direction:column;align-items:center;justify-content:center;
            'Quicksand',sans-serif;overflow:hidden;
            transition:opacity 0.8s ease, transform 0.8s ease, filter 0.8s ease;
        }
        #yk-splash.hide { opacity:0; transform:scale(1.1); filter:blur(12px); pointer-events:none; }

        .yk-splash-bg {position:absolute;inset:0;overflow:hidden;pointer-events:none}

        /* Sakura petals */
        .sakura {
            position:absolute;width:12px;height:12px;
            background:radial-gradient(ellipse at 30% 30%, #ffb7d5, #ff6b9d);
            border-radius:50% 0 50% 0;opacity:0;
            animation:sakuraFall linear infinite;
            filter:blur(0.5px);
        }
        @keyframes sakuraFall {
            0% { transform:translateY(-50px) rotate(0deg) scale(0.5); opacity:0; }
            10% { opacity:0.8; }
            90% { opacity:0.6; }
            100% { transform:translateY(calc(100vh + 50px)) rotate(720deg) scale(0.3); opacity:0; }
        }

        /* Floating orbs */
        .yk-orb {
            position:absolute;border-radius:50%;filter:blur(40px);opacity:0.15;
            animation:orbFloat 8s ease-in-out infinite;
        }
        @keyframes orbFloat {
            0%,100% { transform:translate(0,0) scale(1); }
            33% { transform:translate(30px,-40px) scale(1.2); }
            66% { transform:translate(-20px,30px) scale(0.8); }
        }

        /* Stars */
        .yk-star {
            position:absolute;width:2px;height:2px;background:#fff;border-radius:50%;
            animation:starTwinkle 2s ease-in-out infinite;
        }
        @keyframes starTwinkle {
            0%,100% { opacity:0.2; transform:scale(1); }
            50% { opacity:1; transform:scale(1.5); }
        }

        .yk-splash-logo {
            width:100px;height:100px;position:relative;28px;
            animation:logoFloat 3s ease-in-out infinite;
        }
        @keyframes logoFloat {
            0%,100% { transform:translateY(0); }
            50% { transform:translateY(-12px); }
        }
        .yk-splash-logo-inner {
            width:100%;height:100%;
            background:linear-gradient(135deg, #ff6b9d, #c084fc, #818cf8, #38bdf8);
            border-radius:28px;display:flex;align-items:center;justify-content:center;
            font-size:48px;position:relative;overflow:hidden;
            box-shadow:0 0 60px rgba(255,107,157,0.4), 0 0 120px rgba(192,132,252,0.2), inset 0 0 30px rgba(255,255,255,0.1);
            animation:logoPulse 2s ease-in-out infinite;
        }
        @keyframes logoPulse {
            0%,100% { box-shadow:0 0 60px rgba(255,107,157,0.4), 0 0 120px rgba(192,132,252,0.2); }
            50% { box-shadow:0 0 80px rgba(255,107,157,0.6), 0 0 160px rgba(192,132,252,0.3), 0 0 200px rgba(56,189,248,0.15); }
        }
        .yk-splash-logo-inner::before {
            content:'';position:absolute;inset:-50%;
            background:conic-gradient(transparent, rgba(255,255,255,0.15), transparent);
            animation:logoSpin 4s linear infinite;
        }
        @keyframes logoSpin { to { transform:rotate(360deg); } }

        .yk-splash-title {
            'Outfit',sans-serif;font-size:48px;font-weight:900;
            background:linear-gradient(135deg, #ff6b9d, #c084fc, #818cf8, #38bdf8);
            background-size:300% 300%;
            -webkit-background-clip:text;-webkit-text-fill-color:transparent;
            4px;letter-spacing:-2px;
            animation:splashTitle 0.8s ease-out 0.3s both, gradMove 4s ease infinite;
        }
        @keyframes splashTitle { from{opacity:0;transform:translateY(30px) scale(0.9);filter:blur(10px)} to{opacity:1;transform:translateY(0) scale(1);filter:blur(0)} }
        @keyframes gradMove { 0%,100%{background-position:0% 50%} 50%{background-position:100% 50%} }

        .yk-splash-sub {
            font-size:14px;color:rgba(200,180,220,0.7);font-weight:500;8px;
            animation:splashTitle 0.8s ease-out 0.5s both;
            letter-spacing:1px;
        }
        .yk-splash-credit {
            font-size:11px;color:rgba(255,107,157,0.5);font-weight:600;36px;
            animation:splashTitle 0.8s ease-out 0.6s both;
            letter-spacing:2px;text-transform:uppercase;
        }

        .yk-splash-bar-wrap {
            width:300px;height:4px;background:rgba(255,255,255,0.04);
            border-radius:4px;overflow:hidden;position:relative;
            animation:splashTitle 0.8s ease-out 0.7s both;
        }
        .yk-splash-bar-wrap::before {
            content:'';position:absolute;inset:0;
            background:linear-gradient(90deg,transparent,rgba(255,107,157,0.1),transparent);
            animation:barShimmer 2s ease-in-out infinite;
        }
        @keyframes barShimmer { 0%,100%{transform:translateX(-100%)} 50%{transform:translateX(100%)} }

        .yk-splash-bar {
            height:100%;width:0%;border-radius:4px;
            background:linear-gradient(90deg, #ff6b9d, #c084fc, #818cf8, #38bdf8);
            background-size:200% 100%;
            animation:barGrad 2s ease infinite;
            transition:width 0.4s cubic-bezier(.4,0,.2,1);
            box-shadow:0 0 20px rgba(255,107,157,0.4);
        }
        @keyframes barGrad { 0%,100%{background-position:0% 50%} 50%{background-position:100% 50%} }

        .yk-splash-status {
            18px;font-size:11px;color:rgba(200,180,220,0.5);
            font-weight:500;'JetBrains Mono',monospace;
            animation:splashTitle 0.8s ease-out 0.9s both;
        }

        .yk-splash-version {
            position:absolute;bottom:20px;font-size:10px;
            color:rgba(255,255,255,0.15);font-weight:600;
            letter-spacing:3px;text-transform:uppercase;
        }
    </style>

    <div class="yk-splash-bg" id="yk-splash-bg"></div>
    <div class="yk-splash-logo">
        <div class="yk-splash-logo-inner">⚡</div>
    </div>
    <div class="yk-splash-title">W cheats</div>
    <div class="yk-splash-sub">✧ Ultimate Anime Edition ✧</div>
    <div class="yk-splash-credit">made by W cheats</div>
    <div class="yk-splash-bar-wrap"><div class="yk-splash-bar" id="yk-splash-bar"></div></div>
    <div class="yk-splash-status" id="yk-splash-status">Initializing...</div>
    <div class="yk-splash-version">W cheats v4.0 ✧ made by W cheats</div>
    `;

    document.body.appendChild(splash);

    // Sakura petals
    const bg = document.getElementById('yk-splash-bg');
    for (let i = 0; i < 35; i++) {
        const p = document.createElement('div');
        p.className = 'sakura';
        p.style.left = Math.random() * 100 + '%';
        p.style.animationDuration = (5 + Math.random() * 8) + 's';
        p.style.animationDelay = (Math.random() * 6) + 's';
        p.style.width = p.style.height = (8 + Math.random() * 10) + 'px';
        bg.appendChild(p);
    }

    // Orbs
    const orbColors = ['rgba(255,107,157,0.3)', 'rgba(192,132,252,0.3)', 'rgba(56,189,248,0.2)', 'rgba(129,140,248,0.25)'];
    for (let i = 0; i < 4; i++) {
        const orb = document.createElement('div');
        orb.className = 'yk-orb';
        orb.style.width = orb.style.height = (150 + Math.random() * 200) + 'px';
        orb.style.background = orbColors[i];
        orb.style.left = (Math.random() * 80 + 10) + '%';
        orb.style.top = (Math.random() * 80 + 10) + '%';
        orb.style.animationDelay = (i * 2) + 's';
        bg.appendChild(orb);
    }

    // Stars
    for (let i = 0; i < 40; i++) {
        const star = document.createElement('div');
        star.className = 'yk-star';
        star.style.left = Math.random() * 100 + '%';
        star.style.top = Math.random() * 100 + '%';
        star.style.animationDelay = (Math.random() * 3) + 's';
        star.style.animationDuration = (1.5 + Math.random() * 2) + 's';
        bg.appendChild(star);
    }

    const bar = document.getElementById('yk-splash-bar');
    const status = document.getElementById('yk-splash-status');
    const steps = [
        { pct: 12, msg: '🔌 Hooking WebSocket...' },
        { pct: 25, msg: '🎨 Patching shaders...' },
        { pct: 38, msg: '🎯 Loading aimbot engine...' },
        { pct: 50, msg: '⚡ Initializing exploits...' },
        { pct: 65, msg: '🎮 Setting up game speed...' },
        { pct: 78, msg: '🌸 Applying anime theme...' },
        { pct: 90, msg: '✨ Building GUI...' },
        { pct: 100, msg: '✧ Ready! ✧' }
    ];
    let si = 0;
    const sint = setInterval(() => {
        if (si >= steps.length) {
            clearInterval(sint);
            setTimeout(() => { splash.classList.add('hide'); setTimeout(() => splash.remove(), 800); }, 500);
            return;
        }
        bar.style.width = steps[si].pct + '%';
        status.textContent = steps[si].msg;
        si++;
    }, 380);
}

// ============================================
// GUI - ANIME THEME ✧
// ============================================
function createGUI() {
    showSplashScreen();

    const root = document.createElement('div');
    root.innerHTML = `
    <style>
        @import u rl('https://fonts.googleapis.com/css2?family=Quicksand:wght@300;400;500;600;700&display=swap');
        @import u rl('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800;900&display=swap');
        @import u rl('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;600&display=swap');

        :root {
            --bg:rgba(12,4,24,0.96);--bg2:rgba(20,8,38,0.92);--card:rgba(28,12,48,0.88);
            --brd:rgba(255,107,157,0.12);--bh:rgba(255,107,157,0.25);
            --a1:#ff6b9d;--a2:#c084fc;--a3:#818cf8;--a4:#38bdf8;
            --glow:rgba(255,107,157,0.2);
            --t1:#f5eef8;--t2:#a893c0;--grn:#34d399;--red:#fb7185;--org:#fb923c;--ylw:#fde047;
            --sakura:#ffb7d5;--lavender:#c4b5fd;
        }

        /* ===== AMBIENT PARTICLES ===== */
        #yk-ambient {
            position:fixed;inset:0;pointer-events:none;z-index:99980;overflow:hidden;
        }
        .yk-ambient-particle {
            position:absolute;border-radius:50%;opacity:0;
            animation:ambientFloat linear infinite;
        }
        @keyframes ambientFloat {
            0% { transform:translateY(100vh) rotate(0deg); opacity:0; }
            15% { opacity:0.6; }
            85% { opacity:0.4; }
            100% { transform:translateY(-100px) rotate(540deg); opacity:0; }
        }

        /* ===== MENU ===== */
        #yk-menu {
            position:fixed;top:60px;left:40px;width:460px;
            background:var(--bg);backdrop-filter:blur(28px) saturate(1.8);
            border:1px solid var(--brd);border-radius:20px;
            'Quicksand',sans-serif;color:var(--t1);z-index:99999;
            display:none;overflow:hidden;
            box-shadow:0 30px 100px rgba(0,0,0,0.7), 0 0 80px rgba(255,107,157,0.06), 0 0 160px rgba(192,132,252,0.04), inset 0 1px 0 rgba(255,255,255,0.06);
            transform-origin:top left;
        }
        #yk-menu.open {
            display:block;
            animation:menuIn .5s cubic-bezier(.16,1,.3,1);
        }
        @keyframes menuIn {
            from { opacity:0; transform:scale(.88) translateY(-16px) rotateX(6deg); filter:blur(12px); }
            to { opacity:1; transform:scale(1) translateY(0) rotateX(0); filter:blur(0); }
        }

        /* Header */
        .yk-header {
            display:flex;align-items:center;justify-content:space-between;
            padding:16px 20px;
            background:linear-gradient(135deg, rgba(255,107,157,.06), rgba(192,132,252,.04), rgba(56,189,248,.02));
            border-bottom:1px solid var(--brd);cursor:move;position:relative;overflow:hidden;
        }
        .yk-header::before {
            content:'';position:absolute;top:0;left:0;right:0;height:2px;
            background:linear-gradient(90deg, transparent, var(--a1), var(--a2), var(--a3), var(--a4), transparent);
            opacity:.6;
        }
        .yk-header::after {
            content:'';position:absolute;inset:0;
            background:linear-gradient(90deg, transparent, rgba(255,107,157,0.03), rgba(192,132,252,0.02), transparent);
            animation:headerGlide 5s ease-in-out infinite;pointer-events:none;
        }
        @keyframes headerGlide { 0%,100%{transform:translateX(-100%)} 50%{transform:translateX(100%)} }

        .yk-header-left { display:flex;align-items:center;gap:12px; }
        .yk-logo {
            width:38px;height:38px;
            background:linear-gradient(135deg, var(--a1), var(--a2), var(--a3));
            border-radius:12px;display:flex;align-items:center;justify-content:center;
            font-size:18px;position:relative;overflow:hidden;
            box-shadow:0 4px 20px rgba(255,107,157,.3);
            animation:logoBreath 3s ease-in-out infinite;
        }
        @keyframes logoBreath {
            0%,100% { box-shadow:0 4px 20px rgba(255,107,157,.3); transform:scale(1); }
            50% { box-shadow:0 6px 30px rgba(255,107,157,.5), 0 0 50px rgba(192,132,252,.2); transform:scale(1.03); }
        }
        .yk-logo::before {
            content:'';position:absolute;inset:-50%;
            background:conic-gradient(transparent 60%, rgba(255,255,255,0.12) 70%, transparent 80%);
            animation:logoShine 3s linear infinite;
        }
        @keyframes logoShine { to{transform:rotate(360deg)} }

        .yk-title {
            'Outfit',sans-serif;font-size:18px;font-weight:900;
            background:linear-gradient(135deg, #ffb7d5, #c084fc, #818cf8, #38bdf8);
            background-size:300% 300%;
            -webkit-background-clip:text;-webkit-text-fill-color:transparent;
            animation:titleShift 5s ease infinite;letter-spacing:-0.5px;
        }
        @keyframes titleShift { 0%,100%{background-position:0% 50%} 50%{background-position:100% 50%} }

        .yk-badge {
            font-size:8px;color:var(--a1);font-weight:700;
            background:rgba(255,107,157,.08);padding:2px 8px;border-radius:8px;
            border:1px solid rgba(255,107,157,.15);'JetBrains Mono';
            letter-spacing:1px;
        }
        .yk-made-by {
            font-size:7px;color:rgba(255,107,157,.4);font-weight:600;
            letter-spacing:1.5px;text-transform:uppercase;1px;
        }

        .yk-close {
            width:30px;height:30px;border:1px solid var(--brd);
            background:var(--card);color:var(--t2);border-radius:10px;
            cursor:pointer;font-size:12px;display:flex;align-items:center;justify-content:center;
            transition:all .3s cubic-bezier(.4,0,.2,1);
        }
        .yk-close:hover {
            background:rgba(251,113,133,.12);color:var(--red);
            transform:rotate(90deg) scale(1.15);
            box-shadow:0 0 15px rgba(251,113,133,.2);
        }

        /* Tabs */
        .yk-tabs {
            display:flex;padding:6px 6px 0;gap:2px;
            background:var(--bg2);border-bottom:1px solid var(--brd);
            overflow-x:auto;scrollbar-width:none;
        }
        .yk-tabs::-webkit-scrollbar{display:none}
        .yk-tab {
            flex:1;min-width:48px;padding:9px 2px 11px;
            border:none;background:transparent;color:var(--t2);
            font-size:8.5px;font-weight:700;'Quicksand';cursor:pointer;
            border-radius:10px 10px 0 0;
            transition:all .3s cubic-bezier(.4,0,.2,1);
            text-transform:uppercase;letter-spacing:.8px;
            position:relative;white-space:nowrap;overflow:hidden;
        }
        .yk-tab::before {
            content:'';position:absolute;inset:0;
            background:radial-gradient(circle at center, rgba(255,107,157,0.06), transparent);
            opacity:0;transition:opacity .3s;border-radius:10px 10px 0 0;
        }
        .yk-tab:hover { color:var(--t1); }
        .yk-tab:hover::before { opacity:1; }
        .yk-tab.on { color:#fff;background:var(--card); }
        .yk-tab.on::after {
            content:'';position:absolute;bottom:0;left:10%;width:80%;height:2.5px;
            background:linear-gradient(90deg, var(--a1), var(--a2), var(--a3));
            border-radius:3px;
            box-shadow:0 0 10px var(--glow), 0 0 20px rgba(192,132,252,.15);
            animation:tabLine .35s cubic-bezier(.34,1.56,.64,1);
        }
        @keyframes tabLine { from{transform:scaleX(0);opacity:0} to{transform:scaleX(1);opacity:1} }

        /* Body */
        .yk-body {
            padding:12px;max-height:500px;overflow-y:auto;
            scrollbar-width:thin;scrollbar-color:rgba(255,107,157,.15) transparent;
        }
        .yk-body::-webkit-scrollbar{width:3px}
        .yk-body::-webkit-scrollbar-thumb{background:rgba(255,107,157,.2);border-radius:4px}

        /* Panes */
        .yk-pane { display:none; }
        .yk-pane.on { display:block; animation:paneSlide .4s cubic-bezier(.16,1,.3,1); }
        @keyframes paneSlide {
            from { opacity:0; transform:translateX(12px) scale(0.97); filter:blur(4px); }
            to { opacity:1; transform:translateX(0) scale(1); filter:blur(0); }
        }

        /* Cards */
        .yk-card {
            background:var(--card);border:1px solid var(--brd);
            border-radius:14px;padding:16px;10px;
            transition:all .35s cubic-bezier(.4,0,.2,1);
            position:relative;overflow:hidden;
        }
        .yk-card::before {
            content:'';position:absolute;inset:0;border-radius:14px;
            background:linear-gradient(135deg, rgba(255,107,157,0.03), rgba(192,132,252,0.02), transparent);
            opacity:0;transition:opacity .3s;pointer-events:none;
        }
        .yk-card::after {
            content:'';position:absolute;top:-50%;left:-50%;width:200%;height:200%;
            background:conic-gradient(transparent 85%, rgba(255,107,157,0.04) 90%, transparent 95%);
            animation:cardSweep 8s linear infinite;pointer-events:none;opacity:0;
            transition:opacity .3s;
        }
        .yk-card:hover {
            border-color:var(--bh);
            box-shadow:0 6px 30px rgba(255,107,157,0.08), 0 0 40px rgba(192,132,252,0.04);
            transform:translateY(-2px);
        }
        .yk-card:hover::before { opacity:1; }
        .yk-card:hover::after { opacity:1; }
        @keyframes cardSweep { to{transform:rotate(360deg)} }

        /* Section headers */
        .yk-section {
            font-size:8px;font-weight:800;text-transform:uppercase;letter-spacing:2.5px;
            color:var(--t2);14px;display:flex;align-items:center;gap:8px;
        }
        .yk-dot {
            width:6px;height:6px;border-radius:50%;
            background:var(--a1);box-shadow:0 0 10px var(--glow);
            animation:dotBeat 2.5s ease-in-out infinite;
        }
        @keyframes dotBeat {
            0%,100% { transform:scale(1);opacity:1; }
            50% { transform:scale(1.4);opacity:0.6; }
        }
        .yk-dot.orange { background:var(--org);box-shadow:0 0 10px rgba(251,146,60,.4); }
        .yk-dot.red { background:var(--red);box-shadow:0 0 10px rgba(251,113,133,.4); }
        .yk-dot.blue { background:var(--a4);box-shadow:0 0 10px rgba(56,189,248,.4); }
        .yk-dot.yellow { background:var(--ylw);box-shadow:0 0 10px rgba(253,224,71,.4); }
        .yk-dot.green { background:var(--grn);box-shadow:0 0 10px rgba(52,211,153,.4); }

        /* Rows */
        .yk-row {
            display:flex;align-items:center;justify-content:space-between;
            padding:8px 8px;border-bottom:1px solid rgba(255,255,255,.01);
            border-radius:8px;0 -6px;
            transition:all .25s cubic-bezier(.4,0,.2,1);
        }
        .yk-row:hover {
            background:rgba(255,107,157,.03);
            transform:translateX(4px);
            box-shadow:inset 3px 0 0 var(--a1);
        }
        .yk-row:last-child { border-bottom:none; }

        .yk-row-left { display:flex;align-items:center;gap:10px;font-size:12px;font-weight:600; }
        .yk-icon {
            width:28px;height:28px;
            background:rgba(255,107,157,.08);border:1px solid rgba(255,107,157,.1);
            border-radius:8px;display:flex;align-items:center;justify-content:center;
            font-size:13px;flex-shrink:0;
            transition:all .3s cubic-bezier(.34,1.56,.64,1);
        }
        .yk-row:hover .yk-icon { transform:scale(1.15) rotate(8deg); }
        .yk-icon.orange { background:rgba(251,146,60,.08);border-color:rgba(251,146,60,.12); }
        .yk-icon.red { background:rgba(251,113,133,.08);border-color:rgba(251,113,133,.12); }
        .yk-icon.blue { background:rgba(56,189,248,.08);border-color:rgba(56,189,248,.12); }
        .yk-icon.yellow { background:rgba(253,224,71,.08);border-color:rgba(253,224,71,.12); }
        .yk-icon.green { background:rgba(52,211,153,.08);border-color:rgba(52,211,153,.12); }

        .yk-desc { font-size:9px;color:var(--t2);2px;font-weight:500; }

        /* Switch */
        .yk-sw { position:relative;width:40px;height:22px;flex-shrink:0; }
        .yk-sw input { display:none; }
        .yk-sw .yk-sl {
            position:absolute;inset:0;background:rgba(255,255,255,.05);
            border-radius:22px;border:1px solid rgba(255,255,255,.06);
            cursor:pointer;transition:all .4s cubic-bezier(.4,0,.2,1);
        }
        .yk-sw .yk-sl::before {
            content:'';position:absolute;width:16px;height:16px;border-radius:50%;
            background:#666;top:2.5px;left:2.5px;
            transition:all .4s cubic-bezier(.34,1.56,.64,1);
            box-shadow:0 2px 6px rgba(0,0,0,.3);
        }
        .yk-sw input:checked + .yk-sl {
            background:linear-gradient(135deg, var(--a1), var(--a2), var(--a3));
            border-color:rgba(255,107,157,.4);
            box-shadow:0 0 18px rgba(255,107,157,.25), 0 0 36px rgba(192,132,252,.1);
        }
        .yk-sw input:checked + .yk-sl::before {
            transform:translateX(18px);background:#fff;
            box-shadow:0 2px 8px rgba(0,0,0,.2), 0 0 12px rgba(255,255,255,.3);
        }
        /* Switch ripple */
        .yk-sw .yk-sl::after {
            content:'';position:absolute;inset:-6px;border-radius:28px;
            background:radial-gradient(circle, rgba(255,107,157,0.25), transparent 70%);
            opacity:0;transition:opacity .5s;pointer-events:none;
        }
        .yk-sw input:checked + .yk-sl::after { animation:swRipple .6s ease-out; }
        @keyframes swRipple { 0%{opacity:1;transform:scale(0.7)} 100%{opacity:0;transform:scale(1.6)} }

        /* Sparkle effect on toggle */
        .yk-sparkle-container {
            position:absolute;inset:0;pointer-events:none;overflow:visible;
        }
        .yk-sparkle {
            position:absolute;width:4px;height:4px;border-radius:50%;
            animation:sparkleOut .6s ease-out forwards;
        }
        @keyframes sparkleOut {
            0% { transform:translate(0,0) scale(1);opacity:1; }
            100% { transform:translate(var(--sx),var(--sy)) scale(0);opacity:0; }
        }

        /* Sliders */
        .yk-slider-row { padding:10px 2px;border-bottom:1px solid rgba(255,255,255,.01); }
        .yk-slider-row:last-child { border-bottom:none; }
        .yk-slider-header { display:flex;justify-content:space-between;align-items:center;8px; }
        .yk-slider-name { font-size:11.5px;font-weight:600;color:var(--t1); }
        .yk-slider-val {
            font-size:10px;font-weight:700;color:var(--a1);
            background:rgba(255,107,157,.08);border:1px solid rgba(255,107,157,.1);
            padding:2px 10px;border-radius:6px;'JetBrains Mono';
            min-width:38px;text-align:center;transition:all .25s;
        }
        .yk-range {
            width:100%;height:4px;-webkit-appearance:none;appearance:none;
            background:rgba(255,255,255,.05);border-radius:4px;outline:none;cursor:pointer;
            transition:background .3s;
        }
        .yk-range:hover { background:rgba(255,255,255,.08); }
        .yk-range::-webkit-slider-thumb {
            -webkit-appearance:none;width:18px;height:18px;border-radius:50%;
            background:linear-gradient(135deg, var(--a1), var(--a2));cursor:pointer;
            box-shadow:0 2px 10px rgba(255,107,157,.4);border:2px solid rgba(255,255,255,.15);
            transition:all .25s;
        }
        .yk-range::-webkit-slider-thumb:hover {
            transform:scale(1.25);
            box-shadow:0 3px 18px rgba(255,107,157,.6), 0 0 30px rgba(192,132,252,.2);
        }
        .yk-range:active::-webkit-slider-thumb { transform:scale(0.95); }

        /* Pill */
        .yk-pill {
            display:inline-flex;align-items:center;gap:6px;
            padding:5px 12px;border-radius:20px;font-size:9px;font-weight:700;
            10px;transition:all .35s;
        }
        .yk-pill.on {
            background:rgba(52,211,153,.08);border:1px solid rgba(52,211,153,.15);color:var(--grn);
        }
        .yk-pill.off {
            background:rgba(255,255,255,.02);border:1px solid rgba(255,255,255,.04);color:var(--t2);
        }
        .yk-pill-dot { width:6px;height:6px;border-radius:50%;transition:all .3s; }
        .yk-pill.on .yk-pill-dot { background:var(--grn);box-shadow:0 0 8px rgba(52,211,153,.5);animation:pillBlink 1.8s infinite; }
        .yk-pill.off .yk-pill-dot { background:#555; }
        @keyframes pillBlink { 0%,100%{opacity:1} 50%{opacity:.25} }

        /* Warning */
        .yk-warn {
            background:rgba(253,224,71,.04);border:1px solid rgba(253,224,71,.1);
            border-radius:10px;padding:8px 12px;8px;
            font-size:9px;color:rgba(253,224,71,.8);display:flex;align-items:center;gap:6px;
            animation:warnGlow 4s ease-in-out infinite;font-weight:600;
        }
        @keyframes warnGlow { 0%,100%{border-color:rgba(253,224,71,.1)} 50%{border-color:rgba(253,224,71,.2)} }

        /* Info rows */
        .yk-info { display:flex;justify-content:space-between;align-items:center;padding:6px 0;font-size:10.5px;border-bottom:1px solid rgba(255,255,255,.01); }
        .yk-info:last-child { border-bottom:none; }
        .yk-info .k { color:var(--t2);font-weight:500; }
        .yk-info .v { color:var(--t1);font-weight:700; }

        /* Keyboard hints */
        .yk-kbd { display:inline-flex;align-items:center;gap:3px;font-size:9px; }
        .yk-kbd kbd {
            background:rgba(255,255,255,.05);border:1px solid rgba(255,255,255,.07);
            padding:2px 7px;border-radius:4px;'JetBrains Mono';
            font-size:9px;color:var(--a1);font-weight:600;
            transition:all .2s;
        }
        .yk-kbd kbd:hover { background:rgba(255,107,157,.12);transform:translateY(-1px); }

        /* Game Speed */
        .yk-gs-display { text-align:center;14px 0; }
        .yk-gs-value {
            font-size:36px;font-weight:900;'Outfit';
            background:linear-gradient(135deg, var(--a1), var(--a2), var(--a3), var(--a4));
            background-size:300% 300%;
            -webkit-background-clip:text;-webkit-text-fill-color:transparent;
            animation:gradMove 4s ease infinite;transition:all .3s;
        }
        .yk-gs-label { font-size:10px;color:var(--t2);3px;font-weight:600; }
        .yk-gs-presets { display:flex;gap:4px;12px;flex-wrap:wrap; }
        .yk-gs-preset {
            flex:1;min-width:48px;padding:7px 4px;
            background:rgba(255,255,255,.03);border:1px solid rgba(255,255,255,.05);
            border-radius:8px;color:var(--t2);font-size:9px;font-weight:800;
            'JetBrains Mono';cursor:pointer;text-align:center;
            transition:all .3s cubic-bezier(.4,0,.2,1);
        }
        .yk-gs-preset:hover {
            background:rgba(255,107,157,.1);border-color:rgba(255,107,157,.25);
            color:var(--t1);transform:translateY(-2px);
            box-shadow:0 4px 12px rgba(255,107,157,.1);
        }
        .yk-gs-preset.active {
            background:linear-gradient(135deg, rgba(255,107,157,.15), rgba(192,132,252,.1));
            border-color:rgba(255,107,157,.35);color:#fff;
            box-shadow:0 4px 16px rgba(255,107,157,.2), 0 0 30px rgba(192,132,252,.1);
        }

        /* Footer credit */
        .yk-footer {
            padding:8px 16px;
            background:linear-gradient(135deg, rgba(255,107,157,.02), rgba(192,132,252,.01));
            border-top:1px solid var(--brd);
            display:flex;justify-content:space-between;align-items:center;
            font-size:8px;color:rgba(255,107,157,.35);font-weight:700;
            letter-spacing:1.5px;text-transform:uppercase;
        }
        .yk-footer-glow {
            display:inline-flex;align-items:center;gap:4px;
        }
        .yk-footer-dot {
            width:4px;height:4px;border-radius:50%;
            background:var(--a1);
            animation:footerDot 2s ease-in-out infinite;
        }
        @keyframes footerDot { 0%,100%{opacity:.3} 50%{opacity:1} }

        /* ===== OVERLAYS ===== */
        #yk-watermark {
            position:fixed;top:8px;left:8px;
            display:flex;align-items:center;gap:8px;
            background:var(--bg);backdrop-filter:blur(20px);
            border:1px solid var(--brd);border-radius:10px;padding:6px 14px;
            'Quicksand';font-size:10px;color:var(--t1);z-index:99998;
            box-shadow:0 4px 20px rgba(0,0,0,.5), 0 0 20px rgba(255,107,157,.05);
            user-select:none;pointer-events:none;
            animation:wmIn .6s ease-out .5s both;
        }
        @keyframes wmIn { from{opacity:0;transform:translateX(-30px)} to{opacity:1;transform:translateX(0)} }
        #yk-watermark .wm-name {
            'Outfit';font-weight:900;
            background:linear-gradient(135deg, #ffb7d5, #c084fc, #818cf8);
            -webkit-background-clip:text;-webkit-text-fill-color:transparent;
        }
        #yk-watermark .wm-sep { width:1px;height:14px;background:var(--brd); }
        #yk-watermark .wm-fps { color:var(--grn);font-weight:700;'JetBrains Mono';min-width:50px; }
        #yk-watermark .wm-speed { color:var(--ylw);font-weight:700;'JetBrains Mono';min-width:35px; }
        #yk-watermark .wm-credit { color:rgba(255,107,157,.3);font-size:8px;font-weight:600; }

        #yk-fov { position:fixed;border:1.5px solid rgba(255,107,157,.15);border-radius:50%;pointer-events:none;z-index:99990;display:none;transition:all .3s; }
        #yk-fov.show { display:block; }

        #yk-hitmarker { position:fixed;top:50%;left:50%;transform:translate(-50%,-50%) scale(.8);width:22px;height:22px;pointer-events:none;z-index:99991;opacity:0;transition:opacity .12s,transform .12s; }
        #yk-hitmarker::before,#yk-hitmarker::after { content:'';position:absolute;background:#fff;box-shadow:0 0 6px rgba(255,255,255,.8); }
        #yk-hitmarker::before { width:2px;height:100%;left:50%;transform:translateX(-50%);clip-path:polygon(0 0,100% 0,100% 35%,0 35%,0 65%,100% 65%,100% 100%,0 100%); }
        #yk-hitmarker::after { width:100%;height:2px;top:50%;transform:translateY(-50%);clip-path:polygon(0 0,35% 0,35% 100%,0 100%,65% 0,100% 0,100% 100%,65% 100%); }

        #yk-stats { position:fixed;top:8px;right:8px;background:var(--bg);backdrop-filter:blur(16px);border:1px solid var(--brd);border-radius:10px;padding:10px 16px;'Quicksand';font-size:10px;color:var(--t1);z-index:99997;display:none;user-select:none;pointer-events:none;animation:wmIn .5s ease-out .7s both; }
        #yk-stats.show { display:block; }
        #yk-stats .s-row { display:flex;justify-content:space-between;gap:18px;padding:3px 0; }
        #yk-stats .s-lbl { color:var(--t2);font-weight:500; }
        #yk-stats .s-val { font-weight:700;'JetBrains Mono';color:var(--grn); }

        /* Toast */
        .yk-toast {
            position:fixed;bottom:28px;left:50%;
            transform:translateX(-50%) translateY(16px);
            background:var(--bg);backdrop-filter:blur(20px);
            border:1px solid var(--brd);color:var(--t1);
            'Quicksand';font-size:11.5px;font-weight:700;
            padding:10px 24px;border-radius:12px;z-index:999999;
            box-shadow:0 10px 40px rgba(0,0,0,.5), 0 0 30px rgba(255,107,157,.08);
            opacity:0;transition:all .35s cubic-bezier(.16,1,.3,1);white-space:nowrap;
        }
        .yk-toast.show { opacity:1; transform:translateX(-50%) translateY(0); }
    </style>

    <!-- AMBIENT PARTICLES -->
    <div id="yk-ambient"></div>

    <!-- WATERMARK -->
    <div id="yk-watermark">
        <span class="wm-name">W cheats</span><span class="wm-sep"></span>
        <span class="wm-fps" id="wm-fps">0 fps</span><span class="wm-sep"></span>
        <span class="wm-speed" id="wm-speed" style="display:none">1.0x</span>
        <span class="wm-sep" id="wm-speed-sep" style="display:none"></span>
        <span style="color:var(--t2);font-weight:600">v4.0</span><span class="wm-sep"></span>
        <span class="wm-credit">by W cheats</span>
    </div>

    <div id="yk-fov"></div>
    <div id="yk-hitmarker"></div>

    <div id="yk-stats" class="${config.statsOverlay?'show':''}">
        <div class="s-row"><span class="s-lbl">Kills</span><span class="s-val" id="yk-kills">0</span></div>
        <div class="s-row"><span class="s-lbl">Target</span><span class="s-val" id="yk-target">—</span></div>
    </div>

    <!-- MENU -->
    <div id="yk-menu">
        <div class="yk-header" id="yk-drag">
            <div class="yk-header-left">
                <div class="yk-logo">⚡</div>
                <div>
                    <div class="yk-title">W cheats</div>
                    <div class="yk-made-by">✧ made by W cheats ✧</div>
                </div>
                <span class="yk-badge">v4.0</span>
            </div>
            <button class="yk-close" id="yk-close">✕</button>
        </div>

        <div class="yk-tabs">
            <button class="yk-tab on" data-p="aim">🎯 Aim</button>
            <button class="yk-tab" data-p="cmb">💥 Combat</button>
            <button class="yk-tab" data-p="mov">⚡ Move</button>
            <button class="yk-tab" data-p="vis">👁 Visual</button>
            <button class="yk-tab" data-p="spd">🎮 Speed</button>
            <button class="yk-tab" data-p="msc">🔧 Misc</button>
            <button class="yk-tab" data-p="cfg">⚙ Cfg</button>
        </div>

        <div class="yk-body">
            <!-- AIM PANE -->
            <div class="yk-pane on" id="p-aim">
                <div class="yk-card">
                    <div class="yk-section"><span class="yk-dot"></span>AIMBOT</div>
                    <div class="yk-row"><div class="yk-row-left"><div class="yk-icon">🎯</div><div><div>Aimbot</div><div class="yk-desc">Kafaya otomatik kilitlenir</div></div></div><label class="yk-sw"><input type="checkbox" id="c-aim" ${config.aimbot?'checked':''}><span class="yk-sl"></span></label></div>
                    <div class="yk-row"><div class="yk-row-left"><div class="yk-icon">🔒</div><div><div>Lock-On</div><div class="yk-desc">Hedefe kilitli kal</div></div></div><label class="yk-sw"><input type="checkbox" id="c-lock" ${config.aimbotLockOn?'checked':''}><span class="yk-sl"></span></label></div>
                    <div class="yk-row"><div class="yk-row-left"><div class="yk-icon">📡</div><div><div>Prediction</div><div class="yk-desc">Hareket tahmini</div></div></div><label class="yk-sw"><input type="checkbox" id="c-pred" ${config.aimbotPrediction?'checked':''}><span class="yk-sl"></span></label></div>
                    <div class="yk-row"><div class="yk-row-left"><div class="yk-icon">🌸</div><div><div>Smoothing</div><div class="yk-desc">Yumuşak geçiş</div></div></div><label class="yk-sw"><input type="checkbox" id="c-smooth" ${config.aimbotSmoothing?'checked':''}><span class="yk-sl"></span></label></div>
                    <div class="yk-pill off" id="aim-pill"><span class="yk-pill-dot"></span><span id="aim-txt">Kapalı</span></div>
                </div>
                <div class="yk-card">
                    <div class="yk-section"><span class="yk-dot"></span>AIM AYARLARI</div>
                    <div class="yk-slider-row"><div class="yk-slider-header"><span class="yk-slider-name">Speed</span><span class="yk-slider-val" id="v-sp">${config.aimbotSpeed}</span></div><input type="range" class="yk-range" id="c-sp" min="0.05" max="1.0" step="0.05" value="${config.aimbotSpeed}"></div>
                    <div class="yk-slider-row"><div class="yk-slider-header"><span class="yk-slider-name">FOV</span><span class="yk-slider-val" id="v-fov">${config.aimbotFOV}</span></div><input type="range" class="yk-range" id="c-fov" min="50" max="800" step="10" value="${config.aimbotFOV}"></div>
                    <div class="yk-slider-row"><div class="yk-slider-header"><span class="yk-slider-name">Head Offset</span><span class="yk-slider-val" id="v-ho">${config.headOffset}</span></div><input type="range" class="yk-range" id="c-ho" min="0.05" max="0.5" step="0.01" value="${config.headOffset}"></div>
                    <div class="yk-slider-row"><div class="yk-slider-header"><span class="yk-slider-name">Snap Distance</span><span class="yk-slider-val" id="v-snd">${config.aimbotSnapDistance}</span></div><input type="range" class="yk-range" id="c-snd" min="5" max="80" step="5" value="${config.aimbotSnapDistance}"></div>
                </div>
            </div>

            <!-- COMBAT PANE -->
            <div class="yk-pane" id="p-cmb">
                <div class="yk-card">
                    <div class="yk-section"><span class="yk-dot red"></span>SİLAH</div>
                    <div class="yk-row"><div class="yk-row-left"><div class="yk-icon red">♾️</div><div><div>Infinite Ammo</div><div class="yk-desc">Sınırsız mermi</div></div></div><label class="yk-sw"><input type="checkbox" id="c-ammo"><span class="yk-sl"></span></label></div>
                    <div class="yk-row"><div class="yk-row-left"><div class="yk-icon red">🔫</div><div><div>No Recoil</div><div class="yk-desc">Geri tepme yok</div></div></div><label class="yk-sw"><input type="checkbox" id="c-recoil"><span class="yk-sl"></span></label></div>
                    <div class="yk-row"><div class="yk-row-left"><div class="yk-icon red">💥</div><div><div>Rapid Fire</div><div class="yk-desc">Hızlı ateş</div></div></div><label class="yk-sw"><input type="checkbox" id="c-rapid"><span class="yk-sl"></span></label></div>
                    <div class="yk-slider-row"><div class="yk-slider-header"><span class="yk-slider-name">Fire Rate</span><span class="yk-slider-val" id="v-rate">${config.rapidFireRate}ms</span></div><input type="range" class="yk-range" id="c-rate" min="10" max="200" step="5" value="${config.rapidFireRate}"></div>
                </div>
                <div class="yk-card">
                    <div class="yk-section"><span class="yk-dot blue"></span>OTOMATİK</div>
                    <div class="yk-row"><div class="yk-row-left"><div class="yk-icon blue">🤖</div><div><div>Auto Shoot</div><div class="yk-desc">Crosshair'de düşman → ateş</div></div></div><label class="yk-sw"><input type="checkbox" id="c-auto"><span class="yk-sl"></span></label></div>
                    <div class="yk-row"><div class="yk-row-left"><div class="yk-icon blue">⚡</div><div><div>Trigger Bot</div><div class="yk-desc">Aim kilitlenince ateş</div></div></div><label class="yk-sw"><input type="checkbox" id="c-trig"><span class="yk-sl"></span></label></div>
                    <div class="yk-slider-row"><div class="yk-slider-header"><span class="yk-slider-name">Trigger Delay</span><span class="yk-slider-val" id="v-td">${config.triggerDelay}ms</span></div><input type="range" class="yk-range" id="c-td" min="0" max="100" step="5" value="${config.triggerDelay}"></div>
                </div>
            </div>

            <!-- MOVEMENT PANE -->
            <div class="yk-pane" id="p-mov">
                <div class="yk-card">
                    <div class="yk-section"><span class="yk-dot orange"></span>HIZ</div>
                    <div class="yk-row"><div class="yk-row-left"><div class="yk-icon orange">⚡</div><div><div>Speed Hack</div><div class="yk-desc">Hareket hızı artır</div></div></div><label class="yk-sw"><input type="checkbox" id="c-spd"><span class="yk-sl"></span></label></div>
                    <div class="yk-slider-row"><div class="yk-slider-header"><span class="yk-slider-name">Multiplier</span><span class="yk-slider-val" id="v-spm">${config.speedMultiplier}x</span></div><input type="range" class="yk-range" id="c-spm" min="1" max="5" step="0.5" value="${config.speedMultiplier}"></div>
                </div>
                <div class="yk-card">
                    <div class="yk-section"><span class="yk-dot orange"></span>ZIPLAMA</div>
                    <div class="yk-row"><div class="yk-row-left"><div class="yk-icon orange">🐇</div><div><div>Bunny Hop</div><div class="yk-desc">Otomatik zıpla</div></div></div><label class="yk-sw"><input type="checkbox" id="c-bhop"><span class="yk-sl"></span></label></div>
                    <div class="yk-row"><div class="yk-row-left"><div class="yk-icon orange">🦘</div><div><div>Infinite Jump</div><div class="yk-desc">Sınırsız zıplama</div></div></div><label class="yk-sw"><input type="checkbox" id="c-ijmp"><span class="yk-sl"></span></label></div>
                    <div class="yk-row"><div class="yk-row-left"><div class="yk-icon orange">🛡️</div><div><div>No Fall Damage</div><div class="yk-desc">Düşme hasarı yok</div></div></div><label class="yk-sw"><input type="checkbox" id="c-nfd"><span class="yk-sl"></span></label></div>
                </div>
                <div class="yk-card">
                    <div class="yk-section"><span class="yk-dot orange"></span>HAREKET</div>
                    <div class="yk-row"><div class="yk-row-left"><div class="yk-icon orange">↔️</div><div><div>Auto Strafe</div><div class="yk-desc">Otomatik sağ-sol</div></div></div><label class="yk-sw"><input type="checkbox" id="c-strf"><span class="yk-sl"></span></label></div>
                    <div class="yk-row"><div class="yk-row-left"><div class="yk-icon orange">🌀</div><div><div>Spin Bot</div><div class="yk-desc">Sürekli dön</div></div></div><label class="yk-sw"><input type="checkbox" id="c-spin"><span class="yk-sl"></span></label></div>
                    <div class="yk-slider-row"><div class="yk-slider-header"><span class="yk-slider-name">Spin Speed</span><span class="yk-slider-val" id="v-spn">${config.spinSpeed}</span></div><input type="range" class="yk-range" id="c-spn" min="5" max="50" step="5" value="${config.spinSpeed}"></div>
                </div>
            </div>

            <!-- VISUAL PANE -->
            <div class="yk-pane" id="p-vis">
                <div class="yk-card">
                    <div class="yk-section"><span class="yk-dot"></span>ESP</div>
                    <div class="yk-row"><div class="yk-row-left"><div class="yk-icon">👁</div><div><div>Wall ESP</div><div class="yk-desc">Duvar arkası görüş</div></div></div><label class="yk-sw"><input type="checkbox" id="c-esp" ${config.esp?'checked':''}><span class="yk-sl"></span></label></div>
                    <div class="yk-row"><div class="yk-row-left"><div class="yk-icon">🔲</div><div><div>Wireframe</div><div class="yk-desc">Tel kafes modu</div></div></div><label class="yk-sw"><input type="checkbox" id="c-wire" ${config.wireframe?'checked':''}><span class="yk-sl"></span></label></div>
                    <div class="yk-row"><div class="yk-row-left"><div class="yk-icon">🔍</div><div><div>X-Ray</div><div class="yk-desc">Her şeyi gör</div></div></div><label class="yk-sw"><input type="checkbox" id="c-xray"><span class="yk-sl"></span></label></div>
                    <div class="yk-row"><div class="yk-row-left"><div class="yk-icon">⭕</div><div><div>FOV Circle</div><div class="yk-desc">Hedefleme çemberi</div></div></div><label class="yk-sw"><input type="checkbox" id="c-fovc"><span class="yk-sl"></span></label></div>
                </div>
                <div class="yk-card">
                    <div class="yk-section"><span class="yk-dot yellow"></span>RENDER</div>
                    <div class="yk-row"><div class="yk-row-left"><div class="yk-icon yellow">☀️</div><div><div>Full Bright</div><div class="yk-desc">Tam aydınlık</div></div></div><label class="yk-sw"><input type="checkbox" id="c-bright"><span class="yk-sl"></span></label></div>
                    <div class="yk-row"><div class="yk-row-left"><div class="yk-icon yellow">🌫️</div><div><div>No Fog</div><div class="yk-desc">Sis yok</div></div></div><label class="yk-sw"><input type="checkbox" id="c-fog"><span class="yk-sl"></span></label></div>
                </div>
                <div class="yk-card">
                    <div class="yk-section"><span class="yk-dot blue"></span>HUD</div>
                    <div class="yk-row"><div class="yk-row-left"><div class="yk-icon blue">✚</div><div><div>Hit Marker</div><div class="yk-desc">Vuruş işareti</div></div></div><label class="yk-sw"><input type="checkbox" id="c-hit" ${config.hitMarker?'checked':''}><span class="yk-sl"></span></label></div>
                    <div class="yk-row"><div class="yk-row-left"><div class="yk-icon blue">🔊</div><div><div>Kill Sound</div><div class="yk-desc">Öldürme sesi</div></div></div><label class="yk-sw"><input type="checkbox" id="c-ksnd" ${config.killSound?'checked':''}><span class="yk-sl"></span></label></div>
                    <div class="yk-row"><div class="yk-row-left"><div class="yk-icon blue">📊</div><div><div>Stats Overlay</div><div class="yk-desc">İstatistik göster</div></div></div><label class="yk-sw"><input type="checkbox" id="c-stats" ${config.statsOverlay?'checked':''}><span class="yk-sl"></span></label></div>
                </div>
            </div>

            <!-- GAME SPEED PANE -->
            <div class="yk-pane" id="p-spd">
                <div class="yk-card">
                    <div class="yk-section"><span class="yk-dot green"></span>OYUN HIZI KONTROLÜ</div>
                    <div class="yk-row"><div class="yk-row-left"><div class="yk-icon green">🎮</div><div><div>Game Speed</div><div class="yk-desc">Oyun hızını değiştir</div></div></div><label class="yk-sw"><input type="checkbox" id="c-gspd"><span class="yk-sl"></span></label></div>
                    <div class="yk-gs-display">
                        <div class="yk-gs-value" id="gs-val">1.0x</div>
                        <div class="yk-gs-label">✧ Oyun Hız Çarpanı ✧</div>
                    </div>
                    <div class="yk-slider-row"><div class="yk-slider-header"><span class="yk-slider-name">Hız</span><span class="yk-slider-val" id="v-gspd">1.0x</span></div><input type="range" class="yk-range" id="c-gspd-range" min="0.1" max="5.0" step="0.1" value="1.0"></div>
                    <div class="yk-gs-presets" id="gs-presets">
                        <button class="yk-gs-preset" data-speed="0.25">0.25x</button>
                        <button class="yk-gs-preset" data-speed="0.5">0.5x</button>
                        <button class="yk-gs-preset active" data-speed="1.0">1.0x</button>
                        <button class="yk-gs-preset" data-speed="1.5">1.5x</button>
                        <button class="yk-gs-preset" data-speed="2.0">2.0x</button>
                        <button class="yk-gs-preset" data-speed="3.0">3.0x</button>
                        <button class="yk-gs-preset" data-speed="5.0">5.0x</button>
                    </div>
                </div>
                <div class="yk-card">
                    <div class="yk-section"><span class="yk-dot yellow"></span>BİLGİ</div>
                    <div class="yk-info"><span class="k">Mevcut Hız</span><span class="v" id="gs-current" style="color:var(--grn)">1.0x (Normal)</span></div>
                    <div class="yk-info"><span class="k">Durum</span><span class="v" id="gs-status" style="color:var(--t2)">Devre Dışı</span></div>
                    <div class="yk-info"><span class="k">Toggle</span><span class="v"><span class="yk-kbd"><kbd>Alt</kbd>+<kbd>G</kbd></span></span></div>
                    <div class="yk-info"><span class="k">Hızlandır</span><span class="v"><span class="yk-kbd"><kbd>Alt</kbd>+<kbd>]</kbd></span></span></div>
                    <div class="yk-info"><span class="k">Yavaşlat</span><span class="v"><span class="yk-kbd"><kbd>Alt</kbd>+<kbd>[</kbd></span></span></div>
                    <div class="yk-info"><span class="k">Sıfırla</span><span class="v"><span class="yk-kbd"><kbd>Alt</kbd>+<kbd>0</kbd></span></span></div>
                </div>
                <div class="yk-warn">⚠️ Yüksek hız değerleri dengesizliğe sebep olabilir</div>
            </div>

            <!-- MISC PANE -->
            <div class="yk-pane" id="p-msc">
                <div class="yk-card">
                    <div class="yk-section"><span class="yk-dot green"></span>OTOMASYON</div>
                    <div class="yk-row"><div class="yk-row-left"><div class="yk-icon green">🔄</div><div><div>Auto Respawn</div><div class="yk-desc">Otomatik yeniden doğ</div></div></div><label class="yk-sw"><input type="checkbox" id="c-resp"><span class="yk-sl"></span></label></div>
                    <div class="yk-row"><div class="yk-row-left"><div class="yk-icon green">💤</div><div><div>Anti AFK</div><div class="yk-desc">AFK atılmayı engelle</div></div></div><label class="yk-sw"><input type="checkbox" id="c-afk"><span class="yk-sl"></span></label></div>
                    <div class="yk-row"><div class="yk-row-left"><div class="yk-icon green">🚀</div><div><div>FPS Boost</div><div class="yk-desc">Performans artır</div></div></div><label class="yk-sw"><input type="checkbox" id="c-fps"><span class="yk-sl"></span></label></div>
                </div>
                <div class="yk-warn">⚠️ Bazı özellikler sunucu tarafında tespit edilebilir</div>
            </div>

            <!-- CONFIG PANE -->
            <div class="yk-pane" id="p-cfg">
                <div class="yk-card">
                    <div class="yk-section"><span class="yk-dot"></span>BİLGİLER</div>
                    <div class="yk-info"><span class="k">Vertex Range</span><span class="v">${config.minVertices}-${config.maxVertices}</span></div>
                    <div class="yk-info"><span class="k">Hedefleme</span><span class="v" style="color:var(--grn)">Oyuncu Kafası</span></div>
                    <div class="yk-info"><span class="k">WebSocket</span><span class="v" id="ws-st" style="color:var(--org)">Bekleniyor</span></div>
                    <div class="yk-info"><span class="k">Kills</span><span class="v" style="color:var(--red)" id="cfg-kills">0</span></div>
                    <div class="yk-info"><span class="k">Game Speed</span><span class="v" id="cfg-gspd" style="color:var(--ylw)">1.0x</span></div>
                </div>
                <div class="yk-card">
                    <div class="yk-section"><span class="yk-dot"></span>KISAYOLLAR</div>
                    <div class="yk-info"><span class="k">Menü</span><span class="v"><span class="yk-kbd"><kbd>Insert</kbd></span></span></div>
                    <div class="yk-info"><span class="k">Aimbot</span><span class="v"><span class="yk-kbd"><kbd>Alt</kbd>+<kbd>A</kbd></span></span></div>
                    <div class="yk-info"><span class="k">ESP</span><span class="v"><span class="yk-kbd"><kbd>Alt</kbd>+<kbd>E</kbd></span></span></div>
                    <div class="yk-info"><span class="k">Speed</span><span class="v"><span class="yk-kbd"><kbd>Alt</kbd>+<kbd>S</kbd></span></span></div>
                    <div class="yk-info"><span class="k">Rapid Fire</span><span class="v"><span class="yk-kbd"><kbd>Alt</kbd>+<kbd>R</kbd></span></span></div>
                    <div class="yk-info"><span class="k">Trigger</span><span class="v"><span class="yk-kbd"><kbd>Alt</kbd>+<kbd>T</kbd></span></span></div>
                    <div class="yk-info"><span class="k">X-Ray</span><span class="v"><span class="yk-kbd"><kbd>Alt</kbd>+<kbd>X</kbd></span></span></div>
                    <div class="yk-info"><span class="k">Game Speed</span><span class="v"><span class="yk-kbd"><kbd>Alt</kbd>+<kbd>G</kbd></span></span></div>
                </div>
                <div class="yk-card" style="text-align:center;padding:20px;">
                    <div style="'Outfit';font-size:16px;font-weight:900;background:linear-gradient(135deg,#ffb7d5,#c084fc,#818cf8);-webkit-background-clip:text;-webkit-text-fill-color:transparent;4px;">✧ W cheats v4.0 ✧</div>
                    <div style="font-size:9px;color:var(--t2);font-weight:600;letter-spacing:2px;text-transform:uppercase;">MADE BY W CHEATS</div>
                    <div style="font-size:8px;color:rgba(255,107,157,.3);6px;">anime edition • ultimate</div>
                </div>
            </div>
        </div>

        <!-- FOOTER -->
        <div class="yk-footer">
            <span class="yk-footer-glow"><span class="yk-footer-dot"></span> made by W cheats</span>
            <span>✧ anime edition ✧</span>
        </div>
    </div>
    `;

    document.body.appendChild(root);

    // ===== AMBIENT SAKURA PARTICLES =====
    const ambient = document.getElementById('yk-ambient');
    function spawnAmbientParticle() {
        if (!ambient) return;
        const p = document.createElement('div');
        p.className = 'yk-ambient-particle';
        const colors = ['rgba(255,183,213,0.4)', 'rgba(192,132,252,0.3)', 'rgba(129,140,248,0.25)', 'rgba(56,189,248,0.2)'];
        p.style.background = colors[Math.floor(Math.random() * colors.length)];
        p.style.width = p.style.height = (3 + Math.random() * 5) + 'px';
        p.style.left = Math.random() * 100 + '%';
        p.style.animationDuration = (8 + Math.random() * 12) + 's';
        p.style.filter = `blur(${Math.random() * 1.5}px)`;
        ambient.appendChild(p);
        setTimeout(() => p.remove(), 20000);
    }
    setInterval(spawnAmbientParticle, 800);

    // ===== SPARKLE EFFECT ON TOGGLE =====
    function createSparkles(element) {
        const rect = element.getBoundingClientRect();
        const colors = ['#ff6b9d', '#c084fc', '#818cf8', '#38bdf8', '#ffb7d5', '#fde047'];
        for (let i = 0; i < 8; i++) {
            const spark = document.createElement('div');
            spark.className = 'yk-sparkle';
            spark.style.position = 'fixed';
            spark.style.left = (rect.left + rect.width / 2) + 'px';
            spark.style.top = (rect.top + rect.height / 2) + 'px';
            spark.style.background = colors[Math.floor(Math.random() * colors.length)];
            spark.style.setProperty('--sx', (Math.random() * 60 - 30) + 'px');
            spark.style.setProperty('--sy', (Math.random() * 60 - 30) + 'px');
            spark.style.zIndex = '9999999';
            document.body.appendChild(spark);
            setTimeout(() => spark.remove(), 600);
        }
    }

    // Add sparkle to all switches
    document.querySelectorAll('.yk-sw input').forEach(inp => {
        inp.addEventListener('change', function() {
            if (this.checked) createSparkles(this.closest('.yk-sw'));
        });
    });

    const menu = document.getElementById('yk-menu');

    // ===== TABS =====
    document.querySelectorAll('.yk-tab').forEach(b => b.addEventListener('click', () => {
        document.querySelectorAll('.yk-tab').forEach(x => x.classList.remove('on'));
        document.querySelectorAll('.yk-pane').forEach(x => x.classList.remove('on'));
        b.classList.add('on');
        const pane = document.getElementById(`p-${b.dataset.p}`);
        pane.classList.add('on');
        pane.style.animation = 'none';
        pane.offsetHeight;
        pane.style.animation = '';
    }));

    // ===== BINDINGS =====
    const bind = (id, key, cb) => document.getElementById(id)?.addEventListener('change', function() {
        config[key] = this.checked; if (cb) cb(this.checked);
    });
    const slide = (id, key, vid, fmt, cb) => document.getElementById(id)?.addEventListener('input', function() {
        const v = parseFloat(this.value); config[key] = v;
        document.getElementById(vid).textContent = fmt ? fmt(v) : v;
        if (cb) cb(v);
    });

    // AIM
    bind('c-aim', 'aimbot', on => {
        document.getElementById('aim-pill').className = `yk-pill ${on?'on':'off'}`;
        document.getElementById('aim-txt').textContent = on ? '✧ AKTİF — Kafaya lock' : 'Kapalı';
        toast(on ? '🎯 Aimbot ON' : '🎯 Aimbot OFF');
    });
    bind('c-lock', 'aimbotLockOn');
    bind('c-pred', 'aimbotPrediction');
    bind('c-smooth', 'aimbotSmoothing');
    slide('c-sp', 'aimbotSpeed', 'v-sp');
    slide('c-fov', 'aimbotFOV', 'v-fov', v => parseInt(v), syncFOV);
    slide('c-ho', 'headOffset', 'v-ho');
    slide('c-snd', 'aimbotSnapDistance', 'v-snd', v => parseInt(v));

    // COMBAT
    bind('c-ammo', 'infiniteAmmo', on => toast(on?'♾️ Infinite Ammo ON':'♾️ OFF'));
    bind('c-recoil', 'noRecoil', on => toast(on?'🔫 No Recoil ON':'🔫 OFF'));
    bind('c-rapid', 'rapidFire', on => { on?startRapidFire():stopRapidFire(); toast(on?'💥 Rapid Fire ON':'💥 OFF'); });
    slide('c-rate', 'rapidFireRate', 'v-rate', v=>parseInt(v)+'ms', ()=>{if(config.rapidFire){stopRapidFire();startRapidFire();}});
    bind('c-auto', 'autoShoot', on => toast(on?'🤖 Auto Shoot ON':'🤖 OFF'));
    bind('c-trig', 'triggerBot', on => toast(on?'⚡ Trigger Bot ON':'⚡ OFF'));
    slide('c-td', 'triggerDelay', 'v-td', v=>parseInt(v)+'ms');

    // MOVEMENT
    bind('c-spd', 'speedHack', on => { on?startSpeedHack():stopSpeedHack(); toast(on?'⚡ Speed ON':'⚡ OFF'); });
    slide('c-spm', 'speedMultiplier', 'v-spm', v=>v+'x');
    bind('c-bhop', 'bunnyHop', on => { on?startBunnyHop():stopBunnyHop(); toast(on?'🐇 Bhop ON':'🐇 OFF'); });
    bind('c-ijmp', 'infiniteJump', on => { if(on)startInfiniteJump(); toast(on?'🦘 Inf Jump ON':'🦘 OFF'); });
    bind('c-nfd', 'noFallDamage', on => toast(on?'🛡️ No Fall DMG ON':'🛡️ OFF'));
    bind('c-strf', 'autoStrafe', on => { on?startAutoStrafe():stopAutoStrafe(); toast(on?'↔️ Strafe ON':'↔️ OFF'); });
    bind('c-spin', 'spinBot', on => { on?startSpinBot():stopSpinBot(); toast(on?'🌀 Spin ON':'🌀 OFF'); });
    slide('c-spn', 'spinSpeed', 'v-spn', v=>parseInt(v));

    // VISUAL
    bind('c-esp', 'esp', on => toast(on?'👁 ESP ON':'👁 OFF'));
    bind('c-wire', 'wireframe');
    bind('c-xray', 'xray', on => toast(on?'🔍 X-Ray ON':'🔍 OFF'));
    bind('c-fovc', 'fovCircle', on => { document.getElementById('yk-fov').classList.toggle('show',on); syncFOV(); });
    bind('c-bright', 'fullBright', on => toast(on?'☀️ Bright ON':'☀️ OFF'));
    bind('c-fog', 'noFog', on => toast(on?'🌫️ No Fog ON':'🌫️ OFF'));
    bind('c-hit', 'hitMarker');
    bind('c-ksnd', 'killSound');
    bind('c-stats', 'statsOverlay', on => document.getElementById('yk-stats').classList.toggle('show',on));

    // MISC
    bind('c-resp', 'autoRespawn', on => { on?startAutoRespawn():stopAutoRespawn(); toast(on?'🔄 Auto Respawn ON':'🔄 OFF'); });
    bind('c-afk', 'antiAFK', on => { on?startAntiAFK():stopAntiAFK(); toast(on?'💤 Anti AFK ON':'💤 OFF'); });
    bind('c-fps', 'fpsBoost', on => toast(on?'🚀 FPS Boost ON':'🚀 OFF'));

    // ===== GAME SPEED =====
    function updateGameSpeedUI(speed, enabled) {
        const label = speed===1?'Normal':speed<1?'Yavaş':speed<=2?'Hızlı':speed<=3?'Çok Hızlı':'Ultra';
        const el = id => document.getElementById(id);
        if(el('gs-val')) el('gs-val').textContent = speed.toFixed(1)+'x';
        if(el('v-gspd')) el('v-gspd').textContent = speed.toFixed(1)+'x';
        if(el('c-gspd-range')) el('c-gspd-range').value = speed;
        if(el('gs-current')) el('gs-current').textContent = speed.toFixed(1)+'x ('+label+')';
        if(el('gs-status')) { el('gs-status').textContent = enabled?'Aktif ✧':'Devre Dışı'; el('gs-status').style.color = enabled?'var(--grn)':'var(--t2)'; }
        if(el('cfg-gspd')) el('cfg-gspd').textContent = speed.toFixed(1)+'x';
        const ws = el('wm-speed'), wss = el('wm-speed-sep');
        if(ws&&wss) {
            if(enabled&&speed!==1) { ws.style.display='';wss.style.display='';ws.textContent=speed.toFixed(1)+'x';ws.style.color=speed>1?'var(--ylw)':'var(--a4)'; }
            else { ws.style.display='none';wss.style.display='none'; }
        }
        document.querySelectorAll('.yk-gs-preset').forEach(b => b.classList.toggle('active', parseFloat(b.dataset.speed)===speed));
    }

    bind('c-gspd', 'gameSpeedEnabled', on => {
        if(on) GameSpeedEngine.enable(config.gameSpeed); else GameSpeedEngine.disable();
        updateGameSpeedUI(config.gameSpeed, on);
        toast(on?`🎮 Game Speed ON (${config.gameSpeed}x)`:'🎮 Game Speed OFF');
    });

    document.getElementById('c-gspd-range')?.addEventListener('input', function() {
        const v = parseFloat(this.value); config.gameSpeed = v;
        if(config.gameSpeedEnabled) GameSpeedEngine.enable(v);
        updateGameSpeedUI(v, config.gameSpeedEnabled);
    });

    document.querySelectorAll('.yk-gs-preset').forEach(btn => {
        btn.addEventListener('click', () => {
            const s = parseFloat(btn.dataset.speed); config.gameSpeed = s;
            if(config.gameSpeedEnabled) GameSpeedEngine.enable(s);
            updateGameSpeedUI(s, config.gameSpeedEnabled);
            toast(`🎮 Hız: ${s}x`);
        });
    });

    // Close
    document.getElementById('yk-close').addEventListener('click', () => { menu.classList.remove('open'); menuOpen = false; });

    // Drag
    const h = document.getElementById('yk-drag'); let dr=false,ox=0,oy=0;
    h.addEventListener('mousedown', e => { if(e.target.closest('.yk-close'))return; dr=true;ox=e.clientX-menu.offsetLeft;oy=e.clientY-menu.offsetTop; });
    document.addEventListener('mousemove', e => { if(!dr)return; menu.style.left=`${e.clientX-ox}px`;menu.style.top=`${e.clientY-oy}px`; });
    document.addEventListener('mouseup', () => dr=false);

    function syncFOV() {
        const f=document.getElementById('yk-fov'),s=config.aimbotFOV;
        f.style.width=`${s}px`;f.style.height=`${s}px`;
        f.style.left=`calc(50% - ${s/2}px)`;f.style.top=`calc(50% - ${s/2}px)`;
    }
    syncFOV();

    // ===== KEYBOARD =====
    document.addEventListener('keydown', e => {
        if(e.key==='Insert'){menuOpen=!menuOpen;menu.classList.toggle('open',menuOpen);}
        if(e.altKey) {
            const k=e.key.toLowerCase();
            const toggles = {
                'a':['c-aim','aimbot','🎯 Aimbot'],
                'e':['c-esp','esp','👁 ESP'],
                's':['c-spd','speedHack','⚡ Speed'],
                'r':['c-rapid','rapidFire','💥 Rapid'],
                't':['c-trig','triggerBot','⚡ Trigger'],
                'x':['c-xray','xray','🔍 X-Ray']
            };
            if(toggles[k]) {
                const [id,key,label]=toggles[k];
                config[key]=!config[key];
                const el=document.getElementById(id);
                if(el)el.checked=config[key];
                if(k==='a'){
                    document.getElementById('aim-pill').className=`yk-pill ${config.aimbot?'on':'off'}`;
                    document.getElementById('aim-txt').textContent=config.aimbot?'✧ AKTİF — Kafaya lock':'Kapalı';
                }
                if(k==='s'){config.speedHack?startSpeedHack():stopSpeedHack();}
                if(k==='r'){config.rapidFire?startRapidFire():stopRapidFire();}
                toast(`${label} ${config[key]?'ON':'OFF'}`);
                e.preventDefault();
            }
            if(k==='g'){
                config.gameSpeedEnabled=!config.gameSpeedEnabled;
                const el=document.getElementById('c-gspd');if(el)el.checked=config.gameSpeedEnabled;
                config.gameSpeedEnabled?GameSpeedEngine.enable(config.gameSpeed):GameSpeedEngine.disable();
                updateGameSpeedUI(config.gameSpeed,config.gameSpeedEnabled);
                toast(config.gameSpeedEnabled?`🎮 Game Speed ON (${config.gameSpeed}x)`:'🎮 Game Speed OFF');
                e.preventDefault();
            }
            if(k===']'){
                config.gameSpeed=Math.min(5,Math.round((config.gameSpeed+0.5)*10)/10);
                if(config.gameSpeedEnabled)GameSpeedEngine.enable(config.gameSpeed);
                updateGameSpeedUI(config.gameSpeed,config.gameSpeedEnabled);
                toast(`🎮 Hız: ${config.gameSpeed}x`);e.preventDefault();
            }
            if(k==='['){
                config.gameSpeed=Math.max(0.1,Math.round((config.gameSpeed-0.5)*10)/10);
                if(config.gameSpeedEnabled)GameSpeedEngine.enable(config.gameSpeed);
                updateGameSpeedUI(config.gameSpeed,config.gameSpeedEnabled);
                toast(`🎮 Hız: ${config.gameSpeed}x`);e.preventDefault();
            }
            if(k==='0'){
                config.gameSpeed=1.0;
                if(config.gameSpeedEnabled)GameSpeedEngine.enable(1.0);
                updateGameSpeedUI(1.0,config.gameSpeedEnabled);
                toast('🎮 Hız Sıfırlandı: 1.0x');e.preventDefault();
            }
        }
    });

    // Toast
    function toast(msg) {
        const t=document.createElement('div');t.className='yk-toast';t.textContent=msg;
        document.body.appendChild(t);
        requestAnimationFrame(()=>t.classList.add('show'));
        setTimeout(()=>{t.classList.remove('show');setTimeout(()=>t.remove(),350);},1500);
    }
    window._toast=toast;

    // Status updates
    setInterval(()=>{
        const el=document.getElementById('ws-st');
        if(el){if(gameSocket&&gameSocket.readyState===1){el.textContent='Bağlı ✧';el.style.color='var(--grn)';}else{el.textContent='Bekleniyor';el.style.color='var(--org)';}}
        const k=document.getElementById('cfg-kills');if(k)k.textContent=killCount;
        const t=document.getElementById('yk-target');if(t)t.textContent=targetLocked?'Locked ✧':'—';
    },1000);

    // FPS
    let fc=0,lt=performance.now();
    (function fl(){fc++;const n=performance.now();if(n-lt>=1000){const e=document.getElementById('wm-fps');if(e)e.textContent=`${fc} fps`;fc=0;lt=n;}requestAnimationFrame(fl);})();
}

// ============================================
// START
// ============================================
window.addEventListener('DOMContentLoaded', () => {
    createGUI();
    console.log(
        '%c ✧ W cheats v4.0 ✧ %c Anime Edition %c made by W cheats ',
        'background:linear-gradient(135deg,#ff6b9d,#c084fc);color:white;font-size:14px;padding:6px 14px;border-radius:8px 0 0 8px;font-weight:900;',
        'background:linear-gradient(135deg,#818cf8,#38bdf8);color:white;font-size:14px;padding:6px 14px;font-weight:700;',
        'background:#0c0218;color:#ffb7d5;font-size:14px;padding:6px 14px;border-radius:0 8px 8px 0;font-weight:500;font-style:italic;'
    );
});

window.WcheatsConfig = config;
})();