Advertisement
TheNadie

Untitled

Jan 28th, 2019
228
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.15 KB | None | 0 0
  1. --// Vars
  2. local WS = game:GetService("Workspace")
  3. local PS = game:GetService("Players")
  4. local Player = PS.LocalPlayer
  5. local Char = Player.Character:WaitForChild("HumanoidRootPart")
  6. --// Criminal Base
  7. local CriminalBase = WS:WaitForChild("CriminalBase1")
  8. local CriminalTrigger = CriminalBase:WaitForChild("TouchEnd")
  9.  
  10. if Player.TeamColor ~= BrickColor.new("Bright orange") then
  11. local A_1 = "SetTeam"
  12. local A_2 = "Prisoners"
  13. local Event = game:GetService("ReplicatedStorage").RemoteFunction
  14. Event:InvokeServer(A_1, A_2)
  15. wait(1)
  16. end
  17.  
  18. local IsRunning = false
  19. CriminalTrigger.Touched:Connect(function(v)
  20. if v:IsDescendantOf(Player.Character) then
  21. if IsRunning == false then
  22. IsRunning = true
  23. repeat wait() until Player.TeamColor == BrickColor.new("Bright red")
  24. local A_1 = "SetTeam"
  25. local A_2 = "Police"
  26. local Event = game:GetService("ReplicatedStorage").RemoteFunction
  27. Event:InvokeServer(A_1, A_2)
  28. --IsRunning = false
  29. repeat wait() until Player.TeamColor == BrickColor.new("Bright blue")
  30. local A_1 = "SetTeam"
  31. local A_2 = "Prisoners"
  32. local Event = game:GetService("ReplicatedStorage").RemoteFunction
  33. Event:InvokeServer(A_1, A_2)
  34. IsRunning = false
  35. end
  36. end
  37. end)
  38.  
  39.  
  40.  
  41. function Repeat()
  42. local NewChar = Player.Character:WaitForChild("HumanoidRootPart")
  43. local function CheckPlayer()
  44. if Player.Character then
  45. if Player.Character:WaitForChild("HumanoidRootPart") then
  46. if Player.Character:WaitForChild("Humanoid") then
  47. if Player:WaitForChild("PlayerGui") then
  48. if Player:WaitForChild("Backpack") then
  49. return true
  50. end
  51. end
  52. end
  53. end
  54. end
  55. end
  56. print("Running")
  57. repeat wait() until Player.TeamColor == BrickColor.new("Bright orange")
  58. repeat wait() until CheckPlayer() == true
  59. warn("Teleported")
  60. wait()
  61. NewChar.CFrame = CFrame.new(CriminalTrigger.Position + Vector3.new(0,5,0))
  62. repeat wait() until Player.TeamColor == BrickColor.new("Bright orange")
  63. --[[
  64. repeat wait() until Player.TeamColor == BrickColor.new("Bright blue")
  65. local A_1 = "SetTeam"
  66. local A_2 = "Prisoners"
  67. local Event = game:GetService("ReplicatedStorage").RemoteFunction
  68. Event:InvokeServer(A_1, A_2)
  69. --]]
  70. wait()
  71. repeat wait() until CheckPlayer() == true
  72. wait()
  73. Repeat()
  74. end
  75.  
  76. Repeat()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement