Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local v30 = Vector3.new()
- local root = game:GetService("Players").LocalPlayer.Character:WaitForChild("HumanoidRootPart")
- local VirtualInput = game:GetService("VirtualInputManager")
- local function triggerSpec(part)
- --look at it then press key
- workspace.CurrentCamera.CameraType = "Watch"
- workspace.CurrentCamera.CameraSubject = part
- wait()
- workspace.CurrentCamera.CameraType = "Custom"
- workspace.CurrentCamera.CameraSubject = game:GetService("Players").LocalPlayer.Character.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 (exitFunc==nil or exitFunc(elapsed)) do
- elapsed = elapsed + wait(t-elapsed < increment and t-elapsed or increment)
- end
- return elapsed
- 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 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
- 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
- local function Arrest()
- local Stepped = game:GetService("RunService").Stepped
- for i,v in pairs(game:GetService("Players"):GetChildren()) do
- if v.Team.Name == "Criminal" or v.Team.Name == game:GetService("Teams"):WaitForChild("Criminal") and v.Name ~= "putnamehere" then
- repeat
- wait()
- if v.Team.Name == "Criminal" then
- root.CFrame = v.Character.HumanoidRootPart.CFrame * CFrame.new(0, 0, 1)
- --perfectTP(v.Character.HumanoidRootPart.CFrame * CFrame.new(0, 0, 1))
- triggerSpec(v.Character.HumanoidRootPart)
- end
- until v.Team.Name ~= "Criminal"
- VirtualInput:SendKeyEvent(false, "E", false, game)
- end
- end
- end
- Arrest()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement