Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

how do you disable all the scripts in game with one script? (dev-Console Gui)

Imagine you have a dev-Console Gui in your game and you want some way to interact with all of the scripts like disabling all of the scripts in game but not the dev-Console Gui Script.

I have the script for the command bar but not to turn off all the scripts. Btw this is not a server side script i am trying to make it far into the Local side.

script for the dev-Console

for i,Inputs in pairs(script.Parent.Shell.Inputs:GetChildren()) do
	if Inputs.Text == "Quit" or Inputs.Text == "quit" or Inputs.Text == "kill()" or Inputs.Text == "Kill()" then


		-- Trun off scripts in game without this one!





	end
end

*And with the same code turning the scripts back on again!

2 answers

✓ Accepted answer
for i,v in pairs(game:GetDescendants()) do if v:IsA("Script") or v:IsA("LocalScript") and v.Parent ~= nil then v.Disabled = true end end

4 comments

0

you cant call game get descendants in a regular script as it will give an error so using the argument BashGuy10 stated will not be needed

0

thx @MLGwarfare

0

You never even explained a bit of your code. @MLGwarfare04

0

im pretty sure anyone with half a brain can read the code

You can use game:GetDescendants() and a for loop to loop through all instances in game, and is :IsA("Script") or :IsA("LocalScript"), on top of that, you can check if the instance is the same script by using if script ~= script.Parent.

I'm not providing any code, as that's for YOU to find out!

1 comment

0

Thanks @BashGuy10

This discussion is preserved as it was. New answers, comments, and votes are closed.