-- Initialize variables
chance = 50
nextbet = minimalbet
div = 8e5
BB = balance / div
NNextBet = BB
bethigh = true
halfRange = 5000 -- Paradice value 50 Megaplay value 5000
LH = {}
bbexecute = false
currentIndex = 1
won = 0
loss = 0
bet = 0
-- Initialize mode variables
lengths = {3, 4, 5}
currentModeIndex = {}
betsInCurrentMode = 0
betsPerMode = 5 -- Change this to set how many bets per mode
function dobet()
clearConsole()
bet = bet + 1
if (bet<100) then if (won > loss and (won - loss) > 1) then div = 20000 end end
if (bet<100) then if (loss > won and (loss - won) > 1) then div = 800000 end
end
--div = math.random(50000, 800000)
BB = balance / div
betsInCurrentMode = betsInCurrentMode + 1
-- Reset LH when betting in the first element of the mode
if (currentModeIndex[currentIndex] == 1) then
LH = {}
end
if (win) then
won = won + 1
if (previousbet > minimalbet) then
NNextBet = BB
nextbet = minimalbet
end
end
if (not win) then
loss = loss + 1
if (previousbet > minimalbet) then
NNextBet = previousbet * 2
nextbet = NNextBet
end
end
if (roll > halfRange) then
h = 1
LH[#LH + 1] = "H"
end
-- end
if (roll <= halfRange) then
l = 1
LH[#LH + 1] = "L"
end
---end
if (#LH == 1) then
nextbet = NNextBet
bbexecute = true
end
clearConsole()
print(#LH)
print("Current Index: " .. string.format("%s", currentIndex))
print("Bets in current mode: " .. string.format("%s", betsInCurrentMode))
if (bet<100 and loss > won) then
print("Loss > won. Divider is: " .. string.format("%s", div))
elseif (bet<100 and won > loss) then
print("Won > loss. Divider is: " .. string.format("%s", div))
end
print("Bets: " .. string.format("%s", bet))
print("Won: " .. string.format("%s", won))
print("Lost: " .. string.format("%s", loss))
print("Won - lost: " .. string.format("%s", won - loss))
print("Lost - won: " .. string.format("%s", loss - won))
if (#LH == lengths[currentIndex]) then
LH = {}
nextbet = minimalbet
print("The length now is " .. lengths[currentIndex])
if betsInCurrentMode >= betsPerMode then
betsInCurrentMode = 0
currentIndex = currentIndex + 1
if currentIndex > #lengths then
currentIndex = 1
end
currentModeIndex[currentIndex] = lengths[currentIndex]
end
end
if (previousbet == minimalbet) then
if (roll > halfRange) then
flag = 1
else
flag = 2
end
if (currentIndex == 1) then
if (flag==1) then
bethigh = false
else
bethigh = true
end
end
if (currentIndex == 2) then
if (flag==1) then
bethigh = true
else
bethigh = false
end
end
if (currentIndex == 3) then
if (flag==1) then
bethigh = false
else
bethigh = true
end
end
elseif (roll <= halfRange) then
--flag = 2
if (currentIndex == 1) then
if (flag == 2) then
bethigh = true
else
bethigh = false
end
end
if (currentIndex == 2) then
if (flag == 2) then
bethigh = false
else
bethigh = true
end
end
if (currentIndex == 3) then
if (flag == 2) then
bethigh = true
else
bethigh = false
end
end
end
if (bet >= 100) then
bet = 0
won = 0
loss = 0
end
end