Jump to content
  • 0

GG Logo as ON/OFF Switch


YeetMeister

Question

2 answers to this question

Recommended Posts

if ch==nil then ch=-1 end
function gh()
if gg.isVisible(true) then 
   gg.setVisible(false)
end
if ch==-1 then
g = gg.choice({'Auto On/Off','Exit'})
if g == 1 then gg.alert('Press Square Box To Exit the script') h()ch=1;ra=-1;end
if g == 2 then os.exit()end
else
h()
ra = -1;end;end

function h()
y = "main"
if y == "main" then y ="hh" end
gg.toast('On')

while(true)
do
if gg.isVisible(false) then
break
  else
    gg.sleep(100) end
end

gg.toast('Off')
if gg.isVisible(true)
then gg.setVisible(false) end
end
while(true)
do
  if gg.isVisible() then
    ra = 1
  end if ra == 1 then gh() end
end

Your'welcome

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.