By Guest

Unnamed Paste

Auto Detect 797 Bytes 28 one month ago
local combtAPI = require("combtAPI") local names = {} for k,v in pairs(colors) do if type(v) == "number" do names[v] = k end end combtAPI.makeButton({ x=2, y=2, width=7, height=3, text="press", textColor=colors.white, color=colors.gray, visible=true, buttonName="button1" }) combtAPI.drawButton("button1") local function but(_,_,x,y) if combtAPI.check("button1",x,y) then local rcolor = 2^math.random(0,15) combtAPI.modifyButton({ color=rcolor, text=names[rcolor] buttonName="button1" }) end end while true do local event = table.pack(os.pullEventRaw()) if event[1] == "mouse_click" then but(table.unpack(event)) end end