You become selfless when the need of others is more important than yours and when you think others before your own interest and self righteous is someone who always believes that he is correct and always right in short pretentious. He pretends that he or she knows everything and wanted to be the cream of the crop.