As jointly written and directed by Jon Lucas and Scott Moore, the suburban-set comedy “Bad Moms” (STX) has some valid points to make about the challenges of modern parenting.

Yet their script’s preoccupation with jokes about how kids get here in the first place overshadows the positive aspects of the duo’s film.

More damagingly, they also send an ambiguous message about marital fidelity that viewers of faith would find convoluted at best.

Their plot, at least, is straightforward enough: stressed-out mother Amy Mitchell (Mila Kunis) reaches her breaking point and rebels against her taxing daily routine. She demands that her teenage son, Dylan (Emjay Anthony), and tween daughter, Jane (Oona Laurence), start fending for themselves in minor ways. And she begins indulging herself by skipping work, drinking and relaxing.

Aided by two other like-minded moms — timid housewife Kiki (Kristen Bell) and raucous loudmouth Carla (Kathryn Hahn) — Amy also takes on aggressive perfectionist Gwendolyn James (Christina Applegate), the bullying head of her local PTA.

One of the factors contributing to Amy’s revolt is her discovery that her good-for-nothing husband, Mike (David Walton), has been having an online affair for the better part of a year. For most of the movie, she wavers between trying to repair her marriage and dumping Mike for Jessie (Jay Hernandez), the widowed father of one of her daughter’s classmates.

The dialogue suggests that Amy and Mike’s union may have been flawed from the start. She was only 20 when they married, we’re told, and they were trying to do the right thing since she was pregnant. So presumably their case would not be laughed out of court at a marriage tribunal. On the other hand, Amy’s fresh romance turns physical long before any potential divorce proceedings have even begun.

The screenplay’s outlook on sexuality in general, moreover, is low-minded and excessively permissive. Moviegoers are meant to be amused, for instance, when Carla experiments with same-sex kissing at a wild party.

Such indulgence extends to drugs as well. In a scene where a roomful of mothers are taking turns confessing their shortcomings as parents, one acknowledges confiscating her kid’s marijuana, then smoking it herself.

So, while it scores some points for its observations about exhausted grownups and over-scheduled children, moral sloppiness earns “Bad Moms” a failing grade.

The film contains strong sexual content including full nudity, brief masturbation and semi-graphic adultery, a frivolous attitude toward homosexual acts and narcotics use, pervasive sexual humor, about a half-dozen uses of profanity, and constant rough and crude language. (O, R)