Of course I use sleep. Unless you're unaware the onLoop method must return an integer value for the script to wait. In what manner would using a sleep stop the one line of code I provided to stop executing twice in rapid succession?
It gets called only a maximum of once per execution of onloop, but per observation it very obviously executes more than once per execution of onLoop. This is the problem.
Consider the problem in a vacuum. If the mouse is located ontop of a prayer, and if every iteration of onLoop consisted of left clicking once, sleeping for x amount of time, left clicking again (that is, turning the prayer on and then off), and then sleeping for 5 seconds, there would occasionally be an instance where each click would register twice. The outcome is effectively the same, but the problem is there.
This is a simplified version of the problem but this scenario has appeared often.