Advertisement
MekhiMaraghYT

Raindow tank script diep.io!

Aug 7th, 2020 (edited)
2,088
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.83 KB | None | 0 0
  1. // ==UserScript==
  2. // @name Diep.io Rainbow Fade
  3. // @namespace hi :)
  4. // @supportURL
  5. // @version 1.0.0
  6. // @description Allows you to have a tank that fades through a rainbow.
  7. // @author idk
  8. // @match http*://diep.io/
  9. // @grant none
  10. // ==/UserScript==
  11.  
  12. (() => {
  13. const script = document.createElement("script");
  14. script.src = "https://cdnjs.cloudflare.com/ajax/libs/chroma-js/1.3.7/chroma.min.js";
  15. document.head.append(script);
  16.  
  17. script.addEventListener("load", () => {
  18. const scale = chroma.scale(["red", "orange", "yellow", "lime", "cyan", "mediumpurple", "red"]).colors(1000);
  19. let index = 0;
  20.  
  21. setInterval(() => {
  22. index += 1;
  23. if (index > scale.length) {
  24. index = 0;
  25. }
  26.  
  27. input.execute(`net_replace_color 2 ${"0x" + scale[index].substr(1, Infinity)}`);
  28. });
  29. });
  30. })();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement