Brian,
I am no expert, and I only play a script consultant on TV.
As with any freelance opportunity, there are many factors in your pricing. Only you can answer them for yourself:
Is this a full-time job for me?
If I am doing other freelance jobs or other jobs for this client, how do I charge now, by the hour or by the job?
What does someone else in the developer field charge?
What is it worth to them in productivity or other measurement? Can I/they put a price on that?
If it is generally useful, do I keep the rights to it to sell elsewhere? (Does it have commercial value?)
If I were doing something else, what would my time be worth?
Does my price (when decided upon) reflect the value of my expertise, time, and their reward?
Do I expect to get more business from this customer, or one he would refer me to (perhaps two different answers)?
If I had to pay someone else to do this because I didn’t have time/expertise, will I still make a profit?
What level of support will this require going forward (that isn’t being charged separately)?
You can see the simple question gets complex. Then there is the question of the contract.
There are lots of boilerplate contracts for programming services online. These will be helpful for you to tailor to your needs. As always with a service contract, be sure you cover liability issues, scope creep, payment and delivery schedules.
The contract is to define the roles of the two parties as it relates to this specific transaction, and sets expectations. You probably can’t cover all aspects of the issues that could arise, but it helps to keep both sides acting in good faith and allows for negotiating when something falls outside the scope.
I know this all sounds like a lot for producing a simple script, and it is. But it is best to at least go in with eyes wide open.
If you are looking for comparable pricing, you probably won’t find it. Some people charge thousands of dollars (consulting companies), others charge $5/hr (eLance and the like). Some others, like many in this group do it for the love of it.
Good luck.