Advertisement
Ignius12

Spawner

Jul 23rd, 2021
1,383
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.42 KB | None | 0 0
  1. local modem = peripheral.find("modem")
  2. rednet.open("right")
  3.  
  4. redstone.setOutput("bottom", true)
  5. while true do
  6.     local sender, message, protocol = rednet.receive("spawner")
  7.     if(message ~= null) then
  8.         print("target time: " .. message)
  9.         redstone.setOutput("bottom", false)
  10.         for i = 0, message, 1 do
  11.             sleep(1)
  12.         end
  13.         redstone.setOutput("bottom", true)
  14.     end
  15. end
  16.  
  17.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement