It seems to be really common these days, but I too have a mysterious uncle that recently passed away. As all good uncles are, he was into puzzles and enigmas. After his death I have inherited his house, a really big manor far from the city.
Today I decided to go there to check it out. It took me a while to explore it all. I was hoping to find some of those games he created that I remember playing when I was a child, but I found none. Until I found his bedroom. As soon as I entered that room, something immediately caught my eye. On one of the walls there was a giant metal safe with two pieces of paper taped on it.
The first one was a letter handwritten by him. Here it is:
if you are reading this letter, it means that I am no longer in this world. I have decided to leave one last puzzle for you to solve. Your task is to open this old safe, finding the correct passcode. As you can see you will need to enter a $9$ digit code using its keypad. To make things easier for you, I have decided to use each of the numbers $1$ to $9$ once and only once in the code. To find it you will need to solve the puzzle you see next to this letter, but I'm not going to tell you how. That would be too easy!
Open the safe and all the games I have created during my lifetime will be yours.
Goodbye nephew, I hope you will have fun with this little head-scratcher of mine. Just remember this: being selfish is wrong. You should really care about those around you.
Carl Peter Fuzz.
Here is the other piece of paper:
What should I type to open the safe?