basebet = 0.1 minbet = 0.1 basech = 10 recoverCh = 47 target = 1 stopLoss = -10 maxBet = 5 lossCount = 0 lossLimit = 3 inRecovery = false chance = basech nextbet = basebet function dobet() if profit >= target or profit <= stopLoss then stop() end if win then lossCount = 0 if inRecovery then inRecovery = false nextbet = basebet chance = basech end else lossCount = lossCount + 1 end if lossCount >= lossLimit then inRecovery = true end if inRecovery then chance = recoverCh nextbet = previousbet * 2 if nextbet > maxBet then nextbet = maxBet end else chance = basech nextbet = basebet end bethigh = math.random(2) == 1 end