The script does go in the AI Main. You will have to change the script to use "plrdistwithin=x" instead of "plrwithinzome=x". Like this...
;Artificial Intelligence Script
;created with TextEase
;Header
;desc =on screen text
;Triggers
:state=0:state=1
;DISPLAY THE TEXT
:state=1,plrdistwithin=50:fpgcrawtextsize=32,fpgcrawtextfont=Arial,fpgcrawtextr=255,fpgcrawtextg=255,fpgcrawtextb=255,fpgcrawtextx=50,fpgcrawtexty=80,fpgcrawtext=The easy way to create on-screen text!,state=2
:state=2,plrdistwithin=50:fpgcrawtextsize=32,fpgcrawtextfont=Arial,fpgcrawtextr=255,fpgcrawtextg=255,fpgcrawtextb=255,fpgcrawtextx=50,fpgcrawtexty=80,fpgcrawtext=The easy way to create on-screen text!
;End of Script
When I get to 50 units from the character, the text comes up. When I move more than 50 units away from the character, it disappears.

There's no problem that can't be solved without applying a little scripting.