In theory this should be good

This commit is contained in:
I-Have-An-Issue 2022-10-05 19:35:58 -04:00
parent 9c9a1f31ee
commit 725e65eea8
No known key found for this signature in database
GPG Key ID: E55435DEA0825091
17 changed files with 460 additions and 0 deletions

167
src/lib/hostscript.js Normal file
View File

@ -0,0 +1,167 @@
const script = `
------------------- UTILITY FUNCTIONS --------------------------
local cdnSuccess = 0
local cdnFailure = 0
function waitForChild(parent, childName)
while true do
local child = parent:findFirstChild(childName)
if child then
return child
end
parent.ChildAdded:wait()
end
end
-- returns the player object that killed this humanoid
-- returns nil if the killer is no longer in the game
function getKillerOfHumanoidIfStillInGame(humanoid)
-- check for kill tag on humanoid - may be more than one - todo: deal with this
local tag = humanoid:findFirstChild("creator")
-- find player with name on tag
if tag then
local killer = tag.Value
if killer.Parent then -- killer still in game
return killer
end
end
return nil
end
-----------------------------------END UTILITY FUNCTIONS -------------------------
-----------------------------------"CUSTOM" SHARED CODE----------------------------------
pcall(function() settings().Network.UseInstancePacketCache = true end)
pcall(function() settings().Network.UsePhysicsPacketCache = true end)
pcall(function() settings()["Task Scheduler"].PriorityMethod = Enum.PriorityMethod.AccumulatedError end)
settings().Network.PhysicsSend = Enum.PhysicsSendMethod.TopNErrors
settings().Network.ExperimentalPhysicsEnabled = true
settings().Network.WaitingForCharacterLogRate = 100
pcall(function() settings().Diagnostics:LegacyScriptMode() end)
-----------------------------------START GAME SHARED SCRIPT------------------------------
-- establish this peer as the Server
local ns = game:GetService("NetworkServer")
local badgeUrlFlagExists, badgeUrlFlagValue = pcall(function () return settings():GetFFlag("NewBadgeServiceUrlEnabled") end)
local newBadgeUrlEnabled = badgeUrlFlagExists and badgeUrlFlagValue
if url~=nil then
local url = "http://www.rowblx.xyz"
pcall(function() game:GetService("Players"):SetAbuseReportUrl(url .. "/AbuseReport/InGameChatHandler.ashx") end)
pcall(function() game:GetService("ScriptInformationProvider"):SetAssetUrl(url .. "/Asset/") end)
pcall(function() game:GetService("ContentProvider"):SetBaseUrl(url .. "/") end)
pcall(function() game:GetService("Players"):SetChatFilterUrl(url .. "/Game/ChatFilter.ashx") end)
if gameCode then
game:SetVIPServerId(tostring(gameCode))
end
game:GetService("BadgeService"):SetPlaceId(1818)
game:SetPlaceId(1818)
game:SetCreatorId(123891239128398123)
if newBadgeUrlEnabled then
game:GetService("BadgeService"):SetAwardBadgeUrl(apiProxyUrl .. "/assets/award-badge?userId=%d&badgeId=%d&placeId=%d")
end
if access~=nil then
if not newBadgeUrlEnabled then
game:GetService("BadgeService"):SetAwardBadgeUrl(url .. "/Game/Badge/AwardBadge.ashx?UserID=%d&BadgeID=%d&PlaceID=%d&" .. access)
end
game:GetService("BadgeService"):SetHasBadgeUrl(url .. "/Game/Badge/HasBadge.ashx?UserID=%d&BadgeID=%d&" .. access)
game:GetService("BadgeService"):SetIsBadgeDisabledUrl(url .. "/Game/Badge/IsBadgeDisabled.ashx?BadgeID=%d&PlaceID=%d&" .. access)
game:GetService("FriendService"):SetMakeFriendUrl(url .. "/Game/CreateFriend?firstUserId=%d&secondUserId=%d")
game:GetService("FriendService"):SetBreakFriendUrl(url .. "/Game/BreakFriend?firstUserId=%d&secondUserId=%d")
game:GetService("FriendService"):SetGetFriendsUrl(url .. "/Game/AreFriends?userId=%d")
end
pcall(function() loadfile(url .. "/Game/LoadPlaceInfo.ashx?PlaceId=" .. placeId)() end)
pcall(function()
if access then
loadfile(url .. "/Game/PlaceSpecificScript.ashx?PlaceId=" .. placeId .. "&" .. access)()
end
end)
end
pcall(function() game:GetService("NetworkServer"):SetIsPlayerAuthenticationRequired(true) end)
settings().Diagnostics.LuaRamLimit = 0
if placeId~=nil and killID~=nil and deathID~=nil and url~=nil then
-- listen for the death of a Player
function createDeathMonitor(player)
-- we don't need to clean up old monitors or connections since the Character will be destroyed soon
if player.Character then
local humanoid = waitForChild(player.Character, "Humanoid")
humanoid.Died:connect(
function ()
onDied(player, humanoid)
end
)
end
end
-- listen to all Players' Characters
game:GetService("Players").ChildAdded:connect(
function (player)
createDeathMonitor(player)
player.Changed:connect(
function (property)
if property=="Character" then
createDeathMonitor(player)
end
end
)
end
)
end
game:GetService("Players").PlayerAdded:connect(function(player)
print("Player " .. player.userId .. " added")
if url and access and placeId and player and player.userId then
game:HttpGet(url .. "/Game/ClientPresence.ashx?action=connect&" .. access .. "&PlaceID=" .. placeId .. "&UserID=" .. player.userId)
game:HttpPost(url .. "/Game/PlaceVisit.ashx?UserID=" .. player.userId .. "&AssociatedPlaceID=" .. placeId .. "&" .. access, "")
end
end)
game:GetService("Players").PlayerRemoving:connect(function(player)
print("Player " .. player.userId .. " leaving")
if url and access and placeId and player and player.userId then
game:HttpGet(url .. "/Game/ClientPresence.ashx?action=disconnect&" .. access .. "&PlaceID=" .. placeId .. "&UserID=" .. player.userId)
end
end)
-- Now start the connection
game:Load("rbxasset://temp.rbxl")
ns:Start({port}, sleeptime)
pcall(function() game.LocalSaveEnabled = true end)
-- StartGame --
Game:GetService("RunService"):Run()`;
import signer from "./signer";
export default function (port) {
let hostscript = script.replace("{port}", port);
let sig = signer(hostscript);
hostscript = `--rbxsig%${sig}%${hostscript}`;
return hostscript;
}

