local m=script:WaitForChild("\085\112\100\097\116\101")local U=CFrame.new(0,1,0,-1,0,0,0,0,1,0,1,0)function Tween(m,U)(game.TweenService:Create(m,TweenInfo.new(1,Enum.EasingStyle.Sine,Enum.EasingDirection.Out),U)):Play()end local b=false local F=0 m.OnServerEvent:connect(function(m,u,L)pcall(function()local e=m.Character:FindFirstChild("\084\111\114\115\111")local Q=e:FindFirstChild("\082\105\103\104\116 \083\104\111\117\108\100\101\114")local A=e:FindFirstChild("\076\101\102\116 \083\104\111\117\108\100\101\114")if u=="\084\117\114\110"then local m=(e.Position.y-L.y)/100 local U=(e.Position-L).magnitude/80 local u=m/U local p=e.Neck F=F+.01 if Q~=nil then Q.C0=Q.C0:lerp(CFrame.new(1,.5,0,0,0,1,0,1,0,-1,0,0)*CFrame.fromEulerAnglesXYZ(0,0,-u),.3)end if A~=nil then if b==false then A.C0=A.C0:lerp(CFrame.new(-1,.5,0,0,0,-1,0,1,0,1,0,0)*CFrame.fromEulerAnglesXYZ(0,0,u),.3)else end end elseif u=="\085\110\101\113\117\105\112"then F=0 Q.C0=CFrame.new(1,.5,0)*CFrame.Angles(0,math.pi/2,0)A.C0=CFrame.new(-1,.5,0)*CFrame.Angles(0,-math.pi/2,0)e.Neck.C0=U end end)end)
-- Server for Client, this is so it works in FE

local update = script:WaitForChild("Update")
local Neck_Original = CFrame.new(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
function Tween(t, g)
	game.TweenService:Create(t, TweenInfo.new(1, Enum.EasingStyle.Sine, Enum.EasingDirection.Out), g):Play()
end
local SBMode = false
local sine = 0
update.OnServerEvent:connect(function(player, request, mouseposition)
	pcall(function()
		local Torso = player.Character:FindFirstChild("Torso")
		local Arm = Torso:FindFirstChild("Right Shoulder")
		local Arm2 = Torso:FindFirstChild("Left Shoulder")
		if request == "Turn" then
			local Offset_O = (Torso.Position.y - mouseposition.y) / 100 --100 (mouse offset to direction)
			local Mag = (Torso.Position - mouseposition).magnitude / 80 --80 (cone of y looking)
			local Offset = Offset_O / Mag
			local NeckWeld = Torso.Neck
			--NeckWeld.C0 = Neck_Original * CFrame.fromEulerAnglesXYZ(Offset-math.rad(90), 0, 0)
			sine = sine + 0.01
			if Arm ~= nil then
				Arm.C0 = Arm.C0:lerp(
					CFrame.new(1, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0) * CFrame.fromEulerAnglesXYZ(0, 0, -Offset),
					0.3
				)
			end
			if Arm2 ~= nil then
				if SBMode == false then
					Arm2.C0 = Arm2.C0:lerp(
						CFrame.new(-1, 0.5, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0) * CFrame.fromEulerAnglesXYZ(0, 0, Offset),
						0.3
					)
				else
				end
			end
		elseif request == "Unequip" then
			sine = 0
			Arm.C0 = CFrame.new(1, 0.5, 0) * CFrame.Angles(0, math.pi / 2, 0) -- reset right arm
			Arm2.C0 = CFrame.new(-1, 0.5, 0) * CFrame.Angles(0, -math.pi / 2, 0) -- reset left arm
			Torso.Neck.C0 = Neck_Original
		end
	end)
end)
