This might work:
Hope that helps!
xs=MouseXSpeed() ys=MouseYSpeed() MoveMouse 400,300 If x>360 Then x=0 If x<0 Then x=360 If y<0 Then y=360 If y>360 Then y=0 RotateEntity man,y,-x,0
Hope that helps!