How do i make a pluguin fire a function when the user types a keyword

how do i make the script detect what is the script the player is typing at
how to make it detect when player wrote something in the script