How to connect to TeamTest Roblox RakNet Server?

I am trying to start a teamtest server using RoZod like this (some stuff is redacted)

Script (index.js):

import { setTimeout } from "node:timers/promises";
import { configureServer, fetchApi, isAnyErrorResponse } from 'rozod';
import { deleteTeamtestPlaceid, getAssetsIdVersions } from 'rozod/lib/endpoints/developv2.js';
import { getJoinTeamTest } from 'rozod/lib/endpoints/gamejoinv1.js';

configureServer({
	cookies: "<REDACTED>",
});

async function getAssetVersion(id) {
	return (await fetchApi(getAssetsIdVersions, { id })).data?.[0].assetVersionNumber ?? 0;
};

async function joinTeamTest(PlaceId, PlaceVersion) {
	const result = await fetchApi(getJoinTeamTest, { PlaceId, PlaceVersion });
	return JSON.parse(result.split("\n", 2)[1]);
}

async function endTeamTest(placeId, gameId) {
	return fetchApi(deleteTeamtestPlaceid, { placeId, gameId });
}

let lastGameId = null;
const TEAM_TEST_RUNNING = 2;
const TEAM_TEST_CREATING = 0;
async function newTeamTestSession(PlaceId, PlaceVersion) {
	{
		const { status, settings } = await joinTeamTest(PlaceId, PlaceVersion);
		const GameId = settings?.GameId;
		if (status === TEAM_TEST_RUNNING && GameId) {
			await endTeamTest(PlaceId, GameId);
		};
	}

	while (true) {
		const json = await joinTeamTest(PlaceId, PlaceVersion);
		const GameId = json.settings?.GameId;
		const { status, message } = json;

		// If session already exists
		switch (status) {
			case TEAM_TEST_CREATING: {
				await setTimeout(1000);
				continue; // Still creating
			};

			case TEAM_TEST_RUNNING: {
				if (GameId) {
					const newSession = GameId !== lastGameId;
					if (newSession) {
						lastGameId = GameId;
						return json;
					} else {
						// Wait until previous session is deleted
						await setTimeout(1000);
						continue;
					};
				};

				// No break so we can go to default
			};

			default: throw new Error(`Something went wrong, status ${status}, message ${message}, GameId ${GameId}`);
		};
	}
};

const placeId = 13584113212;
const placeVersion = await getAssetVersion(placeId);
const teamTestSession = await newTeamTestSession(placeId, placeVersion);
const gameId = teamTestSession.settings.GameId;
(function() {
	let cleaningUp = false;

	async function cleanup() {
		if (cleaningUp) return;
		cleaningUp = true;

		await endTeamTest(placeId, gameId);
		// await setTeamCreateEnabled(universeId, teamCreateEnabled);
	}

	process.on("SIGINT", async () => {
		await cleanup();
		process.exit(0);
	});

	process.on("SIGTERM", async () => {
		await cleanup();
		process.exit(0);
	});

	process.on("beforeExit", cleanup);
})();

console.log(JSON.stringify(teamTestSession, null, 2));

Console:

