TheMichelle

Michelle's Multiplayer Piano Color Changer v3.2

Sep 20th, 2016
314
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /*Rainbow Rooms v3.2 by The Michelle! Now with 98% less suicide rates.
  2. This script will cycle your room's background color through the 359 colors below, creating a beautiful rainbow!
  3. The purpose of this script wasn't originally to create a rainbow room but to just change the room to the desired colors in the list, in
  4. case you were wondering why I chose this incredibly inefficient method of a color gradient. Feel free to change the colors to
  5. whatever the hell you want. */
  6.  
  7. var intervalTime = 500; /*Milliseconds between color changes
  8.     500 = Fast, smooth-ish, resource intensive.
  9.     500-2500 = Glitchy for most people.
  10.     3000-4000 = Slow, very smooth, least resource intensive.
  11.     4000+ = Feel free to make it as slow as you want. You do you. */
  12. var colorList = ["800000", "800200", "800400", "800600", "800900", "800B00", "800D00", "800F00", "801100", "801300", "801500", "801700", "801A00", "801C00", "801E00", "802000", "802200", "802400", "802600", "802900", "802B00", "802D00", "802F00", "803100", "803300", "803500", "803700", "803A00", "803C00", "803E00", "804000", "804200", "804400", "804600", "804900", "804B00", "804D00", "804F00", "805100", "805300", "805500", "805700", "805A00", "805C00", "805E00", "806000", "806200", "806400", "806600", "806900", "806B00", "806D00", "806F00", "807100", "807300", "807500", "807700", "807A00", "807C00", "807E00", "808000", "7E8000", "7C8000", "7A8000", "778000", "758000", "738000", "718000", "6F8000", "6D8000", "6B8000", "698000", "668000", "648000", "628000", "608000", "5E8000", "5C8000", "5A8000", "578000", "558000", "538000", "518000", "4F8000", "4D8000", "4B8000", "498000", "468000", "448000", "428000", "408000", "3E8000", "3C8000", "3A8000", "378000", "358000", "338000", "318000", "2F8000", "2D8000", "2B8000", "298000", "268000", "248000", "228000", "208000", "1E8000", "1C8000", "1A8000", "178000", "158000", "138000", "118000", "0F8000", "0D8000", "0B8000", "098000", "068000", "048000", "028000", "008000", "008002", "008004", "008006", "008009", "00800B", "00800D", "00800F", "008011", "008013", "008015", "008017", "00801A", "00801C", "00801E", "008020", "008022", "008024", "008026", "008029", "00802B", "00802D", "00802F", "008031", "008033", "008035", "008037", "00803A", "00803C", "00803E", "008040", "008042", "008044", "008046", "008049", "00804B", "00804D", "00804F", "008051", "008053", "008055", "008057", "00805A", "00805C", "00805E", "008060", "008062", "008064", "008066", "008069", "00806B", "00806D", "00806F", "008071", "008073", "008075", "008077", "00807A", "00807C", "00807E", "008080", "007E80", "007C80", "007A80", "007780", "007580", "007380", "007180", "006F80", "006D80", "006B80", "006980", "006680", "006480", "006280", "006080", "005E80", "005C80", "005A80", "005780", "005580", "005380", "005180", "004F80", "004D80", "004B80", "004980", "004680", "004480", "004280", "004080", "003E80", "003C80", "003A80", "003780", "003580", "003380", "003180", "002F80", "002D80", "002B80", "002980", "002680", "002480", "002280", "002080", "001E80", "001C80", "001A80", "001780", "001580", "001380", "001180", "000F80", "000D80", "000B80", "000980", "000680", "000480", "000280", "000080", "020080", "040080", "060080", "090080", "0B0080", "0D0080", "0F0080", "110080", "130080", "150080", "170080", "1A0080", "1C0080", "1E0080", "200080", "220080", "240080", "260080", "290080", "2B0080", "2D0080", "2F0080", "310080", "330080", "350080", "370080", "3A0080", "3C0080", "3E0080", "400080", "420080", "440080", "460080", "490080", "4B0080", "4D0080", "4F0080", "510080", "530080", "550080", "570080", "5A0080", "5C0080", "5E0080", "600080", "620080", "640080", "660080", "690080", "6B0080", "6D0080", "6F0080", "710080", "730080", "750080", "770080", "7A0080", "7C0080", "7E0080", "800080", "80007E", "80007C", "80007A", "800077", "800075", "800073", "800071", "80006F", "80006D", "80006B", "800069", "800066", "800064", "800062", "800060", "80005E", "80005C", "80005A", "800057", "800055", "800053", "800051", "80004F", "80004D", "80004B", "800049", "800046", "800044", "800042", "800040", "80003E", "80003C", "80003A", "800037", "800035", "800033", "800031", "80002F", "80002D", "80002B", "800029", "800026", "800024", "800022", "800020", "80001E", "80001C", "80001A", "800017", "800015", "800013", "800011", "80000F", "80000B", "800009", "800006", "800004", "800002"]; //I want to die
  13. var counter = 0;
  14. function updateColor(color) {
  15.     MPP.client.sendArray([{
  16.         m: 'chset',
  17.         set: {
  18.             color: '#' + color
  19.         }
  20.     }])
  21. };
  22. var foo = setInterval(function() {
  23.     if (counter < colorList.length - 1) {
  24.         counter++;
  25.         updateColor(`${colorList[counter]}`)
  26.     } else {
  27.         counter = 0;
  28.         updateColor(`${colorList[counter]}`)
  29.     }
  30. }, intervalTime);
  31. var cycleMin = "";
  32. var cycleSec = Math.round(colorList.length * intervalTime / 1000) + " seconds.";
  33. if (colorList.length * intervalTime >= 60000) {
  34.     cycleMin = Math.floor(colorList.length * intervalTime / 1000 / 60 * 100) / 100 + " minutes.";
  35.     cycleSec = ""
  36. };
  37. MPP.chat.send("MMPPCC 3.1: Loaded " + colorList.length + " colors. Full cycle time: " + cycleMin + cycleSec);
Add Comment
Please, Sign In to add comment