School of Rock ending / spoiler
The principal and the parents find out Dewey is not a sub and he leaves before he gets arrested. The kids leave school, get Dewey and go to the Battle of the Bands. They sing a song Zach wrote himself, but they lose to Dewey's old band. The crowd cheers for The School Of Rock, and they play another song. Dewey winds up running his own rock-music lesson studio with Ned.
Submitted by Keylime
