Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local placeVersion = game.PlaceVersion
- print(placeVersion)
- function Teleport()
- local PlaceID = game.PlaceId
- local AllIDs = {}
- local foundAnything = ""
- local actualHour = os.date("!*t").hour
- local Deleted = false
- local File = pcall(function()
- AllIDs = game:GetService('HttpService'):JSONDecode(readfile("NotSameServers.json"))
- end)
- if not File then
- table.insert(AllIDs, actualHour)
- writefile("NotSameServers.json", game:GetService('HttpService'):JSONEncode(AllIDs))
- end
- function TPReturner()
- local Site;
- if foundAnything == "" then
- Site = game.HttpService:JSONDecode(game:HttpGet('https://games.roblox.com/v1/games/' .. PlaceID .. '/servers/Public?sortOrder=Asc&limit=100'))
- else
- Site = game.HttpService:JSONDecode(game:HttpGet('https://games.roblox.com/v1/games/' .. PlaceID .. '/servers/Public?sortOrder=Asc&limit=100&cursor=' .. foundAnything))
- end
- local ID = ""
- if Site.nextPageCursor and Site.nextPageCursor ~= "null" and Site.nextPageCursor ~= nil then
- foundAnything = Site.nextPageCursor
- end
- local num = 0;
- for i,v in pairs(Site.data) do
- local Possible = true
- ID = tostring(v.id)
- if tonumber(v.maxPlayers) > tonumber(v.playing) then
- for _,Existing in pairs(AllIDs) do
- if num ~= 0 then
- if ID == tostring(Existing) then
- Possible = false
- end
- else
- if tonumber(actualHour) ~= tonumber(Existing) then
- local delFile = pcall(function()
- delfile("NotSameServers.json")
- AllIDs = {}
- table.insert(AllIDs, actualHour)
- end)
- end
- end
- num = num + 1
- end
- if Possible == true then
- table.insert(AllIDs, ID)
- wait()
- pcall(function()
- writefile("NotSameServers.json", game:GetService('HttpService'):JSONEncode(AllIDs))
- wait()
- game:GetService("TeleportService"):TeleportToPlaceInstance(PlaceID, ID, game.Players.LocalPlayer)
- end)
- wait(4)
- end
- end
- end
- end
- function Teleport()
- while wait() do
- pcall(function()
- TPReturner()
- if foundAnything ~= "" then
- TPReturner()
- end
- end)
- end
- end
- -- 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.
- Teleport()
- end
- function DupeGems()
- local Data = require(game:GetService("ReplicatedStorage"):WaitForChild("ClientModules"):WaitForChild("LocalData"))
- local module = {}
- function module:Initialize()
- local ch = game.Players.LocalPlayer.Character
- local prt = Instance.new("Model", workspace)
- local z1 = Instance.new("Part", prt)
- z1.Name="Torso"
- z1.CanCollide = false
- z1.Anchored = true
- local z2 =Instance.new("Part", prt)
- z2.Name="Head"
- z2.Anchored = true
- z2.CanCollide = false
- local z3 = Instance.new("Humanoid", prt)
- z3.Name="Humanoid"
- z1.Position = Vector3.new(0,9999,0)
- z2.Position = Vector3.new(0,9991,0)
- game.Players.LocalPlayer.Character=prt
- task.wait()
- game.Players.LocalPlayer.Character=ch
- task.wait(6)
- local plr = game.Players.LocalPlayer
- local Hum = Instance.new("Humanoid")
- Hum.Parent = game.Players.LocalPlayer.Character
- local root = game.Players.LocalPlayer.Character.HumanoidRootPart
- for _, v in next, plr.Character:GetChildren() do
- if v.Name ~= 'Humanoid' then v:Destroy() end
- end
- end
- function module:Dupe(amount)
- amount += Data:GetData("Gems")
- while task.wait() do
- local data = Data:GetData("Gems")
- if data >= amount then
- break
- end
- game:GetService("ReplicatedStorage").Events.Rebirth:FireServer()
- end
- game.Players.LocalPlayer.Character:Destroy()
- end
- module:Initialize()
- local amount = 100000000
- module:Dupe(amount)
- end
- if placeVersion == 844 then
- DupeGems()
- else
- Teleport()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement