Properties Key (ROLE)?

Trying to find a script where the moment i buy the house i get automaticaly a role who unlocks that house and the house turns red after getting owned