The quote in picture is closer to what is actually written in Holy Scripture when Christ the Lord Judges the whole World.
Here are those infamous judgment verses when the KING (Lord Jesus Christ) Returns Gloriously on His Throne:
At The Heart of Christianity – Judgment Day
“But when the Son of Man comes in His glory, and all the angels with Him, then He will sit on His glorious throne. “All the nations will be gathered before Him; and He will separate them from one another, as the shepherd separates the sheep from the goats; and He will put the sheep on His right, and the goats on the left.
“Then the King will say to those on His right, ‘Come, you who are blessed of My Father, inherit the kingdom prepared for you from the foundation of the world.
‘For I was hungry, and you gave Me something to eat; I was thirsty, and you gave Me something to drink; I was a stranger, and you invited Me in; naked, and you clothed Me; I was sick, and you visited Me; I was in prison, and you came to Me.’
“Then the righteous will answer Him, ‘Lord, when did we see You hungry, and feed You, or thirsty, and give You something to drink?
‘And when did we see You a stranger, and invite You in, or naked, and clothe You?
‘When did we see You sick, or in prison, and come to You?’
“The King will answer and say to them, ‘Truly I say to you, to the extent that you did it to one of these brothers of Mine, even the least of them, you did it to Me.’
“Then He will also say to those on His left, ‘Depart from Me, accursed ones, into the age-during fire which has been prepared for the devil and his angels;
for I was hungry, and you gave Me nothing to eat; I was thirsty, and you gave Me nothing to drink;
I was a stranger, and you did not invite Me in; naked, and you did not clothe Me; sick, and in prison, and you did not visit Me.’
“Then they themselves also will answer, ‘Lord, when did we see You hungry, or thirsty, or a stranger, or naked, or sick, or in prison, and did not take care of You?’
“Then He will answer them, ‘Truly I say to you, to the extent that you did not do it to one of the least of these, you did not do it to Me.’
“These will go away into age-during punishment, but the righteous into age-during life.” (Matthew 25:31 – 46)
Doing both (sometimes doing some charity work whilst at other times doing wrong things E.g. Oppressing others, exploiting others, making oneself a god or self exaltation or other sins etc.) may “not” count a person as a sheep (but more likely a goat) simply because it’s plain “hypocrisy”.
A seemingly good thing that is done in the ‘wrong way/reason/belief/expectation/intent’ is itself just a ‘better evil’. Remember this verse:
“For such men are false apostles, deceitful workers, disguising themselves as apostles of Christ.
No wonder, for even Satan disguises himself as an angel of light.
Therefore it is not surprising if his servants also disguise themselves as servants of righteousness, whose end will be according to their deeds.” (2 Corinthians 11:13 – 15)