It works... Kind of, you used "if message is" witch means it only works if the message is exactly what is says so you cant say "fuck" but you can say "you are so fucking annoying"
I would suggest changing it to
if message contains "word1", "word2", "word3":
cancel event