function Animate(c,X,o,K,V,R)SetWelds()weld1C1=c weld2C1=X weld3C1=o tweldC1=K;(TweenService:Create(neck,TweenInfo.new(V),{C0=OriginalC0*CFrame.Angles(Answer,0,NeckRotation)})):Play()SEs.FireClient:FireServer(k,"\065\110\105\109\097\116\101\070\069",{c;X;o;K},V,Answer,0,NeckRotation,chr,Tool.Hig.Value)if script:IsDescendantOf(chr)then(TweenService:Create(weld1,TweenInfo.new(V),{C1=c*CFrame.new(0,Tool.Hig.Value,0)})):Play();(TweenService:Create(weld2,TweenInfo.new(V),{C1=X*CFrame.new(0,Tool.Hig.Value,0)})):Play();(TweenService:Create(weld3,TweenInfo.new(V),{C1=o*CFrame.new(0,Tool.Hig.Value,0)})):Play();(TweenService:Create(tweld,TweenInfo.new(V),{C1=K*CFrame.new(0,Tool.Hig.Value,0)})):Play()end if R then V=V+R end wait(V)end chr.Humanoid.Died:connect(function()game.Workspace.CurrentCamera.FieldOfView=70 end)Mouse.Move:connect(function()local c=Player:GetMouse()local X=c.Hit.p local o=head.Position.Y-X.Y local K=(head.Position-X).magnitude Answer=math.asin(o/K)Gyro.cframe=c.Hit if Stance~="\078\111\116\104\105\110\103"then Answer=0 else if Stance=="\078\111\116\104\105\110\103"then if Answer>math.rad(20)then Answer=math.rad(20)elseif Answer<math.rad(-10)then Answer=math.rad(-10)else if torso.Parent.Humanoid.Sit then Answer=0 end end end end if Stance=="\078\111\116\104\105\110\103"then SEs.FireClient:FireServer(k,"\065\103\108\105\110",chr,Answer,{Answer,0;NeckRotation},.1,Turning)if not Turning then(TweenService:Create(neck,TweenInfo.new(.1),{C0=OriginalC0*CFrame.Angles(Answer,0,NeckRotation)})):Play()end;(TweenService:Create(fakeneck,TweenInfo.new(.1),{C0=OriginalC0*CFrame.Angles(0,0,0)})):Play();(TweenService:Create(tiltweld,TweenInfo.new(.1),{C0=CFrame.new(0,0,0)*CFrame.Angles(Answer,0,0)})):Play()if Gyro.Parent~=tilt and Tool.Skrimish.Value then Gyro.Parent=tilt chr.Humanoid.AutoRotate=false elseif Gyro.Parent==tilt and not Tool.Skrimish.Value then Gyro.Parent=script chr.Humanoid.AutoRotate=true end else if Gyro.Parent==tilt then Gyro.Parent=script chr.Humanoid.AutoRotate=true end SEs.FireClient:FireServer(k,"\065\103\108\105\110",chr,Answer,{Answer;0,NeckRotation},.1,Turning,true)if not Turning then(TweenService:Create(neck,TweenInfo.new(.1),{C0=OriginalC0*CFrame.Angles(Answer,0,NeckRotation)})):Play()end;(TweenService:Create(fakeneck,TweenInfo.new(.1),{C0=OriginalC0*CFrame.Angles(0,0,0)})):Play();(TweenService:Create(tiltweld,TweenInfo.new(.1),{C0=CFrame.new(0,0,0)*CFrame.Angles(0,0,0)})):Play()end if tick()-Cooldown>LastCheck then local X=c.UnitRay.Unit.Direction if math.abs(X.Y-LastUnit.Y)>=.01 then if X.Y>LastUnit.Y then AttackDirection="\085"else AttackDirection="\068"end else if CalcHorizontalAngle(LastUnit*Vector3.new(1,0,1),X*Vector3.new(1,0,1))>0 then AttackDirection="\082"else AttackDirection="\076"end end LastUnit=X end end)weld1C1=weld1.C1 weld2C1=weld2.C1 weld3C1=weld3.C1 tweldC1=tweld.C1 wait(.1)
-- Tweens

