Advertisement
PAINTEX_TM

Mad City SIlent Auto Farm

Jan 18th, 2022
614
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. wait(16)
  2. pcall(function()
  3.     repeat
  4.         wait()
  5.     until game:GetService("Players").LocalPlayer.PlayerGui:FindFirstChild("SpawnGUI") and game:GetService("Players").LocalPlayer.PlayerGui:FindFirstChild("Chat")
  6.     wait(3)
  7.     function TeleportToRandomServer()
  8.         local HttpService = game:GetService("HttpService")
  9.         local Instances = {}
  10.         local AmountCheck = 0
  11.         local TotalCollectionSize = HttpService:JSONDecode(game:HttpGet("https://www.roblox.com/games/getgameinstancesjson?placeId=" .. game.PlaceId .. "&startindex=0")).TotalCollectionSize
  12.         local FloorCollectionSize = math.floor(TotalCollectionSize / 10) * 10
  13.         for a=0,FloorCollectionSize / 10 do
  14.             spawn(function()
  15.                 local GameInst = HttpService:JSONDecode(game:HttpGet("https://www.roblox.com/games/getgameinstancesjson?placeId=" .. game.PlaceId .. "&startindex=".. a*10))
  16.                 for a,b in pairs(GameInst.Collection) do
  17.                     if b.Capacity > #b.CurrentPlayers then
  18.                         table.insert(Instances, b.Guid)
  19.                     end
  20.                 end
  21.                 AmountCheck = AmountCheck + 1
  22.             end)
  23.         end
  24.         repeat
  25.             wait(.1)
  26.  
  27.         until AmountCheck >= (FloorCollectionSize / 10) - 1
  28.         game:GetService("TeleportService"):TeleportToPlaceInstance(game.PlaceId, Instances[math.random(1, #Instances)])
  29.     end
  30. spawn(function()
  31. wait(120)
  32. TeleportToRandomServer()
  33. end)
  34. spawn(function()
  35.    while wait() do
  36.        if game.Players.LocalPlayer.Name == "Rejoin" then
  37.            TeleportToRandomServer()
  38.           end
  39.       end
  40. end)
  41.     _G.noclip = true
  42.     spawn(function()
  43.         while game:GetService("RunService").RenderStepped:wait() do
  44.             if _G.noclip and game.Players.LocalPlayer.Character:FindFirstChild("Humanoid") then
  45.                 game.Players.LocalPlayer.Character:findFirstChildOfClass("Humanoid"):ChangeState(11)
  46.             end
  47.         end
  48.     end)
  49.     game.Players.LocalPlayer.Character.HumanoidRootPart.Parent = nil
  50.     for i,v in pairs(getnilinstances()) do
  51.         if v.Name == "HumanoidRootPart" then
  52.             v.Parent = game.Players.LocalPlayer.Character
  53.         end
  54.     end
  55.  
  56.  
  57.     local a = game:GetService("Workspace").ObjectSelection
  58.     local allowed = {"Cash", "SmashCash", "ATM", "SlotMachine", "Steal", "JewelBox", "StealTV"}
  59.     local heists = game:GetService("ReplicatedStorage").HeistStatus
  60.     local cargo = game:GetService("Workspace").CargoPlane
  61.  
  62.  
  63.     function check(name)
  64.         for i = 0, #allowed do
  65.             if allowed[i] == name then
  66.                 return true
  67.             end
  68.         end
  69.         return false
  70.     end
  71.  
  72.     function rob(name)
  73.         for i,v in pairs(a:GetDescendants()) do
  74.             if v:IsA("RemoteEvent") and v.Parent:IsA("Script") and v.Parent.Parent:IsA("Part") and v.Parent.Parent.Parent:IsA("Model") and v.Parent.Parent.Name == name then
  75.                 game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame = v.Parent.Parent.CFrame*CFrame.new(0,5,0)
  76.                 wait(0.15)
  77.                 v:FireServer()
  78.             end
  79.             game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame=  game:GetService("Workspace").ObjectSelection.CriminalDummy.CriminalDummy.CFrame*CFrame.new(15,0,-30)        end
  80.     end
  81.  
  82.     for i,v in pairs(a:GetDescendants()) do
  83.         if v:IsA("RemoteEvent") and v.Parent:IsA("Script") and v.Parent.Parent:IsA("Part") and v.Parent.Parent.Parent:IsA("Model") and check(v.Parent.Parent.Name)== true then
  84.             game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame = v.Parent.Parent.CFrame*CFrame.new(0,5,0)
  85.             wait(0.15)
  86.             v:FireServer()
  87.         end
  88.         game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame=  game:GetService("Workspace").ObjectSelection.CriminalDummy.CriminalDummy.CFrame*CFrame.new(15,0,-30)
  89.     end
  90.     _G.noclip = true
  91.     wait(1)
  92.     if cargo:FindFirstChild("Plane") ~= nil then
  93.         rob("PlaneCrate")
  94.     end
  95.     wait(1)
  96.     _G.noclip = true
  97.     if heists.Club.Robbing.Value == true then
  98.         for i,v in pairs(game.Workspace.ObjectSelection:GetChildren()) do
  99.             if v.Name == "ClubDiamond" then
  100.                 game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame = v.ClubDiamond.CFrame
  101.                 v.ClubDiamond.ClubDiamond.Event:FireServer()
  102.                 wait(0.1)
  103.             end
  104.         end
  105.         rob("Files")
  106.     end
  107.     wait(1)
  108.     game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame=  game:GetService("Workspace").ObjectSelection.CriminalDummy.CriminalDummy.CFrame*CFrame.new(15,0,-30)
  109.     _G.noclip = false
  110.     wait(1)
  111.     _G.noclip = true
  112.     if heists.Pyramid.Locked.Value == false or heists.Pyramid.Robbing.Value == true then
  113.         game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame = workspace.Pyramid.Tele.Core1.CFrame
  114.         wait()
  115.         for i,v in pairs(game.Workspace.ObjectSelection:GetChildren()) do
  116.             if v.Name == "TreasurePyramid" and v:FindFirstChild("TreasurePyramid") then
  117.                 game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame = v.TreasurePyramid.CFrame
  118.                 v.TreasurePyramid.TreasurePyramid.Event:FireServer()
  119.                 wait(0.1)
  120.             end
  121.         end
  122.  
  123.     end
  124.     game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame=  game:GetService("Workspace").ObjectSelection.CriminalDummy.CriminalDummy.CFrame*CFrame.new(15,0,-30)    _G.noclip = false
  125.     wait(1)
  126.     _G.noclip = true
  127.     for i,v in pairs(game:GetService("Workspace").Heists.JewelryStore.EssentialParts.JewelryBoxes:GetChildren()) do
  128.         if v.Name == "JewelBox" then
  129.             game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame = v.CFrame
  130.             wait()
  131.             for i = 1, 3 do
  132.                 local A_1 = v
  133.                 local Event = game:GetService("Workspace").Heists.JewelryStore.EssentialParts.JewelryBoxes.JewelryManager.Event
  134.                 Event:FireServer(A_1)
  135.             end
  136.             wait()
  137.         end
  138.     end
  139.     game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame=  game:GetService("Workspace").ObjectSelection.CriminalDummy.CriminalDummy.CFrame*CFrame.new(15,0,-30)    _G.noclip = false
  140.     wait(3)
  141.     for i = 1, 50 do
  142.         local A_1 = "GoldTrain"
  143.         local Event = game:GetService("ReplicatedStorage").RemoteEvent
  144.         Event:FireServer(A_1)
  145.     end
  146.     _G.noclip = true
  147.  
  148.  
  149.     game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame=  game:GetService("Workspace").ObjectSelection.CriminalDummy.CriminalDummy.CFrame*CFrame.new(15,0,-30)    _G.noclip = false
  150.     wait(5)
  151.     game.Players.LocalPlayer.Name = "Rejoin"
  152.     TeleportToRandomServer()
  153. end)
Advertisement
Advertisement
Advertisement
RAW Paste Data Copied
Advertisement