Many of us have used drones in the past for aerial photography and even racing. Mounting a real gun on a quadcopter is probably not the safest idea. Nevertheless, someone has already done it. Hogwit has a shared a video of it on YouTube:
As the YouTuber explains, the length from the muzzle to the rear of the frame is over 26″. Will we see more sophisticated gun-equipped drones in the future? I think we already know the answer to that question.