local m=script.Parent local M=m:FindFirstChildOfClass("\072\117\109\097\110\111\105\100")or m:WaitForChild("\072\117\109\097\110\111\105\100")local d=workspace.CurrentCamera local X=0 if not M then return end M.Running:Connect(function(m)X=m end);(game:GetService("\082\117\110\083\101\114\118\105\099\101")).RenderStepped:Connect(function()local m=tick()if M.MoveDirection.Magnitude>0 then d.CFrame=d.CFrame:Lerp(d.CFrame*CFrame.Angles(math.rad(math.sin(m*X)*1),math.rad(math.sin(m*X)),math.rad(math.sin(m*X)*2)),X/100)else d.CFrame=d.CFrame:Lerp(d.CFrame*CFrame.Angles(math.rad(math.sin(m*1)*.9),0,0),.0)end end)


local char = script.Parent

local human = char:FindFirstChildOfClass("Humanoid") or char:WaitForChild("Humanoid")
local cam = workspace.CurrentCamera
local humspeed = 0

if not human then
	return
end

human.Running:Connect(function(sp)
	humspeed = sp
end)

game:GetService("RunService").RenderStepped:Connect(function()
	local ticked = tick()
	if human.MoveDirection.Magnitude > 0 then
		cam.CFrame = cam.CFrame:Lerp(cam.CFrame * CFrame.Angles(math.rad(math.sin(ticked * humspeed) * 1), math.rad(math.sin(ticked * humspeed)), math.rad(math.sin(ticked * humspeed) * 2)), humspeed / 100)
	else
		cam.CFrame = cam.CFrame:Lerp(cam.CFrame * CFrame.Angles(math.rad(math.sin(ticked * 1) * 0.90), 0, 0), 0.0)
	end
end)
