Advertisement
Guest User

gop toggle gui

a guest
Aug 20th, 2019
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.83 KB | None | 0 0
  1. local key = game.CoreGui.ScreenGui.Drag.Magic.Main.Settings["Unconscious teleport keybind"]:Clone()
  2. key.Parent = game.CoreGui.ScreenGui.Drag.Magic.Main.Settings
  3. key.Position = UDim2.new(0,0,0,120)
  4. key.Name = "Close Gui keybind"
  5. key.Text.Text = "Close Gui keybind"
  6. local m = game.Players.LocalPlayer:GetMouse()
  7. _G.GuiExists = false
  8. m.KeyDown:connect(function(k)
  9. k = k:lower()
  10. if k == game.CoreGui.ScreenGui.Drag.Magic.Main.Settings["Close Gui keybind"].Input.Input.Text then
  11. for i, v in pairs(game.CoreGui:GetChildren()) do
  12. if v.Name == "ScreenGui" then
  13. if v:FindFirstChild("Drag") then
  14. if _G.GuiExists == true then
  15. _G.GuiExists = false
  16. v.Enabled = false
  17. elseif _G.GuiExists == false then
  18. _G.GuiExists = true
  19. v.Enabled = true
  20. end
  21. end
  22. end
  23. end
  24. end
  25. end)
  26. -- yeet
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement