script is in StarterGui, doesn't work. No idea why.
Local = game.Players.LocalPlayer
Mouse = Local:GetMouse()
inventory = Local.PlayerGui.Inventory:findFirstChild("InventoryGui")
open = false
function open()
inventory.Visible = true
end
function close()
inventory.Visible = false
end
Mouse.KeyDown:connect(function(Key) -- q pressed
if Key == "q" then
if open == false then
x = true
open()
else
x = false
close()
end
end
end)
