EvoWorld.io Zoom Hack

Zoom hack for evoworld.io (flyordie.io)

Bu betiği kurabilmeniz için Tampermonkey, Greasemonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

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

Bu betiği kurabilmeniz için Tampermonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği kurabilmeniz için Tampermonkey ya da Userscripts gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği indirebilmeniz için ayrıca Tampermonkey gibi bir eklenti kurmanız gerekmektedir.

Bu komut dosyasını yüklemek için bir kullanıcı komut dosyası yöneticisi uzantısı yüklemeniz gerekecek.

(Zaten bir kullanıcı komut dosyası yöneticim var, kurmama izin verin!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(Zateb bir user-style yöneticim var, yükleyeyim!)

// ==UserScript==
// @name         EvoWorld.io Zoom Hack
// @namespace    evoezsquad
// @version      1.1
// @description  Zoom hack for evoworld.io (flyordie.io)
// @author       evoezsquad
// @match        https://evoworld.io/*
// @match        https://flyordie.io/*
// @icon         https://www.google.com/s2/favicons?sz=64&domain=evoworld.io
// @grant        none
// @license      MIT
// ==/UserScript==

(function() {
    'use strict';

    window.customZoom = 1.0;

    function init() {
        if (typeof Engine === 'undefined' || typeof game === 'undefined' || !game) {
            setTimeout(init, 100);
            return;
        }

        try {
            Object.defineProperty(game, 'zoom', {
                get: function() {
                    return window.customZoom;
                },
                set: function(v) {},
                configurable: true
            });
        } catch (e) {}

        Engine.prototype.setZoom = function(t) {
            this.zoom = window.customZoom;
            this.staticCanvasRenderOffset.restX = 0;
            this.staticCanvasRenderOffset.restY = 0;
            this.staticCanvasRenderOffset.x = 0;
            this.staticCanvasRenderOffset.y = 0;
            this.staticCanvasRenderPosition.x = 0;
            this.staticCanvasRenderPosition.y = 0;

            if (this.context) {
                this.context.save();
                this.context.fillStyle = "rgba(0,0,0,1)";
                this.context.fillRect(0, 0, this.canvas.width, this.canvas.height);
                this.context.restore();
            }
            this.clearStaticObjects();
        };

        window.open('https://t.me/evoezsquad', '_blank');
        menu();
    }

    function menu() {
        if (document.getElementById('z-ui')) return;

        const u = document.createElement('div');
        u.id = 'z-ui';
        u.style.cssText = 'position:fixed;top:10px;left:10px;width:180px;background:rgba(0,0,0,0.9);border:1px solid #555;padding:10px;color:#fff;z-index:999999;font-family:monospace;text-align:center;user-select:none;';

        u.innerHTML = `
            <div style="font-size:11px;margin-bottom:5px;">t.me/evoezsquad</div>
            <input type="range" id="z-bar" min="0.15" max="4.30" step="0.01" value="1.0" style="width:100%;cursor:pointer;">
            <div style="margin:5px 0;font-size:16px;font-weight:bold;"><span id="z-val">1.00</span>x</div>
            <div style="font-size:10px;color:#888;">H - Hide</div>
        `;

        document.body.appendChild(u);

        const b = document.getElementById('z-bar');
        const v = document.getElementById('z-val');

        function set(n) {
            let val = parseFloat(n);
            window.customZoom = val;
            v.innerText = val.toFixed(2);
            if (window.game && game.setZoom) game.setZoom(val);
        }

        b.oninput = function() {
            set(this.value);
        };

        window.addEventListener('wheel', () => {
            if (window.game) {
                setTimeout(() => {
                    b.value = window.customZoom;
                    v.innerText = window.customZoom.toFixed(2);
                }, 1);
            }
        }, { passive: true });

        window.addEventListener('keydown', (e) => {
            if (e.code === 'KeyH' && document.activeElement.tagName !== 'INPUT') {
                u.style.display = u.style.display === 'none' ? 'block' : 'none';
            }
        });
    }

    init();
})();