I've made sure that images are only shown to the player who opened the backpack and stuff, so don't post 'you forgot to add the id parameter at the end of image function' without actually reading the code.
Now it may be ineffective and I could be using some for loops and functions that 'are unused/bad/getting deprecated nuuuu don't use them', so please don't post only to point out that.
I won't post the whole code on the forum, here's a pastebin link: http://pastebin.com/uZdfTcKR
Thank you in advance!