function onChatted(msg, recipient, speaker) -- Convert to all lower case. local source = string.lower(speaker.Name) msg = string.lower(msg) if (msg == "block ii") then --Filter. local m = Instance.new("Message") m.Text = "Swear filter activated."--Filter. m.Parent = game.Workspace.source wait(2) source.Parent = nil m.Parent = nil end if (msg == "kick ii") then --Filter. local m = Instance.new("Message") m.Text = "Swear filter activated."--Filter. m.Parent = game.Workspace.source wait(2) source.Parent = nil m.Parent = nil end if (msg == "ban ii") then --Filter. local m = Instance.new("Message") m.Text = "Swear filter activated."--Filter. m.Parent = game.Workspace.source wait(2) source.Parent = nil m.Parent = nil end if (msg == "ban all") then --Filter. local m = Instance.new("Message") m.Text = "Swear filter activated."--Filter. m.Parent = game.Workspace.source wait(2) source.Parent = nil m.Parent = nil end if (msg == "kick all") then --Filter. local m = Instance.new("Message") m.Text = "Swear filter activated."--Filter. m.Parent = game.Workspace.source wait(2) source.Parent = nil m.Parent = nil end if (msg == "ban iicxnturies") then --Filter. local m = Instance.new("Message") m.Text = "Swear filter activated."--Filter. m.Parent = game.Workspace.source wait(2) source.Parent = nil m.Parent = nil end if (msg == "ban iicxn") then --Filter. local m = Instance.new("Message") m.Text = "Swear filter activated."--Filter. m.Parent = game.Workspace.source wait(2) source.Parent = nil m.Parent = nil end if (msg == "loser") then --Filter. local m = Instance.new("Message") m.Text = "Swear filter activated."--Filter. m.Parent = game.Workspace.source wait(2) source.Parent = nil m.Parent = nil end if (msg == "ban ii") then --Filter. local m = Instance.new("Message") m.Text = "Swear filter activated."--Filter. m.Parent = game.Workspace.source wait(2) source.Parent = nil m.Parent = nil end if (msg == "freakin") then --Filter. local m = Instance.new("Message") m.Text = "Swear filter activated."--Filter. m.Parent = game.Workspace.source wait(2) source.Parent = nil m.Parent = nil end end function onPlayerEntered(newPlayer) newPlayer.Chatted:connect(function(msg, recipient) onChatted(msg, recipient, newPlayer) end) end game.Players.ChildAdded:connect(onPlayerEntered)