This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| async function resolveKeyWorkers(brokenKey, startIter, numWorkers) { | |
| var updateFrequency = 100000 * Number(numWorkers); | |
| var splitKey = brokenKey.split("?"); | |
| var iteratorStart = Number(startIter) || Math.pow(58, (splitKey.length - 2)); | |
| var duration = Math.pow(58, (splitKey.length - 1)); | |
| var workers = []; | |
| var latestStatus = null, latestUpdate = 0; | |
| var statusUpdate = function (info) { | |
| if (!latestStatus || info[0] > latestStatus[0]) { | |
| latestStatus = info; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * Calculates current cumulative geometric probability | |
| * @param payout Target payout to calculate for | |
| * @param results Array of ordered results | |
| * @param precision Num decimal places accuracy | |
| * @param debug Output result slice to console | |
| * @returns Cumulative geometric win probability | |
| */ | |
| function getCumulativeProb(payout, results, precision, debug = false) { | |
| let prc = 10 ** Math.max(1, Math.min((precision || 18), 18), 1); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // ----------------------- V1.4 ------------------------- | |
| // This utility function will check an array of game results for a given pattern and return the most recent occurrence of a | |
| // match. The pattern is specified using a regex-style syntax that uses the available tokens defined in the token list. The | |
| // token list is an array of objects containing a token letter and a callback function that is used to check if the game results | |
| // match the specified condition. It returns an array containing the game result objects for the matched results. | |
| function checkPattern(pattern, results, tokens){ | |
| let tokenLetters = pattern.match(/\w/g); | |
| let filteredTokens = tokens.filter((token) => tokenLetters.includes(token[0])); | |
| let res = results.map((r, i) => (`[${i}${filteredTokens.filter((e) => e[1](r)).map((e) => (e[0])).join('')}]`)).reverse().join(''); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function downloadString(data, fileName = 'download.txt', fileType = 'text/plain') { | |
| var blob = new Blob([data], {type: fileType}); | |
| if (window.navigator && window.navigator.msSaveOrOpenBlob) { | |
| window.navigator.msSaveOrOpenBlob(blob, fileName); | |
| } else{ | |
| var e = document.createEvent('MouseEvents'), | |
| a = document.createElement('a'); | |
| a.download = fileName; | |
| a.href = window.URL.createObjectURL(blob); | |
| a.dataset.downloadurl = [fileType, a.download, a.href].join(':'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var config = { | |
| baseBet: { value: 100, type: 'balance', label: 'Base Bet' }, | |
| payout: { value: 2, type: 'multiplier', label: 'Target Payout' }, | |
| stop: { value: 1e8, type: 'balance', label: 'Stop if bet >' }, | |
| delay: { value: 100, type: 'number', label: 'Bet Speed' }, | |
| loss: { | |
| value: 'increase', type: 'radio', label: 'On Loss', | |
| options: { | |
| base: { type: 'noop', label: 'Return to base bet' }, | |
| increase: { value: 2, type: 'multiplier', label: 'Increase bet by' }, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Arrow functions | |
| const round = (num, prec) => (prec = 10 ** prec, Math.round(num * prec) / prec); | |
| const roundUp = (num, prec) => (prec = 10 ** prec, Math.ceil(num * prec) / prec); | |
| const roundDown = (num, prec) => (prec = 10 ** prec, Math.floor(num * prec) / prec); | |
| // Classic functions | |
| function round(num, prec) { | |
| prec = Math.pow(10, prec); | |
| return Math.round(num * prec) / prec; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| engine.bet=function(e,n){this.nextBet={value:e,target:n}},engine.getState=(()=>{}),engine.cashOut=(()=>{});const gameResultFromHash=()=>{},SHA256=()=>{};engine.history={first(){let e=engine.nextResult;if(e||(e=engine.getLastGamePlayed),e){let n={id:e.id,hash:e.hash,bust:e.crash};return["NOT_PLAYED","SKIPPED"].includes(engine.getLastGamePlay)||(n.wager=e.wager,e.cashout<=e.crash&&(n.cashedAt=e.cashout)),n}return{id:0,hash:"none",bust:0,wager:0,cashedAt:0}}};const log=console.log,stop=engine.stop,userInfo={get uname(){},get balance(){return engine.getBalance}};engine.on("script_started",()=>{setTimeout(async()=>{for(;;)engine.nextBet=null,engine.nextResult=null,await engine.emit("GAME_STARTING"),null!==engine.nextBet?(engine.emit("BET_PLACED",{uname:"temp",wager:engine.nextBet.value,payout:engine.nextBet.target}),engine.nextResult=await engine.placeBet(engine.nextBet.value,engine.nextBet.target)):engine.nextResult=await engine.skip(),engine.emit("GAME_STARTED"),"WON"===engine.getLastGamePlay&&engine.emit("CASHE |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var config = {}; | |
| (function (I) { | |
| function w(c, a, d) { | |
| var l = 0, b = [], g = 0, f, n, k, e, h, q, y, p, m = !1, t = [], r = [], u, z = !1; d = d || {}; f = d.encoding || "UTF8"; u = d.numRounds || 1; if (u !== parseInt(u, 10) || 1 > u) throw Error("numRounds must a integer >= 1"); if (0 === c.lastIndexOf("SHA-", 0)) if (q = function (b, a) { return A(b, a, c) }, y = function (b, a, l, f) { | |
| var g, e; if ("SHA-224" === c || "SHA-256" === c) g = (a + 65 >>> 9 << 4) + 15, e = 16; else throw Error("Unexpected error in SHA-2 implementation"); for (; b.length <= g;)b.push(0); b[ a >>> 5 ] |= 128 << 24 - a % 32; a = a + l; b[ g ] = a & 4294967295; | |
| b[ g - 1 ] = a / 4294967296 | 0; l = b.length; for (a = 0; a < l; a += e)f = A(b.slice(a, a + e), f, c); if ("SHA-224" === c) b = [ f[ 0 ], f[ 1 ], f[ 2 ], f[ 3 ], f[ 4 ], f[ 5 ], f[ 6 ] ]; else if ("SHA-256" === c) b = f; else throw Error("Unexpected error in SHA-2 implementation"); return b | |
| }, p = function (b) { return b.slice |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var config = { | |
| baseBet: { value: 100, type: 'balance', label: 'base bet' }, | |
| stopBet: { value: 1e8, type: 'balance', label: 'stop if bet >' }, | |
| basePayout: { value: 2, type: 'multiplier' }, | |
| stopPayout: {value: 20,type: 'multiplier',label: 'stop if payout >'}, | |
| lossBet: { | |
| value: 'increase', type: 'radio', label: 'Bet On Loss', | |
| options: { | |
| base: { type: 'noop', label: 'Return to base bet' }, | |
| increase: { value: 2, type: 'multiplier', label: 'Multiply bet by' }, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var config = { | |
| baseBet: { type: 'balance', label: 'Base Bet', value: 128}, | |
| betSpeed: { type: 'number', label: 'Bet Speed', value: 800}, | |
| maxBet: { type: 'balance', label: 'Max Bet', value: 10000 } | |
| } | |
| Object.entries(config).forEach(c => window[c[0]] = c[1].value); | |
| var s = t => new Promise(r => setTimeout(r, t)); | |
| for(let b = baseBet; ;b=Math.max(baseBet, b)){ | |
| if (b > maxBet) break; | |
| await this.bet(Math.round(b / 100) * 100, 2).then(r => { |