Advertisement
LawMixer

If the player is on a team with the color "Electric blue", it gives them the GUI, but if they are o

Jun 29th, 2021
1,173
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 2.05 KB | None | 0 0
  1. ```lua
  2. local Template = script:WaitForChild("Template")
  3. local Player = game.Players.LocalPlayer
  4. local tools = game.ReplicatedStorage.PoliceTools:GetChildren()
  5. local group = 9144252
  6. local click = script.Parent.Parent.Parent.Click1
  7.  
  8. if Player.TeamColor == BrickColor.new("Electric blue") and BrickColor.new("Cocoa") then
  9.     for i,v in pairs(tools) do
  10.         local new = Template:Clone()
  11.         new.ToolName.Text = v.Name
  12.         new.Parent = script.Parent
  13.         new.Activate.MouseButton1Down:Connect(function(plr)
  14.             if not Player.Backpack:FindFirstChild(v.Name) then
  15.                 if Player:GetRankInGroup(group) >= v:WaitForChild("RoleID").Value then
  16.                     click:Play()
  17.                     game.ReplicatedStorage.ArmoryRemotes.give:FireServer(v.Name)
  18.                     new.BackgroundColor3 = Color3.fromRGB(255,255,255)
  19.                     new.design.BackgroundColor3 = Color3.fromRGB(22,22,22)
  20.                     new.ToolName.TextColor3 = Color3.fromRGB(0,0,0)
  21.                     new.ToolName.Text = "Successfully given tool."
  22.                     wait(.5)
  23.                     new.BackgroundColor3 = Color3.fromRGB(22,22,22)
  24.                     new.design.BackgroundColor3 = Color3.fromRGB(255,255,255)
  25.                     new.ToolName.TextColor3 = Color3.fromRGB(255,255,255)
  26.                     new.ToolName.Text = v.Name
  27.                 else
  28.                     click:Play()
  29.                     new.BackgroundColor3 = Color3.fromRGB(22,22,22)
  30.                     new.design.BackgroundColor3 = Color3.fromRGB(255,255,255)
  31.                     new.ToolName.TextColor3 = Color3.fromRGB(255,255,255)
  32.                     new.ToolName.Text = "ERROR"
  33.                     wait(.5)
  34.                     new.BackgroundColor3 = Color3.fromRGB(22,22,22)
  35.                     new.design.BackgroundColor3 = Color3.fromRGB(255,255,255)
  36.                     new.ToolName.TextColor3 = Color3.fromRGB(255,255,255)
  37.                     new.ToolName.Text = v.Name
  38.                 end
  39.             end
  40.            
  41.         end)
  42.     end
  43. end
  44. ```
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement