Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Function to check if redstone is active on the right side of the computer
- local function isRedstoneActive()
- return redstone.getInput("right")
- end
- -- Your code to run if redstone is active
- local function runCode()
- -- Insert your code here
- print("Redstone is active on the right side!")
- end
- -- Main function to check and execute code
- local function main()
- while true do
- if isRedstoneActive() then
- runCode()
- end
- -- Sleep for a short period to avoid hogging resources
- os.sleep(0.5)
- end
- end
- -- Run the main function
- main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement