-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.html
116 lines (99 loc) · 3.21 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
<html>
<head>
<title>Roblox Player Server Finder</title>
<meta charset = "utf-8">
<meta name="author" content="CriShoux">
<meta name="description" content="Find the server of a Roblox Player">
<meta name="keywords" content="Roblox Server, Roblox Player Finder, Roblox Server Joiner, Roblox Stream Sniper">
<meta property="og:title" content="Roblox Player Server Finder">
<meta property="og:description" content="Find the server of a Roblox Player">
<meta property="og:type" content="website">
<style>
body {
background-color: rgb(25, 25, 25);
color: white;
font-family: "Trebuchet MS";
}
#main {
margin: 20px auto 0 auto;
width: 40%;
height: 75%;
}
#info {
margin-top: 20px;
text-align: center;
}
button {
background-color: rgb(30, 30, 30);
color: white;
border: 1px solid rgba(255, 255, 255, 0.5);
border-radius: 6px;
margin: 20px auto 0 auto;
padding: 5px;
width: 50%;
height: 35px;
cursor: pointer;
display: block;
}
input {
background: rgb(25, 25, 25);
color: white;
border: 1px solid rgba(255, 255, 255, 0.5);
border-radius: 6px;
font-size: 15px;
width: 100%;
height: 35px;
text-align: center;
}
</style>
</head>
<body>
<div id="main">
<input id="userIDInput" type="text" placeholder="User ID">
<input id="placeIDInput" style="margin-top: 20px;" type="text" placeholder="Place ID">
<button id="findBtn" type="button">Find</button>
<p id="info"></p>
</div>
<script>
const userIDInput = document.getElementById('userIDInput');
const placeIDInput = document.getElementById('placeIDInput');
const findBtn = document.getElementById('findBtn');
const info = document.getElementById('info');
const findUserInServer = async (userID, placeID) => {
try {
info.innerText = 'Getting user avatar image';
let avatarImageURL = await fetch(`https://shoux-servers.herokuapp.com/roblox-player-server-finder/headshot-thumbnail/${userID}`);
avatarImageURL = await avatarImageURL.text();
let index = 0;
while (true) {
let servers = await fetch(`https://shoux-servers.herokuapp.com/roblox-player-server-finder/getgameinstances/${placeID}/${index}`);
servers = await servers.json();
for (server of servers.Collection) {
for (player of server.CurrentPlayers) {
if (player.Thumbnail.Url == avatarImageURL) {
info.innerText = `Found!\n\n
Go to the Roblox website, press Ctrl/Cmd+Shift+I, go to the console and paste in:\n\n
Roblox.GameLauncher.joinGameInstance(${placeID}, '${server.Guid}')\n\n
Note: If a user has an identical avatar to the same user you input, it may trigger on the wrong person`;
return;
}
}
}
info.innerText = `${index}/${servers.TotalCollectionSize} servers scanned`;
if (index > servers.TotalCollectionSize) {
info.innerText = 'Failed to find server';
return;
}
index += 10;
}
} catch(err) {
console.error(err);
info.innerText = err;
}
}
findBtn.onclick = () => {
findUserInServer(userIDInput.value, placeIDInput.value);
}
</script>
</body>
</html>