--Put me in StarterCharacterScripts

local player = game.Players.LocalPlayer
local character = workspace:WaitForChild(player.Character.Name)
local camera = workspace.CurrentCamera
local running = false
local speed = character.Humanoid.WalkSpeed / 2
local RunService = game:GetService("RunService")
local Pi = 3.1415926
local Rot = 3.1415926 / 2

character.Humanoid.Running:Connect(function(WalkSpeed)
	if WalkSpeed > 0.1 then
		running = true
	else
		running = false
	end
end)

while true do
	RunService.RenderStepped:wait()
	fps = (camera.CoordinateFrame.p - character.Head.Position).Magnitude
	if running == true then
		Rot = Rot + character.Humanoid.WalkSpeed / 115
	end
	if Rot >= Pi * 2 then
		Rot = 0
	end
	camera.CoordinateFrame = camera.CoordinateFrame * CFrame.new(math.cos(Rot) / speed, math.sin(Rot * 2) / (speed * 2), 0) * CFrame.Angles(0, 0, math.sin(Rot - Pi * 1.5) / (speed * 20))
end
