I wanted an automatic code in my case or v. Serious name of a table I’ll put my code here!
This is my script!
local Auras_Particles = {
['Hand'] = {
["RedHandAura"] = 1000000,
["RedHandParticle"] = 1000000,
["PurpleHandAura"] = 1000000000,
["PurpleHandParticle"] = 1000000000,
};
['Leg'] = {
["LegAura"] = 100000,
["LegParticle"] = 100000,
}}
function Auras_Particles:SetHand (Char,PowerVlaue)
for i,v in pairs(Char:GetChildren()) do
for i,v in pairs(v:GetChildren())do
if Auras_Particles.Hand[v.Name] ~= nil then
local ToTransparency = PowerVlaue/Auras_Particles.Hand[v.Name]
if ToTransparency < 1 then
v.Transparency = NumberSequence.new(1-ToTransparency)
else
local HandName = v.Name
local Finish = false
local NumberOfAura = nil
for i = 1,#Auras_Particles.Hand do
if Auras_Particles.Hand[i] == HandName then
NumberOfAura = i
end
end
wait()
if not Auras_Particles.SetHand[NumberOfAura+2] then
Finish = true
end
wait()
if not Finish then
ToTransparency = PowerVlaue/(Auras_Particles.Hand[NumberOfAura+2])
if ToTransparency < 0 then
ToTransparency = 0
end
v.Transparency = NumberSequence.new(ToTransparency)
else
v.Transparency = NumberSequence.new(0)
end
end
end
end
end
end
function Auras_Particles:SetLeg (Char,SpeedVlaue)
for i,v in pairs(Char:GetChildren()) do
for i,v in pairs(v:GetChildren())do
if Auras_Particles.Leg[v.Name] ~= nil then
print(v.Name)
local ToTransparency = SpeedVlaue/Auras_Particles.Leg[v.Name]
if ToTransparency > 1 then
ToTransparency = 1
end
v.Transparency = NumberSequence.new(1-ToTransparency)
end
end
end
end
return Auras_Particles