The code basically deletes and constructs code when I press tab.
--if _ Keydown delete and create new Gui
game:GetService("UserInputService").InputBegan:connect(function(key)
if key.KeyCode == Enum.KeyCode.Tab then
print 'the key Tab has been pressed'
local Gui = game.Players.LocalPlayer.PlayerGui:FindFirstChild("One")
if Gui then Gui:Destroy()
end
------------------------------------------------------------------------------------
player = game.Players.LocalPlayer
gui = game.Lighting.Two
gui:Clone().Parent = player.PlayerGui
local Gui = game.Players.LocalPlayer.PlayerGui:FindFirstChild("Two")
if Gui then Gui:Destroy()end
------------------------------------------------------------------------------------
end
end) --ERROR HERE
