An ex-South Carolina lawmaker formally pleaded guilty to multiple counts of distributing child sex abuse material.