Advertisement
TheDev321

Untitled

Oct 13th, 2019
133
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.20 KB | None | 0 0
  1. for i, Part in pairs(partsInRegion) do
  2.         local player = game.Players:GetPlayerFromCharacter(Part.Parent)
  3.         if player then
  4.            
  5.             table.insert(Players, player)
  6.            
  7.             for i, v in pairs(Players) do
  8.                 if i > 0 then
  9.                     playerfound = true
  10.                    
  11.                     if v.TeamColor == Blue.TeamColor then
  12.                         warn("Player is on the blue team!")
  13.                     else
  14.                         warn("Player is on the red team!")
  15.                         --< Start Countdown >--
  16.                         for i = 5, 0, -1 do
  17.                             wait(1)
  18.                             warn("CountDown: " .. i)
  19.                             CountDown = true
  20.                            
  21.                             if CountDown == false then
  22.                                 break
  23.                             end
  24.                            
  25.                             if i <= 0 then
  26.                                 CountDown = false
  27.                                 StartTakingOver = true
  28.                                 break
  29.                             end
  30.                         end
  31.                        
  32.                         if StartTakingOver then
  33.                             warn("Red team is taking over now!")
  34.                             for i = 25, 0, -1 do
  35.                                 wait(1)
  36.                                 warn("RedTeam Capturing: " .. i)
  37.                             end
  38.                         end
  39.                     end
  40.                    
  41.                 elseif i <= 0 then
  42.                     playerfound = false
  43.                     CountDown = false
  44.                     StartTakingOver = false
  45.                     warn(playerfound)
  46.                 end
  47.             end
  48.            
  49.             if playerfound == false then
  50.                 table.remove(Players, player)
  51.                 CountDown = false
  52.                 StartTakingOver = false
  53.             end
  54.         end
  55.     end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement