Advertisement
kaibochan

overflow_receive.lua

Nov 9th, 2022 (edited)
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. shell.run("clear")
  2. print("overflow protection")
  3.  
  4. rednet.open("left")
  5.  
  6. while true do
  7.     _, msg, _ = rednet.receive("_overflow")
  8.  
  9.     mArg = {}
  10.     for w in msg:gmatch("%S+") do
  11.         table.insert(mArg, w)
  12.     end
  13.    
  14.     if mArg[1] == "block" then
  15.         redstone.setOutput("front", true)
  16.    
  17.         shell.run("clear")
  18.         print("blocking...")
  19.     elseif mArg[1] == "allow" then
  20.         redstone.setOutput("front", false)
  21.        
  22.         shell.run("clear")
  23.         print("allowing...")
  24.     end
  25. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement