Praise be to Allah Who has guided you to the path of truth and saved you from the company of bad friends.
It is well-known that sins are of two types:
Sins that have to do with the rights of Allah. Allah may forgive these, if a person repents sincerely, as He says (interpretation of the meaning):
“And He it is Who accepts repentance from His slaves, and forgives sins”
Sins that have to do with the rights of other people. In order for repentance from these sins to be accepted, it is stipulated that the individual should restore those rights to them or ask them to let him off, by asking them to forgive him and forget the dues he owes to them. Al-Bukhaari (6534) narrated from Abu Hurayrah (may Allah be pleased with him) that the Prophet (blessings and peace of Allah be upon him) said: “Whoever has wronged his brother, let him ask him to forgive him, for there (i.e., on the Day of Resurrection) there will be no dinars and no dirhams, before some of his good deeds are taken and given to his brother, and if he has no good deeds to his credit, some of his brother’s bad deeds will be taken and thrown onto him.”
See also the answer to question no. 43017
If you cannot return the money at present, then it remains something that you owe and you must return it when you are able to do so.
Al-Qurtubi (may Allah have mercy on him) said: If the sin involved wronging people, then repentance from it is not valid unless the property is returned to its rightful owner – whether it is the exact property itself or otherwise – if he is able to do that. If he is not able to do that, then he must resolve to return it whenever he is able to do so, at the earliest possible opportunity.
End quote from Tafseer al-Qurtubi, 18/200
If it so happens that a person is not able to return property to its rightful owners before he dies, but he intended to return it, then it is up to Allah, and perhaps Allah will pay it back for him on the Day of Resurrection.
Acceptance of righteous deeds, such as prayer, zakaah, Hajj and other acts of worship, is up to Allah, but there is the hope that if a person does an act of worship in the manner required Islamically, that Allah will accept it from him.
In the answer to question no. 107241 we stated that the fact that a person does acts of disobedience and major sins does not mean that other, righteous deeds will not be accepted from him. This applies to the one who has not repented from those sins, so how about the one who has repented and has decided to return property to its rightful owners.
Based on that, your previous sins do not mean that your righteous deeds, such as prayer, zakaah and so on, will not be accepted from you.
With regard to Hajj, it is well-known that Hajj requires financial resources; if you have money that is surplus to your needs, then what you have to do is use it to pay off what you owe of dues to others, and what you took from people’s wealth, even if it is less than what is owed. So what you have to do is reduce these dues as much as you can. “On no soul does Allah place a burden greater than it can bear” [al-Baqarah 2:286].
We ask Allah to help you to pay off your debt and to forgive us and you, for He is able to do that.
And Allah knows best.