Script to check attendance