I like to make it easier on the editor: I convert everything to lowercase for my testing, and check to see if the string contains the word I'm looking for rather than is strictly equal to it.

// get layer input and make it all lower case for easier testing
input = thisLayer.text.sourceText.toLowerCase();

// test to see if input contains "word"
if (input.indexOf("word") != -1) {
// what to do if "word" is found
} else {
// what to do if "word" is not found
}

(Also, this is an expression, not a script. Expressions are code that evaluate in the project as it is rendered and return a value into a property; scripts run outside of the render and can have manipulate the entire project.)