How can I put 2 key combinations?

I have made a menu of keys and it felt empty, so I wanted to add that you can put a primary and a secondary key, the primary one works but the secondary one does not, what do I do?

local Open = false
    local keyText = ""
    local keyText2 = ""

    local MenuKey = game.Players.LocalPlayer:WaitForChild("Keys"):WaitForChild("MenuKey")
    local MenuKey2 = game.Players.LocalPlayer:WaitForChild("Keys"):WaitForChild("MenuKey2")

    MenuKey:GetPropertyChangedSignal("Value"):Connect(function()
    	keyText = MenuKey.Value
    	keyText2 = MenuKey2.Value
    end)

    local UserInputService = game:GetService("UserInputService")

    UserInputService.InputBegan:connect(function(keyCode)
    	if keyCode.KeyCode.Name == keyText and keyText2 then
    		if Open then
    			Open = false
    			script.Parent.Sombras.Visible = false
    		else
    			Open = true
    			script.Parent.Sombras.Visible = true
    		end
    	end
    end)

This is what the title translates to, for anyone wondering

Ah sorry, I forgot the translation

Do you mean something like a keybind, where you have to have two keys pressed down in order for something to happen?

If so, you could use userInputService:IsKeyDown().

Here’s what you’d do:

local userInputService = game:GetService('UserInputService')

local myKey1 = 'LeftControl'
local myKey2 = 'H'

userInputService.InputBegan:Connect(function(key, isSystemReserved) -- Ensure you're using :Connect as :connect is deprecated.
    if (key.KeyCode.Name == myKey1 and userInputService:IsKeyDown(myKey2)) or (key.KeyCode.Name == myKey2 and userInputService:IsKeyDown(myKey1)) then
        print('LeftControl and H are pressed!')
    end
end)

Not really, I say it … For example, I have 2 text boxes, one I put in the text “F” and the other one “G”, I want that when pressing the “F”, the script is executed, or that when pressing the “G” also runs

Ah okay, my bad.

You should be able to use the or operator here. It basically means exactly how it sounds. If the key’s KeyCode is the same as keyText or keyText2 then run.

if (key.KeyCode.Name == keyText) or (key.KeyCode.Name == keyText2) then