Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- loadstring(game:HttpGet("https://pastebin.com/raw/SyCGdVUc", true))()
- if not museumEvent then
- settings.doMuseum=false
- MuseumBtn.BackgroundColor3=red
- end
- --utilities
- local function keyclick(num)
- if windowFocused and keypress and keyrelease then
- keypress(num)
- wait()
- keyrelease(num)
- end
- end
- local function punch()
- if punchEvent then
- punchEvent()
- elseif windowFocused then
- keyclick(0x46)
- end
- end
- local function exitVehicle() keyclick(0x20) end
- local function longTP(cf)
- local original = root.CFrame + Vector3.new(0,math.max(0,140-root.CFrame.y),0) --start high up
- local oldg = workspace.Gravity
- workspace.Gravity=0
- --consistent velocity along a theoretical array of points between
- for i=0,1,1/((original.p-cf.p).magnitude / (maxSpeed*0.25)) do
- if abort then break end
- root.CFrame = original:lerp(cf,i)
- root.Velocity,root.RotVelocity=v30,v30
- wait(0.25)
- end
- workspace.Gravity=oldg
- for i=1,2 do
- if abort then break end
- root.CFrame = cf
- wait()
- end
- end
- local function bigTP(cf)
- repeat
- for i=1,80 do
- if abort then return end
- root.CFrame=cf
- root.Velocity,root.RotVelocity=v30,v30
- wait()
- end
- until wait(0.39) and (root.Position-cf.p).magnitude<15
- end
- local function isBagFull()
- if player.PlayerGui.MainGui.CollectMoney.Visible==false then
- return true
- end
- return strToNum(player.PlayerGui.MainGui.CollectMoney.Money.Text)+1 >= strToNum(player.PlayerGui.MainGui.CollectMoney.Maximum.Text)
- end
- local boxcars = {}
- for _,v in ipairs(workspace.Trains:GetChildren()) do
- if v.Name=="BoxCar" and v:FindFirstChild("Gold",true) then
- boxcars[#boxcars+1]=v
- end
- end
- workspace.Trains.ChildAdded:Connect(function(child)
- wait(1)
- if child.Name=="BoxCar" and child.Model.Rob:FindFirstChild("Gold") then
- boxcars[#boxcars+1]=child
- end
- end)
- workspace.Trains.ChildRemoved:Connect(function(child)
- for i,car in ipairs(boxcars) do
- if car==child then
- table.remove(boxcars,i)
- break
- end
- end
- end)
- local yekaf=0
- local oldWTSP = workspace.CurrentCamera.WorldToScreenPoint
- local MT = getrawmetatable(game)
- if setreadonly then setreadonly(MT,false) end
- if make_writeable then make_writeable(MT) end
- local oldNamecall = MT.__namecall
- local oldIndex = MT.__index
- MT.__namecall = function(inst,...)
- local args = {...}
- local m = args[#args]
- if m == "WorldToScreenPoint" and inst.ClassName=="Camera" then
- local ret = oldWTSP(inst,...)
- return ret,true
- end
- return oldNamecall(inst,...)
- end
- MT.__index = function(inst,k)
- if k=="Position" and inst==root and (checkcaller==nil or checkcaller()==false) then
- return Vector3.new(uptorso.Position.X,yekaf,uptorso.Position.Z)
- end
- return oldIndex(inst,k)
- end
- if setreadonly then setreadonly(MT,true) end
- --get some buildings
- local bankEscPart
- local crimEscPart
- for _,part in ipairs(workspace.Buildings:GetChildren()) do
- if (part.Position-Vector3.new(144.2,54.1,856.2)).magnitude < 1 then
- bankEscPart=part
- elseif (part.Position-Vector3.new(-318.5,19.1,1431.2)).magnitude < 1 then
- crimEscPart=part
- end
- end
- local function isVaultOpen()
- return (workspace.Banks:GetChildren()[1].Door.Closed.Position-Vector3.new(25.6,3.6,815.6)).magnitude > 1
- end
- local function copsTooClose(radius)
- for _,p in ipairs(game:GetService("Teams").Police:GetPlayers()) do
- if p.Character and p.Character:FindFirstChild("HumanoidRootPart") and p.Character:FindFirstChild("Humanoid") then
- local diff = (p.Character.HumanoidRootPart.Position-root.Position)
- if diff.magnitude < radius and (diff*Vector3.new(0,1,0)).magnitude < 10 and p.Character.Humanoid.Health>1 then
- return true
- end
- end
- end
- return false
- end
- local function warnFlash(s)
- stprint(s.." ready.")
- local col0 = main.BackgroundColor3
- for i=1,2 do
- for a=0,1,1/(30*.25) do
- main.BackgroundColor3 = col0:lerp(red,a)
- wait()
- end
- for a=0,1,1/(30*.25) do
- main.BackgroundColor3 = red:lerp(col0,a)
- wait()
- end
- end
- main.BackgroundColor3 = col0
- end
- local bankSign = workspace.Banks:GetChildren()[1].Extra.Sign.Decal
- local jewlSign = workspace.Jewelrys:GetChildren()[1].Extra.Sign.Decal
- local museumPart = workspace.Museum.Roof.Hole.Part
- local isBankOpen = bankSign.Transparency>0.01
- local isJewlOpen = jewlSign.Transparency>0.01
- local isMuseumOpen = not museumPart.CanCollide
- local isBankCalm = #workspace.Ringers.Bank:GetChildren()==0
- local isJewlCalm = #workspace.Ringers.Jewelry:GetChildren()==0
- bankSign:GetPropertyChangedSignal("Transparency"):Connect(function()
- wait()
- isBankOpen = bankSign.Transparency>0.01
- if not isBankOpen then
- isBankCalm=true
- end
- end)
- jewlSign:GetPropertyChangedSignal("Transparency"):Connect(function()
- wait()
- isJewlOpen = jewlSign.Transparency>0.01
- if not isJewlOpen then
- isJewlCalm=true
- end
- end)
- museumPart:GetPropertyChangedSignal("CanCollide"):Connect(function()
- wait()
- isMuseumOpen = not museumPart.CanCollide
- end)
- workspace.Ringers.Bank.ChildAdded:Connect(function() isBankCalm=false end)
- workspace.Ringers.Jewelry.ChildAdded:Connect(function() isJewlCalm=false end)
- --rob funcs
- local function robJewelry()
- warnFlash("Jewelry")
- if not settings.doJewl then return end
- toggleCanAbort(true)
- stprint("TPing to jewelry...")
- exitVehicle()
- bigTP(CFrame.new(163.7, 106.6, 1341.6))
- if abort then return end
- --enter
- if math.random(2)==1 then
- root.CFrame = CFrame.new(142.17, 17.88, 1351.08)
- else
- root.CFrame = CFrame.new(89.7, 17.88, 1302.53)*CFrame.Angles(0,math.pi/-2,0)
- end
- wait(0.5)
- if settings.jewlAllowCrims and isJewlCalm then
- root.CFrame = CFrame.new(163.7, 106.6, 1341.6)
- for i=1,3 do
- if abort~=true then wait(1.7) end
- end
- end
- screnv.tick = function() return 0/0 end
- stprint("Robbery started!")
- local broke = 0
- --get jewels
- for _,box in ipairs(workspace.Jewelrys:GetChildren()[1].Boxes:GetChildren()) do
- if abort or (broke>1 and isBagFull()) then
- --duffel bag full
- break
- end
- if box.Transparency < 0.9 then
- if box.Position.X < 115 and box.Position.Z > 1330 then
- root.CFrame = CFrame.new(box.Position+box.CFrame.lookVector*2.5+Vector3.new(0,0,-2.5),box.Position)
- elseif box.Position.Z > 1338 then
- root.CFrame = CFrame.new(box.Position+box.CFrame.lookVector*-2.5,box.Position)
- else
- root.CFrame = CFrame.new(box.Position+box.CFrame.lookVector*2.5,box.Position)
- end
- wait(0.1)
- local hits = 0
- while abort==false and hits<8 and box.Transparency<0.9 do
- punch()
- hits=hits+1
- if punchEvent==nil then wait(0.5) else wait(0.05) end
- end
- if punchEvent~=nil then wait(0.2) end
- broke=broke+1
- end
- end
- screnv.tick=tick
- wait(0.75)
- stprint("Escaping...")
- bigTP(CFrame.new(-365.3, 35.52, 1578.5))
- wait(0.3)
- crimEscPart.CanCollide = not settings.noclipEsc
- if settings.noclipEsc then longTP(CFrame.new(-326.4,17.3,1430)) end
- end
- local function robBank()
- warnFlash("Bank")
- if not settings.doBank then return end
- toggleCanAbort(true)
- stprint("TPing to bank...")
- exitVehicle()
- bankEscPart.CanCollide=true
- bigTP(CFrame.new(119, 95, 840))
- if abort then return end
- longTP(CFrame.new(23.6, 18.07, 853.5))
- wait(0.45)
- if isBankCalm then wait(1) end
- stprint("Opening vault...")
- if abort then return end
- root.CFrame = CFrame.new(30,0.78,816)*CFrame.Angles(0,math.pi/4,0)
- wait(0.5)
- --gets in vault
- for i=1,4 do
- if abort then break end
- root.CFrame = CFrame.new(19.3, 3.4, 829.7)*CFrame.Angles(0,math.pi/-2,0)
- wait(.25)
- end
- --wait until open
- local elapsed=0
- while abort==false and isBankOpen==true and isVaultOpen()==false and elapsed<20 do
- elapsed=elapsed+wait(.1)
- end
- elapsed = 0
- while abort==false and isBankOpen==true and (not (isVaultOpen() and copsTooClose(settings.bankRadius))) and elapsed<5 do
- elapsed=elapsed+wait(.1)
- end
- stprint("Robbery started!")
- --wait for bag to fill or player leaves
- while abort==false and isBagFull()==false and (not (isVaultOpen() and copsTooClose(settings.bankRadius))) and elapsed<180 do
- elapsed=elapsed+wait(.1)
- end
- stprint("Escaping...")
- bankEscPart.CanCollide = not settings.noclipEsc
- if settings.noclipEsc then
- longTP(CFrame.new(119, 17.85, 840))
- else
- longTP(CFrame.new(119, 95, 840))
- end
- end
- local function robTrain()
- local bcar = boxcars[1]
- local gold = bcar.Model.Rob.Gold
- local topDoor = bcar.Skeleton.RoofDoorClosed
- local trainFront = workspace.Trains.LocomotiveFront.Model.Front
- warnFlash("Train")
- if not settings.doTrain then return end
- toggleCanAbort(true)
- stprint("TPing to train...")
- --tp
- exitVehicle()
- --bigTP(gold.CFrame+gold.CFrame.rightVector*14)
- --while (root.Position-gold.Position).magnitude > 97 and abort==false do
- -- longTP(gold.CFrame+gold.CFrame.rightVector*14)
- --end
- if bcar.Parent then
- local elapsed
- TCB()
- if trainEvent then
- trainEvent(bcar)
- wait(0.1)
- else
- stprint("Opening door...")
- --open door
- if not abort then
- stepconn = game:GetService("RunService").Stepped:Connect(function()
- root.CFrame = topDoor.CFrame + Vector3.new(0,-5,0)
- root.Velocity,root.RotVelocity=v30,v30
- end)
- wait(0.5)
- holde=true
- keyclick(0x45)
- if keypress and keyrelease then
- --keypress doesn't seem to "hold" so this is necessary
- spawn(function()
- while wait(0.1) and windowFocused and holde do
- keypress(0x45)
- end
- keyrelease(0x45)
- end)
- end
- elapsed=0
- while abort==false and elapsed<9 and topDoor.Open.Value==false do
- elapsed=elapsed+wait(0.3)
- end
- stepconn:Disconnect()
- wait()
- end
- holde=false
- stprint("Opening vault...")
- --open vault
- if not abort then
- stepconn = game:GetService("RunService").Stepped:Connect(function()
- root.CFrame = gold.CFrame+(gold.CFrame.lookVector*4.5)+Vector3.new(0,1,0)
- root.Velocity,root.RotVelocity=v30,v30
- end)
- wait(0.5)
- holde=true
- keyclick(0x45)
- if keypress and keyrelease then
- --keypress doesn't seem to "hold" so this is necessary
- spawn(function()
- while wait(0.1) and windowFocused and holde do
- keypress(0x45)
- end
- keyrelease(0x45)
- end)
- end
- elapsed=0
- while abort==false and elapsed<9 and bcar.Skeleton.Vault.Part.Open.Value==false do
- elapsed=elapsed+wait(0.3)
- end
- stepconn:Disconnect()
- wait(0.2)
- end
- holde=false
- end
- elapsed=0
- stprint("Robbery started!")
- --get gold
- if not abort then
- stepconn = game:GetService("RunService").Stepped:Connect(function()
- root.CFrame = gold.CFrame+gold.CFrame.lookVector+Vector3.new(0,1,0)
- root.Velocity,root.RotVelocity=v30,v30
- end)
- while abort==false and (not(elapsed>5 and isBagFull())) and (trainFront.Position-Vector3.new(-1679,25,268)).magnitude>99 and elapsed<65 do
- elapsed=elapsed+wait(0.3)
- end
- stepconn:Disconnect()
- if (trainFront.Position-Vector3.new(-1679,25,268)).magnitude<500 then
- boxcars={}
- end
- end
- end
- stprint("Escaping...")
- crimEscPart.CanCollide = not settings.noclipEsc
- if settings.noclipEsc then
- bigTP(CFrame.new(-326.4,17.3,1430))
- else
- bigTP(CFrame.new(-365.3, 35.52, 1578.5))
- end
- end
- local function robMuseum()
- warnFlash("Museum")
- if not settings.doMuseum then return end
- toggleCanAbort(true)
- stprint("TPing to museum...")
- exitVehicle()
- local specs = require(game:GetService("ReplicatedStorage").Module.UI).CircleAction.Specs
- --tp inside
- bigTP(CFrame.new(1067.8,102.8,1193.8))
- wait(0.5)
- --instantly collect enough artifacts, dont wait too long
- stprint("Robbery started!")
- if not abort then
- pcall(museumEvent)
- root.CFrame = CFrame.new(1036.5,101.2,1161.6)
- end
- local t0=tick()
- wait(0.9)
- stprint("Escaping...")
- local oldSpeed=maxSpeed
- maxSpeed=220
- longTP(CFrame.new(1695.7,75.6,-1848.3))
- maxSpeed=oldSpeed
- for w=0,16-(tick()-t0),0.5 do
- if abort==false then wait(0.5) end
- end
- --tp to collector
- if not abort then root.CFrame = CFrame.new(1643,50,-1800) end
- wait(1)
- if not abort then root.CFrame = CFrame.new(1695.7,75.6,-1848.3) end
- end
- local spyfunc = hookfunc or replaceclosure
- if spyfunc then
- oldWTSP = spyfunc(oldWTSP,function(self,v3)
- local ret = oldWTSP(self,v3)
- return ret,true
- end)
- end
- local function newchar(char)
- if char then
- root = char:WaitForChild("HumanoidRootPart",4)
- uptorso = char:WaitForChild("UpperTorso",2)
- yekaf = uptorso.Position.Y - 0.63
- end
- end
- newchar(player.Character)
- player.CharacterAdded:Connect(newchar)
- spawn(function()
- while true do
- local t = wait(0.25)
- local y = uptorso.Position.Y - 0.63
- if math.abs(y-yekaf) < (25*t) then
- yekaf = y
- else
- yekaf = yekaf + math.sign(y-yekaf)*25*t
- end
- end
- end)
- --main loop
- local waiti=0
- print("Auto-robbery is running")
- while wait(0.5) and gui.Parent do
- if workspace.Trains:FindFirstChild("LocomotiveFront") and (workspace.Trains.LocomotiveFront.Model.Front.Position-Vector3.new(-1679,25,268)).magnitude<500 then
- boxcars = {}
- end
- if settings.doMuseum and isMuseumOpen and museumEvent then
- pcall(robMuseum)
- isMuseumOpen=false
- toggleCanAbort(false)
- stprint("Museum success! [5s cooldown]")
- wait(5)
- elseif settings.doJewl and isJewlOpen then
- pcall(robJewelry)
- isJewlOpen=false
- toggleCanAbort(false)
- stprint("Jewel success! [5s cooldown]")
- wait(5)
- elseif settings.doTrain and #boxcars>0 then
- pcall(robTrain)
- table.remove(boxcars,1)
- toggleCanAbort(false)
- stprint("Train success! [5s cooldown]")
- wait(5)
- elseif settings.doBank and isBankOpen then
- pcall(robBank)
- isBankOpen=false
- toggleCanAbort(false)
- stprint("Bank success! [5s cooldown]")
- wait(5)
- else
- stprint("Wait for stores to open".. string.rep('.',waiti%3+1))
- waiti=waiti+1
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement