chance = 96
base = 1
nextbet = 1 -- Set starting bet to the smallest possible value
bethigh = false
wincount = 0
losecount = 0
streak = 0
function dobet()
if win then
wincount = wincount + 1
losecount = 0
streak = streak > 0 and streak + 1 or 1
-- Subtract 1% of win chance on every win
chance = chance - 1
-- Increase amount by 36.90% on every win
nextbet = nextbet * 1.3690
-- Reset bet amount AND win chance on every streak of 6 wins
if wincount == 6 then
nextbet = base
chance = 96
wincount = 0
end
else
wincount = 0
losecount = losecount + 1
streak = streak < 0 and streak - 1 or -1
-- Reset win chance on every loss
chance = 96
-- Increase amount by 150% on every loss
nextbet = nextbet * 2.50
-- Switch over/under on every 3 losses
if losecount == 3 then
bethigh = not bethigh
losecount = 0
end
-- On a streak greater than 1 loss, increase amount 24.6%
if streak < -1 then
nextbet = nextbet * 1.246
end
-- On a streak greater than 2 losses, increase amount 3%
if streak < -2 then
nextbet = nextbet * 1.03
end
end
-- Ensure nextbet is not less than the minimum bet amount
nextbet = math.max(nextbet, base)
end