Wow I never imagined Mario holding a gun before.

According to Shiguru Miyamoto the bullets from the gun were switched to fireballs later in the development of the original Mario game.