Students don't have to attend class. They just have to go to school. They can choose, on a daily basis, what class they want to be in. If they disrupt, they're kicked out of class for the day, since attendance at that class is a voluntary association.
To get credit and a grade for a class, you have to complete X homework assignments and pass Y amount of tests.
If a kid decides they wants to hang out all day in the cafeteria, good for them. Teachers might want to check in on them and see why or offer books or computer access to do some self-education.
You'd also want to diversify the classes if possible. Add classes in video game design, automotive engineering, etc. Make these classes enticing, and hard. Rope the kids in to hard classes by making them seem like blow-offs.
But most of all, let the kid choose to learn, and you have a lot more power over the kids who come in just to disrupt. You also have the added social pressure of the other kids, who will recognize that the disruptors don't have to be there and are only ruining it for everyone.
Never underestimate the motivating power of boredom.