Kartik Scripts

RemoveAccountMoney

exports['kartik-banking']:RemoveAccountMoney(account, amount, reason)

🔹 Description

Withdraws money from a non-personal, non-shared bank account (e.g., business, gang, or government accounts).
It uses the account's linked debit card and triggers the internal removeMoney function to process the deduction.


🔧 Parameters

NameTypeRequiredDescription
accountstring✅usually company or society account ( e.g police, bcso, banker )
amountnumber✅The amount of money to withdraw.
reasonstring❌Optional. Describes why the funds are being withdrawn (e.g., "Rent").

📤 Returns

TypeDescription
trueIf the withdrawal was successful.
falseIf the withdrawal failed (e.g., invalid account).

🧠 Example Usage

local success = exports['kartik-banking']:RemoveAccountMoney("gang_xyz", 5000, "Weapon Purchase")
if success then
    print("Withdrawal successful.")
else
    print("Withdrawal failed.")
end

❌ Will Return false If:

  • The account is not found.
  • The account type is "personal" or "shared".
  • There is no linked debit card.
  • The removeMoney operation fails.

On this page