--// initialize team changing function //--

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
