Ned discovers a pay-cheque from the school and Dewey confesses. While Dewey gets to the parents evening, Sarah Silverman calls the cops.
Dewey knows he's about to be busted. He races out to get away from the parents, leaving the headteacher to take the flack.
Next day, the kids break out of school and get the schoolbus driver to take them past Dewey's house. They wake him up, and then make it to the Battle of the Bands. They bump into Ned and Dewey on the way out, and she calls the school to warn the parents.
Dewey decides to go with Zack the guitarist's song, even though they haven't practised it as much. They get new costumes and then take to the stage, while the parents push to the front - and stand amazed at the ability of their kids. The place is packed - even though it's mid afternoon on a weekday to fit in with the story.
The band rocks.
The crowd go wild.
The Principal congratulates the band backstage.
The winner is announced -- it's ... wait for it ... "No vacancy" (Jack's old band). They get the cheque, the crowd boo and chant for "School of Rock" --
So they take to the stage for an encore.
Dewey opens an after school program for the kids and Summer (a young iCarly!) manages all the offers they're getting. Even Ned gets in touch with music again and helps to teach guitar to little kids.