Slowly stop accepting their invitations to hang out. If they invite you over to their house, avoid it. Pretend to be ill or make an excuse.  Try one of these examples:  “I’m not really in the mood to hang out today.” “Thanks for the invitation, but I’m not feeling very well today.”   Also, quit confiding in them. Continuing the intimacy of friendship will only make it harder to end the relationship in the long run. Start coming up with reasons that you can't see them. This will help if they are bad company and you want to gradually stop hanging out with them. Eventually they should start to notice and leave you alone.  Some good examples of excuses could be that you have to babysit, that your parents are monitoring you, or you could even sign up for school activities and say they are taking up too much of your time. Try one of these examples:  “I appreciate the offer, but I have a lot of homework tonight.” “I can’t hang out today because my parents are making me do my chores at home.” Talk to them about their behavior and tell them why their actions bother you. Give them advice about how to change if they are willing to hear it.  Some ways you could help them are by telling them honestly how their behavior makes you feel, talking to a counselor or their parents with them, offering to help them with something stressful in their life that might be causing them to act out (like homework, trouble at home, etc.), or helping them find positive outlets in their life (like sports, church, and other hobbies or school activities). Try one of these examples:  “It bothers me when you make me feel like I’m not a good friend.” “I don’t like feeling pressured to do things I don’t want to do. I wish you wouldn’t do that.” “I’ll be happy to help you figure out a way to deal with that situation.” If they persist with their bad behavior and won't leave you alone, continue to resist them. But if they still continue to follow you, tell them you don't want to hang out with them anymore. Try one of these examples:  “I don’t think...

TL;DR in Indonesian:
Mulailah menjaga jarak. Carilah alasan untuk menghindarinya. Cobalah membantu temanmu jika kamu benar-benar ingin terus bergaul dengannya. Jangan takut untuk mempertahankan dirimu.