Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Settings
- var GameMode = 1; // Sets the bet mode
- var BaseBet = 1; // 1 = 1 mxrp Exact Values
- var Multiplier = 1.50; //Default: 1.50 Sets the auto cash out X
- var MaxBet = 1000; //Default: 1000000 The bot will never bet more than this amount (in bits).
- var MaxProfit = 100000; //Default: 100000 The bot will stop when your total balance is higher that this value (in bits).
- var MaxLoss = 25000; //Default: 25000 You will never lose more than this amount (in bits). If a bet would exceed this amount, the bot stops automatically.
- var RandomBreak = 0; //Default: 0 Before the bot places a bet it generates a random number between 0 and 100, if that number is lower than "RandomBreak" the bot will take a break for 1 game. (This will not happen on a loss streak )
- var MaxProfitMode = false; //Default: true If this setting is true, you will always bet ("PercentOfTotal" / 100 * your balance), if this setting is false you will just bet your BaseBet.
- var PercentOfTotal = 0.1; //Default: 1 If MaxProfitMode is true, your BaseBet will always be ("PercentOfTotal" / 100 * your balance). Default 0.1% of your total balance.
- // core
- var Username = engine.getUsername();
- var StartBalance = engine.getBalance();
- var CurrentGameID = -1;
- var FirstGame = true;
- var CurrentBet = BaseBet;
- var StartBet = BaseBet;
- var bet = BaseBet;
- var CurrentMultiplier = Multiplier;
- var d = new Date();
- var StartTime = d.getTime();
- var LastResult = "WON";
- var Break = false;
- var LastBet = 0;
- var LastProfit = 0;
- var NewProfit = 0;
- var WinStreak = 1;
- var LoseStreak = 1;
- var Unit = 1;
- var SessionProfit = 0;
- var MaxSessionProfit = Multiplier - 1;
- //var enableBetting = true;
- if(GameMode == 1){
- if (confirm("Mode 1.08 / 1.25 Cashout, 4x/5x/5x Loss Streak Bet Increase Press OK to Continue") == true) {
- // OK to continue with the script.
- console.log('HolyGrail Initiated');
- } else {
- // Script Stopped.
- console.log('Script Stopped');
- engine.stop();
- }
- }
- // start message
- console.log('Ayy ' + Username);
- console.log('Your Starting Balance: ' + (StartBalance / 100).toFixed(2) + ' Coins');
- if(GameMode < 1 || GameMode > 4){
- console.log('Select a game mode between 1 and 4.');
- engine.stop();
- }
- // Start of a game.
- engine.on('game_starting', function(info) {
- CurrentGameID = info.game_id;
- console.log('---------------------');
- console.log('Game #' + CurrentGameID + ' Started.');
- var random = randomNumber(1,100);
- if(random < RandomBreak){
- console.log("Taking a break this round.");
- Break = true;
- }
- if(Break == false){
- if(MaxProfitMode == true){
- BaseBet = Math.round((PercentOfTotal / 100) * (engine.getBalance() / 100).toFixed(2));
- }
- if (engine.lastGamePlay() == "LOST" && !FirstGame) { // Check if you lost the last game
- if(GameMode == 1){// Main Bets
- //CurrentBet = (CurrentBet * 4);
- CurrentMultiplier = 1.25;
- if(LoseStreak == 1){
- CurrentBet = LastBet * 4;
- }
- if(LoseStreak == 2){
- CurrentBet = LastBet * 5;
- }
- if(LoseStreak == 3){
- CurrentBet = LastBet * 5;
- }
- if(LoseStreak == 4){
- CurrentBet = LastBet * 5;
- }
- console.log('Loss Streak: ' + LoseStreak);
- LoseStreak++;
- }
- //if(GameMode == 2){// new game
- //}
- }
- else { // If won last game or first game
- if(GameMode == 1){// Main Bets
- CurrentBet = BaseBet;
- CurrentMultiplier = 1.08;
- console.log('Win Streak:' + WinStreak);
- WinStreak++;
- }
- //if(GameMode == 2){// new game
- //}
- }
- //check if current bet is 0 or negative
- if(CurrentBet < 1){
- CurrentBet = 1;
- }
- //Controls Loss Streak Reset.
- if(WinStreak == 1){
- LoseStreak = 1;
- }
- //Controls Loss Streak.
- if(LoseStreak == 2){
- WinStreak = 0;
- }
- //Controls Win Streak Reset.
- if(LoseStreak == 4){
- LoseStreak = 1;
- WinStreak++;
- }
- // First game is set to false.
- FirstGame = false;
- // Changing last result
- LastResult = "LOST";
- if(((engine.getBalance() / 100) - CurrentBet) < ((StartBalance / 100) - MaxLoss)){
- console.log('This bet would Exceed Your maximum loss, the bot will stop now... ');
- engine.stop();
- }else{
- if (CurrentBet <= engine.getBalance()) { // Check if the balance is high enough to place the bet.
- if (CurrentBet > (MaxBet)) { // Check if the bet is higher than the given maximum bet by the user.
- console.warn('Current bet exceeds your maximum bet. Your bet is changed to: ' + (MaxBet) + ' Coins');
- CurrentBet = MaxBet;
- }
- console.log('BET: ' + (CurrentBet) + ' Coins @ ' + CurrentMultiplier + 'x');
- engine.placeBet(CurrentBet * 100, Math.round(CurrentMultiplier * 100), false);
- LastBet = CurrentBet;
- LastProfit = (CurrentBet * CurrentMultiplier) - CurrentBet;
- }
- else { // Not enough balance to place the bet.
- if (engine.getBalance() < 100) { // Stop the bot if balance is less then 100 bits.
- console.error('Your account balance is too low too place a bet.... bot will close now.');
- engine.stop();
- }
- else { // Changes basebet to 1 if balance is to low to make the current bet.
- console.warn('Your balance is too low too bet: ' + (CurrentBet / 100) + ' Coins.');
- CurrentBet = BaseBet;
- }
- }
- }
- }
- });
- engine.on('cashed_out', function(data) {
- if (data.username == engine.getUsername()) {
- console.log('CASHED OUT @ ' + (data.stopped_at / 100) + 'x');
- SessionProfit = SessionProfit + (Unit * MaxSessionProfit);
- if(((engine.getBalance() - StartBalance) / 100).toFixed(2) > MaxProfit){
- console.log('Maximum profit reached, bot is shutting down...');
- console.log('You have made '+((engine.getBalance() - StartBalance) / 100).toFixed(2)+' Profit This Session.');
- engine.stop();
- }
- LastResult = "WON";
- }
- });
- engine.on('game_crash', function(data) {
- var newdate = new Date();
- var timeplaying = ((newdate.getTime() - StartTime) / 1000) / 60;
- if(Break == false){
- console.log('Game Crashed at ' + (data.game_crash / 100) + 'x');
- console.log('Session Profit: ' + ((engine.getBalance() - StartBalance) / 100).toFixed(2) + ' Coins in ' + Math.round(timeplaying) + ' Minutes.');
- } else{
- Break = false;
- }
- });
- function randomNumber(min,max)
- {
- return Math.floor(Math.random()*(max-min+1)+min);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement