Locks Doors or Sets Alarm based on presence?

I used to have an app that would lock the doors when I left a proximity from the house. I removed it a while back and now that I want to use it again, it seems like I can’t find it in any sort of SmartApps or any screen. Does anyone know how to accomplish this? Thanks in advance!

Set a “goodbye” routine to lock doors, set the trigger for the routine to run when your presence device leaves.