1
0
forked from xomf/slabOS

Add Clicker.lua

This commit is contained in:
xomf 2025-06-01 23:48:01 +00:00
parent 09ca9784e2
commit a568d0174d

22
Clicker.lua Normal file
View File

@ -0,0 +1,22 @@
local basalt = require("basalt")
local main = basalt.getMainFrame()
local cookies = 0
local cookieLabel = main:addLabel()
:setText("Cookies: " .. cookies)
:setPosition(4, 2)
local cookieButton = main:addButton()
:setText("Click for Cookies!")
:setPosition(4, 4)
:setSize(20, 3)
:onClick(function()
cookies = cookies + 1
cookieLabel:setText("Cookies: " .. cookies)
end)
basalt.run()