UserInputService.InputBegan:Connect(function(P)if P.KeyCode==Enum.KeyCode.LeftShift or P.KeyCode==Enum.KeyCode.RightShift or P.KeyCode==Enum.KeyCode.ButtonL2 then updateWalkSpeed()end end)UserInputService.InputEnded:Connect(function(P)if P.KeyCode==Enum.KeyCode.LeftShift or P.KeyCode==Enum.KeyCode.RightShift or P.KeyCode==Enum.KeyCode.ButtonL2 then updateWalkSpeed()end end)
-- Connect input events to update walk speed
UserInputService.InputBegan:Connect(function(input)
	if
		input.KeyCode == Enum.KeyCode.LeftShift
		or input.KeyCode == Enum.KeyCode.RightShift
		or input.KeyCode == Enum.KeyCode.ButtonL2
	then
		updateWalkSpeed()
	end
end)

UserInputService.InputEnded:Connect(function(input)
	if
		input.KeyCode == Enum.KeyCode.LeftShift
		or input.KeyCode == Enum.KeyCode.RightShift
		or input.KeyCode == Enum.KeyCode.ButtonL2
	then
		updateWalkSpeed()
	end
end)
