Skip to main content
Every player has one credit line. Their credit score (0-1000) sets a single borrowing limit, and everything they owe - a bank cash loan, or a car/house financed through another script - draws from it. Paying debt down frees the limit back up. Everything here is in config/loans.lua.
  • The player borrows up to their available limit; the bank works out the interest for the whole term up front and adds it to what’s owed.
  • The total splits into fixed installments, auto-collected from the borrower’s personal account on a schedule.
  • Interest is simple and charged over the full term, baked in at the start - settling early doesn’t dodge it.
  • Paying on time raises credit; missing payments lowers it and adds fees.

Master switches

config/loans.lua
enabled turns the feature on or off. borrowingEnabled = false blocks new loans while existing loans keep running (installments still collect, credit still updates) - use it to freeze lending without wiping live debt.

How interest works

Flat percentage per day on the amount borrowed (not an APR): interest = amount × daily rate × days. The daily rate is a base rate from the player’s credit band plus a surcharge on larger loans:
config/loans.lua

The credit score

Runs 0-1000, starts at creditScoreStart for new players, and does two jobs: sets the borrowing limit and unlocks savings tiers.
  • Borrowing limit - the limit bands map score to a total credit cap (most a player can owe across all debt at once). Highest reached band wins; available credit is that limit minus current debt.
  • Savings - higher tiers with better rates and caps require a minimum score. See Savings & interest.
  • What moves it - creditDeltas reward on-time payments and completed loans, and penalise overdue debt daily (worsening each day down to a cap). Always clamped to 0-1000.

When a payment is missed

A staged pipeline, each stage configurable:
  • Grace (gracePeriodDays) - a short window before any penalty lands.
  • Late fee (lateFeesEnabled, latePenaltyPercent) - a one-time fee, a percentage of the outstanding balance, added once when the payment goes late.
  • Overdue - credit bleeds daily (the delinquent… deltas) and the bank auto-collects toward the debt, on bank open and on a timer.
  • Default (autoDefaultAfterDays) - an asset loan (financed car/house) is handed back to the originating script to be repossessed and the player takes the loanDefaulted hit. A plain cash loan has nothing to repossess, so it just stays overdue - collected and decaying credit - until cleared. Set assetRepossession = false to make everything use the cash model (nothing is ever repossessed).
Auto-collection only ever touches bank balances, never cash on hand. Holding wealth as cash is the deliberate way to stall an overdue debt - the trade-off is a credit score that keeps sinking the whole time.

Editable options