Barnet

controller.lua

Nov 25th, 2021 (edited)
530
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. local controller = {}
  2.  
  3. controller.new = function()
  4.   return function()
  5.     while true do
  6.       event, key = os.pullEvent("key")
  7.       if key == keys.e then
  8.         os.reboot()
  9.       elseif key == keys.d then
  10.         os.queueEvent("terminate")
  11.       end
  12.     end
  13.   end
  14. end
  15.  
  16. return controller
RAW Paste Data