The public Text variable known as starText is a reference to the Text-carrying-star UI Text object. Its value was set via drag-and-drop at design time.
The OnChangeCarryingStar (carryingStar) method updates the text property of starText with the value of the starMessage string variable. This method takes a bool argument called carryingStar as input. The default value of the starMessage string tells the user that the player is not carrying the star. However, an if statement tests the value of carryingStar, and if that is true, then the message is changed to inform the player that they are carrying the star.