I want to add a function that replaces certain words when typed in chat and show it as <Message Deleted> instead of what they originally typed. I have come up with something that blocks it, but I also want to implement the sub string. When I try adding string.Replace or string.gsub it, the code acts like it isn’t there. I should also note that I had help writing this code and both of us don’t know how to add it. If it is of any use, it’s for a Grand Theft Auto Online server which is basically modified perp.
local lowerText = string.lower(Text) for filter, response in pairs(gaywords) do if (string.find(lowerText, filter)) then Player:ChatMessage(response) return "" end end