Facebook
From Angelika, 1 Month ago, written in Lua.
Embed
Download Paste or View Raw
Hits: 137
  1. -- Define the status of each cheat
  2. isOn = '[ON] '
  3. isOff = '[OFF] '
  4. chStatus = {isOff, isOff, isOff}
  5.  
  6. -- Function to toggle the status of a cheat
  7. function Status(cheat)
  8.     if chStatus[cheat] == isOn then
  9.         chStatus[cheat] = isOff
  10.     else
  11.         chStatus[cheat] = isOn
  12.     end
  13. end
  14.  
  15. -- Function to display the main menu
  16. function Main(rMenu)
  17.     if rMenu == 0 then
  18.         gg.setVisible(true)
  19.         while true do
  20.             if gg.isVisible() then
  21.                 gg.setVisible(false)
  22.                 local menu = gg.choice({
  23.                     chStatus[1] .. 'Cheat One',
  24.                     chStatus[2] .. 'Cheat Two',
  25.                     chStatus[3] .. 'Cheat Three',
  26.                     '\n\nEXIT',
  27.                 }, nil)
  28.                 if menu == 1 then
  29.                     Status(1)
  30.                     Main(0)
  31.                 elseif menu == 2 then
  32.                     Status(2)
  33.                     Main(0)
  34.                 elseif menu == 3 then
  35.                     Status(3)
  36.                     Main(0)
  37.                 elseif menu == 4 then
  38.                     gg.toast("Exiting...")
  39.                     os.exit()
  40.                 end
  41.             end
  42.             gg.sleep(100)
  43.         end
  44.     elseif rMenu == 1 then
  45.         -- Sub menu for Player options
  46.         while true do
  47.             gg.setVisible(true)
  48.             if gg.isVisible() then
  49.                 gg.setVisible(false)
  50.                 local pMenu = gg.choice({
  51.                     'Godmode',
  52.                     'Speedhack',
  53.                     '\n\nRETURN'
  54.                 }, nil, 'Player Menu')
  55.                 if pMenu == 1 then
  56.                     -- Code for Godmode
  57.                     gg.alert("God Mode ON")
  58.                     Main(1)
  59.                 elseif pMenu == 2 then
  60.                     -- Code for Speedhack
  61.                     gg.alert("Speed Hack ON")
  62.                     Main(1)
  63.                 elseif pMenu == 3 then
  64.                     rMenu = 0
  65.                     Main(0)
  66.                 end
  67.             end
  68.             gg.sleep(100)
  69.         end
  70.     -- Define more sub-menus as needed
  71.     -- ...
  72.     end
  73. end
  74.  
  75. -- Start the main menu
  76. Main(0)