Advertisement
KrystekYY

Untitled

Jun 20th, 2022
32
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.45 KB | None | 0 0
  1. local placeVersion = game.PlaceVersion
  2. print(placeVersion)
  3.  
  4. function Teleport()
  5. local PlaceID = game.PlaceId
  6. local AllIDs = {}
  7. local foundAnything = ""
  8. local actualHour = os.date("!*t").hour
  9. local Deleted = false
  10. local File = pcall(function()
  11. AllIDs = game:GetService('HttpService'):JSONDecode(readfile("NotSameServers.json"))
  12. end)
  13. if not File then
  14. table.insert(AllIDs, actualHour)
  15. writefile("NotSameServers.json", game:GetService('HttpService'):JSONEncode(AllIDs))
  16. end
  17. function TPReturner()
  18. local Site;
  19. if foundAnything == "" then
  20. Site = game.HttpService:JSONDecode(game:HttpGet('https://games.roblox.com/v1/games/' .. PlaceID .. '/servers/Public?sortOrder=Asc&limit=100'))
  21. else
  22. Site = game.HttpService:JSONDecode(game:HttpGet('https://games.roblox.com/v1/games/' .. PlaceID .. '/servers/Public?sortOrder=Asc&limit=100&cursor=' .. foundAnything))
  23. end
  24. local ID = ""
  25. if Site.nextPageCursor and Site.nextPageCursor ~= "null" and Site.nextPageCursor ~= nil then
  26. foundAnything = Site.nextPageCursor
  27. end
  28. local num = 0;
  29. for i,v in pairs(Site.data) do
  30. local Possible = true
  31. ID = tostring(v.id)
  32. if tonumber(v.maxPlayers) > tonumber(v.playing) then
  33. for _,Existing in pairs(AllIDs) do
  34. if num ~= 0 then
  35. if ID == tostring(Existing) then
  36. Possible = false
  37. end
  38. else
  39. if tonumber(actualHour) ~= tonumber(Existing) then
  40. local delFile = pcall(function()
  41. delfile("NotSameServers.json")
  42. AllIDs = {}
  43. table.insert(AllIDs, actualHour)
  44. end)
  45. end
  46. end
  47. num = num + 1
  48. end
  49. if Possible == true then
  50. table.insert(AllIDs, ID)
  51. wait()
  52. pcall(function()
  53. writefile("NotSameServers.json", game:GetService('HttpService'):JSONEncode(AllIDs))
  54. wait()
  55. game:GetService("TeleportService"):TeleportToPlaceInstance(PlaceID, ID, game.Players.LocalPlayer)
  56. end)
  57. wait(4)
  58. end
  59. end
  60. end
  61. end
  62.  
  63. function Teleport()
  64. while wait() do
  65. pcall(function()
  66. TPReturner()
  67. if foundAnything ~= "" then
  68. TPReturner()
  69. end
  70. end)
  71. end
  72. end
  73.  
  74. -- 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.
  75. Teleport()
  76. end
  77.  
  78. function DupeGems()
  79. local Data = require(game:GetService("ReplicatedStorage"):WaitForChild("ClientModules"):WaitForChild("LocalData"))
  80. local module = {}
  81. function module:Initialize()
  82. local ch = game.Players.LocalPlayer.Character
  83. local prt = Instance.new("Model", workspace)
  84. local z1 = Instance.new("Part", prt)
  85. z1.Name="Torso"
  86. z1.CanCollide = false
  87. z1.Anchored = true
  88. local z2 =Instance.new("Part", prt)
  89. z2.Name="Head"
  90. z2.Anchored = true
  91. z2.CanCollide = false
  92. local z3 = Instance.new("Humanoid", prt)
  93. z3.Name="Humanoid"
  94. z1.Position = Vector3.new(0,9999,0)
  95. z2.Position = Vector3.new(0,9991,0)
  96. game.Players.LocalPlayer.Character=prt
  97. task.wait()
  98. game.Players.LocalPlayer.Character=ch
  99. task.wait(6)
  100. local plr = game.Players.LocalPlayer
  101.  
  102. local Hum = Instance.new("Humanoid")
  103. Hum.Parent = game.Players.LocalPlayer.Character
  104.  
  105. local root = game.Players.LocalPlayer.Character.HumanoidRootPart
  106. for _, v in next, plr.Character:GetChildren() do
  107. if v.Name ~= 'Humanoid' then v:Destroy() end
  108. end
  109. end
  110.  
  111. function module:Dupe(amount)
  112. amount += Data:GetData("Gems")
  113. while task.wait() do
  114. local data = Data:GetData("Gems")
  115. if data >= amount then
  116. break
  117. end
  118. game:GetService("ReplicatedStorage").Events.Rebirth:FireServer()
  119. end
  120. game.Players.LocalPlayer.Character:Destroy()
  121. end
  122.  
  123. module:Initialize()
  124.  
  125. local amount = 100000000
  126.  
  127. module:Dupe(amount)
  128. end
  129.  
  130. if placeVersion == 844 then
  131. DupeGems()
  132. else
  133. Teleport()
  134. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement