Need help flipping token on patrol...(newb)

First off, very new to the community/java, so please excuse my newby-ness. I found a script for a patrolling token on here: I love the idea and discovered I could get the token to flip at the end of the patrol(fliph true). The only problem is, I can't get the token to flip back(fliph false) once the token reaches the other end of its patrol. Any help or feedback would be greatly appreciated! Here's a link to the script I modified: 
I would change patroltoken.set({ fliph: true }); To // When direction is -70 this will set fliph to true // When direction is +70 this will set fliph to false patroltoken.set({ fliph: direction < 0 });
The Aaron
API Scripter
Also, it's Java SCRIPT , not Java.  The two languages have very little in common and if you try to look for help with java, you'll be very confused when you try to write API scripts. =D
Thank you Kyle G, worked like a charm. Awesome community.