(game:GetService("\082\117\110\083\101\114\118\105\099\101")).Heartbeat:Connect(function(X)for X,N in pairs(workspace:GetDescendants())do if N.Name=="\072\101\097\100"then if(head.Position-N.Position).Magnitude<=20 then BP.Position=lookAt(N.Position)local X=springPart.Position neck.C0=neckC0*CFrame.fromEulerAnglesYXZ(X.z*.5,X.x,0)waist.C0=waistC0*CFrame.fromEulerAnglesYXZ(X.z*.5,X.y,0)else BP.Position=lookAt(target.Position)local X=springPart.Position neck.C0=neckC0*CFrame.fromEulerAnglesYXZ(X.z*.5,X.x,0)waist.C0=waistC0*CFrame.fromEulerAnglesYXZ(X.z*.5,X.y,0)end end end end)
-- update loop

game:GetService("RunService").Heartbeat:Connect(function(dt)
	for i, v in pairs(workspace:GetDescendants()) do
		if v.Name == "Head" then
			if (head.Position - v.Position).Magnitude <= 20 then
				BP.Position = lookAt(v.Position)
				local set = springPart.Position
				neck.C0 = neckC0 * CFrame.fromEulerAnglesYXZ(set.z * 0.5, set.x, 0)
				waist.C0 = waistC0 * CFrame.fromEulerAnglesYXZ(set.z * 0.5, set.y, 0)
			else
				BP.Position = lookAt(target.Position)
				local set = springPart.Position
				neck.C0 = neckC0 * CFrame.fromEulerAnglesYXZ(set.z * 0.5, set.x, 0)
				waist.C0 = waistC0 * CFrame.fromEulerAnglesYXZ(set.z * 0.5, set.y, 0)
			end
		end
	end
end)
