That is the script when I use it it gives no errors in the console but also does not work. It is a normal script as the teaming appears not to work in local scripts. I hope I can get an answer soon.
Note: the script is meant for a TextButton.
local mps = game:GetService("MarketplaceService") local gamepass = 5830313 function Click() game.Players.PlayerAdded:Connect(function(player) while true do if mps:UserOwnsGamePassAsync(player.UserId,gamepass) then plr.TeamColor = BrickColor.new("Plum") else print("Player does not own pass.") end wait(5) end end) end script.Parent.MouseButton1Click:connect(Click)