Hey, you can find what you are looking for in this section of the forum:
https://bitcointalk.org/index.php?board=212.0Mostly topics in there are about faucets so I am sure you can find a working script in there if you are willing to search. I have seen plenty of tutorials and there in settin up a faucet so I know somewhere in there is the script you are looking for. If you have further more questions, feel free to ask in the begginer and help section of the forum. Goodluck!