The party who gambles will repay. According to the Marriage Law, at the time of divorce, the debts originally borne by the husband and wife living together shall be paid off with the common property. If the property is not enough to pay off, both parties shall agree to pay off; If the agreement fails, the people's court shall make a judgment. These provisions indicate that although both parties can agree on how to pay off debts at the time of divorce, such payment shall not oppose legal claims. When divorce occurs, when the joint property of the husband and wife is not enough to pay off their joint debts, regardless of the internal agreement between the husband and wife, both the husband and the wife are fully responsible for paying off, that is to say, both the husband and the wife are jointly and severally liable for their joint debts, and the creditor can require either of the husband and the wife to pay off all the debts.