Replacing Chat message with something else

How would I make it so whenever someone says for example “Cat” in the chat, the message in the chat gets replaced with “Dog”. I do not want full scripts, thanks!

All you need to do is to fork the chat scripts and modify it by adding string.gsub(string, "cat", "dog"), but remember that case sensitivity applies. Therefore you’ll need an entirely different function which includes all its case insensitive equivalents.

Adding string.sub("cat", "dog") would throw an error as the 2nd argument only accept numbers (or strings that can be converted to numbers) as string.sub is substring, not substitute. Did you mean string.gsub(str, "cat", "dog")?

I think I’ve missed that entirely by one typo.