How to print code output on a separate GUI?

Hi @Programmers, I need help regarding printing the code output in a separate GUI/Text box.

This means, when we run a code in Roblox Script editor, it shows the output on the output window. But what I need is, I want the output to be shown on a Text box (In-Game)

Here’s the GIF, I just want the output of the code to be shown on a separate Text Box/GUI (In-game).
https://i.gyazo.com/cc46c140e130cd51f2f681b906ee1436.gif

Please help me :]
:memo: -Harmony

The first and most obvious thing would be to replace print, error, and warn with custom functions. If you want to get the errors too though, you can use LogService.