Minefun.io Speed & Fly Power-up

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

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Greasemonkey lub Violentmonkey.

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

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Violentmonkey.

Aby zainstalować ten skrypt, wymagana będzie instalacja rozszerzenia Tampermonkey lub Userscripts.

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

Aby zainstalować ten skrypt, musisz zainstalować rozszerzenie menedżera skryptów użytkownika.

(Mam już menedżera skryptów użytkownika, pozwól mi to zainstalować!)

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.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Musisz zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

(Mam już menedżera stylów użytkownika, pozwól mi to zainstalować!)

// ==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);

})();