on place: if event-block is any door: set {_c1} to random integer between 1 and 99999 set {_c2} to random integer between 1 and 99999 set {_c3} to {_c1}+{_c2} set {_c4} to "a" or "b" or "c" or "d" or "h" set {_code} to "%{_c3}%%{_c4}%%{_c3}%*0.25%{_c4}%" set {door::%location of event-block%} to {_code} give 1 stick named "Klucz: &6%{_code}%" to player stop on break: if event-block is any door: if player has stick named "Klucz: &6%{door::%location of event-block%}%": stop cancel event on rightclick: if event-block is any door: if player has stick named "Klucz: &6%{door::%location of event-block%}%": stop cancel event