Advertisement
Dalznkaa

Untitled

Oct 15th, 2022 (edited)
51
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.00 KB | None | 0 0
  1. --Basalt configurated installer
  2. local filePath = "basalt.lua" --here you can change the file path that it installs to. default: /basalt.lua
  3. if not(fs.exists(filePath))then
  4.     shell.run("pastebin run ESs1mg7P packed true "..filePath:gsub(".lua", "")) -- this is an alternative to the wget command
  5. end
  6. local basalt = require(filePath:gsub(".lua", "")) -- here you can change the variablename in any variablename you want default: basalt
  7.  
  8. --varibles--
  9. local monitor = peripheral.find("monitor")
  10. local state = true
  11. local main = basalt.createFrame()
  12. local aButton = main:addButton():setText("On!")
  13.  
  14. --fun--
  15.  
  16.  
  17.  
  18.  
  19. --main--
  20. local function main()
  21.     term.redirect(monitor)
  22.     monitor.clear()
  23.     while(state) do
  24.         os.queueEvent("randomEvent")
  25.         os.pullEvent()
  26.         aButton:onClick(function(self,event,button,x,y)
  27.             if(event=="mouse_click")and(button==1)then
  28.                 basalt.debug("Left mousebutton got clicked!")
  29.             end
  30.         end)
  31.        
  32.        
  33.        
  34.         os.sleep(2)
  35.    
  36.     end
  37. end
  38.  
  39.  
  40.  
  41. --run--
  42.  
  43. main()
  44. basalt.autoUpdate()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement