Jump to content
  • 0

GG Logo as ON/OFF Switch


YeetMeister

Question

Posted

[Pls Help]
Use the gg logo as toggle on off switch

First launch of script gets the value and puts the script to the background

And when the logo is pressed it activates/deactivates the hack

2 answers to this question

Recommended Posts

Posted
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

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.