addEvent("casino > changeMoneyToCasinoCoin", true)
addEventHandler("casino > changeMoneyToCasinoCoin", resourceRoot, function(money)
    setElementData(client, "char:money", getElementData(client, "char:money") - math.floor(money))
    setElementData(client, "char:cc", (getElementData(client, "char:cc") or 0) + math.floor(money/3))
end)

addEvent("casino > changeCasinoCoinToMoney", true)
addEventHandler("casino > changeCasinoCoinToMoney", resourceRoot, function(money)
    setElementData(client, "char:money", getElementData(client, "char:money") + math.floor(money*2))
    setElementData(client, "char:cc", (getElementData(client, "char:cc") or 0) - math.floor(money))
end)