Hawley’s proposed bill, outlined Wednesday, covers games explicitly targeted to players younger than 18 as well as those for broader audiences where developers are aware that kids are making in-game purchases. Along with outlawing loot boxes, these video games also would be banned from offering “pay to win” schemes, where players must spend money to access additional content or gain digital advantages over rival players.

“Social media and video games prey on user addiction, siphoning our kids’ attention from the real world and extracting profits from fostering compulsive habits,” Hawley said in a statement. “No matter this business model’s advantages to the tech industry, one thing is clear: There is no excuse for exploiting children through such practices.”

Offering one “notorious example,” Hawley’s office pointed to Candy Crush, a popular, free smartphone puzzle app that allows users to spend $149.99 on a bundle of goods that include virtual currency and other items that make the game easier to play.

A spokesman for the game’s publisher, Activision Blizzard, declined to comment.

“When a game is designed for kids, game developers shouldn’t be allowed to monetize addiction,” Hawley said. “And when kids play games designed for adults, they should be walled off from compulsive microtransactions.”

Purchases made within games — often called “micropayments” or “in-app purchases” — have come under scrutiny in recent years, in part, because children often use their parents’ credit cards or other payment methods to rack up charges that can run into the hundreds or thousands of dollars.

Parents have complained to the Federal Trade Commission that such charges often happen without their permission or end up being much larger than they expect. A federal court in 2016 found that Amazon unfairly charged parents for purchases their children made while using apps that were marketed as “free.” (Amazon chief executive Jeff Bezos owns The Washington Post.)

Loot boxes, which can be bought or offered as rewards for achieving certain goals within a game, also have come under fire over concerns that they encourage addictive behavior, especially by children. Like slot machines, loot boxes offer visual stimulation — often through an explosion of colors and other animated action — along with what psychologists call “variable rewards,” meaning outcomes that are better or worse depending on seemingly random factors.

Fearing the risks of addiction, regulators in Belgium, Japan and China have taken aim at loot boxes and other in-game microtransactions over the past year, resulting in some video-game companies pulling their titles from entire markets to comply with local restrictions.

The Entertainment Software Association, a top lobbying group for the video game industry, countered by pointing to other countries, including Ireland and Germany, that “determined that loot boxes do not constitute gambling.”

“We look forward to sharing with the senator the tools and information the industry already provides that keeps the control of in-game spending in parents’ hands,” Stanley Pierre-Louis, the group’s acting president, said in a statement.

U.S. policymakers also have explored new regulation: States, including California and Washington, have considered their own legislation in recent years, though none of the proposals has become law. In the nation’s capital, FTC Chairman Joe Simons in November committed the agency to looking into loot boxes, though he later declined to detail in a letter to Congress if the commission had opened any investigations targeting specific video games or their practices.

The pledge came in response to Democratic Sen. Maggie Hassan (N.H.), who said the practice of paying for random loot had a “close link to gambling.” Instead, the FTC said months later it would convene a policy workshop in August to study the “techniques used to market loot boxes and whether minors are becoming addicted.”

The agency would play a key enforcement role if Hawley’s bill is enacted, along with state attorneys general, who would gain the ability to bring lawsuits against video game makers. The proposal gained early support Wednesday from groups that advocate on behalf of parents.