The expletives start early in the new comedy “Good Boys.” In one of the first scenes, 12-year-old Max (Jacob Tremblay of “Room,”), playing in his bedroom, enhances a female video-game character to make her breasts larger. “Fudge, yeah!” he says enthusiastically, except with a much saltier word in place of that “fudge.” That sets the stage for a raunchy yet sincere movie that feels something like “Superbad” meets “The Sandlot,” by way of “American Pie.”

Making their feature debuts, Brady Noon and Keith L. Williams star alongside Tremblay as sixth-grade buddies who call themselves the Bean Bag Boys. The movie , which opens Aug. 16, follows them on a one-day adventure that has them spying on high-school girls, skipping school, going to kissing parties and cursing like sailors.

It is the latest example of movies that have put naughty language into the mouths of youngsters to comic effect. In the 2010 action comedy “Kick-Ass,” Chloë Grace Moretz, 11 at the time of filming, used harsh words and harsher violence when playing Hit Girl , which rankled some critics. In the 2008 comedy “Role Models,” Bobb’e J. Thompson spouted expletives like a fountain, and in the 1986 R-rated “Stand by Me,” its preteens used profanity liberally. “Good Boys” has plenty in common with that film , but more than its predecessors, it derives considerable humor from the characters’ mistaken or uninformed views of sexuality. The filmmakers had to discover for themselves how to handle 11- and 12-year-olds delivering very adult dialogue on risqué topics. In some cases, the solution involved their parents.