click the green flag and select any object, then read the comments inside of it.
FPS script based of https://en.scratch-wiki.info/wiki/Making_an_FPS_Counter