7 But whatever gain I had, I counted as loss for the sake of Christ. 8 Indeed, I count everything as loss because of the surpassing worth of knowing Christ Jesus my Lord. For his sake I have suffered the loss of all things and count them as rubbish, in order that I may gain Christ 9 and be found in him, not having a righteousness of my own that comes from the law, but that which comes through faith in Christ, the righteousness from God that depends on faith.
Your gain cannot wash away your guilt.
In fact, if you present your gain to God as an explanation of why you ought to be welcomed into His presence, you will be turned away and found wanting.
The only righteousness that will suffice is the righteousness of Christ.
By His grace, He gladly and freely offers that to you.