artbarte

Jailbreak Arrest All

Apr 30th, 2017
166
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.08 KB | None | 0 0
  1. localRootPart = game.Players.LocalPlayer.Character.HumanoidRootPart
  2. event = game.ReplicatedStorage.Resource.Event
  3.  
  4. function getCFrameBehindPart(part)
  5. local partRotation = part.CFrame:toAxisAngle()
  6. local bottomOfPart = part.CFrame.p-Vector3.new(0,part.Size.Y/2,0)
  7. local behindPart = CFrame.new(bottomOfPart-part.CFrame.lookVector*1.2)+Vector3.new(0,1,0)
  8. return behindPart*CFrame.Angles(partRotation.X,partRotation.Y,partRotation.Z)
  9. end
  10.  
  11. for _,plr in pairs(game.Teams.Criminal:GetPlayers()) do
  12. local char = plr.Character
  13. if char ~= nil and char:FindFirstChild("HumanoidRootPart") ~= nil then
  14. local rootPart = char.HumanoidRootPart
  15. repeat
  16. event:FireServer("VehicleExit")
  17. localRootPart.CFrame = getCFrameBehindPart(rootPart)
  18. wait()
  19. for _,veh in pairs(game.Workspace.Vehicles:GetChildren()) do
  20. event:FireServer("AttemptVehicleEject",veh)
  21. end
  22. event:FireServer("AttemptArrest", plr.Name)
  23. until plr.Team.Name ~= "Criminal" or rootPart == nil
  24. end
  25. end
Add Comment
Please, Sign In to add comment