Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --Basalt configurated installer
- local filePath = "basalt.lua" --here you can change the file path that it installs to. default: /basalt.lua
- if not(fs.exists(filePath))then
- shell.run("pastebin run ESs1mg7P packed true "..filePath:gsub(".lua", "")) -- this is an alternative to the wget command
- end
- local basalt = require(filePath:gsub(".lua", "")) -- here you can change the variablename in any variablename you want default: basalt
- --varibles--
- local monitor = peripheral.find("monitor")
- local state = true
- local main = basalt.createFrame()
- local aButton = main:addButton():setText("On!")
- --fun--
- --main--
- local function main()
- term.redirect(monitor)
- monitor.clear()
- while(state) do
- os.queueEvent("randomEvent")
- os.pullEvent()
- aButton:onClick(function(self,event,button,x,y)
- if(event=="mouse_click")and(button==1)then
- basalt.debug("Left mousebutton got clicked!")
- end
- end)
- os.sleep(2)
- end
- end
- --run--
- main()
- basalt.autoUpdate()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement