Advertisement
Guest User

punish and unpunish

a guest
May 30th, 2016
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.03 KB | None | 0 0
  1. function punish(player)
  2. if player == "all" then
  3. for i,v in pairs (game.Players:GetChildren()) do
  4. if v.Character then
  5. v.Character.Parent = game.Lighting
  6. end
  7. end
  8. elseif player == "others" then
  9. for i,v in pairs (game.Players:GetChildren()) do
  10. if v.Name ~= game.Players.LocalPlayer.Name then
  11. if v.Character then
  12. v.Character.Parent = game.Lighting
  13. end
  14. end
  15. end
  16. elseif player == "me" then
  17. workspace[game.Players.LocalPlayer.Name].Parent = game.Lighting
  18. else
  19. workspace[player].Parent = game.Lighting
  20. end
  21. end
  22.  
  23. function unpunish(player)
  24. if player == "all" then
  25. for i,v in pairs (game.Lighting:GetChildren()) do
  26. if v.Character then
  27. v.Character.Parent = game.Players
  28. end
  29. end
  30. elseif player == "others" then
  31. for i,v in pairs (game.Lighting:GetChildren()) do
  32. if v.Name ~= game.Players.LocalPlayer.Name then
  33. if v.Character then
  34. v.Character.Parent = game.Players
  35. end
  36. end
  37. end
  38. elseif player == "me" then
  39. game.Lighting[game.Players.LocalPlayer.Name].Parent = game.Players
  40. else
  41. game.Lighting[player].Parent = game.Players
  42. end
  43. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement