Greasy Fork

Greasy Fork is available in English.

Lunar Client - Crosshair, FPS Booster, and HD Quality for Fortnite on Xbox Cloud Gaming

Crosshair, FPS Booster, and HD Quality for Fortnite on Xbox Cloud Gaming (Made by ChatGPT)

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

// ==UserScript==
// @name        Lunar Client - Crosshair, FPS Booster, and HD Quality for Fortnite on Xbox Cloud Gaming
// @namespace   Violentmonkey Scripts
// @match       https://www.xbox.com/en-US/play/launch/fortnite/BT5P2X999VH2*
// @grant       none
// @version     2.5
// @author      -
// @description Crosshair, FPS Booster, and HD Quality for Fortnite on Xbox Cloud Gaming (Made by ChatGPT)
// ==/UserScript==

// Inject "Product Sans" font
function injectProductSans() {
    const link = document.createElement('link');
    link.rel = 'stylesheet';
    link.href = 'https://fonts.googleapis.com/css2?family=Product+Sans&display=swap';
    document.head.appendChild(link);
    document.body.style.fontFamily = '"Product Sans", sans-serif';
}

// Create a small, visible crosshair at the center
function createCrosshair() {
    const crosshair = document.createElement('div');
    crosshair.style.position = 'absolute';
    crosshair.style.top = '50%';
    crosshair.style.left = '50%';
    crosshair.style.transform = 'translate(-50%, -50%)';
    crosshair.style.width = '30px';
    crosshair.style.height = '30px';
    crosshair.style.border = '2px solid #FF0000';
    crosshair.style.borderRadius = '50%';
    crosshair.style.pointerEvents = 'none';
    crosshair.style.zIndex = '10000';
    document.body.appendChild(crosshair);
}

// FPS Booster function: Force GPU and browser to render at higher quality
function enableFPSBooster() {
    const meta = document.createElement('meta');
    meta.name = 'viewport';
    meta.content = 'width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no, minimal-ui';
    document.head.appendChild(meta);

    // Set the game to HD quality (This is a placeholder for actual upscaling logic)
    const hdMetaTag = document.createElement('meta');
    hdMetaTag.name = 'x-viewport-scale';
    hdMetaTag.content = 'device-width, initial-scale=1.0, maximum-scale=1.0';
    document.head.appendChild(hdMetaTag);

    // Additional FPS boosting can be done by forcing rendering optimizations
    const style = document.createElement('style');
    style.innerHTML = `
        body {
            overflow: hidden;
        }
        video {
            transform: scale(1);
            filter: brightness(1.2) contrast(1.2);
        }
    `;
    document.head.appendChild(style);
}

// Create and toggle the menu
let menuVisible = true;
const menu = document.createElement('div');
menu.style.position = 'fixed';
menu.style.top = '20px';
menu.style.right = '20px';
menu.style.backgroundColor = 'rgba(0, 0, 0, 0.7)';
menu.style.color = '#FFF';
menu.style.padding = '10px';
menu.style.fontSize = '16px';
menu.style.fontFamily = 'Product Sans, sans-serif';
menu.style.zIndex = '10001';
menu.innerHTML = 'Lunar Client Menu - Crosshair and FPS Booster';
document.body.appendChild(menu);

// Function to toggle menu visibility
function toggleMenu() {
    menuVisible = !menuVisible;
    menu.style.display = menuVisible ? 'block' : 'none';
}

// Listen for Ctrl+A keypress to toggle the menu visibility
window.addEventListener('keydown', (event) => {
    if (event.ctrlKey && event.key === 'a') {
        event.preventDefault(); // Prevent default Ctrl+A behavior
        toggleMenu();
    }
});

// Display ESP (Extra Sensory Perception) - Shows nearby players (without health info)
function drawESP(targets) {
    targets.forEach(target => {
        const espElement = document.createElement('div');
        espElement.style.position = 'absolute';
        espElement.style.top = `${target.y}px`;
        espElement.style.left = `${target.x}px`;
        espElement.style.color = '#FFFFFF';
        espElement.style.fontSize = '12px';
        espElement.style.fontFamily = 'Product Sans, sans-serif';
        espElement.style.zIndex = '9999';

        espElement.innerHTML = `Name: ${target.id}`; // No health displayed
        document.body.appendChild(espElement);
    });
}

// Example of using ESP
function updateESP() {
    // Here you can fetch real player data or use placeholders
    const targets = [
        { x: 300, y: 250, id: 'Player1' },
        { x: 500, y: 400, id: 'Player2' }
    ];
    drawESP(targets);
}

// Initialize everything
function initialize() {
    injectProductSans();
    createCrosshair();
    enableFPSBooster();

    // Update ESP every second
    setInterval(updateESP, 1000);
}

// Run the initialization function when the page is loaded
window.addEventListener('load', initialize);