Here is rewroted version with creating void tile and removing after lose. Ofcourse used mocks functions :)
LIB
--[[
Script by Mock the bear
]]
SNAKE = {
_VERSION="1.0 by mock",
---Snake config
itemid=1739,
freeglobalstorage=28103,
itemFood=6394,
flyvoid=460,
controlpos={x=943,y=957,z=6}...