That's super easy. Aim hacks hit the same point. Record the event with the exact point aimed at to cause the guy (assuming hit scan system instead of projectile), and compare the last x number of hits. If the last x hits are all the same location(s), suspend or flag for human review depending on resources.
Alternatively, track last x seconds before the fire button was pressed, compare to last several shots.
Scripts do not behave like humans, they aim predictably. After x number of shots, you can always programmatically detect them.