Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- os.loadAPI("System/API/context")
- local CommandBlock = peripheral.wrap ("bottom")
- local function cb(command)
- CommandBlock.setCommand(command)
- CommandBlock.runCommand()
- end
- local function tp(x,y,z)
- cb("/tp..x..y..z")
- end
- term.clear()
- while true do
- local event,button,x,y = os.pullEvent()
- if event == "mouse_click" then
- if button == 2 and y > 1 then
- local action = context.menu(x,y,{"Home",false},{"Cave",false},{"M.Forest",false},{"Lava",false},"Auras",{"1",false},{"2",false},{"3",false},{"4",false},{"5",false},{"6",false},{"7",false},{"8",false},{"9",false},{"10",false},"-",{"Clear screen",false},"-",{"Exit",false})
- if action == "Home" then
- cb("/tp 169 79 133")
- elseif action == "Cave" then
- cb("/tp 261 53 389")
- elseif action == "M.Forest" then
- cb("/tp 133 63 539")
- elseif action == "Lava" then
- cb("/tp 221 12 389")
- elseif action == "1" then
- cb("/tp 335 75 147")
- elseif action == "2" then
- cb("/tp 157 63 36")
- elseif action == "3" then
- cb("/tp 377 63 384")
- elseif action == "4" then
- cb("/tp 357 74 449")
- elseif action == "5" then
- cb("/tp 492 69 668")
- elseif action == "6" then
- cb("/tp 426 64 984")
- elseif action == "7" then
- cb("/tp 178 63 318")
- elseif action == "8" then
- cb("/tp 201 67 274")
- elseif action == "9" then
- cb("/tp 198 69 0")
- elseif action == "10" then
- cb("/tp 8 71 606")
- elseif action == "Clear screen" then
- term.clear()
- elseif action == "Exit" then
- term.setBackgroundColor(colors.black)
- term.setTextColor(colors.white)
- term.setCursorPos(1,1)
- term.clear()
- break
- end
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment