Advertisement
Riley_Huntley

Untitled

Dec 1st, 2015
162
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 4.25 KB | None | 0 0
  1. -- SAF, 2015, <3
  2. local sp = script.Parent
  3. local player = script.Parent.Parent.Parent
  4. local group = 945877
  5. local groups = {    2704409, --KGL // King's German Legion
  6.                     2689795, --ROF // 51st Regiment of Foot
  7.                     1141913, -- LDR // 20th Light Regiment
  8.                     1046805, -- CSG // 1st Battalion Coldstream Guards
  9.                     946296, -- RAR // Royal Artillery Regiment
  10.                     945877, -- RIF // TGAB's 95th Rifles
  11.     }
  12.  
  13. sp.Button.MouseButton1Click:connect(function()
  14.  
  15. if player.TeamColor==BrickColor.new("Bright red") then
  16.     local numberIn = 0
  17.  
  18.     for _,group in pairs (groups) do
  19.     if player:IsInGroup(group) then
  20.     numberIn = numberIn + 1
  21.     end
  22.     end
  23.  
  24.     if numberIn < 1 and player:IsInGroup(group) then
  25.        
  26.         local findshirt = player.Character:FindFirstChild("Shirt")
  27.         if findshirt then
  28.             findshirt:Remove()
  29.             print("Destroyed shirt.")  
  30.         end
  31.        
  32.         local findpants = player.Character:FindFirstChild("Pants")
  33.         if findpants then
  34.             findpants:Remove()
  35.             print("Destroyed pants.")  
  36.         end
  37.             if player:GetRankInGroup(group) == 2 then
  38.             player.PlayerGui.RegimentalUniform.Error3.Visible = true
  39.             wait(4)
  40.             player.PlayerGui.RegimentalUniform.Error3.Visible = false
  41.             print("Error 3: "..player.Name.." needs to tryout for a regimental uniform.")
  42.             -- Tryout/Enlist
  43.         elseif player:GetRankInGroup(group) >= 5 and not player:GetRankInGroup(group) > 30 then
  44.             local newshirt = Instance.new("Shirt",player.Character)
  45.             newshirt.ShirtTemplate = "http://www.roblox.com/asset/?id=196438165"
  46.             local newpants = Instance.new("Pants",player.Character)
  47.             newpants.PantsTemplate = "http://www.roblox.com/asset/?id=163177472"
  48.             -- Musician/Rifleman
  49.         elseif player:GetRankInGroup(group) == 40 then
  50.             local newshirt = Instance.new("Shirt",player.Character)
  51.             newshirt.ShirtTemplate = "http://www.roblox.com/asset/?id=196438165"
  52.             local newpants = Instance.new("Pants",player.Character)
  53.             newpants.PantsTemplate = "http://www.roblox.com/asset/?id=163177472"
  54.             -- Corporal
  55.         elseif player:GetRankInGroup(group) == 50 then
  56.             local newshirt = Instance.new("Shirt",player.Character)
  57.             newshirt.ShirtTemplate = "http://www.roblox.com/asset/?id=196438184"
  58.             local newpants = Instance.new("Pants",player.Character)
  59.             newpants.PantsTemplate = "http://www.roblox.com/asset/?id=163177472"
  60.             -- Sergeant
  61.         elseif player:GetRankInGroup(group) == 70 then
  62.             local newshirt = Instance.new("Shirt",player.Character)
  63.             newshirt.ShirtTemplate = "http://www.roblox.com/asset/?id=163847530"
  64.             local newpants = Instance.new("Pants",player.Character)
  65.             newpants.PantsTemplate = "http://www.roblox.com/asset/?id=163177472"
  66.             -- Colour Sergeant
  67.         elseif player:GetRankInGroup(group) >= 80 and not player:GetRankInGroup(group) > 90 then
  68.             local newshirt = Instance.new("Shirt",player.Character)
  69.             newshirt.ShirtTemplate = "http://www.roblox.com/asset/?id=163847710"
  70.             local newpants = Instance.new("Pants",player.Character)
  71.             newpants.PantsTemplate = "http://www.roblox.com/asset/?id=163177472"
  72.             -- Officer in Training / Advanced Rifleman
  73.         elseif player:GetRankInGroup(group) >= 100 and not player:GetRankInGroup(group) > 110 then
  74.             local newshirt = Instance.new("Shirt",player.Character)
  75.             newshirt.ShirtTemplate = "http://www.roblox.com/asset/?id=163847817"
  76.             local newpants = Instance.new("Pants",player.Character)
  77.             newpants.PantsTemplate = "http://www.roblox.com/asset/?id=163177472"
  78.             -- Lieutenant + Elite Rifleman
  79.         elseif player:GetRankInGroup(group) >= 120 then
  80.             local newshirt = Instance.new("Shirt",player.Character)
  81.             newshirt.ShirtTemplate = "http://www.roblox.com/asset/?id=163847948"
  82.             local newpants = Instance.new("Pants",player.Character)
  83.             newpants.PantsTemplate = "http://www.roblox.com/asset/?id=163177472"
  84.             -- High Command+
  85.     else
  86.         print("Is not in group "..group.." or numberIn > 1")
  87.  
  88.     end
  89.     if numberIn > 1 then
  90.         player.PlayerGui.RegimentalUniform.Error1.Visible = true
  91.         wait(4)
  92.         player.PlayerGui.RegimentalUniform.Error1.Visible = false
  93.         print("Error 1: "..player.Name.." is in more than one regiment.")
  94.     end
  95.     if numberIn == 0 then
  96.         player.PlayerGui.RegimentalUniform.Error2.Visible = true
  97.         wait(4)
  98.         player.PlayerGui.RegimentalUniform.Error2.Visible = false
  99.         print("Error 2: "..player.Name.." is not in a regiment.")
  100.     end
  101. end
  102. end
  103. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement