// Name: Copy Roblox Loadstring // Description: Builds a Roblox loadstring for a remote Luau script and copies or pastes it. // Author: damergamerrr1413-prog // GitHub: damergamerrr1413-prog import "@johnlindquist/kit" const defaultUrl = "https://raw.githubusercontent.com/tlredz/Scripts/refs/heads/main/main.luau" const url = await arg({ placeholder: "Enter Luau script URL", input: defaultUrl, enter: "Continue", }) const loadstringCode = `loadstring(game:HttpGet("${url}"))()` const action = await arg("Choose action", [ { name: "Copy loadstring to clipboard", value: "copy" }, { name: "Paste loadstring into active app", value: "paste" }, { name: "Preview remote script (GET)", value: "preview" }, ]) if (action === "copy") { await copy(loadstringCode) await notify("Loadstring copied to clipboard") exit() } if (action === "paste") { await setSelectedText(loadstringCode) await notify("Loadstring pasted") exit() } if (action === "preview") { try { const res = await get(url) await editor({ value: typeof res.data === "string" ? res.data : JSON.stringify(res.data, null, 2), language: "lua", description: url, }) } catch (err: any) { await div(md(`Failed to fetch:\n\n- URL: ${url}\n- Error: ${err?.message || err}`)) } }