☰

Minefun Pure Speed Boost

Chỉ tăng tốc độ chạy cho nhân vật, mượt mà không lỗi block hay nhặt đồ.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

このスクリプトの質問や評価の投稿はこちら、通報はこちらへお寄せください
// ==UserScript==
// @name         Minefun Pure Speed Boost
// @namespace    http://tampermonkey.net/
// @version      3.0
// @description  Chỉ tăng tốc độ chạy cho nhân vật, mượt mà không lỗi block hay nhặt đồ.
// @author       Gemini
// @match        *://minefun.io/*
// @grant        none
// @run-at       document-start
// ==/UserScript==

(function() {
    'use strict';

    // ==========================================
    // TÙY CHỈNH TỐC ĐỘ Ở ĐÂY
    // ==========================================
    // Hệ số nhân tốc độ: 2.0 nghĩa là chạy nhanh gấp đôi. 
    // MẸO ĐỂ KHÔNG BỊ GIẬT (Rubber-band): Đừng để số này quá to (ví dụ >4). 
    // Nếu để quá nhanh, máy chủ (Server) sẽ phát hiện bạn di chuyển lỗi và liên tục kéo bạn giật lùi lại.
    const SPEED_MULTIPLIER = 2.5; 

    // Biến để tránh việc hack bị chạy lặp lại nhiều lần gây lỗi
    let isSpeedBoosted = false;

    // Kỹ thuật "Hook" (Móc) vào các hàm tạo Object của game để tìm nhân vật
    const originalDefineProperty = Object.defineProperty;
    
    Object.defineProperty = function(obj, prop, descriptor) {
        // Tìm các thuộc tính kiểm soát tốc độ di chuyển thường dùng trong game .io
        const speedProperties = ['speed', 'walkSpeed', 'moveSpeed', 'movementSpeed', 'runSpeed', 'velocity'];
        
        if (speedProperties.includes(prop)) {
            // Can thiệp vào getter/setter của thuộc tính tốc độ
            if (descriptor.value !== undefined && typeof descriptor.value === 'number') {
                descriptor.value = descriptor.value * SPEED_MULTIPLIER;
            } else if (descriptor.set) {
                const originalSet = descriptor.set;
                descriptor.set = function(val) {
                    if (typeof val === 'number' && val > 0) {
                        originalSet.call(this, val * SPEED_MULTIPLIER);
                    } else {
                        originalSet.call(this, val);
                    }
                };
            }
        }
        return originalDefineProperty.apply(this, arguments);
    };

    // Vòng lặp dự phòng: Tìm kiếm nhân vật trực tiếp trên window nếu game lưu công khai
    const findAndBoostPlayer = setInterval(() => {
        if (isSpeedBoosted) return;

        // Quét các biến toàn cục phổ biến chứa dữ liệu người chơi
        const playerObj = window.player || (window.game && window.game.player) || (window.network && window.network.player);
        
        if (playerObj) {
            // Thay đổi trực tiếp các chỉ số nếu tìm thấy
            if (playerObj.speed !== undefined) { playerObj.speed *= SPEED_MULTIPLIER; isSpeedBoosted = true; }
            else if (playerObj.walkSpeed !== undefined) { playerObj.walkSpeed *= SPEED_MULTIPLIER; isSpeedBoosted = true; }
            else if (playerObj.moveSpeed !== undefined) { playerObj.moveSpeed *= SPEED_MULTIPLIER; isSpeedBoosted = true; }
            
            if (isSpeedBoosted) {
                console.log("%c[Minefun Script] Đã kích hoạt Boost Speed thành công!", "color: #00ff00; font-size: 16px; font-weight: bold;");
                clearInterval(findAndBoostPlayer); // Tắt vòng lặp khi đã tìm thấy để tối ưu RAM
            }
        }
    }, 1000);

})();