Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function box()
- term.clear()
- term.setCursorPos(17, 1)
- print("Craft Desktop Alpha")
- term.setCursorPos(10, 2)
- print("Created by: thegreatstudio")
- term.setCursorPos(1, 3)
- print("[File Browser]")
- term.setCursorPos(1, 4)
- print("[Edit]")
- term.setCursorPos(1, 5)
- print("[Paint]")
- term.setCursorPos(1, 6)
- print("[Pastebin]")
- term.setCursorPos(1, 7)
- print("[Exit]")
- end
- box()
- while true do
- local event, button, X, Y = os.pullEvent("mouse_click")
- if event == "mouse_click" then
- if X >= 1 and X <= 20 and Y == 3 and button == 1 then
- shell.run("gfb")
- elseif X >= 1 and X <= 19 and Y == 4 and button == 1 then
- shell.run("edit")
- write("Please write the title of your file: ")
- local name2 = read()
- shell.run("edit", name2)
- elseif X >= 1 and X <= 18 and Y == 5 and button == 1 then
- write("Please write the title of your file: ")
- local name = read()
- shell.run("paint", name)
- elseif X >= 1 and X <= 17 and Y == 6 and button == 1 then
- write("Please write the pastebin code: ")
- local code = read()
- write("Please write the filename: ")
- local filename = read()
- shell.run("pastebin", "get", code, filename)
- elseif X >= 1 and X <= 16 and Y == 7 and button == 1 then
- break
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement