How to write a condition that checks TP?

Does anyone know how to set up a conditional branch that checks for the amount of TP a player has?
You would need to use the script.

Code:
Conditional Branch: Script: $gameActors.actor(5).tp > 50
You would need to use the script.

Conditional Branch: Script: $gameActors.actor(5).tp > 50
Thank you very much.

Original thread: https://forums.rpgmakerweb.com/threads/how-to-write-a-condition-that-checks-tp.51407/