Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Sample #6 : Very Optimized-Only Count & Rate In/Decrease
- const min = 10;
- const max = 30;
- const minimum = 300;
- const amount = 300;
- const rate = 3;
- const profitper = 500;
- const arrayamount = 3;
- const base = 50;
- const rateincreasement = 0.05;
- const ratedecreasement = 0.005;
- let currentrate = rate;
- let c = 0;
- let history = new Array(0);
- let target = 0;
- let totalloss = 0;
- let lossstreak = 0;
- let currentBet = 1;
- let lastlost = false;
- let maxtotalloss = 0;
- function sleep(ms) {
- return new Promise(resolve => setTimeout(resolve, ms));
- }
- const main = async () => {
- await this.log("starting script");
- while (true) {
- c++;
- if (target > 0) {
- console.log(`#${c} : ${target}x`)
- if (lastlost) {
- totalloss += currentBet;
- if (totalloss > maxtotalloss) {
- maxtotalloss = totalloss;
- console.log(maxtotalloss);
- }
- currentBet = (1/(target-1)) * (totalloss + profitper);
- lossstreak++;
- } else {
- totalloss = 0;
- currentBet = base;
- lossstreak = 0;
- }
- if (currentBet < 1) {
- currentBet = 1
- }
- const {multiplier} = await this.bet(Math.round(currentBet) * 100, target);
- history.unshift(multiplier);
- if (multiplier < target) {
- lastlost = true;
- currentrate += rateincreasement;
- } else {
- currentrate = rate;
- lastlost = false;
- this.log(` #${c} ${Math.max(Math.round(currentBet),1) * (target - 1)}`);
- }
- target = 0;
- } else {
- if (currentrate > rate) {
- currentrate -= ratedecreasement
- if (currentrate < rate) {
- currentrate = rate
- }
- }
- if (c%2==0) {
- const {multiplier} = await this.bet(100,1.01);
- history.unshift(multiplier);
- } else {
- const {multiplier} = await this.skip();
- history.unshift(multiplier);
- }
- }
- if (c < amount) {
- continue;
- }
- if (history.length > amount) {
- history.pop()
- }
- let filtered = new Array(0);
- let sum = 0;
- for (let i = 0; filtered.length < arrayamount; i++) {
- if (i >= history.length) {
- filtered.push(history.slice(0,i));
- break;
- }
- sum += 99 / history[i];
- if (i >= minimum) {
- let average = sum / (i + 1)
- if (((99/1.99) < average) && (average <= ((99/1.98) + 0.00001))) {
- filtered.push(history.slice(0,i));
- }
- }
- }
- for (let i = 0; i < Math.abs(max - min) * 100; i++) {
- let avgstreak = 0;
- let count = 0;
- let avgstreakc = 0;
- for (let j = 0; j < filtered.length; j++) {
- for (let p = 0; p < filtered[j].length ; p++) {
- if (filtered[j][p] < (i / 100) + min) {
- avgstreak++;
- } else {
- avgstreakc++;
- }
- if (j == (filtered.length-1)) {
- if (filtered[filtered.length-1][p] >= (i / 100) + min) {
- count++;
- }
- }
- }
- }
- avgstreak /= avgstreakc;
- count /= filtered[filtered.length-1].length;
- count *= 100;
- let probstreak = (100/(99/((i / 100) + min))) - 1;
- if (avgstreak == Infinity) {
- avgstreak = probstreak
- }
- let prob = ((99/((i / 100) + min)) * ((avgstreak / probstreak) + ((99/((i / 100) + min)) / count))) / 2;
- if (prob == Infinity) {
- console.log("\n\n\n\n\n\n\n\n\n\nInfinity")
- console.log(avgstreak)
- console.log(count)
- console.log("\n\n\n\n\n\n\n\n\n\n")
- }
- if ((prob / (99/((i / 100) + min))) >= currentrate) {
- target = Math.round(((i / 100) + min) * 100) / 100
- }
- }
- }
- }
- while (true) {
- try {
- this.log("Starting Script.")
- await main();
- } catch (error) {
- this.log("Connection Closed. Restart After 1 Second.")
- await sleep(1000);
- continue;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement