Advertisement
IAmCiel_

Untitled

Mar 1st, 2025 (edited)
193
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.92 KB | None | 0 0
  1. -- Start the multishell environment
  2. local shell1 = shell.openShell()  -- Open first shell
  3. local shell2 = shell.openShell()  -- Open second shell
  4.  
  5. -- Set up modems to communicate with both monitors
  6. local modem1 = peripheral.wrap("top")  -- Replace "top" with the modem's side for monitor 1
  7. local modem2 = peripheral.wrap("bottom")  -- Replace "bottom" with the modem's side for monitor 2
  8.  
  9. -- Function to display gate on both monitors
  10. local function displayOnBothMonitors()
  11.     -- Assuming that "gate" is a script that handles its own display
  12.     local command = "gate"
  13.    
  14.     -- Run gate program on both shells
  15.     shell.run(command, shell1)
  16.     shell.run(command, shell2)
  17.    
  18.     -- Now, send the output to both monitors
  19.     modem1.transmit(1, 1, "Running gate on monitor 1")
  20.     modem2.transmit(1, 1, "Running gate on monitor 2")
  21. end
  22.  
  23. -- Call the function to start displaying on both monitors
  24. displayOnBothMonitors()
  25.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement