I think that it's time to give Purple Tentacle a taste of his own medicine.
Or of his own technology in this case.
Try talking to him so that he fires the gun on himself.