You can leave New Zealand if you are bankrupt, but only with the permission of the Official Assignee. If you leave without their permission, then you are committing a crime.
For further advice, please make an appointment with Malcolm McKenzie or Scott Donaldson.