I’ve also tried:
local ReplicatedStorage = game:GetService(“ReplicatedStorage”)
local MarketService = game:GetService(“MarketplaceService”)
local Players = game:GetService(“Players”)
local GamepassID = 68207514
local Tools = {“M40A5”}
local ToolsParent = ReplicatedStorage.ACS_Engine.ToolStorage.Gamepasses
Players.PlayerAdded:Connect(function(Player)
Player.CharacterAdded:Connect(function(Character)
if MarketService:UserOwnsGamePassAsync(Player.UserId, GamepassID) and Player:FindFirstChild(“Team”) then
if Player.Team == “CITIZEN” then
for ToolObject = 1, #Tools do
local CloneTool = ToolsParent:FindFirstChild(Tools[ToolObject])
if CloneTool then
CloneTool:Clone()
CloneTool.Parent = Player.Backpack
end
end
end
end
end)
end)
And:
local ReplicatedStorage = game:GetService(“ReplicatedStorage”)
local MarketService = game:GetService(“MarketplaceService”)
local Players = game:GetService(“Players”)
local GamepassID = 68207514
local Tools = {“M40A5”}
local ToolsParent = ReplicatedStorage.ACS_Engine.ToolStorage.Gamepasses
Players.PlayerAdded:Connect(function(Player)
Player.CharacterAdded:Connect(function(Character)
if MarketService:UserOwnsGamePassAsync(Player.UserId, GamepassID) and Player:FindFirstChild(“Team”) then
if Player.Team.Name == “CITIZEN” then
for ToolObject = 1, #Tools do
local CloneTool = ToolsParent:FindFirstChild(Tools[ToolObject])
if CloneTool then
CloneTool:Clone()
CloneTool.Parent = Player.Backpack
end
end
end
end
end)
end)
And:
local ReplicatedStorage = game:GetService(“ReplicatedStorage”)
local MarketService = game:GetService(“MarketplaceService”)
local Players = game:GetService(“Players”)
local GamepassID = 68207514
local Tools = {“M40A5”}
local ToolsParent = ReplicatedStorage.ACS_Engine.ToolStorage.Gamepasses
Players.PlayerAdded:Connect(function(Player)
Player.CharacterAdded:Connect(function(Character)
if MarketService:UserOwnsGamePassAsync(Player.UserId, GamepassID) and Player:FindFirstChild(“Team”) then
if Player.Team.TeamColor.Color == “Camo” then
for ToolObject = 1, #Tools do
local CloneTool = ToolsParent:FindFirstChild(Tools[ToolObject])
if CloneTool then
CloneTool:Clone()
CloneTool.Parent = Player.Backpack
end
end
end
end
end)
end)
All of these have failed. Any help would be appreciated, thank you.
There are two ways you can do this, the first one is to check if the player has the gamepass, and then check if the player is in the “CITIZEN” team.
local ReplicatedStorage = game:GetService(“ReplicatedStorage”)
local MarketService = game:GetService(“MarketplaceService”)
local Players = game:GetService(“Players”)
local GamepassID = 68207514
local Tools = {“M40A5”}
local ToolsParent = ReplicatedStorage.ACS_Engine.ToolStorage.Gamepasses
Players.PlayerAdded:Connect(function(Player)
Player.CharacterAdded:Connect(function(Character)
if MarketService:UserOwnsGamePassAsync(Player.UserId, GamepassID) then
if Player.Team.Name == “CITIZEN” then
for ToolObject = 1, #Tools do
local CloneTool = ToolsParent:FindFirstChild(Tools[ToolObject])
if CloneTool then
CloneTool:Clone()
CloneTool.Parent = Player.Backpack
end
end
end
end
end)
end)
The second way is to check if the player is in the “CITIZEN” team, and then check if the player has the gamepass.
local