I've seen hats created before (obviously), but I've never figured out the code.
Is there anybody that could help me out with this script, and maybe tell me if I need a joint/mount in Milkshape?

That's the model if that'll do much. Yes, it's supposed to be below the grid..
I want a command like /toweringhats that will cause this to replace the current default hat on your head.