Minefun Aimbot

1 ▲

คุณจะต้องติดตั้งส่วนขยาย เช่น Tampermonkey, Greasemonkey หรือ Violentmonkey เพื่อติดตั้งสคริปต์นี้

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

คุณจะต้องติดตั้งส่วนขยาย เช่น Tampermonkey หรือ Violentmonkey เพื่อติดตั้งสคริปต์นี้

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

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

You will need to install a user script manager extension to install this script.

(I already have a user script manager, let me install it!)

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.

(I already have a user style manager, let me install it!)

// ==UserScript==
// @name         Minefun Aimbot
// @namespace    http://tampermonkey.net/
// @version      1.4
// @description   1 ▲
// @author       Aбоба2
// @match        *://minefun.io/*
// @grant        none
// @run-at       document-end
// ==/UserScript==

(function() {
    'use strict';

    let aimbotEnabled = false;

    // ▲ НАСТРОЙКИ ▲
    const settings = {
        // Мы поставили -0.4. В Minefun это уровень между животом и грудью.
        // Если хочешь еще ниже, поставь -0.6.
        yOffset: -0.4,
        onAim: true,  // ПКМ
        onShoot: true // ЛКМ
    };

    // Исправленная функция дистанции (без крестиков)
    const calculateDistance = (e, t) => {
        if (!e || !t) return Infinity;
        return Math.sqrt(Math.pow(t.x - e.x, 2) + Math.pow(t.y - e.y, 2) + Math.pow(t.z - e.z, 2));
    };

    const getHooks = () => {
        try {
            const app = window.app || document.querySelector('#app')?.__vue_app__;
            const provides = app?._context?.provides || app?._vnode?.component?.appContext?.provides;
            const symbols = Object.getOwnPropertySymbols(provides);
            const storeSymbol = symbols.find(s => provides[s] && provides[s]._s);
            if (!storeSymbol) return null;
            const store = provides[storeSymbol]._s;
            const world = store.get("gameState")?.gameWorld;
            return { player: world?.player, server: world?.server };
        } catch (e) { return null; }
    };

    function getClosestEnemy(player, players) {
        let target = null;
        let minDistance = Infinity;
        players.forEach((p) => {
            const model = p._model || p.model;
            if (model && model.position && p.isAlive && p !== player) {
                let dist = calculateDistance(player.position, model.position);
                if (dist < minDistance) {
                    minDistance = dist;
                    target = p;
                }
            }
        });
        return target;
    }

    function runAimbot() {
        if (!aimbotEnabled) return;

        const h = getHooks();
        if (!h || !h.player || !h.server) return;

        const player = h.player;
        const players = h.server.players;

        const isAiming = player.inputs.rightMB && settings.onAim;
        const isShooting = player.inputs.leftMB && settings.onShoot;

        if (isAiming || isShooting) {
            const target = getClosestEnemy(player, players);
            if (target) {
                const tPos = (target._model || target.model).position;
                const pPos = player.position;

                const dx = tPos.x - pPos.x;
                const dz = tPos.z - pPos.z;
                const angleY = Math.atan2(dx, dz);

                const distH = Math.sqrt(dx * dx + dz * dz);
                // Применяем yOffset для наводки в живот
                const distV = (tPos.y + settings.yOffset) - pPos.y;
                let angleX = Math.atan2(distV, distH);

                angleX = Math.max(Math.min(angleX, Math.PI / 2), -Math.PI / 2);

                player.rotation.y = (angleY + Math.PI) % (2 * Math.PI);
                player.rotation.x = angleX;
            }
        }
    }

    // ▲ МАЛЕНЬКОЕ УВЕДОМЛЕНИЕ ▲
    function showNotify(state) {
        let el = document.getElementById('mb-aim-notif');
        if (!el) {
            el = document.createElement('div');
            el.id = 'mb-aim-notif';
            el.style = "position:fixed; bottom:15px; left:15px; padding:5px 12px; background:rgba(0,0,0,0.8); border:1px solid #40beff; color:white; font-family:sans-serif; font-size:12px; z-index:10001; border-radius:15px; transition:0.3s; opacity:0;";
            document.body.appendChild(el);
        }
        el.innerHTML = `AIMBOT: ${state ? '<span style="color:#40beff">ВКЛ</span>' : '<span style="color:#ff4444">ВЫКЛ</span>'}`;
        el.style.opacity = "1";
        setTimeout(() => { if(el) el.style.opacity = "0"; }, 2000);
    }

    window.addEventListener('keydown', (e) => {
        if (e.code === 'Digit1') {
            aimbotEnabled = !aimbotEnabled;
            showNotify(aimbotEnabled);
        }
    });

    setInterval(runAimbot, 16);

})();