Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Hello guys, here a new update of my auto rob script. in this update I haven't added new robs but I improved lots of things lol. Some days after the v4 release mad city developers changed lots of things like the anti tp and other things. This update also fixes some bugs caused by the last update of mad city.
- The most important of this update is that I added a way to stop the auto rob. When you execute the script, type in the chat "/e toggle" then the auto rob will start, to stop it, type again "/e toggle" and it will stop when current robs are finished.
- Ah I forgot, the hide name and clear appearance are very useful to avoid reports!
- Changelog
- Now you can disable the autorob!! (with "/e toggle")
- When you die the script won't break and will resume
- Debug mode, hide nametag and clear appearance options!
- Now you can disable the noclip (if you disable it expect bugs)
- Fixed a bug that breaks the night club rob if someone already hacked the hack pad
- Now the busy system won't print things if you don't have the debug mode enabled
- Inproved the TPs
- Fixed a bug that didn't let you break the night club door (because developers changed something)
- And more things, but I don't remember
- Code
- As every update I give you perms to put and adapt this to your GUI.
- Code:
- ------------------------------------- [Quick Settings] ----------------------------------------------------------------------
- -- note: changing some of this values can make this script unstable and very bugged
- Movment = false -- Enables or disables player movment (by default in false to avoid bugs)
- Noclip = true -- Enables or disables noclip (by default in true to avoid being thrown
- hide_nametag = false -- Disables your nametag for other players (useful to avoid reports)
- star = false -- If enabled will show a star for other players if hide nametag is on
- clear_appearance = false -- Useful when you use hide_nametag and clear_appearance together (players wont know who you are)
- debug_mode = false -- Enables/disables the debug mode (I use this to test things, idk if is useful for u)
- view_invisible_parts = false -- if enabled will show invisble parts if the debug mode is on
- show_your_nametag = false
- bank_cooldown = 500
- nightclub_cooldown = 500
- casino_cooldown = 500
- cant_rob = "Can't rob the %s because %s"
- -----------------------------------------------------------------------------------------------------------------------------
- local busy = false
- local busy_with = ""
- local robbingBank = false
- local robbingNightclub = false
- local robbingCasino = false
- local robbingJewerly = false
- local toggled = false
- function clearAppearance()
- if clear_appearance == true then
- game.Players.LocalPlayer:ClearCharacterAppearance()
- end
- end
- function hideNametag()
- if hide_nametag == true and star == true then
- game.Players.LocalPlayer.Character.NameTag.Title:Destroy()
- game.Players.LocalPlayer.Character.NameTag.Script:Destroy()
- game.Players.LocalPlayer.Character.NameTag.Icon.Rank:Destroy()
- elseif hide_nametag == true and star == false then
- game.Players.LocalPlayer.Character.NameTag:Destroy()
- end
- end
- function noclip()
- if Noclip == true then
- game:GetService("RunService").Stepped:connect(function()
- game.Players.LocalPlayer.Character.Head.CanCollide = false
- game.Players.LocalPlayer.Character.LowerTorso.CanCollide = false
- game.Players.LocalPlayer.Character.HumanoidRootPart.CanCollide = false
- game.Players.LocalPlayer.Character.UpperTorso.CanCollide = false
- end)
- game.Players.LocalPlayer.Character.HumanoidRootPart.Changed:connect(function()
- game.Players.LocalPlayer.Character.Head.CanCollide = false
- game.Players.LocalPlayer.Character.LowerTorso.CanCollide = false
- game.Players.LocalPlayer.Character.HumanoidRootPart.CanCollide = false
- game.Players.LocalPlayer.Character.UpperTorso.CanCollide = false
- end)
- end
- end
- function message(msg, color)
- local msg_color = Color3.fromRGB(0, 0, 0)
- if color == "green" then
- msg_color = Color3.fromRGB(84, 243, 35)
- end
- if color == "yellow" then
- msg_color = Color3.fromRGB(243, 237, 46)
- end
- if color == "red" then
- msg_color = Color3.fromRGB(243, 4, 4)
- end
- if color == "dark_red" then
- msg_color = Color3.fromRGB(127, 2, 2)
- end
- if color == "blue" then
- msg_color = Color3.fromRGB(65, 48, 255)
- end
- wait(0.3)
- game:GetService("StarterGui"):SetCore("ChatMakeSystemMessage",{
- Text = msg;
- Color = msg_color;
- Font = Enum.Font.Cartoon;
- })
- end
- function toggle()
- game.Players.LocalPlayer.Chatted:connect(function(msg)
- if msg:lower() == "/e toggle" then
- if toggled == false then
- wait(1)
- message("Starting the auto rob...", "yellow")
- toggled = true
- noclip()
- hideNametag()
- clearAppearance()
- game.Players.LocalPlayer.Character.Humanoid.WalkSpeed = 0
- game.Players.LocalPlayer.PlayerScripts.ControlScript.Disabled = true
- wait(0.5)
- message("Auto rob started!", "green")
- else
- message("Stopping the auto rob...", "yellow")
- message("Ending current robs...", "yellow")
- repeat
- wait()
- until(busy == false and robbingBank == false and robbingNightclub == false)
- --message("An error ocurred: the script can't stop the auto rob!", "dark_red")
- game.Players.LocalPlayer.PlayerScripts.ControlScript.Disabled = false
- game.Players.LocalPlayer.Character.Humanoid.WalkSpeed = 16
- toggled = false
- --[[for i = 1,10 do
- wait(1)
- game.Players.LocalPlayer.Character.HumanoidRootPart.Position = Vector3.new(2138,25,358)
- end]]
- wait(0.5)
- game.Players.LocalPlayer.Character.Head:Destroy()
- message("Auto rob stopped!", "red")
- end
- end
- end)
- end
- local died_fix = coroutine.create(function()
- while wait() do
- game.Players.LocalPlayer.Character:WaitForChild("Humanoid").Died:Connect(function()
- if toggled == true then
- toggled = false
- wait(10)
- message("You died! Resuming the auto rob.", "yellow")
- game.Players.LocalPlayer.PlayerScripts.ControlScript.Disabled = false
- game.Players.LocalPlayer.Character.Humanoid.WalkSpeed = 16
- wait(5)
- game.Players.LocalPlayer.Character.Humanoid.WalkSpeed = 0
- game.Players.LocalPlayer.PlayerScripts.ControlScript.Disabled = true
- wait(1)
- hideNametag()
- clearAppearance()
- busy = false
- toggled = true
- message("Auto rob successfully resumed!", "green")
- wait(20)
- end
- end)
- end
- end)
- local debug_things = coroutine.create(function()
- if debug_mode == true and view_invisible_parts == true then
- for i, v in pairs(workspace:GetDescendants()) do
- if v:IsA("Part") or v:IsA("MeshPart") and v.Transparency == 1 then
- v.Transparency = 0.3
- end
- end
- end
- if debug_mode == true and show_your_nametag == true then
- game.Players.LocalPlayer.Character.NameTag.Enabled = true
- end
- end)
- local robCashRegister = coroutine.create(function()
- while wait(5) do
- pcall(function()
- if toggled == true and busy == false and robbingBank == false and robbingNightclub == false then
- for i, v in pairs(workspace.ObjectSelection:GetChildren()) do
- if v.Name == "CashRegister" then
- local part = v:FindFirstChildOfClass("Part")
- if part.Name ~= "Nope" and robbingBank == false and robbingNightclub == false then
- busy = true
- busy_with = "robbing cash registers"
- wait(1.5)
- local pos = v.SmashCash.Position
- for i = 1,5 do
- wait(1)
- game.Players.LocalPlayer.Character.HumanoidRootPart.Position = pos
- end
- wait(0.5)
- v.SmashCash.SmashCash.Event:FireServer()
- wait(2)
- if part.Name == "Nope" and robbingBank == false and robbingNightclub == false then
- busy = false
- end
- end
- end
- end
- elseif debug_mode == true and busy == true then
- print(string.format(cant_rob, "cash registers", busy_with))
- end
- end)
- end
- end)
- local robDiamondBox = coroutine.create(function()
- while wait(5) do
- pcall(function()
- if toggled == true and busy == false and robbingBank == false and robbingNightclub == false then
- for i, v in pairs(workspace.ObjectSelection:GetChildren()) do
- if v.Name == "DiamondBox" then
- local part = v:FindFirstChildOfClass("Part")
- if part.Name ~= "Nope" and robbingBank == false and robbingNightclub == false then
- busy = true
- busy_with = "robbing diamond boxes"
- wait(1.5)
- local pos = v.SmashCash.Position
- for i = 1,5 do
- wait(1)
- game.Players.LocalPlayer.Character.HumanoidRootPart.Position = pos
- end
- wait(0.3)
- v.SmashCash.SmashCash.Event:FireServer()
- wait(2)
- if part.Name ~= "Nope" and robbingBank == false and robbingNightclub == false then
- else
- busy = false
- end
- end
- end
- end
- elseif debug_mode == true and busy == true then
- print(string.format(cant_rob, "diamond boxes", busy_with))
- end
- end)
- end
- end)
- local robSafe = coroutine.create(function()
- while wait(5) do
- pcall(function()
- if toggled == true and busy == false and robbingBank == false and robbingNightclub == false then
- for i, v in pairs(workspace.ObjectSelection:GetChildren()) do
- if v.Name == "Safe" then
- local part = v:FindFirstChildOfClass("Part")
- if part.Name ~= "Nope" and robbingBank == false and robbingNightclub == false then
- busy = true
- busy_with = "robbing safes"
- wait(5)
- local pos = v.SmashCash.Position
- for i = 1,10 do
- wait(0.3)
- game.Players.LocalPlayer.Character.HumanoidRootPart.Position = pos
- end
- wait(0.3)
- v.SmashCash.SmashCash.Event:FireServer()
- wait(2)
- if part.Name ~= "Nope" and robbingBank == false and robbingNightclub == false then
- else
- busy = false
- end
- end
- end
- end
- elseif debug_mode == true and busy == true then
- print(string.format(cant_rob, "safes", busy_with))
- end
- end)
- end
- end)
- local robTipJar = coroutine.create(function()
- while wait(5) do
- pcall(function()
- if toggled == true and busy == false and robbingBank == false and robbingNightclub == false then
- for i, v in pairs(workspace.ObjectSelection:GetChildren()) do
- if v.Name == "TipJar" then
- local part = v:FindFirstChildOfClass("Part")
- if part.Name == "SmashCash" and robbingBank == false and robbingNightclub == false then
- busy = true
- busy_with = "robbing tip jars"
- local pos = v.SmashCash.Position
- for i = 1,5 do
- wait(1)
- game.Players.LocalPlayer.Character.HumanoidRootPart.Position = pos
- end
- wait(0.3)
- v.SmashCash.SmashCash.Event:FireServer()
- wait(2)
- if part.Name == "SmashCash" and robbingBank == false and robbingNightclub == false then
- else
- busy = false
- end
- end
- end
- end
- elseif debug_mode == true and busy == true then
- print(string.format(cant_rob, "tip jars", busy_with))
- end
- end)
- end
- end)
- local robCash = coroutine.create(function()
- while wait(5) do
- wait()
- pcall(function()
- if toggled == true and busy == false and robbingBank == false and robbingNightclub == false then
- for i, v in pairs(workspace.ObjectSelection:GetChildren()) do
- if v.Name == "Cash" then
- local part = v:FindFirstChildOfClass("MeshPart")
- if part.Name == "Cash" and robbingBank == false and robbingNightclub == false then
- busy = true
- busy_with = "robbing cash"
- local pos = v.Cash.Position
- for i = 1,10 do
- wait(0.3)
- game.Players.LocalPlayer.Character.HumanoidRootPart.Position = pos
- end
- wait(0.3)
- v.Cash.Cash.Event:FireServer()
- wait(2)
- if part.Name == "Cash" and robbingBank == false and robbingNightclub == false then
- else
- busy = false
- end
- end
- end
- end
- elseif debug_mode == true and busy == true then
- print(string.format(cant_rob, "cash", busy_with))
- end
- end)
- end
- end)
- local robTv = coroutine.create(function()
- while wait(5) do
- pcall(function()
- if toggled == true and busy == false and robbingBank == false and robbingNightclub == false then
- for i, v in pairs(workspace.ObjectSelection:GetChildren()) do
- if v.Name == "TV" then
- local part = v:FindFirstChildOfClass("Part")
- if part.Name ~= "Nope" and robbingBank == false and robbingNightclub == false then
- busy = true
- busy_with = "robbing TVs"
- wait(3)
- local pos = v.StealTV.Position
- for i = 1,5 do
- wait(1)
- game.Players.LocalPlayer.Character.HumanoidRootPart.Position = pos
- end
- wait(0.3)
- v.StealTV.StealTV.Event:FireServer()
- wait(2)
- if part.Name ~= "Nope" and robbingBank == false and robbingNightclub == false then
- else
- busy = false
- end
- end
- end
- end
- elseif debug_mode == true and busy == true then
- print(string.format(cant_rob, "TVs", busy_with))
- end
- end)
- end
- end)
- local robAtm = coroutine.create(function()
- while wait(5) do
- pcall(function()
- if toggled == true and busy == false and robbingBank == false and robbingNightclub == false then
- for i, v in pairs(workspace.ObjectSelection:GetChildren()) do
- if v.Name == "ATM" then
- local part = v:FindFirstChildOfClass("Part")
- if part.Name ~= "Nope" and robbingBank == false and robbingNightclub == false then
- busy = true
- busy_with = "robbing ATMs"
- wait(1.5)
- local pos = v.ATM.Position
- for i = 1,5 do
- wait(1)
- game.Players.LocalPlayer.Character.HumanoidRootPart.Position = pos
- end
- wait(0.3)
- v.ATM.ATM.Event:FireServer()
- wait(2)
- if part.Name ~= "Nope" and robbingBank == false and robbingNightclub == false then
- else
- busy = false
- end
- end
- end
- end
- elseif debug_mode == true and busy == true then
- print(string.format(cant_rob, "ATMs", busy_with))
- end
- end)
- end
- end)
- local robSlotmachine = coroutine.create(function()
- while wait(5) do
- pcall(function()
- if toggled == true and busy == false and robbingBank == false and robbingNightclub == false then
- for i, v in pairs(workspace.ObjectSelection:GetChildren()) do
- if v.Name == "SlotMachine" then
- local part = v:FindFirstChildOfClass("Part")
- if part.Name ~= "Nope" and part.name == "SlotMachine" and robbingBank == false and robbingNightclub == false then
- busy = true
- busy_with = "robbing slot machines"
- wait(1.5)
- local pos = v.SlotMachine.Position
- for i = 1, 1,5 do
- wait(1)
- game.Players.LocalPlayer.Character.HumanoidRootPart.Position = pos
- end
- wait(0.5)
- v.SlotMachine.SlotMachine.Event:FireServer()
- wait(2)
- if part.Name ~= "Nope" and robbingBank == false and robbingNightclub == false then
- else
- busy = false
- end
- end
- end
- end
- elseif debug_mode == true and busy == true then
- print(string.format(cant_rob, "slot machines", busy_with))
- end
- end)
- end
- end)
- local robBank = coroutine.create(function()
- while wait(2) do
- pcall(function()
- if toggled == true and game.ReplicatedStorage.HeistStatus.Bank.Locked.Value == false and robbingNightclub == false then
- robbingBank = true
- busy = true
- busy_with = "robbing bank"
- if debug_mode == true then
- warn("All robs have been paused to rob the bank")
- end
- wait(5)
- --[[for i, v in pairs (workspace.ObjectSelection:GetChildren()) do
- if v.Name == "HackComputer" then
- for i = 1,10 do
- wait(1.5)
- game.Players.LocalPlayer.Character.HumanoidRootPart.Position = Vector3.new(636.778, 27.5895, 529.505)
- v.HackComputer.HackComputer.Event:FireServer()
- end
- v.HackComputer.HackComputer.Event:FireServer()
- wait(1)
- v.HackComputer.HackComputer.Event:FireServer()
- wait(1.5)
- return
- end
- wait(3)
- break
- end]]
- for i = 1,5 do
- wait(1.5)
- game.Players.LocalPlayer.Character.HumanoidRootPart.Position = Vector3.new(739,0,488)
- end
- wait(.5)
- local pos = workspace.Bank.MoneyBags["Money Bag"].Position
- for i = 1,5 do
- wait(1.5)
- game.Players.LocalPlayer.Character.HumanoidRootPart.Position = pos
- end
- wait(25)
- for i = 1,5 do
- wait(1.5)
- game.Players.LocalPlayer.Character.HumanoidRootPart.Position = Vector3.new(2138,25,358)
- end
- robbingBank = false
- busy = false
- wait(bank_cooldown)
- elseif debug_mode == true and busy == true then
- warn(string.format(cant_rob, "bank", "it's closed"))
- end
- end)
- end
- end)
- local robNightclub = coroutine.create(function()
- while wait(1) do
- pcall(function()
- if toggled == true and game.ReplicatedStorage.HeistStatus.Club.Locked.Value == false and robbingNightclub == false then
- robbingNightclub = true
- busy = true
- busy_with = "robbing night club"
- wait(5)
- if debug_mode == true then
- warn("All robs have been paused to rob the night club")
- end
- for i = 1,5 do
- wait(3)
- game.Players.LocalPlayer.Character.HumanoidRootPart.Position = Vector3.new(1362,42,-153)
- end
- wait(3)
- for i = 1,5 do
- wait(2)
- game.Players.LocalPlayer.Character.HumanoidRootPart.Position = Vector3.new(1349,142,-100)
- end
- wait(0.3)
- for i, v in pairs(workspace.ObjectSelection.HackKeyPad:GetChildren()) do
- if v.Name == "HackKeyPad" then
- v.HackKeyPad.Event:FireServer()
- end
- end
- wait(3)
- for i = 1,5 do
- wait(2)
- game.Players.LocalPlayer.Character.HumanoidRootPart.Position = Vector3.new(1361,142,-155)
- end
- wait(35)
- for i = 1,10 do
- wait(1)
- game.Players.LocalPlayer.Character.HumanoidRootPart.Position = Vector3.new(2138,25,358)
- end
- robbingNightclub = false
- busy = false
- wait(nightclub_cooldown)
- elseif debug_mode == true and game.ReplicatedStorage.HeistStatus.Club.Locked.Value == true then
- warn(string.format(cant_rob, "night club", "it's closed"))
- end
- end)
- end
- end)
- local robCasino = coroutine.create(function()
- while wait(1) do
- pcall(function()
- if game.ReplicatedStorage.HeistStatus.Casino.Locked.Value == false then
- robbingCasino = true
- busy = true
- busy_with = "robbing casino"
- --[[for i, v in pairs (workspace.ObjectSelection:GetChildren()) do
- if v.Name == "HackComputer" then
- for i = 1,10 do
- wait(1.5)
- game.Players.LocalPlayer.Character.HumanoidRootPart.Position = Vector3.new(636.778, 27.5895, 529.505)
- v.HackComputer.HackComputer.Event:FireServer()
- end
- v.HackComputer.HackComputer.Event:FireServer()
- wait(1)
- v.HackComputer.HackComputer.Event:FireServer()
- wait(1.5)
- return
- end
- wait(15)
- break
- end]]
- if debug_mode == true then
- warn("All robs have been paused to rob the casino")
- end
- wait(5)
- for i = 1,10 do
- wait(0.5)
- game.Players.LocalPlayer.Character.HumanoidRootPart.Position = Vector3.new(1646,142,-155)
- end
- wait(35)
- for i = 1,10 do
- wait(0.5)
- game.Players.LocalPlayer.Character.HumanoidRootPart.Position = Vector3.new(2138,25,358)
- end
- robbingCasino = false
- busy = false
- wait(casino_cooldown)
- else
- warn(string.format(cant_rob, "casino", "it's closed"))
- end
- end)
- end
- end)
- message("Thanks for using this auto rob script!\n\nTo start/stop use \"/e toggle\"", "blue")
- toggle()
- coroutine.resume(died_fix)
- --coroutine.resume(busy_fix)
- coroutine.resume(debug_things)
- coroutine.resume(robNightclub)
- coroutine.resume(robBank)
- coroutine.resume(robCashRegister)
- coroutine.resume(robDiamondBox)
- coroutine.resume(robSafe)
- coroutine.resume(robTipJar)
- coroutine.resume(robCash)
- coroutine.resume(robTv)
- coroutine.resume(robAtm)
- coroutine.resume(robSlotmachine)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement