JSON joinscript
This commit is contained in:
parent
8bd81f19fd
commit
78ca7dc069
|
|
@ -1,242 +1,52 @@
|
||||||
const script = `
|
const script = {
|
||||||
--[[
|
ClientPort: 0,
|
||||||
pcall(function() game:GetService("InsertService"):SetBaseSetsUrl("http://www.rowblx.xyz/stamper/inseasset.php?nsets=10&type=base%22") end)
|
MachineAddress: "localhost",
|
||||||
pcall(function() game:GetService("InsertService"):SetUserSetsUrl("http://www.rowblx.xyz/stamper/inseasset.php?nsets=20&type=user&userid=%d%22") end)
|
ServerPort: 53640,
|
||||||
pcall(function() game:GetService("InsertService"):SetCollectionUrl("http://www.rowblx.xyz/stamper/inseasset.php?sid=%d%22") end)
|
PingUrl: "",
|
||||||
pcall(function() game:GetService("InsertService"):SetAssetUrl("http://www.rowblx.xyz/asset/?id=%d") end)
|
PingInterval: 120,
|
||||||
pcall(function() game:GetService("InsertService"):SetAssetVersionUrl("http://www.rowblx.xyz/asset/?id=%d") end)
|
UserName: "Player",
|
||||||
pcall(function() game:GetService("SocialService"):SetGroupUrl("http://10char.xyz/stamper/groupurl.php?method=IsInGroup&playerid=%d&groupid=%d%22") end)
|
SeleniumTestMode: false,
|
||||||
pcall(function() game:GetService("BadgeService"):SetPlaceId(-1) end)
|
UserId: 0,
|
||||||
pcall(function() game:GetService("BadgeService"):SetIsBadgeLegalUrl("") end)
|
SuperSafeChat: false,
|
||||||
pcall(function() game:GetService("ScriptInformationProvider"):SetAssetUrl("http://www.rowblx.xyz/asset/") end)
|
PlaceId: 0,
|
||||||
pcall(function() game:GetService("ContentProvider"):SetBaseUrl("http://www.rowblx.xyz/stamper/stampericons.php?%22) end)
|
MeasurementUrl: "",
|
||||||
]]--
|
WaitingForCharacterGuid: "d40fd046-7a4f-41b5-aa33-c19829af09ed",
|
||||||
|
BaseUrl: "http://www.roblox.com/",
|
||||||
-- functions --------------------------
|
ChatStyle: "Classic",
|
||||||
function onPlayerAdded(player)
|
VendorId: 0,
|
||||||
-- override
|
ScreenShotInfo: "",
|
||||||
end
|
VideoInfo:
|
||||||
|
'<?xml version="1.0"?><entry xmlns="http://www.w3.org/2005/Atom" xmlns:media="http://search.yahoo.com/mrss/" xmlns:yt="http://gdata.youtube.com/schemas/2007"><media:group><media:title type="plain"><![CDATA[ROBLOX Place]]></media:title><media:description type="plain"><![CDATA[ For more games visit http://www.roblox.com]]></media:description><media:category scheme="http://gdata.youtube.com/schemas/2007/categories.cat">Games</media:category><media:keywords>ROBLOX, video, free game, online virtual world</media:keywords></media:group></entry>',
|
||||||
pcall(function() game:SetPlaceID(-1, false) end)
|
CreatorId: 0,
|
||||||
|
CreatorTypeEnum: "User",
|
||||||
local startTime = tick()
|
MembershipType: "None",
|
||||||
local connectResolved = false
|
AccountAge: 0,
|
||||||
local loadResolved = false
|
CookieStoreFirstTimePlayKey: "rbx_evt_ftp",
|
||||||
local joinResolved = false
|
CookieStoreFiveMinutePlayKey: "rbx_evt_fmp",
|
||||||
local playResolved = true
|
CookieStoreEnabled: false,
|
||||||
local playStartTime = 0
|
IsRobloxPlace: false,
|
||||||
|
GenerateTeleportJoin: false,
|
||||||
local cdnSuccess = 0
|
IsUnknownOrUnder13: false,
|
||||||
local cdnFailure = 0
|
SessionId: "",
|
||||||
|
DataCenterId: 0,
|
||||||
settings()["Game Options"].CollisionSoundEnabled = true
|
FollowUserId: 0,
|
||||||
pcall(function() settings().Rendering.EnableFRM = true end)
|
UniverseId: 0,
|
||||||
pcall(function() settings().Physics.Is30FpsThrottleEnabled = false end)
|
BrowserTrackerId: 0,
|
||||||
pcall(function() settings()["Task Scheduler"].PriorityMethod = Enum.PriorityMethod.AccumulatedError end)
|
UsePortraitMode: false
|
||||||
pcall(function() settings().Physics.PhysicsEnvironmentalThrottle = Enum.EnviromentalPhysicsThrottle.DefaultAuto end)
|
};
|
||||||
|
|
||||||
local threadSleepTime = ...
|
|
||||||
|
|
||||||
if threadSleepTime==nil then
|
|
||||||
threadSleepTime = 15
|
|
||||||
end
|
|
||||||
|
|
||||||
local test = true
|
|
||||||
|
|
||||||
local closeConnection = game.Close:connect(function()
|
|
||||||
if 0 then
|
|
||||||
if not connectResolved then
|
|
||||||
local duration = tick() - startTime;
|
|
||||||
elseif (not loadResolved) or (not joinResolved) then
|
|
||||||
local duration = tick() - startTime;
|
|
||||||
if not loadResolved then
|
|
||||||
loadResolved = true
|
|
||||||
end
|
|
||||||
if not joinResolved then
|
|
||||||
joinResolved = true
|
|
||||||
end
|
|
||||||
elseif not playResolved then
|
|
||||||
playResolved = true
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end)
|
|
||||||
|
|
||||||
game:GetService("ChangeHistoryService"):SetEnabled(false)
|
|
||||||
game:GetService("ContentProvider"):SetThreadPool(16)
|
|
||||||
game:GetService("InsertService"):SetBaseSetsUrl("http://www.rowblx.xyz/Game/Tools/InsertAsset.ashx?nsets=10&type=base")
|
|
||||||
game:GetService("InsertService"):SetUserSetsUrl("http://www.rowblx.xyz/Game/Tools/InsertAsset.ashx?nsets=20&type=user&userid=%d")
|
|
||||||
game:GetService("InsertService"):SetCollectionUrl("http://www.rowblx.xyz/Game/Tools/InsertAsset.ashx?sid=%d")
|
|
||||||
game:GetService("InsertService"):SetAssetUrl("http://www.rowblx.xyz/asset/?id=%d")
|
|
||||||
game:GetService("InsertService"):SetAssetVersionUrl("http://www.rowblx.xyz/Asset/?assetversionid=%d")
|
|
||||||
|
|
||||||
pcall(function() game:GetService("SocialService"):SetFriendUrl("http://www.rowblx.xyz/Game/LuaWebService/HandleSocialRequest.ashx?method=IsFriendsWith&playerid=%d&userid=%d") end)
|
|
||||||
pcall(function() game:GetService("SocialService"):SetBestFriendUrl("http://www.rowblx.xyz/Game/LuaWebService/HandleSocialRequest.ashx?method=IsBestFriendsWith&playerid=%d&userid=%d") end)
|
|
||||||
pcall(function() game:GetService("SocialService"):SetGroupUrl("http://www.rowblx.xyz/Game/LuaWebService/HandleSocialRequest.ashx?method=IsInGroup&playerid=%d&groupid=%d") end)
|
|
||||||
pcall(function() game:GetService("SocialService"):SetGroupRankUrl("http://www.rowblx.xyz/Game/LuaWebService/HandleSocialRequest.ashx?method=GetGroupRank&playerid=%d&groupid=%d") end)
|
|
||||||
pcall(function() game:GetService("SocialService"):SetGroupRoleUrl("http://www.rowblx.xyz/Game/LuaWebService/HandleSocialRequest.ashx?method=GetGroupRole&playerid=%d&groupid=%d") end)
|
|
||||||
pcall(function() game:GetService("GamePassService"):SetPlayerHasPassUrl("http://rowblx.xyz/Game/GamePass/GamePassHandler.ashx?Action=HasPass&UserID=%d&PassID=%d") end)
|
|
||||||
pcall(function() game:GetService("MarketplaceService"):SetProductInfoUrl("https://api.rowblx.xyz/marketplace/productinfo?assetId=%d") end)
|
|
||||||
pcall(function() game:GetService("MarketplaceService"):SetPlayerOwnsAssetUrl("https://api.rowblx.xyz/ownership/hasasset?userId=%d&assetId=%d") end)
|
|
||||||
pcall(function() game:SetCreatorID(0, Enum.CreatorType.User) end)
|
|
||||||
|
|
||||||
pcall(function() game:GetService("Players"):SetChatStyle(Enum.ChatStyle.ClassicAndBubble) end)
|
|
||||||
|
|
||||||
local waitingForCharacter = false
|
|
||||||
|
|
||||||
pcall( function()
|
|
||||||
if settings().Network.MtuOverride == 0 then
|
|
||||||
settings().Network.MtuOverride = 1400
|
|
||||||
end
|
|
||||||
end)
|
|
||||||
|
|
||||||
|
|
||||||
client = game:GetService("NetworkClient")
|
|
||||||
visit = game:GetService("Visit")
|
|
||||||
|
|
||||||
function setMessage(message)
|
|
||||||
-- todo: animated "..."
|
|
||||||
if not false then
|
|
||||||
game:SetMessage(message)
|
|
||||||
else
|
|
||||||
-- hack, good enought for now
|
|
||||||
game:SetMessage("Teleporting ...")
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
function showErrorWindow(message, errorType, errorCategory)
|
|
||||||
game:SetMessage(message)
|
|
||||||
end
|
|
||||||
|
|
||||||
-- called when the client connection closes
|
|
||||||
function onDisconnection(peer, lostConnection)
|
|
||||||
if lostConnection then
|
|
||||||
showErrorWindow("You have lost connection", "LostConnection", "LostConnection")
|
|
||||||
else
|
|
||||||
showErrorWindow("This game has been shutdown", "Kick", "Kick")
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
function requestCharacter(replicator)
|
|
||||||
|
|
||||||
-- prepare code for when the Character appears
|
|
||||||
local connection
|
|
||||||
connection = player.Changed:connect(function (property)
|
|
||||||
if property=="Character" then
|
|
||||||
game:ClearMessage()
|
|
||||||
waitingForCharacter = false
|
|
||||||
|
|
||||||
connection:disconnect()
|
|
||||||
|
|
||||||
if 0 then
|
|
||||||
if not joinResolved then
|
|
||||||
local duration = tick() - startTime;
|
|
||||||
joinResolved = true
|
|
||||||
|
|
||||||
playStartTime = tick()
|
|
||||||
playResolved = false
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end)
|
|
||||||
|
|
||||||
setMessage("Requesting character")
|
|
||||||
|
|
||||||
local success, err = pcall(function()
|
|
||||||
replicator:RequestCharacter()
|
|
||||||
setMessage("Waiting for character")
|
|
||||||
waitingForCharacter = true
|
|
||||||
end)
|
|
||||||
end
|
|
||||||
|
|
||||||
function onConnectionAccepted(url, replicator)
|
|
||||||
connectResolved = true
|
|
||||||
|
|
||||||
local waitingForMarker = true
|
|
||||||
|
|
||||||
local success, err = pcall(function()
|
|
||||||
if not test then
|
|
||||||
visit:SetPing("", 300)
|
|
||||||
end
|
|
||||||
|
|
||||||
if not false then
|
|
||||||
game:SetMessageBrickCount()
|
|
||||||
else
|
|
||||||
setMessage("Teleporting ...")
|
|
||||||
end
|
|
||||||
|
|
||||||
replicator.Disconnection:connect(onDisconnection)
|
|
||||||
|
|
||||||
local marker = replicator:SendMarker()
|
|
||||||
|
|
||||||
marker.Received:connect(function()
|
|
||||||
waitingForMarker = false
|
|
||||||
requestCharacter(replicator)
|
|
||||||
end)
|
|
||||||
end)
|
|
||||||
|
|
||||||
if not success then
|
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
while waitingForMarker do
|
|
||||||
workspace:ZoomToExtents()
|
|
||||||
wait(0.5)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
-- called when the client connection fails
|
|
||||||
function onConnectionFailed(_, error)
|
|
||||||
showErrorWindow("Failed to connect to the Game. (ID=" .. error .. ")", "ID" .. error, "Other")
|
|
||||||
end
|
|
||||||
|
|
||||||
-- called when the client connection is rejected
|
|
||||||
function onConnectionRejected()
|
|
||||||
connectionFailed:disconnect()
|
|
||||||
showErrorWindow("This game is not available. Please try another", "WrongVersion", "WrongVersion")
|
|
||||||
end
|
|
||||||
|
|
||||||
pcall(function() settings().Diagnostics:LegacyScriptMode() end)
|
|
||||||
local success, err = pcall(function()
|
|
||||||
|
|
||||||
game:SetRemoteBuildMode(true)
|
|
||||||
|
|
||||||
setMessage("Connecting to Server")
|
|
||||||
client.ConnectionAccepted:connect(onConnectionAccepted)
|
|
||||||
client.ConnectionRejected:connect(onConnectionRejected)
|
|
||||||
connectionFailed = client.ConnectionFailed:connect(onConnectionFailed)
|
|
||||||
client.Ticket = ""
|
|
||||||
|
|
||||||
playerConnectSucces, player = pcall(function() return client:PlayerConnect({id}, "{ip}", {port}, 0, threadSleepTime) end)
|
|
||||||
|
|
||||||
player:SetSuperSafeChat(false)
|
|
||||||
pcall(function() player:SetUnder13(false) end)
|
|
||||||
pcall(function() player:SetMembershipType(Enum.MembershipType.{membership}) end)
|
|
||||||
pcall(function() player:SetAccountAge(365) end)
|
|
||||||
player.Idled:connect(onPlayerIdled)
|
|
||||||
|
|
||||||
-- Overriden
|
|
||||||
onPlayerAdded(player)
|
|
||||||
|
|
||||||
-- player.CharacterAppearance = "http://www.rowblx.xyz/charapp/Custom.php?pants=<?php echo $pant; ?>&shirt=<?php echo $shirt; ?>&hat=<?php echo $hat; ?>&face=<?php echo $face; ?>"
|
|
||||||
if not test then visit:SetUploadUrl("")end
|
|
||||||
player.Name = "{username}"
|
|
||||||
|
|
||||||
end)
|
|
||||||
|
|
||||||
pcall(function() game:SetScreenshotInfo("") end)`;
|
|
||||||
|
|
||||||
import signer from "./signer";
|
import signer from "./signer";
|
||||||
|
|
||||||
export default function (id, username, ip, port, membership) {
|
export default function (id, username, ip, port, membership) {
|
||||||
let joinscript = script
|
let joinscript = script;
|
||||||
.replace("{id}", id)
|
script.UserId = id;
|
||||||
.replace("{username}", username)
|
script.UserName = username;
|
||||||
.replace("{ip}", ip)
|
script.MachineAddress = ip;
|
||||||
.replace("{port}", port)
|
script.ServerPort = port;
|
||||||
.replace("{membership}", membership);
|
script.MembershipType = membership;
|
||||||
|
|
||||||
let sig = signer(joinscript);
|
let sig = signer(JSON.stringify(joinscript));
|
||||||
joinscript = `--rbxsig%${sig}%${joinscript}`;
|
joinscript = `--rbxsig%${sig}%${JSON.stringify(joinscript)}`;
|
||||||
|
|
||||||
return joinscript;
|
return joinscript;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue