Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local frame = script.Parent.Parent.Frame
- local tecla = Enum.KeyCode.N
- local UIS = game:GetService("UserInputService")
- local abrir = false
- UIS.InputBegan:Connect(function(key)
- if key.KeyCode == tecla then
- if UIS:GetFocusedTextBox() == nil then
- if abrir == false then
- abrir = true
- frame.Visible = abrir
- elseif abrir == true then
- abrir = false
- frame.Visible = abrir
- end
- end
- end
- end)
- script.Parent.MouseButton1Click:Connect(function()
- if abrir == false then
- abrir = true
- frame.Visible = abrir
- elseif abrir == true then
- abrir = false
- frame.Visible = abrir
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement