it is good, but i think it shouldnt make new elements, but this feature is the thing i miss from powder game the most.
function drawPartChecker(x,y,w,h,oneel,twoel)
for ry = y, h, 1 do
for rx = x, w, 1 do
if ry % 2 == 0 or rx % 2 == 0 then
tpt.create(rx,ry,oneel)
else
tpt.create(rx,ry,twoel)
end
end
end
end