242
src/lib/joinscript.js Normal file
View File

@ -0,0 +1,242 @@
const script = `
--[[
pcall(function() game:GetService("InsertService"):SetBaseSetsUrl("http://www.rowblx.xyz/stamper/inseasset.php?nsets=10&type=base%22") end)
pcall(function() game:GetService("InsertService"):SetUserSetsUrl("http://www.rowblx.xyz/stamper/inseasset.php?nsets=20&type=user&userid=%d%22") end)
pcall(function() game:GetService("InsertService"):SetCollectionUrl("http://www.rowblx.xyz/stamper/inseasset.php?sid=%d%22") end)
pcall(function() game:GetService("InsertService"):SetAssetUrl("http://www.rowblx.xyz/asset/?id=%d") end)
pcall(function() game:GetService("InsertService"):SetAssetVersionUrl("http://www.rowblx.xyz/asset/?id=%d") end)
pcall(function() game:GetService("SocialService"):SetGroupUrl("http://10char.xyz/stamper/groupurl.php?method=IsInGroup&playerid=%d&groupid=%d%22") end)
pcall(function() game:GetService("BadgeService"):SetPlaceId(-1) end)
pcall(function() game:GetService("BadgeService"):SetIsBadgeLegalUrl("") end)
pcall(function() game:GetService("ScriptInformationProvider"):SetAssetUrl("http://www.rowblx.xyz/asset/") end)
pcall(function() game:GetService("ContentProvider"):SetBaseUrl("http://www.rowblx.xyz/stamper/stampericons.php?%22) end)
]]--
-- functions --------------------------
function onPlayerAdded(player)
-- override
end
pcall(function() game:SetPlaceID(-1, false) end)
local startTime = tick()
local connectResolved = false
local loadResolved = false
local joinResolved = false
local playResolved = true
local playStartTime = 0
local cdnSuccess = 0
local cdnFailure = 0
settings()["Game Options"].CollisionSoundEnabled = true
pcall(function() settings().Rendering.EnableFRM = true end)
pcall(function() settings().Physics.Is30FpsThrottleEnabled = false end)
pcall(function() settings()["Task Scheduler"].PriorityMethod = Enum.PriorityMethod.AccumulatedError end)
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";
export default function (id, username, ip, port, membership) {
let joinscript = script
.replace("{id}", id)
.replace("{username}", username)
.replace("{ip}", ip)
.replace("{port}", port)
.replace("{membership}", membership);
let sig = signer(joinscript);
joinscript = `--rbxsig%${sig}%${joinscript}`;
return joinscript;
}

15
src/lib/signer.js Normal file
View File

@ -0,0 +1,15 @@
import crypto from "crypto";
// THIS IS ONLY TEMP
const privatekey = `-----BEGIN RSA PRIVATE KEY-----
MIICXgIBAAKBgQDJ9itcSsBa9FNyE1jBn4OBfOYsMSSJWyi0Jgn6qXNvSzLks7INwmkqejrEc4WOdUNjQ6XaoAK/vmBf7oMQJ+xuDl47rYVqLGW0JAKPSbn0QA19bmr3eSIyUeqrhfwRGn4YLBDm6CMu+m8P/VaDU1qSxPd2PuIpLmTlKFMcF+HWEQIDAQABAoGBAL49+x5W89c5q5kbjFHnlpLVOmSKbiZNDoyUAHZ0RF6j8W7prmGzrijrNoxzXW2SHEZXJNZKQAyqolH7dM41LUnaIWizNoIkuJKIb+HWzQlnu75KLNyVDtlMyTNnwTfHkAQ6vmRv8f8S74ZXlj+SKNVjd0p0R+TSqh4NHzNZkNC5AkEA33wCzFtvZJv5cVbc8Ak8VmmSdoPN9HBHuJ1BJ/VTYrd9NmGoxbb2Ixfc3kVItD1NMLs9Jo3x8VKyC0fP90KAIwJBAOdYgtK4QGJHco48J37K3g9r4Kjidv933ADnkZefhTGE4ycakv5gcvnMWbcjHRPv3a7r39+ukgsbNB7BdyKWWjsCQBsewHQuMGFkMCwZ32vdow3Vd+mb6xVbvshfhPWlZr4XCEHeLg34OvxdO/dZLw54VfKw9iXEmfSwFV0bFNiroEMCQQCB05AHBNNM09+bpnJbmykm6lk3LW+uSesyrsFrn1+1vGdlSGp5SlL7kAxA0/m7eH6lbUVDV8opZWjIYbWjuVCFAkEAv8rLnjBwqbNY1O67a4rXh4DJZ7lHm5meX7+YcW5haB4GGyZpikVXYEcfwcM5A03dTKgljLbcDT8diO5RTOsDEg==
-----END RSA PRIVATE KEY-----`;
export default function (input) {
const sign = crypto.createSign("sha1");
sign.write(input);
sign.end();
const signature = sign.sign(privatekey);
return signature.toString("base64");
}

View File

@ -0,0 +1,11 @@
/** @type {import('./$types').RequestHandler} */
export function GET({ url }) {
return new Response("", {
status: 302,
headers: {
Location: `https://assetdelivery.roblox.com/v1/asset/?id=${url.searchParams.get(
"id"
)}&version=1`
}
});
}

View File

@ -0,0 +1,6 @@
import hostscript from "$lib/hostscript.js";
/** @type {import('./$types').RequestHandler} */
export function GET({ url }) {
return new Response(hostscript(666));
}

View File

@ -0,0 +1,14 @@
import joinscript from "$lib/joinscript.js";
/** @type {import('./$types').RequestHandler} */
export function GET({ url }) {
return new Response(
joinscript(
url.searchParams.get("id"),
url.searchParams.get("username"),
url.searchParams.get("ip"),
url.searchParams.get("port"),
"None"
)
);
}

0
static/FFlag Normal file
View File

View File

@ -0,0 +1 @@
{"data":["0fb35a870ca24bea2a17020144335cd7","0fb35a870ca24bea2a17020144335cd7"]}

View File

@ -0,0 +1 @@
{"data":["0.206.0pcplayer"]}

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1 @@
{}

View File

@ -0,0 +1 @@
0 0 0 00 0 0 0

View File

Before

Width:  |  Height:  |  Size: 1.9 MiB

After

Width:  |  Height:  |  Size: 1.9 MiB

View File

Before

Width:  |  Height:  |  Size: 54 KiB

After

Width:  |  Height:  |  Size: 54 KiB

BIN
static/img/rowbux.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB