Advertisement
rjtwins

startup.lua

Jun 15th, 2021
989
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.43 KB | None | 0 0
  1. print("Staring Wither Spawn Controller!")
  2.  
  3. function pulse( _nSide,  _nTime )
  4.     print("Sending Redstone Pulse")
  5.     redstone.setOutput( _nSide, true)
  6.     sleep(_nTime)
  7.     redstone.setOutput( _nSide, false)
  8. end
  9.  
  10. while true do
  11.     sleep(0.1)
  12.     if redstone.getInput("top") == true then
  13.         if redstone.getAnalogInput("right") == 0 then
  14.            pulse("back", 1)
  15.         else
  16.            sleep(2)
  17.         end
  18.     end
  19. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement