Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- tArgs = {... }
- if #tArgs <1 then
- syntax()
- end
- local sides = { 'top','bottom', 'left', 'right' }
- sArg = tArgs[1]
- function main(sArg)
- if sArg == "open" then
- open()
- elseif sArg == "close" then
- close()
- else syntax()
- end
- end
- function open()
- for i=1, #sides do
- rs.setOutput(sides[i], true)
- end
- return
- end
- function close()
- for i = 1, # sides do
- rs.setOutput(sides[i], false)
- end
- return
- end
- function syntax()
- print("Syntax: door <open/close>")
- return
- end
- main(sArg)
Advertisement
Add Comment
Please, Sign In to add comment