Greasy Fork

Greasy Fork is available in English.

Fortnite Xbox Cloud Aim Assist with Full Features and Custom Options

Fully featured Fortnite aimbot with ESP, FOV control, auto-shoot, and more.

当前为 2024-12-13 提交的版本,查看 最新版本

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Greasemonkey 油猴子Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Userscripts ,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

// ==UserScript==
// @name         Fortnite Xbox Cloud Aim Assist with Full Features and Custom Options
// @namespace    http://tampermonkey.net/
// @version      28
// @description  Fully featured Fortnite aimbot with ESP, FOV control, auto-shoot, and more.
// @author       Your Name
// @match        https://www.xbox.com/en-US/play/launch/fortnite/BT5P2X999VH2
// @grant        none
// ==/UserScript==

(function () {
    'use strict';

    // Configuration for the aimbot and ESP
    const config = {
        enemySelector: '.enemy-class', // Placeholder for enemy class
        playerSelector: '.PlayerInfo-module__container___ROgVL', // Placeholder for player class
        aimInterval: 100, // Interval in milliseconds for aim checks
        aimSmoothing: 0.2, // Smoothing factor for more natural aim adjustments
        fov: 60, // Field of View for the aimbot in degrees
        fovRadius: 100, // Radius of the FOV circle (in pixels)
        fovEnabled: true, // Whether FOV is enabled
        enableESP: false, // Flag to enable or disable ESP
        enableAimbot: true, // Flag to enable or disable aimbot
        autoShoot: false, // Flag to enable auto-shoot when aiming
        distanceLimit: 500, // Max aiming distance (in pixels)
        aimSpeed: 0.2, // Speed of the aimbot's aiming
    };

    // Add GUI overlay to control FOV, sensitivity, ESP, etc.
    const guiStyle = `
        position: fixed;
        top: 10px;
        left: 10px;
        background: rgba(0, 0, 0, 0.7);
        color: white;
        padding: 10px;
        border-radius: 10px;
        z-index: 1000;
    `;
    const buttonStyle = `
        background: #4CAF50;
        border: none;
        color: white;
        padding: 5px 10px;
        text-align: center;
        text-decoration: none;
        display: inline-block;
        font-size: 12px;
        cursor: pointer;
        margin: 5px;
    `;
    const sliderStyle = `
        margin: 5px 0;
    `;

    // Create GUI elements
    const gui = document.createElement('div');
    gui.style.cssText = guiStyle;

    // FOV Slider
    const fovLabel = document.createElement('label');
    fovLabel.innerText = 'FOV: ';
    const fovSlider = document.createElement('input');
    fovSlider.type = 'range';
    fovSlider.min = 20;
    fovSlider.max = 180;
    fovSlider.value = config.fov;
    fovSlider.style.cssText = sliderStyle;
    fovSlider.addEventListener('input', () => {
        config.fov = fovSlider.value;
        fovValue.innerText = `${config.fov}°`;
        config.fovRadius = (config.fov / 180) * window.innerWidth * 0.3; // Dynamically adjust the FOV circle size
        updateFovCircle();
    });
    const fovValue = document.createElement('span');
    fovValue.innerText = `${config.fov}°`;

    // Smoothing Slider
    const smoothingLabel = document.createElement('label');
    smoothingLabel.innerText = 'Aim Smoothing: ';
    const smoothingSlider = document.createElement('input');
    smoothingSlider.type = 'range';
    smoothingSlider.min = 0;
    smoothingSlider.max = 1;
    smoothingSlider.step = 0.05;
    smoothingSlider.value = config.aimSmoothing;
    smoothingSlider.style.cssText = sliderStyle;
    smoothingSlider.addEventListener('input', () => {
        config.aimSmoothing = smoothingSlider.value;
        smoothingValue.innerText = config.aimSmoothing;
    });
    const smoothingValue = document.createElement('span');
    smoothingValue.innerText = config.aimSmoothing;

    // ESP Toggle Button
    const espButton = document.createElement('button');
    espButton.innerText = 'Toggle ESP';
    espButton.style.cssText = buttonStyle;
    espButton.addEventListener('click', () => {
        config.enableESP = !config.enableESP;
        espButton.innerText = config.enableESP ? 'Disable ESP' : 'Enable ESP';
    });

    // Aimbot Toggle Button
    const aimbotButton = document.createElement('button');
    aimbotButton.innerText = 'Disable Aimbot';
    aimbotButton.style.cssText = buttonStyle;
    aimbotButton.addEventListener('click', () => {
        config.enableAimbot = !config.enableAimbot;
        aimbotButton.innerText = config.enableAimbot ? 'Disable Aimbot' : 'Enable Aimbot';
    });

    // Auto-Shoot Toggle Button
    const autoShootButton = document.createElement('button');
    autoShootButton.innerText = 'Enable Auto-Shoot';
    autoShootButton.style.cssText = buttonStyle;
    autoShootButton.addEventListener('click', () => {
        config.autoShoot = !config.autoShoot;
        autoShootButton.innerText = config.autoShoot ? 'Disable Auto-Shoot' : 'Enable Auto-Shoot';
    });

    // FOV Toggle Button
    const fovButton = document.createElement('button');
    fovButton.innerText = 'Disable FOV';
    fovButton.style.cssText = buttonStyle;
    fovButton.addEventListener('click', () => {
        config.fovEnabled = !config.fovEnabled;
        fovButton.innerText = config.fovEnabled ? 'Disable FOV' : 'Enable FOV';
        if (!config.fovEnabled) {
            fovCircle.style.display = 'none';
        } else {
            fovCircle.style.display = 'block';
        }
    });

    // Append elements to the GUI
    gui.appendChild(fovLabel);
    gui.appendChild(fovSlider);
    gui.appendChild(fovValue);
    gui.appendChild(document.createElement('br'));
    gui.appendChild(smoothingLabel);
    gui.appendChild(smoothingSlider);
    gui.appendChild(smoothingValue);
    gui.appendChild(document.createElement('br'));
    gui.appendChild(espButton);
    gui.appendChild(aimbotButton);
    gui.appendChild(autoShootButton);
    gui.appendChild(fovButton);

    // Add the GUI to the page
    document.body.appendChild(gui);

    // Create FOV Circle (hidden initially)
    const fovCircle = document.createElement('div');
    fovCircle.style.cssText = `
        position: fixed;
        top: 50%;
        left: 50%;
        width: ${config.fovRadius * 2}px;
        height: ${config.fovRadius * 2}px;
        border-radius: 50%;
        border: 2px solid red;
        pointer-events: none;
        transform: translate(-50%, -50%);
        opacity: 0.5;
        z-index: 999;
    `;
    document.body.appendChild(fovCircle);

    /**
     * Update the FOV Circle based on the current FOV setting
     */
    function updateFovCircle() {
        fovCircle.style.width = `${config.fovRadius * 2}px`;
        fovCircle.style.height = `${config.fovRadius * 2}px`;
    }

    /**
     * Calculate the angle between two points.
     * @param {number} targetX - Target X coordinate.
     * @param {number} targetY - Target Y coordinate.
     * @param {number} playerX - Player X coordinate.
     * @param {number} playerY - Player Y coordinate.
     * @returns {number} Angle in degrees.
     */
    function calculateAngle(targetX, targetY, playerX, playerY) {
        return Math.atan2(targetY - playerY, targetX - playerX) * (180 / Math.PI);
    }

    /**
     * Smoothly rotate the player towards the enemy.
     * @param {number} angle - The calculated angle to rotate the player.
     */
    function smoothAim(angle) {
        const player = document.querySelector(config.playerSelector);
        if (player) {
            const currentRotation = parseFloat(player.style.transform.replace('rotate(', '').replace('deg)', '')) || 0;
            const targetRotation = angle;
            const smoothedRotation = currentRotation + (targetRotation - currentRotation) * config.aimSmoothing;
            player.style.transform = `rotate(${smoothedRotation}deg)`;
        }
    }

    /**
     * Check if the enemy is within the player's Field of View (FOV).
     * @param {number} angle - The angle between the player and the enemy.
     * @returns {boolean} Whether the enemy is within the FOV.
     */
    function isWithinFov(angle) {
        return config.fovEnabled ? Math.abs(angle) <= (config.fov / 2) : true;
    }

    /**
     * Highlight enemy with a bounding box (ESP).
     * @param {HTMLElement} enemy - The enemy element to highlight.
     */
    function highlightEnemy(enemy) {
        if (config.enableESP) {
            const rect = enemy.getBoundingClientRect();
            const espBox = document.createElement('div');
            espBox.style.cssText = `
                position: absolute;
                border: 2px solid yellow;
                top: ${rect.top}px;
                left: ${rect.left}px;
                width: ${rect.width}px;
                height: ${rect.height}px;
                pointer-events: none;
                z-index: 999;
            `;
            document.body.appendChild(espBox);

            // Remove the ESP box after a short delay
            setTimeout(() => {
                espBox.remove();
            }, 100);
        }
    }

    /**
     * Auto-detect player and enemy elements in the DOM and aim at them.
     */
    function aimAtEnemies() {
        const player = document.querySelector(config.playerSelector);
        const enemies = document.querySelectorAll(config.enemySelector);

        if (!player || enemies.length === 0) {
            console.warn('Player or enemies not found.');
            return;
        }

        enemies.forEach((enemy) => {
            const enemyRect = enemy.getBoundingClientRect();
            const playerRect = player.getBoundingClientRect();

            const enemyX = enemyRect.x + enemyRect.width / 2;
            const enemyY = enemyRect.y + enemyRect.height / 2;
            const playerX = playerRect.x + playerRect.width / 2;
            const playerY = playerRect.y + playerRect.height / 2;

            const angle = calculateAngle(enemyX, enemyY, playerX, playerY);

            // If the enemy is within the FOV and distance limit
            if (isWithinFov(angle)) {
                smoothAim(angle);
                if (config.autoShoot) {
                    // Simulate shooting (this could trigger an event like mouse click)
                    console.log('Auto-shooting at enemy!');
                }
                if (config.enableESP) {
                    highlightEnemy(enemy);
                }
            }
        });
    }

    /**
     * Initialize the aimbot functionality.
     */
    function initializeAimAssist() {
        console.log('Aim Assist Initialized');
        setInterval(() => {
            if (config.enableAimbot) {
                aimAtEnemies();
            }
        }, config.aimInterval);
    }

    // Start the aimbot script
    initializeAimAssist();
})();