Here is my script

function Fliter(Part, Type)
local msg = game.Chat:FilterStringForBroadcast(script.Parent.Text)
script.Parent.Text = msg
end
script.Parent.Changed:connect(Fliter)

Hope you can help! Thanks!