Show an FPS window.

I want to make a window showing the game's FPS for the player to see and help me telling how is the game performing in their PCs. Is there some kind of variable with such value?

To clarify - you want an in-game window that shows your computers current performance, to see whether it can handle your game ... ? By FPS I would imagine you mean Frames Per Second? Because at first, I thought you were talking about First Person Shooters.

If you want to display your Maximum number of frames queued up by graphics driver, then you add this to your script:

static var maxQueuedFrames : int

function Update(){

This will return to your console, if you want it in a GUI, then just add a label in an OnGUI function with the maxQueuedFrames as your label.

Or there is: maxQueuedFrames - The total number of frames that have passed.

If you would like a more graphical display I would suggest FPS Graph, it will give you the frame rate and other performance indicators.