Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --https://v3rmillion.net/showthread.php?tid=688367
- local player = game:GetService("Players").LocalPlayer or game:GetService("Players"):GetPropertyChangedSignal("LocalPlayer"):Wait() or game:GetService("Players").LocalPlayer
- getupvalues,getconstants,setconstant,is_protected_closure = getupvalues or debug.getupvalues,getconsts or debug.getconstants,setconst or debug.setconstant,is_protected_closure or function()end
- local VirtualInput = game:GetService("VirtualInputManager")
- local stepconn,uptorso,humanoid
- local root = {}
- local v30=Vector3.new()
- local abort = false
- local c3green,c3red,c3grey=Color3.fromRGB(0,222,0),Color3.fromRGB(222,0,0),Color3.fromRGB(222,222,222)
- local settings = {enabled=true,jewlAllowCrims=false,preferLongTP=false,bankRadius2=19,preferUnsafeEsc=false,warnSeconds=1.5}
- local settingsModified = false
- if readfile then
- pcall(function()
- local new = game:GetService("HttpService"):JSONDecode(readfile("JBAR.txt"))
- --corruption?
- local doOverwrite=false
- for k,v in pairs(new) do
- if settings[k]==nil then
- doOverwrite=true
- new[k]=nil
- end
- end
- for k,v in pairs(settings) do
- if new[k]==nil then
- doOverwrite=true
- new[k]=v
- end
- end
- --use input
- if doOverwrite then
- settingsModified = true
- writefile("JBAR.txt",game:GetService("HttpService"):JSONEncode(new))
- end
- settings = new
- end)
- end
- --// handle character //
- local Stepped = game:GetService("RunService").Stepped
- local NCparts = {}
- local NCconn
- local NCfunc = function()
- for i=1,#NCparts do
- NCparts[i].CanCollide=false
- end
- end
- local function noclip()
- if not NCconn then
- NCconn = Stepped:Connect(NCfunc)
- end
- end
- local function yesclip()
- if NCconn then
- NCconn:Disconnect()
- NCconn = nil
- end
- end
- local lastRootCf
- local function onRootChanged()
- if (root.CFrame.p-Vector3.new(-177.3,19.6,1013.2)).magnitude < 1 then
- root.CFrame = lastRootCf
- end
- end
- local function newchar(char)
- if char then
- root = char:WaitForChild("HumanoidRootPart")
- root:GetPropertyChangedSignal("CFrame"):Connect(onRootChanged)
- uptorso = char:WaitForChild("UpperTorso")
- humanoid = char:WaitForChild("Humanoid")
- wait(0.2)
- NCparts = {}
- for _,v in ipairs(char:GetChildren()) do
- if v:IsA("BasePart") then
- NCparts[#NCparts+1]=v
- end
- end
- end
- end
- newchar(player.Character)
- player.CharacterAdded:Connect(newchar)
- Stepped:Connect(function()
- lastRootCf = root.CFrame
- end)
- --// interface //
- Create = function(class,parent,props)
- local new = Instance.new(class)
- for k,v in next,props do
- new[k]=v
- end
- new.Parent = parent
- return new
- end
- gui=Create("ScreenGui",game.CoreGui,{Name="AutoRob", ResetOnSpawn=false, ZIndexBehavior="Sibling"})
- main=Create("Frame",gui,{Name="Main", ClipsDescendants=true, Draggable=true, Active=true, Size=UDim2.new(0,333,0,140), Position=UDim2.new(0.1,0,0.3,0), BackgroundColor3=Color3.new(0,0.118,0.239)})
- homeFrame=Create("Frame",main,{Name="homeFrame", BackgroundTransparency=1, Size=UDim2.new(1,-30,1,-55), Position=UDim2.new(0,15,0,40)})
- AbortBtn=Create("TextButton",homeFrame,{Name="AbortBtn", Size=UDim2.new(0.48,0,0.3,0), Text="ABORT", Font="SourceSans", Position=UDim2.new(0.52,0,0.25,0), TextSize=23, AutoButtonColor=false,
- BackgroundColor3=Color3.new(0.502,0.498,0.506)})
- Shade=Create("Frame",AbortBtn,{Name="Shade", BackgroundTransparency=0.9, Size=UDim2.new(1,0,0.5,0), Position=UDim2.new(0,0,0.5,0), BackgroundColor3=Color3.new(), Visible=false})
- Status=Create("TextLabel",homeFrame,{Name="Status", Size=UDim2.new(1,0,0.27,0), Text="Status: Loading...", TextSize=15, TextXAlignment="Left", Font="Code", Position=UDim2.new(0,0,0.73,0),
- BackgroundColor3=Color3.new(0.765,0.765,0.765)})
- ToggleBtn=Create("TextButton",homeFrame,{Name="ToggleBtn", Size=UDim2.new(0.48,0,0.3,0), Text="TOGGLE", Font="SourceSans", Position=UDim2.new(0,0,0.25,0), TextSize=23,
- BackgroundColor3=settings.enabled and c3green or c3red})
- Shade_2=Create("Frame",ToggleBtn,{Name="Shade", BackgroundTransparency=0.9, Size=UDim2.new(1,0,0.5,0), Position=UDim2.new(0,0,0.5,0), BackgroundColor3=Color3.new()})
- availabels=Create("Frame",homeFrame,{Name="availabels", BackgroundTransparency=1, Size=UDim2.new(1,0,0.23,0), Position=UDim2.new(0,0,-0.12,0), BackgroundColor3=Color3.new(1,1,1)})
- jewelryLbl=Create("TextLabel",availabels,{Name="jewelryLbl", Size=UDim2.new(0.2,0,1,0), Text="Jewel", TextSize=18, Font="SourceSansLight", BackgroundTransparency=1, Position=UDim2.new(0.2,0,0,0),
- TextColor3=Color3.new(1,1,1), BackgroundColor3=Color3.new(1,1,1)})
- trainLbl=Create("TextLabel",availabels,{Name="trainLbl", Size=UDim2.new(0.2,0,1,0), Text="Train", TextSize=18, Font="SourceSansLight", BackgroundTransparency=1, Position=UDim2.new(0.6,0,0,0),
- TextColor3=Color3.new(1,1,1), BackgroundColor3=Color3.new(1,1,1)})
- bankLbl=Create("TextLabel",availabels,{Name="bankLbl", Size=UDim2.new(0.2,0,1,0), Text="Bank", TextSize=18, Font="SourceSansLight", BackgroundTransparency=1, Position=UDim2.new(0.8,0,0,0),
- TextColor3=Color3.new(1,1,1), BackgroundColor3=Color3.new(1,1,1)})
- airdropLbl=Create("TextLabel",availabels,{Name="airdropLbl", Size=UDim2.new(0.2,0,1,0), Text="Airdrop", TextSize=18, Font="SourceSansLight", BackgroundTransparency=1, Position=UDim2.new(0.4,0,0,0),
- TextColor3=Color3.new(1,1,1), BackgroundColor3=Color3.new(1,1,1)})
- museumLbl=Create("TextLabel",availabels,{Name="museumLbl", Size=UDim2.new(0.2,0,1,0), Text="Museum", TextSize=18, Font="SourceSansLight", BackgroundTransparency=1, TextColor3=Color3.new(1,1,1),
- BackgroundColor3=Color3.new(1,1,1)})
- CloseBtn=Create("TextButton",main,{Name="CloseBtn", TextWrapped=true, TextStrokeTransparency=0.7, Size=UDim2.new(0,25,0,25), TextColor3=c3grey, Text="X", BackgroundTransparency=1,
- Font="GothamBold", Position=UDim2.new(1,-22,0,0), TextScaled=true})
- CogBtn=Create("ImageButton",main,{Name="CogBtn", Image="rbxassetid://135740223", Size=UDim2.new(0,25,0,25), Position=UDim2.new(0,0,0,2), BackgroundTransparency=1})
- setsframe=Create("Frame",main,{Name="setsframe", BackgroundTransparency=0.02, Size=UDim2.new(1,-10,0.8,-10), Position=UDim2.new(-1,5,0.2,5), BorderSizePixel=0, BackgroundColor3=Color3.new(1,1,1)})
- Frame=Create("Frame",setsframe,{BackgroundTransparency=1, Size=UDim2.new(1,0,0.25,0)})
- BankRadiusBox=Create("TextBox",Frame,{Name="BankRadiusBox", TextWrapped=true, Size=UDim2.new(0,40,0,15), Text=settings.bankRadius2, Font="GothamSemibold", Position=UDim2.new(0.78,0,0.2,0),
- TextScaled=true, BackgroundColor3=Color3.new(1,1,1)})
- Label=Create("TextLabel",Frame,{TextWrapped=true, Size=UDim2.new(0.8,0,1,0), Text="Bank Cops Danger Range", TextSize=15, Font="Code", BackgroundTransparency=1})
- Frame_2=Create("Frame",setsframe,{BackgroundTransparency=0.93, Size=UDim2.new(1,0,0.25,0), Position=UDim2.new(0,0,0.25,0), BackgroundColor3=Color3.new()})
- JewlSetBtn=Create("TextButton",Frame_2,{Name="JewlSetBtn", Size=UDim2.new(0,25,0,15), Text=settings.jewlAllowCrims and 'X' or '', Font="SourceSansSemibold", Position=UDim2.new(0.8,0,0.2,0), TextSize=20,
- BackgroundColor3=Color3.new(1,1,1)})
- Label_2=Create("TextLabel",Frame_2,{TextWrapped=true, Size=UDim2.new(0.8,0,1,0), Text="Let Crims Enter Jewelry", TextSize=15, Font="Code", BackgroundTransparency=1})
- Frame_3=Create("Frame",setsframe,{BackgroundTransparency=1, Size=UDim2.new(1,0,0.25,0), Position=UDim2.new(0,0,0.5,0)})
- WarnSetBtn=Create("TextButton",Frame_3,{Name="WarnSetBtn", Size=UDim2.new(0,25,0,15), Text=settings.warnSeconds>1.51 and 'X' or '', Font="SourceSansSemibold", Position=UDim2.new(0.8,0,0.2,0), TextSize=20,
- BackgroundColor3=Color3.new(1,1,1)})
- Label_3=Create("TextLabel",Frame_3,{TextWrapped=true, Size=UDim2.new(0.8,0,1,0), Text="Prefer Longer Warnings", TextSize=15, Font="Code", BackgroundTransparency=1})
- Frame_4=Create("Frame",setsframe,{BackgroundTransparency=0.93, Size=UDim2.new(1,0,0.25,0), Position=UDim2.new(0,0,0.75,0), BackgroundColor3=Color3.new()})
- EscSetBtn=Create("TextButton",Frame_4,{Name="EscSetBtn", Size=UDim2.new(0,25,0,15), Text=settings.preferUnsafeEsc and 'X' or '', Font="SourceSansSemibold", Position=UDim2.new(0.8,0,0.2,0), TextSize=20,
- BackgroundColor3=Color3.new(1,1,1)})
- Label_4=Create("TextLabel",Frame_4,{TextWrapped=true, Size=UDim2.new(0.8,0,1,0), Text="Remember Your Position", TextSize=15, Font="Code", BackgroundTransparency=1})
- Title=Create("TextLabel",main,{Name="Title", TextWrapped=true, Size=UDim2.new(0.5,0,0,20), Text="Jailbreak Auto-Rob", TextSize=18, Font="Highway", BackgroundTransparency=1, Position=UDim2.new(0.24,0,0,3),
- TextColor3=c3grey, BackgroundColor3=Color3.new(1,1,1)})
- SaveSetsBtn=Create("TextButton",main,{Name="SaveSetsBtn", Size=UDim2.new(0,60,0,25), Text="Save", Font="SourceSans", Style="RobloxRoundDefaultButton", Position=UDim2.new(0,30,0,-25), TextSize=20})
- --gui code
- CloseBtn.MouseButton1Click:Connect(function() gui:Destroy() abort=true end)
- CloseBtn.MouseEnter:Connect(function() CloseBtn.TextColor3=c3red end)
- CloseBtn.MouseLeave:Connect(function() CloseBtn.TextColor3=c3grey end)
- local function toggleCanAbort(bool)
- AbortBtn.AutoButtonColor=bool
- AbortBtn.BackgroundColor3 = bool and Color3.new(0.353,0.557,0.914) or Color3.new(0.502,0.498,0.506)
- Shade.Visible = bool
- abort=false
- end
- AbortBtn.MouseButton1Click:Connect(function()
- if AbortBtn.AutoButtonColor then
- if stepconn then stepconn:Disconnect() end
- toggleCanAbort(false)
- abort=true
- AbortBtn.Text = "Aborted."
- wait(2.8)
- AbortBtn.Text = "ABORT"
- end
- end)
- local function setStatus(txt)
- Status.Text = "Status: "..txt
- end
- local tweenCogOut = game:GetService("TweenService"):Create(CogBtn,TweenInfo.new(0.25),{Rotation=135})
- local tweenCogIn = game:GetService("TweenService"):Create(CogBtn,TweenInfo.new(0.25),{Rotation=0})
- local cogOut = false
- CogBtn.MouseButton1Click:Connect(function()
- cogOut = not cogOut
- if cogOut then
- setsframe:TweenPosition(UDim2.new(0,5,0.2,5),nil,"Quart",0.3,true)
- homeFrame:TweenPosition(UDim2.new(1,15,0,40),nil,"Quart",0.3,true)
- if writefile then SaveSetsBtn:TweenPosition(UDim2.new(0,30,0,2),nil,"Quart",0.3,true) end
- tweenCogOut:Play()
- else
- setsframe:TweenPosition(UDim2.new(-1,5,0.2,5),nil,"Quart",0.3,true)
- homeFrame:TweenPosition(UDim2.new(0,15,0,40),nil,"Quart",0.3,true)
- SaveSetsBtn:TweenPosition(UDim2.new(0,30,0,-25),nil,"Quart",0.3,true)
- tweenCogIn:Play()
- end
- end)
- local bankBoxOld=BankRadiusBox.Text
- BankRadiusBox:GetPropertyChangedSignal("Text"):Connect(function()
- BankRadiusBox.Text=BankRadiusBox.Text:sub(1,4)
- local num = tonumber(BankRadiusBox.Text)
- if num then
- if num>99 then
- BankRadiusBox.Text = '99'
- end
- elseif BankRadiusBox.Text~='' then
- BankRadiusBox.Text = bankBoxOld
- end
- bankBoxOld = BankRadiusBox.Text
- end)
- BankRadiusBox.FocusLost:Connect(function()
- if tonumber(BankRadiusBox.Text) then
- settings.bankRadius2=tonumber(BankRadiusBox.Text)
- end
- BankRadiusBox.Text=tostring(settings.bankRadius2)
- end)
- JewlSetBtn.MouseButton1Click:Connect(function()
- settings.jewlAllowCrims = not settings.jewlAllowCrims
- JewlSetBtn.Text = settings.jewlAllowCrims and "X" or ""
- end)
- WarnSetBtn.MouseButton1Click:Connect(function()
- settings.warnSeconds = settings.warnSeconds>1.51 and 1.5 or 3
- WarnSetBtn.Text = settings.warnSeconds>1.51 and "X" or ""
- end)
- EscSetBtn.MouseButton1Click:Connect(function()
- settings.preferUnsafeEsc = not settings.preferUnsafeEsc
- EscSetBtn.Text = settings.preferUnsafeEsc and "X" or ""
- end)
- SaveSetsBtn.MouseButton1Click:Connect(function()
- if writefile and SaveSetsBtn.Style.Name=="RobloxRoundDefaultButton" then
- SaveSetsBtn.Style="RobloxRoundButton"
- writefile("JBAR.txt",game:GetService("HttpService"):JSONEncode(settings))
- SaveSetsBtn.Text="Saved."
- wait(1)
- SaveSetsBtn.Text="Save"
- SaveSetsBtn.Style="RobloxRoundDefaultButton"
- end
- end)
- ToggleBtn.MouseButton1Click:Connect(function()
- settings.enabled = not settings.enabled
- ToggleBtn.BackgroundColor3 = settings.enabled and c3green or c3red
- end)
- --// vitals //
- player:WaitForChild("PlayerScripts"):WaitForChild("LocalScript")
- wait(0.5)
- wait(5 - workspace.DistributedGameTime)
- local vehicleInfo = {}
- local specs, punchSpec
- if (getreg or debug.getregistry) and getupvalues then
- local reg = (getreg or debug.getregistry)()
- for a=1,#reg do
- local f = reg[a]
- if type(f)=="function" and not is_protected_closure(f) then
- for _,t in next,getupvalues(f) do
- if type(t)=="table" then
- if t.LastVehicleExit then
- vehicleInfo = t
- elseif t.Specs and t.Frame and #t==0 then
- specs = t.Specs
- elseif punchSpec==nil and #t==3 and getconstants and setconstant and gethwid==nil and ReplaceString==nil then
- for b=1,3 do
- if type(t[b])=="table" and t[b].Name=="Punch" then
- punchSpec = t[b]
- for c,v in ipairs(getconstants(punchSpec.Callback)) do
- if v == 0.5 then
- setconstant(punchSpec.Callback,c,0)
- end
- end
- end
- end
- end
- end
- end
- end
- end
- end
- --// misc code //
- for _,part in ipairs(workspace.Buildings:GetChildren()) do
- if (part.Position-Vector3.new(-302.6,30.3,1431.9)).magnitude < 1 then
- part.CanCollide=false
- end
- end
- for _,part in ipairs(workspace.Jewelrys:GetChildren()[1].Building:GetChildren()) do
- if part.Name=="Part" and (part.Position-Vector3.new(157.8,63.4,1336.6)).magnitude < 1 then
- part.CanCollide = false
- end
- end
- --// entity status //
- local museumArray = { {CFrame.new(1053.6,101.7,1245.6),workspace.Museum.MummyCase.Mummy.Head},{CFrame.new(1037.1,116.6,1254.8),workspace.Museum.Reference.Items.Gold},
- {CFrame.new(1046.8,116.6,1262.7),workspace.Museum.Reference.Items.SpinnerRim},{CFrame.new(1029.4,116.6,1247.7),workspace.Museum.Reference.Items.Cone.Cone},
- {CFrame.new(1038.8,101.7,1238.7),workspace.Museum.EgyptionCase.Mask},{CFrame.new(1105.3,101.7,1151),workspace.Museum.JewelCase.Jewel} }
- local isSteamEngineOpen = workspace.Trains:FindFirstChild("SteamEngine")~=nil
- local current_boxcar = workspace.Trains:FindFirstChild("BoxCar")
- local temp_boxcar = current_boxcar or {} --bugfix for multiple boxcar attempts
- workspace.Trains.ChildAdded:Connect(function(child)
- wait(math.random())
- if child.Name=="SteamEngine" then
- isSteamEngineOpen = true
- briefcasesfolder = Instance.new("Folder",workspace)
- repeat
- wait()
- if workspace.Trains.PassengerArmor:FindFirstChild("Briefcase") then
- workspace.Trains.PassengerArmor.Parent = briefcasesfolder
- end
- until not workspace.Trains.PassengerArmor:FindFirstChild("Briefcase")
- elseif child.Name=="BoxCar" and current_boxcar==nil and temp_boxcar.Parent==nil then
- temp_boxcar = child
- wait(24 + math.random()*53) --confuse cops
- if child.Parent and current_boxcar==nil then
- current_boxcar = child
- end
- end
- trainLbl.TextColor3 = (current_boxcar or isSteamEngineOpen) and c3green or Color3.new(1,1,1)
- end)
- workspace.Trains.ChildRemoved:Connect(function(child)
- if current_boxcar == child then
- current_boxcar = nil
- elseif child.Name=="SteamEngine" then
- isSteamEngineOpen = false
- end
- trainLbl.TextColor3 = (current_boxcar or isSteamEngineOpen) and c3green or Color3.new(1,1,1)
- end)
- trainLbl.TextColor3 = (current_boxcar or isSteamEngineOpen) and c3green or Color3.new(1,1,1)
- local airdrops = {}
- local function checkNewDrop(child)
- local briefcase = child:WaitForChild("Briefcase",2)
- if briefcase then
- local e=0
- while true do
- e=e+wait(0.25)
- local hitpart = workspace:FindPartOnRayWithIgnoreList(Ray.new(briefcase.Position,Vector3.new(0,-17,0)),{child},false,true)
- if e>25 or (hitpart and hitpart.CanCollide) or child:FindFirstChild("Parachute")==nil then
- break
- end
- end
- if child.Parent and briefcase.Parent then
- airdrops[#airdrops+1]=child
- airdropLbl.TextColor3 = c3green
- end
- end
- end
- for _,child in ipairs(workspace:GetChildren()) do
- if child.Name=="Drop" and child.ClassName=="Model" then
- spawn(function() checkNewDrop(child) end)
- end
- end
- workspace.ChildAdded:Connect(function(child)
- if child.Name=="Drop" and child.ClassName=="Model" then
- checkNewDrop(child)
- end
- end)
- workspace.ChildRemoved:Connect(function(child)
- if child.Name=="Drop" and child.ClassName=="Model" then
- for i=1,#airdrops do
- if airdrops[i]==child then
- table.remove(airdrops,i)
- airdropLbl.TextColor3 = #airdrops>0 and c3green or Color3.new(1,1,1)
- break
- end
- end
- end
- 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
- bankLbl.TextColor3 = isBankOpen and c3green or Color3.new(1,1,1)
- if not isBankOpen then
- isBankCalm=true
- end
- end)
- jewlSign:GetPropertyChangedSignal("Transparency"):Connect(function()
- wait()
- isJewlOpen = jewlSign.Transparency>0.01
- jewelryLbl.TextColor3 = isJewlOpen and c3green or Color3.new(1,1,1)
- if not isJewlOpen then
- isJewlCalm=true
- end
- end)
- museumPart:GetPropertyChangedSignal("CanCollide"):Connect(function()
- wait()
- isMuseumOpen = not museumPart.CanCollide
- museumLbl.TextColor3 = isMuseumOpen and c3green or Color3.new(1,1,1)
- end)
- bankLbl.TextColor3 = isBankOpen and c3green or Color3.new(1,1,1)
- jewelryLbl.TextColor3 = isJewlOpen and c3green or Color3.new(1,1,1)
- museumLbl.TextColor3 = isMuseumOpen and c3green or Color3.new(1,1,1)
- workspace.Ringers.Bank.ChildAdded:Connect(function() isBankCalm=false end)
- workspace.Ringers.Jewelry.ChildAdded:Connect(function() isJewlCalm=false end)
- local airdropTick = 0
- --// subroutines //
- local function keyclick(keycode)
- VirtualInput:SendKeyEvent(true, keycode, false, game)
- wait()
- VirtualInput:SendKeyEvent(false, keycode, false, game)
- end
- local function exitVehicle()
- if humanoid.Sit then
- keyclick("Space")
- wait(0.07)
- humanoid.Jump=true
- wait(0.3)
- vehicleInfo.LastVehicleExit = 9e9
- end
- end
- local function perfectTP(cf)
- local oldg = workspace.Gravity
- workspace.Gravity = 0
- local door = workspace.Apartments.Skyscraper1.ExitDoor.Touch
- local oldcf = door.CFrame
- local elapsed,lastelapsed = 0,0
- while (root.Position-cf.p).magnitude-2 > root.Velocity.magnitude*(elapsed-lastelapsed) and elapsed < 9 and not abort do
- lastelapsed=elapsed
- door.CFrame = root.CFrame
- elapsed=elapsed+wait()
- door.CFrame = oldcf
- root.CFrame = cf
- root.Velocity,root.RotVelocity=v30,v30
- elapsed=elapsed+wait(0.5)
- end
- workspace.Gravity = oldg
- end
- local function miniTP(cf)
- local cf0 = (cf-cf.p) + root.Position + Vector3.new(0,4,0)
- local diff = cf.p - root.Position
- local oldg = workspace.Gravity
- workspace.Gravity = 0
- for i=0,diff.magnitude,1.8 do
- if abort then break end
- root.CFrame = cf0 + diff.Unit * i
- root.Velocity,root.RotVelocity=v30,v30
- wait()
- end
- if not abort then root.CFrame = cf end
- workspace.Gravity = oldg
- end
- local function strToNum(str)
- return tonumber((tostring(str):gsub("%D", "")))
- end
- local function isBagFull()
- return player.PlayerGui.MainGui.CollectMoney.Visible and strToNum(player.PlayerGui.MainGui.CollectMoney.Money.Text)+2 > strToNum(player.PlayerGui.MainGui.CollectMoney.Maximum.Text)
- end
- local vault
- local function isVaultOpen()
- return (vault.Door.Closed.CFrame.lookVector - vault.Door.Hinge.CFrame.lookVector).magnitude > 0.1
- end
- local function copsTooClose(radius)
- local players = game:GetService("Teams").Police:GetPlayers()
- for i=1,#players do
- local p = players[i]
- if p.Character and p.Character:FindFirstChild("HumanoidRootPart") and p.Character:FindFirstChild("Humanoid") then
- local rootp = p.Character.HumanoidRootPart.Position
- if (vault.Door.Hinge.Position - rootp).magnitude < radius and p.Character.Humanoid.Health>0 and workspace:FindPartOnRayWithWhitelist(Ray.new(rootp,vault.TriggerDoor.Position - vault.Door.Hinge.CFrame.lookVector*3 - rootp),{vault.Decoration,vault.Parent.Parent.TopFloor})==nil then
- return true
- end
- end
- end
- return false
- end
- local function triggerSpec(part)
- if abort then return end
- --look at it then press key
- workspace.CurrentCamera.CameraType = "Watch"
- workspace.CurrentCamera.CameraSubject = part
- wait()
- workspace.CurrentCamera.CameraType = "Custom"
- workspace.CurrentCamera.CameraSubject = humanoid
- wait()
- VirtualInput:SendKeyEvent(true, "E", false, game)
- end
- local function waitWhile(t,exitFunc)
- local elapsed = 0
- local increment = 0.1
- t = (t == nil or t <= 0) and 0.001 or t
- increment = (increment > t) and t or increment
- while elapsed < t and abort == false and (exitFunc==nil or exitFunc(elapsed)) do
- elapsed = elapsed + wait(t-elapsed < increment and t-elapsed or increment)
- end
- return elapsed
- end
- local formerCF = CFrame.new()
- local function initRobbery(storeName)
- toggleCanAbort(true)
- --warning flash
- setStatus(storeName.." ready.")
- local col0 = main.BackgroundColor3
- local elapsed = 0
- while elapsed < settings.warnSeconds do
- for a=0,1,1/(30*.25) do
- main.BackgroundColor3 = col0:lerp(c3red,a)
- elapsed=elapsed+wait()
- end
- for a=0,1,1/(30*.25) do
- main.BackgroundColor3 = c3red:lerp(col0,a)
- elapsed=elapsed+wait()
- end
- end
- main.BackgroundColor3 = col0
- --some checks
- if humanoid==nil or humanoid.Health<1 then wait(5) end
- if abort or not settings.enabled then return true end
- exitVehicle()
- --jailbreak :^)
- if player.Team.Name=="Prisoner" then
- setStatus("Breaking out...")
- perfectTP(CFrame.new(-298+math.random()*10,18,1430))
- waitWhile(4,function() return player.Team.Name=="Prisoner" end)
- end
- formerCF = root.CFrame
- return abort or not settings.enabled
- end
- local function exitRobbery()
- abort = false --allows exit even if aborted
- setStatus("Escaping...")
- if settings.preferUnsafeEsc then
- perfectTP(formerCF)
- else
- perfectTP(CFrame.new(-298+math.random()*10,18,1430))
- end
- end
- --// rob funcs //
- local function robJewelry()
- local cancel = initRobbery("Jewelry")
- if not cancel then
- setStatus("TPing to jewelry...")
- --enter
- --if math.random(1,2)==1 then
- -- perfectTP(CFrame.new(142.17, 17.88, 1351.08))
- --else
- -- perfectTP(CFrame.new(89.7, 17.88, 1302.53)*CFrame.Angles(0,math.pi/-2,0))
- --end
- perfectTP(CFrame.new(142.17, 17.88, 1351.08))
- if settings.jewlAllowCrims and isJewlCalm then
- root.CFrame = CFrame.new(156.8, 17.6, 1329.8)
- waitWhile(5,function() return isJewlCalm end)
- end
- cancel = abort
- setStatus("Robbery started!")
- local broke = 0
- --get jewels
- local boxes = workspace.Jewelrys:GetChildren()[1].Boxes:GetChildren()
- table.sort(boxes,function(a,b) return a.Position.X > b.Position.X end)
- for i=1,#boxes do
- if abort or isJewlOpen==false or (broke>3 and isBagFull()) then
- break
- end
- local box = boxes[i]
- if box.Transparency < 0.9 then
- if box.Position.X < 120 and box.Position.Z > 1330 then
- miniTP(CFrame.new(box.Position+box.CFrame.lookVector*2.5+Vector3.new(0,0,-2.5),box.Position))
- elseif box.Position.Z < 1309 and box.Position.Z > 1304 then
- miniTP(CFrame.new(box.Position+box.CFrame.lookVector*2.5+Vector3.new(0,0,2.5),box.Position))
- else
- miniTP(CFrame.new(box.Position+box.CFrame.lookVector*2.5,box.Position))
- end
- waitWhile(0.1)
- root.Anchored = true
- for i=1,4 do --punch
- if punchSpec then
- punchSpec:Callback(true)
- elseif abort then
- break
- else
- keyclick("F")
- wait(0.5)
- end
- end
- broke=broke+1
- waitWhile(0.5)
- root.Anchored = false
- end
- end
- --escape
- setStatus("Selling...")
- perfectTP(CFrame.new(-298+math.random()*10,18,1430))
- waitWhile(0.5)
- perfectTP(CFrame.new(-522+math.random()*354,54.5,1509+math.random()*137))
- root.Anchored = true
- waitWhile(1)
- root.Anchored = false
- exitRobbery()
- if not cancel then
- isJewlOpen=false
- jewelryLbl.TextColor3 = Color3.new(1,1,1)
- setStatus("Jewelry success!")
- end
- end
- toggleCanAbort(false)
- wait(2)
- end
- local function robBank()
- local cancel = initRobbery("Bank")
- if not cancel then
- setStatus("TPing to bank...")
- --enter
- perfectTP(CFrame.new(23.6, 18.07, 853.5))
- waitWhile(2,function() return isBankCalm end)
- cancel = abort
- setStatus("Opening vault...")
- vault = workspace.Banks:GetChildren()[1].Layout:GetChildren()[1]
- --get in vault
- if not abort then
- local vaultcf = vault.Door.Hinge.CFrame
- if (vaultcf.p - vault.Money.CFrame.p).magnitude < 30 then
- if vault.Name=="TheMint" then
- perfectTP(vaultcf + vaultcf.lookVector*3 + vaultcf.rightVector*13.5)
- else
- perfectTP(vaultcf + vaultcf.lookVector*3 + vaultcf.rightVector*-5.5 + Vector3.new(0,3,0))
- end
- else
- if vault:FindFirstChild("Lasers") then
- for _,laser in ipairs(vault.Lasers:GetChildren()) do
- if laser.Name=="LaserTrack" then
- laser:Destroy()
- end
- end
- end
- perfectTP(vault.Money.CFrame)
- end
- local oldcf = vault.TriggerDoor.CFrame
- vault.TriggerDoor.CFrame = root.CFrame
- wait()
- vault.TriggerDoor.CFrame = oldcf
- end
- --wait until open
- waitWhile(300,function() return isBankOpen and isVaultOpen()==false end)
- waitWhile(3,function() return isBankOpen and (not (isVaultOpen() and copsTooClose(settings.bankRadius2))) end)
- setStatus("Robbery started!")
- --wait for bag to fill or player leaves
- waitWhile(80,function() return isBagFull()==false and isBankOpen and (not (isVaultOpen() and copsTooClose(settings.bankRadius2))) end)
- exitRobbery()
- if not cancel then
- isBankOpen=false
- bankLbl.TextColor3 = Color3.new(1,1,1)
- setStatus("Bank success!")
- end
- end
- toggleCanAbort(false)
- wait(2)
- end
- local function robBoxcar()
- local cancel = initRobbery("Train")
- if not cancel then
- local gold = current_boxcar.Model.Rob.Gold
- local trainFront = workspace.Trains.LocomotiveFront.Model.Front
- setStatus("TPing to train...")
- --enter
- perfectTP(root.CFrame+root.CFrame.lookVector*3)
- cancel = abort
- if current_boxcar.Parent then
- if specs then
- local trainDoorSpec,trainVaultSpec
- for i=1,#specs do
- local s = specs[i]
- if not s then
- elseif trainDoorSpec==nil and s.Name=="Open Door" and tostring(s.Part)=="RoofDoorClosed" and current_boxcar:IsAncestorOf(s.Part) then
- trainDoorSpec = s
- elseif trainVaultSpec==nil and s.Name=="Breach Vault" and current_boxcar:IsAncestorOf(s.Part) then
- trainVaultSpec = s
- end
- end
- if trainDoorSpec then
- trainDoorSpec:Callback(true)
- end
- wait()
- if trainVaultSpec then
- trainVaultSpec:Callback(true)
- end
- else
- setStatus("Opening door...")
- --open door
- stepconn = Stepped:Connect(function()
- root.CFrame = current_boxcar.Skeleton.RoofDoorClosed.CFrame + Vector3.new(0,-5,0)
- root.Velocity,root.RotVelocity=v30,v30
- end)
- waitWhile(0.45)
- triggerSpec(current_boxcar.Skeleton.RoofDoorClosed)
- waitWhile(7,function() return (current_boxcar.Skeleton.RoofDoor.Position-current_boxcar.Skeleton.RoofDoorClosed.Position).Magnitude < 1 end)
- stepconn:Disconnect()
- waitWhile()
- VirtualInput:SendKeyEvent(false, "E", false, game)
- setStatus("Opening vault...")
- --open vault
- stepconn = Stepped:Connect(function()
- root.CFrame = gold.CFrame
- root.Velocity,root.RotVelocity=v30,v30
- end)
- waitWhile(0.45)
- triggerSpec(current_boxcar.Skeleton.Vault.Part)
- waitWhile(7,function() return current_boxcar.Skeleton.Vault.Part.RotVelocity.Magnitude < .001 end)
- stepconn:Disconnect()
- waitWhile(0.2)
- VirtualInput:SendKeyEvent(false, "E", false, game)
- end
- setStatus("Robbery started!")
- --get gold
- stepconn = Stepped:Connect(function()
- root.CFrame = gold.CFrame
- root.Velocity,root.RotVelocity=v30,v30
- end)
- waitWhile(65,function() return isBagFull()==false and trainFront.Position.X > -1584 end)
- stepconn:Disconnect()
- --if trainFront.Position.X < -1200 and trainFront.Position.Z < 550 then
- -- boxcars={}
- --end
- end
- exitRobbery()
- if not cancel then
- current_boxcar = nil
- trainLbl.TextColor3 = Color3.new(1,1,1)
- setStatus("Train success!")
- end
- end
- toggleCanAbort(false)
- wait(2)
- end
- local function robMuseum()
- local cancel = initRobbery("Museum")
- if not cancel then
- setStatus("TPing to museum...")
- --enter
- perfectTP(CFrame.new(1067.8,102.8,1193.8))
- if abort then
- cancel = true
- else
- --collect artifacts
- setStatus("Robbery started!")
- local bag = player.PlayerGui.MainGui.MuseumBag.TextLabel
- bag.Text = "9".. bag.Text:sub(2)
- for i=1,#museumArray do
- local tpcf = museumArray[i][1]
- local part = museumArray[i][2]
- if part.Transparency < .99 then
- if abort or isMuseumOpen==false or bag.Text:sub(1,1) == bag.Text:sub(5,5) then
- break
- end
- if specs then
- for j=1,#specs do
- local s = specs[j]
- if s and s.Part == part then
- s:Callback(true)
- break
- end
- end
- else
- perfectTP(tpcf)
- triggerSpec(part)
- waitWhile(7,function() return part.Transparency < .99 end)
- VirtualInput:SendKeyEvent(false, "E", false, game)
- end
- waitWhile(0.1)
- end
- end
- --go back
- if settings.preferUnsafeEsc then
- perfectTP(formerCF)
- else
- perfectTP(CFrame.new(-298+math.random()*10,18,1430))
- end
- setStatus("Bypassing by waiting...")
- waitWhile(16)
- exitVehicle()
- formerCF = root.CFrame
- --tp to collector
- setStatus("Selling...")
- perfectTP(CFrame.new(1639,50,-1800))
- waitWhile(9,function() return player.PlayerGui.MainGui.MuseumBag.Visible end)
- end
- exitRobbery()
- if not cancel then
- isMuseumOpen=false
- museumLbl.TextColor3 = Color3.new(1,1,1)
- setStatus("Museum success!")
- end
- end
- toggleCanAbort(false)
- wait(2)
- end
- local function robSteamEngine()
- local cancel = initRobbery("Steam engine")
- if not cancel then
- --collect items
- setStatus("Robbery started!")
- local grabNum=0
- local bag = player.PlayerGui.MainGui.MuseumBag.TextLabel
- bag.Text = "9".. bag.Text:sub(2)
- repeat wait() until #briefcasesfolder:GetChildren() > 0
- for i,v in pairs(briefcasesfolder:GetChildren()) do
- if abort or grabNum > 3 then
- break
- end
- stepconn = Stepped:Connect(function()
- root.CFrame = workspace.Trains.PassengerArmor.Briefcase.CFrame
- root.Velocity,root.RotVelocity=v30,v30
- end)
- triggerSpec(workspace.Trains.PassengerArmor.Briefcase)
- waitWhile(7,function() return workspace.Trains.PassengerArmor.Briefcase.Transparency < .99 or workspace.Trains.PassengerArmor.Briefcase.Parent == nil or workspace.Trains.PassengerArmor.Briefcase.Transparency > .99 end)
- VirtualInput:SendKeyEvent(false, "E", false, game)
- stepconn:Disconnect()
- grabNum = grabNum + 1
- waitWhile(2.5)
- end
- if settings.preferUnsafeEsc then
- perfectTP(formerCF)
- else
- perfectTP(CFrame.new(-298+math.random()*10,18,1430))
- end
- setStatus("Bypassing by waiting...")
- waitWhile(16)
- exitVehicle()
- formerCF = root.CFrame
- --tp to collector
- setStatus("Selling...")
- perfectTP(CFrame.new(1639,50,-1800))
- waitWhile(9,function() return player.PlayerGui.MainGui.MuseumBag.Visible end)
- exitRobbery()
- if not cancel then
- isSteamEngineOpen=false
- trainLbl.TextColor3 = Color3.new(1,1,1)
- setStatus("Train success!")
- end
- end
- toggleCanAbort(false)
- wait(2)
- end
- local function robAirdrop()
- local cancel = initRobbery("Airdrop")
- if not cancel then
- local current_airdrop = airdrops[1]
- if current_airdrop and current_airdrop.Parent and current_airdrop:FindFirstChild("Briefcase") then
- local briefcase = current_airdrop.Briefcase
- --enter
- setStatus("TPing to airdrop...")
- noclip()
- root.Velocity,root.RotVelocity=v30,v30
- perfectTP(briefcase.CFrame+Vector3.new(0,-6,0))
- if abort then
- cancel = true
- elseif briefcase.Parent then
- --collect
- setStatus("Robbery started!")
- root.CFrame = briefcase.CFrame + Vector3.new(0,-6,0)
- root.Anchored = true
- if specs then
- waitWhile(0.1)
- for i=1,#specs do
- local s = specs[i]
- if s and s.Name and s.Name:lower()=="pick up briefcase" and current_airdrop:IsAncestorOf(s.Part) then
- s:Callback(true)
- break
- end
- end
- else
- triggerSpec(briefcase)
- waitWhile(14,function()
- root.CFrame = briefcase.CFrame + Vector3.new(0,-6,0)
- return briefcase.Parent ~= nil
- end)
- VirtualInput:SendKeyEvent(false, "E", false, game)
- end
- root.Anchored = false
- end
- yesclip()
- exitRobbery()
- end
- if not cancel then
- airdropTick = tick()
- setStatus("Airdrop success!")
- end
- end
- toggleCanAbort(false)
- wait(2)
- end
- --notification
- game:GetService("StarterGui"):SetCore("SendNotification",{Title="Auto-Rob by sirelKilla",Text=settingsModified and "Settings changed!" or ''})
- --// main loop //
- local waiti=0
- local idleTick=0
- while wait(0.5) and gui.Parent do
- if workspace.Trains:FindFirstChild("LocomotiveFront") then --avoid train tunnel
- local trainpos = workspace.Trains.LocomotiveFront.Model.Front.Position
- if trainpos.X < -1300 and trainpos.Z < 350 then
- current_boxcar=nil
- trainLbl.TextColor3 = Color3.new(1,1,1)
- end
- end --avoid train stop
- if (fireclickdetector or click_detector) and workspace.Switches.BranchBack.Rail.Transparency < .9 then
- (fireclickdetector or click_detector)(workspace.Switches.BranchBack.Lever.Click.ClickDetector,1)
- end --avoid afk
- if tick()-idleTick > 60 then
- idleTick=tick()
- game:GetService("VirtualUser"):CaptureController()
- game:GetService("VirtualUser"):ClickButton2(Vector2.new())
- end
- player.PlayerGui.MainGui.CollectMoney.Visible=false
- vehicleInfo.LastVehicleExit = 9e9
- if settings.enabled then
- if isMuseumOpen then
- robMuseum()
- elseif isJewlOpen then
- robJewelry()
- elseif #airdrops > 0 and tick()-airdropTick > 20 then
- robAirdrop()
- elseif isSteamEngineOpen then
- robSteamEngine()
- elseif current_boxcar then
- robBoxcar()
- elseif isBankOpen then
- robBank()
- else
- setStatus("Wait for stores to open".. string.rep('.',waiti%3+1))
- waiti=waiti+1
- end
- else
- setStatus("Disabled.")
- end
- end
Add Comment
Please, Sign In to add comment