Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Siri v1
- -- Needs Disk Drive, MoarPeripherals Chat Box and Command Block
- local wl = {
- ["Gonow64"] = true,
- ["Gonow32"] = true,
- }
- m = peripheral.wrap("right")
- function run(str)
- peripheral.find("command").setCommand(str)
- peripheral.find("command").runCommand()
- end
- while true do
- local evt, side, plr, msg = os.pullEvent('chat_message')
- if msg == "hey siri" then
- com = "sudo "..plr.." ping &aHi there, "..plr
- run(com)
- elseif msg == "siri, the cake is a lie" then
- com = "minecraft:give "..plr.." minecraft:cake 1 0 {display:{Name:Special Cake,Lore:[Feel the cake, love the cake, eat the cake.]},Unbreakable:1,ench:[{id:51,lvl:5}],repairCost:1000000}"
- run(com)
- com = "sudo "..plr.." ping &aHow about now?"
- run(com)
- elseif msg == "devSIRI, add question" then
- if wl[plr] then
- com = "sudo "..plr.." ping &6[&aDEVSiri&6]&r Input question"
- run(com)
- while true do
- local evt, side, plr2, msg = os.pullEvent("chat_message")
- if plr2 == plr then
- com = "sudo "..plr.." ping &6[&aDEVSiri&6]&r Answer will be?"
- while true do
- local evt, side, plr2, msg2 = os.pullEvent('chat_message')
- if plr2 == plr then
- f = fs.open("/disk/"..msg,"w")
- f.writeLine(msg2)
- f.close()
- com = "sudo "..plr.." ping &6[&aDEVSiri&6]&r Added question to /disk/"..msg.."!"
- run(com)
- shell.run("/test")
- end
- end
- end
- end
- else
- com = "sudo "..plr.." ping &4You do not have permission to run this Siri Command."
- run(com)
- end
- elseif msg == "devSIRI, edit question" then
- if wl[plr] then
- com = "sudo "..plr.." ping &6[&aDEVSiri&6]&r Input question name to edit"
- run(com)
- if fs.exists("/disk/"..msg) then
- while true do
- local evt, side, plr2, msg = os.pullEvent("chat_message")
- if plr2 == plr then
- com = "sudo "..plr.." ping &6[&aDEVSiri&6]&r Answer will be?"
- while true do
- local evt, side, plr2, msg2 = os.pullEvent('chat_message')
- if plr2 == plr then
- f = fs.open("/disk/"..msg,"w")
- f.writeLine(msg2)
- f.close()
- com = "sudo "..plr.." ping &6[&aDEVSiri&6]&r Added question to /disk/"..msg.."!"
- run(com)
- shell.run("/test")
- end
- else
- com = "sudo "..plr.." ping &cQuestion does not exist."
- run(com)
- end
- end
- end
- else
- com = "sudo "..plr.." ping &4You do not have permission to run this Siri Command."
- run(com)
- end
- else
- if fs.exists("/disk/"..msg) then
- f = fs.open("/disk/"..msg,"r")
- com = "sudo "..plr.." ping &a"..f.readAll()
- run(com)
- else
- com = "sudo "..plr.." ping &c I do not recognise that command."
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement