Rainbow Fade Modified

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

이 스크립트를 설치하려면 Tampermonkey, Greasemonkey 또는 Violentmonkey와 같은 확장 프로그램이 필요합니다.

이 스크립트를 설치하려면 Tampermonkey와 같은 확장 프로그램을 설치해야 합니다.

이 스크립트를 설치하려면 Tampermonkey 또는 Violentmonkey와 같은 확장 프로그램이 필요합니다.

이 스크립트를 설치하려면 Tampermonkey 또는 Userscripts와 같은 확장 프로그램이 필요합니다.

이 스크립트를 설치하려면 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)
    });
})();