Rainbow Fade Modified

join my discord server for updates and more: https://discord.gg/862cXbhXmh

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला Tampermonkey, Greasemonkey किंवा Violentmonkey यासारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

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

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला Tampermonkey किंवा Violentmonkey यासारखे एक्स्टेंशन इंस्टॉल करावे लागेल..

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

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला Tampermonkey यासारखे एक्स्टेंशन इंस्टॉल करावे लागेल..

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्क्रिप्ट व्यवस्थापक एक्स्टेंशन इंस्टॉल करावे लागेल.

(माझ्याकडे आधीच युझर स्क्रिप्ट व्यवस्थापक आहे, मला इंस्टॉल करू द्या!)

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला Stylus सारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला Stylus सारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला Stylus सारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्टाईल व्यवस्थापक इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्टाईल व्यवस्थापक इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्टाईल व्यवस्थापक इंस्टॉल करावे लागेल.

(माझ्याकडे आधीच युझर स्टाईल व्यवस्थापक आहे, मला इंस्टॉल करू द्या!)

// ==UserScript==
// @name         Rainbow Fade Modified
// @version      1.0
// @author       haykam821 (editd by Snowfall [_snowyfall_ on discord])
// @description  join my discord server for updates and more: https://discord.gg/862cXbhXmh
// @match        https://*diep.io/*
// @grant        none
// @namespace https://greasyfork.org/users/1329509
// ==/UserScript==

'use strict';

(() => {
    const script = document.createElement("script");
    script.src = "https://cdnjs.cloudflare.com/ajax/libs/chroma-js/1.3.7/chroma.min.js";
    document.head.append(script);

    const options = {
        speed: 0.25,
        pattern: ['#ba52ae', '#7a549c', '#5b599c', '#ba52ae'], // change the colors you want here they need to be in hex format, and the first color needs to be the same as the last!
    }

    const active = true

    script.addEventListener("load", () => {
        const pattern = chroma.scale(options.pattern).colors(1000);
        let index = 0;

        const change = () => {
            index += options.speed
            if (index >= pattern.length) index = 0;
            const scale = "0x" + pattern[index].substr(1);

            const nonIds = ['ren_score_bar_fill_color', 'ren_xp_bar_fill_color', 'ren_health_fill_color', 'ren_minimap_border_color', 'ren_stroke_solid_color'];
            const ids = [2, 13] // ur ffa and lb

            // 0 = smasher
            // 1 = cannons
            // 2 = you ffa
            // 3 = blue team
            // 4 = red team
            // 5 = purple team
            // 6 = green team
            // 8 = square
            // 9 = triangle
            // 10 = pentagon
            // 11 = crasher
            // 14 = maze wall
            // 13 = leaderboard
            // 14 = maze wall
            // 15 = opponent ffa
            // 16 = necro square
            // 17 = fallen team


            // ren_xp_bar_fill_color
            // ren_score_bar_fill_color = scoer bar
            // ren_health_background_color = health background color
            // ren_grid_color = grid color
            // ren_background_color = background
            // ren_minimap_arrow_color = minimap arrow color
            // ren_minimap_background_color = fill color of minimap
            // ren_minimap_border_color = border of minimap

            // ren_stroke_solid_color
            // ren_bar_background_color = bg of all bars like score, lb, xp, etc.

            if (active) {
                input.execute(`ui_replace_colors ${scale}`.repeat(100));

                nonIds.forEach(element => {
                    input.execute(`${element} ${scale}`);
                });

                ids.forEach(element => {
                    input.execute(`net_replace_color ${element} ${scale}`);
                });
            }
        }

        setInterval(change, 1)
    });
})();