There are a number of ways to do this depending on how the game mechanics work in your game.
You could set a sprite that represents gun1 and another for gun2. Depending on what they fire will come from those gun's custom imagepoint you can set with their separate events for how they fire. Create a Boolean for Equipped.
When gun 1 is selected set Boolean to true for Gun1 and false for the other. And vise versa.
When Equipped is true, create and pin the gun to your character sprite.
There are other methods available too, some may be even better than this. Try working through it and post what you have. Until you try to implement it you may find yourself coming back to the board again and again rather than learning how to set this events up yourself.