Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- SAF, 2015, <3
- local sp = script.Parent
- local player = script.Parent.Parent.Parent
- local group = 945877
- local groups = { 2704409, --KGL // King's German Legion
- 2689795, --ROF // 51st Regiment of Foot
- 1141913, -- LDR // 20th Light Regiment
- 1046805, -- CSG // 1st Battalion Coldstream Guards
- 946296, -- RAR // Royal Artillery Regiment
- 945877, -- RIF // TGAB's 95th Rifles
- }
- sp.Button.MouseButton1Click:connect(function()
- if player.TeamColor==BrickColor.new("Bright red") then
- local numberIn = 0
- for _,group in pairs (groups) do
- if player:IsInGroup(group) then
- numberIn = numberIn + 1
- end
- end
- if numberIn < 1 and player:IsInGroup(group) then
- local findshirt = player.Character:FindFirstChild("Shirt")
- if findshirt then
- findshirt:Remove()
- print("Destroyed shirt.")
- end
- local findpants = player.Character:FindFirstChild("Pants")
- if findpants then
- findpants:Remove()
- print("Destroyed pants.")
- end
- if player:GetRankInGroup(group) == 2 then
- player.PlayerGui.RegimentalUniform.Error3.Visible = true
- wait(4)
- player.PlayerGui.RegimentalUniform.Error3.Visible = false
- print("Error 3: "..player.Name.." needs to tryout for a regimental uniform.")
- -- Tryout/Enlist
- elseif player:GetRankInGroup(group) >= 5 and not player:GetRankInGroup(group) > 30 then
- local newshirt = Instance.new("Shirt",player.Character)
- newshirt.ShirtTemplate = "http://www.roblox.com/asset/?id=196438165"
- local newpants = Instance.new("Pants",player.Character)
- newpants.PantsTemplate = "http://www.roblox.com/asset/?id=163177472"
- -- Musician/Rifleman
- elseif player:GetRankInGroup(group) == 40 then
- local newshirt = Instance.new("Shirt",player.Character)
- newshirt.ShirtTemplate = "http://www.roblox.com/asset/?id=196438165"
- local newpants = Instance.new("Pants",player.Character)
- newpants.PantsTemplate = "http://www.roblox.com/asset/?id=163177472"
- -- Corporal
- elseif player:GetRankInGroup(group) == 50 then
- local newshirt = Instance.new("Shirt",player.Character)
- newshirt.ShirtTemplate = "http://www.roblox.com/asset/?id=196438184"
- local newpants = Instance.new("Pants",player.Character)
- newpants.PantsTemplate = "http://www.roblox.com/asset/?id=163177472"
- -- Sergeant
- elseif player:GetRankInGroup(group) == 70 then
- local newshirt = Instance.new("Shirt",player.Character)
- newshirt.ShirtTemplate = "http://www.roblox.com/asset/?id=163847530"
- local newpants = Instance.new("Pants",player.Character)
- newpants.PantsTemplate = "http://www.roblox.com/asset/?id=163177472"
- -- Colour Sergeant
- elseif player:GetRankInGroup(group) >= 80 and not player:GetRankInGroup(group) > 90 then
- local newshirt = Instance.new("Shirt",player.Character)
- newshirt.ShirtTemplate = "http://www.roblox.com/asset/?id=163847710"
- local newpants = Instance.new("Pants",player.Character)
- newpants.PantsTemplate = "http://www.roblox.com/asset/?id=163177472"
- -- Officer in Training / Advanced Rifleman
- elseif player:GetRankInGroup(group) >= 100 and not player:GetRankInGroup(group) > 110 then
- local newshirt = Instance.new("Shirt",player.Character)
- newshirt.ShirtTemplate = "http://www.roblox.com/asset/?id=163847817"
- local newpants = Instance.new("Pants",player.Character)
- newpants.PantsTemplate = "http://www.roblox.com/asset/?id=163177472"
- -- Lieutenant + Elite Rifleman
- elseif player:GetRankInGroup(group) >= 120 then
- local newshirt = Instance.new("Shirt",player.Character)
- newshirt.ShirtTemplate = "http://www.roblox.com/asset/?id=163847948"
- local newpants = Instance.new("Pants",player.Character)
- newpants.PantsTemplate = "http://www.roblox.com/asset/?id=163177472"
- -- High Command+
- else
- print("Is not in group "..group.." or numberIn > 1")
- end
- if numberIn > 1 then
- player.PlayerGui.RegimentalUniform.Error1.Visible = true
- wait(4)
- player.PlayerGui.RegimentalUniform.Error1.Visible = false
- print("Error 1: "..player.Name.." is in more than one regiment.")
- end
- if numberIn == 0 then
- player.PlayerGui.RegimentalUniform.Error2.Visible = true
- wait(4)
- player.PlayerGui.RegimentalUniform.Error2.Visible = false
- print("Error 2: "..player.Name.." is not in a regiment.")
- end
- end
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement