Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
-2

Doctor Who Regeneration Tool Help?

Asked by
Nidoxs 190
10 years ago

Ok so I am using a rengeneration tool but I want to put in 3 bricks that get placed in the bottom of the left arm and the right arm and the middle of the head. The bricks will have fire at the heat of 25 and smoke at the Rise Velocity of 10. Also the fire and smoke gets ENABLED when a sound is played Here is the script:

bin = script.Parent
local numleft = 12
local Reg = false
local SkinColors = {"Pastel brown", "Bright yellow", "Light orange"}
local Faces = {"http://www.roblox.com/asset/?id=15268080", "http://www.roblox.com/asset/?id=7083354", "http://www.roblox.com/asset/?id=9291287", "http://www.roblox.com/asset/?id=7080026", "http://www.roblox.com/asset/?id=7083072"}
function Regenerate()
    if (Reg) then return end
    Reg = true
    local player = game.Players.LocalPlayer
    local guy = player.Character
    local Torso = guy.Torso
    if (Torso:findFirstChild("RegenSmoke") == nil) then
    local rsm = Instance.new("Smoke")
    rsm.Name = "RegenSmoke"
    rsm.Color = bin.SmokeColor.Value
    rsm.Parent = Torso
    end
    if (Torso:findFirstChild("RegenSparkles") == nil) then
    local rsp = Instance.new("Sparkles")
    rsp.Name = "RegenSparkles"
    rsp.Color = bin.SmokeColor.Value
    rsp.Parent = Torso
    end
    script.Parent.Sound:Play() --MAJOR PART OF HELP
    Torso.RegenSmoke.Enabled = true
    Torso.RegenSparkles.Enabled = true
    --How do I get 3 bricks containing fire and smoke from the Server storage to be placed in the 
    --positions I want?
    wait(15)
    guy.Humanoid.WalkSpeed = 0
    rc1 = Torso["Right Shoulder"].C1
    lc1 = Torso["Left Shoulder"].C1
    Torso["Right Shoulder"].C1 = CFrame.new(0, 1.0, -0, 0, 0, 1, 0, 1, 0, -1, -0, -0)*CFrame.Angles(math.pi/5,0,0) 
    Torso["Left Shoulder"].C1 = CFrame.new(0, 1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)*CFrame.Angles(math.pi/5,0,0) 
    Torso.Neck.C1 = Torso.Neck.C1 * CFrame.fromEulerAnglesXYZ(1,0,0)
    wait(0.5)
    local l1 = Instance.new("Part")
    l1.formFactor = "Symmetric"
    l1.Size = Vector3.new(2,2,2)
    l1.TopSurface = "Smooth"
    l1.BottomSurface = "Smooth"
    l1.BrickColor = BrickColor.new("Br. yellowish orange")
    l1.Reflectance = 0.6
    l1.CanCollide = false
    l1.Parent = guy
    l1.Name = "Regenergy"
    local lm = Instance.new("SpecialMesh")
    lm.MeshType = "Sphere"
    lm.Parent = l1
    local w = Instance.new("Weld")
    w.Parent = guy
    w.Part0 = guy["Left Arm"]
    w.Part1 = l1
    w.C1 = CFrame.new(0,1,0)
    local l12 = Instance.new("Part")
    l12.formFactor = "Symmetric"
    l12.Size = Vector3.new(2,2,2)
    l12.TopSurface = "Smooth"
    l12.BottomSurface = "Smooth"
    l12.BrickColor = BrickColor.new("Br. yellowish orange")
    l12.Reflectance = 0.6
    l12.CanCollide = false
    l12.Parent = guy
    l12.Name = "Regenergy"
    local lm = bin.ConeMesh:clone()
    lm.Parent = l12
    local w = Instance.new("Weld")
    w.Parent = guy
    w.Part0 = guy["Left Arm"]
    w.Part1 = l12
    w.C1 = CFrame.new(0,2,0)
    local l2 = Instance.new("Part")
    l2.formFactor = "Symmetric"
    l2.Size = Vector3.new(2,2,2)
    l2.TopSurface = "Smooth"
    l2.BottomSurface = "Smooth"
    l2.BrickColor = BrickColor.new("Br. yellowish orange")
    l2.Reflectance = 0.6
    l2.CanCollide = false
    l2.Parent = guy
    l2.Name = "Regenergy"
    local lm = Instance.new("SpecialMesh")
    lm.MeshType = "Sphere"
    lm.Parent = l2
    local w = Instance.new("Weld")
    w.Parent = guy
    w.Part0 = guy["Right Arm"]
    w.Part1 = l2
    w.C1 = CFrame.new(0,1,0)
    local l22 = Instance.new("Part")
    l22.formFactor = "Symmetric"
    l22.Size = Vector3.new(2,2,2)
    l22.TopSurface = "Smooth"
    l22.BottomSurface = "Smooth"
    l22.BrickColor = BrickColor.new("Br. yellowish orange")
    l22.Reflectance = 0.6
    l22.CanCollide = false
    l22.Parent = guy
    l22.Name = "Regenergy"
    local lm = bin.ConeMesh:clone()
    lm.Parent = l22
    local w = Instance.new("Weld")
    w.Parent = guy
    w.Part0 = guy["Right Arm"]
    w.Part1 = l22
    w.C1 = CFrame.new(0,2,0)
    local l3 = Instance.new("Part")
    l3.formFactor = "Symmetric"
    l3.Size = Vector3.new(3,3,3)
    l3.TopSurface = "Smooth"
    l3.BottomSurface = "Smooth"
    l3.BrickColor = BrickColor.new("Br. yellowish orange")
    l3.Reflectance = 0.6
    l3.CanCollide = false
    l3.Parent = guy
    l3.Transparency = 0.3
    l3.Name = "Regenergy"
    local lm = Instance.new("SpecialMesh")
    lm.MeshType = "Sphere"
    lm.Parent = l3
    local w = Instance.new("Weld")
    w.Parent = guy
    w.Part0 = guy["Head"]
    w.Part1 = l3
    wait(2)
    if (numleft == 0) then
    guy.Humanoid.Health = 0
    else
    numleft = numleft - 1
    bin.Name = "Regenerate (" ..tostring(numleft).. ")"
    local ChosenColor = BrickColor.new(SkinColors[math.random(1,#SkinColors)])
    local parts = guy:children()
    for i = 1,#parts do
    if (parts[i].className == "Part") and (parts[i].Name ~= "Regenergy") then
    parts[i].BrickColor = ChosenColor
    end
    end
    if (guy.Head:findFirstChild("face") ~= nil) then
    guy.Head.face.Texture = Faces[math.random(1,#Faces)]
    end
    local l4 = Instance.new("Part")
    l4.formFactor = "Symmetric"
    l4.Size = Vector3.new(1,1,1)
    l4.TopSurface = "Smooth"
    l4.BottomSurface = "Smooth"
    l4.BrickColor = BrickColor.new("Br. yellowish orange")
    l4.Reflectance = 0.1
    l4.CanCollide = false
    l4.Parent = Torso
    --l4.CFrame = Torso.CFrame + Vector3.new(0,2,0)
    --Torso.CFrame = l4.CFrame
    l4.Name = "Regenergy"
    local lm = Instance.new("SpecialMesh")
    lm.MeshType = "Sphere"
    lm.Parent = l4
    lm.Scale = Vector3.new(20,20,20)
    local w = Instance.new("Weld")
    w.Parent = guy
    w.Part0 = Torso
    w.Part1 = l4
    local guys = game.Players:children()
    for i = 1,#guys do
    if (guys[i].Character ~= nil) and (guys[i].Character ~= guy) and ((guys[i].Character.Torso.Position - Torso.Position).magnitude < 10) then
    guys[i].Character.Humanoid.Health = 0--guys[i].Character.Humanoid.Health - ((guy.Humanoid.MaxHealth - guy.Humanoid.Health) * 3)
    end
    end
    guy.Humanoid.MaxHealth = 100
    wait()
    guy.Humanoid.Health = 100
    for i = 1,10 do
    wait(0.1)
    l4.Transparency = l4.Transparency + 0.1
    end
    l4:Remove()
    wait(0.5)
    guy.Humanoid.WalkSpeed = math.random(15,17)
    l1:Remove()
    l12:Remove()
    l2:Remove()
    l22:Remove()
    l3:Remove()
    wait(0.5)
    Torso["Right Shoulder"].C1 = rc1 
    Torso["Left Shoulder"].C1 = lc1 
    Torso.Neck.C1 = Torso.Neck.C1 * CFrame.fromEulerAnglesXYZ(-1,0,0)
    Torso.RegenSmoke.Enabled = false
    Torso.RegenSparkles.Enabled = false
    wait(2)
    Reg = false
    end
end

function onSelected(mouse)
    mouse.Button1Down:connect(function() Regenerate() end)
end

bin.Selected:connect(onSelected)

Does any one have any idea how to do this? Thanks! :) If you're busy please don't hesitate to ignore this but if you have some spare time I would greatly appreciate this! Thanks alot! :)

0
Are you able to access the ServerStorage in game, or do you need to store it in the lighting? I am unsure as I don't use it that often. Just thought I would put it out there because it sounds like that is where you are planning on storing it. PropheticExtinction 75 — 10y
0
This is really long code and not tabbed correctly. Please just post code snippets of where the error is. Perci1 4988 — 10y

Answer this question