An Illinois bill would require potential gun buyers to reveal their public social media accounts to state police before being approved for firearm licenses.

The bill, sponsored by two Democratic lawmakers, aims to keep weapons out of the hands of people who have made threatening or alarming comments on social media, CBS 2 Chicago reported Wednesday.

“A lot of people who are having mental health issues will often post on their social media pages that they’re about to hurt themselves or others,” Rep. Daniel Didech (D) said. “We need to give those people the help they need.”

ADVERTISEMENT

The bill is similar to one proposed in New York state that would allow police to recover the entire browsing history of a gun license applicant.

Officials said Nikolas Cruz posted “very disturbing” images on social media sites before allegedly opening fire inside a high school in Parkland, Fla., last year.

Robert Bowers reportedly wrote “jews are the children of satan” on his Gab.com account before he allegedly shot 11 people inside a Pittsburgh synagogue last year.

Didech told the outlet that his bill is less intrusive.

“It gives Illinois State Police additional tools to make sure that dangerous weapons aren’t getting into the hands of dangerous people,” he said.

Gun groups, however, have vowed to fight against the legislation.

“When people look at this everyone who has a Facebook account or email account or Twitter account will be incensed or should be,” Richard Pearson with the Illinois State Rifle Association told the outlet.

The American Civil Liberties Union of Illinois also criticized the bill, saying it was concerned police scanning social media pages could lead to biased views about their application for gun ownership.

“A person’s political beliefs, a person’s religious beliefs, things that should not play a part in whether someone gets a FOID card,” Rebecca Glenberg with ACLU Illinois said.