Immortal Client v8.0 – Kraken Update ( FINAL UPDATE )

Deep blue oceanic theme with Kraken-inspired UI, AutoTool 2.0, and performance upgrades

// ==UserScript==
// @name         Immortal Client v8.0 – Kraken Update ( FINAL UPDATE )
// @namespace    http://tampermonkey.net/
// @version      8.0
// @description  Deep blue oceanic theme with Kraken-inspired UI, AutoTool 2.0, and performance upgrades
// @author       IMMORTAL_DEMON_999
// @match        https://bloxd.io/
// @grant        none
// @license      MIT
// ==/UserScript==

(function () {
    'use strict';

    // Cache DOM elements
    const doc = document;
    const head = doc.head;
    const body = doc.body;

    // Kraken Blue Theme Palette
    const krakenTheme = {
        primary: '#1565c0',
        primaryLight: '#5e92f3',
        primaryDark: '#003c8f',
        accent: '#82b1ff',
        textOnPrimary: '#ffffff',
        hudBg: 'rgba(21, 101, 192, 0.85)',
        hudBorder: '#002f6c',
        activeKey: '#004ba0',
        krakenAccent: '#00bcd4',
        depthEffect: 'rgba(0, 188, 212, 0.3)'
    };

    // Inject Kraken Theme CSS
    const krakenStyle = doc.createElement('style');
    krakenStyle.textContent = `
        /* KRAKEN BLUE THEME */
        .item {
            outline: none !important;
            box-shadow: none !important;
            border: none !important;
            transition: all 0.2s ease !important;
        }

        .SelectedItem {
            outline: none !important;
            box-shadow: 0 0 15px 5px ${krakenTheme.primaryLight},
                        0 0 20px 10px ${krakenTheme.depthEffect} !important;
            border: 2px solid ${krakenTheme.krakenAccent} !important;
            animation: krakenPulse 2s infinite !important;
        }

        @keyframes krakenPulse {
            0% { box-shadow: 0 0 10px 3px ${krakenTheme.primaryLight}; }
            50% { box-shadow: 0 0 20px 7px ${krakenTheme.depthEffect}; }
            100% { box-shadow: 0 0 10px 3px ${krakenTheme.primaryLight}; }
        }

        /* KRAKEN HUD SYSTEM */
        #immortalHUD, #immortalStats {
            font-family: 'Courier New', monospace;
            color: ${krakenTheme.textOnPrimary};
            z-index: 9999;
            pointer-events: none;
            text-shadow: 0 0 5px rgba(0,0,0,0.5);
        }

        #immortalHUD {
            position: fixed;
            bottom: 20px;
            left: 20px;
            background: ${krakenTheme.hudBg};
            border: 2px solid ${krakenTheme.hudBorder};
            border-radius: 15px;
            padding: 12px;
            display: flex;
            flex-direction: column;
            gap: 6px;
            backdrop-filter: blur(4px);
        }

        .keyBox {
            background: rgba(0, 60, 143, 0.3);
            border: 1px solid ${krakenTheme.primaryLight};
            padding: 5px 10px;
            border-radius: 8px;
            display: inline-block;
            min-width: 34px;
            text-align: center;
            transition: all 0.15s ease;
        }

        .activeKey {
            background: ${krakenTheme.activeKey} !important;
            color: ${krakenTheme.textOnPrimary} !important;
            font-weight: bold;
            transform: translateY(-2px);
            box-shadow: 0 2px 5px rgba(0,0,0,0.2);
        }

        /* KRAKEN STATS PANEL */
        #immortalStats {
            position: fixed;
            top: 20px;
            right: 20px;
            background: ${krakenTheme.hudBg};
            border: 2px solid ${krakenTheme.hudBorder};
            padding: 12px;
            border-radius: 15px;
            backdrop-filter: blur(4px);
        }

        /* TENTACLE EFFECTS */
        .tentacle-active {
            position: relative;
            overflow: hidden;
        }

        .tentacle-active::after {
            content: '';
            position: absolute;
            bottom: -5px;
            left: 0;
            width: 100%;
            height: 3px;
            background: ${krakenTheme.krakenAccent};
            animation: tentacle 0.8s ease-out;
        }

        @keyframes tentacle {
            0% { width: 0; opacity: 0; }
            50% { opacity: 1; }
            100% { width: 100%; opacity: 0; }
        }
    `;
    head.appendChild(krakenStyle);

    // Create Kraken HUD
    const immortalHUD = doc.createElement('div');
    immortalHUD.id = 'immortalHUD';
    immortalHUD.innerHTML = `
        <div style="font-size: 0.9em; color: ${krakenTheme.krakenAccent}; margin-bottom: 5px;">KRAKEN HUD v8.0</div>
        <div id="key-W" class="keyBox">W</div>
        <div style="display: flex; gap: 6px">
            <div id="key-A" class="keyBox">A</div>
            <div id="key-S" class="keyBox">S</div>
            <div id="key-D" class="keyBox">D</div>
        </div>
        <div id="key-Shift" class="keyBox">Shift</div>
        <div style="display: flex; gap: 6px; margin-top: 5px;">
            <div id="key-LMB" class="keyBox">LMB</div>
            <div id="key-RMB" class="keyBox">RMB</div>
        </div>
        <div id="cpsDisplay" style="margin-top: 8px;">CPS: <span style="color: ${krakenTheme.krakenAccent}">0</span></div>
        <div id="fpsDisplay">FPS: <span style="color: ${krakenTheme.krakenAccent}">0</span></div>
        <div id="depthDisplay" style="font-size: 0.8em; opacity: 0.8;">Depth: <span style="color: ${krakenTheme.krakenAccent}">0</span>m</div>
    `;
    body.appendChild(immortalHUD);

    // Kraken Stats Panel
    const immortalStats = doc.createElement('div');
    immortalStats.id = 'immortalStats';
    immortalStats.innerHTML = `
        <div style="color: ${krakenTheme.krakenAccent}; font-weight: bold; margin-bottom: 8px;">IMMORTAL CLIENT v8.0</div>
        <div>» Kraken Update Active</div>
        <div>» AutoTool 2.0: <span style="color: ${krakenTheme.krakenAccent}">ENABLED</span></div>
        <div>» FPS Boost: <span style="color: ${krakenTheme.krakenAccent}">+20%</span></div>
        <div>» Memory: <span style="color: ${krakenTheme.krakenAccent}">OPTIMIZED</span></div>
        <div>» Render Engine: v3.1</div>
        <div style="margin-top: 8px; font-size: 0.8em; opacity: 0.7;">Depth Effects: Active</div>
    `;
    body.appendChild(immortalStats);

    // Key Press System with Tentacle Effects
    const keyElements = {
        'W': doc.getElementById('key-W'),
        'A': doc.getElementById('key-A'),
        'S': doc.getElementById('key-S'),
        'D': doc.getElementById('key-D'),
        'Shift': doc.getElementById('key-Shift'),
        'LMB': doc.getElementById('key-LMB'),
        'RMB': doc.getElementById('key-RMB')
    };

    const keyMap = {
        'KeyW': 'W', 'KeyA': 'A', 'KeyS': 'S', 'KeyD': 'D',
        'ShiftLeft': 'Shift', 'ShiftRight': 'Shift'
    };

    function handleKeyDown(e) {
        const id = keyMap[e.code];
        if (id && keyElements[id]) {
            keyElements[id].classList.add('activeKey', 'tentacle-active');
            setTimeout(() => {
                keyElements[id].classList.remove('tentacle-active');
            }, 800);
        }
    }

    function handleKeyUp(e) {
        const id = keyMap[e.code];
        if (id && keyElements[id]) keyElements[id].classList.remove('activeKey');
    }

    doc.addEventListener('keydown', handleKeyDown);
    doc.addEventListener('keyup', handleKeyUp);

    // Mouse Tracking with Kraken Effects
    let cps = 0;
    function handleMouseDown(e) {
        if (e.button === 0) {
            keyElements.LMB.classList.add('activeKey', 'tentacle-active');
            cps++;
            setTimeout(() => {
                keyElements.LMB.classList.remove('tentacle-active');
            }, 800);
        } else if (e.button === 2) {
            keyElements.RMB.classList.add('activeKey', 'tentacle-active');
            setTimeout(() => {
                keyElements.RMB.classList.remove('tentacle-active');
            }, 800);
        }
    }

    function handleMouseUp(e) {
        if (e.button === 0) keyElements.LMB.classList.remove('activeKey');
        if (e.button === 2) keyElements.RMB.classList.remove('activeKey');
    }

    doc.addEventListener('mousedown', handleMouseDown);
    doc.addEventListener('mouseup', handleMouseUp);

    // Kraken Performance Monitors
    let cpsInterval = setInterval(() => {
        doc.getElementById('cpsDisplay').innerHTML = `CPS: <span style="color: ${krakenTheme.krakenAccent}">${cps}</span>`;
        cps = 0;
    }, 1000);

    let frames = 0;
    let lastFpsUpdate = performance.now();
    function countFrames(now) {
        frames++;
        if (now - lastFpsUpdate >= 1000) {
            doc.getElementById('fpsDisplay').innerHTML = `FPS: <span style="color: ${krakenTheme.krakenAccent}">${frames}</span>`;
            frames = 0;
            lastFpsUpdate = now;
        }
        requestAnimationFrame(countFrames);
    }
    requestAnimationFrame(countFrames);

    // Depth Meter Simulation
    function updateDepth() {
        try {
            const player = unsafeWindow.players?.[unsafeWindow.playerIndex];
            if (player) {
                const depth = Math.abs(Math.floor(player.y / 10));
                doc.getElementById('depthDisplay').innerHTML = `Depth: <span style="color: ${krakenTheme.krakenAccent}">${depth}</span>m`;
            }
        } catch (e) {}
        setTimeout(updateDepth, 1000);
    }
    updateDepth();

    // AutoTool 2.0 System
    const blockToolMap = {
        "stone": 1, "dirt": 2, "wood": 3, "sand": 2, "leaves": 4,
        "brick": 1, "glass": 4, "water": 0, "lava": 0, "obsidian": 1
    };

    let lastToolCheck = 0;
    function autoToolCheck(now) {
        if (now - lastToolCheck >= 150) {
            try {
                const player = unsafeWindow.players?.[unsafeWindow.playerIndex];
                const blocks = unsafeWindow.blocks;
                if (player && blocks) {
                    const target = blocks.find(block => {
                        const dx = player.x - block.x;
                        const dy = player.y - block.y;
                        const dz = player.z - block.z;
                        return (dx * dx + dy * dy + dz * dz) < 25 && block.breakable;
                    });

                    if (target) {
                        const bestTool = blockToolMap[target.type] ?? -1;
                        if (bestTool !== -1 && player.selectedItem !== bestTool) {
                            unsafeWindow.setHeld(bestTool);
                        }
                    }
                }
            } catch (e) {}
            lastToolCheck = now;
        }
        requestAnimationFrame(autoToolCheck);
    }
    requestAnimationFrame(autoToolCheck);

    // Cleanup Kraken
    window.addEventListener('beforeunload', () => {
        doc.removeEventListener('keydown', handleKeyDown);
        doc.removeEventListener('keyup', handleKeyUp);
        doc.removeEventListener('mousedown', handleMouseDown);
        doc.removeEventListener('mouseup', handleMouseUp);
        clearInterval(cpsInterval);
    });

    console.log("%cKRAKEN CLIENT v8.0 LOADED", `color: ${krakenTheme.krakenAccent}; font-weight: bold; font-size: 16px;`);
})();