Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local prisons = game.Workspace.Prison:GetChildren()
- script.Parent.Equipped:connect(function(mouse)
- mouse.Button1Down:connect(function()
- if mouse then
- if (script.Parent.Parent.Head.Position - mouse.Target.Parent.Parent.Head.Position).magnitude <= 10 then -- Change "10" if you want to. This is the range of the arrest tool. The higher the number the longer the range you can arrest the player
- if mouse.Target.Parent:isA("Accessory") then
- local char = mouse.Target.Parent.Parent
- char.HumanoidRootPart.CFrame = prisons[math.random(1,#prisons)].CFrame + Vector3.new(0,3,0) -- Randomly Puts the Prisoner to the Cell
- end
- end
- if mouse.Target:isA("Part") then
- if mouse.Target.Parent.Humanoid then
- local char = mouse.Target.Parent
- char.HumanoidRootPart.CFrame = prisons[math.random(1,#prisons)].CFrame + Vector3.new(0,3,0) -- Same as this
- end
- end
- end
- end)
- end)
- --If you want to test it this in Roblox Studio, Change the LocalScript to Script
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement