Advertisement
Meliodas0_0

Jailbreak Get Dropped Cash

Jul 15th, 2019
203
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.52 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 CargoTrainRedCartExample = workspace.Trains:FindFirstChild("BoxCar") or workspace.Trains:FindFirstChild("VBoxCar")
  3. local v30 = Vector3.new()
  4. local root = game:GetService("Players").LocalPlayer.Character:WaitForChild("HumanoidRootPart")
  5. local humanoid = game:GetService("Players").LocalPlayer.Character:WaitForChild("Humanoid")
  6. local VirtualInput = game:GetService("VirtualInputManager")
  7. local Stepped = game:GetService("RunService").Stepped
  8.  
  9. local function triggerSpec(part)
  10. if abort then return end
  11. --look at it then press key
  12. local cam = workspace.CurrentCamera
  13. cam.CameraType = "Scriptable"
  14. cam.CFrame = CFrame.new(cam.CFrame.p,part.Position)
  15. wait()
  16. cam.CameraType = "Custom"
  17. wait()
  18. VirtualInput:SendKeyEvent(true, "E", false, game)
  19. end
  20.  
  21. local function waitWhile(t,exitFunc)
  22. local elapsed = 0
  23. local increment = 0.1
  24. t = (t == nil or t <= 0) and 0.001 or t
  25. increment = (increment > t) and t or increment
  26. while elapsed < t and (exitFunc==nil or exitFunc(elapsed)) do
  27. elapsed = elapsed + wait(t-elapsed < increment and t-elapsed or increment)
  28. end
  29. return elapsed
  30. end
  31.  
  32. local bigTPcf1 = CFrame.new(-54,245,1126)
  33. local bigTPcf2 = CFrame.new(118,124,1309)
  34. local function bigTP(cf,sign)
  35. --Shit method for free compatibility. Use better methods.
  36. sign = sign or 1
  37. player.PlayerGui.MainGui.Minimap.ImageLabel.Visible = false
  38. workspace.CurrentCamera.CameraType = "Scriptable"
  39. while (root.CFrame.p - cf.p).magnitude > 4 and not abort do
  40. local bigTPcf = (root.CFrame.p - bigTPcf1.p).magnitude > 100 and bigTPcf1 or bigTPcf2
  41. stepconn = Stepped:Connect(function()
  42. root.CFrame = bigTPcf
  43. root.Velocity,root.RotVelocity=v30,v30
  44. end)
  45. waitWhile(3,function() return root:FindFirstChild("BodyGyro")==nil end)
  46. stepconn:Disconnect()
  47. if root:FindFirstChild("BodyVelocity") then root.BodyVelocity.Parent = nil end
  48. if not abort then
  49. root.CFrame = cf + Vector3.new(0,5*sign,0)
  50. stepconn = Stepped:Connect(function() root.Velocity,root.RotVelocity=v30,v30 end)
  51. end
  52. if root.Parent and root.Parent:FindFirstChild("Parachute") then
  53. root.Parent["Parachute"]:Destroy()
  54. end
  55. waitWhile(0.2)
  56. if root.Parent and root.Parent:FindFirstChild("Parachute") then
  57. root.Parent["Parachute"]:Destroy()
  58. end
  59. if not abort then root.CFrame = cf end
  60. waitWhile(0.3)
  61. stepconn:Disconnect()
  62. end
  63. player.PlayerGui.MainGui.Minimap.ImageLabel.Visible = true
  64. workspace.CurrentCamera.CameraType = "Custom"
  65. end
  66.  
  67. for _,part in ipairs(workspace.Buildings:GetChildren()) do
  68. if (part.Position-Vector3.new(-302.6,30.3,1431.9)).magnitude < 1 then
  69. part.CanCollide=false
  70. end
  71. end
  72.  
  73. game:GetService("Workspace").DroppedCash.ChildAdded:Connect(function(obj)
  74. bigTP(obj.CFrame)
  75. wait()
  76. triggerSpec(obj)
  77. waitWhile(4,function() return obj==nil end)
  78. VirtualInput:SendKeyEvent(false, "E", false, game)
  79. end)
  80.  
  81. for i,v in pairs(game:GetService("Workspace").DroppedCash:GetChildren()) do
  82. if v then
  83. bigTP(v.CFrame)
  84. wait()
  85. triggerSpec(v)
  86. waitWhile(4,function() return v==nil end)
  87. VirtualInput:SendKeyEvent(false, "E", false, game)
  88. end
  89. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement