Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- math.randomseed(os.time())
- function apuesta(balance, base_bet)
- local chance = 90
- local bet_amount = balance / 1000000
- for i = 1, 10 do
- local random_chance = math.random(1, 100)
- if random_chance <= chance then
- -- Gana
- print("Ganaste " .. bet_amount .. " unidades.")
- break
- else
- -- Pierde
- print("Perdiste " .. bet_amount .. " unidades.")
- if i < 5 then
- base_bet = base_bet * 10 -- Incrementa la base bet para la max bet
- else
- local losses = 0
- for j = 1, 5 do
- local random_chance = math.random(1, 100)
- if random_chance > chance then
- losses = losses + 1
- end
- end
- if losses >= 2 then
- base_bet = base_bet * 10 -- Incrementa la base bet para la max bet
- end
- end
- bet_amount = base_bet
- end
- end
- end
- -- Ejemplo de uso
- local balance = 1000000 -- Puedes ajustar esto según tu saldo inicial
- local base_bet = balance / 1000000
- apuesta(balance, base_bet)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement