Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --[[
- ------Credits------
- Looting script by stagnant @ v3rm
- Auto hop script by CharWar @ v3rm
- ]]
- --[[
- ------How to use------
- Put this in your auto execution folder and it will do it's job
- if
- ]]
- if readfile and writefile then
- 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
- for i, v in pairs(game:GetService("Workspace").Loot.Places:GetChildren()) do
- if v:FindFirstChild("LootType") and v.LootType.Value == "HighValueLoot" then
- if game.Players.LocalPlayer.Character:FindFirstChild("HumanoidRootPart") then
- game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame = v.CFrame * CFrame.new(0, 5, 0)
- if game.Players.LocalPlayer.Character.HumanoidRootPart.Position.Y < -20 then game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame = CFrame.new(-1336, 13, 0) return end
- game:GetService("ReplicatedStorage").Events.Loot.RequestLoot:FireServer(v.Name)
- wait(1)
- for i2, v2 in pairs(game:GetService("Players").LocalPlayer.PlayerGui.LootGUI.LootWindow.Loot:GetChildren()) do
- if v2.Name ~= "UIListLayout" then
- wait()
- game:GetService("ReplicatedStorage").Events.Loot.RequestPickUp:FireServer(v2.Name)
- if game:GetService("Players").LocalPlayer.PlayerGui.LootGUI.LootWindow.BackpackItems.Value == game:GetService("Players").elias200676.PlayerGui.LootGUI.LootWindow.BackpackSize.Value then
- game:GetService("ReplicatedStorage").Events.Shop.RequestSellAll:FireServer(-1)
- end
- end
- end
- end
- end
- end
- wait(5)
- Teleport()
- else warn("your executer doesn't support readfile and writefile")
- end
Add Comment
Please, Sign In to add comment