The lightning gun was a weapon made by Ganathans. Empatojayos Brand had one installed on the Millennium Falcon after it was damaged by the Slave I during a dogfight on Nar Shaddaa.
While noticeably "antique," as was much of Ganathan technology, the lightning gun was quite effective when paired to a modern power plant, as Boba Fett discovered when the Millennium Falcon battled the Slave I. Armed with a lightning gun to replace the portside bow mandible damaged in a prior clash with Fett, the Falcon was able to take out Slave I, requiring Fett to put the damaged vessel in drydock for several years. During the Imperial attack on the planet New Alderaan, the weapon was able to destroy at least one AT-AT.