Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package.loaded.builder = nil
- os.execute("pastebin get -f TkSG91Zm builder.lua")
- local gml = require("gml")
- local component = require("component")
- local builder = require("builder")
- local gui = gml.create("center", "center", 32, 42)
- local label=gui:addLabel("center", 2, 14, "Render Ellipse")
- gui:addLabel(1, 3, 9, "Center")
- gui:addLabel(1, 4, 9, "Length")
- gui:addLabel(1, 5, 9, "Width")
- gui:addLabel(1, 6, 9, "Height")
- gui:addLabel(1, 7, 9, "Block")
- gui:addLabel(1, 8, 9, "Filled")
- local tp_center_x = gui:addTextField(10, 3, 5, "")
- local tp_center_y = gui:addTextField(16, 3, 5, "")
- local tp_center_z = gui:addTextField(22, 3, 5, "")
- local tp_length = gui:addTextField(10, 4, 5, "")
- local tp_width = gui:addTextField(10, 5, 5, "")
- local tp_height = gui:addTextField(10, 6, 5, "")
- local tp_block_id = gui:addTextField(10, 7, 5, "")
- local tp_block_meta = gui:addTextField(16, 7, 5, "")
- local tp_filled = gui:addTextField(10, 8, 5, "0")
- function createEllipse()
- builder.ellipse(tonumber(tp_center_x.text), tonumber(tp_center_y.text), tonumber(tp_center_z.text), tonumber(tp_length.text), tonumber(tp_width.text), tonumber(tp_height.text), tonumber(tp_block_id.text), tonumber(tp_block_meta.text), tonumber(tp_filled.text))
- end
- local ellipse_button = gui:addButton("center", 10, 10, 1, "Render", createEllipse)
- gui:addLabel("center", 11, 14, "Render Line")
- gui:addLabel(1, 12, 9, "Start x,y,z")
- gui:addLabel(1, 13, 9, "End x,y,z")
- gui:addLabel(1, 14, 9, "Height")
- gui:addLabel(1, 15, 9, "Block")
- local status = gui:addLabel(1, 16, 32, "")
- local tp_x0 = gui:addTextField(10, 12, 5, "")
- local tp_y0 = gui:addTextField(16, 12, 5, "")
- local tp_z0 = gui:addTextField(22, 12, 5, "")
- local tp_x1 = gui:addTextField(10, 13, 5, "")
- local tp_y1 = gui:addTextField(16, 13, 5, "")
- local tp_z1 = gui:addTextField(22, 13, 5, "")
- local tp_line_height = gui:addTextField(10, 14, 5, "1")
- local tp_line_block_id = gui:addTextField(10, 15, 5, "")
- local tp_line_block_meta = gui:addTextField(16, 15, 5, "")
- function createLine()
- error, message = builder.line(tonumber(tp_x0.text), tonumber(tp_y0.text), tonumber(tp_z0.text), tonumber(tp_x1.text), tonumber(tp_z1.text), tonumber(tp_line_height.text), tonumber(tp_line_block_id.text), tonumber(tp_line_block_meta.text))
- status.text = message
- end
- gui:addButton("center", 17, 10, 1, "Render", createLine)
- os.execute("clear")
- gui:run()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement