The noise made by the shrewd, upbeat, John Hughes-y L.A. high school drug caper heist comedy Dope at this year’s film festivals at Sundance and Cannes was not for nothing. Directed and snappily written by Rick Famuyiwa (Our Family Wedding) and executive produced by Pharrell Williams and Forest Whitaker, the movie’s action centers on Malcolm (Shameik Moore in star-making mode), the straight-A brainiac trying to make it alive out of out of rough and tumble Inglewood, California. Malcolm, who likes ‘90s hip hop and sports a flattop and classic Jordans, hangs with two funny, brainy, scene-grabbing fellow nerds, the cool, boyish lesbian Diggy (Kiersey Clemons) and skeletal, deadpan Jib (Tony Revolori from The Grand Budapest Hotel).

Between bouts of getting bullied, taking SATs and applying to schools, they shove themselves into a way-out-of-their-league underground birthday party at a hip-hop club which just so happens to be attended by Malcolm’s secret passion, sexy, math-challenged Nakia (Zoe Kravitz, deliberately channeling Poetic Justice-era Janet Jackson). But the party, a celebration for local dope peddler kingpin Dom (A$AP Rocky), gets explosive when a shootout breaks out and sends Malcolm on the run — with, it turns, out a backpack Dom’s stashed with drugs. You can guess how things go. Can Malcolm return the drugs without messing up his chances of getting into college? Just who owns those drugs, anyway? And will he win Nakia’s love — or even a passing glance?

Dope may be overly ambitious and scattered, but it’s also funny and self-aware with some clever plot spins and references to old flicks, all punctuated by great ’90s hip hop. Even when it threatens to fall apart at the seams, the movie’s good will and heart save the day and, as for Moore, scene for scene, the guy’s never less than right on time.