Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local key = game.CoreGui.ScreenGui.Drag.Magic.Main.Settings["Unconscious teleport keybind"]:Clone()
- key.Parent = game.CoreGui.ScreenGui.Drag.Magic.Main.Settings
- key.Position = UDim2.new(0,0,0,120)
- key.Name = "Close Gui keybind"
- key.Text.Text = "Close Gui keybind"
- local m = game.Players.LocalPlayer:GetMouse()
- _G.GuiExists = false
- m.KeyDown:connect(function(k)
- k = k:lower()
- if k == game.CoreGui.ScreenGui.Drag.Magic.Main.Settings["Close Gui keybind"].Input.Input.Text then
- for i, v in pairs(game.CoreGui:GetChildren()) do
- if v.Name == "ScreenGui" then
- if v:FindFirstChild("Drag") then
- if _G.GuiExists == true then
- _G.GuiExists = false
- v.Enabled = false
- elseif _G.GuiExists == false then
- _G.GuiExists = true
- v.Enabled = true
- end
- end
- end
- end
- end
- end)
- -- yeet
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement