Problem while switching to legacy chat to TextchatService

i had a working typing bubble script that works perfectly on the legacy chat service but i cant find a way to convert it to the Textchatservice. What this script does is pop up a typing bubble above ur head only when the player is typing their are 2 scripts one for server and the other in client ( put in startergui). Any help to convert this script to the latest Textchatservice would be greatly appreciated

server script

game.Players.PlayerAdded:Connect(function(Player)
	Player.CharacterAppearanceLoaded:Connect(function(Character)
		local TypingBubble = script.TypingBubble:Clone()
		TypingBubble.Parent = Character.Head
	end)
end)

game.ReplicatedStorage.ToggleTypingBubble.OnServerEvent:Connect(function(Player, Toggle)
	Player.Character.Head.TypingBubble.Enabled = Toggle
end)

client script ( in startergui )

local Player = game.Players.LocalPlayer
local UserInputService = game:GetService("UserInputService")

UserInputService.TextBoxFocused:Connect(function(TextBox)
	if TextBox.Name == "ChatBar" then
		game.ReplicatedStorage.ToggleTypingBubble:FireServer(true)
	end
end)

UserInputService.TextBoxFocusReleased:Connect(function(TextBox)
	if TextBox.Name == "ChatBar" then
		game.ReplicatedStorage.ToggleTypingBubble:FireServer(false)
	end
end)

My guess is the name of the “ChatBar” changed , but i dont know what it has changed to for TextChatService. Please helpe me convert the code to the latest TextChatService

The chat window is located under CoreGui and the input is unhelpfully named “TextBox” so it’s impossible to determine whether it’s been clicked on using this method and I do not know of an alternative