Advertisement
Guest User

Something to edit

a guest
Sep 20th, 2019
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 13.60 KB | None | 0 0
  1. loadstring(game:HttpGet("https://pastebin.com/raw/SyCGdVUc", true))()
  2. if not museumEvent then
  3. settings.doMuseum=false
  4. MuseumBtn.BackgroundColor3=red
  5. end
  6.  
  7. --utilities
  8. local function keyclick(num)
  9. if windowFocused and keypress and keyrelease then
  10. keypress(num)
  11. wait()
  12. keyrelease(num)
  13. end
  14. end
  15. local function punch()
  16. if punchEvent then
  17. punchEvent()
  18. elseif windowFocused then
  19. keyclick(0x46)
  20. end
  21. end
  22. local function exitVehicle() keyclick(0x20) end
  23.  
  24. local function longTP(cf)
  25. local original = root.CFrame + Vector3.new(0,math.max(0,140-root.CFrame.y),0) --start high up
  26. local oldg = workspace.Gravity
  27. workspace.Gravity=0
  28. --consistent velocity along a theoretical array of points between
  29. for i=0,1,1/((original.p-cf.p).magnitude / (maxSpeed*0.25)) do
  30. if abort then break end
  31. root.CFrame = original:lerp(cf,i)
  32. root.Velocity,root.RotVelocity=v30,v30
  33. wait(0.25)
  34. end
  35.  
  36. workspace.Gravity=oldg
  37. for i=1,2 do
  38. if abort then break end
  39. root.CFrame = cf
  40. wait()
  41. end
  42. end
  43.  
  44. local function bigTP(cf)
  45. repeat
  46. for i=1,80 do
  47. if abort then return end
  48. root.CFrame=cf
  49. root.Velocity,root.RotVelocity=v30,v30
  50. wait()
  51. end
  52. until wait(0.39) and (root.Position-cf.p).magnitude<15
  53. end
  54.  
  55. local function isBagFull()
  56. if player.PlayerGui.MainGui.CollectMoney.Visible==false then
  57. return true
  58. end
  59. return strToNum(player.PlayerGui.MainGui.CollectMoney.Money.Text)+1 >= strToNum(player.PlayerGui.MainGui.CollectMoney.Maximum.Text)
  60. end
  61.  
  62. local boxcars = {}
  63. for _,v in ipairs(workspace.Trains:GetChildren()) do
  64. if v.Name=="BoxCar" and v:FindFirstChild("Gold",true) then
  65. boxcars[#boxcars+1]=v
  66. end
  67. end
  68. workspace.Trains.ChildAdded:Connect(function(child)
  69. wait(1)
  70. if child.Name=="BoxCar" and child.Model.Rob:FindFirstChild("Gold") then
  71. boxcars[#boxcars+1]=child
  72. end
  73. end)
  74. workspace.Trains.ChildRemoved:Connect(function(child)
  75. for i,car in ipairs(boxcars) do
  76. if car==child then
  77. table.remove(boxcars,i)
  78. break
  79. end
  80. end
  81. end)
  82.  
  83. local yekaf=0
  84. local oldWTSP = workspace.CurrentCamera.WorldToScreenPoint
  85. local MT = getrawmetatable(game)
  86. if setreadonly then setreadonly(MT,false) end
  87. if make_writeable then make_writeable(MT) end
  88. local oldNamecall = MT.__namecall
  89. local oldIndex = MT.__index
  90. MT.__namecall = function(inst,...)
  91. local args = {...}
  92. local m = args[#args]
  93. if m == "WorldToScreenPoint" and inst.ClassName=="Camera" then
  94. local ret = oldWTSP(inst,...)
  95. return ret,true
  96. end
  97. return oldNamecall(inst,...)
  98. end
  99. MT.__index = function(inst,k)
  100. if k=="Position" and inst==root and (checkcaller==nil or checkcaller()==false) then
  101. return Vector3.new(uptorso.Position.X,yekaf,uptorso.Position.Z)
  102. end
  103. return oldIndex(inst,k)
  104. end
  105.  
  106. if setreadonly then setreadonly(MT,true) end
  107.  
  108. --get some buildings
  109. local bankEscPart
  110. local crimEscPart
  111. for _,part in ipairs(workspace.Buildings:GetChildren()) do
  112. if (part.Position-Vector3.new(144.2,54.1,856.2)).magnitude < 1 then
  113. bankEscPart=part
  114. elseif (part.Position-Vector3.new(-318.5,19.1,1431.2)).magnitude < 1 then
  115. crimEscPart=part
  116. end
  117. end
  118.  
  119. local function isVaultOpen()
  120. return (workspace.Banks:GetChildren()[1].Door.Closed.Position-Vector3.new(25.6,3.6,815.6)).magnitude > 1
  121. end
  122. local function copsTooClose(radius)
  123. for _,p in ipairs(game:GetService("Teams").Police:GetPlayers()) do
  124. if p.Character and p.Character:FindFirstChild("HumanoidRootPart") and p.Character:FindFirstChild("Humanoid") then
  125. local diff = (p.Character.HumanoidRootPart.Position-root.Position)
  126. if diff.magnitude < radius and (diff*Vector3.new(0,1,0)).magnitude < 10 and p.Character.Humanoid.Health>1 then
  127. return true
  128. end
  129. end
  130. end
  131. return false
  132. end
  133.  
  134. local function warnFlash(s)
  135. stprint(s.." ready.")
  136. local col0 = main.BackgroundColor3
  137. for i=1,2 do
  138. for a=0,1,1/(30*.25) do
  139. main.BackgroundColor3 = col0:lerp(red,a)
  140. wait()
  141. end
  142. for a=0,1,1/(30*.25) do
  143. main.BackgroundColor3 = red:lerp(col0,a)
  144. wait()
  145. end
  146. end
  147. main.BackgroundColor3 = col0
  148. end
  149.  
  150. local bankSign = workspace.Banks:GetChildren()[1].Extra.Sign.Decal
  151. local jewlSign = workspace.Jewelrys:GetChildren()[1].Extra.Sign.Decal
  152. local museumPart = workspace.Museum.Roof.Hole.Part
  153. local isBankOpen = bankSign.Transparency>0.01
  154. local isJewlOpen = jewlSign.Transparency>0.01
  155. local isMuseumOpen = not museumPart.CanCollide
  156. local isBankCalm = #workspace.Ringers.Bank:GetChildren()==0
  157. local isJewlCalm = #workspace.Ringers.Jewelry:GetChildren()==0
  158. bankSign:GetPropertyChangedSignal("Transparency"):Connect(function()
  159. wait()
  160. isBankOpen = bankSign.Transparency>0.01
  161. if not isBankOpen then
  162. isBankCalm=true
  163. end
  164. end)
  165. jewlSign:GetPropertyChangedSignal("Transparency"):Connect(function()
  166. wait()
  167. isJewlOpen = jewlSign.Transparency>0.01
  168. if not isJewlOpen then
  169. isJewlCalm=true
  170. end
  171. end)
  172. museumPart:GetPropertyChangedSignal("CanCollide"):Connect(function()
  173. wait()
  174. isMuseumOpen = not museumPart.CanCollide
  175. end)
  176.  
  177. workspace.Ringers.Bank.ChildAdded:Connect(function() isBankCalm=false end)
  178. workspace.Ringers.Jewelry.ChildAdded:Connect(function() isJewlCalm=false end)
  179. --rob funcs
  180. local function robJewelry()
  181. warnFlash("Jewelry")
  182. if not settings.doJewl then return end
  183. toggleCanAbort(true)
  184. stprint("TPing to jewelry...")
  185. exitVehicle()
  186. bigTP(CFrame.new(163.7, 106.6, 1341.6))
  187. if abort then return end
  188. --enter
  189. if math.random(2)==1 then
  190. root.CFrame = CFrame.new(142.17, 17.88, 1351.08)
  191. else
  192. root.CFrame = CFrame.new(89.7, 17.88, 1302.53)*CFrame.Angles(0,math.pi/-2,0)
  193. end
  194. wait(0.5)
  195. if settings.jewlAllowCrims and isJewlCalm then
  196. root.CFrame = CFrame.new(163.7, 106.6, 1341.6)
  197. for i=1,3 do
  198. if abort~=true then wait(1.7) end
  199. end
  200. end
  201. screnv.tick = function() return 0/0 end
  202. stprint("Robbery started!")
  203. local broke = 0
  204. --get jewels
  205. for _,box in ipairs(workspace.Jewelrys:GetChildren()[1].Boxes:GetChildren()) do
  206. if abort or (broke>1 and isBagFull()) then
  207. --duffel bag full
  208. break
  209. end
  210.  
  211. if box.Transparency < 0.9 then
  212. if box.Position.X < 115 and box.Position.Z > 1330 then
  213. root.CFrame = CFrame.new(box.Position+box.CFrame.lookVector*2.5+Vector3.new(0,0,-2.5),box.Position)
  214. elseif box.Position.Z > 1338 then
  215. root.CFrame = CFrame.new(box.Position+box.CFrame.lookVector*-2.5,box.Position)
  216. else
  217. root.CFrame = CFrame.new(box.Position+box.CFrame.lookVector*2.5,box.Position)
  218. end
  219. wait(0.1)
  220. local hits = 0
  221. while abort==false and hits<8 and box.Transparency<0.9 do
  222. punch()
  223. hits=hits+1
  224. if punchEvent==nil then wait(0.5) else wait(0.05) end
  225. end
  226. if punchEvent~=nil then wait(0.2) end
  227. broke=broke+1
  228. end
  229. end
  230. screnv.tick=tick
  231.  
  232. wait(0.75)
  233. stprint("Escaping...")
  234. bigTP(CFrame.new(-365.3, 35.52, 1578.5))
  235. wait(0.3)
  236. crimEscPart.CanCollide = not settings.noclipEsc
  237. if settings.noclipEsc then longTP(CFrame.new(-326.4,17.3,1430)) end
  238. end
  239.  
  240. local function robBank()
  241. warnFlash("Bank")
  242. if not settings.doBank then return end
  243. toggleCanAbort(true)
  244. stprint("TPing to bank...")
  245. exitVehicle()
  246. bankEscPart.CanCollide=true
  247. bigTP(CFrame.new(119, 95, 840))
  248. if abort then return end
  249. longTP(CFrame.new(23.6, 18.07, 853.5))
  250. wait(0.45)
  251. if isBankCalm then wait(1) end
  252. stprint("Opening vault...")
  253. if abort then return end
  254. root.CFrame = CFrame.new(30,0.78,816)*CFrame.Angles(0,math.pi/4,0)
  255. wait(0.5)
  256. --gets in vault
  257. for i=1,4 do
  258. if abort then break end
  259. root.CFrame = CFrame.new(19.3, 3.4, 829.7)*CFrame.Angles(0,math.pi/-2,0)
  260. wait(.25)
  261. end
  262. --wait until open
  263. local elapsed=0
  264. while abort==false and isBankOpen==true and isVaultOpen()==false and elapsed<20 do
  265. elapsed=elapsed+wait(.1)
  266. end
  267. elapsed = 0
  268. while abort==false and isBankOpen==true and (not (isVaultOpen() and copsTooClose(settings.bankRadius))) and elapsed<5 do
  269. elapsed=elapsed+wait(.1)
  270. end
  271. stprint("Robbery started!")
  272. --wait for bag to fill or player leaves
  273. while abort==false and isBagFull()==false and (not (isVaultOpen() and copsTooClose(settings.bankRadius))) and elapsed<180 do
  274. elapsed=elapsed+wait(.1)
  275. end
  276. stprint("Escaping...")
  277. bankEscPart.CanCollide = not settings.noclipEsc
  278. if settings.noclipEsc then
  279. longTP(CFrame.new(119, 17.85, 840))
  280. else
  281. longTP(CFrame.new(119, 95, 840))
  282. end
  283. end
  284.  
  285. local function robTrain()
  286. local bcar = boxcars[1]
  287. local gold = bcar.Model.Rob.Gold
  288. local topDoor = bcar.Skeleton.RoofDoorClosed
  289. local trainFront = workspace.Trains.LocomotiveFront.Model.Front
  290. warnFlash("Train")
  291. if not settings.doTrain then return end
  292. toggleCanAbort(true)
  293. stprint("TPing to train...")
  294. --tp
  295. exitVehicle()
  296. --bigTP(gold.CFrame+gold.CFrame.rightVector*14)
  297. --while (root.Position-gold.Position).magnitude > 97 and abort==false do
  298. -- longTP(gold.CFrame+gold.CFrame.rightVector*14)
  299. --end
  300. if bcar.Parent then
  301. local elapsed
  302. TCB()
  303. if trainEvent then
  304. trainEvent(bcar)
  305. wait(0.1)
  306. else
  307. stprint("Opening door...")
  308. --open door
  309. if not abort then
  310. stepconn = game:GetService("RunService").Stepped:Connect(function()
  311. root.CFrame = topDoor.CFrame + Vector3.new(0,-5,0)
  312. root.Velocity,root.RotVelocity=v30,v30
  313. end)
  314. wait(0.5)
  315. holde=true
  316. keyclick(0x45)
  317. if keypress and keyrelease then
  318. --keypress doesn't seem to "hold" so this is necessary
  319. spawn(function()
  320. while wait(0.1) and windowFocused and holde do
  321. keypress(0x45)
  322. end
  323. keyrelease(0x45)
  324. end)
  325. end
  326. elapsed=0
  327. while abort==false and elapsed<9 and topDoor.Open.Value==false do
  328. elapsed=elapsed+wait(0.3)
  329. end
  330. stepconn:Disconnect()
  331. wait()
  332. end
  333. holde=false
  334. stprint("Opening vault...")
  335. --open vault
  336. if not abort then
  337. stepconn = game:GetService("RunService").Stepped:Connect(function()
  338. root.CFrame = gold.CFrame+(gold.CFrame.lookVector*4.5)+Vector3.new(0,1,0)
  339. root.Velocity,root.RotVelocity=v30,v30
  340. end)
  341. wait(0.5)
  342. holde=true
  343. keyclick(0x45)
  344. if keypress and keyrelease then
  345. --keypress doesn't seem to "hold" so this is necessary
  346. spawn(function()
  347. while wait(0.1) and windowFocused and holde do
  348. keypress(0x45)
  349. end
  350. keyrelease(0x45)
  351. end)
  352. end
  353. elapsed=0
  354. while abort==false and elapsed<9 and bcar.Skeleton.Vault.Part.Open.Value==false do
  355. elapsed=elapsed+wait(0.3)
  356. end
  357. stepconn:Disconnect()
  358. wait(0.2)
  359. end
  360. holde=false
  361. end
  362. elapsed=0
  363. stprint("Robbery started!")
  364. --get gold
  365. if not abort then
  366. stepconn = game:GetService("RunService").Stepped:Connect(function()
  367. root.CFrame = gold.CFrame+gold.CFrame.lookVector+Vector3.new(0,1,0)
  368. root.Velocity,root.RotVelocity=v30,v30
  369. end)
  370. while abort==false and (not(elapsed>5 and isBagFull())) and (trainFront.Position-Vector3.new(-1679,25,268)).magnitude>99 and elapsed<65 do
  371. elapsed=elapsed+wait(0.3)
  372. end
  373. stepconn:Disconnect()
  374. if (trainFront.Position-Vector3.new(-1679,25,268)).magnitude<500 then
  375. boxcars={}
  376. end
  377. end
  378. end
  379. stprint("Escaping...")
  380. crimEscPart.CanCollide = not settings.noclipEsc
  381. if settings.noclipEsc then
  382. bigTP(CFrame.new(-326.4,17.3,1430))
  383. else
  384. bigTP(CFrame.new(-365.3, 35.52, 1578.5))
  385. end
  386. end
  387.  
  388. local function robMuseum()
  389. warnFlash("Museum")
  390. if not settings.doMuseum then return end
  391. toggleCanAbort(true)
  392. stprint("TPing to museum...")
  393. exitVehicle()
  394. local specs = require(game:GetService("ReplicatedStorage").Module.UI).CircleAction.Specs
  395. --tp inside
  396. bigTP(CFrame.new(1067.8,102.8,1193.8))
  397. wait(0.5)
  398. --instantly collect enough artifacts, dont wait too long
  399. stprint("Robbery started!")
  400. if not abort then
  401. pcall(museumEvent)
  402. root.CFrame = CFrame.new(1036.5,101.2,1161.6)
  403. end
  404. local t0=tick()
  405. wait(0.9)
  406. stprint("Escaping...")
  407. local oldSpeed=maxSpeed
  408. maxSpeed=220
  409. longTP(CFrame.new(1695.7,75.6,-1848.3))
  410. maxSpeed=oldSpeed
  411. for w=0,16-(tick()-t0),0.5 do
  412. if abort==false then wait(0.5) end
  413. end
  414. --tp to collector
  415. if not abort then root.CFrame = CFrame.new(1643,50,-1800) end
  416. wait(1)
  417. if not abort then root.CFrame = CFrame.new(1695.7,75.6,-1848.3) end
  418. end
  419.  
  420. local spyfunc = hookfunc or replaceclosure
  421. if spyfunc then
  422. oldWTSP = spyfunc(oldWTSP,function(self,v3)
  423. local ret = oldWTSP(self,v3)
  424. return ret,true
  425. end)
  426. end
  427.  
  428. local function newchar(char)
  429. if char then
  430. root = char:WaitForChild("HumanoidRootPart",4)
  431. uptorso = char:WaitForChild("UpperTorso",2)
  432. yekaf = uptorso.Position.Y - 0.63
  433. end
  434. end
  435. newchar(player.Character)
  436. player.CharacterAdded:Connect(newchar)
  437.  
  438. spawn(function()
  439. while true do
  440. local t = wait(0.25)
  441. local y = uptorso.Position.Y - 0.63
  442. if math.abs(y-yekaf) < (25*t) then
  443. yekaf = y
  444. else
  445. yekaf = yekaf + math.sign(y-yekaf)*25*t
  446. end
  447. end
  448. end)
  449.  
  450. --main loop
  451. local waiti=0
  452. print("Auto-robbery is running")
  453. while wait(0.5) and gui.Parent do
  454. if workspace.Trains:FindFirstChild("LocomotiveFront") and (workspace.Trains.LocomotiveFront.Model.Front.Position-Vector3.new(-1679,25,268)).magnitude<500 then
  455. boxcars = {}
  456. end
  457.  
  458. if settings.doMuseum and isMuseumOpen and museumEvent then
  459. pcall(robMuseum)
  460. isMuseumOpen=false
  461. toggleCanAbort(false)
  462. stprint("Museum success! [5s cooldown]")
  463. wait(5)
  464. elseif settings.doJewl and isJewlOpen then
  465. pcall(robJewelry)
  466. isJewlOpen=false
  467. toggleCanAbort(false)
  468. stprint("Jewel success! [5s cooldown]")
  469. wait(5)
  470. elseif settings.doTrain and #boxcars>0 then
  471. pcall(robTrain)
  472. table.remove(boxcars,1)
  473. toggleCanAbort(false)
  474. stprint("Train success! [5s cooldown]")
  475. wait(5)
  476. elseif settings.doBank and isBankOpen then
  477. pcall(robBank)
  478. isBankOpen=false
  479. toggleCanAbort(false)
  480. stprint("Bank success! [5s cooldown]")
  481. wait(5)
  482. else
  483. stprint("Wait for stores to open".. string.rep('.',waiti%3+1))
  484. waiti=waiti+1
  485. end
  486. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement