should replace var3 with chunkcordnaite from var1.getplayerposition(); and remove var4 and var5 to lighten the memory usage, and have less assignments