Minefun.io Speed & Fly Power-up

Tăng tốc độ chạy x10 và chế độ bay cho minefun.io

K instalaci tototo skriptu si budete muset nainstalovat rozšíření jako Tampermonkey, Greasemonkey nebo Violentmonkey.

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

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Violentmonkey.

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Userscripts.

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

K instalaci tohoto skriptu si budete muset nainstalovat manažer uživatelských skriptů.

(Už mám manažer uživatelských skriptů, nechte mě ho nainstalovat!)

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.

(Už mám manažer uživatelských stylů, nechte mě ho nainstalovat!)

// ==UserScript==
// @name         Minefun.io Speed & Fly Power-up
// @namespace    http://tampermonkey.net/
// @version      1.0
// @description  Tăng tốc độ chạy x10 và chế độ bay cho minefun.io
// @author       Gemini
// @match        *://minefun.io/*
// @grant        none
// ==/UserScript==

(function() {
    'use strict';

    // Cấu hình thông số
    const settings = {
        speedMultiplier: 10,
        flySpeed: 0.5,
        speedEnabled: false,
        flyEnabled: false
    };

    // Thông báo trạng thái
    const notify = (msg) => {
        console.log(`[Script]: ${msg}`);
        // Bạn có thể thêm alert hoặc UI ở đây nếu muốn
    };

    // Xử lý phím tắt
    window.addEventListener('keydown', (e) => {
        // Nhấn phím 'V' để bật/tắt Speed
        if (e.key.toLowerCase() === 'v') {
            settings.speedEnabled = !settings.speedEnabled;
            notify("Speed x10: " + (settings.speedEnabled ? "BẬT" : "TẮT"));
        }

        // Nhấn phím 'F' để bật/tắt Fly
        if (e.key.toLowerCase() === 'f') {
            settings.flyEnabled = !settings.flyEnabled;
            notify("Fly Mode: " + (settings.flyEnabled ? "BẬT" : "TẮT"));
        }
    });

    // Vòng lặp can thiệp vào nhân vật (Logic mô phỏng)
    // Lưu ý: minefun.io sử dụng engine 3D, script này tác động vào tọa độ di chuyển
    setInterval(() => {
        if (typeof player === 'undefined') return;

        // Logic Speed x10
        if (settings.speedEnabled) {
            player.velocity.x *= settings.speedMultiplier;
            player.velocity.z *= settings.speedMultiplier;
        }

        // Logic Fly
        if (settings.flyEnabled) {
            player.velocity.y = 0; // Chống trọng lực
            if (keys['Space']) player.position.y += settings.flySpeed; // Bay lên
            if (keys['ShiftLeft']) player.position.y -= settings.flySpeed; // Hạ xuống
        }
    }, 10);

})();