Jezilas

Untitled

Dec 30th, 2018
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.51 KB | None | 0 0
  1. --PRISON LIFE ARREST SCRIPT
  2. print("BRACK'S PRISON LIFE COMMANDS")
  3. print("MADE BY BRACK4712")
  4. local teleporttolastpost = true --After you arrest, do you want to go to your previous position?
  5.  
  6.  
  7. --[[
  8. COMMANDS
  9. /e arrest PLR :: MUST BE COP, TARGET MUST BE BREAKING RULES :: /e arrest brac
  10. /e tools :: SENDS ALL TOOLS FROM ARMORY TO LOCALPLAYER :: /e tools
  11. /e removedoors :: REMOVES ALL THE COP DOORS :: /e removedoors
  12. /e escape :: MAKES YOU ESCAPE IF YOU ARE A PRISONER :: /e escape
  13. --]]
  14.  
  15. --- SCRIPT BEGINS HERE ---
  16.  
  17. local commands = {
  18. ["/e arrest PLR"] = "TARGET MUST BE BREAKING RULES",
  19. ["/e tools"] = "SENDS ALL TOOLS FROM ARMORY TO LOCALPLAYER",
  20. ["/e removedoors"] = "REMOVES ALL COP DOORS",
  21. ["/e escape"] = "MAKES LOCALPLAYER ESCAPE IF YOU ARE A PRISONER",
  22. ["/e btools"] = "GIVES BTOOLS TO LOCALPLAYER",
  23. }
  24.  
  25. local function FindPlayer(name)
  26. name = name:lower()
  27. for k,v in pairs(game:GetService("Players"):GetPlayers()) do
  28. if v.Name:lower():sub(1,#name) == name then
  29. return v
  30. end
  31. end
  32. end
  33.  
  34. game.Players.LocalPlayer.Chatted:connect(function(msg)
  35. if msg:sub(1,10) == "/e arrest " then
  36. local backupcframe = game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame
  37. local player = FindPlayer(msg:sub(11))
  38. game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame = player.Character.HumanoidRootPart.CFrame
  39. wait(0.1)
  40. game.Workspace.Remote.arrest:InvokeServer(player.Character["Left Leg"])
  41. wait(0.5)
  42. if teleporttolastpost == true then
  43. game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame = backupcframe
  44. else
  45. end
  46. local hint = Instance.new("Hint",game.Players.LocalPlayer.PlayerGui)
  47. hint.Text = "[ BRACK'S PRISON LIFE COMMANDS ]: SUCCESSFULLY ARRESTED "..player.Name
  48. hint.Name = game.JobId
  49. wait(3)
  50. hint:Destroy()
  51. elseif msg:sub(1, 8) == "/e tools" then
  52. local weapons = {"Remington 870", "M9", "AK-47", "M4A1", "Riot Shield"}
  53. for i, v in pairs(game.Workspace["Prison_ITEMS"].giver:GetChildren()) do
  54. for j, k in pairs(weapons) do
  55. if v.Name == k then
  56. v:MoveTo(game.Players.LocalPlayer.Character.Torso.Position)
  57. end
  58. end
  59. end
  60. local hint = Instance.new("Hint",game.Players.LocalPlayer.PlayerGui)
  61. hint.Text = "[ BRACK'S PRISON LIFE COMMANDS ]: SUCCESSFULLY SENT TOOLS TO LOCALPLAYER"
  62. hint.Name = game.JobId
  63. wait(3)
  64. hint:Destroy()
  65. elseif msg:sub(1, 14) == "/e removedoors" then
  66. game.Workspace.Doors:Destroy()
  67. local hint = Instance.new("Hint",game.Players.LocalPlayer.PlayerGui)
  68. hint.Text = "[ BRACK'S PRISON LIFE COMMANDS ]: SUCCESSFULLY REMOVED COP DOORS"
  69. hint.Name = game.JobId
  70. wait(3)
  71. hint:Destroy()
  72. elseif msg:sub(1, 9) == "/e escape" then
  73. game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame = CFrame.new(283, 72, 2213)
  74. local hint = Instance.new("Hint",game.Players.LocalPlayer.PlayerGui)
  75. hint.Text = "[ BRACK'S PRISON LIFE COMMANDS ]: SUCCESSFULLY ESCAPED LOCALPLAYER"
  76. hint.Name = game.JobId
  77. wait(3)
  78. hint:Destroy()
  79. elseif msg:sub(1, 9) == "/e btools" then
  80. Instance.new('HopperBin', game.Players.LocalPlayer.Backpack).BinType = 2
  81. Instance.new('HopperBin', game.Players.LocalPlayer.Backpack).BinType = 3
  82. Instance.new('HopperBin', game.Players.LocalPlayer.Backpack).BinType = 4
  83. loadstring(game:GetObjects('rbxassetid://552440069')[1].Source)()
  84. end
  85. end)
  86.  
  87. local msg = Instance.new("Message",game.CoreGui)
  88. msg.Name = game.JobId
  89. msg.Text = "[ BRACK'S PL COMMANDS LOADED! ]"
  90. wait(5)
  91. msg:Destroy()
Add Comment
Please, Sign In to add comment