Edit:
damn, wrong section
drawLine(path, x1, y1, x2, y2) 	local dir = -math.deg(math.atan2(x1 - x2, y1 - y2)) 	local dist = math.sqrt((x1 - x2)^2 + (y1 - y2)^2) 	local x, y = x1 + math.sin(math.rad(dir)) * dist/2, y1 - math.cos(math.rad(dir)) * dist/2 	local img = image(path, x, y, 1) 	imagepos(img, x, y, dir) 	imagescale(img, 1, dist) end