I tried making a timer to detect when the pixel changes color and the mouse will move to another place. But i dont seem to get it working up.
In the Timer2_Tick i put like this

If GetPixelColor(x1, y1) <> c1 Then

Windows.Forms.Cursor.Position = New Point(x, y)
'Moves the mouse cursor
stops = True
End If
c1 = GetPixelColor(x1, y1)
'Pause the loop
Loop Until stops = True

But it just doesnt seems to work out.