Is there another script to get the keys?

I am making new levels and I would like to know if there is another script for the world besides that of the five keys.
In which we pick up the key on one level, then open a door on another level.
In which we pick up the key on one level, then open a door on another level.