Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Command block random teleporter
- --
- if not fs.exists("wrap") then
- print("wrap API not found, downloading from http://pastebin.com/g5tBarus")
- shell.run("pastebin get g5tBarus wrap")
- end
- os.loadAPI("wrap")
- co = wrap.attach("command")
- --os.pullEvent = os.pullEventRaw
- function run()
- while true do
- local event = os.pullEvent("redstone")
- local x = math.random(10000, 50000)
- local z = math.random(10000, 50000)
- co.setCommand("tp @p[r=1] "..x.." 128 "..z)
- co.runCommand()
- co.setCommand("")
- end
- end
- function antiHack()
- print("[AntiHack] Enabled")
- while true do
- local event,side = os.pullEventRaw()
- if event == "peripheral" then
- if peripheral.getType(side) == "drive" then
- -- we got someone putting a drive next to the terminal
- elseif peripheral.getType(side) == "computer" then
- end
- elseif event == "disk" then
- if fs.exists("disk/startup") then
- fs.delete("disk/startup")
- disk.setLabel(side,"Broken Floppy")
- end
- elseif event == "terminate" then
- os.queueEvent("password")
- end
- end
- end
- function password()
- while true do
- local event = os.pullEvent("password")
- sleep(0)
- term.clear()
- term.setCursorPos(1,1)
- if string.lower(read("*")) == "recordmods" then
- shell.run("edit startup")
- os.reboot()
- end
- end
- end
- parallel.waitForAll(run,password)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement