A hypothetical (i'm not christian) question about discipline, repentance and restoration in the new testament. Please answer with scripture, not your emotions.

Let's assume "bob" is under discipline from God for some sin.
Initially, bob doesn't care and continues on.
As God starts to shut doors and allow evil in Bob's life to get him to change, Bob becomes very afraid of sin and tries very hard to change unsuccessfully.

1. if someone has already "repented" (metanoia) internally.. hates the sin, is actively trying to change but is still stuck in it. e.g. an alcoholic, a drug addict or any number of things. Does God continue to "beat up" that person till his / her actions line up as well?

2. If God causes or allows certain things to happen because of discipline, is there any scripture that says that he will restore what was lost once the discipline is over?