Not sure what u wanted the function for but here is a example script that i use in my server.
And i should say that i did not create this script myself.
function onUse(player, item, fromPosition, target, toPosition)
local gain = 250000 -- Health the player gains.
local storagevalue =...