Jump to content

Question

Posted

Sorry about the post earlier Enyby.

So i need help with the code, i saw someone made a script look like Console Script

Example:   /gun on     or    /gun off

I want this code can someone show me the template of it? 

9 answers to this question

Recommended Posts

  • 0
Posted
1 hour ago, AdamWibu said:

Sorry about the post earlier Enyby.

So i need help with the code, i saw someone made a script look like Console Script

Example:   /gun on     or    /gun off

I want this code can someone show me the template of it? 

By this do you mean an option to enable and disable ?

  • 0
Posted
1 minute ago, Chex7998 said:

By this do you mean an option to enable and disable ?

is like a command script,

Like Text Propmt, Like Some Roblox Use This Code.

 

;help

;noclip

 

like that

  • 0
Posted
2 minutes ago, AdamWibu said:

is like a command script,

Like Text Propmt, Like Some Roblox Use This Code.

 

;help

;noclip

 

like that

So just a basic menu? And roblox does use that but roblox exploiting mainly does GUIs

  • 0
Posted
Just now, Chex7998 said:

So just a basic menu? And roblox does use that but roblox exploiting mainly does GUIs

nvm i ask my friend they got it

Thx for the help for bit.

  • 0
Posted
On 4/25/2021 at 12:42 PM, AdamWibu said:

Sorry about the post earlier Enyby.

So i need help with the code, i saw someone made a script look like Console Script

Example:   /gun on     or    /gun off

I want this code can someone show me the template of it? 

function gun_func(state)
  if state then
    --do staff for enable
  else
    --do staff for disable
  end
end

cmd = gg.prompt({"Message text:"}, nil, {[1] = "text"})

if cmd ~= nil then
  if cmd[1] == "/gun on" then
    gun_func(true)
  elseif cmd[2] == "/gun off" then
    gun_func(false)
  end
else
  --do staff, for example - return to menu, etc
end

 

  • 0
Posted
4 hours ago, n3kitOzz said:

function gun_func(state)
  if state then
    --do staff for enable
  else
    --do staff for disable
  end
end

cmd = gg.prompt({"Message text:"}, nil, {[1] = "text"})

if cmd ~= nil then
  if cmd[1] == "/gun on" then
    gun_func(true)
  elseif cmd[2] == "/gun off" then
    gun_func(false)
  end
else
  --do staff, for example - return to menu, etc
end

 

Does not work? i mean the /gun on Work but /gun off Not?

 

I want like Multiple Console Command

Like This.

/gun on

/gun off

/speed on

/speed off

and more command? 

  • 0
Posted
On 4/29/2021 at 5:12 PM, AdamWibu said:

Does not work? i mean the /gun on Work but /gun off Not?

 

I want like Multiple Console Command

Like This.

/gun on

/gun off

/speed on

/speed off

and more command? 

I'm giving you a template. You - will edit it to your need.

  • 0
Posted (edited)

try this. one for size

 

--main code
--Version: 1.0
--description: toxic executor v1.0

local gg = gg
local cmds = {"cmd 1","cmd 2"}

--checks the item[1] which is a table and if its true then it will print hack on then sets item to nil then do main() which is back then stop
function checkAnswer(item)
if item[1] == cmd[1] then print("hack on") item = nil main() end
  if item[1] == cmd[2] then print("hack off") item = nil main() end
end

--executor runs a function which passes itself into another function which gets accessed 
function main()
su = gg.prompt({"ENTER A CMD"}, {[1] = '0'}, {[1] = 'text'})
    checkAnswer(su)
end

--executor booter
st = gg.choice({"Launch Executor", "exit"})
if st == 1 then main() end
if st == 2 then os.exit() end

 

Edited by Crystal_Mods100x
error

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
×
×
  • 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.