Advertisement
coderboy

rPhone BIOS V1

Jul 3rd, 2017
179
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.80 KB | None | 0 0
  1. local display = script.Parent.Parent.Frame.screen
  2. local dialog = {["label"] = nil,["box"] = nil,["button"] = nil}
  3.  
  4. print("Adding functions")
  5. function download()
  6.     print("Downloading data from https://pastebin.com/raw/" .. dialog["box"].Text)
  7.     --https://pastebin.com/raw/E25PtRDy
  8.     local hs = game:GetService("HttpService")
  9.     dialog["label"].Text = "Downloading Code..."
  10.     dialog["button"]:Destroy()
  11.     local code = hs:GetAsync("https://pastebin.com/raw/" .. dialog["box"].Text, true)
  12.     local codem
  13.     --print(code)
  14.     local runn = true
  15.     while (runn) do
  16.         codem = script.Parent.run:FireServer(code)
  17.         codem = loadstring(code)
  18.         if (codem==nil) then print("[CODELOADER] RESULT NIL") else runn = false end
  19.         wait()
  20.         print("[CODELOADER] Attempting to compile code")
  21.     end
  22.    
  23.     print(code)
  24.     local function exe()
  25.         pcall(codem)
  26.     end
  27.  
  28.     success, message = pcall( exe )
  29.     if success then
  30.     else
  31.         --display:ClearAllChildren()
  32.         --print("[CODELOADER] REBOOTING")
  33.         --run()
  34.     end
  35. end
  36.  
  37. function run()
  38. print("Creating software...")
  39.  
  40. dialog["label"] = Instance.new("TextLabel")
  41. dialog["box"] = Instance.new("TextBox")
  42. dialog["button"] = Instance.new("TextButton")
  43.  
  44. local working
  45.  
  46. --Create the label
  47. working = dialog["label"]
  48. working.Parent = display
  49. working.Size = UDim2.new(1,0,0.1,0)
  50. working.Position = UDim2.new(0,0,0,0)
  51. working.Text = "Please enter argument"
  52.  
  53. --Create the textbox
  54. working = dialog["box"]
  55. working.Parent = display
  56. working.Size = UDim2.new(1,0,0.1,0)
  57. working.Position = UDim2.new(0,0,0.15,0)
  58.  
  59. --create the button
  60. working = dialog["button"]
  61. working.Parent = display
  62. working.Size = UDim2.new(1,0,0.1,0)
  63. working.Position = UDim2.new(0,0,0.25,0)
  64. working.Text = "Download"
  65. working.MouseButton1Click:connect(download)
  66. end
  67. run()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement