The goodness of God leads to repentance
Romans 2:4 New King James Version (NKJV)
4 Or do you despise the riches of His goodness, forbearance, and longsuffering, not knowing that the goodness of God leads you to repentance?
Godly sorrow produces repentance
2 Corinthians 7:10 New King James Version (NKJV)
10 For godly sorrow produces repentance leading to salvation, not to be regretted; but the sorrow of the world produces death.