coroutine.resume(coroutine.create(function()while RunSrv.RenderStepped:wait()and(Hum:GetState()).Value~=15 do local n=Cam.CoordinateFrame if(IsR6 and Body.Torso or Body.UpperTorso)~=nil and Body.Head~=nil then local M=Trso.CFrame.lookVector local h=Head.CFrame.p if(IsR6 and Trso.Neck or Head.Neck)~=nil then if Cam.CameraSubject:IsDescendantOf(Body)or Cam.CameraSubject:IsDescendantOf(Plr)then local P=nil local L=nil if not MseGuide then P=(Head.CFrame.p-n.p).magnitude L=Head.CFrame.Y-n.Y if not IsR6 then Neck.C0=OrgnC0*Ang(aSin(L/P)*Fctor,-((h-n.p).Unit:Cross(M)).Y,0)else Neck.C0=OrgnC0*Ang(-(aSin(L/P)*Fctor),0,-((h-n.p).Unit:Cross(M)).Y)end else local n,V=Wrks:FindPartOnRay(Ray.new(Head.CFrame.p,Mouse.Hit.lookVector),Wrks,false,true)P=(Head.CFrame.p-V).magnitude L=Head.CFrame.Y-V.Y if not IsR6 then Neck.C0=OrgnC0*Ang(-(aTan(L/P)*Fctor),((h-V).Unit:Cross(M)).Y*Fctor,0)else Neck.C0=OrgnC0*Ang(aTan(L/P)*Fctor,0,((h-V).Unit:Cross(M)).Y*Fctor)end end end end end end end))


coroutine.resume(coroutine.create(function()
	while RunSrv.RenderStepped:wait() and Hum:GetState().Value~=15 do	--[ Adding wait() here is the same as adding wait() later. ]
		local CamCF = Cam.CoordinateFrame
		--local MsePos = Mouse.Origin.p	--[ Might do something with this in a future update... ]
		if ((IsR6 and Body["Torso"]) or Body["UpperTorso"])~=nil and Body["Head"]~=nil then	--[ Check for the Torso and Head... ]
			local TrsoLV = Trso.CFrame.lookVector
			local HdPos = Head.CFrame.p
			if ((IsR6 and Trso["Neck"]) or Head["Neck"])~=nil then	--[ Make sure the Neck still exists. ]
				if Cam.CameraSubject:IsDescendantOf(Body) or Cam.CameraSubject:IsDescendantOf(Plr) then
					local Dist = nil;
					local Diff = nil;
					if not MseGuide then	--[ If not tracking the Mouse then get the Camera. ]
						Dist = (Head.CFrame.p-CamCF.p).magnitude
						Diff = Head.CFrame.Y-CamCF.Y
						if not IsR6 then	--[ R6 and R15 Neck rotation C0s are different; R15: X axis inverted and Z is now the Y. ]
							Neck.C0 = OrgnC0*Ang((aSin(Diff/Dist)*Fctor), -(((HdPos-CamCF.p).Unit):Cross(TrsoLV)).Y, 0)
						else	--[ R15s actually have the properly oriented Neck CFrame. ]
							Neck.C0 = OrgnC0*Ang(-(aSin(Diff/Dist)*Fctor), 0, -(((HdPos-CamCF.p).Unit):Cross(TrsoLV)).Y)
						end
					else
						local _, Point = Wrks:FindPartOnRay(Ray.new(Head.CFrame.p, Mouse.Hit.lookVector), Wrks, false, true)
						Dist = (Head.CFrame.p-Point).magnitude
						Diff = Head.CFrame.Y-Point.Y
						if not IsR6 then
							Neck.C0 = OrgnC0*Ang(-(aTan(Diff/Dist)*Fctor), (((HdPos-Point).Unit):Cross(TrsoLV)).Y*Fctor, 0)
						else
							Neck.C0 = OrgnC0*Ang((aTan(Diff/Dist)*Fctor), 0, (((HdPos-Point).Unit):Cross(TrsoLV)).Y*Fctor)
						end
					end
				end
			end
		end
	end
end))
