Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local display = script.Parent.Parent.Frame.screen
- local dialog = {["label"] = nil,["box"] = nil,["button"] = nil}
- print("Adding functions")
- function download()
- print("Downloading data from https://pastebin.com/raw/" .. dialog["box"].Text)
- --https://pastebin.com/raw/E25PtRDy
- local hs = game:GetService("HttpService")
- dialog["label"].Text = "Downloading Code..."
- dialog["button"]:Destroy()
- local code = hs:GetAsync("https://pastebin.com/raw/" .. dialog["box"].Text, true)
- local codem
- --print(code)
- local runn = true
- while (runn) do
- codem = script.Parent.run:FireServer(code)
- codem = loadstring(code)
- if (codem==nil) then print("[CODELOADER] RESULT NIL") else runn = false end
- wait()
- print("[CODELOADER] Attempting to compile code")
- end
- print(code)
- local function exe()
- pcall(codem)
- end
- success, message = pcall( exe )
- if success then
- else
- --display:ClearAllChildren()
- --print("[CODELOADER] REBOOTING")
- --run()
- end
- end
- function run()
- print("Creating software...")
- dialog["label"] = Instance.new("TextLabel")
- dialog["box"] = Instance.new("TextBox")
- dialog["button"] = Instance.new("TextButton")
- local working
- --Create the label
- working = dialog["label"]
- working.Parent = display
- working.Size = UDim2.new(1,0,0.1,0)
- working.Position = UDim2.new(0,0,0,0)
- working.Text = "Please enter argument"
- --Create the textbox
- working = dialog["box"]
- working.Parent = display
- working.Size = UDim2.new(1,0,0.1,0)
- working.Position = UDim2.new(0,0,0.15,0)
- --create the button
- working = dialog["button"]
- working.Parent = display
- working.Size = UDim2.new(1,0,0.1,0)
- working.Position = UDim2.new(0,0,0.25,0)
- working.Text = "Download"
- working.MouseButton1Click:connect(download)
- end
- run()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement