72 spee hack

Speed hack for dynast.io

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

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

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

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

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

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

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

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

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

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

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

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

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

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

このスクリプトの質問や評価の投稿はこちら通報はこちらへお寄せください
// ==UserScript==
// @name 72 spee hack
// @namespace http://tampermonkey.net/
// @version 71
// @description Speed hack for dynast.io
// @author :(
// @match https://dynast.io/*
// @match https://nightly.dynast.cloud/*
// @match https://stable.dynast.cloud/
// @icon none
// @grant none
// ==/UserScript==
(function() {
    'use strict';

    // TimeMachine: Increase game speed when picking up items
    let speed = 1;
    function setTimeSpeed(multiplier) {
        speed = multiplier;
    }

    // Override performance.now for TimeMachine
    let lastPNow = performance.now();
    let pNowOffset = 0;
    window.performance.now = new Proxy(window.performance.now, {
        apply: function(target, thisArg, argList) {
            const time = Reflect.apply(target, thisArg, argList);
            pNowOffset += (time - lastPNow) * (speed - 1);
            lastPNow = time;
            return time + pNowOffset;
        }
    });

    // Override Date.now
    let lastD = Date.now();
    let dOffset = 0;
    window.Date.now = new Proxy(window.Date.now, {
        apply: function(target, thisArg, argList) {
            const time = Reflect.apply(target, thisArg, argList);
            dOffset += (time - lastD) * (speed - 1);
            lastD = time;
            return Math.floor(time + dOffset);
        }
    });

    // Override requestAnimationFrame
    let lastRAF = performance.now();
    let rAFOffset = 0;
    window.requestAnimationFrame = new Proxy(window.requestAnimationFrame, {
        apply: function(target, thisArg, argList) {
            if (typeof argList[0] === "function") {
                argList[0] = new Proxy(argList[0], {
                    apply: function(target2, thisArg2, argList2) {
                        const time = argList2[0];
                        rAFOffset += (time - lastRAF) * (speed - 1);
                        lastRAF = time;
                        argList2[0] = time + rAFOffset;
                        return Reflect.apply(target2, thisArg2, argList2);
                    }
                });
            }
            return Reflect.apply(target, thisArg, argList);
        }
    });

    // Speed settings
    let speedIncrease = 250; // Óñêîðåíèå äëÿ ïðîáåëà

    // Dynast.io AutoEEE
    window.autoEKey = " "; // Ïðîáåë äëÿ AutoE
    window.autoResetKey = "r";
    let pickingUpItem = false;
    let ePressInterval;
    let ePressCount = 0;

    // Start AutoEEE
    function startAutoE() {
        if (!ePressInterval) {
            ePressInterval = setInterval(() => {
                const KeyISdown = new KeyboardEvent('keydown', { key: ' ', keyCode: 69, code: 'KeyE' });
                const KeyISup = new KeyboardEvent('keyup', { key: ' ', keyCode: 69, code: 'KeyE' });
                window.dispatchEvent(KeyISdown);
                window.dispatchEvent(KeyISup);
                ePressCount++;
            }, 1); // Run every 1ms
        }
    }

    // Stop AutoEEE
    function stopAutoE() {
        clearInterval(ePressInterval);
        ePressInterval = null;
    }

    // Notification function
    function createNotification(message) {
        const notification = document.createElement("div");
        notification.className = 'notification-message';
        notification.style.cssText = `
            position: fixed;
            right: 20px;
            background: rgba(0, 0, 0, 0.7);
            color: white;
            padding: 8px 15px;
            border-radius: 4px;
            z-index: 10001;
            font-family: 'Poppins', sans-serif;
            font-size: 14px;
            transform: translateX(120%);
            transition: all 0.3s ease-out;
            backdrop-filter: blur(5px);
            border: 1px solid rgba(255, 255, 255, 0.1);
            user-select: none;
            pointer-events: none;
            white-space: nowrap;
        `;
        notification.textContent = message;
        activeNotifications.push({
            id: notificationId++,
            element: notification
        });
        updateNotificationPositions();
        document.body.appendChild(notification);
        setTimeout(() => {
            notification.style.transform = 'translateX(0)';
        }, 50);
        setTimeout(() => {
            notification.style.transform = 'translateX(120%)';
            setTimeout(() => {
                notification.remove();
                activeNotifications = activeNotifications.filter(n => n.id !== notification.id);
                updateNotificationPositions();
            }, 300);
        }, 2000);
    }

    // Update notification positions
    let activeNotifications = [];
    let notificationId = 0;
    function updateNotificationPositions() {
        activeNotifications.forEach((notification, index) => {
            const bottom = 20 + (index * 45);
            notification.element.style.bottom = `${bottom}px`;
        });
    }

    // AutoE status panel
    let espContainer = document.createElement('div');
    espContainer.id = 'espContainer';
    espContainer.style.position = 'absolute';
    espContainer.style.top = '20px';
    espContainer.style.left = '20px';
    espContainer.style.zIndex = '9999';
    document.body.appendChild(espContainer);
    const statusDiv = document.createElement('div');
    statusDiv.textContent = "";
    statusDiv.style.position = 'absolute';
    statusDiv.style.color = 'white';
    statusDiv.style.fontSize = '15px';
    statusDiv.style.left = '815px';
    statusDiv.style.top = '180px';
    espContainer.appendChild(statusDiv);

    // Right-click handler for AutoSwap (áåç óñêîðåíèÿ)
    document.addEventListener("mousedown", function(event) {
        if (event.button === 2) {
            pickingUpItem = true;
            isXPressed = true;
            if (autoSwapEnabled) {
                performXActions(); // Òîëüêî Auto Swap, áåç óñêîðåíèÿ
            }
            statusDiv.style.color = 'white';
            statusDiv.textContent = "";
        }
    });

    document.addEventListener("mouseup", function(event) {
        if (event.button === 2) {
            pickingUpItem = false;
            isXPressed = false;
            statusDiv.style.color = 'white';
            statusDiv.textContent = "";
        }
    });

    // Spacebar handler for AutoE (ñ óñêîðåíèåì)
    document.addEventListener("keydown", function(event) {
        if (event.key === " ") {
            pickingUpItem = true;
            setTimeSpeed(speedIncrease); // Óñêîðåíèå íà ïðîáåë
            startAutoE();
            statusDiv.style.color = 'white';
            statusDiv.textContent = "";
        }
    });

    document.addEventListener("keyup", function(event) {
        if (event.key === " ") {
            pickingUpItem = false;
            setTimeSpeed(0.7); // Ñáðîñ ñêîðîñòè
            stopAutoE();
            statusDiv.style.color = 'white';
            statusDiv.textContent = "";
        }
    });

    // Prevent context menu
    document.addEventListener('contextmenu', (event) => {
        event.preventDefault();
    });

    // Reset data on 'r' key
    function clearData() {
        localStorage.clear();
        sessionStorage.clear();
    }

    document.addEventListener("keydown", (event) => {
        if (event.key === window.autoResetKey) {
            createNotification("Reset");
            clearData();
        }
    });

    // ==================== AUTO LEAVE ====================
    let autoLeaveEnabled = false;
    const packetsToSend = 2;
    let ws;
    let isConnected = false;

    // Èíèöèàëèçàöèÿ WebSocket
    const OriginalWebSocket = window.WebSocket;
    window.WebSocket = function(url, protocols) {
        ws = new OriginalWebSocket(url, protocols);
        ws.onopen = () => {
            isConnected = true;
        };
        ws.onerror = () => {};
        ws.onclose = () => {
            isConnected = false;
        };
        return ws;
    };

    // Ñîçäàíèå ôåéêîâîãî ïàêåòà
    function createFakePacket() {
        const buffer = new ArrayBuffer(20);
        const view = new DataView(buffer);
        for (let i = 0; i < 20; i++) {
            view.setUint8(i, Math.floor(Math.random() * 256));
        }
        return buffer;
    }

    // Ôóíêöèÿ âûõîäà
    function triggerAutoLeave() {
        if (!autoLeaveEnabled || !ws || !isConnected) return;
        for (let i = 0; i < packetsToSend; i++) {
            ws.send(createFakePacket());
        }
        createNotification("Auto Leave àêòèâèðîâàí");
    }

    // ==================== AUTO GH ====================
    let autoGHEnabled = false;
    let isFPressed = false;
    const delay = ms => new Promise(resolve => setTimeout(resolve, ms));
    let cursorX = 0;
    let cursorY = 0;

    document.addEventListener("mousemove", (event) => {
        cursorX = event.clientX;
        cursorY = event.clientY;
    });

    function pressKey(key, code, keyCode) {
        const eventOptions = {
            key,
            code,
            keyCode,
            which: keyCode,
            bubbles: true,
            cancelable: true
        };
        window.dispatchEvent(new KeyboardEvent("keydown", eventOptions));
        window.dispatchEvent(new KeyboardEvent("keyup", eventOptions));
    }

    async function clickAtCursor() {
        const element = document.elementFromPoint(cursorX, cursorY);
        if (!element || element.closest(".menu, .ui, .disabled")) {
            console.warn("Ýëåìåíò íåäîñòóïåí èëè çàáëîêèðîâàí!");
            return;
        }
        const eventOptions = {
            bubbles: true,
            cancelable: true,
            button: 0,
            clientX: cursorX,
            clientY: cursorY
        };
        element.dispatchEvent(new MouseEvent("mousedown", eventOptions));
        await delay(54);
        element.dispatchEvent(new MouseEvent("mouseup", eventOptions));
    }

    async function performFActions() {
        while (isFPressed && autoGHEnabled) {
            pressKey("0", "Digit0", 48);
            await delay(56);
            await clickAtCursor();
            pressKey("1", "Digit1", 49);
        }
    }

    // ==================== AUTO SWAP ====================
    let autoSwapEnabled = false;
    let isXPressed = false;
    let xActionRunning = false;

    async function performXActions() {
        if (xActionRunning || !autoSwapEnabled) return;
        xActionRunning = true;
        while (isXPressed && autoSwapEnabled) {
            pressKey("8", "Digit8", 56);
            await delay(50);
            await clickAtCursor();
            pressKey("7", "Digit7", 55);
            await delay(155);
        }
        xActionRunning = false;
    }

    // ==================== MENU ====================
    let isMenuVisible = false;

    function saveSettings() {
        localStorage.setItem("autoGHEnabled", autoGHEnabled);
        localStorage.setItem("autoSwapEnabled", autoSwapEnabled);
        localStorage.setItem("autoLeaveEnabled", autoLeaveEnabled);
    }

    function loadSettings() {
        autoGHEnabled = localStorage.getItem("autoGHEnabled") === "true";
        autoSwapEnabled = localStorage.getItem("autoSwapEnabled") === "true";
        autoLeaveEnabled = localStorage.getItem("autoLeaveEnabled") === "true";
    }

    function createMenu() {
        if (document.getElementById("customMenu")) return;
        loadSettings();
        const menu = document.createElement("div");
        menu.id = "customMenu";
        menu.style.cssText = `
            display: none;
            position: fixed;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            background: linear-gradient(135deg, #000000, #1a1a1a);
            color: white;
            padding: 30px;
            border-radius: 20px;
            z-index: 10000;
            box-shadow: 0 20px 60px rgba(0, 0, 0, 0 ?????
            font-family: 'Poppins', sans-serif;
            user-select: none;
            width: 400px;
            text-align: center;
            overflow: hidden;
        `;
        menu.innerHTML = `
            <div class="wave-container">
                <div class="wave"></div>
                <div class="wave"></div>
                <div class="wave"></div>
            </div>
            <h2 style="margin: 0 0 20px; font-size: 24px; color: #cccccc; position: relative;">72 MODE</h2>
            <div style="margin: 15px 0; text-align: left; position: relative;">
                <label class="customCheckbox">
                    <input type="checkbox" id="autoGHCheckbox" ${autoGHEnabled ? "checked" : ""}>
                    <span>Auto GH (f)</span>
                </label>
            </div>
            <div style="margin: 15px 0; text-align: left; position: relative;">
                <label class="customCheckbox">
                    <input type="checkbox" id="autoSwapCheckbox" ${autoSwapEnabled ? "checked" : ""}>
                    <span>Auto Swap (Right Click)</span>
                </label>
            </div>
            <div style="margin: 15px 0; text-align: left; position: relative;">
                <label class="customCheckbox">
                    <input type="checkbox" id="autoLeaveCheckbox" ${autoLeaveEnabled ? "checked" : ""}>
                    <span>Auto Leave (F6)</span>
                </label>
            </div>
            <button id="closeMenuButton" style="
                margin-top: 25px;
                padding: 12px 25px;
                font-size: 16px;
                background: #444444;
                border: none;
                border-radius: 8px;
                color: white;
                cursor: pointer;
                transition: background 0.3s;
                position: relative;
                z-index: 1;
            ">Çàêðûòü</button>
        `;
        const style = document.createElement("style");
        style.innerHTML = `
            @import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600&display=swap');
            * {
                user-select: none;
            }
            .wave-container {
                position: absolute;
                top: 0;
                left: 0;
                right: 0;
                bottom: 0;
                overflow: hidden;
                opacity: 0.1;
                pointer-events: none;
            }
            .wave {
                position: absolute;
                width: 200%;
                height: 200%;
                background: linear-gradient(45deg, #ffffff22, #ffffff00);
                animation: wave-animation 8s linear infinite;
                transform-origin: 50% 50%;
            }
            .wave:nth-child(2) {
                animation-delay: -2s;
                opacity: 0.5;
            }
            .wave:nth-child(3) {
                animation-delay: -4s;
                opacity: 0.3;
            }
            @keyframes wave-animation {
                0% {
                    transform: rotate(0deg) scale(1.5);
                }
                100% {
                    transform: rotate(360deg) scale(1.5);
                }
            }
            .customCheckbox {
                display: flex;
                align-items: center;
                font-size: 18px;
                color: #bbbbbb;
                cursor: pointer;
                margin-bottom: 10px;
                position: relative;
                z-index: 1;
            }
            .customCheckbox input {
                display: none;
            }
            .customCheckbox span {
                position: relative;
                padding-left: 40px;
                cursor: pointer;
            }
            .customCheckbox span:before {
                content: '';
                position: absolute;
                left: 0;
                top: 50%;
                transform: translateY(-50%);
                width: 25px;
                height: 25px;
                border: 2px solid #444444;
                border-radius: 6px;
                background: rgba(68, 68, 68, 0.2);
                transition: background 0.3s, border 0.3s;
            }
            .customCheckbox input:checked + span:before {
                background: #444444;
                border: 2px solid #666666;
            }
            .customCheckbox input:checked + span:after {
                content: '\\2713';
                position: absolute;
                left: 8px;
                top: 50%;
                transform: translateY(-50%);
                font-size: 18px;
                color: white;
            }
            button:hover {
                background: #333333;
            }
            .notification-message {
                transition: all 0.3s ease-out;
            }
        `;
        document.head.appendChild(style);
        document.body.appendChild(menu);

        // Event listeners for menu
        document.getElementById("autoGHCheckbox").addEventListener("change", (e) => {
            autoGHEnabled = e.target.checked;
            saveSettings();
            createNotification(`Auto GH ${autoGHEnabled ? "âêëþ÷åí" : "âûêëþ÷åí"}`);
        });
        document.getElementById("autoSwapCheckbox").addEventListener("change", (e) => {
            autoSwapEnabled = e.target.checked;
            saveSettings();
            createNotification(`Auto Swap ${autoSwapEnabled ? "âêëþ÷åí" : "âûêëþ÷åí"}`);
        });
        document.getElementById("autoLeaveCheckbox").addEventListener("change", (e) => {
            autoLeaveEnabled = e.target.checked;
            saveSettings();
            createNotification(`Auto Leave ${autoLeaveEnabled ? "âêëþ÷åí" : "âûêëþ÷åí"}`);
        });
        document.getElementById("closeMenuButton").addEventListener("click", toggleMenu);
    }

    function toggleMenu() {
        const menu = document.getElementById("customMenu");
        if (!menu) return;
        isMenuVisible = !isMenuVisible;
        menu.style.display = isMenuVisible ? "block" : "none";
    }

    // Key event listeners
    document.addEventListener("keydown", async (event) => {
        if (event.key === "F4") {
            toggleMenu();
        }
        if ((event.key === "f" || event.key === "F") && !isFPressed && autoGHEnabled) {
            isFPressed = true;
            performFActions();
        }
        if (event.key === "F6" && autoLeaveEnabled) {
            triggerAutoLeave();
        }
    });

    document.addEventListener("keyup", function(event) {
        if (event.key === "f" || event.key === "F") {
            isFPressed = false;
        }
    });

    // Initialize menu
    createMenu();

    // Çàãëóøêè äëÿ íåîïðåäåë¸ííûõ ôóíêöèé
    function hX3() {
        // Ïóñòàÿ ôóíêöèÿ, ÷òîáû èçáåæàòü îøèáîê
    }

    function zetaXProcessor() {
        // Ïóñòàÿ ôóíêöèÿ, ÷òîáû èçáåæàòü îøèáîê
    }
})();