function ok.CheckAAA(ply, ang)
local pitch = ang.x
local yaw = ang.y
local roll = ang.z
if roll != 0 then
if roll == 90 then
if 0 > pitch then
pitch = 89
else
pitch = -89
end
end
if roll == 270 or roll == -90 then
yaw = yaw + 180
end
else
if pitch >= 86 and 179 > pitch then
pitch = 89
elseif pitch >= 179 then
pitch = -91
end
end
ply:SetPoseParameter("aim_pitch", pitch + 180)
ply:SetPoseParameter("head_pitch", pitch - 90)
ply:SetRenderAngles(Angle(-89, math.NormalizeAngle(yaw), 180))
end