local gameid = 127738702996056
local l__sTeleportService__1 = game:GetService("TeleportService");
local l__sStarterGui__1 = game:GetService("StarterGui");
local l__vPlaceID__1 = tonumber(127738702996056);
game.ReplicatedStorage.TeleportPS.OnServerEvent:Connect(function(player)
local v9 = game.PrivateServerId ~= "" and game.PrivateServerOwnerId ~= 0
if v9 then
print("Player's already in a private server; creating a new one.");
else
print("Player's in a public server; creating a private server.");
end;
local v10 = l__sTeleportService__1:ReserveServer(l__vPlaceID__1);
local v11 = game:GetService("Players").LocalPlayer;
l__sTeleportService__1:TeleportToPrivateServer(l__vPlaceID__1, 127738702996056, v11);
end)
You can’t access the local player from a server script. You instead should use the player argument from the OnServerEvent
You should provide the players as a table, not as an individual object, so it would be something like {player} in place of v11
There’s no point in using unclear variable names, like v9, v10, v11 etc. You may be trying to make it so exploiters can’t tell what’s happening, but all it does is make it harder for you - exploiters can’t see server scripts, and local scripts that they can access don’t contain any of the variable names (hence why exploited scripts always have variables like v1, v2 etc.)
Those variables aren’t @XxKawaiiGore’s, they’re a product of decompilation. Decompilation is achieved through the same script injection software exploiters use so game code can be stolen.
Sorry to break it to 'ya. Your friend either claimed to have written someone else’s code, or is a script kiddie. If it’s the latter, the embarrassment is much greater considering the simplicity of the script