While federal courts have upheld the Trump administration’s ban on bump stocks, gun rights advocates are vowing to press forward in a separate legal battle to try to force the government to at least compensate them for their surrendered or destroyed property.

One of the co-founders of Texas-based RW Arms, which destroyed more than 70,000 bump stocks ahead of the effective date of the ban last month, said the company took an estimated hit of more than $20 million in the process.

“It is going to hurt us — about 40% of our company was in bump stock sales — but we’re going to continue on,” said RW Arms co-founder Mike Stewart.

Mr. Stewart’s group announced earlier this month that it had joined with The Modern Sportsman, a Minnesota-based company, to sue the federal government, arguing that the ban is an unconstitutional taking of property without compensation in violation of the Fifth Amendment.

The lawsuit, filed in federal claims court in Washington, D.C., said the company destroyed 73,462 bump stocks in order to comply with the ban, and that Mr. Stewart destroyed 25 of them.

Bump stocks, which attach to semiautomatic rifles to mimic the firing rate of machine-guns, gained attention after the October 2017 Las Vegas massacre, in which the gunman used the devices to rain down fire on concert-goers, killing 58 people and wounding hundreds of others.

The Trump administration said it took a “fresh look” at the issue after the Las Vegas shooting.

During the George W. Bush and Barack Obama administrations, the Bureau of Alcohol, Tobacco, Firearms and Explosives (ATF) ruled multiple times that the devices themselves weren’t weapons and so the federal government couldn’t regulate them.

The public is generally banned from owning or possessing machine guns made after 1986.

The lawsuit says that owners of the devices had an “investment-backed expectation” in their bump stocks as firearm accessories because that’s how the ATF had long classified them.

“The final rule’s unprecedented requirement that bump stocks be surrendered or destroyed within a 90-day period, with no opportunity for registration, effected a taking under the 5th Amendment of the United States Constitution,” it says.

The Fifth Amendment restricts the use of eminent domain, saying that the government can’t take private property for public use without providing “just compensation.”

“Most people don’t like bump stocks — it is what it is,” Mr. Stewart said. “But [I] try to tell people it’s not about the bump stock — it’s about the overreach of the government infringing on the Second Amendment. If they can do this with bump stocks, what’s going to stop them from going forward with more?”

An ATF spokeswoman said the agency cannot comment due to pending litigation.

When it published the final rule outlining the ban in December, the administration said it received more than 1,200 comments during the public comment period arguing that the ban would violate the Fifth Amendment.

But the government pointed to past case law that said a restriction on “dangerous articles” by the government to protect public safety and welfare does not qualify as a taking that would require compensation.

Other gun-rights groups have petitioned the courts to try to block the ban, which took effect March 26. But they’ve been rebuffed, including by the Supreme Court.

Still, Mr. Stewart says they’re trying to stay optimistic.

“Look, we can’t beat ourselves up. It happened. We can fight and continue to fight with it, and hope for a great outcome but along just keep our business going and putting one foot in front of the other. It’s all you can do,” he said. “We will follow the law, continue to follow the law, but at the same time it isn’t right and we’re going to fight it.”