Advertisement
Guest User

Untitled

a guest
Oct 23rd, 2019
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.10 KB | None | 0 0
  1. -- say any bad word with no block words(#) :)))) --
  2. local testmessage = 'Hail Cow Cow!'
  3. local Color = "Green"
  4.  
  5. function Chat(person,text)
  6. s = game:GetService("Players"):FindFirstChild(person.Name)
  7. if (s ~= nil) then
  8. if s.Character ~= nil then
  9. if s.Character.Head then
  10. game:GetService("Chat"):Chat(s.Character.Head, text, getColor())
  11. end
  12. end
  13. end
  14. end
  15.  
  16. function getColor()
  17. if Color == "Blue" or Color == "Enum.ChatColor.Blue" or Color == "Enum.DialogTone.Neutral" or Color == "Neutral" then
  18. return Enum.ChatColor.Blue
  19. elseif Color == "Green" or Color == "Enum.ChatColor.Green" or Color == "Enum.DialogTone.Friendly" or Color == "Friendly" then
  20. return Enum.ChatColor.Green
  21. elseif Color == "Red" or Color == "Enum.ChatColor.Red" or Color == "Enum.DialogTone.Enemy" or Color == "Enemy" then
  22. return Enum.ChatColor.Red
  23. else return Enum.ChatColor.Blue
  24. end
  25. end
  26.  
  27. function onChatted(msg, recipient, speaker)
  28. Chat(speaker,testmessage)
  29. end
  30.  
  31. function onPlayerEntered(newPlayer)
  32. newPlayer.Chatted:connect(function(msg, recipient) onChatted(msg, recipient, newPlayer) end)
  33. end
  34.  
  35. game.Players.ChildAdded:connect(onPlayerEntered)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement