Advertisement
BumpyPlayz

Chat Colour changer

Jan 29th, 2020
3,039
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.10 KB | None | 0 0
  1. local mps = game:GetService("MarketplaceService")
  2. local gamepassid = 6944957
  3. --  change this to your gamepassid
  4. local serverScriptService = game:GetService("ServerScriptService")
  5. local chatService = nil
  6.  
  7. game.Players.PlayerAdded:Connect(function(player)
  8.     player.CharacterAdded:Connect(function(character)
  9.         if chatService ~= nil then
  10.             local speaker
  11.             while true do
  12.                 speaker = chatService:GetSpeaker(player.Name)
  13.                 if speaker ~= nil then
  14.                     break
  15.                 end
  16.                
  17.                 wait(1)
  18.             end
  19.            
  20.             if mps:UserOwnsGamePassAsync(player.UserId, gamepassid) then
  21.                 if script.Tags.Value~=nil then
  22.                     speaker:SetExtraData("Tags",{{TagText = script.Tags.Value,TagColor = script.Tags.TagColour.Value}})
  23.                 end
  24.                    
  25.                     speaker:SetExtraData("NameColor",script.NameColour.Value)
  26.                     speaker:SetExtraData("ChatColor",script.ChatColour.Value)
  27.                     speaker:SetExtraData("Font",Enum.Font.Cartoon)
  28.                     if script.Size.Value ~= 0 then
  29.                         speaker:SetExtraData("TextSize",script.Size.Value)
  30.                     end
  31.             end
  32.         end
  33.     end)
  34. end)
  35.  
  36. chatService = require(serverScriptService:WaitForChild("ChatServiceRunner"):WaitForChild("ChatService"))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement