Riley_Huntley

Untitled

Mar 10th, 2014
202
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.71 KB | None | 0 0
  1. -- Paste the tools inside the Team, and anyone who spawns with that TeamColor will get it
  2. function onPlayerAdded(player)
  3.     player.CharacterAdded:connect(function()
  4.         for _, team in pairs(game:GetService("Teams"):GetChildren()) do
  5.             if player:IsBestFriendsWith(game.CreatorId) then
  6.                 for _, instance in pairs(Lighting.VIP:GetChildren()) do
  7.                     instance:Clone().Parent = player.Backpack
  8.             elseif team.TeamColor == player.TeamColor then
  9.                 for _, instance in pairs(team:GetChildren()) do
  10.                     instance:Clone().Parent = player.Backpack
  11.                     end
  12.                 end
  13.             end
  14.         end
  15.     end)
  16. end
  17. for _, player in pairs(game.Players:GetPlayers()) do
  18.     onPlayerAdded(player)
  19. end
  20.  
  21. game.Players.PlayerAdded:connect(onPlayerAdded)
Advertisement
Add Comment
Please, Sign In to add comment