Advertisement
Deni21dc

Mad City Diamond Hub AutoRob

Apr 22nd, 2022
9,921
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.46 KB | None | 0 0
  1. game.StarterGui:SetCore("SendNotification", {Title = "Diamond Hub";Text = "Mad City AutoRob";Icon = "";Duration = 10;})
  2.  
  3. game.Players.LocalPlayer.Character.HumanoidRootPart.Parent = nil
  4. for i,v in pairs(getnilinstances()) do
  5. if v.Name == "HumanoidRootPart" then
  6. v.Parent = game.Players.LocalPlayer.Character
  7. end
  8. end
  9. wait(0.8)
  10. game.Players.LocalPlayer.Character.HumanoidRootPart.Position = Vector3.new(2039.42,26.42,425.82)
  11. for i,v in pairs(game:GetService("Workspace").ObjectSelection:GetDescendants()) do
  12. if v.Name == "Cash" and v:IsA("MeshPart") or v.Name == "Steal" and v:IsA("Part") or v.Name == "SmashCash" and v:IsA("Part") or v.Name == "ATM" and v:IsA("Part") then
  13. wait(0.01)
  14. v:FindFirstChildOfClass("Script").Event:FireServer()
  15. end
  16. end
  17. wait(1)
  18. game.Players.LocalPlayer:Kick("Diamond Hub - Mad City AutoRob")
  19. local PlaceID = game.PlaceId
  20. local AllIDs = {}
  21. local foundAnything = ""
  22. local actualHour = os.date("!*t").hour
  23. local Deleted = false
  24. local File = pcall(function()
  25. AllIDs = game:GetService('HttpService'):JSONDecode(readfile("NotSameServers.json"))
  26. end)
  27. if not File then
  28. table.insert(AllIDs, actualHour)
  29. writefile("NotSameServers.json", game:GetService('HttpService'):JSONEncode(AllIDs))
  30. end
  31. function TPReturner()
  32. local Site;
  33. if foundAnything == "" then
  34. Site = game.HttpService:JSONDecode(game:HttpGet('https://games.roblox.com/v1/games/' .. PlaceID .. '/servers/Public?sortOrder=Asc&limit=100'))
  35. else
  36. Site = game.HttpService:JSONDecode(game:HttpGet('https://games.roblox.com/v1/games/' .. PlaceID .. '/servers/Public?sortOrder=Asc&limit=100&cursor=' .. foundAnything))
  37. end
  38. local ID = ""
  39. if Site.nextPageCursor and Site.nextPageCursor ~= "null" and Site.nextPageCursor ~= nil then
  40. foundAnything = Site.nextPageCursor
  41. end
  42. local num = 0;
  43. for i,v in pairs(Site.data) do
  44. local Possible = true
  45. ID = tostring(v.id)
  46. if tonumber(v.maxPlayers) > tonumber(v.playing) then
  47. for _,Existing in pairs(AllIDs) do
  48. if num ~= 0 then
  49. if ID == tostring(Existing) then
  50. Possible = false
  51. end
  52. else
  53. if tonumber(actualHour) ~= tonumber(Existing) then
  54. local delFile = pcall(function()
  55. delfile("NotSameServers.json")
  56. AllIDs = {}
  57. table.insert(AllIDs, actualHour)
  58. end)
  59. end
  60. end
  61. num = num + 1
  62. end
  63. if Possible == true then
  64. table.insert(AllIDs, ID)
  65. wait()
  66. pcall(function()
  67. writefile("NotSameServers.json", game:GetService('HttpService'):JSONEncode(AllIDs))
  68. wait()
  69. game:GetService("TeleportService"):TeleportToPlaceInstance(PlaceID, ID, game.Players.LocalPlayer)
  70. end)
  71. wait(4)
  72. end
  73. end
  74. end
  75. end
  76.  
  77. function Teleport()
  78. while wait() do
  79. pcall(function()
  80. TPReturner()
  81. if foundAnything ~= "" then
  82. TPReturner()
  83. end
  84. end)
  85. end
  86. end
  87.  
  88. -- If you'd like to use a script before server hopping (Like a Automatic Chest collector you can put the Teleport() after it collected everything.
  89. Teleport()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement