Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var config = {
- title: { value: 'title', type: 'noop', label: 'Dexon\'s Random script v1.5.5' },
- baseBet: { value: 100, type: 'balance', label: 'Base bet' },
- maxBet: { value: 10000, type: 'balance', label: 'Max bet' },
- payouts: {
- value: 'lo', type: 'radio', label: 'Payouts',
- options: {
- hi: { value: 'hi', type: 'noop', label: 'High cashouts (high risks, high rewards)' },
- lo: { value: 'lo', type: 'noop', label: 'Low cashouts (safer but harder to recover)' },
- }
- },
- mode: {
- value: 'real', type: 'radio', label: 'Mode',
- options: {
- real: { value: 'real', type: 'noop', label: 'Real bets' },
- sim: { value: 'sim', type: 'noop', label: 'Simulation' },
- }
- }
- };
- var prevBet = null, bet = null, payout = null, lossNetProfit = null, profit = null, isRecovering = null, skipping = null;
- var placeBet = () => {
- bet = Math.round(config.baseBet.value + (lossNetProfit>0?lossNetProfit*(Math.random()):0));
- if(bet > config.maxBet.value) bet = Math.round(config.maxBet.value);
- bet = Math.round(bet/100)*100;
- payout = 100;
- if (userInfo.balance < bet) {
- stop('Insufficient balance to make the bet');
- }else{
- if(config.payouts.value === 'lo'){
- for(let i=1; i<=10000; i++){
- payout += 1;
- let odds = bet / (payout/100 * bet);
- if(Math.random() > odds * 0.99){
- break;
- }
- }
- }else if(config.payouts.value === 'hi'){
- let randomNum = Math.random();
- for(let i=1; i<=100000; i++){
- payout += 1;
- let odds = bet / (payout/100 * bet);
- if(randomNum > odds * 0.99){
- break;
- }
- }
- }
- if(Math.random() <= 0.01){
- skipping = true;
- log((config.mode.value === 'sim'?'(SIMULATION)':''), "1% protection! skip the bet.");
- }else{
- if(config.mode.value === 'sim'){
- log("(SIMULATION) Betting", parseFloat((bet/100).toFixed(2)), "on", parseFloat((payout/100).toFixed(2))+"x");
- prevBet = bet;
- }else if(config.mode.value === 'real'){
- log("Betting", parseFloat((bet/100).toFixed(2)), "on", parseFloat((payout/100).toFixed(2))+"x");
- engine.bet(bet, parseFloat((payout/100).toFixed(2)));
- prevBet = bet;
- }
- }
- }
- };
- engine.on('GAME_STARTING', () => {
- placeBet();
- });
- engine.on('GAME_ENDED', (data) => {
- if(!prevBet || skipping){
- skipping = false;
- return;
- }
- log("Game busted @", data.bust);
- let bust = data.bust * 100;
- let win = null;
- if(payout > bust){
- win = false;
- }else{
- win = true;
- }
- if(win){
- if(lossNetProfit > 0) lossNetProfit -= bet * (payout/100) - bet;
- if(lossNetProfit <= 0){
- lossNetProfit = 0;
- isRecovering = false;
- }
- profit += bet * (payout/100) - bet;
- log((config.mode.value === 'sim'?'(SIMULATION)':''), "Won", parseFloat(((bet * (payout/100))/100).toFixed(2)), "bits", (lossNetProfit>0?". | Current net loss: "+parseFloat((lossNetProfit/100).toFixed(2))+" bits":""));
- }else{
- lossNetProfit += bet;
- isRecovering = true;
- profit -= bet;
- log((config.mode.value === 'sim'?'(SIMULATION)':''), "Lost", parseFloat((bet/100).toFixed(2)), "bits. | Current net loss:", parseFloat((lossNetProfit/100).toFixed(2)), "bits");
- }
- log("Profit: " + parseFloat((profit/100).toFixed(2)));
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement