Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local modem = peripheral.wrap("back") -- Wrap the modem on the back side
- term.clear()
- term.setCursorPos(1, 1)
- print("Enter command (say, refuel, dig, mine, w, a, s, d, up, down, slot, sety, goy, bomb, carpet, update):")
- while true do
- local input = read()
- if input == "update" then
- -- Replace 'yourPasteIdHere' with your actual Pastebin ID
- local url = "https".."://".."pastebin"..".com".."/raw/FJJCENLN"
- local response = http.get(url)
- if response then
- local scriptContent = response.readAll()
- response.close()
- modem.transmit(25813, 25813, "update " .. scriptContent)
- print("Update sent.")
- else
- print("Failed to download the script from Pastebin.")
- end
- else
- -- Transmit other commands as usual
- modem.transmit(25813, 25813, input)
- print("Command sent: " .. input)
- end
- end
Advertisement
Advertisement