os.sleep(2) function creeperDance() -- クリーパーのダンス for i=1, 2 do -- 前進を2回 turtle.forward() end for i=1, 4 do -- 左ターンを4回 turtle.turnLeft() end for i=1, 2 do -- 2回後退 turtle.back() end end function sheepDance() -- 羊のダンス for i=1, 4 do -- 上へあがって右へターン turtle.up() turtle.turnRight() turtle.forward() end for i=1, 4 do -- 下へ降りて左へターン turtle.down() turtle.turnLeft() turtle.forward() end end function chikenDance() -- ニワトリのダンス for i=1, 4 do -- 上にあがって下に降りてを4回 turtle.up() turtle.down() end end -- メインの処理 for i=1, 50 do-- 50回繰り返す if i%3 == 0 and i%5 == 0 then chikenDance() -- ニワトリのダンスを呼び出す elseif i%3 == 0 then creeperDance() -- クリーパーのダンスを呼び出す elseif i%5 == 0 then sheepDance() -- 羊のダンスを呼び出す else turtle.forward() end end