Atlanta (CNN Business) It's become a widespread hack for a lot of games. If you get stuck on a certain level or run out of lives, there are bundles or upgrades you can pay for to help you get through it.

A new bill could do away with such in-app purchases.

Missouri Senator Josh Hawley announced plans to introduce legislation that would ban video games from offering microtransactions like "loot boxes," or a random assortment of virtual rewards available to players for purchase.

The bill would also ban "pay-to-win" designs, which entice players to spend money either to surpass "artificial" levels of difficulty or to gain competitive advantages over other 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 on his website. "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."

Read More