Download as txt, pdf, or txt
Download as txt, pdf, or txt
You are on page 1of 2

// Користувач

const USER_ID = '50117975';


// Сума виграшу
const WIN_AMOUNT = 10;

// Функція для отримання випадкового числа


function getRandomNumber(min, max) {
return Math.floor(Math.random() * (max - min + 1)) + min;
}

// Початкова сума ставки, на 5.00000052 BTC


let betAmount = 5.00000052;

// Функція для ставки і отримання результату


function roll() {
// Встановлюємо значення поля ставки
const betInput = document.querySelector('#free_play_form_bet_input');
if (!betInput) {
console.log('Bet input not found!');
return;
}
betInput.value = betAmount.toFixed(8);

// Клікаємо кнопку Roll


const rollButton = document.querySelector('#free_play_form_button');
if (!rollButton) {
console.log('Roll button not found!');
return;
}
rollButton.click();

// Чекаємо 10 секунд на отримання результату


setTimeout(function() {
// Отримуємо результат гри
const resultText = document.querySelector('.close-reveal-
modal.winnings').textContent;

// Перевіряємо, чи випала виграшна комбінація


if (resultText.includes('WIN')) {
const payout = parseFloat(resultText.match(/([\d.,]+)/)[1].replace(/,/g,
''));
console.log('You won ' + payout.toFixed(8) + ' BTC');
if (payout === 0) {
// Збільшуємо ставку вдвічі при програші
betAmount *= 2;
roll();
} else if (payout === 1000000) {
// Випало число 0-9885, зараховуємо WIN_AMOUNT BTC
console.log('Congratulations! You won the jackpot!');

// Встановлюємо значення поля для зарахування виграшу


const rewardInput = document.querySelector('.close-reveal-modal
#free_play_reward_points');
if (!rewardInput) {
console.log('Reward input not found!');
return;
}
rewardInput.value = WIN_AMOUNT;
// Клікаємо кнопку для зарахування виграшу
const rewardButton = document.querySelector('.close-reveal-modal
#reward_points_claim_button');
if (!rewardButton) {
console.log('Reward button not found!');
return;
}
rewardButton.click();
}
} else {
console.log('You lost!');
// Збільшуємо ставку вдвічі при програші
betAmount *= 2;
roll();
}
}, 10000);
}

// Перевіряємо, чи знаходимось на потрібній сторі

You might also like