Advertisement
Riley_Huntley

Untitled

Dec 18th, 2015
214
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.90 KB | None | 0 0
  1. game.Workspace.ChildAdded:connect(function(nc)
  2. if nc:FindFirstChild'Humanoid' then
  3. local np = game.Players:getPlayerFromCharacter(nc)
  4. math.randomseed(tick())
  5. local GID = 938940
  6. local KGL = 2704409
  7. -- Regiments
  8. local VarShirts = {}
  9. --[[VarRanks = {
  10. [25]=163704488,[40]=163704530,[35]=163704575 --Ranks 2 and 3
  11. } --]]
  12.  
  13. local Uniforms = {
  14. [5] = {325316819,325795714},
  15. [10] = {323562202,323562024}, -- ranker (Pants, Shirt)
  16. [20] = {323562202,324061004},
  17. [30] = {323562202,324061018},
  18. [40] = {323562202,324060942},
  19. [50] = {323562202,324060974},
  20. [60] = {323562202,326463840},--
  21. [70] = {323562202,326519059},
  22. [80] = {323562202,326519246},
  23. [90] = {323562202,323562886},
  24. [110] = {323562202,326521504},
  25. [115] = {323562202,326521504},
  26. [120] = {323562202,326521504},
  27. [125] = {323562202,326521504},
  28. [255] = {323562202,326521504},
  29. }
  30.  
  31.  
  32.  
  33.  
  34. local function give(char,pants,shirt)
  35. ypcall(function()
  36. repeat wait() until char:FindFirstChild("Torso") and char:FindFirstChild("Humanoid")
  37. wait(2)
  38. for _,v in pairs(char:children()) do if v:IsA("Shirt") or v:IsA("Pants") then v:destroy() end end
  39. local p = Instance.new("Pants",char)
  40. local s = Instance.new("Shirt",char)
  41. p.PantsTemplate = "http://www.roblox.com/asset/?id="..pants-1
  42. s.ShirtTemplate = "http://www.roblox.com/asset/?id="..shirt-1
  43. for _,v in pairs(char:children()) do if v:IsA("CharacterMesh") then v:Destroy() end end
  44. end)
  45. end
  46.  
  47.  
  48. --np.CharacterAdded:connect(function(nc)--
  49. if np.TeamColor == (BrickColor.new("Bright red") or BrickColor.new("White") or BrickColor.new("Black")) and game.Workspace['KGL Uniforms'].KGL.Value == true and np.Name ~= "Lightrater" and
  50. np.Name ~= "alertcoderf" and np.Name ~= "sy1892" and np.Name ~= "LordRichardFletcher" and np.Name ~= "SirAdamFletcher"
  51. then
  52. ------------------
  53. if np:IsInGroup(KGL) and np:IsInGroup(GID) then
  54.  
  55.  
  56. local rank = np:GetRankInGroup(KGL)
  57.  
  58. for n,v in pairs(Uniforms) do
  59. if rank == n then
  60. give(np.Character,v[1],v[2])
  61. break
  62. end
  63. end
  64. end
  65.  
  66. ------------------
  67. end
  68. end
  69. end)
  70.  
  71. --[[
  72. The below content is credited to SirAdamFletcher, SAF <3
  73. --]]
  74. local LoadCommand = ":regimental off"
  75. local RemoveCommand = ":regimental on"
  76.  
  77. function CheckAdmin(player)
  78. local v = false
  79. if player:GetRankInGroup(938940)>= 33 or player:GetRankInGroup(2704409)>= 50 then
  80. v = true
  81. end
  82. return v
  83. end
  84.  
  85. game.Players.PlayerAdded:connect(function(Player)
  86. Player.Chatted:connect(function(Message)
  87. if CheckAdmin(Player) and string.lower(string.sub(Message,1,string.len(LoadCommand))) == string.lower(LoadCommand) then
  88. game.Workspace['KGL Uniforms'].KGL.Value = false
  89. print("game.Workspace['KGL Uniforms'].KGL.Value = false")
  90. elseif CheckAdmin(Player) and string.lower(string.sub(Message,1,string.len(RemoveCommand))) == string.lower(RemoveCommand) then
  91. game.Workspace['KGL Uniforms'].KGL.Value = true
  92. print("game.Workspace['KGL Uniforms'].KGL.Value = true")
  93. end
  94. end)
  95. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement