made in 40 min.
`Start in the center of the screen
PosX#=640/2
PosY#=480/2
`Hide the mouse, duh, what does it look like?
hide mouse
`do the damn code
do
`Detemine what to do based on RGB values
if R#=255 and G#=255 and B#=255 then flag#=1
if R#=0 and G#=255 and B#=255 then flag#=2
if R#=0 and G#=0 and B#=255 then flag#=3
if R#=0 and G#=0 and B#=0 then flag#=4
if R#=255 and G#=0 and B#=0 then flag#=5
if R#=255 and G#=255 and B#=0 then flag#=6
`Change the RGB values based on the value of the flag# variable
if flag#=1 then R#=R#-1
if flag#=2 then G#=G#-1
if flag#=3 then B#=B#-1
if flag#=4 then R#=R#+1
if flag#=5 then G#=G#+1
if flag#=6 then B#=B#+1
`Collor the box
ink RGB(R#,G#,B#),0
`when the timer runs out, randomise the X# variable
`note: I couldn't get screen width() in the X# random
if timer#=0 then X#=RND(640):timer#=RND(50)+10
timer#=timer#-1
`Get the box to chase after the X# and Y# values
if PosX#<X# then PosX#=PosX#+1
if PosX#>X# then PosX#=PosX#-1
if PosY#<Y# then PosY#=PosY#+1
if PosY#>Y# then PosY#=PosY#-1
`If the box tends to go offscreen, send it to the other side of the screen
if PosX#<10 then X#=640
if PosX#>screen width()-10 then X#=0
if PosY#<10 then Y#=480
if PosY#>screen height()-10 then Y#=0
`Prevent the box from going straight down- or upwards
if PosX#=X# then X#=RND(640)
`draw the box (10*10 px)
box PosX#-10,PosY#-10,PosX#+10,PosY#+10
`loop the damn code
loop