Advertisement
Guest User

chat colour

a guest
Dec 13th, 2019
617
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2. UI.AddCheckbox("Send Test Message");
  3. UI.AddTextbox("Message");
  4. UI.AddDropdown("Colour", ["Blue", "Green", "White", "Gold", "Dark Red", "Lightgreen", "Lightred", "Lime", "Orchid", "Yellow", "Palered"]);
  5. UI.AddCheckbox("send");
  6. function send(){
  7.     if (UI.GetValue ("Misc", "JAVASCRIPT", "script items","send")){
  8.         var chatmsg = UI.GetString ("Misc", "JAVASCRIPT", "script items","Message");
  9.         var color = UI.GetValue ("Misc", "JAVASCRIPT", "script items","Colour");
  10.         if (color == 0){
  11.             Global.ExecuteCommand("say "+ " " + chatmsg);
  12.         }
  13.         if (color == 1){
  14.             Global.ExecuteCommand("say "+ " " + chatmsg);
  15.         }
  16.         if (color == 2){
  17.             Global.ExecuteCommand("say "+ "" + chatmsg);
  18.         }
  19.         if (color == 3){
  20.             Global.ExecuteCommand("say "+ "" + chatmsg);
  21.         }
  22.         if (color == 4){
  23.             Global.ExecuteCommand("say "+ "" + chatmsg);
  24.         }
  25.         if (color == 5){
  26.             Global.ExecuteCommand("say "+ "" + chatmsg);
  27.         }
  28.         if (color == 6){
  29.             Global.ExecuteCommand("say "+ "" + chatmsg);
  30.         }
  31.         if (color == 7){
  32.             Global.ExecuteCommand("say "+ "" + chatmsg);
  33.         }
  34.         if (color == 8){
  35.             Global.ExecuteCommand("say "+ "" + chatmsg);
  36.         }
  37.         if (color == 9){
  38.             Global.ExecuteCommand("say "+ "   " + chatmsg);
  39.         }
  40.         if (color == 10){
  41.             Global.ExecuteCommand("say "+ "" + chatmsg);
  42.         }
  43.    
  44.        
  45.         UI.SetValue ("Misc", "JAVASCRIPT", "script items","send", false);
  46.     }
  47.  
  48.     if (UI.GetValue ("Misc", "JAVASCRIPT", "script items","Send Test Message")){
  49.         UI.SetValue ("Misc", "JAVASCRIPT", "script items","Send Test Message", false);
  50.         Global.ExecuteCommand("say "+ "white green blue darkblue darkred gold grey lightgreen lightred lime orchid   yellow palered");
  51.     }
  52. }
  53. Global.RegisterCallback("Draw", "send");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement