To bind a key to a script, just make make an alias.
First, take note of what number your script is. You'll need that later.
Create a KEYCONF lump in your wad file. Add the following:
Code:
alias planky_script "puke ###"
defaultbind o plankyscript
Substitute the ### with whatever your script number is, and change o to whatever key you need it to be. To top it off, make sure the key is listed in the control config screen by doing this in your KEYCONF lump:
Code:
addkeysection "planky's mod" plankykeys
addmenukey "planky's script" plankscript
Then it'll appear at the bottom of the keyboard controls menu.