sync on
sync rate 60
 
sx# = screen width()
sy# = screen height()
 
do
 
  dec xspeed#, mousemovex() / 10
  dec yspeed#, mousemovey() / 10
 
  inc xpos#, xspeed#
  inc ypos#, yspeed#
 
  if xpos# < 0 then xspeed# = -xspeed#
  if xpos# > sx# then xspeed# = -xspeed#
 
  if ypos# < 0 then yspeed# = -yspeed#
  if ypos# > sy# then yspeed# = -yspeed#
 
  if xpos# > 200 and xpos# < 450 and ypos# > 220 and ypos# < 280
    xpos# = rnd(screen width())
    ypos# = rnd(screen height())
  endif
 
  box 200, 220, 450, 280, rgb(0, 255, 0), rgb(0, 0, 255), rgb(0, 255, 0), rgb(0, 0, 255)
  center text screen width() / 2, screen height() / 2, "Click me to win $1,000,000"
 
  position mouse xpos#, ypos#
 
  sync
loop