-------------Motor6Ding Section------------------------


Character.Humanoid.Died:connect(function()
	Stand()
	_G.Proned = false
	_G.Crouched = false
	_G.Sprinting = false
end)

game:GetService("RunService").RenderStepped:connect(function()
	Mouse.TargetFilter = game.Workspace
	if not _G.Viewing then	
	local HRPCF =  HumanoidRootPart.CFrame * CFrame.new(0, 1.5, 0)* CFrame.new(Humanoid.CameraOffset)
	if Lean then
		HRPCF = HRPCF
	end
	Neck.C0 =  Torso.CFrame:toObjectSpace(HRPCF)
	Neck.C1 =  CFrame.Angles(-math.asin(Camera.CoordinateFrame.lookVector.y), 0, 0) 
	elseif _G.Viewing then	
	Character.Torso.Neck.C0 = CFrame.new(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
	Character.Torso.Neck.C1 = CFrame.new(0, -0.5, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
	end
	if player.PlayerScripts.CameraScript.RootCamera:FindFirstChild("Sensitivity") then
		if Aiming then
			player.PlayerScripts.CameraScript.RootCamera.Sensitivity.Value = Player.PlayerGui.MouseSensitivity.Frame.Data.Value
		else
			player.PlayerScripts.CameraScript.RootCamera.Sensitivity.Value = 1
		end
	Mouse.Button2Down:connect(function()
		if not Aiming then
			Aiming = true
		end
	end)
	Mouse.Button2Up:connect(function()
		if Aiming then
			Aiming = false
		end
	end)	
	end
end)