function Animate(w1, w2, w3, tw, Time, Delay)
	SetWelds()

	weld1C1 = w1
	weld2C1 = w2
	weld3C1 = w3
	tweldC1 = tw

	TweenService:Create(neck, TweenInfo.new(Time), { C0 = OriginalC0 * CFrame.Angles(Answer, 0, NeckRotation) }):Play()

	SEs.FireClient:FireServer(k, "AnimateFE", { w1, w2, w3, tw }, Time, Answer, 0, NeckRotation, chr, Tool.Hig.Value)

	if script:IsDescendantOf(chr) then
		TweenService:Create(weld1, TweenInfo.new(Time), { C1 = w1 * CFrame.new(0, Tool.Hig.Value, 0) }):Play()

		TweenService:Create(weld2, TweenInfo.new(Time), { C1 = w2 * CFrame.new(0, Tool.Hig.Value, 0) }):Play()

		TweenService:Create(weld3, TweenInfo.new(Time), { C1 = w3 * CFrame.new(0, Tool.Hig.Value, 0) }):Play()

		TweenService:Create(tweld, TweenInfo.new(Time), { C1 = tw * CFrame.new(0, Tool.Hig.Value, 0) }):Play()
	end

	if Delay then
		Time = Time + Delay
	end
	wait(Time)
end

chr.Humanoid.Died:connect(function()
	game.Workspace.CurrentCamera.FieldOfView = 70
end)

Mouse.Move:connect(function() -- Thanks to Ultimatedar for this logic, heavily edited by me.
	local Mouse = Player:GetMouse()
	local Direction = Mouse.Hit.p
	local B = head.Position.Y - Direction.Y
	local Dist = (head.Position - Direction).magnitude
	Answer = math.asin(B / Dist)
	Gyro.cframe = Mouse.Hit
	if Stance ~= "Nothing" then
		Answer = 0
	else
		if Stance == "Nothing" then
			if Answer > math.rad(20) then
				Answer = math.rad(20)
			elseif Answer < math.rad(-10) then
				Answer = math.rad(-10)
			else
				if torso.Parent.Humanoid.Sit then
					Answer = 0
				end
			end
		end
	end

	if Stance == "Nothing" then
		SEs.FireClient:FireServer(k, "Aglin", chr, Answer, { Answer, 0, NeckRotation }, 0.1, Turning)
		if not Turning then
			TweenService:Create(neck, TweenInfo.new(0.1), { C0 = OriginalC0 * CFrame.Angles(Answer, 0, NeckRotation) })
				:Play()
		end

		TweenService:Create(fakeneck, TweenInfo.new(0.1), { C0 = OriginalC0 * CFrame.Angles(0, 0, 0) }):Play()

		TweenService:Create(tiltweld, TweenInfo.new(0.1), { C0 = CFrame.new(0, 0, 0) * CFrame.Angles(Answer, 0, 0) })
			:Play()

		if Gyro.Parent ~= tilt and Tool.Skrimish.Value then
			Gyro.Parent = tilt
			chr.Humanoid.AutoRotate = false
		elseif Gyro.Parent == tilt and not Tool.Skrimish.Value then
			Gyro.Parent = script
			chr.Humanoid.AutoRotate = true
		end
	else
		if Gyro.Parent == tilt then
			Gyro.Parent = script
			chr.Humanoid.AutoRotate = true
		end

		SEs.FireClient:FireServer(k, "Aglin", chr, Answer, { Answer, 0, NeckRotation }, 0.1, Turning, true)
		if not Turning then
			TweenService:Create(neck, TweenInfo.new(0.1), { C0 = OriginalC0 * CFrame.Angles(Answer, 0, NeckRotation) })
				:Play()
		end

		TweenService:Create(fakeneck, TweenInfo.new(0.1), { C0 = OriginalC0 * CFrame.Angles(0, 0, 0) }):Play()

		TweenService:Create(tiltweld, TweenInfo.new(0.1), { C0 = CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0) }):Play()
	end
	if tick() - Cooldown > LastCheck then
		local NextUnit = Mouse.UnitRay.Unit.Direction
		if math.abs(NextUnit.Y - LastUnit.Y) >= 0.01 then
			if NextUnit.Y > LastUnit.Y then
				AttackDirection = "U"
			else
				AttackDirection = "D"
			end
		else
			if CalcHorizontalAngle(LastUnit * Vector3.new(1, 0, 1), NextUnit * Vector3.new(1, 0, 1)) > 0 then
				AttackDirection = "R"
			else
				AttackDirection = "L"
			end
		end
		LastUnit = NextUnit
	end
end)

weld1C1 = weld1.C1
weld2C1 = weld2.C1
weld3C1 = weld3.C1
tweldC1 = tweld.C1

wait(0.1)
