InputBegan not detecting one specific key

I am currently in the process of making a custom inventory UI and handler. Now, just as with the normal system by Roblox, you can press the number keys (1-5) and also click on the button directly.

Currently, however, all keys 1-4 work, but when I attempt to push the 5 key it doesn’t do anything. If I click on the 5th button though it works just as intended, only the keybind isn’t working.

I’ve already tried using the key 6 instead of 5 and that works perfectly fine, but after changing it back it no longer works and I have no idea why this is. Here is the code handling the input below:

local Numbers = {['Enum.KeyCode.One'] = 1, ['Enum.KeyCode.Two'] = 2, ['Enum.KeyCode.Three'] = 3, ['Enum.KeyCode.Four'] = 4, ['Enum.KeyCode.Five'] = 5}
-- ...
UserInputService.InputBegan:Connect(function(Input, GameProcessedEvent)
    if GameProcessedEvent then return end
    if Input.KeyCode == Enum.KeyCode.One or Input.KeyCode == Enum.KeyCode.Two or Input.KeyCode == Enum.KeyCode.Three or Input.KeyCode == Enum.KeyCode.Four or Input.KeyCode == Enum.KeyCode.Five then
        for _, ItemSlot in pairs(ItemFrame) do
            if ItemSlot.Name == 'InventoryButton' .. Numbers[tostring(Input.KeyCode)] then
                local LinkedTool = ItemSlot:GetAttribute('LinkedTool')
                print(tostring(Tools[LinkedTool]))
                local Corners = ItemSlot.Corners
                EquipItem(Tools[LinkedTool], Corners)
            end
        end
    end
end)

As said before it works perfectly fine if I change Enum.KeyCode.Five to Enum.KeyCode.Six in the Numbers table and Input.KeyCode == Enum.KeyCode.Five to Input.KeyCode == Enum.KeyCode.Six in the if statement. There are also absolutely no errors whatsoever.

Does anyone know why this is happening?

local Numbers = {['Enum.KeyCode.One'] = 1, ['Enum.KeyCode.Two'] = 2, ['Enum.KeyCode.Three'] = 3, ['Enum.KeyCode.Four'] = 4, ['Enum.KeyCode.Five'] = 5}
-- ...
game:GetService("UserInputService").InputBegan:Connect(function(Input, GameProcessedEvent)
	if GameProcessedEvent then return end
	if Input.KeyCode == Enum.KeyCode.One or Input.KeyCode == Enum.KeyCode.Two or Input.KeyCode == Enum.KeyCode.Three or Input.KeyCode == Enum.KeyCode.Four or Input.KeyCode == Enum.KeyCode.Five then
		print(Input.KeyCode)
		--[[for _, ItemSlot in pairs(ItemFrame) do
			if ItemSlot.Name == 'InventoryButton' .. Numbers[tostring(Input.KeyCode)] then
				local LinkedTool = ItemSlot:GetAttribute('LinkedTool')
				--print(tostring(Tools[LinkedTool]))
				local Corners = ItemSlot.Corners
				--EquipItem(Tools[LinkedTool], Corners)
			end
		end]]
	end
end)
  17:03:30.380  Enum.KeyCode.One  -  Client - LocalScript:6
  17:03:30.896  Enum.KeyCode.Two  -  Client - LocalScript:6
  17:03:31.129  Enum.KeyCode.Three  -  Client - LocalScript:6
  17:03:31.379  Enum.KeyCode.Four  -  Client - LocalScript:6
  17:03:31.613  Enum.KeyCode.Five  -  Client - LocalScript:6

Your code works as intended on my machine. Perhaps your 5 key is broken?