According to the quran, the factors that determine whether a person is righteous are the deeds of the person and the intent of the person when he was doing the deeds. A righteous person must do justice, goodness and spending on the kindred and in doing all these, one's intent must be pure.