21 Jump Street
(2012)

Eric (Dave Franco) is the high school's dealer.  The PE coach (Rob Riggle) is the supplier.  

A big deal goes down in the end which involves the supplier, the dealer, our two heroes Schmidt (Jonah Hill) and Jenko (Channing Tatum), and the biker gang from the duo's first botched-arrest.

Just when things turn ugly for the good guys, it is revealed that the two of the bikers are really DEA undercovers, and happen to be Johnny Depp and the other dude from the original 21 Jump Street TV show.  They cause enough of a distraction, before getting killed, that Schmidt and Jenko are able to get away.  

Schmidt and Jenko chase the PE coach, who takes Schmidt's love interest as a hostage.  Jenko is shot by the coach, so Schmidt has to overcome his cop-deficiency to save his love.  He shoots the coach in the genitals, and the movie ends.

Thanks Seth!