Where to find particle speed value in script

Where would I put the particle emitters speed in this part of a script? (fountain.Speed)

local prevValue = nil;
local function Update()
	local fountain = game.Workspace.Fountain.cannon.core.fountain
	local speed = fountain.Speed
	local absPosition = script.Parent.Bar.AbsolutePosition.X;
	local absSize = script.Parent.Bar.AbsoluteSize.X;
	local mouseDelta = math.min(math.max(0, mouse.X - absPosition), absSize);
	local value = script.Parent.MinValue.Value + ((mouseDelta / absSize) * (script.Parent.MaxValue.Value - script.Parent.MinValue.Value));
	knob.Position = UDim2.new((mouseDelta / absSize) - .05, knob.Position.X.Offset, knob.Position.Y.Scale, knob.Position.Y.Offset);
	if (prevValue ~= nil and math.floor(prevValue) ~= math.floor(value)) then
		valueChangedEvent:Fire(prevValue, math.floor(value));
		prevValue = math.floor(value);
	else
		prevValue = math.floor(value);
	end
end

Where would I put it so it changes the value of the particle’s speed?

script.Parent.Bar.MouseMoved:Connect(Update);
script.Parent.Bar.MouseButton1Down:Connect(Update);
script.Parent.Bar.MouseButton1Up:Connect(Update);

You need a local variable for the speed.
local speed = 0

Then you need a way to change it. You could use a GuiObject.
SpeedSlider.ValueChanged:Connect(function(value)
speed = value
end)

Then you need to use it.
particle.Speed = speed

Where would I replace these with?

This should be used as a learning tool not a working script, please adhere to the devforums rules and do not ask users for complete scripts