while not script.Parent.Cloned.Value do wait()end wait(5)if not script.Parent.EDIT_THESE.CanCrash.Value then script:remove()return end local R=script.Parent.EDIT_THESE.CanCrash.Force.Value local d,e=0,false function goBoom()e=true script.Parent.Dead.Stop.Value=true local R=Instance.new("\069\120\112\108\111\115\105\111\110")R.BlastPressure=500000.0 R.BlastRadius=(script.Parent:GetModelSize()).magnitude R.Position=script.Parent.MainParts.Main.Position script.Parent.MainParts.Main.Gyro:remove()R.Parent=game.Workspace end function getParts(B)for B,C in pairs(B:GetChildren())do if C:IsA("\066\097\115\101\080\097\114\116")and not C:IsDescendantOf(script.Parent.MainParts.LandingGear)then C.Touched:connect(function(B)if not B.Parent then return end if not B.CanCollide or not C.CanCollide then return end if B:IsDescendantOf(script.Parent)then return end if game.Players:GetPlayerFromCharacter(B.Parent)then return end if C.Velocity.x>=R or C.Velocity.x<=-R or C.Velocity.y>=R or C.Velocity.y<=-R or C.Velocity.z>=R or C.Velocity.z<=-R then if not script.Parent.Dead.Value then d=time()script.Parent.Dead.Value=true;(game:GetService("\068\101\098\114\105\115")):AddItem(script.Parent,8)delay(6,function()pcall(function()script.Parent.MainParts.MainSeat.SeatWeld:remove()end)if not e then goBoom()end end)end end if script.Parent.Dead.Value and(time()-d>.5 and not e)then goBoom()end end)end getParts(C)end end getParts(script.Parent)script.Parent.AutoCrash.Changed:connect(function()if not script.Parent.AutoCrash.Value then return end if not e and not script.Parent.Dead.Value then d=time()script.Parent.Dead.Value=true;(game:GetService("\068\101\098\114\105\115")):AddItem(script.Parent,8)goBoom()end end)
-- This script handles crash detection

while not script.Parent.Cloned.Value do
	wait()
end
wait(5)

if not script.Parent.EDIT_THESE.CanCrash.Value then
	script:remove()
	return
end
local maxImpact = script.Parent.EDIT_THESE.CanCrash.Force.Value

local crashT, explode = 0, false

function goBoom() -- lol
	explode = true
	script.Parent.Dead.Stop.Value = true
	local x = Instance.new("Explosion")
	x.BlastPressure = 5e5
	x.BlastRadius = script.Parent:GetModelSize().magnitude
	x.Position = script.Parent.MainParts.Main.Position
	script.Parent.MainParts.Main.Gyro:remove()
	x.Parent = game.Workspace
end

function getParts(parent)
	for _, v in pairs(parent:GetChildren()) do
		if (v:IsA("BasePart")) and (not v:IsDescendantOf(script.Parent.MainParts.LandingGear)) then
			v.Touched:connect(function(obj)
				if not obj.Parent then
					return
				end
				if (not obj.CanCollide) or not v.CanCollide then
					return
				end
				if obj:IsDescendantOf(script.Parent) then
					return
				end
				if game.Players:GetPlayerFromCharacter(obj.Parent) then
					return
				end
				if
					v.Velocity.x >= maxImpact
					or v.Velocity.x <= -maxImpact
					or v.Velocity.y >= maxImpact
					or v.Velocity.y <= -maxImpact
					or v.Velocity.z >= maxImpact
					or v.Velocity.z <= -maxImpact
				then
					if not script.Parent.Dead.Value then
						crashT = time()
						script.Parent.Dead.Value = true
						game:GetService("Debris"):AddItem(script.Parent, 8)
						delay(6, function()
							pcall(function()
								script.Parent.MainParts.MainSeat.SeatWeld:remove()
							end)
							if not explode then
								goBoom()
							end
						end)
					end
				end
				if script.Parent.Dead.Value and ((time() - crashT) > 0.5) and not explode then
					goBoom()
				end
			end)
		end
		getParts(v)
	end
end

getParts(script.Parent)

script.Parent.AutoCrash.Changed:connect(function()
	if not script.Parent.AutoCrash.Value then
		return
	end
	if (not explode) and not script.Parent.Dead.Value then
		crashT = time()
		script.Parent.Dead.Value = true
		game:GetService("Debris"):AddItem(script.Parent, 8)
		goBoom()
	end
end)
