Advertisement
tima_gt

Redstone

Sep 15th, 2013
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.02 KB | None | 0 0
  1. --config:
  2. slc = 0
  3. tBarC = 8
  4. tBartC = 1
  5. backColor = colors.pink
  6. term.setBackgroundColor(backColor)
  7. term.clear()
  8. --code:
  9. function RedGui()
  10. redstonegui = paintutils.loadImage("/tde/redstone.png")
  11. paintutils.drawImage(redstonegui, 0, 0)
  12. term.setCursorPos(1, 19)
  13. write("(C) tima_gt 2013 GNU GPL project              ")
  14. term.setCursorPos(1, 2)
  15. write("Active redstone")
  16. term.setCursorPos(1, 15)
  17. write("DeActive redstone")
  18. term.setCursorPos(50, 1)
  19. write("X")
  20. end
  21. RedGui()
  22. asd = true
  23. while asd == true do
  24. local event, button, X, Y = os.pullEventRaw()
  25.   if slc == 0 then
  26.     if event == "mouse_click" then
  27.       if X >=1 and X <=17 and Y >=3 and Y <=5 and button ==1 then slc = 0
  28.       redstone.setOutput("back", true)
  29.        elseif X >=1 and X <=17 and Y >=14 and Y <=18 and button ==1 then slc = 0
  30.       redstone.setOutput("back", false)
  31.        elseif X ==50 and Y ==1 and button ==1 then slc = 0
  32.         asd = false
  33.          shell.run("pastebin run nCN4nL7A")
  34.         else
  35.         RedGui()
  36.     end
  37.   end
  38. end
  39. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement