Because of the ‘tool shelf’ (Version < 30000 or so) is not available anymore an own script should probably become an addon, shouldn’t it?
:EDIT: Wiki is for a while out of order …(searching for the error),
:EDIT 2: repaired …
I summarized the needed info here: http://petertregarg.host22.com/pmwiki/pmwiki.php/Api/AddonTemplate
If it is OK, where should it occur? (Wiki and Report a Bug?)
:edit: (just ‘discovered’)
Addons are described here: http://wiki.blender.org/index.php/Dev:2.5/Py/Scripts/Addons