MagmaLP

Trading-City Mobfarm-Ghast

Apr 10th, 2022 (edited)
379
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. mon = peripheral.wrap("back")
  2. mon.setTextScale(4.5)
  3.  
  4. function calc_color(color)
  5.     return math.pow(2, color - 1)
  6. end
  7.  
  8. function msg(gap, line, color, groundb, text)
  9.     mon.setBackgroundColor(calc_color(groundb))
  10.     mon.setCursorPos(gap,line)
  11.     mon.setTextColor(calc_color(color))
  12.     text = mon.write(text)
  13. end  
  14.  
  15. function clear()
  16.     for a = 1,10 do
  17.         msg(01,a,16,16,"                              ")
  18.     end
  19. end
  20.  
  21. while true do
  22.   if rs.getInput("top", true) then
  23.     clear()
  24.     msg(03,02,09,16,"Mobfarm")
  25.     msg(11,02,06,16,"OPEN")
  26.   else
  27.     clear()
  28.     msg(02,02,09,16,"Mobfarm")
  29.     msg(10,02,15,16,"CLOSED")
  30.   end
  31.   sleep(10)
  32. end
  33.    
Add Comment
Please, Sign In to add comment