Entertainment

Dirty book

“The Book of Mormon” stars Andrew Rannells (center) and Josh Gad as young missionaries sent to Uganda. (
)

THE FOLLOWING PROGRAM CONTAINS COARSE LANGUAGE AND DUE TO ITS CONTENT SHOULD NOT BE VIEWED BY ANYONE. — “South Park” disclaimer

On basic cable, “South Park” creators Trey Parker and Matt Stone give it to you straight: Our sense of humor, they warn, is so twisted that nobody should even consider tuning in, lest they be turned into a pillar of salt or become so offended that they die right in front of the TV.

For the debut of their first Broadway musical, “The Book of Mormon,” which is currently in previews at the Eugene O’Neill Theatre and opens on Thursday, the disclaimer has been toned down to a mere “Contains explicit language.” Which doesn’t necessarily prepare audiences for repeated lines such as “I’m going to go out and rape a baby” — a riposte that gets laughs every time.

Like “South Park,” “The Book of Mormon” manages to be both wildly inappropriate and uproariously funny. Even as it skewers Mormonism and religion in general — one number is called “F – – k You, God” — it also holds up faith as one of humanity’s best traits.

“ ‘South Park’ has been on the air for 15 years. While I like to think that’s mostly because it’s funny, I don’t think it would have lasted this long if it didn’t have a big heart,” Stone tells The Post. “It’s always something we think about. You need sweet and salty. You can’t do one without the other.”

Combine that approach with some of the catchiest, funniest songs Broadway has ever heard, and you have a sensation. Producers report that ticket sales spike every night after 10:30, because audiences leave the theater and tell their friends, “You’ve got to see this show.”

So far, no higher power has seen fit to smite the theater. (“Spider-Man: Turn Off the Dark” should be so lucky.)

“The Book of Mormon,” co-created with “Avenue Q” co-writer Bobby Lopez, follows two young Mormon missionaries, Elder Price and Elder Cunningham, charged with converting lost souls in Uganda. When the pair are exposed to the realities of Ugandan life — poverty, AIDS and murderous warlords — their fates take surprising turns.

At first, it’s easy to believe that the show’s intent is to tear Mormonism to shreds, ridiculing as it does the story of Joseph Smith, including how he conveniently wasn’t allowed by God to show his recruits proof of their communication. After the missionaries fail to convince the Africans that the Book of Mormon can solve their problems, the natives are then introduced to — and joyously embrace — an altered version of the tale. Without giving too much away, let’s just say that Darth Vader plays a role, as do illicit acts with frogs.

The comfort that the Ugandans find in this ersatz version of Mormonism is where the musical slowly, and surprisingly, starts to actually celebrate true faith.

“Trey and I definitely wanted to do a happy show about religion — a pro-faith show,” says Stone, who is an atheist. “[We wanted] something that was less interested in whether the stories of any religion are true than whether they inspire happiness.”

“We all believe faith is a good thing,” adds Lopez. “Even knowing that some religious stories might not be 100 percent the truth, we realized that we shared this view.”

Lopez had long considered writing a show about Smith and Mormonism, while Parker and Stone have dealt with the religion numerous times, including on “South Park” and in their 1997 film “Orgazmo,” which starred Parker as a squeaky-clean Mormon missionary who gets drawn into doing porn.

“We always thought it was a more interesting religion than people gave it credit for,” says Stone, who, like Parker, grew up in a Mormon-heavy section of Colorado. “It’s a minority religion in America, but it’s a purely American religion.”

But however strong their desire to create a pro-faith tale, it had to occur within a funny and entertaining show. The delicate balance between the two — coupled with the creators’ penchant for breaking barriers of “acceptable” content — provided huge challenges and, ultimately, comedic rewards.

When Elders Price and Cunningham arrive in Uganda, they find a community so desperate that some members believe the only way to rid themselves of AIDS is to have sex with children — a notion that has actually taken hold in some African countries.

The writers admit that using this scenario as a go-to laugh line — just one of several that is barely, if at all, printable in this newspaper — was both a delicate enterprise, and an act of faith all its own.

“You just have no idea when you’re writing this stuff if you’re gonna get away with it,” says Lopez. “That’s part of the danger and excitement of theater,”

“That line itself — we introduce [the man who says it] in a song where we say, this guy’s a f – – k- ing a – – hole and he’s gonna rape babies,” says Stone. “We don’t laugh at that fact. There’s a moral judgment on that. What you’re laughing at is the flippancy of it.”

Josh Gad, who plays Elder Cunningham, has been with the project since its first workshops three years ago. As a frequent contributor to “The Daily Show,” he likes cutting satire, but even he was initially concerned by what Lopez, Stone and Parker had come up with. Especially when the first song he heard was the “Lion King”-inspired ditty “F – – k You, God.”

“When I heard that song, I called up my team and said, ‘I don’t know if I can do this,’” he says. “It’s not that I’m a very religious person. It’s just that I didn’t want to get shot.”

“We were just trying to tell the story of a place that feels like God’s forgotten about it,” says Stone. “It seemed cool to start in a place where you say, ‘F – – k you, God,’ and end at a place where you say, ‘Thank you, God.’ ”

In another number, Elder Price imagines a descent into hell where he sees Jeffrey Dahmer, Adolf Hitler (decked out in shiny, devil-red Nazi regalia) and O.J. Simpson lawyer Johnnie Cochran pantomiming grotesquely while singing a festive tune. He says the creators understood the weight of not just the material, but the responsibility they were placing on the actors.

“On the first day,” Gad says, “they give a disclaimer about the material, that they were testing it out because they weren’t sure if anybody other than animated characters could get away with saying that kind of stuff.”

Mitigating possible offenses in live theater is also furthered by noting, as Lopez does, that the line between hilarious and offensive is ultimately drawn not by the creators, but by the audience.

“There’s absolutely nothing fun about offending people without making them laugh,” Lopez says. “It’s just not what we’re about.”

What they are about is the message that even atheists and agnostics can appreciate the virtues of faith.

“The Africans regain their faith in God and the hope and spirit to deal with their problems,” says Lopez. “That’s where the values of the play lie.”