local rows = {} local rowsb = {} for i = 1, 25 do rows[i] = {} rowsb[i] = {} for j = 1, 25 do rows[i][j] = math.random(10) rowsb[i][j] = rows[i][j] end end for i = 1, 25 do for j = 1, 25 do if(i-1 >= 1) then rowsb[i][j] = rowsb[i][j] + (rows[i-1][j])/2 end if(i+1 <= 25) then rowsb[i][j] = rowsb[i][j] + (rows[i+1][j])/2 end if(j-1 >= 1) then rowsb[i][j] = rowsb[i][j] + (rows[i][j-1])/2 end if(j+1 <= 25) then rowsb[i][j] = rowsb[i][j] + (rows[i][j+1])/2 end if (rowsb[i][j] >= 19) then levelgen:addLevelLine("BarrierMaker 50 " .. i/5 .. " " .. j/5 .. " " .. i/5 .. " " .. (j + 1)/5) end end end