Changing a sprite depending on variables
I suggest writing it as

currentSprite = playerSprites[4 * (gunUpgrade + 1) + (moveUpgrade - 1)];


Consider laying out the elements of playerSprites so as to require fewer ±1 operations.

Note that you must ensure that gunUpgrade never exceeds 3, and moveUpgrade never exceeds 4.