Source: Dungeon Masters Guide

If you want to model the swashbuckling style of The Three Musketeers and similar tales, you can introduce gunpowder weapons to your campaign that are associated with the Renaissance. Similarly, in a campaign where a spaceship has crashed or elements of modern-day Earth are present, futuristic or modern firearms might appear. The Firearms table provides examples of firearms from all three of those periods. The modern and futuristic items are priceless.

Renaissance Items

Martial Ranged Weapons Cost Damage Weight Properties
Pistol 250 gp 1d10 piercing 3 lb. Ammunition (range 30/90), loading
Musket 500 gp 1d12 piercing 10 lb. Ammunition (range 40/120), loading, two-handed
Ammunition Cost Weight
Bullets (10) 3gp - 2 lb. -

Modern Items

Marital Ranged Weapons Cost Damage Weight Properties
Pistol, automatic - 2d6 piercing 3 lb. Ammunition (range 50/150), reload (15 shots)
Revolver - 2d8 piercing 3 lb. Ammunition (range 40/120), reload (6 shots)
Rifle, hunting - 2d10 piercing 8 lb. Ammunition (range 80/240), reload (5 shots), two-handed
Rifle, automatic - 2d8 piercing 8 lb. Ammunition (range 80/240), burst fire, reload (30 shots), two-handed
Shotgun - 2d8 piercing 7 lb. Ammunition (range 30/90), reload (2 shots), two-handed
Ammunition Cost Weight
Bullets (10) - - 1 lb. -

Futuristic Items

Martial Ranged Weapons Cost Damage Weight Properties
Laser pistol - 3d6 radiant 2 lb. Ammunition (range 40/120), reload (50 shots)
Antimatter rifle - 6d8 necrotic 10 lb. Ammunition (range 120/360), reload (2 shots), two-handed
Laser rifle - 3d8 radiant 7 lb. Ammunition (range 100/300), reload (30 shots), two-handed
Ammunition Cost Weight
Energy cell - - 5oz. -

Proficiency

It's up to you to decide whether a character has proficiency with a firearm. Characters in most D&D worlds wouldn't have such proficiency. During their downtime, characters can use the training rules in the Player's Handbook to acquire proficiency, assuming that they have enough ammunition to keep the weapons working while mastering their use.

Properties

Firearms use special ammunition, and some of them have the burst fire or reload property.

Property Description
Ammunition The ammunition of a firearm is destroyed upon use. Renaissance and modern firearms use bullets. Futuristic firearms are powered by a special type of ammunition called energy cells. An energy cell contains enough power for all the shots its firearm can make.
Burst Fire A weapon that has the burst fire property can make a normal single-target attack, or it can spray a 10-foot-cube area within normal range with shots. Each creature in the area must succeed on a DC 15 Dexterity saving throw or take the weapon's normal damage. This action uses ten pieces of ammunition.
Reload A limited number of shots can be made with a weapon that has the reload property. A character must then reload it using an action or a bonus action (the character's choice).