Evowars.io Nixware Fixed

Zoom Hack, Speed Hack, Show Enemy Hitbox, Draw Lines To Enemy

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

You will need to install an extension such as Tampermonkey to install this script.

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

您需要先安裝使用者腳本管理器擴充功能後才能安裝該腳本。

(我已經安裝了使用者腳本管理器,讓我安裝!)

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

// ==UserScript==
// @name         Evowars.io Nixware Fixed
// @namespace    http://tampermonkey.net/
// @version      2026-04-08
// @description  Zoom Hack, Speed Hack, Show Enemy Hitbox, Draw Lines To Enemy
// @author       You
// @match        https://evowars.io/*
// @grant        none
// ==/UserScript==

(function () {
    'use strict';

    // =========================
    // STYLE
    // =========================

    const style = document.createElement('style');

    style.innerHTML = `
        @import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&display=swap');

        #cheat-menu-container {
            position: fixed;
            top: 50px;
            left: 50px;
            width: 780px;
            height: 500px;
            background-color: #121212;
            border-radius: 8px;
            font-family: 'Inter', sans-serif;
            color: #a0a0a0;
            z-index: 999999;
            box-shadow: 0 10px 30px rgba(0,0,0,0.5);
            border: 1px solid #1e1e1e;
            display: flex;
            flex-direction: column;
            overflow: hidden;
            cursor: default;
        }

        #cheat-menu-header {
            height: 60px;
            padding: 0 25px;
            font-size: 16px;
            font-weight: 600;
            color: #ffffff;
            border-bottom: 1px solid #1e1e1e;
            cursor: grab;
            display: flex;
            align-items: center;
            gap: 15px;
            user-select: none;
            background-color: #121212;
        }

        #cheat-menu-header::before {
            content: '';
            display: inline-block;
            width: 14px;
            height: 14px;
            background-color: #ffffff;
            clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
        }

        .cheat-menu-body {
            display: flex;
            flex: 1;
            background-color: #0f0f0f;
        }

        .cheat-sidebar {
            width: 65px;
            background-color: #151515;
            border-right: 1px solid #1e1e1e;
        }

        .cheat-content {
            display: flex;
            flex: 1;
            padding: 30px;
            gap: 30px;
        }

        .cheat-col {
            flex: 1;
            display: flex;
            flex-direction: column;
            gap: 30px;
        }

        .cheat-section-title {
            font-size: 11px;
            font-weight: 600;
            letter-spacing: 1.5px;
            margin-bottom: 15px;
            text-transform: uppercase;
            color: #777;
            user-select: none;
        }

        .cheat-section {
            background-color: #181818;
            border-radius: 8px;
            padding: 20px;
            display: flex;
            flex-direction: column;
            gap: 20px;
            border: 1px solid #222;
        }

        .cheat-row {
            display: flex;
            justify-content: space-between;
            align-items: center;
            font-size: 13px;
            color: #ccc;
            user-select: none;
        }

        .toggle-switch {
            position: relative;
            width: 36px;
            height: 20px;
        }

        .toggle-switch input {
            opacity: 0;
            width: 0;
            height: 0;
        }

        .slider-round {
            position: absolute;
            cursor: pointer;
            inset: 0;
            background-color: #333;
            transition: .3s;
            border-radius: 20px;
        }

        .slider-round:before {
            position: absolute;
            content: "";
            height: 14px;
            width: 14px;
            left: 3px;
            bottom: 3px;
            background-color: white;
            transition: .3s;
            border-radius: 50%;
        }

        input:checked + .slider-round {
            background-color: #3b82f6;
        }

        input:checked + .slider-round:before {
            transform: translateX(16px);
        }

        .slider-container {
            display: flex;
            align-items: center;
            gap: 15px;
            width: 65%;
        }

        input[type=range] {
            -webkit-appearance: none;
            width: 100%;
            height: 4px;
            background: #333;
            border-radius: 2px;
            outline: none;
        }

        input[type=range]::-webkit-slider-thumb {
            -webkit-appearance: none;
            appearance: none;
            width: 14px;
            height: 14px;
            border-radius: 50%;
            background: #3b82f6;
            cursor: pointer;
        }

        .val-display {
            color: #888;
            font-size: 12px;
            min-width: 35px;
            text-align: right;
            font-variant-numeric: tabular-nums;
        }
    `;

    document.head.appendChild(style);

    // =========================
    // MENU
    // =========================

    const menuHtml = `
        <div id="cheat-menu-container">

            <div id="cheat-menu-header">
                Nixware
            </div>

            <div class="cheat-menu-body">

                <div class="cheat-sidebar"></div>

                <div class="cheat-content">

                    <div class="cheat-col">

                        <div>

                            <div class="cheat-section-title">
                                VISUALS
                            </div>

                            <div class="cheat-section">

                                <div class="cheat-row">
                                    <span>Draw Lines To Enemy</span>

                                    <label class="toggle-switch">
                                        <input type="checkbox" id="toggle-lines">
                                        <span class="slider-round"></span>
                                    </label>
                                </div>

                                <div class="cheat-row">
                                    <span>Show Enemy Hitboxes</span>

                                    <label class="toggle-switch">
                                        <input type="checkbox" id="toggle-hitboxes">
                                        <span class="slider-round"></span>
                                    </label>
                                </div>

                            </div>

                        </div>

                    </div>

                    <div class="cheat-col">

                        <div>

                            <div class="cheat-section-title">
                                MODIFIERS
                            </div>

                            <div class="cheat-section">

                                <div class="cheat-row">
                                    <span>Speed</span>

                                    <div class="slider-container">
                                        <input type="range"
                                               id="slider-speed"
                                               min="0.10"
                                               max="25"
                                               step="0.1"
                                               value="1">

                                        <div class="val-display" id="val-speed">
                                            1.00
                                        </div>
                                    </div>
                                </div>

                                <div class="cheat-row">
                                    <span>Zoom</span>

                                    <div class="slider-container">
                                        <input type="range"
                                               id="slider-zoom"
                                               min="0.05"
                                               max="5"
                                               step="0.05"
                                               value="1">

                                        <div class="val-display" id="val-zoom">
                                            1.00
                                        </div>
                                    </div>
                                </div>

                                <div class="cheat-row">
                                    <span>Hitbox Expander</span>

                                    <div class="slider-container">
                                        <input type="range"
                                               id="slider-hitbox"
                                               min="1"
                                               max="5"
                                               step="0.1"
                                               value="1.7">

                                        <div class="val-display" id="val-hitbox">
                                            1.70
                                        </div>
                                    </div>
                                </div>

                            </div>

                        </div>

                    </div>

                </div>

            </div>

        </div>
    `;

    const wrapper = document.createElement('div');
    wrapper.innerHTML = menuHtml;

    document.body.appendChild(wrapper);

    // =========================
    // VARIABLES
    // =========================

    const menu = document.getElementById('cheat-menu-container');
    const header = document.getElementById('cheat-menu-header');

    let isDragging = false;

    let dragStartX = 0;
    let dragStartY = 0;

    let menuStartLeft = 0;
    let menuStartTop = 0;

    let rt;
    let pType;
    let gameCanvas;

    let showLines = false;
    let showHitboxes = false;

    let hitboxScale = 1.7;

    let menuVisible = true;

    // =========================
    // MENU TOGGLE
    // =========================

    document.addEventListener('keydown', (e) => {

        if (e.key.toLowerCase() === 'o') {

            menuVisible = !menuVisible;

            menu.style.display =
                menuVisible ? 'flex' : 'none';
        }
    });

    // =========================
    // FIXED DRAGGING
    // =========================

    header.addEventListener('mousedown', (e) => {

        if (
            e.target.closest('input') ||
            e.target.closest('.slider-container') ||
            e.target.closest('.toggle-switch')
        ) {
            return;
        }

        isDragging = true;

        dragStartX = e.clientX;
        dragStartY = e.clientY;

        const rect = menu.getBoundingClientRect();

        menuStartLeft = rect.left;
        menuStartTop = rect.top;

        header.style.cursor = 'grabbing';

        e.preventDefault();
    });

    document.addEventListener('mousemove', (e) => {

        if (!isDragging) return;

        const dx = e.clientX - dragStartX;
        const dy = e.clientY - dragStartY;

        let newLeft = menuStartLeft + dx;
        let newTop = menuStartTop + dy;

        const maxX =
            window.innerWidth - menu.offsetWidth;

        const maxY =
            window.innerHeight - menu.offsetHeight;

        newLeft =
            Math.max(0, Math.min(newLeft, maxX));

        newTop =
            Math.max(0, Math.min(newTop, maxY));

        menu.style.left = `${newLeft}px`;
        menu.style.top = `${newTop}px`;
    });

    document.addEventListener('mouseup', () => {

        isDragging = false;

        header.style.cursor = 'grab';
    });

    // =========================
    // OVERLAY CANVAS
    // =========================

    const canvas = document.createElement('canvas');
    const ctx = canvas.getContext('2d');

    document.body.appendChild(canvas);

    canvas.style.cssText = `
        position:fixed;
        top:0;
        left:0;
        width:100%;
        height:100%;
        pointer-events:none;
        z-index:999998;
    `;

    function resizeCanvas() {

        canvas.width = window.innerWidth;
        canvas.height = window.innerHeight;
    }

    resizeCanvas();

    window.addEventListener('resize', resizeCanvas);

    // =========================
    // SLIDER BG
    // =========================

    function updateSliderBg(slider, min, max) {

        const val = slider.value;

        const percentage =
            ((val - min) / (max - min)) * 100;

        slider.style.background =
            `linear-gradient(to right,
            #3b82f6 ${percentage}%,
            #333 ${percentage}%)`;
    }

    // =========================
    // GAME MODIFIERS
    // =========================

    function setGameSpeed(speed) {

        if (rt && rt.timescale !== undefined) {

            rt.timescale =
                parseFloat(speed);
        }
    }

    function setZoom(scale) {

        if (
            rt &&
            rt.running_layout &&
            rt.running_layout.layers
        ) {

            for (
                let i = 0;
                i < rt.running_layout.layers.length;
                i++
            ) {

                const layer =
                    rt.running_layout.layers[i];

                if (
                    layer &&
                    layer.scale !== undefined
                ) {

                    layer.scale =
                        parseFloat(scale);

                    if (layer.setZIndicesStaleFrom) {
                        layer.setZIndicesStaleFrom(0);
                    }
                }
            }

            rt.redraw = true;
        }
    }

    // =========================
    // TOGGLES
    // =========================

    document
        .getElementById('toggle-lines')
        .addEventListener('change', (e) => {

            showLines = e.target.checked;
        });

    document
        .getElementById('toggle-hitboxes')
        .addEventListener('change', (e) => {

            showHitboxes = e.target.checked;
        });

    // =========================
    // SPEED SLIDER
    // =========================

    const sliderSpeed =
        document.getElementById('slider-speed');

    const valSpeed =
        document.getElementById('val-speed');

    updateSliderBg(sliderSpeed, 0.10, 25);

    sliderSpeed.addEventListener('input', (e) => {

        const val =
            parseFloat(e.target.value).toFixed(2);

        valSpeed.textContent = val;

        updateSliderBg(e.target, 0.10, 25);

        setGameSpeed(val);
    });

    // =========================
    // ZOOM SLIDER
    // =========================

    const sliderZoom =
        document.getElementById('slider-zoom');

    const valZoom =
        document.getElementById('val-zoom');

    updateSliderBg(sliderZoom, 0.05, 5);

    sliderZoom.addEventListener('input', (e) => {

        const val =
            parseFloat(e.target.value).toFixed(2);

        valZoom.textContent = val;

        updateSliderBg(e.target, 0.05, 5);

        setZoom(val);
    });

    // =========================
    // HITBOX SLIDER
    // =========================

    const sliderHitbox =
        document.getElementById('slider-hitbox');

    const valHitbox =
        document.getElementById('val-hitbox');

    updateSliderBg(sliderHitbox, 1, 5);

    sliderHitbox.addEventListener('input', (e) => {

        hitboxScale =
            parseFloat(e.target.value);

        valHitbox.textContent =
            hitboxScale.toFixed(2);

        updateSliderBg(e.target, 1, 5);
    });

    // =========================
    // DRAWING
    // =========================

    function draw() {

        if (
            !rt ||
            !rt.running_layout ||
            !pType ||
            !gameCanvas
        ) {

            requestAnimationFrame(draw);
            return;
        }

        let self = null;
        let min_d = Infinity;

        for (const p of pType.instances) {

            const d = Math.hypot(
                p.x - rt.running_layout.scrollX,
                p.y - rt.running_layout.scrollY
            );

            if (d < min_d) {

                min_d = d;
                self = p;
            }
        }

        ctx.clearRect(
            0,
            0,
            canvas.width,
            canvas.height
        );

        if (!self) {

            requestAnimationFrame(draw);
            return;
        }

        const rect =
            gameCanvas.getBoundingClientRect();

        const viewX =
            rect.left + rect.width / 2;

        const viewY =
            rect.top + rect.height / 2;

        const scale =
            self.layer.getScale();

        for (const p of pType.instances) {

            if (p.uid === self.uid) continue;

            const pX =
                viewX + (p.x - self.x) * scale;

            const pY =
                viewY + (p.y - self.y) * scale;

            // HITBOXES
            if (showHitboxes) {

                const radius =
                    (p.width / 2) *
                    scale *
                    hitboxScale;

                ctx.beginPath();

                ctx.arc(
                    pX,
                    pY,
                    radius,
                    0,
                    2 * Math.PI
                );

                ctx.fillStyle =
                    'rgba(255,255,0,0.3)';

                ctx.fill();

                ctx.strokeStyle = '#ffff00';
                ctx.lineWidth = 1;

                ctx.stroke();
            }

            // LINES
            if (showLines) {

                ctx.beginPath();

                ctx.moveTo(viewX, viewY);

                ctx.lineTo(pX, pY);

                ctx.strokeStyle = '#ffffff';
                ctx.lineWidth = 2;

                ctx.stroke();
            }
        }

        requestAnimationFrame(draw);
    }

    // =========================
    // GAME HOOK
    // =========================

    const waitForGame = setInterval(() => {

        const canvases =
            document.querySelectorAll('canvas');

        if (!canvases.length) return;

        gameCanvas = canvases[0];

        for (const key in window) {

            try {

                const obj = window[key];

                if (
                    obj &&
                    obj.running_layout &&
                    obj.types_by_index
                ) {

                    rt = obj;

                    for (const type of rt.types_by_index) {

                        if (
                            type &&
                            type.instances &&
                            type.instances.length
                        ) {

                            const inst =
                                type.instances[0];

                            if (
                                inst &&
                                typeof inst.x === 'number' &&
                                typeof inst.y === 'number'
                            ) {

                                pType = type;

                                clearInterval(waitForGame);

                                requestAnimationFrame(draw);

                                console.log(
                                    'Nixware loaded'
                                );

                                return;
                            }
                        }
                    }
                }

            } catch (err) {}
        }

    }, 1000);

})();