Wait what!? OMG! This is the script.... This is the one.
I tried building something pretty much like this about a year ago. Failed horribly, and gave up. And now it sits here, in front of me. Me likey :D