What is this?
ThunderBet is an addon that brings casino-style betting into your Garry's Mod server. Integrates straight into the DarkRP currency system: allowing you to convert DarkRP cash straight to ThunderCoins.With fairness and fun in mind, there is an assortment of limitations, cooldowns and protective measures that can be tweaked to fit any servers economy.
what games does it come with?
- Crash
- Mines
- Dice
- Plinko
- Rock-Paper-Scissors
- HiLo
- Snake
- Blackjack
How to use?!?!
- Open the ThunderBet menu with either the chat command (!thunderbet) or the console command (thunderbet).
- Use Wallet to exchange DarkRP cash for ThunderCoins, or withdraw ThunderCoins back into DarkRP cash (configurable)
- Pick a game, place a bet, and play.
how to install
- Download latest version and extract the .zip
- Drag & drop thunderbet/ to your servers addons/ directory
- Configure thunderbet/lua/thunderbet/config.lua and restart server
SuperAdmin Commands
- tb_coins_check <name|steamid>
- tb_coins_give <name|steamid>
- tb_coins_remove <name|steamid>
- tb_coins_set <name|steamid>
- tb_claim_reset <name|steamid>
Player Commands
- Chat: !thunderbet
- Console: thunderbet
Important Tweaks
It is suggested that you tweak these before going live with the addon- COIN_PURCHASE_RATE
- COIN_WITHDRAW_RATE
- WITHDRAW_ENABLED
- MIN_BET
- MAX_BET
- DAILY_CLAIM_AMOUNT
- DAILY_CLAIM_COOLDOWN
Individual Game Settings
If you're not comfortable with the global limits, you can set individual limits and tweaks for each game. Some games have their own special settings.- enabled
- dailySpendLimit
- dailyWinLimit
- dailyLossLimit
- multiplierScale
- multiplierCap
Global Cooldown (for cautious users)
This ensures players cannot just click, play, win, repeat, over and over. You can set it up so that if Player A wins X amount of money, any player to play the next 1 out of Y games played will automatically be a loss.- enabled
- triggerWin
- forcedLossOf
- affectedGames
Code:
-- ThunderBet Configuration
-- Edit this file to tune the system. Restart the server to apply changes.
ThunderBet = ThunderBet or {}
ThunderBet.Config = {
-- Currency Exchange
-- How many DarkRP Cash ($) it costs to buy 1 ThunderCoin
COIN_PURCHASE_RATE = 100,
-- How many DarkRP Cash ($) you receive when selling 1 ThunderCoin
COIN_WITHDRAW_RATE = 10,
-- Whether players can withdraw ThunderCoins back to DarkRP Cash at all
WITHDRAW_ENABLED = true,
-- Transaction Limits
MIN_DEPOSIT_CASH = 10, -- Minimum cash deposit ($)
MAX_DEPOSIT_CASH = 100000, -- Maximum cash deposit per transaction ($)
MIN_WITHDRAW_TC = 1, -- Minimum TC per withdrawal
MAX_WITHDRAW_TC = 10000, -- Maximum TC per withdrawal transaction
-- Global Betting Limits (all games)
MIN_BET = 1, -- Minimum bet in ThunderCoins
MAX_BET = 10000, -- Maximum bet in ThunderCoins
-- Cross-Game Daily Wager Cap
-- This is a TOTAL cap across ALL games. It STACKS with per-game caps in
-- ThunderBet.Config.Games[*].dailySpendLimit — both must pass.
DAILY_LIMIT_ENABLED = false,
DAILY_LIMIT_AMOUNT = 5, -- Total TC that can be wagered per day across all games
DAILY_LIMIT_COOLDOWN = 86400, -- Seconds before the cap resets (86400 = 24h)
-- Daily Bonus Claim
DAILY_CLAIM_AMOUNT = 100, -- ThunderCoins awarded per daily claim
DAILY_CLAIM_COOLDOWN = 86400, -- Seconds between claims (86400 = 24h)
-- Game Toggles
-- Quick on/off switches for each game. These AND with Games[*].enabled below
-- (if either is false, the game is off).
CRASH_ENABLED = true,
DICE_ENABLED = true,
MINES_ENABLED = true,
SNAKES_ENABLED = true,
BLACKJACK_ENABLED = true,
PLINKO_ENABLED = true,
RPS_ENABLED = true,
HILO_ENABLED = true,
}
-- Per-Game Balancing
-- One block per game. Set a daily limit to 0 (or false) to disable that limit.
-- All limits are per player per 24h. They reset on the same global timer.
--
-- enabled game on/off (ANDs with the *_ENABLED toggle above)
-- dailySpendLimit max TC the player can wager in this game per day
-- dailyWinLimit max TC the player can win (gross payout) in this game per day
-- dailyLossLimit max TC the player can lose (net) in this game per day
-- multiplierScale payout cap multiplier; 1.0 = native, 0.85 = -15%, 0 = no cap
-- multiplierCap hard ceiling on the payout multiplier; 0 = no cap
-- bombDampen (mines only) extra payout cut per active bomb:
-- cap = baseCap * scale * (1 - bombDampen * bombs)
ThunderBet.Config.Games = {
crash = {
enabled = true,
dailySpendLimit = 0,
dailyWinLimit = 0,
dailyLossLimit = 0,
multiplierScale = 0.4,
multiplierCap = 0,
},
dice = {
enabled = true,
dailySpendLimit = 0,
dailyWinLimit = 0,
dailyLossLimit = 0,
multiplierScale = 0.7,
multiplierCap = 0,
},
mines = {
enabled = true,
dailySpendLimit = 0,
dailyWinLimit = 0,
dailyLossLimit = 0,
multiplierScale = 0.85,
multiplierCap = 4,
bombDampen = 0.03, -- e.g. 3 bombs → -9% payout cap on top of scale
},
snakes = {
enabled = true,
dailySpendLimit = 0,
dailyWinLimit = 0,
dailyLossLimit = 0,
multiplierScale = 1.0,
multiplierCap = 0,
},
blackjack = {
enabled = true,
dailySpendLimit = 0,
dailyWinLimit = 0,
dailyLossLimit = 0,
multiplierScale = 1.0,
multiplierCap = 0,
},
plinko = {
enabled = true,
dailySpendLimit = 0,
dailyWinLimit = 0,
dailyLossLimit = 0,
multiplierScale = 1.0,
multiplierCap = 0,
},
rps = {
enabled = true,
dailySpendLimit = 0,
dailyWinLimit = 0,
dailyLossLimit = 0,
multiplierScale = 1.0,
multiplierCap = 0,
},
hilo = {
enabled = true,
dailySpendLimit = 0,
dailyWinLimit = 0,
dailyLossLimit = 0,
multiplierScale = 1.0,
multiplierCap = 0,
},
}
-- Hidden Global Cooldown (anti-streak)
-- When any player wins >= triggerWin TC in an affected game, the next
-- forcedLossOf bets in any affected game (any player) are silently
-- predetermined as losses. The games still play out normally; outcomes are
-- steered toward a loss client-side, and the server zeros payouts as a
-- backstop. Players never see this in the UI.
ThunderBet.Config.GlobalCooldown = {
enabled = true,
triggerWin = 2, -- min single-bet net win to arm the cooldown (TC)
forcedLossOf = 5, -- number of subsequent bets forced to lose
affectedGames = { "blackjack", "hilo", "dice", "crash" },
}
