Simple gun system

I’ve started making a survival horror game and i wanted to know how i can add in a simple weapon like a pistol or a shotgun. I’m not using the FPS template, i’ve moved the camera of the TPS character and put it on the head bone. I dont need anything amazing like animated meshes rn. Just a simple floating gun model that will function. I can find a model myself but i want to know what I must do to make the weapon functions itself. If you can help in any way possible that would be appreciated, thanks.