Anna and the Apocalypse began life when aspiring writer-director Ryan McHenry declared that the only thing that could make Disney’s High School Musical bearable would be seeing Zac Efron get eaten by zombies. McHenry spun a delectable 18-minute short, Zombie Musical (2010), from that inspiration, but he died from bone cancer before he could expand it into a feature. A script credited to McHenry and his school friend and collaborator Alan McDonald now brings his low-high concept to the big screen with an unsettling charm and odd humor all its own.

At its wacky peak Anna and the Apocalypse is both heartfelt and ruthless. At its driest the movie puts the dead, or undead, into deadpan. “Withdraw tongues,” Assistant Principal Savage (Game of Thrones’s Paul Kaye) orders, crisply, to a couple caught in flagrant PDA. His command lingers in the memory throughout the story as each body part gets withdrawn, bent, folded, mutilated, or devoured. By the end, the sight of lovers-turned-zombies instinctively trying to hold hands—though their twitching bodies won’t allow it—catches us between laughter and tears.

This “zombie Christmas musical” scrapes the glitter off the adolescent agonies and ecstasies of the sugary HSM franchise. It takes teen aspirations semi-seriously—and adds zombies. When high school senior Anna (Ella Hunt) and her best friend John (Malcolm Cumming) wake up and dance through the aptly named Little Haven, Scotland, they’re blind to the carnage that erupted overnight, when the zombie takeover took off. They’re too busy singing about the elating possibilities presented by a beautiful new day. Once they come to their senses, they go to their part-time workplace, the “Thunder Balls” bowling alley, in search of decent WiFi. Like the Warriors dodging rival gangs in New York City, they and their friends outwit and outduel zombie hordes as they trek to the high school, where they’re sure loved ones have holed up after the annual Christmas show.

Hunt has repeatedly dubbed her role “unstereotypical.” But what Anna and the Apocalypse really offers are stock characters drawn from a higher grade of stock than most teen movies. It’s a droller Breakfast Club with human meat on the table. The core triangle is Anna, the motherless striver who fights with her doting, school handyman dad Tony (Mark Benton) about taking a Wanderjahr before university; John, the good-guy budding artist who harbors deeper feelings for Anna and an addiction to puns; and Nick (Ben Wiggins), the obnoxious bad boy with animal charisma who hooked up with Anna and immediately dropped her. Next in importance are Chris (Christopher Leveaux), the clueless, guileless would-be Spielberg who films special effects movies on his smartphone; Lisa (Marli Siu), Chris’s sweet true love, the sexy chanteuse of Little Haven High’s Yuletide bash; and Steph (Sarah Swire), the crusading journalist who’s vexed because Savage won’t let her post an exposé of the homeless crisis and because she can’t be with her girlfriend for Christmas.

McDonald and McHenry and the young actors freshen up these overused figures, and director John McPhail exploits their familiarity to generate drollery and shock. Will Tony learn how to stop worrying and realize that Anna is the bomb? Will Nick get his comeuppance and John get what he deserves? Will Chris and Lisa live happily ever after? Will Steph carve out a place for herself as the resident outsider? And will any of these kids get a chance to develop while the clock ticks toward Armageddon? As the most piquant and fully developed song proclaims, “No such thing as a Hollywood ending.”

High School Musical and its sequels took place in East High in Albuquerque, New Mexico, where the glittering red-and-white school halls might have been assembled from brand-new Lego blocks, and all the students were above average in musical-stage skills. Anna and the Apocalypse was filmed during winter break at a high school in Port Glasgow, where the cafeteria feels cramped, the doilies and tinsel look cheap, and the teenagers don’t have to do more than groove to the beat of each pop or rock song. Swire, who shows off Steph’s spiky personality, also did the springy choreography. She doesn’t overtax the performers; she exploits their youthful vitality. The “Hollywood Ending” number unfolds in the lunchroom as unrequited lovers or troubled one-night lovers like Anna own their desperation and make it an ebullient point of pride. Lovebirds Chris and Lisa provide the counterpoint. Swire incorporates girls whipping their long hair around their heads, rows of kids banging their fists, Anna jumping off a table and an exhibitionist doing somersaults. The stream of gyrating, hand-jiving party moves creates a number that works like a reciprocating engine, every piston generating wistful emotion and energy. When the class bell rings, it’s over. (Roddy Hart and Tommy Reilly did the mostly catchy score.)

Sometimes the ideas behind the setpieces are bold enough to carry us past indifferent execution. It makes sense that Assistant Principal Savage would express his devolution from hallway martinet to nihilist with a smattering of Goth rock (and that’s before he turns into a zombie), or that Nick would vent his aggression and his hatred for the zombies in a power-rock anthem called “Soldier at War.” That song has us at hello—or, rather, the potent falsetto “Ah-oooooooo” Nick soars through at the start. Visually, McPhail piles on too many grotesqueries, but he does bring off one sadistic-mischievous series of shots: Nick and his buddies on the march against an undead version of a very young female soccer team.

The movie’s lack of inhibition, natch, is part of its charm. Where the High School Musical series eschews gross-out gags, Anna and the Apocalypse embraces them. Our heroes take out one walking dead by ramming it repeatedly with a toilet seat while its head rests on the bowl. And while the Disney films elevate romantic courtship rites, this movie allows its teens to talk straight. Anna has no guilt or shame that Nick knew her sexually; what angers her is that he dumped her after she opened up to him body and soul. On the flip side, at the Christmas show, Siu’s Lisa sings a “Santa Baby”-style Christmas song full of double-entendres so blatant they’re barely entendres at all. Siu is such a balmy performer that she can examine the phallic potential of her microphone and mike stand and obliterate the distinction between “naughty” and “nice.”

Hunt, who looks like a cross between Anne Hathaway and Katie Holmes, has a lean physicality and intelligence. She can be emotional without getting slushy, and she imbues Anna’s desperation with an air of “let’s get on with it.” Her pulse suits the movie, which clocks in at 92 minutes—five minutes less than its obvious model, Edgar Wright’s Shaun of the Dead. Just enough of a pretty good thing.

Michael Sragow is a contributing editor to Film Comment and writes its Deep Focus column. He is a member of the National Society of Film Critics and the Los Angeles Film Critics Association, and is on the editorial board of Alta: The Journal of Alta California.