This is still a bit buggy, but I am working on it, this will be used in a bigger game I am making. Use WASD to move, do not move when they are looking, you don't necessarily have to be in the red for them to get you, that is just so you know they are looking.
Please let me know of any bugs in the comment section, before you post a bug. make sure you hit the green flag a couple times before starting, as that may help.