local b=Players.LocalPlayer local H=script.Parent local J=H:WaitForChild("\072\117\109\097\110\111\105\100")local Y=H:WaitForChild("\072\117\109\097\110\111\105\100\082\111\111\116\080\097\114\116")local w=H:WaitForChild("\084\111\114\115\111")local O=Y.RootJoint local P=w["\076\101\102\116 \072\105\112"]local T=w["\082\105\103\104\116 \072\105\112"]local function M(b,H,J)return b+(H-b)*J end local s=nil local j=nil local E=0 local v=0 local r=O.C0 local Z=P.C0 local N=T.C0 RunService.RenderStepped:Connect(function()s=Y.Velocity*Vector3.new(.0625,0,.0625)j=s E=Y.CFrame.RightVector:Dot(j)v=Y.CFrame.LookVector:Dot(j)O.C0=O.C0:Lerp(r*CFrame.Angles(math.rad(v*5),math.rad(-E*5),0),.2)end)
--|| VARIABLES ||--
local Player = Players.LocalPlayer
local Character = script.Parent
local Humanoid = Character:WaitForChild("Humanoid")

local HumanoidRootPart = Character:WaitForChild("HumanoidRootPart")
local Torso = Character:WaitForChild("Torso")

local RootJoint = HumanoidRootPart.RootJoint
local LeftHipJoint = Torso["Left Hip"]
local RightHipJoint = Torso["Right Hip"]

local function Lerp(a, b, c)
	return a + (b - a) * c
end

local Force = nil
local Direction = nil
local Value1 = 0
local Value2 = 0

local RootJointC0 = RootJoint.C0
local LeftHipJointC0 = LeftHipJoint.C0
local RightHipJointC0 = RightHipJoint.C0

RunService.RenderStepped:Connect(function()
	Force = HumanoidRootPart.Velocity * Vector3.new(1 / 16, 0, 1 / 16)
	Direction = Force
	Value1 = HumanoidRootPart.CFrame.RightVector:Dot(Direction)
	Value2 = HumanoidRootPart.CFrame.LookVector:Dot(Direction)
	RootJoint.C0 = RootJoint.C0:Lerp(RootJointC0 * CFrame.Angles(math.rad(Value2 * 5), math.rad(-Value1 * 5), 0), 0.2)
end)
