darmod

Untitled

Aug 3rd, 2025 (edited)
52
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.75 KB | None | 0 0
  1. -- Movie Theater Simple Movie Control
  2. local basalt = require("basalt")
  3.  
  4. -- Get the main frame (your window)
  5. local main = basalt.getMainFrame()
  6.  
  7. -- Get the monitor and use as main Frame
  8. local monitor = peripheral.find("monitor")
  9. local monitorFrame = basalt.createFrame():setTerm(monitor)
  10.  
  11. -- Setup the monitorFrame
  12. monitorFrame.background = colors.black
  13. monitorFrame.foreground = colors.white
  14.  
  15. -- Add play button
  16. monitorFrame:addButton()
  17.     :setText("Play")
  18.     :setPosition(1, 4)
  19.     :onClick(function()
  20.         rs.setOutput("right", false)
  21.     end)
  22.  
  23. -- Add pause button
  24. monitorFrame:addButton()
  25.     :setText("Pause")
  26.     :setPosition(1, 1)
  27.     :onClick(function()
  28.         rs.setOutput("right", true)
  29.     end)
  30.  
  31. -- Start Basalt
  32. basalt.run()
Advertisement
Add Comment
Please, Sign In to add comment