welcome to the forum, i made a code for you, i didn't test it, you should try this
--client
function giveMoney(hitPlayer, matchingDimension)
if hitPlayer == localPlayer then
outputChatBox("Okey it's your money")
triggerServerEvent("giveMoney", hitPlayer, 1000) --enter amount here
end
end
addEventHandler("onClientMarkerHit", marker, giveMoney)
--server
addEvent("giveMoney", true)
addEventHandler("giveMoney", root,
function(amount)
givePlayerMoney(client, amount)
end
)