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:

Previous Thread :: Next Thread 
DynamicWings is not online. DynamicWings
Joined: 25 Jul 2013
Total Posts: 159
09 May 2014 01:26 PM
This script works for the virus and 4D spreads that effect your game. I tried it and it worked so if you need a script try this one or kason321 script

http://www.roblox.com/Maximum-Protection-V1-item?id=155838524
Report Abuse
Merely is not online. Merely
Joined: 07 Dec 2010
Total Posts: 17266
09 May 2014 01:28 PM
The entire script contents:

function killinf(bin) local items = bin:GetChildren() for i = 1, #items do if items[i].Name == "INfecTION" then items[i]:Destroy() else local other = items[i] killinf(other) end end end killinf(workspace)
Report Abuse
Seranok is not online. Seranok
Joined: 12 Dec 2009
Total Posts: 11083
09 May 2014 01:40 PM
local virus = game:FindFirstChild("INfecTION", true)
while virus do
virus:Destroy()
virus = game:FindFirstChild("INfecTION", true)
end
Report Abuse
stravant is not online. stravant
Forum Moderator
Joined: 22 Oct 2007
Total Posts: 2893
09 May 2014 01:50 PM
@Seranok

That's an interesting approach that I wouldn't have considered. I wonder whether it's faster or slower than the recursive searching approach.
Report Abuse
RenderSettings is not online. RenderSettings
Joined: 16 Aug 2010
Total Posts: 2560
09 May 2014 01:52 PM
It would be quite a bit faster if it also checked if #items[i]:children()>0 before doing the function call though. Or else it builds an entire Lua function frame that is essentially a no-op.
Report Abuse
Merely is not online. Merely
Joined: 07 Dec 2010
Total Posts: 17266
09 May 2014 02:59 PM
I'd bet that recursive FindFirstChild will be faster than recursion in Lua.
Report Abuse
xXxMoNkEyMaNxXx is not online. xXxMoNkEyMaNxXx
Joined: 03 Oct 2008
Total Posts: 3120
09 May 2014 03:01 PM
repeat until game:FindFirstChild("INfecTION",true):Destroy()

relies on erroring when it's not found to break the loop :o
Report Abuse
lolb3 is not online. lolb3
Joined: 16 Jan 2010
Total Posts: 2268
09 May 2014 04:26 PM

repeat until game:FindFirstChild("INfecTION",true):Destroy()

uh

repeat until not game:FindFirstChild("INfecTION",true):Destroy()
Report Abuse
xXxMoNkEyMaNxXx is not online. xXxMoNkEyMaNxXx
Joined: 03 Oct 2008
Total Posts: 3120
09 May 2014 04:29 PM
That would only remove one instance because :Destroy() doesn't return anything so it would break the loop.
Report Abuse
lolb3 is not online. lolb3
Joined: 16 Jan 2010
Total Posts: 2268
09 May 2014 04:39 PM
hm not nil = true so yeah you're right
Report Abuse
DynamicWings is not online. DynamicWings
Joined: 25 Jul 2013
Total Posts: 159
18 May 2014 10:42 PM
Hey you admins responded hehe :D
Report Abuse
nighttimeninja314 is not online. nighttimeninja314
Joined: 04 Apr 2011
Total Posts: 4001
18 May 2014 10:48 PM
When doing this, if it doesn't work, disable all of your plugins. It should work afterwards. Then, one by one, enable them and see which one creates the viruses. Remove it.
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