CCCPaste

Yudha on Road

-- Settings
baseChance = 5.99
chanceStep = 0.6
maxLoseStreak = 15
recoveryStartChance = 0.25
recoveryStep = 0.15
profitTarget = balance / 1000000  -- set base disni
bethigh = true

-- State
chance = baseChance
loseStreak = 0
totalLost = 0
inRecovery = false
nextbet = 0.00000001  -- Default minimum bet

function calculatePayout(ch)
    return 99 / ch
end

function calculateBet(payout)
    return (totalLost + profitTarget) / (payout - 1)
end

target  = balance * (0.525 / 100)
StopLossLimitStreakRound = balance * (1 / 100)
 
function dobet()
    if profit > target then stop() end
    if profit < ((StopLossLimitStreakRound) * -1) then stop() end
    if win then
        -- Reset on win
        loseStreak = 0
        totalLost = 0
        inRecovery = false
        chance = baseChance
        payout = calculatePayout(chance)
        nextbet = calculateBet(payout)
    else
        loseStreak = loseStreak + 1
        totalLost = totalLost + previousbet

        if not inRecovery then
            if loseStreak > maxLoseStreak then
                -- Masuk recovery mode
                inRecovery = true
                chance = recoveryStartChance
            else
                chance = baseChance + (chanceStep * loseStreak)
            end
        else
            -- Recovery mode
            chance = chance + recoveryStep
        end

        payout = calculatePayout(chance)
        nextbet = calculateBet(payout)
    end

    -- Cegah overbet (nextbet > balance)
    if nextbet >= balance then
        stop()
    end
end