Her behavior is attention seeking because she feels insecure, lost and is scared she is losing control of her life. While you do need to put firm limits around her and give her clear boundaries (children internally crave boundaries and limits, especially teenagers), the underlying issues need to be addressed. Girls at this age have a very hard time with moving because of social bonding. Peer relationships become so much more important than relationships with family and this is normal. I would talk to her and let her know that a) you understand her b)you completely support her c) you will do whatever it takes to make her feel comfortable in her new home (including helping her build friendships) and d) you would like her input on creating sensible rules you both can be happy about. There is just a little girl under there and while she may be a teenager now, she is still a little girl inside that needs to know she is number one, she is loved and that her thoughts and feelings matter. She is also going to be going through hormonal changes and that makes her feel so much less in control too. Also, she may be afraid that things will change again and she will have to move and re-establish friendships again and therefore she is going to push everyone away so that she does not get hurt again. It probably has less to do with being with grandparents and having less boundaries for a while and more to do with her trying to come to terms with her emotions and feelings. If there is any way for her to connect with her friends from the past, I would encourage that, even through letters. Another idea is to give her a journal and let her write down her thoughts, letting her know you will not read it--that it is her own private space--but that should she wish to talk about it, you are there for her. Lastly, keep in close contact with the school and let them know what is going on. Teachers will be more supportive if they are kept in close contact from home. I hope this helps!
I agree with what waiting has said, but have a couple questions.
What is she like? Is she more "mature looking" than her peers, or less mature looking, or is she unusually attractive, or less attractive than average, etc.?
She obviously has not gotten in with a group of high achiever "nice" girls, or she wouldn't be skipping school and smarting off to teachers. What is it about her that has made her choose to aspire to the behaviors of the lower achieving girls?
What can you do to get her into the group of girls who try to behave and try to achieve? Could she good at a sport like volleyball, or girl's basketball, or something else that would put her into the mainstream?