Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- wait(5.5) repeat wait() until game:IsLoaded()
- function FindTree()
- for i,v in pairs(workspace:GetChildren()) do
- if v.Name == "TreeRegion" then
- for k,l in pairs(v:GetChildren()) do
- if l:FindFirstChild("TreeClass") and l:FindFirstChild("WoodSection") and l:FindFirstChild("Owner") then
- if (l.TreeClass.Value == "Spooky" or l.TreeClass.Value == "SpookyNeon") and l.Owner.Value == nil then
- game.ReplicatedStorage.Interaction.ClientRequestOwnership:FireServer(l)
- return l
- end
- end
- end
- end
- end
- return nil
- end
- local Tree = FindTree()
- if Tree ~= nil then
- local Player = game:GetService("Players").LocalPlayer
- repeat wait() until Player.Character
- repeat wait() until Player.Character:FindFirstChild("HumanoidRootPart")
- game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame = Tree["WoodSection"].CFrame
- else
- while wait() do
- local Instances = {}
- local cursor = ""
- repeat wait()
- pcall(function()
- local ret = game:GetService("HttpService"):JSONDecode(game:HttpGetAsync("https://games.roblox.com/v1/games/"..game.PlaceId.."/servers/Public?limit=100&cursor="..cursor))
- cursor = ret.nextPageCursor
- for a,b in pairs(ret.data) do
- if b.maxPlayers > b.playing and b.id ~= game.JobId then
- table.insert(Instances,b.id)
- end
- end
- end)
- until cursor == nil
- game:GetService("TeleportService"):TeleportToPlaceInstance(game.PlaceId,Instances[math.random(1,#Instances)])
- end
- end
Add Comment
Please, Sign In to add comment