Regen script pl0x
#1
Can someone make one. With instructions. :]

Also like the script from roblox in there wiki pl0x

[lua]brick = game.Workspace.Brick --tagging the brick

function onTouch(part) --the function

brick.Transparency = 1 --what the function is to do with the brick
wait(1)
brick.Transparency = 0
end

brick.Touched:connect(onTouch) --listening event
[/lua]
[Image: cxAECR.png]
[Image: r8umfc.gif]
Reply
#2
Easy enough.

[lua]
local thing = script.Parent
local nuthing = thing:clone()
local par = thing.Parent

while true do --Somewhat redundant :/
sleep(120) --Two minutes between regens. Change it to however long you want.
game:message("Regenerating " .. thing.Name) --Change message if you want.
sleep(1)
thing.Parent = game.Storage
nuthing.Parent = par
sleep(1)
game:message()
thing:remove()
script:remove() --Just in case.
end
[/lua]

I haven't tested it -- but it should work. Just copy it into a script and place the script inside the model you want to regen.
Reply
#3
(05-24-2011, 07:56 PM)Qwertygiy Wrote: Easy enough.

[lua]
local thing = script.Parent
local nuthing = thing:clone()
local par = thing.Parent

while true do --Somewhat redundant :/
sleep(120) --Two minutes between regens. Change it to however long you want.
game:message("Regenerating " .. thing.Name) --Change message if you want.
sleep(1)
thing.Parent = game.Storage
nuthing.Parent = par
sleep(1)
game:message()
thing:remove()
script:remove() --Just in case.
end
[/lua]

I haven't tested it -- but it should work. Just copy it into a script and place the script inside the model you want to regen.

Thanks can you change the other one I just posted to
[Image: cxAECR.png]
[Image: r8umfc.gif]
Reply
#4
I wrote a tutorial for this: http://buildism.net/forum/Thread-How-to-...-Scripting

Unlike Qwertygiy's, it takes an existing model in the game, backs it up, and restores the backup when needed, rather than copying the model from storage.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)