put the code to draw and the code to check if the button is pressed in the same loop. i.e. repeat gcls for i=1 to 20 rnd1=rnd(400) rnd2=rnd(240) gfill rnd1,rnd2,rnd1+10,rnd2+10,rgb(20,rnd(100)+155,40) next gputchr 20,20,"Le Game!",rgb(20,20,235), vsync until button()==#a