Advertisement
paramus

Generator controller

Mar 10th, 2025
209
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.28 KB | Gaming | 0 0
  1. local Stress = peripheral.wrap("top")
  2. local Threshold = 150000 -- Stress units threshold
  3.  
  4. -- Main --
  5. while (true) do
  6.     if (Stress.getStress() < Threshold) then
  7.         redstone.setAnalogOutput("right", 15)
  8.     else
  9.         redstone.setAnalogOutput("right", 0)
  10.     end
  11.     sleep(1)
  12. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement