You can't. The datablock is defined the first time the file is run, and then it doesn't matter what file created the datablock, it's still the datablock for a weapon. Furthermore, altering the datablock would change it for everyone using the gun at the moment, if the engine will even allow you to alter it.
You could just give the player an identical looking image with a different datablock(that is modified to do something different when it fires), but I suspect that there is a better way to do what you intend it to do.
Also, you cannot make something serverside controlled by a specific key for the clients, you can only make it respond to keys they already use, like the light key, or the paint key, or jumping, crouching, jetting, etc.. Or a /command, or a client add-on that adds a new key that the server can respond to.