while true do if not Main:IsDescendantOf(game)or Main.Parent.Name=="\075\110\105\102\101"and FindFirstClass(Main,"\087\101\108\100")or Main.Anchored then break end if S.GrenadeTrail and(S.GrenadeTransparency~=1 and(S.GrenadeTrailThickness~=0 and S.GrenadeTrailVisibleTime~=0))then local K=Instance.new("\080\097\114\116")K.BrickColor=S.GrenadeTrailColor K.Transparency=S.GrenadeTrailTransparency K.Anchored=true K.CanCollide=false K.Size=VEC3(1,1,1)local h=Instance.new("\066\108\111\099\107\077\101\115\104")h.Offset=VEC3(0,0,-(Main.Position-LastPos).magnitude/2)h.Scale=VEC3(S.GrenadeTrailThickness,S.GrenadeTrailThickness,(Main.Position-LastPos).magnitude)h.Parent=K K.Parent=Main.Parent K.CFrame=CF(LastPos,Main.Position)delay(S.GrenadeTrailVisibleTime,function()if S.GrenadeTrailDisappearTime>0 then local h=0 while true do if h==90 then break end local R=h+3/S.GrenadeTrailDisappearTime h=R>90 and 90 or R local V=h/90 K.Transparency=NumLerp(S.GrenadeTrailTransparency,1,V)wait()end K:Destroy()else K:Destroy()end end)LastPos=Main.Position end wait()end if not Main:IsDescendantOf(game)then Grenade:Destroy()end


while true do
	if (not Main:IsDescendantOf(game))
	or (Main.Parent.Name == "Knife" and FindFirstClass(Main, "Weld"))
	or Main.Anchored then
		break
	end
	
	if S.GrenadeTrail and S.GrenadeTransparency ~= 1
	and S.GrenadeTrailThickness ~= 0 and S.GrenadeTrailVisibleTime ~= 0 then
		local Trail = Instance.new("Part")
		Trail.BrickColor = S.GrenadeTrailColor
		Trail.Transparency = S.GrenadeTrailTransparency
		Trail.Anchored = true
		Trail.CanCollide = false
		Trail.Size = VEC3(1, 1, 1)
		local Mesh = Instance.new("BlockMesh")
		Mesh.Offset = VEC3(0, 0, -(Main.Position - LastPos).magnitude / 2)
		Mesh.Scale = VEC3(S.GrenadeTrailThickness, S.GrenadeTrailThickness, (Main.Position - LastPos).magnitude)
		Mesh.Parent = Trail
		Trail.Parent = Main.Parent
		Trail.CFrame = CF(LastPos, Main.Position)
		delay(S.GrenadeTrailVisibleTime, function()
			if S.GrenadeTrailDisappearTime > 0 then
				local X = 0
				while true do
					if X == 90 then break end
					local NewX = X + (3 / S.GrenadeTrailDisappearTime)
					X = (NewX > 90 and 90 or NewX)
					local Alpha = X / 90
					Trail.Transparency = NumLerp(S.GrenadeTrailTransparency, 1, Alpha)
					wait()
				end
				Trail:Destroy()
			else
				Trail:Destroy()
			end
		end)
		LastPos = Main.Position
	end
	
	wait()
end

if (not Main:IsDescendantOf(game)) then
	Grenade:Destroy()
end
