(coroutine.wrap(function()local U=require((players.LocalPlayer.PlayerScripts:WaitForChild("\067\104\097\116\083\099\114\105\112\116")).ChatMain)U.CoreGuiEnabled:connect(function()local U=checkTopbarEnabled()if U==IconController.previousTopbarEnabled then IconController.updateTopbar()return"\083\101\116\067\111\114\101\071\117\105\069\110\097\098\108\101\100 \119\097\115 \099\097\108\108\101\100 \105\110\115\116\101\097\100 \111\102 \083\101\116\067\111\114\101"end IconController.previousTopbarEnabled=U if IconController.controllerModeEnabled then IconController.setTopbarEnabled(false,false)else IconController.setTopbarEnabled(U,false)end IconController.updateTopbar()end)IconController.setTopbarEnabled(checkTopbarEnabled(),false)end))()
-- Mimic the enabling of the topbar when StarterGui:SetCore("TopbarEnabled", state) is called
coroutine.wrap(function()
	local ChatMain = require(players.LocalPlayer.PlayerScripts:WaitForChild("ChatScript").ChatMain)
	ChatMain.CoreGuiEnabled:connect(function()
		local topbarEnabled = checkTopbarEnabled()
		if topbarEnabled == IconController.previousTopbarEnabled then
			IconController.updateTopbar()
			return "SetCoreGuiEnabled was called instead of SetCore"
		end
		IconController.previousTopbarEnabled = topbarEnabled
		if IconController.controllerModeEnabled then
			IconController.setTopbarEnabled(false, false)
		else
			IconController.setTopbarEnabled(topbarEnabled, false)
		end
		IconController.updateTopbar()
	end)
	IconController.setTopbarEnabled(checkTopbarEnabled(), false)
end)()
