The bottom line is that there is a variable that gives the text. With each press of the "button" it changes. It is necessary to record all these messages and display them in the form of history. The story itself will be needed only for the current session, so after using it you need to reset it.
Tell me how it is better to implement?