SansjustSans2

roblox anti swear script

Aug 5th, 2020 (edited)
315
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. -- Created by greenminer03! -- 
  2. -- converted to pastebin By YAH10010 --
  3. -- only works with bubblechat
  4. local Color = "Purple"
  5.  
  6. function Chat(person,text)
  7. s = game:GetService("Players"):FindFirstChild(person.Name)
  8. if (s ~= nil) then
  9. if s.Character ~= nil then
  10. if s.Character.Head then
  11. game:GetService("Chat"):Chat(s.Character.Head, text, getColor())
  12. end
  13. end
  14. end
  15. end
  16.  
  17. function getColor()
  18.     if Color == "Blue" or Color == "Enum.ChatColor.Blue" or Color == "Enum.DialogTone.Neutral" or Color == "Neutral" then
  19.         return Enum.ChatColor.Blue
  20.     elseif Color == "Purple" or Color == "Enum.ChatColor.Purple" or Color == "Enum.DialogTone.Friendly" or Color == "Friendly" then
  21.         return Enum.ChatColor.Green
  22.     elseif Color == "Red" or Color == "Enum.ChatColor.Red" or Color == "Enum.DialogTone.Enemy" or Color == "Enemy" then
  23.         return Enum.ChatColor.Red
  24.     else return Enum.ChatColor.Blue
  25.     end
  26. end
  27.  
  28. function onChatted(msg, recipient, speaker)
  29. Chat(speaker,msg)
  30. end
  31.  
  32. function onPlayerEntered(newPlayer)
  33. newPlayer.Chatted:connect(function(msg, recipient) onChatted(msg, recipient, newPlayer) end)
  34. end
  35.  
  36. game.Players.ChildAdded:connect(onPlayerEntered)
RAW Paste Data