Allow any account to join a friend
This commit is contained in:
parent
d3809d2017
commit
d2c679dc78
54
auto-uwp.js
54
auto-uwp.js
|
@ -13,8 +13,10 @@
|
|||
// @match https://*.roblox.com/*
|
||||
// @match https://roblox.com/*
|
||||
// @icon https://cdn.discordapp.com/avatars/1085827557410209832/a73faa8fc4865cbb14a5bb72f95d5e3d.webp?size=80
|
||||
// @run-at document-start
|
||||
// @license MIT
|
||||
// @run-at document-start
|
||||
// @grant GM_xmlhttpRequest
|
||||
|
||||
// ==/UserScript==
|
||||
|
||||
const Protocall = "roblox://experiences/start";
|
||||
|
@ -24,29 +26,51 @@ const Protocall = "roblox://experiences/start";
|
|||
// robloxmobile:// - Mobile protocall
|
||||
|
||||
|
||||
const FollowUserToExperience = function(userId) {
|
||||
window.location.href = `${Protocall}?userId=${userId}`;
|
||||
};
|
||||
const GameJoin = function(placeId) {
|
||||
window.location.href = `${Protocall}?placeId=${placeId}`;
|
||||
window.location.href = `${Protocall}?placeId=${placeId}`;
|
||||
};
|
||||
const JoinGameServer = function(placeId, gameId) {
|
||||
window.location = `${Protocall}?placeId=${placeId}&gameInstanceId=${gameId}`;
|
||||
window.location = `${Protocall}?placeId=${placeId}&gameInstanceId=${gameId}`;
|
||||
};
|
||||
const JoinPrivateGame = function(placeId, accessCode, linkCode) {
|
||||
window.location = `${Protocall}?placeId=${placeId}&accessCode=${accessCode}&linkCode=${linkCode}`;
|
||||
window.location = `${Protocall}?placeId=${placeId}&accessCode=${accessCode}&linkCode=${linkCode}`;
|
||||
};
|
||||
const FollowUserToExperience = function(userId) {
|
||||
//window.location.href = `${Protocall}?userId=${userId}`;
|
||||
|
||||
GM_xmlhttpRequest({
|
||||
method: "POST",
|
||||
url: `https://presence.roblox.com/v1/presence/users`,
|
||||
responseType: "json",
|
||||
headers: {
|
||||
"Content-Type": "application/json"
|
||||
},
|
||||
data: JSON.stringify({
|
||||
"userIds": [userId]
|
||||
}),
|
||||
onload: function(res) {
|
||||
const json = res.response.userPresences[0]
|
||||
const placeId = json.placeId;
|
||||
const jobId = json.gameId;
|
||||
JoinGameServer(placeId,jobId)
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
function getCookie(name) {
|
||||
var match = document.cookie.match(new RegExp('(^| )' + name + '=([^;]+)'));
|
||||
if (match) return match[2];
|
||||
}
|
||||
|
||||
(async () => {
|
||||
'use strict';
|
||||
'use strict';
|
||||
|
||||
while (typeof(Roblox) == "undefined" || typeof(Roblox.GameLauncher) == "undefined") {
|
||||
await new Promise(resolve => setTimeout(resolve))
|
||||
};
|
||||
while (typeof(Roblox) == "undefined" || typeof(Roblox.GameLauncher) == "undefined") {
|
||||
await new Promise(resolve => setTimeout(resolve))
|
||||
};
|
||||
|
||||
Roblox.GameLauncher.joinMultiplayerGame = GameJoin;
|
||||
Roblox.GameLauncher.followPlayerIntoGame = FollowUserToExperience;
|
||||
Roblox.GameLauncher.joinGameInstance = JoinGameServer;
|
||||
Roblox.GameLauncher.joinPrivateGame = JoinPrivateGame;
|
||||
Roblox.GameLauncher.joinMultiplayerGame = GameJoin;
|
||||
Roblox.GameLauncher.followPlayerIntoGame = FollowUserToExperience;
|
||||
Roblox.GameLauncher.joinGameInstance = JoinGameServer;
|
||||
Roblox.GameLauncher.joinPrivateGame = JoinPrivateGame;
|
||||
})()
|
||||
|
|
Loading…
Reference in New Issue