Unfortunately, the gun code in Slender does not work. If you saw a video claiming it does, that was simply a prank.
Slender is designed to be a tense, weaponless horror experience, so there is no legitimate gun code to unlock. Enjoy the game for the frightening atmosphere it was built to deliver.