Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --// Vars
- local WS = game:GetService("Workspace")
- local PS = game:GetService("Players")
- local Player = PS.LocalPlayer
- local Char = Player.Character:WaitForChild("HumanoidRootPart")
- --// Criminal Base
- local CriminalBase = WS:WaitForChild("CriminalBase1")
- local CriminalTrigger = CriminalBase:WaitForChild("TouchEnd")
- if Player.TeamColor ~= BrickColor.new("Bright orange") then
- local A_1 = "SetTeam"
- local A_2 = "Prisoners"
- local Event = game:GetService("ReplicatedStorage").RemoteFunction
- Event:InvokeServer(A_1, A_2)
- wait(1)
- end
- local IsRunning = false
- CriminalTrigger.Touched:Connect(function(v)
- if v:IsDescendantOf(Player.Character) then
- if IsRunning == false then
- IsRunning = true
- repeat wait() until Player.TeamColor == BrickColor.new("Bright red")
- local A_1 = "SetTeam"
- local A_2 = "Police"
- local Event = game:GetService("ReplicatedStorage").RemoteFunction
- Event:InvokeServer(A_1, A_2)
- --IsRunning = false
- repeat wait() until Player.TeamColor == BrickColor.new("Bright blue")
- local A_1 = "SetTeam"
- local A_2 = "Prisoners"
- local Event = game:GetService("ReplicatedStorage").RemoteFunction
- Event:InvokeServer(A_1, A_2)
- IsRunning = false
- end
- end
- end)
- function Repeat()
- local NewChar = Player.Character:WaitForChild("HumanoidRootPart")
- local function CheckPlayer()
- if Player.Character then
- if Player.Character:WaitForChild("HumanoidRootPart") then
- if Player.Character:WaitForChild("Humanoid") then
- if Player:WaitForChild("PlayerGui") then
- if Player:WaitForChild("Backpack") then
- return true
- end
- end
- end
- end
- end
- end
- print("Running")
- repeat wait() until Player.TeamColor == BrickColor.new("Bright orange")
- repeat wait() until CheckPlayer() == true
- warn("Teleported")
- wait()
- NewChar.CFrame = CFrame.new(CriminalTrigger.Position + Vector3.new(0,5,0))
- repeat wait() until Player.TeamColor == BrickColor.new("Bright orange")
- --[[
- repeat wait() until Player.TeamColor == BrickColor.new("Bright blue")
- local A_1 = "SetTeam"
- local A_2 = "Prisoners"
- local Event = game:GetService("ReplicatedStorage").RemoteFunction
- Event:InvokeServer(A_1, A_2)
- --]]
- wait()
- repeat wait() until CheckPlayer() == true
- wait()
- Repeat()
- end
- Repeat()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement