One thing you can do is letting the people who loved you in the past go, because they're proven to be disloyal to you when you've changed. Just be you, it's your life !! And if people can't accept who you are, then it's their problem. Being good brings a bright future, so don't worry. Try being a friend to anyone and there'll be real friends for you, not just acquaintances :) Put your key to happiness in your own pocket, not in your friends' :))
The word you are looking for is "enablers". Your friends encouraged you to do bad things and you encouraged them. But once you have stopped being an enabler, there was NO reason for your friends to stick with you anymore. The fact that you were encouraging each other in a negative way was what unified you. Don't worry, this happens all the time when you are a member of a group for a very specific reason. When that reason is no longer valid, you will retract from that group and thus your "friends". People are sometimes so afraid that they will be ostracized that they will not leave a group even though they no longer believe in actions taken by the group. Abused spouses, gang members, or cults are good examples. I am glad to see you had the courage to abandon something you no longer believed.