Never mind, it works now.
What the script does:
- Read the file Text.txt
- Searches for all the nearest match of the current word (done in a loop), in a string from the beginning of the received message, all the way to the last character position of the current word in the loop ("hello" means char 1 to 5)
- Sends a random message from the same file
- Returns the received message to break the loop and suspend execution
Make sure you're not on 2 accounts at the same time. Sending "hello" will result in the script responding to its own messages. Your PC will not be made any faster by this..