you can do something like this:
function onUse(cid, item, frompos, item2, topos)
local STORAGE = 63000
if (getPlayerStorageValue(cid, STORAGE)) == -1 then
local money = getPlayerLevel(cid) * 100 -- This will add 100 golds per each level
local Reward = doPlayerAddMoney(cid, money)
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You have received a total of " .. money .. " gold pieces.")
setPlayerStorageValue(cid, STORAGE, 1)
end
return true
end