SirBabyQuack

Dirt GUI Spook Wood Finder

Oct 7th, 2020
378
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.74 KB | None | 0 0
  1. wait(5.5) repeat wait() until game:IsLoaded()
  2. function FindTree()
  3. for i,v in pairs(workspace:GetChildren()) do
  4. if v.Name == "TreeRegion" then
  5. for k,l in pairs(v:GetChildren()) do
  6. if l:FindFirstChild("TreeClass") and l:FindFirstChild("WoodSection") and l:FindFirstChild("Owner") then
  7. if (l.TreeClass.Value == "Spooky" or l.TreeClass.Value == "SpookyNeon") and l.Owner.Value == nil then
  8. game.ReplicatedStorage.Interaction.ClientRequestOwnership:FireServer(l)
  9. return l
  10. end
  11. end
  12. end
  13. end
  14. end
  15. return nil
  16. end
  17. local Tree = FindTree()
  18. if Tree ~= nil then
  19. local Player = game:GetService("Players").LocalPlayer
  20. repeat wait() until Player.Character
  21. repeat wait() until Player.Character:FindFirstChild("HumanoidRootPart")
  22. game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame = Tree["WoodSection"].CFrame
  23. else
  24. while wait() do
  25. local Instances = {}
  26. local cursor = ""
  27. repeat wait()
  28. pcall(function()
  29. local ret = game:GetService("HttpService"):JSONDecode(game:HttpGetAsync("https://games.roblox.com/v1/games/"..game.PlaceId.."/servers/Public?limit=100&cursor="..cursor))
  30. cursor = ret.nextPageCursor
  31. for a,b in pairs(ret.data) do
  32. if b.maxPlayers > b.playing and b.id ~= game.JobId then
  33. table.insert(Instances,b.id)
  34. end
  35. end
  36. end)
  37. until cursor == nil
  38. game:GetService("TeleportService"):TeleportToPlaceInstance(game.PlaceId,Instances[math.random(1,#Instances)])
  39. end
  40. end
Add Comment
Please, Sign In to add comment