generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: [HELP] Question about my script

Previous Thread :: Next Thread 
symbolically is not online. symbolically
Joined: 20 Sep 2012
Total Posts: 359
20 Sep 2016 04:37 PM
Someone ####### up a game I built and I made a script that deletes the script that screws it up. Keep in mind there's over 500+ of these ####### up scripts. So, the script I made to destroy it only deletes it if its under workspace and it's a part that has the script in it. How do I make it so it deletes it in everything, not just if the script is in a part. Here's the script by the way: while true do for i,v in pairs(game.Workspace:GetChildren()) do if v.ClassName == "Part" then for i,v in pairs(v:GetChildren()) do if v.ClassName == "Script" then if ######## ## "require( NUMBER IN THE SCRIPT (HIDING IT FOR CONFIDENTIALITY) )" then v:Destroy() print("1 virus script down") else print("No script found in this location") end end end wait(0.5) end wait(.05) end end
Report Abuse
igunaa is not online. igunaa
Joined: 15 Sep 2010
Total Posts: 2588
20 Sep 2016 04:38 PM
Goo`ld free model "viruses" lold.

Said the wise.
Report Abuse
symbolically is not online. symbolically
Joined: 20 Sep 2012
Total Posts: 359
20 Sep 2016 04:40 PM
First of all, it's not a FM. It's in a team create and the person that left used a script to implant it everywhere in workspace.


Report Abuse
symbolically is not online. symbolically
Joined: 20 Sep 2012
Total Posts: 359
20 Sep 2016 05:04 PM
someone help please. :|

also sorry for the roblox hashtags. smh




Report Abuse
CrixusOdalisManiatus is not online. CrixusOdalisManiatus
Joined: 16 Jun 2011
Total Posts: 5987
20 Sep 2016 05:27 PM
just use workspace filtering and type in 'script'
it'll locate everything that has a classname of 'script'.
Report Abuse
LennyFaceStudio is not online. LennyFaceStudio
Joined: 21 Jun 2016
Total Posts: 33
20 Sep 2016 06:13 PM
^


Report Abuse
symbolically is not online. symbolically
Joined: 20 Sep 2012
Total Posts: 359
20 Sep 2016 08:44 PM
Like I said, there's over 500 of these scripts and I have my own scripts also that are named script


Report Abuse
TimeTicks is not online. TimeTicks
Joined: 27 Apr 2011
Total Posts: 27115
20 Sep 2016 08:47 PM
local name = 'Virus'

Kill = function(name,location)
for i,v in next, location:GetChildren() do
if v.Name == name then
v:Destroy()
end
Kill(name,v)
end
end

Kill(name,game)


Report Abuse
symbolically is not online. symbolically
Joined: 20 Sep 2012
Total Posts: 359
20 Sep 2016 08:49 PM
Does that read every single object in workspace even if it's a descendant of a another object?


Report Abuse
TimeTicks is not online. TimeTicks
Joined: 27 Apr 2011
Total Posts: 27115
20 Sep 2016 08:51 PM
yes


Report Abuse
symbolically is not online. symbolically
Joined: 20 Sep 2012
Total Posts: 359
20 Sep 2016 08:53 PM
local name = 'Virus'

Kill = function(name,location)
for i,v in next, location:GetChildren() do
if v.Name == name then
v:Destroy()
end
Kill(name,v)
end
end

Kill(name,game)


So, what I'm getting here is:
--> Replace 'location' with Workspace (Where it is)
--> Replace name with the script name

and run it?


Report Abuse
iIikeyou is not online. iIikeyou
Joined: 07 Mar 2012
Total Posts: 1659
20 Sep 2016 08:54 PM
local part=game:FindFirstChild('Virus',true)
repeat part:Destroy()part=game:FindFirstChild('Virus',true)until not part
Report Abuse
symbolically is not online. symbolically
Joined: 20 Sep 2012
Total Posts: 359
20 Sep 2016 08:57 PM
I want it to destroy the script if it has the source I provide it with (using script.Source)

Not just destroy every single script


Report Abuse
symbolically is not online. symbolically
Joined: 20 Sep 2012
Total Posts: 359
20 Sep 2016 09:03 PM
@ilike

That only deletes it if its a child in workspace. I want it to delete it that way and if it's in another child of workspace.

So example:

Workspace

v Model
v Part
Script (Inside another object within workspace)

v Part
Script (Inside another object within workspace)

Script (Under workspace directly; your script only deletes these)




Report Abuse
iIikeyou is not online. iIikeyou
Joined: 07 Mar 2012
Total Posts: 1659
20 Sep 2016 09:06 PM
when you give a second argument of true to findfirstchild, it searches all descendants
Report Abuse
symbolically is not online. symbolically
Joined: 20 Sep 2012
Total Posts: 359
20 Sep 2016 09:08 PM
Thanks timetricks :)


Report Abuse
TimeTicks is not online. TimeTicks
Joined: 27 Apr 2011
Total Posts: 27115
20 Sep 2016 09:25 PM
@OP

local name = 'Virus'
local location = workspace

Kill = function(name,location)
for i,v in next, location:GetChildren() do
if v.Name == name then
v:Destroy()
end
Kill(name,v)
end
end

Kill(name,location)

:)


Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image