Update player.lua

Don't duplicate code, use existing code.