You'd need to make a separate function that gets all possible targets and puts them in a numerical table. Then in your aimbot code you'd need to check if the key you want is pressed then make it select the n+1th target.
If you wanted to select the target closest to crosshair you'd need to find the dot (Vector:឵Dot(vec)) product between your shootpos (Player:GetShootPos()) and the target's pos (Player:GetPos()) and check to see which one is the smallest.
Also keys like right alt and right shift don't work iirc. If you don't want to get errors when you see NPCs and error models check to see if the target has the ValveBiped.Bip01_Head1 bone, Entity:LookupBone(bone) returns nil if the entity doesn't have the bone.