There is an example:
function drawWindowAndButton()
window_1 = guiCreateWindow(x, y, w, h, "WINDOW 1", false)--Create window 1(Were button is)
window_2 = guiCreateWindow(x, y, w, h, "WINDOW 2", false)--Create window 2(The window to show after click)
guiSetVisible(window_2, false)--Make window 2 invisible!So we can make is visible later.
button = guiCreateButton(x, y, w, h, "SHOW WINDOW 2", false, window_1)--Create the button!
end
addEventHandler("onClientResourceStart", resourceRoot, drawWindowAndButton)
addEventHandler("onClientGUIClick", getResourceRootElement(getThisResource()),
function()
if (source == button) then
guiSetVisible(window_2, true) --Now make window 2 visible!
end
end)