In one of my penetrations of the old Soviet Union back in the late 1970's I met up with Russian CIA. Guns were illegal for ordinary Soviets. A Soviet Citizen found with a gun would be sent to prison. Guns were outlawed. The CIA in Russia, however, had pistols.
How did they get guns? The CIA didn't give them guns--it wasn't necessary! They bought guns on the Black Market--along with outlaws and weirdos. They cost more. A semi-auto cost a month's pay. But Black Market guns were available. Lunatics could buy guns!
The Soviet anti-gun law was as tough as any law could be. It was enforced by the police and backed by the KGB!
Outlaw guns to stop shootings? IT DOESN'T WORK! Because it makes Law Abiding Citizens defenseless. Law Abiding Citizens can only scream, run, and pray.