small performance fix playerscript