in reply to can a script change itself?

You probably could do some jiggery-pokery with $0, but it sounds like a mess. Why not just create UIDs on the fly e.g. from time-in-seconds + large random number + process id.