how to make a script when the player clicks on the button on the gui and automatically takes the player's money
GUI = {
button = {},
window = {}
}
addEventHandler("onClientResourceStart", resourceRoot,
function()
GUI.window[1] = guiCreateWindow(484, 203, 285, 124, "", false)
guiWindowSetSizable(GUI.window[1], false)
GUI.button[1] = guiCreateButton(37, 32, 213, 36, "Take your money", false, GUI.window[1])
end
)