Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /// CSGOEmpire Auto Rain Claim
- /// Version: 1.0
- /// Made by Hirsw0w (Twitter: @liranpes)
- var metadata = JSON.parse(localStorage.getItem("metadata"));
- var identify = {
- uid: metadata.user.id,
- model: metadata.user,
- authorizationToken: metadata.socket_token,
- signature: metadata.socket_signature
- }
- var socket = null;
- createConnection();
- function createConnection() {
- socket = new WebSocket("wss://roulette.csgoempire.com/s/?EIO=3&transport=websocket");
- socket.onopen = (e) => {
- console.log("[CSGOEmpire] Connection established!");
- socket.send("40/chat,");
- socket.send(`42/chat,["identify", ${JSON.stringify(identify)}]`);
- }
- socket.onmessage = (e) => {
- var message = e.data;
- if(message.indexOf(`"broadcast":"chatRain"}]`) != -1) {
- console.log("Rain has started!");
- socket.send(`42/chat,["chatRain claim"]`);
- }
- if(message.indexOf(`"success":"You've successfully participated in the event!"}`) != -1)
- console.log("Claimed rain successfully!");
- }
- socket.onclose = (e) => {
- console.log("[CSGOEmpire] Connection closed reconnecting in 5 seconds!");
- setTimeout(createConnection, 5000);
- }
- }
- setInterval(function() {
- if(socket != null && socket.readyState == socket.OPEN)
- socket.send("2");
- }, 15 * 1000);
Add Comment
Please, Sign In to add comment