Dual-purpose gun