Advertisement
chithub

Untitled

May 22nd, 2022
259
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.33 KB | None | 0 0
  1.  
  2. getgenv().Server_Hop = true
  3. getgenv().Chest_Farm = true
  4. getgenv().wait_Time = 35 -- Seconds
  5.  
  6. local placeId = game.PlaceId
  7. if placeId == 2753915549 or placeId == 4442272183 or placeId == 7449423635 then
  8. repeat wait() until game:IsLoaded() ~= false
  9.  
  10.  
  11. local Counter = 0
  12. local PlaceID = game.PlaceId
  13. local AllIDs = {}
  14. local foundAnything = ""
  15. local actualHour = os.date("!*t").hour
  16. local Deleted = false
  17.  
  18. local File = pcall(function()
  19. AllIDs = game:GetService('HttpService'):JSONDecode(readfile("NotSameServers.json"))
  20. end)
  21. if not File then
  22. table.insert(AllIDs, actualHour)
  23. writefile("NotSameServers.json", game:GetService('HttpService'):JSONEncode(AllIDs))
  24. end
  25.  
  26. function TPReturner()
  27. local Site;
  28. if foundAnything == "" then
  29. Site = game.HttpService:JSONDecode(game:HttpGet('https://games.roblox.com/v1/games/' .. PlaceID .. '/servers/Public?sortOrder=Asc&limit=100'))
  30. else
  31. Site = game.HttpService:JSONDecode(game:HttpGet('https://games.roblox.com/v1/games/' .. PlaceID .. '/servers/Public?sortOrder=Asc&limit=100&cursor=' .. foundAnything))
  32. end
  33. local ID = ""
  34. if Site.nextPageCursor and Site.nextPageCursor ~= "null" and Site.nextPageCursor ~= nil then
  35. foundAnything = Site.nextPageCursor
  36. end
  37. local num = 0;
  38. for i,v in pairs(Site.data) do
  39. local Possible = true
  40. ID = tostring(v.id)
  41. if tonumber(v.maxPlayers) > tonumber(v.playing) then
  42. for _,Existing in pairs(AllIDs) do
  43. if num ~= 0 then
  44. if ID == tostring(Existing) then
  45. Possible = false
  46. end
  47. else
  48. if tonumber(actualHour) ~= tonumber(Existing) then
  49. local delFile = pcall(function()
  50. delfile("NotSameServers.json")
  51. AllIDs = {}
  52. table.insert(AllIDs, actualHour)
  53. end)
  54. end
  55. end
  56. num = num + 1
  57. end
  58. if Possible == true then
  59. table.insert(AllIDs, ID)
  60. wait()
  61. pcall(function()
  62. writefile("NotSameServers.json", game:GetService('HttpService'):JSONEncode(AllIDs))
  63. wait()
  64. game:GetService("TeleportService"):TeleportToPlaceInstance(PlaceID, ID, game.Players.LocalPlayer)
  65. end)
  66. wait(4)
  67. end
  68. end
  69. end
  70. end
  71.  
  72. function Teleport()
  73. while wait() do
  74. pcall(function()
  75. TPReturner()
  76. if foundAnything ~= "" then
  77. TPReturner()
  78. end
  79. end)
  80. end
  81. end
  82.  
  83. spawn(function()
  84. local ohString1 = "SetTeam"
  85. local ohString2 = "Pirates"
  86. game:GetService("ReplicatedStorage").Remotes.CommF_:InvokeServer(ohString1, ohString2)
  87. end)
  88.  
  89.  
  90. spawn(function()
  91. while wait(.8) do
  92. if Chest_Farm then
  93. pcall(function()
  94.  
  95. for i,v in pairs(game:GetService("Workspace"):GetChildren()) do
  96. if string.find(v.Name, "Chest") then
  97. print(v.Name)
  98. game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame = v.CFrame
  99. wait(.15)
  100. end
  101. end
  102. game.Players.LocalPlayer.Character.Head:Destroy()
  103. for _,v in pairs(game:GetService("Workspace"):GetDescendants()) do
  104. if string.find(v.Name, "Chest") and v:IsA("TouchTransmitter") then
  105. firetouchinterest(game.Players.LocalPlayer.Character.HumanoidRootPart, v.Parent, 0) --0 is touch
  106. wait()
  107. firetouchinterest(game.Players.LocalPlayer.Character.HumanoidRootPart, v.Parent, 1) -- 1 is untouch
  108. end
  109. end
  110. end)
  111. end
  112. end
  113. end)
  114.  
  115. spawn(function()
  116. while wait() do
  117. if Server_Hop then
  118. pcall(function()
  119. wait(wait_Time)
  120. Teleport()
  121. print("Finding new server")
  122. end)
  123. end
  124. end
  125. end)
  126.  
  127.  
  128. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement