Sorry I try and teach people to "fish" I don't provide the FISH. It is usually pointless because then they come back every 10 minutes looking for another Fish.
In addition your question does not have enough information to provide you with an answer. Even more confusing you asked this in Pathfinder and 5e which are different games systems.
So first which game system are you building in? What "Thing" (Custom Ability, Ability, Racial Ability, Class, Archetype) will this eval script going to run on? Most racial abilities have DC logic built directly into the editor and don't even need a script. Its a few button presses.
Find another Thing to look at in the editor and "COPY" its logic. That is best way to learn to do things in the editor. Finding another Thing that does similar logic and copy it.