Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local chat = game:GetService("Chat")
- local rep = game:GetService("ReplicatedStorage")
- local event = rep:WaitForChild("Chatted")
- local format = "[%s]: %s"
- event.OnServerEvent:Connect(function(Player,String)
- if typeof(String) == "string" then -- check if string
- local bool,result = pcall(function()
- return chat:FilterStringForBroadcast(String,Player) -- filter
- end)
- if bool then
- event:FireAllClients(string.format(format,Player.Name,result)) -- send filtred string
- end
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment