You will need an image point where you want the bullet to start at the end of the barrel.
You will make your bullet image have bullet behaviors.
When you press a key to shoot you will spawn the bullet on the gun at that image point and set the direction to the angle the gun is facing.
On Space Key Down: Spawn Bullet at Gun Image Point 1. Set Bullet angle to Gun Angle
That will fire a bullet every time the space key is down.
Get that far and come back if you have problems.