Nothing if you file bankruptcy.
When you finance a car, you are required to keep it insured in case anything happens to the car. This gives the bank some protection in case you are in a car accident, or the vehicle is stolen, or a boulder falls on it, etc. Unfortunately, when you are in financial trouble, you let the insurance lapse and can’t repair the vehicle.
Now if you fall behind on payments and the bank repossesses the car, they will notice that it has been damaged. This affects the resale (auction) value. They may even sue you for the damages. Of course, at this point, you already owe the repo fee and the deficiency balance on the loan.
If you file bankruptcy, you list all of these debts to the bank in your bankruptcy and should be able to discharge them. The only real exception would be if the bank sued you in the bankruptcy court, arguing that you had maliciously damaged the car in anticipation of bankruptcy, but I have never seen this and don’t think it would actually happen.
So, if you go bankrupt, the body damage doesn’t matter. Even if the vehicle is in bad shape, we can list your debt to the bank and discharge it.