Jump to content
RCPOLSKI

Prefix buttons (ON and OFF)

Recommended Posts

Wasup everyone, RCPOLSKI here.

In this topic you guys are about to learn how to create prefixes like [ON] and [OFF]

Why to use this? Well, you can keep you script menu clean and still use it for others things like showing results got by prompt (numbers, words, etc...)

 

There are 2 ways of doing it:

  • Calling and refreshing the stuff right on the menu
  • Creating a function that will be called after the cheat function being read

 

So then, let's go!

 

1. First you need to store the ON and OFF info as string and then set the function "cstatus" as off

on = '[ON]'
off = '[OFF]'
cstatus = off

 

2. Here we create our menu and set some things up...

- Before every button, if you're going to put the prefix, you'll need to put the string var created up there (Here is cstatus) then 2 dots (..) and finally your text

function main()
  menu = gg.choice({
    cstatus .. ' Some random trick', -- cstatus + .. and 'the text'
    'Exit'},
    nil,
    'Cheat menu')
  if menu == 1 then
    if cstatus == on then -- Checks if cstatus is [ON]
	  cstatus = off -- If yes, then sets it to [OFF]
	else
	  cstatus = on -- If it's not, then sets it to [ON]
	end
    doCheat()  -- After doing the check things, regardless of outcome it call the doCheat function
  elseif menu == 2 then
    os.exit()
end

3. As you are using vars with data stored in, you can also call 1 function only to enable and disable the cheat

function doCheat()
  if cstatus == on then -- Check if the cstatus is [ON]
    print('Cheat enabled!') -- If yes, then add the activation code here
  else
    print('Cheat disabled!') -- If it's not, then add the desactivation code here
  end
end

 

There is a lua script to download with both first and second method

Feel free to use the code!

Sorry for my english, still learning tho ?

Prefix Tutorial.lua

Edited by RCPOLSKI

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Similar Content

    • By respawnaddict
      After many years and many updates, Game Guardian can STILL hack Respawnables to this day. Enyby has a tutorial on how to do it but I figured it would be better to make a resume of the whole thing plus some spicy info and tips I've found while messing around too.
       
      First and foremost, don't ask me for sh*t, I ain't making a script for no one and I suggest you all keep this at the lowest volume possible. We don't want Digital Legends witch hunting people just because we decided to play "scientist" for a day or two do we?
      Second, learn with other people's mistakes, and when I say that, I mean that you definitely shouldn't:
        — Try to modify items and XP without knowing what to expect or what to do if the game starts to "play games" with you. (soft locked on level 1 unable to gain any XP regardless of your current level, items with funky values resetting back to zero)
        — Log into your main account. (just like playing Skyrim as a thief, you WILL get caught eventually)
        — Edit any result just because f*ck it, why not. (you may end up destroying your entire local save by editing something you weren't supposed to edit)

       
      With simple stuff out of the way, let's remember a thing or two so you don't feel overwhelmed:
      1) — ALL the currencies in the game are DWORD's, from Gold to Horde Mode "zombienites".
      2) — ALL gadgets are WORD's, but be careful when changing their values, since many of them will reset to zero or decrease depending on the value you use.
      3) — NEVER forget that everything is encrypted.
      4) — ALWAYS ADD SMALL AMOUNTS TO THE VALUE UNTIL CERTAIN OF THE OUTCOME, NEVER CHANGE IT DIRECTLY UNLESS YOU KNOW WELL WHAT YOU'RE DOING.
      The method to achieve "infinite something" in this game is the same to every other game:
         1) — Be patient.
         2) — Search for current value.
         3) — Change it in-game.
         4) — Search for new value.
         Time-Loop) — Rinse and repeat until very few addresses are left. Preferably less than fifteen.
         ?) — Change them all at once.
         idk) — If the game didn't crash or freeze, leave the shop or go to another tab to see if it worked.
         idc) — Profit?
      Remember that, if nothing works out, you can always clear the cache and try again.
      For now, not much was explored on the game using Game Guardian and I feel like I should point out the things that may be possible to do but weren't tested properly if at all:
         — Scores on singleplayer mode. NOT TESTED
              — Can be exploited to safely farm XP and money offline if needed.
         — Gadget cooldowns. NOT TESTED
              — With hundreds of weapons that can kill you instantly from the other side of the map, who's going to give a sh*t about that anyway?
         — Ammunition and "charging" weapons (like bows). NOT TESTED
              — Instant one-hit bow shots and non-stop Blunderbusses wrecking havoc all around.
         — Clothing-specific attributes. NOT TESTED
              — Digital Legends forgot to make the Chuck Norris's set OP. Let's fix that.
         — Weapon rent duration. MIGHT BE SERVERSIDED ONLY
              — Can I borrow it..forever?
         — Equipped equipment. NOT TESTED
              — It's a videogame cliché to materialize any weapon and equipment out of nowhere but I don't give a d*mn.
       
      I'll be testing things out as time passes and updates to this thread are probably certain. I also invite whoever's interested in the game to investigate the things I have mentioned above, as it can introduce to us many possibilities in the future (like some kind of "mod menu").
      (I know btw that this is not really a tutorial, but I intend to turn it into one with enough effort)
    • By Pro_Cheater
      HELP ME ???? ...
    • By Kriptihaxxx
      Best war mafia hacks by me password is kriptihaxxx    HAVE FUN! MORE MODS COMING SOON!   NEW MODS LATER!! 
      Updates: GOD MODE!
      Join my discord!! https://discord.gg/U4A9TfX
    • By Kriptihaxxx
      View File UPDATE! War mafia kriptihaxxx
      Best war mafia hacks by me password is kriptihaxxx    HAVE FUN! MORE MODS COMING SOON!   NEW MODS LATER!! 
      Updates: GOD MODE!
      Join my discord!! https://discord.gg/U4A9TfX
      Submitter Kriptihaxxx Submitted 01/24/19 Category LUA scripts  
    • By Qusdrok
      how to cheat game in link ??? I tried but it easier band, so I ask guys how to cheat not band ??? please and thank you so much 
      https://play.google.com/store/apps/details?id=com.entropy.dragonslayer_new_paid&hl=vi
×
×
  • Create New...