Shellshockers.io Performance Booster and fps cap

Reduce lag and cap FPS in Shellshockers.io (Real 100% +editable fps) pls rate.

Tính đến 08-01-2025. Xem phiên bản mới nhất.

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

Bạn sẽ cần cài đặt một tiện ích mở rộng như Tampermonkey hoặc Violentmonkey để cài đặt kịch bản này.

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

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.

(Tôi đã có Trình quản lý tập lệnh người dùng, hãy cài đặt nó!)

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         Shellshockers.io Performance Booster and fps cap
// @namespace    https://shellshock.io/
// @version      1.2
// @description  Reduce lag and cap FPS in Shellshockers.io (Real 100% +editable fps) pls rate.
// @author       LTE emperor
// @license MIT
// @match        *://shellshock.io/*
// @grant        none
// ==/UserScript==

(function() {
    'use strict';

    function optimizePerformance() {
        const config = {
            shadows: false, // Disable shadows
            particles: false, // Remove extra particles
            postProcessing: false, // Turn off post-processing effects
            fpsCap: 144 // Set FPS cap (Adjustable)
        };

        const optimize = () => {
            try {
                let settings = window.localStorage.getItem('settings');
                if (settings) {
                    settings = JSON.parse(settings);
                    settings.shadows = config.shadows;
                    settings.particles = config.particles;
                    settings.postProcessing = config.postProcessing;
                    settings.fps = config.fpsCap;
                    window.localStorage.setItem('settings', JSON.stringify(settings));
                    console.log("Performance settings applied!");
                }
            } catch (e) {
                console.error("Failed to apply settings:", e);
            }
        };

        // Hook into the game rendering loop
        const modifyRendering = () => {
            requestAnimationFrame = (callback) => setTimeout(callback, 1000 / config.fpsCap);
            console.log("FPS adjusted to:", config.fpsCap);
        };

        optimize();
        modifyRendering();
    }

    // Run optimization when the game starts
    window.addEventListener('load', optimizePerformance);
})();