Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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)
- local busy = false
- local busy_with = "busy_with"
- local thing = "thing"
- local busy_str = "Can't rob %s because you are busy with %s"
- local not_finished = "Can't rob other things because the %s rob isn't finished"
- local cashRegister = coroutine.wrap(function()
- while wait(5) do
- pcall(function()
- if busy == 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" then
- busy = true
- busy_with = "cash registers"
- local pos = v.SmashCash.Position
- for i = 1, math.random(5,10) 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" then
- warn(string.format(not_finished, "cash registers"))
- else
- busy = false
- end
- end
- end
- end
- else
- thing = "cash registers"
- warn(string.format(busy_str, thing, busy_with))
- end
- end)
- end
- end)
- local diamondBox = coroutine.wrap(function()
- while wait(5) do
- pcall(function()
- if busy == 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" then
- busy = true
- busy_with = "diamond boxes"
- local pos = v.SmashCash.Position
- for i = 1, math.random(5,10) 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" then
- warn(string.format(not_finished, "diamond boxes"))
- else
- busy = false
- end
- end
- end
- end
- else
- thing = "diamond boxes"
- warn(string.format(busy_str, thing, busy_with))
- end
- end)
- end
- end)
- local safe = coroutine.wrap(function()
- while wait(5) do
- pcall(function()
- if busy == 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" then
- busy = true
- busy_with = "safes"
- local pos = v.SmashCash.Position
- for i = 1, math.random(5,10) 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" then
- warn(string.format(not_finished, "safes"))
- else
- busy = false
- end
- end
- end
- end
- else
- thing = "safes"
- warn(string.format(busy_str, thing, busy_with))
- end
- end)
- end
- end)
- local tipJar = coroutine.wrap(function()
- while wait(5) do
- pcall(function()
- if busy == 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" then
- busy = true
- busy_with = "tip jars"
- local pos = v.SmashCash.Position
- for i = 1, math.random(5,10) 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" then
- warn(string.format(not_finished, "tip jars"))
- else
- busy = false
- end
- end
- end
- end
- else
- thing = "tip jars"
- warn(string.format(busy_str, thing, busy_with))
- end
- end)
- end
- end)
- local cash = coroutine.wrap(function()
- while wait(5) do
- pcall(function()
- if busy == 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" then
- busy = true
- busy_with = "cash"
- local pos = v.Cash.Position
- for i = 1, math.random(5,10) do
- wait(.1)
- game.Players.LocalPlayer.Character.HumanoidRootPart.Position = pos
- end
- wait(0.3)
- v.Cash.Cash.Event:FireServer()
- wait(2)
- if part.Name == "Cash" then
- warn(string.format(not_finished, "cash"))
- else
- busy = false
- end
- end
- end
- end
- else
- thing = "cash"
- warn(string.format(busy_str, thing, busy_with))
- end
- end)
- end
- end)
- local tv = coroutine.wrap(function()
- while wait(5) do
- pcall(function()
- if busy == 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" then
- busy = true
- busy_with = "TVs"
- local pos = v.StealTV.Position
- for i = 1, math.random(5,10) 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" then
- warn(string.format(not_finished, "TVs"))
- else
- busy = false
- end
- end
- end
- end
- else
- thing = "TVs"
- warn(string.format(busy_str, thing, busy_with))
- end
- end)
- end
- end)
- local dropCrate = coroutine.wrap(function()
- while wait(5) do
- pcall(function()
- if busy == false then
- for i, v in pairs(workspace.ObjectSelection:GetChildren()) do
- if v.Name == "DropCrate" then
- local part = v:FindFirstChildOfClass("Part")
- if part.Name ~= "Nope" then
- busy = true
- busy_with = "drop crates"
- local pos = v.DropCrate.Position
- for i = 1, math.random(5,10) do
- wait(.1)
- game.Players.LocalPlayer.Character.HumanoidRootPart.Position = pos
- end
- wait(0.3)
- v.DropCrate.DropCrate.Event:FireServer()
- wait(2)
- if part.Name ~= "Nope" then
- warn(string.format(not_finished, "drop crates"))
- else
- busy = false
- end
- end
- end
- end
- else
- thing = "drop crates"
- warn(string.format(busy_str, thing, busy_with))
- end
- end)
- end
- end)
- local atm = coroutine.wrap(function()
- while wait(5) do
- pcall(function()
- if busy == 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" then
- busy = true
- busy_with = "ATMs"
- local pos = v.ATM.Position
- for i = 1, math.random(5,10) 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" then
- warn(string.format(not_finished, "ATMs"))
- else
- busy = false
- end
- end
- end
- end
- else
- thing = "ATMs"
- warn(string.format(busy_str, thing, busy_with))
- end
- end)
- end
- end)
- cashRegister()
- wait(20)
- diamondBox()
- wait(15)
- safe()
- wait(15)
- tipJar()
- wait(15)
- cash()
- wait(15)
- tv()
- --wait(15)
- --dropCrate()
- wait(15)
- atm()
Add Comment
Please, Sign In to add comment