Advertisement
DE_Speedruns

Untitled

Nov 30th, 2023
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.17 KB | None | 0 0
  1. function thisCode()
  2. repeat task.wait() until game:IsLoaded()
  3. local PlaceID = game.PlaceId
  4. local AllIDs = {}
  5. local foundAnything = ""
  6. local actualHour = os.date("!*t").hour
  7. local Deleted = false
  8. local File = pcall(function()
  9. AllIDs = game:GetService('HttpService'):JSONDecode(readfile("NotSameServers.json"))
  10. end)
  11. if not File then
  12. table.insert(AllIDs, actualHour)
  13. writefile("NotSameServers.json", game:GetService('HttpService'):JSONEncode(AllIDs))
  14. end
  15. function TPReturner()
  16. local Site;
  17. if foundAnything == "" then
  18. Site = game.HttpService:JSONDecode(game:HttpGet('https://games.roblox.com/v1/games/' .. PlaceID .. '/servers/Public?sortOrder=Asc&limit=100'))
  19. else
  20. Site = game.HttpService:JSONDecode(game:HttpGet('https://games.roblox.com/v1/games/' .. PlaceID .. '/servers/Public?sortOrder=Asc&limit=100&cursor=' .. foundAnything))
  21. end
  22. local ID = ""
  23. if Site.nextPageCursor and Site.nextPageCursor ~= "null" and Site.nextPageCursor ~= nil then
  24. foundAnything = Site.nextPageCursor
  25. end
  26. local num = 0;
  27. for i,v in pairs(Site.data) do
  28. local Possible = true
  29. ID = tostring(v.id)
  30. if tonumber(v.maxPlayers) > tonumber(v.playing) then
  31. for _,Existing in pairs(AllIDs) do
  32. if num ~= 0 then
  33. if ID == tostring(Existing) then
  34. Possible = false
  35. end
  36. else
  37. if tonumber(actualHour) ~= tonumber(Existing) then
  38. local delFile = pcall(function()
  39. delfile("NotSameServers.json")
  40. AllIDs = {}
  41. table.insert(AllIDs, actualHour)
  42. end)
  43. end
  44. end
  45. num = num + 1
  46. end
  47. if Possible == true then
  48. table.insert(AllIDs, ID)
  49. wait()
  50. pcall(function()
  51. writefile("NotSameServers.json", game:GetService('HttpService'):JSONEncode(AllIDs))
  52. wait()
  53. game:GetService("TeleportService"):TeleportToPlaceInstance(PlaceID, ID, game.Players.LocalPlayer)
  54. end)
  55. wait(4)
  56. end
  57. end
  58. end
  59. end
  60.  
  61. function Teleport()
  62. while wait() do
  63. pcall(function()
  64. TPReturner()
  65. if foundAnything ~= "" then
  66. TPReturner()
  67. end
  68. end)
  69. end
  70. end
  71. local veryImportantWaitTime = 0.5
  72. task.spawn(function()
  73. while task.wait(veryImportantWaitTime) do
  74. pcall(function()
  75. for i,v in pairs(game.CoreGui:GetDescendants()) do
  76. pcall(function()
  77. if string.find(v.Name,"ErrorMessage") then
  78. if string.find(v.Text,"Security kick") then
  79. veryImportantWaitTime = 1e9
  80. Teleport()
  81. end
  82. end
  83. end)
  84. end
  85. end)
  86. end
  87. end)
  88.  
  89. local AllowRunService = true
  90. local AllowRunServiceBind = Instance.new("BindableFunction")
  91. function AllowRunServiceBind.OnInvoke(args)
  92. if args == "Enable" then
  93. AllowRunService = true
  94. elseif args == "Disable" then
  95. AllowRunService = false
  96. end
  97. local CoreGui = game:GetService("StarterGui")
  98. CoreGui:SetCore("SendNotification", {
  99. Title = "Auto farm chest test by depth",
  100. Text = "Enjoin",
  101. Duration = math.huge,
  102. Callback = AllowRunServiceBind,
  103. })
  104. end
  105.  
  106. local CoreGui = game:GetService("StarterGui")
  107. CoreGui:SetCore("SendNotification", {
  108. Title = "Auto Chest",
  109. Text = "Auto farm chest test by depth",
  110. Duration = math.huge,
  111. Callback = AllowRunServiceBind,
  112. })
  113.  
  114. task.spawn(function()
  115. while true do
  116. if AllowRunService == true then
  117. local hasChar = game.Players.LocalPlayer:FindFirstChild("Character")
  118. if not game.Players.LocalPlayer.Character then
  119.  
  120. else
  121. local hasCrewTag = game.Players.LocalPlayer.Character:FindFirstChild("CrewBBG",true)
  122. if hasCrewTag then hasCrewTag:Destroy() end
  123. local hasHumanoid = game.Players.LocalPlayer.Character:FindFirstChild("Humanoid")
  124. if hasHumanoid then
  125. local Chest = game.Workspace:FindFirstChild("Chest4") or game.Workspace:FindFirstChild("Chest3") or game.Workspace:FindFirstChild("Chest2") or game.Workspace:FindFirstChild("Chest1") or game.Workspace:FindFirstChild("Chest")
  126.  
  127. if Chest then
  128. game.Players.LocalPlayer.Character:PivotTo(Chest:GetPivot())
  129. firesignal(Chest.Touched,game.Players.LocalPlayer.Character.HumanoidRootPart)
  130. else
  131. Teleport()
  132. break
  133. end
  134. end
  135. end
  136. end
  137. task.wait()
  138. end
  139. end)
  140.  
  141. end
  142.  
  143. thisCode()
  144.  
  145. join = game.Players.localPlayer.Neutral == false
  146. if _G.Team == nil then
  147. _G.Team = "Pirates"
  148. end
  149. _G.Team = "Marines"
  150. if (_G.Team == "Pirates" or _G.Team == "Marines") and not join then
  151. repeat wait()
  152. pcall(function()
  153. join = game.Players.localPlayer.Neutral == false
  154. if _G.Team == "Pirates" then
  155. for i,v in pairs({"MouseButton1Click", "MouseButton1Down", "Activated"}) do
  156. for i,v in pairs(getconnections(game:GetService("Players").LocalPlayer.PlayerGui.Main.ChooseTeam.Container.Pirates.Frame.ViewportFrame.TextButton[v])) do
  157. v.Function()
  158. end
  159. end
  160. elseif _G.Team == "Marines" then
  161. for i,v in pairs({"MouseButton1Click", "MouseButton1Down", "Activated"}) do
  162. for i,v in pairs(getconnections(game:GetService("Players").LocalPlayer.PlayerGui.Main.ChooseTeam.Container.Marines.Frame.ViewportFrame.TextButton[v])) do
  163. v.Function()
  164. end
  165. end
  166. else
  167. for i,v in pairs({"MouseButton1Click", "MouseButton1Down", "Activated"}) do
  168. for i,v in pairs(getconnections(game:GetService("Players").LocalPlayer.PlayerGui.Main.ChooseTeam.Container.Marines.Frame.ViewportFrame.TextButton[v])) do
  169. v.Function()
  170. end
  171. end
  172. end
  173. end)
  174. until join == true
  175. game:GetService("Players").LocalPlayer.PlayerGui.Main.ChooseTeam.Visible = false
  176. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement