auto remove hotspot user account

hi.
is there a script on auto remove user account when reached its uptime or session-time?
lately i was accidentally created such script and put it (hotspot on-logout) but i forgot to backup it. so maybe there’s someone already has a solution

thank you