Stagnant1

Thief Life Simulator script

Oct 17th, 2021 (edited)
354
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 4.46 KB | None | 0 0
  1. --[[
  2.     ------Credits------
  3. Looting script by stagnant @ v3rm
  4. Auto hop script by CharWar @ v3rm
  5. ]]
  6. --[[
  7.     ------How to use------
  8. Put this in your auto execution folder and it will do it's job
  9. if
  10. ]]
  11.  
  12. if readfile and writefile then
  13.     local PlaceID = game.PlaceId
  14.     local AllIDs = {}
  15.     local foundAnything = ""
  16.     local actualHour = os.date("!*t").hour
  17.     local Deleted = false
  18.     local File = pcall(function()
  19.         AllIDs = game:GetService('HttpService'):JSONDecode(readfile("NotSameServers.json"))
  20.     end)
  21.     if not File then
  22.         table.insert(AllIDs, actualHour)
  23.         writefile("NotSameServers.json", game:GetService('HttpService'):JSONEncode(AllIDs))
  24.     end
  25.     function TPReturner()
  26.         local Site;
  27.         if foundAnything == "" then
  28.             Site = game.HttpService:JSONDecode(game:HttpGet('https://games.roblox.com/v1/games/' .. PlaceID .. '/servers/Public?sortOrder=Asc&limit=100'))
  29.         else
  30.             Site = game.HttpService:JSONDecode(game:HttpGet('https://games.roblox.com/v1/games/' .. PlaceID .. '/servers/Public?sortOrder=Asc&limit=100&cursor=' .. foundAnything))
  31.         end
  32.         local ID = ""
  33.         if Site.nextPageCursor and Site.nextPageCursor ~= "null" and Site.nextPageCursor ~= nil then
  34.             foundAnything = Site.nextPageCursor
  35.         end
  36.         local num = 0;
  37.         for i,v in pairs(Site.data) do
  38.             local Possible = true
  39.             ID = tostring(v.id)
  40.             if tonumber(v.maxPlayers) > tonumber(v.playing) then
  41.                 for _,Existing in pairs(AllIDs) do
  42.                     if num ~= 0 then
  43.                         if ID == tostring(Existing) then
  44.                             Possible = false
  45.                         end
  46.                     else
  47.                         if tonumber(actualHour) ~= tonumber(Existing) then
  48.                             local delFile = pcall(function()
  49.                                 delfile("NotSameServers.json")
  50.                                 AllIDs = {}
  51.                                 table.insert(AllIDs, actualHour)
  52.                             end)
  53.                         end
  54.                     end
  55.                     num = num + 1
  56.                 end
  57.                 if Possible == true then
  58.                     table.insert(AllIDs, ID)
  59.                     wait()
  60.                     pcall(function()
  61.                         writefile("NotSameServers.json", game:GetService('HttpService'):JSONEncode(AllIDs))
  62.                         wait()
  63.                         game:GetService("TeleportService"):TeleportToPlaceInstance(PlaceID, ID, game.Players.LocalPlayer)
  64.                     end)
  65.                     wait(4)
  66.                 end
  67.             end
  68.         end
  69.     end
  70.  
  71.     function Teleport()
  72.         while wait() do
  73.             pcall(function()
  74.                 TPReturner()
  75.                 if foundAnything ~= "" then
  76.                     TPReturner()
  77.                 end
  78.             end)
  79.         end
  80.     end
  81.  
  82.     for i, v in pairs(game:GetService("Workspace").Loot.Places:GetChildren()) do
  83.         if v:FindFirstChild("LootType") and v.LootType.Value == "HighValueLoot" then
  84.             if game.Players.LocalPlayer.Character:FindFirstChild("HumanoidRootPart") then
  85.                 game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame = v.CFrame * CFrame.new(0, 5, 0)
  86.                 if game.Players.LocalPlayer.Character.HumanoidRootPart.Position.Y < -20 then game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame = CFrame.new(-1336, 13, 0) return end
  87.                 game:GetService("ReplicatedStorage").Events.Loot.RequestLoot:FireServer(v.Name)
  88.                 wait(1)
  89.                 for i2, v2 in pairs(game:GetService("Players").LocalPlayer.PlayerGui.LootGUI.LootWindow.Loot:GetChildren()) do
  90.                     if v2.Name ~= "UIListLayout" then
  91.                         wait()
  92.                         game:GetService("ReplicatedStorage").Events.Loot.RequestPickUp:FireServer(v2.Name)
  93.                         if game:GetService("Players").LocalPlayer.PlayerGui.LootGUI.LootWindow.BackpackItems.Value == game:GetService("Players").elias200676.PlayerGui.LootGUI.LootWindow.BackpackSize.Value then
  94.                             game:GetService("ReplicatedStorage").Events.Shop.RequestSellAll:FireServer(-1)
  95.                         end
  96.                     end
  97.                 end
  98.             end
  99.         end
  100.     end
  101.     wait(5)
  102.  
  103.     Teleport()
  104.     else warn("your executer doesn't support readfile and writefile")
  105. end
Add Comment
Please, Sign In to add comment