game.Players.LocalPlayer.Changed:connect(function()if checkTeam()==true then script.Parent.Parent.SpectateButton.Visible=true else script.Parent.Parent.SpectateButton.Visible=false resetGui()end end)if checkTeam()==true then script.Parent.Parent.SpectateButton.Visible=true else script.Parent.Parent.SpectateButton.Visible=false resetGui()end

game.Players.LocalPlayer.Changed:connect(function()
	if checkTeam() == true then
		script.Parent.Parent.SpectateButton.Visible = true
	else
		script.Parent.Parent.SpectateButton.Visible = false
		resetGui()
	end
end)

if checkTeam() == true then
	script.Parent.Parent.SpectateButton.Visible = true
else
	script.Parent.Parent.SpectateButton.Visible = false
	resetGui()
end
