Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ```lua
- local Template = script:WaitForChild("Template")
- local Player = game.Players.LocalPlayer
- local tools = game.ReplicatedStorage.PoliceTools:GetChildren()
- local group = 9144252
- local click = script.Parent.Parent.Parent.Click1
- if Player.TeamColor == BrickColor.new("Electric blue") and BrickColor.new("Cocoa") then
- for i,v in pairs(tools) do
- local new = Template:Clone()
- new.ToolName.Text = v.Name
- new.Parent = script.Parent
- new.Activate.MouseButton1Down:Connect(function(plr)
- if not Player.Backpack:FindFirstChild(v.Name) then
- if Player:GetRankInGroup(group) >= v:WaitForChild("RoleID").Value then
- click:Play()
- game.ReplicatedStorage.ArmoryRemotes.give:FireServer(v.Name)
- new.BackgroundColor3 = Color3.fromRGB(255,255,255)
- new.design.BackgroundColor3 = Color3.fromRGB(22,22,22)
- new.ToolName.TextColor3 = Color3.fromRGB(0,0,0)
- new.ToolName.Text = "Successfully given tool."
- wait(.5)
- new.BackgroundColor3 = Color3.fromRGB(22,22,22)
- new.design.BackgroundColor3 = Color3.fromRGB(255,255,255)
- new.ToolName.TextColor3 = Color3.fromRGB(255,255,255)
- new.ToolName.Text = v.Name
- else
- click:Play()
- new.BackgroundColor3 = Color3.fromRGB(22,22,22)
- new.design.BackgroundColor3 = Color3.fromRGB(255,255,255)
- new.ToolName.TextColor3 = Color3.fromRGB(255,255,255)
- new.ToolName.Text = "ERROR"
- wait(.5)
- new.BackgroundColor3 = Color3.fromRGB(22,22,22)
- new.design.BackgroundColor3 = Color3.fromRGB(255,255,255)
- new.ToolName.TextColor3 = Color3.fromRGB(255,255,255)
- new.ToolName.Text = v.Name
- end
- end
- end)
- end
- end
- ```
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement