Advertisement
ChanServ

script loader

Nov 17th, 2019
1,383
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 16.55 KB | None | 0 0
  1. local data = {
  2.     {
  3.         filename = "shitcheat_7.4_to_7.5_changelog.txt",
  4.         url = "https://pastebin.com/raw/NiRzmgMb",
  5.         hidden = true,
  6.     },
  7.     {
  8.         name = "Shitcheat",
  9.         filename = "shitcheat_7.5.lua",
  10.         url = "https://pastebin.com/raw/3EtBW4rT",
  11.         version = "7.5",
  12.         changelog = "shitcheat_7.4_to_7.5_changelog.txt",
  13.         executable = true,
  14.     },
  15.     {
  16.         name = "Niggermenu",
  17.         filename = "gmod_leak_dump_part_15__niggermenu.lua",
  18.         url = "https://pastebin.com/raw/4ufXyHSQ",
  19.         version = "0.0.2",
  20.         executable = true,
  21.     },
  22.     {
  23.         filename = "shitcheat_7.3_to_7.4_changelog.txt",
  24.         url = "https://pastebin.com/raw/VghWy6G8",
  25.         hidden = true,
  26.     },
  27.     {
  28.         name = "Shitcheat",
  29.         filename = "shitcheat_7.4.lua",
  30.         url = "https://pastebin.com/raw/0UGZnZzW",
  31.         version = "7.4",
  32.         changelog = "shitcheat_7.3_to_7.4_changelog.txt",
  33.         executable = true,
  34.     },
  35.     {
  36.         filename = "shitcheat_7.2a_to_7.3_changelog.txt",
  37.         url = "https://pastebin.com/raw/ES0aGcsc",
  38.         hidden = true,
  39.     },
  40.     {
  41.         name = "Shitcheat",
  42.         filename = "shitcheat_7.3.lua",
  43.         url = "https://pastebin.com/raw/LVZr07zk",
  44.         version = "7.3",
  45.         changelog = "shitcheat_7.2a_to_7.3_changelog.txt",
  46.         executable = true,
  47.     },
  48.     {
  49.         name = "Shitcheat",
  50.         filename = "shitcheat_8.0_(april_fools).lua",
  51.         url = "https://pastebin.com/raw/RfGP2EXP",
  52.         version = "8.0 (April Fools)",
  53.         executable = true,
  54.         hidden = true,
  55.     },
  56.     {
  57.         filename = "shitcheat_7.2_to_7.2a_changelog.txt",
  58.         url = "https://pastebin.com/raw/c1jjt7qL",
  59.         hidden = true,
  60.     },
  61.     {
  62.         name = "Shitcheat",
  63.         filename = "shitcheat_7.2a.lua",
  64.         url = "https://pastebin.com/raw/KnaUyAqx",
  65.         version = "7.2a",
  66.         changelog = "shitcheat_7.2_to_7.2a_changelog.txt",
  67.         executable = true,
  68.     },
  69.     {
  70.         filename = "shitcheat_7.1a_to_7.2_changelog.txt",
  71.         url = "https://pastebin.com/raw/1hsrHvWh",
  72.         hidden = true,
  73.     },
  74.     {
  75.         name = "Shitcheat",
  76.         filename = "shitcheat_7.1a.lua",
  77.         url = "https://pastebin.com/raw/89i8udPT",
  78.         version = "7.1a",
  79.         executable = true,
  80.     },
  81.     {
  82.         name = "Shitcheat Archive",
  83.         filename = "shitcheat_grand_archive.lua",
  84.         url = "https://pastebin.com/raw/4ByaB7ct",
  85.         executable = true,
  86.         hidden = true,
  87.     },
  88.     {
  89.         filename = "shitcheat_7.0_to_7.1_changelog.txt",
  90.         url = "https://pastebin.com/raw/JgP7eh5d",
  91.         hidden = true,
  92.     },
  93.     {
  94.         name = "Shitcheat",
  95.         filename = "shitcheat_7.1.lua",
  96.         url = "https://pastebin.com/raw/t7RgbC2L",
  97.         version = "7.1",
  98.         changelog = "shitcheat_7.0_to_7.1_changelog.txt",
  99.         executable = true,
  100.     },
  101.     {
  102.         filename = "shitcheat_6.7a_to_7.0_changelog.txt",
  103.         url = "https://pastebin.com/raw/db5x66r1",
  104.         hidden = true,
  105.     },
  106.     {
  107.         name = "Shitcheat",
  108.         filename = "shitcheat_7.0.lua",
  109.         url = "https://pastebin.com/raw/ZTAcfvGS",
  110.         version = "7.0",
  111.         changelog = "shitcheat_6.7a_to_7.0_changelog.txt",
  112.         executable = true,
  113.     },
  114.     {
  115.         filename = "shitcheat_6.7a_hotfix.txt",
  116.         url = "https://pastebin.com/raw/jkE1XENk",
  117.         hidden = true,
  118.     },
  119.     {
  120.         name = "Shitcheat",
  121.         filename = "shitcheat_6.7a_hotfix.lua",
  122.         url = "https://pastebin.com/raw/n0An9tmD",
  123.         version = "6.7a hotfix 1",
  124.         changelog = "shitcheat_6.7a_hotfix.txt",
  125.         executable = true,
  126.     },
  127.     {
  128.         filename = "shitcheat_6.6_to_6.7_changelog.txt",
  129.         url = "https://pastebin.com/raw/18M51Jjc",
  130.         hidden = true,
  131.     },
  132.     {
  133.         name = "Shitcheat",
  134.         filename = "shitcheat_6.7.lua",
  135.         url = "https://pastebin.com/raw/XyBFV3Jn",
  136.         version = "6.7",
  137.         changelog = "shitcheat_6.6_to_6.7_changelog.txt",
  138.         executable = true,
  139.     },
  140.     {
  141.         name = "SethHack",
  142.         filename = "gmod_leak_dump_part_14__sethhack_2014.lua",
  143.         url = "https://pastebin.com/raw/hBmrBx6e",
  144.         version = "4.3",
  145.         executable = true,
  146.     },
  147.     {
  148.         name = "AutoAim",
  149.         filename = "gmod_leak_dump_part_13__rabidtoaster's_aimbot.lua",
  150.         url = "https://pastebin.com/raw/tR68Q4eY",
  151.         executable = true,
  152.     },
  153.     {
  154.         name = "Smeg Hack",
  155.         filename = "gmod_leak_dump_part_12__smeghack.lua",
  156.         url = "https://pastebin.com/raw/RhUeU1b8",
  157.         executable = true,
  158.     },
  159.     {
  160.         name = "GearVision",
  161.         filename = "gmod_leak_dump_part_11__gearmenu.lua",
  162.         url = "https://pastebin.com/raw/huX9ED6B",
  163.         version = "2.4",
  164.         executable = true,
  165.     },
  166.     {
  167.         name = "AHack",
  168.         filename = "gmod_leak_dump_part_10__ahack_2012.lua",
  169.         url = "https://pastebin.com/raw/hfuRzRif",
  170.         version = "1.5.0",
  171.         executable = true,
  172.     },
  173.     {
  174.         name = "MEMEWare",
  175.         filename = "gmod_leak_dump_part_9__memeware.lua",
  176.         url = "https://pastebin.com/raw/sNTDn4Ly",
  177.         executable = true,
  178.     },
  179.     {
  180.         name = "BridgeHack",
  181.         filename = "gmod_leak_dump_part_8__trinity_hack.lua",
  182.         url = "https://pastebin.com/raw/PHHusJJ7",
  183.         version = "1.3",
  184.         executable = true,
  185.     },
  186.     {
  187.         name = "Titanium Smasher",
  188.         filename = "gmod_leak_dump_part_7__titanium_smasher.lua",
  189.         url = "https://pastebin.com/raw/qMDRirYd",
  190.         executable = true,
  191.     },
  192.     {
  193.         name = "snixzz3",
  194.         filename = "gmod_leak_dump_part_6__snixzz3_cancer.lua",
  195.         url = "https://pastebin.com/raw/CPiw7VNP",
  196.         version = "1.3.6b",
  197.         executable = true,
  198.         hidden = true, -- causes game crash if not patched lol
  199.     },
  200.     {
  201.         name = "SkidScorcher",
  202.         filename = "gmod_leak_dump_part_5__skidscorcher_pub.lua",
  203.         url = "https://pastebin.com/raw/MLrsetxv",
  204.         version = "2.0 public",
  205.         executable = true,
  206.     },
  207.     {
  208.         name = "PWare",
  209.         filename = "gmod_leak_dump_part_4__pware.lua",
  210.         url = "https://pastebin.com/raw/mP2ACSEh",
  211.         executable = true,
  212.     },
  213.     {
  214.         name = "Electfried", -- not misspelled
  215.         filename = "gmod_leak_dump_part_3__electrified.lua",
  216.         url = "https://pastebin.com/raw/EG33z4zm",
  217.         version = "1",
  218.         executable = true,
  219.     },
  220.     {
  221.         name = "LucidCheats",
  222.         filename = "gmod_leak_dump_part_2__lucid_hvh_shit.lua",
  223.         url = "https://pastebin.com/raw/va6TEHQt",
  224.         version = "1.6.6.8",
  225.         executable = true,
  226.     },
  227.     {
  228.         name = "DingusWork",
  229.         filename = "gmod_leak_dump_part_1__dingushack.lua",
  230.         url = "https://pastebin.com/raw/VYdqrCHs",
  231.         executable = true,
  232.     },
  233.     {
  234.         filename = "shitcheat_6.5_to_6.6_changelog.txt",
  235.         url = "https://pastebin.com/raw/T2jHafGc",
  236.         hidden = true,
  237.     },
  238.     {
  239.         name = "Shitcheat",
  240.         filename = "shitcheat_6.6.lua",
  241.         url = "https://pastebin.com/raw/CGdvgrjY",
  242.         version = "6.6",
  243.         changelog = "shitcheat_6.5_to_6.6_changelog.txt",
  244.         executable = true,
  245.     },
  246.     {
  247.         filename = "shitcheat_6.4_to_6.5_changelog.txt",
  248.         url = "https://pastebin.com/raw/ahC7RdNP",
  249.         hidden = true,
  250.     },
  251.     {
  252.         name = "Shitcheat",
  253.         filename = "shitcheat_6.5.lua",
  254.         url = "https://pastebin.com/raw/R2rXGCuQ",
  255.         version = "6.5",
  256.         changelog = "shitcheat_6.4_to_6.5_changelog.txt",
  257.         executable = true,
  258.     },
  259.     {
  260.         filename = "shitcheat_6.3_to_6.4_changelog.txt",
  261.         url = "https://pastebin.com/raw/id6j4r4y",
  262.         hidden = true,
  263.     },
  264.     {
  265.         name = "Shitcheat",
  266.         filename = "shitcheat_6.4.lua",
  267.         url = "https://pastebin.com/raw/6j8hdkPK",
  268.         version = "6.4",
  269.         changelog = "shitcheat_6.3_to_6.4_changelog.txt",
  270.         executable = true,
  271.     },
  272.     {
  273.         filename = "shitcheat_6.2_to_6.3_changelog.txt",
  274.         url = "https://pastebin.com/raw/fiichXTQ",
  275.         hidden = true,
  276.     },
  277.     {
  278.         name = "Shitcheat",
  279.         filename = "shitcheat_6.3.lua",
  280.         url = "https://pastebin.com/raw/v5XKBJdR",
  281.         version = "6.3",
  282.         changelog = "shitcheat_6.2_to_6.3_changelog.txt",
  283.         executable = true,
  284.     },
  285.     {
  286.         name = "Shitcheat auto-updater",
  287.         filename = "shitcheat_auto-updater_1.1.lua",
  288.         url = "https://pastebin.com/raw/2u6twCsQ",
  289.         version = "1.1",
  290.         executable = true,
  291.         hidden = true,
  292.     },
  293.     {
  294.         filename = "shitcheat_6.1_to_6.2_changelog.txt",
  295.         url = "https://pastebin.com/raw/Lx2MCS86",
  296.         hidden = true,
  297.     },
  298.     {
  299.         name = "Shitcheat",
  300.         filename = "shitcheat_6.2.lua",
  301.         url = "https://pastebin.com/raw/WY79nG4T",
  302.         version = "6.2",
  303.         changelog = "shitcheat_6.1_to_6.2_changelog.txt",
  304.         executable = true,
  305.     },
  306.     {
  307.         name = "Shitcheat auto-updater",
  308.         filename = "shitcheat_auto-updater_1.0.lua",
  309.         url = "https://pastebin.com/raw/jrdSYPHY",
  310.         version = "1.0",
  311.         executable = true,
  312.         hidden = true,
  313.     },
  314.     {
  315.         filename = "shitcheat_6.0_to_6.1_changelog.txt",
  316.         url = "https://pastebin.com/raw/Hg46Umk3",
  317.         hidden = true,
  318.     },
  319.     {
  320.         name = "Shitcheat",
  321.         filename = "shitcheat_6.1.lua",
  322.         url = "https://pastebin.com/raw/R2NWbyzx",
  323.         version = "6.1",
  324.         changelog = "shitcheat_6.0_to_6.1_changelog.txt",
  325.         executable = true,
  326.     },
  327.     {
  328.         filename = "shitcheat_5.8_to_6.0_changelog.txt",
  329.         url = "https://pastebin.com/raw/Gx1UXJ7T",
  330.         hidden = true,
  331.     },
  332.     {
  333.         name = "Shitcheat",
  334.         filename = "shitcheat_6.0.lua",
  335.         url = "https://pastebin.com/raw/gVvF7yZs",
  336.         version = "6.0",
  337.         changelog = "shitcheat_5.8_to_6.0_changelog.txt",
  338.         executable = true,
  339.     },
  340.     {
  341.         name = "How to play HL2RP",
  342.         filename = "how_to_play__hl2rp.txt",
  343.         url = "https://pastebin.com/raw/BHUPQEJa",
  344.         hidden = true,
  345.     },
  346.     {
  347.         filename = "shitcheat_5.7_to_5.8_changelog.txt",
  348.         url = "https://pastebin.com/raw/9N20MZ30",
  349.         hidden = true,
  350.     },
  351.     {
  352.         name = "Shitcheat",
  353.         filename = "shitcheat_5.8.lua",
  354.         url = "https://pastebin.com/raw/efj1TZRh",
  355.         version = "5.8",
  356.         changelog = "shitcheat_5.7_to_5.8_changelog.txt",
  357.         executable = true,
  358.     },
  359.     {
  360.         filename = "shitcheat_5.6c_to_5.7_changelog.txt",
  361.         url = "https://pastebin.com/raw/Kq3wRj3F",
  362.         hidden = true,
  363.     },
  364.     {
  365.         name = "Shitcheat",
  366.         filename = "shitcheat_5.7.lua",
  367.         url = "https://pastebin.com/raw/RiFCkfsA",
  368.         version = "5.7",
  369.         changelog = "shitcheat_5.6c_to_5.7_changelog.txt",
  370.         executable = true,
  371.     },
  372.     {
  373.         filename = "shitcheat_5.6b_to_5.6c_changelog.txt",
  374.         url = "https://pastebin.com/raw/BzJr6xBb",
  375.         hidden = true,
  376.     },
  377.     {
  378.         name = "Shitcheat",
  379.         filename = "shitcheat_5.6c.lua",
  380.         url = "https://pastebin.com/raw/T6WiHpPr",
  381.         version = "5.6c",
  382.         changelog = "shitcheat_5.6b_to_5.6c_changelog.txt",
  383.         executable = true,
  384.     },
  385.     {
  386.         filename = "shitcheat_5.6a_to_5.6b_changelog.txt",
  387.         url = "https://pastebin.com/raw/5RLsbStG",
  388.         hidden = true,
  389.     },
  390.     {
  391.         name = "Shitcheat",
  392.         filename = "shitcheat_5.6b.lua",
  393.         url = "https://pastebin.com/raw/bJPa058J",
  394.         version = "5.6b",
  395.         changelog = "shitcheat_5.6a_to_5.6b_changelog.txt",
  396.         executable = true,
  397.     },
  398.     {
  399.         filename = "shitcheat_5.6_to_5.6a_changelog.txt",
  400.         url = "https://pastebin.com/raw/PexxzHDY",
  401.         hidden = true,
  402.     },
  403.     {
  404.         name = "Shitcheat",
  405.         filename = "shitcheat_5.6a.lua",
  406.         url = "https://pastebin.com/raw/5FcPKdrh",
  407.         version = "5.6a",
  408.         changelog = "shitcheat_5.6_to_5.6a_changelog.txt",
  409.         executable = true,
  410.     },
  411.     {
  412.         filename = "shitcheat_5.5_to_5.6_changelog.txt",
  413.         url = "https://pastebin.com/raw/rcGvvLz1",
  414.         hidden = true,
  415.     },
  416.     {
  417.         name = "Shitcheat",
  418.         filename = "shitcheat_5.6.lua",
  419.         url = "https://pastebin.com/raw/dJZgWsrY",
  420.         version = "5.6",
  421.         changelog = "shitcheat_5.5_to_5.6_changelog.txt",
  422.         executable = true,
  423.     },
  424.     {
  425.         filename = "shitcheat_5.4_to_5.5_changelog.txt",
  426.         url = "https://pastebin.com/raw/zmt0eWab",
  427.         hidden = true,
  428.     },
  429.     {
  430.         name = "Shitcheat",
  431.         filename = "shitcheat_5.5.lua",
  432.         url = "https://pastebin.com/raw/UZMAdPiw",
  433.         version = "5.5",
  434.         changelog = "shitcheat_5.4_to_5.5_changelog.txt",
  435.         executable = true,
  436.     },
  437.     {
  438.         filename = "shitcheat_5.3_to_5.4_changelog.txt",
  439.         url = "https://pastebin.com/raw/JC2MEGFW",
  440.         hidden = true,
  441.     },
  442.     {
  443.         name = "Shitcheat",
  444.         filename = "shitcheat_5.4.lua",
  445.         url = "https://pastebin.com/raw/YC2aWVTy",
  446.         version = "5.4",
  447.         changelog = "shitcheat_5.3_to_5.4_changelog.txt",
  448.         executable = true,
  449.     },
  450.     {
  451.         filename = "shitcheat_5.2_to_5.3_changelog.txt",
  452.         url = "https://pastebin.com/raw/QWQ3zVep",
  453.         hidden = true,
  454.     },
  455.     {
  456.         name = "Shitcheat",
  457.         filename = "shitcheat_5.3.lua",
  458.         url = "https://pastebin.com/raw/YSza88Qb",
  459.         version = "5.3",
  460.         changelog = "shitcheat_5.2_to_5.3_changelog.txt",
  461.         executable = true,
  462.     },
  463.     {
  464.         name = "d_entities.txt",
  465.         filename = "d_entities.txt.txt",
  466.         url = "https://pastebin.com/raw/H69D1AZd",
  467.         hidden = true,
  468.     },
  469.     {
  470.         filename = "shitcheat_5.1a_to_5.2_changelog.txt",
  471.         url = "https://pastebin.com/raw/s3sSFvDn",
  472.         hidden = true,
  473.     },
  474.     {
  475.         name = "Shitcheat",
  476.         filename = "shitcheat_5.2.lua",
  477.         url = "https://pastebin.com/raw/Z5kybp1m",
  478.         version = "5.2",
  479.         changelog = "shitcheat_5.1a_to_5.2_changelog.txt",
  480.         executable = true,
  481.     },
  482.     {
  483.         filename = "shitcheat_5.1_to_5.1a_changelog.txt",
  484.         url = "https://pastebin.com/raw/eq6SWWd9",
  485.         hidden = true,
  486.     },
  487.     {
  488.         name = "Shitcheat",
  489.         filename = "shitcheat_5.1a.lua",
  490.         url = "https://pastebin.com/raw/bXR0PNLH",
  491.         version = "5.1a",
  492.         changelog = "shitcheat_5.1_to_5.1a_changelog.txt",
  493.         executable = true,
  494.     },
  495.     {
  496.         filename = "shitcheat_5.0_to_5.1_changelog.txt",
  497.         url = "https://pastebin.com/raw/vfHYsy5K",
  498.         hidden = true,
  499.     },
  500.     {
  501.         name = "Shitcheat",
  502.         filename = "shitcheat_5.1.lua",
  503.         url = "https://pastebin.com/raw/0yRr1tAv",
  504.         version = "5.1",
  505.         changelog = "shitcheat_5.0_to_5.1_changelog.txt",
  506.         executable = true,
  507.     },
  508. }
  509. local index = {}
  510. for k, v in ipairs(data) do
  511.     index[v.filename] = k
  512. end
  513.  
  514. local show_hidden = false
  515.  
  516. local window = vgui.Create("DFrame")
  517. window:SetTitle("Script loader")
  518. window:SetSize(ScrW()*0.35, ScrH()*0.35)
  519. window:Center()
  520. window:MakePopup()
  521. window:SetSizable(true)
  522.  
  523. local divider = vgui.Create("DHorizontalDivider", window)
  524. divider:Dock(FILL)
  525. divider:SetDividerWidth(4)
  526. divider:SetLeftWidth(window:GetWide()*0.5-6)
  527.  
  528. local left = vgui.Create("DListView", window)
  529. divider:SetLeft(left)
  530. left:AddColumn("Script")
  531. function left:update_list()
  532.     self:Clear()
  533.     for k, v in ipairs(data) do
  534.         if v.hidden and not show_hidden then
  535.             continue
  536.         end
  537.         if v.name and v.version then
  538.             v.pretty_name = v.name.." "..v.version
  539.         else
  540.             v.pretty_name = v.name or v.filename or "Untitled "..k
  541.         end
  542.         self:AddLine(v.pretty_name, v.hidden and "Hidden" or "", v.filename)
  543.     end
  544. end
  545. left:update_list()
  546.  
  547. local right = vgui.Create("DPanel", window)
  548. divider:SetRight(right)
  549. right:SetPaintBackground(false)
  550.  
  551. local header = vgui.Create("DLabel", right)
  552. header:Dock(TOP)
  553. header:DockMargin(0, 0, 0, 4)
  554. header:SetFont("DermaLarge")
  555. header:SetText("None selected")
  556.  
  557. local extra = vgui.Create("DLabel", right)
  558. extra:Dock(FILL)
  559. extra:SetContentAlignment(7)
  560. extra:SetText("Click an entry on the left to begin.")
  561.  
  562. local cluster = vgui.Create("DPanel", right)
  563. cluster:Dock(BOTTOM)
  564. cluster:SetPaintBackground(false)
  565.  
  566. local load = vgui.Create("DButton", cluster)
  567. load:Dock(FILL)
  568. load:SetText("Execute")
  569. load:SetEnabled(false)
  570.  
  571. local hidden_cb = vgui.Create("DCheckBoxLabel", cluster)
  572. hidden_cb:Dock(RIGHT)
  573. hidden_cb:DockMargin(4, 0, 0, 0)
  574. hidden_cb:SetText("Show hidden")
  575. hidden_cb:SetChecked(show_hidden)
  576. function hidden_cb:OnChange(bool)
  577.     show_hidden = bool
  578.     left:update_list()
  579. end
  580.  
  581. local changelog = vgui.Create("DButton", cluster)
  582. changelog:Dock(RIGHT)
  583. changelog:DockMargin(4, 0, 0, 0)
  584. changelog:SetText("View changelog")
  585. changelog:SetWide(window:GetWide()*0.125)
  586. changelog:SetEnabled(false)
  587.  
  588. local entry
  589. local labels = {
  590.     name = "Name: ",
  591.     filename = "Filename: ",
  592.     url = "URL: ",
  593.     version = "Version: ",
  594.     hidden = "Hidden: "
  595. }
  596. function left:OnRowSelected(_, row)
  597.     entry = data[index[row:GetValue(3)]]
  598.     header:SetText(entry.pretty_name)
  599.     local str = ""
  600.     for k, v in pairs(entry) do
  601.         if v and labels[k] then
  602.             str = str..labels[k]..tostring(v).."\n"
  603.         end
  604.     end
  605.     load:SetEnabled(true)
  606.     load:SetText(entry.executable and "Execute" or "View")
  607.     changelog:SetEnabled(entry.changelog and index[entry.changelog])
  608.     extra:SetText(str)
  609. end
  610.  
  611. local function fetch(url, callback)
  612.     http.Fetch(url, function(body, size, headers, code)
  613.         if code == 200 or code == 204 then
  614.             callback(true, body, size)
  615.         else
  616.             callback(false, code)
  617.         end
  618.     end, function(err)
  619.         callback(false, err)
  620.     end)
  621. end
  622. local function popup(msg)
  623.     local window = vgui.Create("DFrame")
  624.     window:SetSize(ScrW()*0.25, ScrH()*0.25)
  625.     window:Center()
  626.     window:MakePopup()
  627.     window:SetSizable(true)
  628.    
  629.     local text = vgui.Create("DLabel", window)
  630.     text:Dock(FILL)
  631.     text:SetContentAlignment(7)
  632.     text:SetText(msg)
  633. end
  634.  
  635. function load:DoClick()
  636.     local entry = entry
  637.     fetch(entry.url, function(succ, resp)
  638.         if succ then
  639.             if entry.executable then
  640.                 local succ, err = pcall(function()
  641.                     CompileString(resp, entry.filename or entry.pretty_name)()
  642.                 end)
  643.                 if not succ then
  644.                     popup(string.format("Encountered a script error while running %s:\n%s", entry.pretty_name, err))
  645.                 end
  646.             else
  647.                 popup(resp)
  648.             end
  649.         else
  650.             popup(string.format("An error occured while trying to fetch %s.", entry.url))
  651.         end
  652.     end)
  653. end
  654. function changelog:DoClick()
  655.     local entry = data[index[entry.changelog]]
  656.     fetch(entry.url, function(succ, resp)
  657.         if succ then
  658.             popup(resp)
  659.         else
  660.             popup(string.format("An error occured while trying to fetch %s.", entry.url))
  661.         end
  662.     end)
  663. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement