function _Confetti.Toggle(o)o.Enabled=not o.Enabled end _Confetti.setGravity(Vector2.new(0,1))local o={}for G=1,10,1 do table.insert(o,_Confetti.createParticle(Vector2.new(.5,1),Vector2.new(math.random(90)-45,math.random(70,100)),script.Parent.Parent))end local G=false RunService.RenderStepped:Connect(function()for o,m in pairs(o)do m.Enabled=G m:Update()end end)function _Confetti.fire()spawn(function()G=true wait(tick)G=false end)end return _Confetti
-- Stops a confetti from firing again once it's out of bounds.
function _Confetti:Toggle()
	self.Enabled = not self.Enabled
end

_Confetti.setGravity(Vector2.new(0, 1))

local Conffetis = {}

for _ = 1, 10 do
	table.insert(
		Conffetis,
		(
			_Confetti.createParticle(
				Vector2.new(0.5, 1),
				Vector2.new(math.random(90) - 45, math.random(70, 100)),
				script.Parent.Parent
			)
		)
	)
end

local Debounce = false

RunService.RenderStepped:Connect(function()
	for _, Conffeti in pairs(Conffetis) do
		Conffeti.Enabled = Debounce

		Conffeti:Update()
	end
end)

function _Confetti.fire()
	spawn(function()
		Debounce = true

		wait(tick)

		Debounce = false
	end)
end

return _Confetti
