When you have a script that triggers on any text, it's usually a good idea to place it in its own file in the scripts editor. Otherwise, other on text events written in the same file tend to stop working