So I have this team change script in my team change GUI. I want specific team change buttons to only work if you have the right gamepass. How would I go about doing that? current script:
local teamname = "(Captain)"
local button = script.Parent
local player = script.Parent.Parent.Parent.Parent.Parent
local gui = script.Parent.Parent.Parent
button.MouseButton1Click:connect(function()
player.TeamColor = BrickColor.new "(Really black)"
player.Character.Huminoid.Health = 0
gui.Enabled = false
gui.ResetOnSpawn = false
end)?

1 comment
I put this into my button, made sure the team color was the same and added the gamepass ID and it didnt work!