Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --Comma-separated list of players allowed to turn
- --the mffs system on/off:
- plrs={"Hexlen","example"}
- --Side with redstone torch attached:
- side="top"
- --Side with chatbox peripheral:
- cb=peripheral.wrap("left")
- --Programming
- while true do
- _,plrname,msg=os.pullEvent("chat")
- plrallowed=false
- for k,v in ipairs(plrs) do
- if plrname==plrs[k] then
- plrallowed=true
- end
- end
- if plrallowed then
- if string.lower(msg)=="$mffs on" then
- rs.setOutput(side,false)
- cb.say(plrname..", your mffs is now on")
- elseif string.lower(msg)=="$mffs off" then
- rs.setOutput(side,true)
- cb.say(plrname..", your mffs is now off")
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement