they should not be nested inside the first condition.
on mouse clicked add 1 to difficulty
if difficulty =1 set animation frame to 1 and set system difficulty to medium
if difficulty =2 set animation frame to 2 and set system difficulty to hard
if difficulty =0 set animation frame to 3 and set system difficulty to easy
if difficulty is => 3 set difficulty to 0