FPS Booster for arras.io

godbye lag

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

您需要先安裝使用者腳本管理器擴充功能後才能安裝該腳本。

(我已經安裝了使用者腳本管理器,讓我安裝!)

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

// ==UserScript==
// @name         FPS Booster for arras.io
// @namespace    http://Greasyfrok.org/
// @version      0.1
// @description  godbye lag
// @author       Leo
// @match        https://arras.io/*
// @grant        none
// @license MIT
// ==/UserScript==

(function() {
    'use strict';

    // Function to apply FPS-boosting optimizations
    function applyFPSBoost() {
        // Reduce rendering quality
        let style = document.createElement('style');
        style.innerHTML = `
            canvas {
                image-rendering: pixelated !important;
            }
            .some-high-resource-class {
                display: none !important; /* Hide or optimize high-resource elements */
            }
        `;
        document.head.appendChild(style);

        // Disable unnecessary animations
        let animationStyles = document.createElement('style');
        animationStyles.innerHTML = `
            @keyframes none { from { opacity: 1; } to { opacity: 1; } }
            * {
                animation: none !important;
                transition: none !important;
            }
        `;
        document.head.appendChild(animationStyles);

        // Optionally, modify or hide specific elements that are high in resource usage
        // Example: Hide the leaderboard
        let leaderboard = document.querySelector('#leaderboard');
        if (leaderboard) {
            leaderboard.style.display = 'none';
        }

        // Adjust other game settings or DOM elements here
        console.log('FPS booster optimizations applied.');
    }

    // Apply FPS boost once the game has loaded
    window.addEventListener('load', applyFPSBoost);
})();