AppleScript Autoclicker Help

I was wondering if anyone knew how to make an auto clicker that would only work if the left click button on the mouse was held down and once you aren't holding down left click on the mouse, it would stop clicking?
AppleScript Autoclicker Help
 
 
Q