Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- os.loadAPI("button")
- m = peripheral.wrap("right")
- m.clear()
- function fillTable()
- button.setTable(" Spawn ", spawnToPos, 10, 20, 4, 6)
- button.setTable(" Random ", randomSpawn, 10, 20, 10, 12)
- button.screen()
- end
- function spawnToPos()
- commands.tell("@p", "Du wurdest zum Spawn teleportiert.\n Viel Spass bei deinem Abenteuer.")
- commands.tp("@p", "-68", "71" , "239")
- end
- function randomSpawn()
- x = math.random(-500,500)
- y = math.random(60,80)
- z = math.random(-500,500)
- commands.tell("@p", "Du wurdest an einen zufaelligen Ort teleportiert")
- commands.tp("@p", x,y,z)
- end
- function getClick()
- event,side,x,y = os.pullEvent("monitor_touch")
- button.checkxy(x,y)
- end
- fillTable()
- button.heading("Choose a Spawnpoint")
- while true do
- getClick()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement