Advertisement
legg0028

secret_door_send

Aug 1st, 2021 (edited)
776
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.43 KB | None | 0 0
  1. local modem = peripheral.wrap("bottom")
  2. local compNum = "1"
  3. modem.open(00003)
  4.  
  5. redstone.setOutput("front",false)
  6. redstone.setOutput("top",false)
  7.  
  8. if fs.exists("save_data.lua") then
  9.     local h = fs.open("save_data.lua", "r")
  10.     local data = h.readAll()
  11.     h.close()
  12.     compNum = data
  13. end
  14.  
  15. while true do
  16.     if redstone.getInput("front") then
  17.         modem.transmit(00003,00003,compNum)
  18.         sleep(1.5)
  19.     end
  20.     sleep(0.1)
  21. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement