--| Main |--

Remote.PhongDev.OnServerEvent:Connect(function(LocalPlayer)
	
	--| Clone |--
	local Emit_VFX = Access.VFX.In_Transform.Emit_VFX:Clone()
	Emit_VFX.Parent = LocalPlayer.Character.PrimaryPart
	Debris:AddItem(Emit_VFX, 5)
	
	local Emit_VFX2 = Access.VFX.In_Transform.Emit_VFX2:Clone()
	Emit_VFX2.Parent = LocalPlayer.Character.PrimaryPart
	Debris:AddItem(Emit_VFX2, 4)
	
	local Enabled_VFX = Access.VFX.In_Transform.Enabled_VFX:Clone()
	Enabled_VFX.Parent = LocalPlayer.Character.PrimaryPart
	Debris:AddItem(Enabled_VFX, 4)
	
	spawn(function()
		for i,v in pairs(Enabled_VFX:GetChildren()) do
			v.Enabled = true
		end
	end)
	
	
	delay(0.2,function()
	for i,v in pairs(Emit_VFX:GetChildren()) do
		v:Emit(v:GetAttribute("EmitCount"))
	end
	wait(2.05)
	for i,v in pairs(Emit_VFX2:GetChildren()) do
		v:Emit(v:GetAttribute("EmitCount"))
		end
	end)
	
	delay(2.05,function()
		local Transform = Access.VFX.Transform:Clone()
		Transform.Parent = LocalPlayer.Character.PrimaryPart
		Debris:AddItem(Transform, 4)
		
		local WeldPart = Instance.new("Weld", LocalPlayer.Character.PrimaryPart)
		WeldPart.Part0 = LocalPlayer.Character.PrimaryPart
		WeldPart.Part1 = Transform
		WeldPart.C0 = WeldPart.Part0.CFrame:ToObjectSpace(WeldPart.Part1.CFrame * CFrame.new(0,0,0))
		Debris:AddItem(WeldPart,4)
		
		for i,v in pairs(Transform.Emit_VFX:GetChildren()) do
			v:Emit(v:GetAttribute("EmitCount"))
		end
		wait(0.7)
		
		Transform.Bone:Destroy()
		
		for i,v in pairs(Transform.Enabled_VFX:GetChildren()) do
			v.Enabled = false
		end
	end)
	
	delay(4,function()
		local Body = Access.VFX.Body.VFX:Clone()
		Body.Parent = LocalPlayer.Character.PrimaryPart
		Debris:AddItem(Body, Cooldown.Value)
		
		wait(Cooldown.Value - 0.5)
		
		for i,v in pairs(Body:GetChildren()) do
			v.Enabled = false
		end
	end)
	
end)
