The FGUI library is a small library created by Forecaster for handling drawing and using on-screen buttons. It also has a method for drawing text centered on the screen.
The following methods are in this library:
createButton(id: string, text: string, background_color: number, x1: number, y1: number, x2: number, y2: number)
clearButton(id: string)
testButton(x: number, y: number)
exampleOnTouch(name: string, screen: address, x: number, y: number, button: number, player: string)
writeTextCentered(text: string, line: number, color: number, background_color: number)
You can view the actual lua code by clicking here. Right-click on the link to save the file, or open and copy-paste the code into Minecraft.