local F=Players.LocalPlayer local y=script.Parent local t=y:WaitForChild("\072\117\109\097\110\111\105\100")local n=y:WaitForChild("\072\117\109\097\110\111\105\100\082\111\111\116\080\097\114\116")local j=y:WaitForChild("\084\111\114\115\111")local M=n.RootJoint local a=j["\076\101\102\116 \072\105\112"]local R=j["\082\105\103\104\116 \072\105\112"]local function i(F,y,t)return F+(y-F)*t end local o=nil local f=nil local w=0 local K=0 local b=M.C0 local m=a.C0 local B=R.C0 RunService.RenderStepped:Connect(function()o=n.Velocity*Vector3.new(.0625,0,.0625)f=o w=n.CFrame.RightVector:Dot(f)K=n.CFrame.LookVector:Dot(f)M.C0=M.C0:Lerp(b*CFrame.Angles(math.rad(K*5),math.rad(-w*5),0),.2)end)

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)
