It is reported that a man once went to Ibrahim bin Adham and said, "Oh Abu Ishaaq, I continually wrong my own self, and I turn away from everything that invites me to improve my way of life."
Ibrahim said, "If you can fulfill five conditions, then sinning will never harm you, and you can fulfill your desires as much as you want."
"Tell me those conditions," exclaimed the man.
"As for the first, if you want to disobey Allah, then do not eat from His sustenence," said Ibrahim.
"What then will I eat, for everything on the earth is from His sustenence?" said the man.
"Listen," said Ibrahim. "Are you being sensible when you eat from His sustenence while you are disobedient to Him?"
"No," said the man. "What is the second condition?"
"If you want to disobey Allah, then do not live in any of His lands," said Ibrahim.
"This is even worse than the first. All that is in the East and West belong to Him. So where then will I live?"
"Listen," said Ibrahim. "If you insist on disobeying Him while you eat from His sustenence and live in His lands, then at least look for some spot where He cannot see you, and disobey Him there."
"O Ibrahim!" exclaimed the man. "How can I do that, when He even knows the deepest secrets that are in the breasts of men? What is the fourth condition?" he asked despondently.
"When the angel of death comes to take your soul, then say to him, 'Give me some respite, so that I can repent sincerely and perform good deeds.'"
"When the time comes, the angel will not accept that plea from me," said the man.
"Listen," said Ibrahim. "If you cannot put off death in order to repent, then how do you expect to be saved?"
"Tell me the fifth condition," said the man.
"When the guardians of Hell-fire come to take you away on the Day of Resurrection, don't go with them."
"They won't let me go!" exclaimed the man.
"Then how do you expect to be saved?" asked Ibrahim.
"Stop, stop! That is enough for me," said the man. "I ask Allah to forgive me and I indeed repent to Him."
The man then dedicated his life to the worship of Allah from that day.
Extracted from "Stories of Repentance" by Muhammad Abduh Mughawiri