Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- m = peripheral.wrap("right")
- function run(str)
- peripheral.find("command").setCommand(str)
- peripheral.find("command").runCommand()
- end
- function say(str)
- peripheral.find("command").setCommand("sudo @a ping &9&lRPCS3&8&l:&r "..str)
- peripheral.find("command").runCommand()
- end
- while true do
- local evt, side, plr, msg = os.pullEvent('chat_message')
- if msg == "hey RPCS3" then
- com = "sudo "..plr.." ping &aHi there, "..plr
- run(com)
- else
- if fs.exists("/cmds/"..msg) then
- shell.run("/cmds/"..msg)
- com = "sudo "..plr.." ping &c I do not recognise that command."
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement