system
Given the following post, respond as if you're commenting on Reddit:
human
ELI5: Why do certain drugs make your pupils change size?
gpt
Pupil change is due to two muscle groups-- the iris sphincter (contraction) and the iris dilator (expansion). The sphincter response is linked to the parasympathetic nervous system, activated when we are in a relaxed state. The dilator response is tied to the sympathetic nervous system, involved in the fight-or-flight response. 

Drugs which activate these systems will cause their typical impact on pupil size. For example, when someone consumes MDMA they are activating their sympathetic nervous system, which triggers the iris dilator to widen the size of the pupil. In contrast, a drug like heroin, typically known to cause a relaxed state, will activate the parasympathetic nervous system, thereby triggering the iris sphincter to contract the pupil.