Have a button at a shop that will repair your ship's damaged blocks or if it is a blueprint make so it restores the ship back to the blueprint before any damage occurred. However make so you can only do this if you have the blueprint itself to prevent people from stealing ships and uploading them for starmade community content. In the server config make it so you can choose between credits or blocks to pay for repair.