No no, we can't have a sword shooting gun. We'll go with the next best thing, a spike gun.
Or better yet. A hand-held automatic railgun that shoots hyper-velocity, armor-piercing, anti-matter tipped, depleted uranium, mini spikes or HVAPATDU rounds.

And the range of the railgun? Lets just say it will shoot the rounds so fast, if the spikes don't hit anything, they'll leave orbit. THATS how fast they'll be going, so hence the "hyper-velocity" in the round name. Oh, and they'll be connected to a battle suit that has a large ammo pack attached to it. Or it can self-replicates the ammo, depends on what your preference is.
That would be nearly the best gun ever made. I have a even better one in mind, but that may sound even more ridiculous.