Not a script, or even relating to it, but the 'Enhancing' section of this page is one of the most concise explanations I've seen of how to use Photoshop to coax a good photo out of a not-so-good photo. It's close to a good chunk of the evil things I did to photos on a daily basis when I did commercial design a few years ago.
(Courtesy of Heather of urbancombatdriving.com.)