Using NativeUI to add cash to player's balance

Hey everyone, I’m a complete n00b at this which will soon become readily apparent.

I’m following along with a youtuber named Jeva’s tutorials. I’ve gotten inserting and pulling to/from sql tables to work fine and I’ve gotten the NativeUI menu to work fine, but trying to combine the two has me at my wits end. I’m trying to make it so that when I bring up the menu and select an item it will add $500 to the player’s cash, but I can’t for the life of me get the server event to trigger, the menu just stays there even after I’ve selected the item and pressed enter. Any help to retain my sanity would be appreciated. like I said i’m a n00b so I’m sure it’s something basic I don’t know about yet.

__resource.lua
resource_manifest_version '05cfa83c-a124-4cfa-a768-c24a5811d8f9'

client_scripts {
    "@NativeUI/NativeUI.lua",
    "menu.lua"
}

server_scripts {
"@mysql-async/lib/MySQL.lua",
"server.lua"
}

menu.lua

_menuPool = NativeUI.CreatePool()
mainMenu = NativeUI.CreateMenu("Main Menu", "~b~Menu test description")
_menuPool:Add(mainMenu)

function FirstItem(menu) 
    local click = NativeUI.CreateItem("Add $500", "~g~Add $500")
    menu:AddItem(click)
    menu.OnItemSelect = function(sender, item, index)
        if item == click then
            TriggerServerEvent("economy_addmoney", sender)
		end
    end
end

FirstItem(mainMenu)

Citizen.CreateThread(function()
    while true do
        Citizen.Wait(0)
        _menuPool:ProcessMenus()
        --[[ The "e" button will activate the menu ]]
        if IsControlJustPressed(1, 51) then
            mainMenu:Visible(not mainMenu:Visible())
        end
    end
end)

server.lua

RegisterServerEvent('economy_addmoney')
	AddEventHandler('economy_addmoney', function(source)
		MySQL.Sync.execute('UPDATE economy SET cash = cash + 500 WHERE id = @source',
				{
					['@source']       = GetPlayerIdentifiers(source)[1],
					["@args"] = argString
				})
		
		TriggerClientEvent("output", source, "+500")
		
		
		
	end)