Your script is trash. It Doesn't even work. When I try to unload my cargo the object either flies out the back, starts parachuting down for a while then disappears, or nothing happens at all (cargo door doesn't even open) and the 'unload cargo' option vanishes from the action menu.
And don't tell me I didn't install it properly. I did.