first if you want it to substitute when YOU enter data (not others) is is ON INPUT, not on text.

here is an example that would work in any channel.
Note that at the point of on input processing $1- is
the full line you entered. So you can test if a specific word is in that string with this:

on 1:INPUT:#: {
if (ROFL isin $1- ) /say Rolling on Floor Laughing!
}

Hope this helps.