local toggles = require("scripts.wheels.toggles") local wheels = { toggles } for i, v in pairs(wheels) do if i == 1 then action_wheel:setPage(v) end if #wheels ~= 1 then v:newAction() :title("to next page") :item("minecraft:arrow") :onLeftClick(function () local index = (i + 1) > #wheels and 1 or (i + 1) action_wheel:setPage(wheels[index]) end) end end