--WARNING: ABANDON ALL HOPE YE WHO TREAD THESE LINES


local Camera =game.Workspace.CurrentCamera

local Tool = script.Parent
local Handle = Tool:WaitForChild('Handle')


function StartTrail(source,nparent)
	local trailParts = {}
	
	local sourceAlive = true
	UTIL.DefineDestructor(source,function()
		sourceAlive=false
		for _,i in pairs(trailParts) do
			i.Parent = nil
		end
	end)
	local numParts = 60
	local counter = 1
	while sourceAlive do
		if not trailParts[counter] then
			local tpart = Instance.new('Part')
			tpart.Anchored = true
			tpart.CanCollide = false
			tpart.FormFactor = 'Custom'
			tpart.Size = Vector3.new(.3,5,3)
			tpart.Transparency = .2
			tpart.BrickColor = BrickColor.new('Bright blue')
			tpart.Parent = nparent
			trailParts[counter]=tpart
		end
		trailParts[counter].CFrame = source.CFrame:toWorldSpace(CFrame.new(0,0,6.5))
		counter = counter+1
		if counter>numParts then
			counter = 1
		end
		wait(.025)
	end
	
end

Tool.ChildAdded:connect(function(nchild)
	if nchild.Name=='FakeHandle' then
		Spawn(function() StartTrail(nchild,Camera) end)
	end
end)
