read the title it says everything i need to say
https://wiki.roblox.com/index.php?title=API:Class/TextBox/IsFocused
Not sure what you meant by that but this basically returns true or false depending on if the player is typing into the TextBox or not.