Sounds exactly like me when I was 13, literally.
It turns out that I was having difficulty in school due to undiagnosed ADD and Narcolepsy. This lack of control affected my self esteem and thusly affected my availability of friend choices.
Since I was getting caught smoking and I was getting bad grades - I found myself grounded more often than not. This caused me to want to socialize even more at school, on the phone and eventually by sneaking out.
If the obvious talking and standard punishments do not work. I would look at whether there is any underlying medical or psychological reasons for her difficulties. Don't jump to conclusions. It is still very possible that she is not on drugs or going to flunk out of school and into a life of crime.
Try a creative outlet such as acting or music classes. I belong to a church in Canton which has an amazing drama and contemporary music program for teens. This will help with her acting out and may even get her involved with a more healthy crowd - even if they have purple hair.