Write the code in instance in ScratchObjects-ScirptableScratchMorph-The OP its in- and make a new method.
When you are done, remember the method name, and make the blockspec like this
('Name of Block' #- #name of method) in the correct category

Offline
The Wiki has something you may find useful: http://wiki.scratch.mit.edu/wiki/Modding_Tutorial.
Offline