Greasy Fork

Greasy Fork is available in English.

Xbox Cloud Gaming Aimbot (Fortnite)

Aim Assist for ViolentMonkey and Xbox Cloud Gaming

当前为 2024-11-17 提交的版本,查看 最新版本

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

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

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

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

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

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

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

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

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

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

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

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

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

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

// ==UserScript==
// @name         Xbox Cloud Gaming Aimbot (Fortnite)
// @version      0.3
// @description  Aim Assist for ViolentMonkey and Xbox Cloud Gaming
// @author       yeebus
// @match        *://*/*
// @icon         https://www.google.com/s2/favicons?sz=64&domain=tampermonkey.net
// @grant        none
// @namespace ViolentMonkey Scripts
// ==/UserScript==

const robot = require('robotjs');
const keyboard = require('keyboard');

let aimbotEnabled = false;
let aiming = false;

function aimAtTarget() {
    if (aimbotEnabled && !aiming) {
        aiming = true;
        // Get the current mouse position
        const mousePos = robot.getMousePos();

        // Find the target by scanning a certain area around the mouse
        const target = findTarget(mousePos.x, mousePos.y, 100);

        if (target) {
            // Move the mouse to the target
            robot.moveMouse(target.x, target.y);
            // Press and hold the 'v' key
            robot.keyToggle('v', 'down');
            // Simulate the 'l' key press
            robot.keyToggle('l', 'down', 50);
            robot.keyToggle('l', 'up', 50);
            // Release the 'v' key
            robot.keyToggle('v', 'up');
        }

        aiming = false;
    }
}

function findTarget(x, y, range) {
    // Scan a square area around the given coordinates
    for (let i = x - range; i <= x + range; i++) {
        for (let j = y - range; j <= y + range; j++) {
            // Get the color of the pixel at (i, j)
            const color = robot.getPixelColor(i, j);

            // Check if the color matches the target color
            if (isTargetColor(color)) {
                return { x: i, y: j };
            }
        }
    }

    return null;
}

function isTargetColor(color) {
    // Define the target color based on your game
    const targetColor = '00FF00'; // Example: Green color
    return color.toUpperCase() === targetColor.toUpperCase();
}

function aimbotOn() {
    if (!aimbotEnabled) {
        aimbotEnabled = true;
        aimAtTarget();
    }
}

function aimbotOff() {
    if (aimbotEnabled) {
        aimbotEnabled = false;
        robot.keyToggle('v', 'up');
        robot.keyToggle('l', 'up');
    }
}

function aimbotOnAl() {
    if (!aimbotEnabled) {
        aimbotEnabled = true;
        aimAtTarget();
    }
}

keyboard.on('v+l', aimbotOn);
keyboard.on('a+l', aimbotOnAl);
keyboard.on('z', aimbotOff);