local function createLowPolyTree(position)
local model = Instance.new("Model")
model.Name = "LowPolyTree"
-- Ствол (Trunk)
local trunk = Instance.new("Part")
trunk.Name = "Trunk"
trunk.Size = Vector3.new(1.2, 5, 1.2)
trunk.Position = position + Vector3.new(0, 2.5, 0)
trunk.Color = Color3.fromRGB(92, 64, 51)
trunk.Material = Enum.Material.Wood
trunk.Anchored = true
trunk.Parent = model
-- Нижний слой листьев
local leaf1 = Instance.new("Part")
leaf1.Name = "LeavesBottom"
leaf1.Shape = Enum.PartType.Ball
leaf1.Size = Vector3.new(6, 6, 6)
leaf1.Position = position + Vector3.new(0, 5.5, 0)
leaf1.Color = Color3.fromRGB(45, 138, 45)
leaf1.Material = Enum.Material.Grass
leaf1.Anchored = true
leaf1.Parent = model
-- Средний слой листьев
local leaf2 = Instance.new("Part")
leaf2.Name = "LeavesMiddle"
leaf2.Shape = Enum.PartType.Ball
leaf2.Size = Vector3.new(5, 5, 5)
leaf2.Position = position + Vector3.new(0, 7.5, 0)
leaf2.Color = Color3.fromRGB(60, 176, 67)
leaf2.Material = Enum.Material.Grass
leaf2.Anchored = true
leaf2.Parent = model
-- Верхний слой листьев
local leaf3 = Instance.new("Part")
leaf3.Name = "LeavesTop"
leaf3.Shape = Enum.PartType.Ball
leaf3.Size = Vector3.new(3.5, 3.5, 3.5)
leaf3.Position = position + Vector3.new(0, 9.5, 0)
leaf3.Color = Color3.fromRGB(77, 217, 89)
leaf3.Material = Enum.Material.Grass
leaf3.Anchored = true
leaf3.Parent = model
model.Parent = workspace
return model
end
-- Создаем дерево в центре координат
createLowPolyTree(Vector3.new(0, 0, 0))
print("Дерево успешно сгенерировано!")