local function c(c)local f=Vector3.new(0,0,0)local V=3 if c:IsA("\077\111\100\101\108")and c.PrimaryPart then local Y=c.PrimaryPart f=Y.Position V=1*Y.Size.X else f=c.Position V=1*c.Size.X end local Y=Instance.new("\080\097\114\116")Y.Name="\083\109\111\107\101\080\097\114\116"Y.Transparency=1 Y.CanCollide=false Y.Anchored=true Y.Position=f+Vector3.new(0,1,0)Y.Size=Vector3.new(1,1,1)Y.Parent=mapManager.getMap()local W local y=math.random(1,3)if y==1 then W=ServerStorage.CrushSound1:Clone()elseif y==2 then W=ServerStorage.CrushSound2:Clone()elseif y==3 then W=ServerStorage.CrushSound3:Clone()end W.Parent=Y if not W.IsLoaded then W.Loaded:wait()end W:Play()local M=Instance.new("\083\109\111\107\101")M.Parent=Y M.RiseVelocity=0 M.Size=V DebrisService:AddItem(Y,2)end

local function createSmoke(targetPart)
	local pos = Vector3.new(0, 0, 0)
	local size = 3
	if targetPart:IsA("Model") and targetPart.PrimaryPart then
		--local plate = targetPart:FindFirstChild("Plate", true)
		local plate = targetPart.PrimaryPart
		pos = plate.Position
		size = 1*plate.Size.X
	else
		pos = targetPart.Position
		size = 1*targetPart.Size.X
	end	
	
	local smokePart = Instance.new("Part")
	smokePart.Name = "SmokePart"
	smokePart.Transparency = 1
	smokePart.CanCollide = false
	smokePart.Anchored = true
	--smokePart.Position = getPositionRelativetoBase(smokePart, pos) + Vector3.new(0, 1, 0)
	smokePart.Position = pos + Vector3.new(0, 1, 0)
	smokePart.Size = Vector3.new(1, 1, 1)
	smokePart.Parent = mapManager.getMap()
	
	local crushSound
	local randomNum = math.random(1,3)
	if randomNum == 1 then
		crushSound = ServerStorage.CrushSound1:Clone()
	elseif randomNum == 2 then
		crushSound = ServerStorage.CrushSound2:Clone()
	elseif randomNum == 3 then
		crushSound = ServerStorage.CrushSound3:Clone()
	end
	crushSound.Parent = smokePart
	if not crushSound.IsLoaded then
		crushSound.Loaded:wait()
	end
	crushSound:Play()

	local smoke = Instance.new("Smoke")
	smoke.Parent = smokePart
	smoke.RiseVelocity = 0
	smoke.Size = size

	DebrisService:AddItem(smokePart, 2)
end
