Advertisement
Meliodas0_0

Untitled

Jun 28th, 2019
243
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 35.16 KB | None | 0 0
  1. local player = game:GetService("Players").LocalPlayer or game:GetService("Players"):GetPropertyChangedSignal("LocalPlayer"):Wait() or game:GetService("Players").LocalPlayer
  2. local stepconn,uptorso,humanoid
  3. local root = {}
  4. local v30=Vector3.new()
  5. local HOLD_E = false
  6. local abort = false
  7. local green,red=Color3.fromRGB(0,230,0),Color3.fromRGB(230,0,0)
  8. local settings = {enabled=true,jewlAllowCrims=false,preferLongTP=false,bankRadius2=19,preferUnsafeEsc=false,warnSeconds=1.5}
  9. local settingsModified = false
  10. if readfile then
  11. pcall(function()
  12. local new = game:GetService("HttpService"):JSONDecode(readfile("JBAR.txt"))
  13. --corruption?
  14. local doOverwrite=false
  15. for k,v in pairs(new) do
  16. if settings[k]==nil then
  17. doOverwrite=true
  18. new[k]=nil
  19. end
  20. end
  21. for k,v in pairs(settings) do
  22. if new[k]==nil then
  23. doOverwrite=true
  24. new[k]=v
  25. end
  26. end
  27. --use input
  28. if doOverwrite then
  29. settingsModified = true
  30. writefile("JBAR.txt",game:GetService("HttpService"):JSONEncode(new))
  31. end
  32. settings = new
  33. end)
  34. end
  35. --// handle character //
  36. local Stepped = game:GetService("RunService").Stepped
  37. local NCparts = {}
  38. local NCconn
  39. local NCfunc = function()
  40. for i=1,#NCparts do
  41. NCparts[i].CanCollide=false
  42. end
  43. end
  44. local function noclip()
  45. if not NCconn then
  46. NCconn = Stepped:Connect(NCfunc)
  47. end
  48. end
  49. local function yesclip()
  50. if NCconn then
  51. NCconn:Disconnect()
  52. NCconn = nil
  53. end
  54. end
  55. local lastRootCf
  56. local function onRootChanged()
  57. if (root.CFrame.p-Vector3.new(-177.3,19.6,1013.2)).magnitude < 1 then
  58. root.CFrame = lastRootCf
  59. end
  60. end
  61. local function newchar(char)
  62. if char then
  63. root = char:WaitForChild("HumanoidRootPart")
  64. root:GetPropertyChangedSignal("CFrame"):Connect(onRootChanged)
  65. uptorso = char:WaitForChild("UpperTorso")
  66. humanoid = char:WaitForChild("Humanoid")
  67. wait(0.2)
  68. NCparts = {}
  69. for _,v in ipairs(char:GetChildren()) do
  70. if v:IsA("BasePart") then
  71. NCparts[#NCparts+1]=v
  72. end
  73. end
  74. end
  75. end
  76. newchar(player.Character)
  77. player.CharacterAdded:Connect(newchar)
  78. Stepped:Connect(function()
  79. lastRootCf = root.CFrame
  80. end)
  81. --// interface //
  82. Create = function(class,parent,props)
  83. local new = Instance.new(class)
  84. for k,v in next,props do
  85. new[k]=v
  86. end
  87. new.Parent = parent
  88. return new
  89. end
  90.  
  91. gui=Create("ScreenGui",game.CoreGui,{Name="AutoRob", ResetOnSpawn=false , Visible=false , ZIndexBehavior="Sibling"})
  92. 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),Visible=false})
  93. homeFrame=Create("Frame",main,{Name="homeFrame", BackgroundTransparency=1, Size=UDim2.new(1,-30,1,-55), Position=UDim2.new(0,15,0,40)})
  94. 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,
  95. BackgroundColor3=Color3.new(0.502,0.498,0.506), AutoButtonColor=false})
  96. Shade=Create("Frame",AbortBtn,{Name="Shade", BackgroundTransparency=0.89999997615814, Size=UDim2.new(1,0,0.5,0), Position=UDim2.new(0,0,0.5,0), BackgroundColor3=Color3.new(), Visible=false})
  97. Status=Create("TextLabel",homeFrame,{Name="Status", Size=UDim2.new(1,0,0.27,0), Text="Status: Loading...", TextSize=15, TextXAlignment="Left", Font="Code",
  98. BackgroundTransparency=0.25, Position=UDim2.new(0,0,0.73,0), BackgroundColor3=Color3.new(1,1,1)})
  99. 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,
  100. BackgroundColor3=settings.enabled and green or red})
  101. Shade_2=Create("Frame",ToggleBtn,{Name="Shade", BackgroundTransparency=0.89999997615814, Size=UDim2.new(1,0,0.5,0), Position=UDim2.new(0,0,0.5,0), BackgroundColor3=Color3.new()})
  102. 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)})
  103. jewelryLbl=Create("TextLabel",availabels,{Name="jewelryLbl", Size=UDim2.new(0.2,0,1,0), Text="Jewel", TextSize=18, Font="SourceSansLight", BackgroundTransparency=1,
  104. Position=UDim2.new(0.2,0,0,0), TextColor3=Color3.new(1,1,1), BackgroundColor3=Color3.new(1,1,1)})
  105. trainLbl=Create("TextLabel",availabels,{Name="trainLbl", Size=UDim2.new(0.2,0,1,0), Text="Train", TextSize=18, Font="SourceSansLight", BackgroundTransparency=1,
  106. Position=UDim2.new(0.6,0,0,0), TextColor3=Color3.new(1,1,1), BackgroundColor3=Color3.new(1,1,1)})
  107. bankLbl=Create("TextLabel",availabels,{Name="bankLbl", Size=UDim2.new(0.2,0,1,0), Text="Bank", TextSize=18, Font="SourceSansLight", BackgroundTransparency=1,
  108. Position=UDim2.new(0.8,0,0,0), TextColor3=Color3.new(1,1,1), BackgroundColor3=Color3.new(1,1,1)})
  109. airdropLbl=Create("TextLabel",availabels,{Name="airdropLbl", Size=UDim2.new(0.2,0,1,0), Text="Airdrop", TextSize=18, Font="SourceSansLight", BackgroundTransparency=1,
  110. Position=UDim2.new(0.4,0,0,0), TextColor3=Color3.new(1,1,1), BackgroundColor3=Color3.new(1,1,1)})
  111. museumLbl=Create("TextLabel",availabels,{Name="museumLbl", Size=UDim2.new(0.2,0,1,0), Text="Museum", TextSize=18, Font="SourceSansLight", BackgroundTransparency=1,
  112. TextColor3=Color3.new(1,1,1), BackgroundColor3=Color3.new(1,1,1)})
  113. CloseBtn=Create("TextButton",main,{Name="CloseBtn", TextWrapped=true, TextStrokeTransparency=0.69999998807907, Size=UDim2.new(0,25,0,25), TextColor3=Color3.new(0.9,0.9,0.9), Text="X",
  114. BackgroundTransparency=1, Font="GothamBold", Position=UDim2.new(1,-22,0,0), TextScaled=true})
  115. 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})
  116. setsframe=Create("Frame",main,{Name="setsframe", BackgroundTransparency=0.019999999552965, Size=UDim2.new(1,-10,0.8,-10), Position=UDim2.new(-1,5,0.2,5), BorderSizePixel=0, BackgroundColor3=Color3.new(1,1,1)})
  117. Frame=Create("Frame",setsframe,{BackgroundTransparency=1, Size=UDim2.new(1,0,0.25,0)})
  118. 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),
  119. TextScaled=true, BackgroundColor3=Color3.new(1,1,1)})
  120. 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})
  121. Frame_2=Create("Frame",setsframe,{BackgroundTransparency=0.93000000715256, Size=UDim2.new(1,0,0.25,0), Position=UDim2.new(0,0,0.25,0), BackgroundColor3=Color3.new()})
  122. 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,
  123. BackgroundColor3=Color3.new(1,1,1)})
  124. 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})
  125. Frame_3=Create("Frame",setsframe,{BackgroundTransparency=1, Size=UDim2.new(1,0,0.25,0), Position=UDim2.new(0,0,0.5,0)})
  126. 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,
  127. BackgroundColor3=Color3.new(1,1,1)})
  128. 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})
  129. Frame_4=Create("Frame",setsframe,{BackgroundTransparency=0.93000000715256, Size=UDim2.new(1,0,0.25,0), Position=UDim2.new(0,0,0.75,0), BackgroundColor3=Color3.new()})
  130. 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,
  131. BackgroundColor3=Color3.new(1,1,1)})
  132. 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})
  133. Title=Create("TextLabel",main,{Name="Title", TextWrapped=true, Size=UDim2.new(0.5,0,0,20), Text="Jailbreak Auto-Rob", TextSize=18, Font="Highway",
  134. BackgroundTransparency=1, Position=UDim2.new(0.24,0,0,3), TextColor3=Color3.new(0.9,0.9,0.9), BackgroundColor3=Color3.new(1,1,1)})
  135. 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),
  136. TextSize=20})
  137.  
  138. --gui code
  139. CloseBtn.MouseButton1Click:Connect(function() gui:Destroy() abort=true end)
  140. CloseBtn.MouseEnter:Connect(function() CloseBtn.TextColor3=red end)
  141. CloseBtn.MouseLeave:Connect(function() CloseBtn.TextColor3=Color3.new(0.9,0.9,0.9) end)
  142. local function toggleCanAbort(bool)
  143. AbortBtn.AutoButtonColor=bool
  144. AbortBtn.BackgroundColor3 = bool and Color3.new(0.353,0.557,0.914) or Color3.new(0.502,0.498,0.506)
  145. Shade.Visible = bool
  146. abort=false
  147. end
  148. AbortBtn.MouseButton1Click:Connect(function()
  149. if AbortBtn.AutoButtonColor then
  150. if stepconn then stepconn:Disconnect() end
  151. local hit,p = workspace:FindPartOnRay(Ray.new(player.Character.Head.Position+Vector3.new(0,10,0),Vector3.new(0,20,0)))
  152. if hit then
  153. player.Character:MoveTo(p)
  154. else
  155. local angle = math.random()*math.pi*2
  156. local door = workspace.Apartments.Skyscraper1.ExitDoor.Touch
  157. local oldcf = door.CFrame
  158. door.CFrame = root.CFrame
  159. wait()
  160. door.CFrame = oldcf
  161. root.CFrame = root.CFrame+Vector3.new(80*math.cos(angle),math.max(0,200-root.CFrame.y),80*math.sin(angle))
  162. end
  163. toggleCanAbort(false)
  164. abort=true
  165. AbortBtn.Text = "Aborted."
  166. wait(2.8)
  167. AbortBtn.Text = "ABORT"
  168. end
  169. end)
  170. local function setStatus(txt)
  171. Status.Text = "Status: "..txt
  172. end
  173. local tweenCogOut = game:GetService("TweenService"):Create(CogBtn,TweenInfo.new(0.25),{Rotation=135})
  174. local tweenCogIn = game:GetService("TweenService"):Create(CogBtn,TweenInfo.new(0.25),{Rotation=0})
  175. local cogOut = false
  176. CogBtn.MouseButton1Click:Connect(function()
  177. cogOut = not cogOut
  178. if cogOut then
  179. setsframe:TweenPosition(UDim2.new(0,5,0.2,5),nil,"Quart",0.3,true)
  180. homeFrame:TweenPosition(UDim2.new(1,15,0,40),nil,"Quart",0.3,true)
  181. if writefile then SaveSetsBtn:TweenPosition(UDim2.new(0,30,0,2),nil,"Quart",0.3,true) end
  182. tweenCogOut:Play()
  183. else
  184. setsframe:TweenPosition(UDim2.new(-1,5,0.2,5),nil,"Quart",0.3,true)
  185. homeFrame:TweenPosition(UDim2.new(0,15,0,40),nil,"Quart",0.3,true)
  186. SaveSetsBtn:TweenPosition(UDim2.new(0,30,0,-25),nil,"Quart",0.3,true)
  187. tweenCogIn:Play()
  188. end
  189. end)
  190. local bankBoxOld=BankRadiusBox.Text
  191. BankRadiusBox:GetPropertyChangedSignal("Text"):Connect(function()
  192. BankRadiusBox.Text=BankRadiusBox.Text:sub(1,4)
  193. local num = tonumber(BankRadiusBox.Text)
  194. if num then
  195. if num>99 then
  196. BankRadiusBox.Text = '99'
  197. end
  198. elseif BankRadiusBox.Text~='' then
  199. BankRadiusBox.Text = bankBoxOld
  200. end
  201. bankBoxOld = BankRadiusBox.Text
  202. end)
  203. BankRadiusBox.FocusLost:Connect(function()
  204. if tonumber(BankRadiusBox.Text) then
  205. settings.bankRadius2=tonumber(BankRadiusBox.Text)
  206. end
  207. BankRadiusBox.Text=tostring(settings.bankRadius2)
  208. end)
  209. JewlSetBtn.MouseButton1Click:Connect(function()
  210. settings.jewlAllowCrims = not settings.jewlAllowCrims
  211. JewlSetBtn.Text = settings.jewlAllowCrims and "X" or ""
  212. end)
  213. WarnSetBtn.MouseButton1Click:Connect(function()
  214. settings.warnSeconds = settings.warnSeconds>1.51 and 1.5 or 3
  215. WarnSetBtn.Text = settings.warnSeconds>1.51 and "X" or ""
  216. end)
  217. EscSetBtn.MouseButton1Click:Connect(function()
  218. settings.preferUnsafeEsc = not settings.preferUnsafeEsc
  219. EscSetBtn.Text = settings.preferUnsafeEsc and "X" or ""
  220. end)
  221. SaveSetsBtn.MouseButton1Click:Connect(function()
  222. if writefile and SaveSetsBtn.Style.Name=="RobloxRoundDefaultButton" then
  223. SaveSetsBtn.Style="RobloxRoundButton"
  224. writefile("JBAR.txt",game:GetService("HttpService"):JSONEncode(settings))
  225. SaveSetsBtn.Text="Saved."
  226. wait(1)
  227. SaveSetsBtn.Text="Save"
  228. SaveSetsBtn.Style="RobloxRoundDefaultButton"
  229. end
  230. end)
  231. ToggleBtn.MouseButton1Click:Connect(function()
  232. settings.enabled = not settings.enabled
  233. ToggleBtn.BackgroundColor3 = settings.enabled and green or red
  234. end)
  235. local function warnFlash(s)
  236. setStatus(s.." ready.")
  237. local col0 = main.BackgroundColor3
  238. local elapsed = 0
  239. while elapsed < settings.warnSeconds do
  240. for a=0,1,1/(30*.25) do
  241. main.BackgroundColor3 = col0:lerp(red,a)
  242. elapsed=elapsed+wait()
  243. end
  244. for a=0,1,1/(30*.25) do
  245. main.BackgroundColor3 = red:lerp(col0,a)
  246. elapsed=elapsed+wait()
  247. end
  248. end
  249. main.BackgroundColor3 = col0
  250. end
  251. --// vitals //
  252. player:WaitForChild("PlayerScripts"):WaitForChild("LocalScript")
  253. wait(0.5)
  254. wait(5 - workspace.DistributedGameTime)
  255. local oldWTSP = workspace.CurrentCamera.WorldToScreenPoint
  256. local MT = getrawmetatable(game)
  257. if setreadonly then
  258. setreadonly(MT,false)
  259. elseif make_writeable then
  260. make_writeable(MT)
  261. end
  262. local old__namecall = MT.__namecall
  263. function MT:__namecall(...)
  264. local args = {...}
  265. local m = args[#args]
  266. if m=="WorldToScreenPoint" and self.ClassName=="Camera" then
  267. local ret = oldWTSP(self,...)
  268. return ret,true
  269. elseif m=="FindPartOnRay" and args[1].Origin==uptorso.Position and args[1].Direction.Y==-8 then
  270. return nil, args[1].Origin+args[1].Direction, v30, Enum.Material.Air
  271. elseif m=="ChangeState" and args[1].Name=="FallingDown" then
  272. workspace.CurrentCamera.CameraSubject = humanoid
  273. for _,e in next, Enum.HumanoidStateType:GetEnumItems() do
  274. if e ~= Enum.HumanoidStateType.None and e ~= Enum.HumanoidStateType.Dead then
  275. humanoid:SetStateEnabled(e, true)
  276. end
  277. end
  278. return wait(9e9)
  279. end
  280. return old__namecall(self,...)
  281. end
  282. getupvalues = getupvalues or debug.getupvalues
  283. local punchSpec, specs
  284. if (getreg or debug.getregistry) and getupvalues then
  285. local reg = (getreg or debug.getregistry)()
  286. for a=1,#reg do
  287. local f = reg[a]
  288. if type(f)=="function" then
  289. for _,t in next,getupvalues(f) do
  290. if type(t)=="table" then
  291. if specs==nil and t.Specs and t.Frame and #t==0 then
  292. specs = t.Specs
  293. elseif punchSpec==nil and #t==3 then
  294. for b=1,3 do
  295. if type(t[b])=="table" and t[b].Name=="Punch" then
  296. punchSpec = t[b]
  297. if (getconsts or debug.getconstants) then
  298. for c,v in next,(getconsts or debug.getconstants)(punchSpec.Callback) do
  299. if v == 0.5 then
  300. (setconst or setconstant or debug.setconstant)(punchSpec.Callback,c,0)
  301. end
  302. end
  303. end
  304. end
  305. end
  306. end
  307. end
  308. end
  309. end
  310. if specs and punchSpec then
  311. break
  312. end
  313. end
  314. end
  315. --// misc code //
  316. local windowFocused = false
  317. game:GetService("UserInputService").WindowFocused:Connect(function() windowFocused=true end)
  318. game:GetService("UserInputService").WindowFocusReleased:Connect(function() windowFocused=false end)
  319. spawn(function()
  320. game:GetService("UserInputService").InputBegan:Wait()
  321. windowFocused=true
  322. end)
  323. for _,part in ipairs(workspace.Buildings:GetChildren()) do
  324. if (part.Position-Vector3.new(-302.6,30.3,1431.9)).magnitude < 1 then
  325. part.CanCollide=false
  326. end
  327. end
  328. for _,part in ipairs(workspace.Jewelrys:GetChildren()[1].Building:GetChildren()) do
  329. if part.Name=="Part" and (part.Position-Vector3.new(157.8,63.4,1336.6)).magnitude < 1 then
  330. part.CanCollide = false
  331. end
  332. end
  333. 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},
  334. {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},
  335. {CFrame.new(1038.8,101.7,1238.7),workspace.Museum.EgyptionCase.Mask},{CFrame.new(1105.3,101.7,1151),workspace.Museum.JewelCase.Jewel} }
  336. --// subroutines //
  337. local function keyclick(num)
  338. if windowFocused and keypress and keyrelease then
  339. keypress(num)
  340. wait()
  341. keyrelease(num)
  342. end
  343. end
  344. local function exitVehicle()
  345. if humanoid.Sit then
  346. keyclick(0x20)
  347. wait(0.07)
  348. humanoid.Jump=true
  349. wait(0.3)
  350. end
  351. end
  352. local function perfectTP(cf)
  353. local oldg = workspace.Gravity
  354. workspace.Gravity = 0
  355. local door = workspace.Apartments.Skyscraper1.ExitDoor.Touch
  356. local oldcf = door.CFrame
  357. local elapsed = 0
  358. while (root.Position-cf.p).magnitude > 14 and elapsed < 9 and not abort do
  359. door.CFrame = root.CFrame
  360. elapsed=elapsed+wait()
  361. door.CFrame = oldcf
  362. root.CFrame = cf
  363. root.Velocity,root.RotVelocity=v30,v30
  364. elapsed=elapsed+wait(0.5)
  365. end
  366. workspace.Gravity = oldg
  367. end
  368. local function miniTP(cf)
  369. local cf0 = (cf-cf.p) + root.Position + Vector3.new(0,4,0)
  370. local diff = cf.p - root.Position
  371. local oldg = workspace.Gravity
  372. workspace.Gravity = 0
  373. for i=0,diff.magnitude,1.8 do
  374. if abort then break end
  375. root.CFrame = cf0 + diff.Unit * i
  376. root.Velocity,root.RotVelocity=v30,v30
  377. wait()
  378. end
  379. if not abort then root.CFrame = cf end
  380. workspace.Gravity = oldg
  381. end
  382. local function strToNum(str)
  383. return tonumber((tostring(str):gsub("%D", "")))
  384. end
  385. local function isBagFull()
  386. return player.PlayerGui.MainGui.CollectMoney.Visible and strToNum(player.PlayerGui.MainGui.CollectMoney.Money.Text)+2 > strToNum(player.PlayerGui.MainGui.CollectMoney.Maximum.Text)
  387. end
  388. local vault
  389. local function isVaultOpen()
  390. return (vault.Door.Closed.CFrame.lookVector - vault.Door.Hinge.CFrame.lookVector).magnitude > 0.1
  391. end
  392. local function copsTooClose(radius)
  393. local players = game:GetService("Teams").Police:GetPlayers()
  394. for i=1,#players do
  395. local p = players[i]
  396. if p.Character and p.Character:FindFirstChild("HumanoidRootPart") and p.Character:FindFirstChild("Humanoid") then
  397. local rootp = p.Character.HumanoidRootPart.Position
  398. 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
  399. return true
  400. end
  401. end
  402. end
  403. return false
  404. end
  405. local function waitWhile(t,exitFunc)
  406. local elapsed = 0
  407. local increment = 0.1
  408. t = (t == nil or t <= 0) and 0.001 or t
  409. increment = (increment > t) and t or increment
  410. while elapsed < t and abort == false and (exitFunc==nil or exitFunc(elapsed)) do
  411. elapsed = elapsed + wait(t-elapsed < increment and t-elapsed or increment)
  412. end
  413. return elapsed
  414. end
  415. local function jailbreak()
  416. if player.Team.Name=="Prisoner" then
  417. --jailbreak :^)
  418. setStatus("Breaking out...")
  419. perfectTP(CFrame.new(-298+math.random()*10,18,1430))
  420. waitWhile(4,function() return player.Team.Name=="Prisoner" end)
  421. end
  422. end
  423. --// entity status //
  424. local isSteamEngineOpen = workspace.Trains:FindFirstChild("SteamEngine")~=nil
  425. local current_boxcar = workspace.Trains:FindFirstChild("BoxCar")
  426. local temp_boxcar = current_boxcar or {} --bugfix for multiple boxcar attempts
  427. workspace.Trains.ChildAdded:Connect(function(child)
  428. wait(math.random())
  429. if child.Name=="SteamEngine" then
  430. isSteamEngineOpen = true
  431. elseif child.Name=="BoxCar" and current_boxcar==nil and temp_boxcar.Parent==nil then
  432. temp_boxcar = child
  433. wait(24 + math.random()*53) --confuse cops
  434. if child.Parent and current_boxcar==nil then
  435. current_boxcar = child
  436. end
  437. end
  438. trainLbl.TextColor3 = (current_boxcar or isSteamEngineOpen) and green or Color3.new(1,1,1)
  439. end)
  440. workspace.Trains.ChildRemoved:Connect(function(child)
  441. if current_boxcar == child then
  442. current_boxcar = nil
  443. elseif child.Name=="SteamEngine" then
  444. isSteamEngineOpen = false
  445. end
  446. trainLbl.TextColor3 = (current_boxcar or isSteamEngineOpen) and green or Color3.new(1,1,1)
  447. end)
  448. trainLbl.TextColor3 = (current_boxcar or isSteamEngineOpen) and green or Color3.new(1,1,1)
  449. local airdrops = {}
  450. local function checkNewDrop(child)
  451. local briefcase = child:WaitForChild("Briefcase",2)
  452. if briefcase then
  453. local e=0
  454. while true do
  455. e=e+wait(0.25)
  456. local hitpart = workspace:FindPartOnRayWithIgnoreList(Ray.new(briefcase.Position,Vector3.new(0,-17,0)),{child},false,true)
  457. if e>25 or (hitpart and hitpart.CanCollide) or child:FindFirstChild("Parachute")==nil then
  458. break
  459. end
  460. end
  461. if child.Parent and briefcase.Parent then
  462. airdrops[#airdrops+1]=child
  463. airdropLbl.TextColor3 = green
  464. end
  465. end
  466. end
  467. for _,child in ipairs(workspace:GetChildren()) do
  468. if child.Name=="Drop" and child.ClassName=="Model" then
  469. spawn(function() checkNewDrop(child) end)
  470. end
  471. end
  472. workspace.ChildAdded:Connect(function(child)
  473. if child.Name=="Drop" and child.ClassName=="Model" then
  474. checkNewDrop(child)
  475. end
  476. end)
  477. workspace.ChildRemoved:Connect(function(child)
  478. if child.Name=="Drop" and child.ClassName=="Model" then
  479. for i=1,#airdrops do
  480. if airdrops[i]==child then
  481. table.remove(airdrops,i)
  482. airdropLbl.TextColor3 = #airdrops>0 and green or Color3.new(1,1,1)
  483. break
  484. end
  485. end
  486. end
  487. end)
  488. local bankSign = workspace.Banks:GetChildren()[1].Extra.Sign.Decal
  489. local jewlSign = workspace.Jewelrys:GetChildren()[1].Extra.Sign.Decal
  490. local museumPart = workspace.Museum.Roof.Hole.Part
  491. local isBankOpen = bankSign.Transparency>0.01
  492. local isJewlOpen = jewlSign.Transparency>0.01
  493. local isMuseumOpen = not museumPart.CanCollide
  494. local isBankCalm = #workspace.Ringers.Bank:GetChildren()==0
  495. local isJewlCalm = #workspace.Ringers.Jewelry:GetChildren()==0
  496. bankSign:GetPropertyChangedSignal("Transparency"):Connect(function()
  497. wait()
  498. isBankOpen = bankSign.Transparency>0.01
  499. bankLbl.TextColor3 = isBankOpen and green or Color3.new(1,1,1)
  500. if not isBankOpen then
  501. isBankCalm=true
  502. end
  503. end)
  504. jewlSign:GetPropertyChangedSignal("Transparency"):Connect(function()
  505. wait()
  506. isJewlOpen = jewlSign.Transparency>0.01
  507. jewelryLbl.TextColor3 = isJewlOpen and green or Color3.new(1,1,1)
  508. if not isJewlOpen then
  509. isJewlCalm=true
  510. end
  511. end)
  512. museumPart:GetPropertyChangedSignal("CanCollide"):Connect(function()
  513. wait()
  514. isMuseumOpen = not museumPart.CanCollide
  515. museumLbl.TextColor3 = isMuseumOpen and green or Color3.new(1,1,1)
  516. end)
  517. bankLbl.TextColor3 = isBankOpen and green or Color3.new(1,1,1)
  518. jewelryLbl.TextColor3 = isJewlOpen and green or Color3.new(1,1,1)
  519. museumLbl.TextColor3 = isMuseumOpen and green or Color3.new(1,1,1)
  520. workspace.Ringers.Bank.ChildAdded:Connect(function() isBankCalm=false end)
  521. workspace.Ringers.Jewelry.ChildAdded:Connect(function() isJewlCalm=false end)
  522. --// rob funcs //
  523. local function robJewelry()
  524. toggleCanAbort(true)
  525. warnFlash("Jewelry")
  526. if humanoid==nil or humanoid.Health<1 then wait(5) end
  527. if abort or not settings.enabled then return true end
  528. exitVehicle()
  529. jailbreak()
  530. local formerCF = root.CFrame
  531. setStatus("TPing to jewelry...")
  532. --enter
  533. --if math.random(1,2)==1 then
  534. -- perfectTP(CFrame.new(142.17, 17.88, 1351.08))
  535. --else
  536. -- perfectTP(CFrame.new(89.7, 17.88, 1302.53)*CFrame.Angles(0,math.pi/-2,0))
  537. --end
  538. perfectTP(CFrame.new(142.17, 17.88, 1351.08))
  539. if settings.jewlAllowCrims and isJewlCalm then
  540. root.CFrame = CFrame.new(156.8, 17.6, 1329.8)
  541. waitWhile(5,function() return isJewlCalm end)
  542. end
  543. if abort then return true end
  544. setStatus("Robbery started!")
  545. local broke = 0
  546. --get jewels
  547. local boxes = workspace.Jewelrys:GetChildren()[1].Boxes:GetChildren()
  548. table.sort(boxes,function(a,b) return a.Position.X > b.Position.X end)
  549. for i=1,#boxes do
  550. if abort or isJewlOpen==false or (broke>3 and isBagFull()) then
  551. break
  552. end
  553. local box = boxes[i]
  554. if box.Transparency < 0.9 then
  555. if box.Position.X < 120 and box.Position.Z > 1330 then
  556. miniTP(CFrame.new(box.Position+box.CFrame.lookVector*2.5+Vector3.new(0,0,-2.5),box.Position))
  557. elseif box.Position.Z < 1309 and box.Position.Z > 1304 then
  558. miniTP(CFrame.new(box.Position+box.CFrame.lookVector*2.5+Vector3.new(0,0,2.5),box.Position))
  559. else
  560. miniTP(CFrame.new(box.Position+box.CFrame.lookVector*2.5,box.Position))
  561. end
  562. waitWhile(0.1)
  563. for i=1,4 do --punch
  564. if punchSpec then
  565. punchSpec:Callback(true)
  566. elseif windowFocused then
  567. keyclick(0x46)
  568. wait(0.5)
  569. end
  570. end
  571. broke=broke+1
  572. root.Anchored = true
  573. waitWhile(0.5)
  574. root.Anchored = false
  575. end
  576. end
  577. --escape
  578. perfectTP(CFrame.new(-298+math.random()*10,18,1430))
  579. waitWhile(0.5)
  580. setStatus("Escaping...")
  581. perfectTP(CFrame.new(-522+math.random()*354,54.5,1509+math.random()*137))
  582. root.Anchored = true
  583. waitWhile(1)
  584. root.Anchored = false
  585. if settings.preferUnsafeEsc then
  586. perfectTP(formerCF)
  587. else
  588. perfectTP(CFrame.new(-298+math.random()*10,18,1430))
  589. end
  590. end
  591. local function robBank()
  592. toggleCanAbort(true)
  593. warnFlash("Bank")
  594. if humanoid==nil or humanoid.Health<1 then wait(5) end
  595. if abort or not settings.enabled then return true end
  596. exitVehicle()
  597. jailbreak()
  598. local formerCF = root.CFrame
  599. setStatus("TPing to bank...")
  600. --enter
  601. perfectTP(CFrame.new(23.6, 18.07, 853.5))
  602. waitWhile(2,function() return isBankCalm end)
  603. if abort then return true end
  604. setStatus("Opening vault...")
  605. vault = workspace.Banks:GetChildren()[1].Layout:GetChildren()[1]
  606. local vaultcf = vault.Door.Hinge.CFrame
  607. perfectTP(vaultcf + vaultcf.lookVector*-3 + vaultcf.rightVector*6)
  608. if abort then return end
  609. --get in vault
  610. if (vaultcf.p - vault.Money.CFrame.p).magnitude < 30 then
  611. if vault.Name=="TheMint" then
  612. root.CFrame = vaultcf + vaultcf.lookVector*3 + vaultcf.rightVector*13.5
  613. else
  614. root.CFrame = vaultcf + vaultcf.lookVector*3 + vaultcf.rightVector*-5.5 + Vector3.new(0,3,0)
  615. end
  616. else
  617. if vault:FindFirstChild("Lasers") then
  618. for _,laser in ipairs(vault.Lasers:GetChildren()) do
  619. if laser.Name=="LaserTrack" then
  620. laser:Destroy()
  621. end
  622. end
  623. end
  624. root.CFrame = vault.Money.CFrame
  625. end
  626. --wait until open
  627. waitWhile(300,function() return isBankOpen and isVaultOpen()==false end)
  628. waitWhile(3,function() return isBankOpen and (not (isVaultOpen() and copsTooClose(settings.bankRadius2))) end)
  629. setStatus("Robbery started!")
  630. --wait for bag to fill or player leaves
  631. waitWhile(80,function() return isBagFull()==false and isBankOpen and (not (isVaultOpen() and copsTooClose(settings.bankRadius2))) end)
  632. setStatus("Escaping...")
  633. --escape
  634. if settings.preferUnsafeEsc then
  635. perfectTP(formerCF)
  636. else
  637. perfectTP(CFrame.new(-298+math.random()*10,18,1430))
  638. end
  639. end
  640. local function robBoxcar()
  641. toggleCanAbort(true)
  642. warnFlash("Train")
  643. if humanoid==nil or humanoid.Health<1 then wait(5) end
  644. if abort or not settings.enabled then return true end
  645. local gold = current_boxcar.Model.Rob.Gold
  646. local trainFront = workspace.Trains.LocomotiveFront.Model.Front
  647. exitVehicle()
  648. jailbreak()
  649. local formerCF = root.CFrame
  650. setStatus("TPing to train...")
  651. --enter
  652. perfectTP(root.CFrame)
  653. if abort then return true end
  654. if current_boxcar.Parent then
  655. if specs then
  656. local trainDoorSpec,trainVaultSpec
  657. for i=1,#specs do
  658. local s = specs[i]
  659. if not s then
  660. elseif trainDoorSpec==nil and s.Name=="Open Door" and tostring(s.Part)=="RoofDoorClosed" and current_boxcar:IsAncestorOf(s.Part) then
  661. trainDoorSpec = s
  662. elseif trainVaultSpec==nil and s.Name=="Breach Vault" and current_boxcar:IsAncestorOf(s.Part) then
  663. trainVaultSpec = s
  664. end
  665. end
  666. if trainDoorSpec then
  667. trainDoorSpec:Callback(true)
  668. end
  669. if trainVaultSpec then
  670. trainVaultSpec:Callback(true)
  671. end
  672. else
  673. setStatus("Opening door...")
  674. --open door
  675. stepconn = Stepped:Connect(function()
  676. root.CFrame = current_boxcar.Skeleton.RoofDoorClosed.CFrame + Vector3.new(0,-5,0)
  677. root.Velocity,root.RotVelocity=v30,v30
  678. end)
  679. waitWhile(0.5)
  680. HOLD_E = true
  681. waitWhile(9,function() return (current_boxcar.Skeleton.RoofDoor.Position-current_boxcar.Skeleton.RoofDoorClosed.Position).Magnitude < 1 end)
  682. stepconn:Disconnect()
  683. waitWhile()
  684. HOLD_E = false
  685. setStatus("Opening vault...")
  686. --open vault
  687. stepconn = Stepped:Connect(function()
  688. root.CFrame = gold.CFrame+(gold.CFrame.lookVector*4.5)
  689. root.Velocity,root.RotVelocity=v30,v30
  690. end)
  691. waitWhile(0.5)
  692. HOLD_E = true
  693. waitWhile(9,function() return current_boxcar.Skeleton.Vault.Part.RotVelocity.Magnitude < .001 end)
  694. stepconn:Disconnect()
  695. waitWhile(0.2)
  696. HOLD_E = false
  697. end
  698. setStatus("Robbery started!")
  699. --get gold
  700. stepconn = Stepped:Connect(function()
  701. root.CFrame = gold.CFrame
  702. root.Velocity,root.RotVelocity=v30,v30
  703. end)
  704. waitWhile(65,function() return isBagFull()==false and trainFront.Position.X > -1584 end)
  705. stepconn:Disconnect()
  706. --if trainFront.Position.X < -1200 and trainFront.Position.Z < 550 then
  707. -- boxcars={}
  708. --end
  709. end
  710. setStatus("Escaping...")
  711. --escape
  712. if settings.preferUnsafeEsc then
  713. perfectTP(formerCF)
  714. else
  715. perfectTP(CFrame.new(-298+math.random()*10,18,1430))
  716. end
  717. end
  718. local function robMuseum()
  719. toggleCanAbort(true)
  720. warnFlash("Museum")
  721. if humanoid==nil or humanoid.Health<1 then wait(5) end
  722. if abort or not settings.enabled then return true end
  723. exitVehicle()
  724. jailbreak()
  725. local formerCF = root.CFrame
  726. setStatus("TPing to museum...")
  727. --enter
  728. perfectTP(CFrame.new(1067.8,102.8,1193.8))
  729. if abort then return true end
  730. --collect artifacts
  731. setStatus("Robbery started!")
  732. if specs then
  733. for i=1,#specs do
  734. local s = specs[i]
  735. if s and s.Name and s.Name:sub(1,5)=="Grab " and workspace.Museum:IsAncestorOf(s.Part) then
  736. s:Callback(true)
  737. wait()
  738. end
  739. end
  740. else
  741. local bag = player.PlayerGui.MainGui.MuseumBag.TextLabel
  742. bag.Text = "9".. bag.Text:sub(2)
  743. for i=1,#museumArray do
  744. local tpcf = museumArray[i][1]
  745. local part = museumArray[i][2]
  746. if part.Transparency < .99 then
  747. if abort or isMuseumOpen==false or bag.Text:sub(1,1) == bag.Text:sub(5,5) then
  748. break
  749. end
  750. perfectTP(tpcf)
  751. HOLD_E = true
  752. waitWhile(9,function() return part.Transparency < .99 end)
  753. HOLD_E = false
  754. waitWhile(0.1)
  755. end
  756. end
  757. end
  758. --go back
  759. if settings.preferUnsafeEsc then
  760. perfectTP(formerCF)
  761. else
  762. perfectTP(CFrame.new(-298+math.random()*10,18,1430))
  763. end
  764. setStatus("Bypassing by waiting...")
  765. waitWhile(16)
  766. exitVehicle()
  767. formerCF = root.CFrame
  768. --tp to collector
  769. setStatus("Selling...")
  770. perfectTP(CFrame.new(1639,50,-1800))
  771. waitWhile(5,function() return player.PlayerGui.MainGui.MuseumBag.Visible end)
  772. setStatus("Escaping...")
  773. --escape
  774. if settings.preferUnsafeEsc then
  775. perfectTP(formerCF)
  776. else
  777. perfectTP(CFrame.new(-298+math.random()*10,18,1430))
  778. end
  779. end
  780. local function robSteamEngine()
  781. toggleCanAbort(true)
  782. warnFlash("Steam engine")
  783. if humanoid==nil or humanoid.Health<1 then wait(5) end
  784. if abort or not settings.enabled then return true end
  785. exitVehicle()
  786. jailbreak()
  787. local formerCF = root.CFrame
  788. --collect items
  789. setStatus("Robbery started!")
  790. local grabNum=0
  791. for j=1,2 do
  792. for i=1,#specs do
  793. local s = specs[i]
  794. if s and s.Enabled and s.Name and s.Name:sub(1,5)=="Grab " and workspace.Trains:IsAncestorOf(s.Part) then
  795. if j==2 or s.Name:sub(7)=="riefcase" then
  796. waitWhile(1.35)
  797. s:Callback(true)
  798. grabNum=grabNum+1
  799. if abort or grabNum>9 then
  800. break
  801. end
  802. end
  803. end
  804. end
  805. if abort or grabNum>9 then
  806. break
  807. end
  808. end
  809. exitVehicle()
  810. formerCF = root.CFrame
  811. setStatus("Selling...")
  812. --tp to collector
  813. perfectTP(CFrame.new(1639,50,-1800))
  814. waitWhile(5,function() return player.PlayerGui.MainGui.MuseumBag.Visible end)
  815. setStatus("Escaping...")
  816. --escape
  817. if settings.preferUnsafeEsc then
  818. perfectTP(formerCF)
  819. else
  820. perfectTP(CFrame.new(-298+math.random()*10,18,1430))
  821. end
  822. end
  823. local function robAirdrop()
  824. toggleCanAbort(true)
  825. warnFlash("Airdrop")
  826. if humanoid==nil or humanoid.Health<1 then wait(5) end
  827. if abort or not settings.enabled then return true end
  828. local current_airdrop = airdrops[1]
  829. if current_airdrop and current_airdrop.Parent and current_airdrop:FindFirstChild("Briefcase") then
  830. local briefcase = current_airdrop.Briefcase
  831. exitVehicle()
  832. jailbreak()
  833. local formerCF = root.CFrame
  834. --enter
  835. setStatus("TPing to airdrop...")
  836. noclip()
  837. root.Velocity,root.RotVelocity=v30,v30
  838. perfectTP(briefcase.CFrame+Vector3.new(0,-6,0))
  839. if abort then
  840. yesclip()
  841. return true
  842. elseif briefcase.Parent then
  843. --collect
  844. setStatus("Robbery started!")
  845. root.CFrame = briefcase.CFrame + Vector3.new(0,-6,0)
  846. root.Anchored = true
  847. waitWhile(0.1)
  848. if specs then
  849. for i=1,#specs do
  850. local s = specs[i]
  851. if s and s.Name and s.Name:lower()=="pick up briefcase" and current_airdrop:IsAncestorOf(s.Part) then
  852. s:Callback(true)
  853. break
  854. end
  855. end
  856. else
  857. HOLD_E = true
  858. waitWhile(18,function()
  859. root.CFrame = briefcase.CFrame + Vector3.new(0,-6,0)
  860. return briefcase.Parent ~= nil
  861. end)
  862. HOLD_E = false
  863. end
  864. root.Anchored = false
  865. end
  866. yesclip()
  867. --escape
  868. setStatus("Escaping...")
  869. if settings.preferUnsafeEsc then
  870. perfectTP(formerCF)
  871. else
  872. perfectTP(CFrame.new(-298+math.random()*10,18,1430))
  873. end
  874. end
  875. end
  876. --HOLD_E thread
  877. if keypress then
  878. spawn(function()
  879. while wait(0.2) and gui.Parent do
  880. if HOLD_E then
  881. keyclick(0x45)
  882. while wait(0.1) and HOLD_E do
  883. if windowFocused then
  884. keypress(0x45)
  885. end
  886. end
  887. keyrelease(0x45)
  888. end
  889. end
  890. end)
  891. end
  892. --// main loop //
  893. local waiti=0
  894. local idleTick=0
  895. local airdropTick = 0
  896. while wait(0.5) and gui.Parent do
  897. if workspace.Trains:FindFirstChild("LocomotiveFront") then --avoid train tunnel
  898. local trainpos = workspace.Trains.LocomotiveFront.Model.Front.Position
  899. if trainpos.X < -1300 and trainpos.Z < 350 then
  900. current_boxcar=nil
  901. end
  902. end --avoid train stop
  903. if (fireclickdetector or click_detector) and workspace.Switches.BranchBack.Rail.Transparency < .9 then
  904. (fireclickdetector or click_detector)(workspace.Switches.BranchBack.Lever.Click.ClickDetector,1)
  905. end --avoid afk
  906. if tick()-idleTick > 60 then
  907. idleTick=tick()
  908. game:GetService("VirtualUser"):CaptureController()
  909. game:GetService("VirtualUser"):ClickButton2(Vector2.new())
  910. end
  911. player.PlayerGui.MainGui.CollectMoney.Visible=false
  912. if settings.enabled then
  913. if isMuseumOpen then
  914. if not robMuseum() then
  915. isMuseumOpen=false
  916. museumLbl.TextColor3 = Color3.new(1,1,1)
  917. setStatus("Museum success!")
  918. end
  919. toggleCanAbort(false)
  920. wait(2)
  921. elseif isJewlOpen then
  922. if not robJewelry() then
  923. isJewlOpen=false
  924. jewelryLbl.TextColor3 = Color3.new(1,1,1)
  925. setStatus("Jewelry success!")
  926. end
  927. toggleCanAbort(false)
  928. wait(2)
  929. elseif #airdrops > 0 and tick()-airdropTick > 20 then
  930. if not robAirdrop() then
  931. airdropTick = tick()
  932. setStatus("Airdrop success!")
  933. end
  934. toggleCanAbort(false)
  935. wait(2)
  936. elseif isSteamEngineOpen and specs then
  937. if not robSteamEngine() then
  938. isSteamEngineOpen=false
  939. trainLbl.TextColor3 = Color3.new(1,1,1)
  940. setStatus("Train success!")
  941. end
  942. toggleCanAbort(false)
  943. wait(2)
  944. elseif current_boxcar then
  945. if not robBoxcar() then
  946. current_boxcar = nil
  947. trainLbl.TextColor3 = Color3.new(1,1,1)
  948. setStatus("Train success!")
  949. end
  950. toggleCanAbort(false)
  951. wait(2)
  952. elseif isBankOpen then
  953. if not robBank() then
  954. isBankOpen=false
  955. bankLbl.TextColor3 = Color3.new(1,1,1)
  956. setStatus("Bank success!")
  957. end
  958. toggleCanAbort(false)
  959. wait(2)
  960. else
  961. setStatus("Wait for stores to open".. string.rep('.',waiti%3+1))
  962. waiti=waiti+1
  963. end
  964. else
  965. setStatus("Disabled.")
  966. end
  967. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement