Hyper Evo Online Loader

Loader for evoworld.io cheat

スクリプトをインストールするには、Tampermonkey, GreasemonkeyViolentmonkey のような拡張機能のインストールが必要です。

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

スクリプトをインストールするには、TampermonkeyViolentmonkey のような拡張機能のインストールが必要です。

スクリプトをインストールするには、TampermonkeyUserscripts のような拡張機能のインストールが必要です。

このスクリプトをインストールするには、Tampermonkeyなどの拡張機能をインストールする必要があります。

このスクリプトをインストールするには、ユーザースクリプト管理ツールの拡張機能をインストールする必要があります。

(ユーザースクリプト管理ツールは設定済みなのでインストール!)

このスタイルをインストールするには、Stylusなどの拡張機能をインストールする必要があります。

このスタイルをインストールするには、Stylus などの拡張機能をインストールする必要があります。

このスタイルをインストールするには、Stylus tなどの拡張機能をインストールする必要があります。

このスタイルをインストールするには、ユーザースタイル管理用の拡張機能をインストールする必要があります。

このスタイルをインストールするには、ユーザースタイル管理用の拡張機能をインストールする必要があります。

このスタイルをインストールするには、ユーザースタイル管理用の拡張機能をインストールする必要があります。

(ユーザースタイル管理ツールは設定済みなのでインストール!)

このスクリプトの質問や評価の投稿はこちら通報はこちらへお寄せください
// ==UserScript==
// @name         Hyper Evo Online Loader
// @namespace    http://tampermonkey.net/
// @version      1.0.1
// @description  Loader for evoworld.io cheat
// @author       YoMino
// @license MIT
// @match        https://evoworld.io/
// @grant        GM_xmlhttpRequest
// @connect      raw.githubusercontent.com
// @run-at       document-idle
// ==/UserScript==

(function () {
    'use strict';

    const CONFIG = {
        enabled: true,
        remoteScriptUrl: 'https://raw.githubusercontent.com/danneagudan08-cmd/Script-Config/refs/heads/main/NEWloader.js',
        loadRemoteScript: true,
        debug: true
    };

    function log(...args) {
        if (CONFIG.debug) console.log('[HyperEvo Offline]', ...args);
    }

    function warn(...args) {
        console.warn('[HyperEvo Offline]', ...args);
    }

    function error(...args) {
        console.error('[HyperEvo Offline]', ...args);
    }

    function waitForGame(timeoutMs = 15000) {
        return new Promise((resolve, reject) => {
            const start = Date.now();

            const timer = setInterval(() => {
                if (window.game) {
                    clearInterval(timer);
                    resolve(window.game);
                    return;
                }

                if (Date.now() - start > timeoutMs) {
                    clearInterval(timer);
                    reject(new Error('window.game non trovato.'));
                }
            }, 250);
        });
    }

    function loadRemoteScript(url) {
        return new Promise((resolve, reject) => {
            if (!url || !/^https:\/\/raw\.githubusercontent\.com\//.test(url)) {
                reject(new Error('URL remoto non valido.'));
                return;
            }

            GM_xmlhttpRequest({
                method: 'GET',
                url,
                timeout: 15000,

                onload(res) {
                    if (res.status < 200 || res.status >= 300) {
                        reject(new Error('HTTP ' + res.status));
                        return;
                    }

                    const code = String(res.responseText || '');

                    if (!code.trim()) {
                        reject(new Error('Script remoto vuoto.'));
                        return;
                    }

                    try {
                        const script = document.createElement('script');
                        script.textContent = `
                            try {
                                ${code}
                            } catch (e) {
                                console.error('[Remote Script Error]', e);
                            }
                        `;
                        document.documentElement.appendChild(script);
                        script.remove();
                        resolve();
                    } catch (e) {
                        reject(e);
                    }
                },

                onerror() {
                    reject(new Error('Errore rete.'));
                },

                ontimeout() {
                    reject(new Error('Timeout.'));
                }
            });
        });
    }

    function installDebugTools() {
        window.HyperEvoDebug = {
            getGame() {
                return window.game || null;
            },

            getMe() {
                return window.game && window.game.me ? window.game.me : null;
            },

            printMe() {
                const me = this.getMe();
                console.log('[HyperEvoDebug me]', me);
                return me;
            },

            isReady() {
                return !!(window.game && window.game.me);
            }
        };

        log('Debug tools installati.');
    }

    async function main() {
        if (!CONFIG.enabled) return;

        installDebugTools();

        try {
            await waitForGame();
            log('Game trovato:', window.game);
        } catch (e) {
            warn(e.message);
        }

        if (CONFIG.loadRemoteScript) {
            try {
                await loadRemoteScript(CONFIG.remoteScriptUrl);
                log('Script remoto caricato.');
            } catch (e) {
                error('Errore caricamento script remoto:', e);
            }
        }
    }

    main();
})();