MatthewGB

LazyAPI

May 26th, 2014
267
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.82 KB | None | 0 0
  1. -- LazyAPI by Mat Programming Co (MatthewGB)
  2. -- http://mpc.comuf.com/lua/lazyapi.html
  3. function so(sidein, boolean) -- side: t(op), d(own), r(ight), l(left), f(ront), b(ack) || boolean(Binary): 1(on), 0(off)
  4. side = nil
  5. bool = nil
  6. if sidein == "t" then side = "top"
  7. elseif sidein == "d" then side = "bottom"
  8. elseif sidein == "r" then side = "right"
  9. elseif sidein == "l" then side = "left"
  10. elseif sidein == "f" then side = "front"
  11. elseif sidein == "b" then side = "back"
  12. else for i = 1,20 do print("LAZYAPI ERROR||FUNCTION so(side, bool(binary))||INVALID FIRST PARAMETER") sleep(0.2)
  13. end
  14. if boolean == 0 then
  15. bool = false
  16. elseif boolean == 1 then
  17. bool = true
  18. else for i = 1,20 do print("LAZYAPI ERROR||FUNCTION so(side, bool(binary))||INVALID SECOND PARAMETER") sleep(0.2)
  19. end
  20. rs.setOutput(side, bool)
  21. end
Advertisement
Add Comment
Please, Sign In to add comment