// Script to check coins, deduct them, and teleport the player

void main()
{
    object oPC = GetLastUsedBy();

    // Check if the player has 100,000 coins
    if(GetGold(oPC) < 100000)
    {
        SendMessageToPC(oPC, "You do not have enough gold.");
        return;
    }

    // Deduct 100,000 coins
    TakeGoldFromCreature(100000, oPC, TRUE);

    // Teleport the player to ENTER_CASINO_PAID waypoint
    object oWaypoint = GetWaypointByTag("ENTER_CASINO_PAID");
    AssignCommand(oPC, ActionJumpToObject(oWaypoint, TRUE));

    // Assign the variable 'iMadeDeposit' to the player
    SetLocalInt(oPC, "iMadeDeposit", 1);
}
