Advertisement
guitarplayer616

API button test

May 29th, 2015
305
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.43 KB | None | 0 0
  1. term.setBackgroundColor(colors.black)
  2. term.clear()
  3. term.setCursorPos(1,1)
  4.  
  5. paintutils.drawFilledBox(1,1,6,3,colors.red)
  6.  
  7.  
  8. while true do
  9.   local event = {os.pullEvent()}
  10.   if event[1] == "mouse_click" and event[3] >= 1 and event[3] <= 3 and event[4] >=1 and event[4] <=6 then
  11.     paintutils.drawFilledBox(1,1,6,3,colors.green)
  12.   elseif event[1] == "key" and event[2] == 56 then
  13.     shell.run("pastebin run yehp9UHN")
  14.   end
  15. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement