Job Autowanted Code Help

So I’m trying to make it so when a player changes jobs to this particular job or respawn as this job, the server will automatically want them upon these 2 events. Thing is, no clue how to do that. I think I got the jist of what’s SUPPOSED to happen, but haven’t been able to make it work. Any help?

www.coderhire.com