Version = "1.0"
if debug.getinfo(gg.makeRequest).isvararg ~= false then print("安全") else gg.alert("你个SB") os.exit() end
m = os.time()
function json(str) if str==nil or str=="" then return end return load(str)()end
url = 'https://gg.bxdlc.cn/ybq/api2.php'
parameter = 'type=oddWord&user=485189608&id=726'
data = gg.makeRequest(url,post,parameter).content

function yy()
yiyan = gg.makeRequest("https://v1.hitokoto.cn/").content
if yiyan == nil then return "" else content=yiyan:match("hitokoto\":\"(.-)\"") from=yiyan:match("from\":\"(.-)\"")  return "\n每日一言："..content.."\n      ----"..from end
end
function configurations()
  nr = load(data:match("【脚本配置】(.-)【脚本配置】"))()
  if nr.Switch == "开" then else gg.alert("服务器断开："..nr.tip,"退出脚本") os.exit() end
  if nr.announcement == "" then else gg.alert("公告："..nr.announcement,"知道了") end
  if nr.edition == Version then print("当前最新版本") else if gg.alert("发现新版本："..nr.edition.."\n更新内容："..nr.UpContent,"取消稍后更新","复制更新链接") == 1 then else gg.copyText(nr.link) gg.toast("链接复制成功快去浏览器粘贴更新吧！") os.exit() end end
end
if data == nil then 
  title = {}
  link = {}
  Status = "⚠️未连接"
elseif json(data).code == "-2" then 
  title = {}
  link = {}
  Status = "🌿链接成功\n系统错误"
elseif json(data).code == "-1" then 
  title = {}
  link = {}
  Status = "🌿链接成功\n提交的参数类型错误。\n请联系管理员修复。"
elseif json(data).id == "" then 
  title = {}
  link = {}
  Status = "🌿链接成功\n文档都不存在了，你还用这个借口，你土不土啊？"
else
  title = load(data:match("【标题】(.-)【标题】"))()
  link = load(data:match("【链接】(.-)【链接】"))()
  Status = "🔰服务器链接成功🔰\n全网启动："..json(data).statistics.."次👻\n发布日期:"..json(data).time.."\n更新日期:"..json(data).update_time
  configurations()
end
function Main(title,link,Status)
  bt = gg.choice(title,0,"网络情况： "..Status..yy())
  if bt ~= nil then 
    if link[bt] == nil then gg.alert("⚠警告⚠\n\n参数错误，请联系管理员修复") Main(title,link,Status) end
    if string.find(link[bt],"http") then Scriptnr = gg.makeRequest(link[bt]).content if Scriptnr == nil then gg.alert("⚠警告⚠\n\n此脚本链接以失效，或者网络出现错误，请联系管理员修复") Main(title,link,Status) end if link[bt] == nil then gg.alert("⚠警告⚠\n\n参数错误，请联系管理员修复") Main(title,link,Status) end
    elseif string.find(link[bt],"退出") then local a = os.time() - m gg.alert("本次启动到结束您一共使用了："..a.."秒") os.exit() 
    else Scriptnr = link[bt] end
    pcall(load(Scriptnr))
  end
  XGCK=-1 
end
while true do if gg.isVisible(true) then XGCK = 1 gg.setVisible(false) end if XGCK == 1 then Main(title,link,Status) end end