{
	"status": 2,
	"settings": {
		"ClientPort": 0,
		"MachineAddress": "10.186.12.41",
		"ServerPort": 53928,
		"ServerConnections": [{
			"Address": "10.186.12.41",
			"Port": 53928
		}],
		"UdmuxEndpoints": [{
			"Address": "128.116.48.33",
			"Port": 53928
		}],
		"DirectServerReturn": true,
		"PepperId": 1776353748,
		"TokenValue": "<REDACTED>",
		"PingUrl": "",
		"PingInterval": 120,
		"UserName": "ChatGGPT",
		"DisplayName": "Chat GPT",
		"HasVerifiedBadge": false,
		"SeleniumTestMode": false,
		"UserId": 4656429295,
		"DomainUserId": -1,
		"UserIdMode": 0,
		"RobloxLocale": "en_us",
		"GameLocale": "en_us",
		"UgcLocale": "en_us",
		"SuperSafeChat": false,
		"FlexibleChatEnabled": false,
		"CharacterAppearance": "https://api.roblox.com/v1.1/avatar-fetch/?placeId=13584113212&userId=4656429295",
		"ClientTicket": "<REDACTED>",
		"GameId": "89924573-d189-4499-8702-150868c5d601",
		"PlaceId": 13584113212,
		"BaseUrl": "http://gamejoin.roblox.com/",
		"ChatStyle": "Classic",
		"CreatorId": 4656429295,
		"CreatorTypeEnum": "User",
		"MembershipType": "None",
		"HasRobloxSubscription": false,
		"AccountAge": 1055,
		"CookieStoreFirstTimePlayKey": "rbx_evt_ftp",
		"CookieStoreFiveMinutePlayKey": "rbx_evt_fmp",
		"CookieStoreEnabled": true,
		"IsUnknownOrUnder13": false,
		"GameChatType": "Enabled",
		"WhoCanWhisperChatWithMeInExperiences": "AllUsers",
		"SessionId": "<REDACTED>",
		"AnalyticsSessionId": "<REDACTED>",
		"DataCenterId": 468,
		"UniverseId": 4719412288,
		"FollowUserId": 0,
		"characterAppearanceId": 4656429295,
		"CountryCode": "US",
		"AlternateName": "",
		"RandomSeed1": "<REDACTED>",
		"ClientPublicKeyData": "{\"creationTime\":\"11:55 12/6/2022\",\"applications\":{\"RakNetEarlyPublicKey\":{\"versions\":[{\"id\":5,\"value\":\"Jy0uXN86HFuODRudIzEzZeLfCd8/z+ER6CMO0wAa5XY=\",\"allowed\":true}],\"send\":5,\"revert\":5}}}",
		"RccVersion": "0.717.0.7170982",
		"ChannelName": "",
		"VerifiedAMP": 0,
		"PrivateServerOwnerID": 0,
		"PrivateServerID": "",
		"EphemeralEarlyPubKey": "<REDACTED>",
		"PartyId": "",
		"ServerDMRecording": false,
		"ShowRobloxTranslations": false,
		"MatchmakingAttributes": "{\"ServerAttributes\":[]}",
		"TranslationDisplayMode": "Production",
		"ImageTranslationContentVariantType": "Production",
		"NetStackPort": 54115,
		"NetStackConfig": "<REDACTED>",
		"NetStackTokenValue": "<REDACTED>"
	}
}

There is literally nothing about how to connect to TeamTest ROBLOX RakNet Server, only about how to decode the packets (which are 99% outdated), so this could be a little more challenging than I thought.

Please help, feedback would be appreciated :pray:

1 Like

Are you trying to create some sort of automation or botting software or what is the benefit of this rather than just using the team test button?

Regardless theres not much documentation about this to prevent people making malicious stuff for it I would assume. The only place you’d get any information is their git repo but I’m sure you’ve already done that.

1 Like

Well, this guy was trying to make Roblox Studio in the browser and he quit working on it, so I am trying to make my own

pack it up already

Go consult the ai your display name is named after

Being serious tho, what is a raknet server anyway

Its a networking library that roblox uses to handle any multiplayer stuff behind the scene. I’m not sure what use cases a web operated roblox studio will have other than being a cool project. I’m a bit shaky on giving advice here since assuming it could be a secondary option for condo players now that roblox is driving them into the dirt.

1 Like

Are you trying to do that stuff with it?

No, I am on Chromebook which is why I am working on this project (Cuz I want to make Roblox games on my Chromebook and let other people - on phones for example - to access Roblox Studio as well)

And yes, I could use Crostini but Crostini only lets me use 2.8 GB and Roblox Studio needs 3 GB

And I don’t have a Windows laptop (I do have online VMs, such as Github Codespaces, but those have limits and they are too slow)

Pls bro :sob: :pray: