WARNING: The following contains spoilers for Good Boys, in theaters now.

When six-grader Max (Jacob Tremblay) is invited to a middle-school party in Good Boys, he and friends Thor (Brady Noon) and Lucas (Keith L. Williams) are set on a journey that pushes them to their limits. Despite their youth and naivete, the 12-year-olds end up in situations that might be familiar to older movie fan, re-creating famous sequences from two 1990s classics, The three kids recreate famous sequences from two 1990s classics, Terminator 2: Judgement Day and Boogie Nights.

RELATED: Surprisingly Bittersweet, Good Boys Is a Genuinely Great Comedy

CBR spoke with Good Boys writers Lee Eisenberg and Gene Stupnitsky about why they chose to include those references.

Terminator Run

After accidentally stealing a medicine container full of molly (MDMA) from his teenage neighbor Hannah (Molly Gordon) and her friend Lily (Midori Francis), Max leads his friends away on their bikes. Hannah follows in her car, so the boys try to ride through a park to escape her. Lily immediately jumps out of the car and sprints after them. She quickly catches up, running in the distinctive stiff, robotic way the T-1000 does in Terminator 2: Judgment Day.

RELATED: Once Upon A Time In Hollywood Is Quentin Tarantino's Funniest Film Yet

Boogie Nights

After the boys lose the drugs, they're forced to visit a fraternity house to try and buy some more. That's the only thing that Hannah and Lily will take in exchange for the drone Max needs to return to his house. The three boys are quickly terrified of the frat house, and nervously try to complete the deal until Benji (Josh Caras) orders them out. A panicking Max pulls out a paintball gun and shootsa number of the frat boys as the trio desperately escapes with the drugs.

This scene is patterned after a similar sequence in Boogie Nights. Toward the end of the 1997 drama, about porn stars in the 1970s and '80s, a desperate Dirk (Mark Whalberg) and Reed (John C. Reily) try to scam a drug dealer with their friend Todd (Thomas Jane). The situation quickly escalates into a shootout that Dirk and Reed barely escape from. The chaos of the sequence is mimicked by Good Boys.

RELATED: Stuber Is Not A Ride Worth Taking

Why They Did It

The homages come as a bit of a surprise, because they're so far removed from the film's subject matter. Director and co-writer Gene Stupnitsky explained they used these re-creations because, "doing any of those classic film scenes with children is just funny."

"It's one of the reasons we wanted to do the movie. We always thought of it as an action movie with kids," he said. "There's less action as there originally was, but there's still action, like the highway and the frat house. There are these cinematic touchstones we would touch upon and put children into."

For Eisenberg, the scene in the fraternity house recreating Boogie Nights especially stood out. "Frat houses in movies aren't usually treated as a dangerous place," he said. "But if you're a 12-year-old where there are 20-year-olds, that would be terrifying. Plus, the movie takes place almost all during the day. Sometimes, even Adventures in Babysitting is in the nighttime, and this is they're just going through the day and interacting with strangers and being terrified about it. But it's all at three o'clock in the afternoon and at any moment they could just call one of their Moms and she's probably be 30 seconds away."

Director Gene Stupnitsky's Good Boys stars Jacob Tremblay, Brady Noon, Keith L. Williams, Midori Francis, Molly Gordon, Will Forte, Retta and Sam Richardson.