Facebook
From Burly Terrapin, 3 Years ago, written in Plain Text.
This paste is a reply to Abrir GUI con una tecla from EmanueleBM - view diff
Embed
Download Paste or View Raw
Hits: 214
  1. local frame = script.Parent.Parent.Frame
  2. local tecla = Enum.KeyCode.F
  3.  
  4. local UIS = game:GetService("UserInputService")
  5. local abrir = false
  6.  
  7. UIS.InputBegan:Connect(function(key)
  8.         if key.KeyCode == tecla then
  9.                 if UIS:GetFocusedTextBox() == nil then
  10.                         if abrir == false then
  11.                                 abrir = true
  12.                                 frame.Visible = abrir
  13.                         elseif abrir == true then
  14.                                 abrir = false
  15.                                 frame.Visible = abrir
  16.                         end
  17.                 end
  18.         end
  19. end)
  20.  
  21. script.Parent.MouseButton1Click:Connect(function()
  22.  
  23.                         if abrir == false then
  24.                                 abrir = true
  25.                                 frame.Visible = abrir
  26.                         elseif abrir == true then
  27.                                 abrir = false
  28.                                 frame.Visible = abrir
  29.                         end
  30. end)