Also, you must avoid copy-paste. I saw that you did that for the player's actions. You should put those on a function instead. Else it'll be very tedious when you try to add new stuff for the player(Example: talk, open menu, etc).