Post Views: 78
Created by French Spy
Features:
repeat task.wait() until game:IsLoaded();
task.wait(5);
repeat task.wait() until game and game.Workspace and game.Players;
getgenv().speed = 300;
local lp = game:service"Players".LocalPlayer;
local ws = workspace;
local ts = game:service"TweenService";
local PlaceID = game.PlaceId
local AllIDs = {}
local foundAnything = ""
local actualHour = os.date("!*t").hour
local Deleted = false
local File = pcall(function()
AllIDs = game:GetService('HttpService'):JSONDecode(readfile("NotSameServers.json"))
end)
if not File then
table.insert(AllIDs, actualHour)
writefile("NotSameServers.json", game:GetService('HttpService'):JSONEncode(AllIDs))
end
function TPReturner()
local Site;
if foundAnything == "" then
Site = game.HttpService:JSONDecode(game:HttpGet('https://games.roblox.com/v1/games/' .. PlaceID .. '/servers/Public?sortOrder=Asc&limit=100'))
else
Site = game.HttpService:JSONDecode(game:HttpGet('https://games.roblox.com/v1/games/' .. PlaceID .. '/servers/Public?sortOrder=Asc&limit=100&cursor=' .. foundAnything))
end
local ID = ""
if Site.nextPageCursor and Site.nextPageCursor ~= "null" and Site.nextPageCursor ~= nil then
foundAnything = Site.nextPageCursor
end
local num = 0;
for i,v in pairs(Site.data) do
local Possible = true
ID = tostring(v.id)
if tonumber(v.maxPlayers) > tonumber(v.playing) then
for _,Existing in pairs(AllIDs) do
if num ~= 0 then
if ID == tostring(Existing) then
Possible = false
end
else
if tonumber(actualHour) ~= tonumber(Existing) then
local delFile = pcall(function()
delfile("NotSameServers.json")
AllIDs = {}
table.insert(AllIDs, actualHour)
end)
end
end
num = num + 1
end
if Possible == true then
table.insert(AllIDs, ID)
wait()
pcall(function()
writefile("NotSameServers.json", game:GetService('HttpService'):JSONEncode(AllIDs))
wait()
game:GetService("TeleportService"):TeleportToPlaceInstance(PlaceID, ID, game.Players.LocalPlayer)
end)
wait(1);
end
end
end
end
function Teleport()
while wait() do
pcall(function()
TPReturner()
if foundAnything ~= "" then
TPReturner()
return true;
end
end)
end
end
task.spawn(function()
while task.wait() do
if lp.Character and lp.Character.PrimaryPart and lp.Character:FindFirstChild("LowerTorso") and lp.Character.LowerTorso:FindFirstChild("Root") then
lp.Character.LowerTorso.Root:Destroy();
end
end
end)
if lp.Character and lp.Character.PrimaryPart then
for i,v in pairs(ws.Items:GetChildren()) do
local found = v:FindFirstChildOfClass("MeshPart") or v:FindFirstChildOfClass("Part");
print(found);
if found then
local t = (found.CFrame.Position - lp.Character.HumanoidRootPart.Position).magnitude / speed;
local tween_info = TweenInfo.new(t, Enum.EasingStyle.Quad, Enum.EasingDirection.Out, 0, false, 0);
local tween = ts:Create(lp.Character.HumanoidRootPart, tween_info, { CFrame = found.CFrame } );
tween:Play();
repeat wait() until (lp.Character.HumanoidRootPart.Position - found.CFrame.Position).magnitude <= 100;
tween:Cancel();
lp.Character.HumanoidRootPart.CFrame = found.CFrame;
end
end
end
Teleport();
Â