local g=game:GetService("\082\117\110\083\101\114\118\105\099\101")local E=script.Parent local X=E:WaitForChild("\072\117\109\097\110\111\105\100")function updateBobbleEffect()local g=tick()if X.MoveDirection.Magnitude>0 then local E=math.cos(g*10)*.25 local b=math.abs(math.sin(g*10))*.25 local l=Vector3.new(E,b,0)X.CameraOffset=X.CameraOffset:lerp(l,.2)else X.CameraOffset=X.CameraOffset*.75 end end g.RenderStepped:Connect(updateBobbleEffect)


local runService = game:GetService("RunService")

local character = script.Parent
local humanoid = character:WaitForChild("Humanoid")

function updateBobbleEffect()
	local currentTime = tick()
	if humanoid.MoveDirection.Magnitude > 0 then
		local bobbleX = math.cos(currentTime * 10) * .25
		local bobbleY = math.abs(math.sin(currentTime * 10)) * .25        

		local bobble = Vector3.new(bobbleX, bobbleY, 0)

		humanoid.CameraOffset = humanoid.CameraOffset:lerp(bobble, .200)
	else 
		humanoid.CameraOffset = humanoid.CameraOffset * .75
	end
end

runService.RenderStepped:Connect(updateBobbleEffect)
