A student was arrested for having a gun on the campus of a Pasco County high school, the sheriff's office said.