Is it the testis that hurts or the scrotum when a guy gets hit in the crotch?

Testes. The excruciating pain associated with general trauma is usually testicular in origin and not the scrotal skin.
Usually the testis. The testis are vulnerable to contusion in the scrotum when hit or crushed.