I don't know where u r getting that it's illegal. Certain states have different laws but they aren't illegal. It's a right to own a gun. It's in the constitution.
"In Pennsylvania, the laws regarding firearms involve restrictions on possession, purchase, and carrying. You must be 21 to purchase a handgun, while long guns can be purchased at 18. To carry a firearm concealed or in a vehicle, a license to carry firearms is required. Open carry is generally legal without a permit, but exceptions apply."