SHARE
TWEET

Untitled

a guest Sep 22nd, 2019 157 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function getPlayer(plr)
  2. k={};name=string.lower(plr);plrs=game["Players"];lplr=plrs.LocalPlayer
  3. if name=="all" then
  4. for i,v in pairs(plrs:GetPlayers()) do
  5. table.insert(k,v)
  6. end
  7. elseif name=="others" then
  8. for i,v in pairs(plrs:GetPlayers()) do
  9. if v~=lplr then
  10. table.insert(k,v)
  11. end
  12. end
  13. elseif name=="me" then
  14. table.insert(k,lplr)
  15. elseif name=="bc" then
  16. for i,v in pairs(plrs:GetPlayers()) do
  17. if v.MembershipType==Enum.MembershipType.BuildersClub then
  18. table.insert(k,v)
  19. end
  20. end
  21. elseif name=="tbc" then
  22. for i,v in pairs(plrs:GetPlayers()) do
  23. if v.MembershipType==Enum.MembershipType.TurboBuildersClub then
  24. table.insert(k,v)
  25. end
  26. end
  27. elseif name=="obc" then
  28. for i,v in pairs(plrs:GetPlayers()) do
  29. if v.MembershipType==Enum.MembershipType.OutrageousBuildersClub then
  30. table.insert(k,v)
  31. end
  32. end
  33. elseif name=="ios" then
  34. for i,v in pairs(plrs:GetPlayers()) do
  35. if v.OsPlatform=="iOS" then
  36. table.insert(k,v)
  37. end
  38. end
  39. elseif name=="ios" then
  40. for i,v in pairs(plrs:GetPlayers()) do
  41. if v.OsPlatform=="iOS" then
  42. table.insert(k,v)
  43. end
  44. end
  45. elseif name=="pc" then
  46. for i,v in pairs(plrs:GetPlayers()) do
  47. if v.OsPlatform=="Win32" or v.OsPlatform=="Windows_Universal" then
  48. table.insert(k,v)
  49. end
  50. end
  51. elseif name=="premium" then
  52. for i,v in pairs(plrs:GetPlayers()) do
  53. if v.MembershipType==Enum.MembershipType.Premium then
  54. table.insert(k,v)
  55. end
  56. end
  57. end
  58. for i,v in pairs(plrs:GetChildren()) do
  59. if v~=lplr then
  60. local kk=string.lower(v.Name)
  61. if kk:sub(1,#name)==name then
  62. table.insert(k,v)
  63. end
  64. end
  65. end
  66. return k
  67. end
  68. _G.getPlayer = getPlayer
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top