Minefun.io Speed & Fly Power-up

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

Dovrai installare un'estensione come Tampermonkey, Greasemonkey o Violentmonkey per installare questo script.

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

Dovrai installare un'estensione come Tampermonkey o Violentmonkey per installare questo script.

Dovrai installare un'estensione come Tampermonkey o Userscripts per installare questo script.

Dovrai installare un'estensione come ad esempio Tampermonkey per installare questo script.

Dovrai installare un gestore di script utente per installare questo script.

(Ho già un gestore di script utente, lasciamelo installare!)

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

(Ho già un gestore di stile utente, lasciamelo installare!)

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

})();