Opt("WinDetectHiddenText", 1) Opt("MouseCoordMode", 2) ; 2 = relative coords to the client area of the active window Opt("PixelCoordMode", 2) WinWait("Unreal Flash", "") If Not WinActive("Unreal Flash", "") Then WinActivate("Unreal Flash", "") WinWaitActive("Unreal Flash", "") HotKeySet("{END}", "Terminate") ;~ Color = 0x000099 enemy HP bar ;~ +30 on y to hit head $bot = 0 $HP_Bar = 0x000099; Pixel color being searched for While $bot = 0 $coord = PixelSearch(30, 55, 850, 450, $HP_Bar, 1);$Shadevar) ; Looking for the Pixel "Left,Top,Right,Bottom" If Not @error Then Call("headshot") ;~ MsgBox(0, "", $coord[0] & " <-- X and Y --> " & $coord[1]) MouseClick("left", $coord[0], $coord[1], 2, 1) WEnd Func headshot() $coord[1] = $coord[1] + 10 EndFunc ;==>headshot