Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const min = 2;
- const max = 30;
- const minimum = 1000;
- const amount = 5000;
- const profitper = 1;
- const rate = 3;
- const arrayamount = 3;
- const base = 1;
- const rateincreasement = 0.75;
- const ratedecreasement = 0.005;
- const betlimit = 1000000;
- const logging = 1;
- const setting1 = 50000;
- let currentrate = rate;
- let c = 0;
- let history = new Array(0);
- let target = 0;
- let totalloss = 0;
- let lossstreak = 0;
- let currentBet = base;
- let lastlost = false;
- function sleep(ms) {
- return new Promise(resolve => setTimeout(resolve, ms));
- }
- function insert(element, array) {
- array.splice(locationOf(element, array) + 1, 0, element);
- return array;
- }
- function locationOf(element, array, start, end) {
- start = start || 0;
- end = end || array.length;
- var pivot = parseInt(start + (end - start) / 2, 10);
- if (end-start <= 1 || array[pivot] === element) return pivot;
- if (array[pivot] < element) {
- return locationOf(element, array, pivot, end);
- } else {
- return locationOf(element, array, start, pivot);
- }
- }
- const main = async () => {
- await this.log("starting script");
- while (true) {
- c++;
- if (target > 0) {
- if (lastlost) {
- currentBet = (1/(target-1)) * (totalloss + profitper);
- lossstreak++;
- } else {
- currentBet = base
- lossstreak = 0;
- }
- const {multiplier} = await this.bet(Math.round(currentBet) * 100, target);
- history.unshift(multiplier);
- if (multiplier < target) {
- lastlost = true;
- totalloss += currentBet
- if (totalloss >= setting1) {
- currentrate += rateincreasement;
- }
- } else {
- if (logging) {
- this.log(`#${c} ${Math.max(Math.round(currentBet),1) * (target - 1)}`);
- }
- totalloss = 0;
- currentrate = rate;
- lastlost = false;
- }
- 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 medians = new Array(0);
- let filtered = new Array(0);
- let median = 0
- for (let i = 0; filtered.length < arrayamount; i++) {
- if (i >= history.length) {
- filtered.push(history.slice(0,i));
- break;
- }
- if (i == minimum) {
- medians.sort(function(a,b){return a-b});
- }
- if (i >= minimum) {
- insert(history[i], medians);
- if (filtered.length <= 0) {
- let center = parseInt(medians.length / 2);
- if (medians.length % 2 == 0) {
- median = medians[center];
- } else {
- median = (medians[center - 1] + medians[center]) / 2;
- }
- if (Math.abs(median - 1.98) < 0.001) {
- filtered.push(history.slice(0,i));
- }
- } else {
- if (Math.abs(medians.length - filtered[filtered.length - 1].length) > 10) {
- medians.sort(function(a, b) { return a - b });
- let center = parseInt(medians.length / 2);
- if (medians.length % 2 == 1) {
- median = medians[center];
- } else {
- median = (medians[center - 1] + medians[center]) / 2;
- }
- if (Math.abs(median - 1.98) < 0.001) {
- filtered.push(history.slice(0,i));
- }
- }
- }
- } else {
- medians.unshift(history[i]);
- }
- }
- for (let i = 0; i < Math.abs(max - min) * 100; i++) {
- let streak = 0;
- 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) {
- streak++;
- } else {
- streak = 0;
- }
- 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
- let prob = ((99/((i / 100) + min)) * ((avgstreak / probstreak) + (streak / probstreak) + (streak / avgstreak) + ((99/((i / 100) + min)) / count))) / 4
- if ((prob / (99/((i / 100) + min))) >= currentrate) {
- target = Math.round(((i / 100) + min) * 100) / 100
- }
- }
- }
- }
- while (true) {
- try {
- 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