--[[ СТАРЫЙ ДОМ: ПОДВАЛ + 2 ЭТАЖА + ЧЕРДАК (Script → ServerScriptService) Lighting.Technology поставь на Future (Explorer → Lighting → Technology). ]] local Lighting = game:GetService("Lighting") local TweenService = game:GetService("TweenService") ---------------------------------------------------------------- НАСТРОЙКИ (крути тут) local LAMP_BRIGHTNESS = 3 local LAMP_RANGE = 26 local FIRE_BRIGHTNESS = 2.5 local AMBIENT = Color3.fromRGB(40, 38, 36) local OUTDOOR = Color3.fromRGB(80, 85, 100) local EXPOSURE = 0.4 local FOG = 0.25 local FLICKER = true local SOUND_AMBIENT = "" -- "rbxassetid://..." гул/ветер local SOUND_DOOR = "" -- скрип двери local BY, L1, L2, L3 = -9.2, 1.4, 12, 22.6 -- полы: подвал, 1 этаж, 2 этаж, чердак local H, T = 10, 0.6 -- высота стен, толщина перекрытия local KW, R = 5, 8 -- стенки чердака, высота крыши local C = { wall = Color3.fromRGB(78, 70, 62), floor = Color3.fromRGB(60, 44, 32), wood = Color3.fromRGB(72, 52, 36), darkWood = Color3.fromRGB(42, 30, 22), roof = Color3.fromRGB(38, 36, 38), stone = Color3.fromRGB(72, 70, 68), fabric = Color3.fromRGB(70, 32, 30), ground = Color3.fromRGB(38, 40, 30), metal = Color3.fromRGB(60, 58, 55), } local LAMP_COLOR = Color3.fromRGB(255, 205, 150) local BULB_ON = Color3.fromRGB(255, 220, 170) local BULB_OFF = Color3.fromRGB(60, 50, 40) local M = Enum.Material local rng = Random.new(1337) local old = workspace:FindFirstChild("OldHouse") if old then old:Destroy() end local house = Instance.new("Model") house.Name = "OldHouse" house.Parent = workspace local function P(size, cf, color, mat, props) local p = Instance.new(props and props.Class or "Part") if props and props.Shape then p.Shape = props.Shape end p.Anchored = true p.Size = size p.CFrame = cf p.Color = color or C.wood p.Material = mat or M.Wood p.TopSurface = Enum.SurfaceType.Smooth p.BottomSurface = Enum.SurfaceType.Smooth if props then for k, v in pairs(props) do if k ~= "Class" and k ~= "Shape" then p[k] = v end end end if not p.Parent then p.Parent = house end return p end -- коробка по двум углам local function B(x0, y0, z0, x1, y1, z1, color, mat, props) if x1 - x0 < 0.05 or y1 - y0 < 0.05 or z1 - z0 < 0.05 then return end return P(Vector3.new(x1 - x0, y1 - y0, z1 - z0), CFrame.new((x0 + x1) / 2, (y0 + y1) / 2, (z0 + z1) / 2), color, mat, props) end local CYL, BALL = Enum.PartType.Cylinder, Enum.PartType.Ball local function rad(d) return math.rad(d) end ---------------------------------------------------------------- ЗЕМЛЯ С ЯМОЙ ПОД ПОДВАЛ local bp = workspace:FindFirstChild("Baseplate") if bp then bp:Destroy() end for _, r in ipairs({{-300, 300, -300, -15.5}, {-300, 300, 15.5, 300}, {-300, -20.5, -15.5, 15.5}, {20.5, 300, -15.5, 15.5}}) do B(r[1], -20, r[3], r[2], 0, r[4], C.ground, M.Ground, {Name = "Ground"}) end B(-20.5, -20, -15.5, 20.5, BY, 15.5, C.stone, M.Slate, {Name = "BasementFloor"}) ---------------------------------------------------------------- ПЕРЕКРЫТИЯ С ПРОЁМАМИ ПОД ЛЕСТНИЦЫ local function slab(y, hx0, hx1, hz0, hz1) local y0 = y - T B(-20.5, y0, -15.5, 20.5, y, hz0, C.floor, M.WoodPlanks, {Name = "Floor"}) B(-20.5, y0, hz1, 20.5, y, 15.5, C.floor, M.WoodPlanks, {Name = "Floor"}) B(-20.5, y0, hz0, hx0, y, hz1, C.floor, M.WoodPlanks, {Name = "Floor"}) B(hx1, y0, hz0, 20.5, y, hz1, C.floor, M.WoodPlanks, {Name = "Floor"}) end slab(L1, -19.5, -15.5, -10.8, 4) -- над лестницей из подвала slab(L2, 15.5, 19.5, -4.5, 9.8) -- над лестницей на 2 этаж slab(L3, -19.5, -15.5, -10.8, 4) -- над лестницей на чердак -- перила вокруг проёма: sides = список {x0,z0,x1,z1} local function rail(y, sides) for _, s in ipairs(sides) do local x0, z0, x1, z1 = s[1], s[2], s[3], s[4] local len = math.max(math.abs(x1 - x0), math.abs(z1 - z0)) local along = Vector3.new(x1 - x0, 0, z1 - z0).Unit for i = 0, math.floor(len / 1.6) do local p = Vector3.new(x0, y, z0) + along * math.min(i * 1.6, len) P(Vector3.new(0.25, 3, 0.25), CFrame.new(p + Vector3.new(0, 1.5, 0)), C.darkWood) end local mid = Vector3.new((x0 + x1) / 2, y + 3.1, (z0 + z1) / 2) P(Vector3.new(0.35, 0.25, len + 0.3), CFrame.lookAt(mid, mid + along), C.wood, M.Wood, {Name = "Rail"}) end end rail(L1, {{-15.4, -10.8, -15.4, 4.1}, {-19.5, 4.1, -15.4, 4.1}}) rail(L2, {{15.4, -4.6, 15.4, 9.8}, {15.4, -4.6, 19.5, -4.6}}) rail(L3, {{-15.4, -10.8, -15.4, 4.1}, {-19.5, 4.1, -15.4, 4.1}}) ---------------------------------------------------------------- ЛЕСТНИЦЫ (16 ступеней) local STEPS, RISE, TREAD = 16, (L2 - L1) / 16, 1.3 local function stairs(x0, x1, zStart, dir, yBase, mat) for i = 1, STEPS do local za = zStart + dir * (i - 1) * TREAD local zb = za + dir * TREAD local top = yBase + i * RISE B(x0, top - math.min(i * RISE, 1.2), math.min(za, zb), x1, top, math.max(za, zb), mat == M.Concrete and C.stone or C.wood, mat, {Name = "Step"}) B(x0 + 0.05, top - 0.05, math.min(za, zb) - 0.05, x1 - 0.05, top + 0.05, math.max(za, zb) + 0.05, C.darkWood, M.WoodPlanks) end -- косоур (боковая балка) снизу local len = STEPS * TREAD local a = math.atan(RISE / TREAD) local cx = x1 - 0.2 local mid = Vector3.new(cx, yBase + STEPS * RISE / 2 - 0.6, zStart + dir * len / 2) P(Vector3.new(0.4, 1.2, math.sqrt(len ^ 2 + (STEPS * RISE) ^ 2)), CFrame.new(mid) * CFrame.Angles(-dir * a, 0, 0), C.darkWood) end stairs(-19.5, -15.5, 10, -1, BY, M.Concrete) -- подвал → 1 этаж stairs(15.5, 19.5, -11, 1, L1, M.Wood) -- 1 → 2 stairs(-19.5, -15.5, 10, -1, L2, M.Wood) -- 2 → чердак ---------------------------------------------------------------- СТЕНЫ local function wall(cf, length, holes, h, col, mat) h = h or H table.sort(holes, function(a, b) return a.x < b.x end) local function seg(x0, x1, y0, y1) if x1 - x0 < 0.05 or y1 - y0 < 0.05 then return end P(Vector3.new(x1 - x0, y1 - y0, 1), cf * CFrame.new((x0 + x1) / 2, (y0 + y1) / 2, 0), col or C.wall, mat or M.WoodPlanks, {Name = "Wall"}) end local cursor = -length / 2 for _, o in ipairs(holes) do local a, b = o.x - o.w / 2, o.x + o.w / 2 seg(cursor, a, 0, h) seg(a, b, 0, o.y0) seg(a, b, o.y1, h) cursor = b end seg(cursor, length / 2, 0, h) end local function win(x) return {x = x, w = 4, y0 = 3.5, y1 = 7.5} end local function doorHole(x, w) return {x = x, w = w, y0 = 0, y1 = 8} end local ROT = CFrame.Angles(0, rad(90), 0) local function windowDeco(cf, x, outSign, boarded) local y0, y1, w = 3.5, 7.5, 4 local cy, hgt = (y0 + y1) / 2, y1 - y0 P(Vector3.new(w + 0.6, 0.25, 1.6), cf * CFrame.new(x, y0 - 0.12, 0), C.darkWood) P(Vector3.new(0.2, hgt, 0.4), cf * CFrame.new(x, cy, 0), C.darkWood) P(Vector3.new(w, 0.2, 0.4), cf * CFrame.new(x, cy, 0), C.darkWood) P(Vector3.new(w, hgt, 0.1), cf * CFrame.new(x, cy, 0), Color3.fromRGB(55, 65, 60), M.Glass, {Transparency = 0.55, Name = "Glass"}) if boarded then for i, ang in ipairs({18, -14, 9}) do P(Vector3.new(w + 1.2, 0.55, 0.15), cf * CFrame.new(x, y0 + hgt * i / 4, 0.6 * outSign) * CFrame.Angles(0, 0, rad(ang)), C.wood, M.WoodPlanks, {Name = "Board"}) end end end -- одна функция на этаж: стены + окна; wins = {front={...}, back={...}, left={...}, right={...}} local function storey(y, wins, frontDoor) local sides = { {CFrame.new(0, y, -15), 41, wins.front, -1}, {CFrame.new(0, y, 15), 41, wins.back, 1}, {CFrame.new(-20, y, 0) * ROT, 30, wins.left, -1}, {CFrame.new(20, y, 0) * ROT, 30, wins.right, 1}, } for i, s in ipairs(sides) do local holes = {} for _, x in ipairs(s[3]) do table.insert(holes, win(x)) end if i == 1 and frontDoor then table.insert(holes, doorHole(0, 4.5)) end wall(s[1], s[2], holes) for _, x in ipairs(s[3]) do windowDeco(s[1], x, s[4], rng:NextNumber() < 0.5) end end end -- подвал: камень for _, cf in ipairs({CFrame.new(0, BY, -15), CFrame.new(0, BY, 15)}) do wall(cf, 41, {}, H - T, C.stone, M.Cobblestone) end for _, cf in ipairs({CFrame.new(-20, BY, 0) * ROT, CFrame.new(20, BY, 0) * ROT}) do wall(cf, 30, {}, H - T, C.stone, M.Cobblestone) end storey(L1, {front = {-12, 12}, back = {-12, 12}, left = {-6}, right = {}}, true) storey(L2, {front = {-12, 4, 12}, back = {-8, 8}, left = {}, right = {-8, 6}}) -- перегородки wall(CFrame.new(0, L1, 3), 31, {doorHole(-8, 4), doorHole(7, 5)}) wall(CFrame.new(-3, L2, -4.5) * ROT, 20, {doorHole(0, 4)}) -- подпорки в подвале for _, x in ipairs({-7, 7}) do for _, z in ipairs({-5, 5}) do B(x - 0.6, BY, z - 0.6, x + 0.6, L1 - T, z + 0.6, C.darkWood, M.Wood, {Name = "Post"}) end end ---------------------------------------------------------------- ЧЕРДАК И КРЫША local TOP = L3 + KW wall(CFrame.new(0, L3, -15), 41, {}, KW) wall(CFrame.new(0, L3, 15), 41, {}, KW) for _, x in ipairs({-20, 20}) do B(x - 0.5, L3, -15.5, x + 0.5, TOP, 15.5, C.wall, M.WoodPlanks, {Name = "Wall"}) P(Vector3.new(1, R, 15), CFrame.new(x, TOP + R / 2, -7.5), C.wall, M.WoodPlanks, {Class = "WedgePart", Name = "Gable"}) P(Vector3.new(1, R, 15), CFrame.new(x, TOP + R / 2, 7.5) * CFrame.Angles(0, math.pi, 0), C.wall, M.WoodPlanks, {Class = "WedgePart", Name = "Gable"}) end local ra = math.atan(R / 15) local RL = math.sqrt(15 ^ 2 + R ^ 2) + 1.5 local ridge = Vector3.new(0, TOP + R, 0) for _, s in ipairs({-1, 1}) do local rot = CFrame.Angles(s * ra, 0, 0) local down = Vector3.new(0, -math.sin(ra), s * math.cos(ra)) P(Vector3.new(44, 0.8, RL), CFrame.new(ridge + down * (RL / 2) + rot.UpVector * 0.4) * rot, C.roof, M.Slate, {Name = "Roof"}) end P(Vector3.new(44, 0.6, 1.2), CFrame.new(0, TOP + R + 0.5, 0), C.roof, M.Slate, {Name = "RoofRidge"}) for x = -16, 16, 8 do P(Vector3.new(0.6, 0.8, 30), CFrame.new(x, TOP + 0.4, 0), C.darkWood) end -- балки -- крыльцо B(-4, 0, -17.5, 4, 0.7, -15.5, C.stone, M.Concrete) B(-4, 0, -16.5, 4, L1, -15.5, C.stone, M.Concrete) ---------------------------------------------------------------- ДВЕРИ local function door(hingeCF, w, h, openAngle) local d = P(Vector3.new(w, h, 0.3), hingeCF * CFrame.new(w / 2, h / 2, 0), C.darkWood, M.Wood, {Name = "Door"}) local knob = P(Vector3.new(0.3, 0.3, 0.7), d.CFrame * CFrame.new(w / 2 - 0.45, -0.4, 0), Color3.fromRGB(110, 90, 50), M.Metal, {Name = "Knob", CanCollide = false, Massless = true}) local weld = Instance.new("WeldConstraint") weld.Part0, weld.Part1, weld.Parent = d, knob, d knob.Anchored = false local mod = Instance.new("PathfindingModifier") -- монстры проходят сквозь двери mod.PassThrough = true mod.Parent = d local closedCF = d.CFrame local openCF = hingeCF * CFrame.Angles(0, rad(openAngle), 0) * CFrame.new(w / 2, h / 2, 0) local sound if SOUND_DOOR ~= "" then sound = Instance.new("Sound") sound.SoundId, sound.Volume, sound.RollOffMaxDistance, sound.Parent = SOUND_DOOR, 0.8, 50, d end local prompt = Instance.new("ProximityPrompt") prompt.ActionText, prompt.ObjectText = "Открыть", "Дверь" prompt.MaxActivationDistance, prompt.RequiresLineOfSight = 8, false prompt.Parent = d local isOpen = false prompt.Triggered:Connect(function() isOpen = not isOpen prompt.ActionText = isOpen and "Закрыть" or "Открыть" TweenService:Create(d, TweenInfo.new(1.4, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {CFrame = isOpen and openCF or closedCF}):Play() if sound then sound:Play() end end) end door(CFrame.new(-2.25, L1, -15), 4.5, 8, -100) door(CFrame.new(-10, L1, 3), 4, 8, -100) door(CFrame.new(-3, L2, -2.5) * ROT, 4, 8, 100) ---------------------------------------------------------------- МЕБЕЛЬ local function tableAt(x, y, z, w, d, hgt) B(x - w / 2, y + hgt - 0.3, z - d / 2, x + w / 2, y + hgt, z + d / 2, C.wood, M.WoodPlanks, {Name = "Table"}) for _, sx in ipairs({-1, 1}) do for _, sz in ipairs({-1, 1}) do local lx, lz = x + sx * (w / 2 - 0.3), z + sz * (d / 2 - 0.3) B(lx - 0.15, y, lz - 0.15, lx + 0.15, y + hgt - 0.3, lz + 0.15, C.darkWood) end end end local function chair(cf) P(Vector3.new(1.8, 0.25, 1.8), cf * CFrame.new(0, 1.9, 0), C.wood) P(Vector3.new(1.8, 2.2, 0.2), cf * CFrame.new(0, 3.1, 0.8), C.wood) for _, sx in ipairs({-0.75, 0.75}) do for _, sz in ipairs({-0.75, 0.75}) do P(Vector3.new(0.2, 1.8, 0.2), cf * CFrame.new(sx, 0.9, sz), C.darkWood) end end end local function bed(x, y, z) B(x - 3, y, z - 5, x + 3, y + 1.6, z + 5, C.darkWood, M.Wood, {Name = "Bed"}) B(x - 2.9, y + 1.6, z - 4.9, x + 2.9, y + 2.4, z + 4.9, Color3.fromRGB(150, 140, 125), M.Fabric) B(x - 2.3, y + 2.4, z + 3, x + 2.3, y + 3, z + 4.6, Color3.fromRGB(170, 165, 150), M.Fabric) B(x - 3, y, z + 4.8, x + 3, y + 4.5, z + 5.2, C.darkWood) B(x - 2.95, y + 2.4, z - 4.6, x + 2.95, y + 2.6, z + 1.5, C.fabric, M.Fabric) -- одеяло end local function shelf(x, y, z, alongX) local w, d = alongX and 6 or 1.6, alongX and 1.6 or 6 for k = 0, 3 do B(x - w / 2, y + k * 2, z - d / 2, x + w / 2, y + k * 2 + 0.25, z + d / 2, C.wood) end for _, s in ipairs({-1, 1}) do local ox, oz = alongX and s * w / 2 or 0, alongX and 0 or s * d / 2 P(Vector3.new(alongX and 0.25 or d, 6.5, alongX and d or 0.25), CFrame.new(x + ox, y + 3.25, z + oz), C.darkWood) end for k = 1, 3 do for j = 1, 3 do local off = (j - 2) * 1.6 P(Vector3.new(0.9, 0.6, 0.6), CFrame.new(x + (alongX and off or 0), y + k * 2 + 0.7, z + (alongX and 0 or off)) * CFrame.Angles(0, 0, rad(90)), Color3.fromHSV(rng:NextNumber(), 0.3, 0.35), M.Glass, {Shape = CYL, Transparency = 0.3, CanCollide = false}) end end end local function crate(x, y, z, s) P(Vector3.new(s, s, s), CFrame.new(x, y + s / 2, z) * CFrame.Angles(0, rad(rng:NextInteger(0, 40)), 0), C.wood, M.WoodPlanks, {Name = "Crate"}) end local function barrel(x, y, z) P(Vector3.new(3, 2.4, 2.4), CFrame.new(x, y + 1.5, z) * CFrame.Angles(0, 0, rad(90)), C.wood, M.Wood, {Shape = CYL, Name = "Barrel"}) for _, dy in ipairs({0.4, 2.6}) do P(Vector3.new(0.2, 2.5, 2.5), CFrame.new(x, y + dy, z) * CFrame.Angles(0, 0, rad(90)), C.metal, M.Metal, {Shape = CYL}) end end -- ПОДВАЛ: котёл, бочки, стеллажи, трубы, цепи B(4, BY, 11, 10, BY + 6, 14.5, C.metal, M.CorrodedMetal, {Name = "Boiler"}) P(Vector3.new(2, 1, 0.1), CFrame.new(7, BY + 3, 10.9), Color3.fromRGB(255, 90, 30), M.Neon, {Name = "BoilerGlow"}) P(Vector3.new(36, 0.8, 0.8), CFrame.new(0, L1 - T - 0.8, 13.5), C.metal, M.CorrodedMetal, {Shape = CYL, Name = "Pipe"}) barrel(-12, BY, 12); barrel(-9, BY, 12.5); barrel(14, BY, -12) shelf(17.5, BY, 0, false); shelf(0, BY, -14, true) crate(-10, BY, -11, 3); crate(-8, BY, -12, 2); crate(12, BY, 8, 3) for _, x in ipairs({-3, 3}) do for i = 0, 6 do P(Vector3.new(0.25, 0.6, 0.15), CFrame.new(x, L1 - T - 0.4 - i * 0.55, 0) * CFrame.Angles(0, (i % 2) * rad(90), 0), C.metal, M.Metal) end end tableAt(10, BY, -6, 6, 3, 3.2) -- 1 ЭТАЖ: гостиная спереди, кухня и камин сзади B(-11, L1, -14.4, -3, L1 + 2, -11.5, C.fabric, M.Fabric, {Name = "Sofa"}) B(-11, L1, -14.4, -3, L1 + 4.2, -13.6, C.fabric, M.Fabric) tableAt(-7, L1, -8, 4, 2.5, 1.6) tableAt(4, L1, -6, 6, 4, 3.2) chair(CFrame.new(4, L1, -9.2)); chair(CFrame.new(4, L1, -2.8) * CFrame.Angles(0, math.pi, 0)) P(Vector3.new(1.8, 0.25, 1.8), CFrame.new(8, L1 + 0.2, -6) * CFrame.Angles(rad(80), 0, rad(30)), C.wood) -- упавший стул B(-10, L1, 13, -2, L1 + 7, 14.5, C.stone, M.Brick, {Name = "Fireplace"}) B(-8, L1, 12.4, -4, L1 + 3.5, 14.4, Color3.fromRGB(20, 18, 16), M.Slate, {Name = "FirePit"}) B(-10.5, L1 + 6.5, 12.2, -1.5, L1 + 7, 14.5, C.darkWood) B(2, L1, 12.5, 14, L1 + 3.4, 14.5, C.wood, M.WoodPlanks, {Name = "Counter"}) B(2, L1 + 3.4, 12.3, 14, L1 + 3.7, 14.5, C.stone, M.Marble) tableAt(7, L1, 7.5, 5, 3, 3.2) chair(CFrame.new(5, L1, 5) ); chair(CFrame.new(9.5, L1, 10) * CFrame.Angles(0, math.pi, 0)) shelf(-14, L1, 14, true) -- 2 ЭТАЖ: спальня, детская, кабинет bed(-10, L2, -9) B(-15, L2, 8, -9, L2 + 8, 10, C.darkWood, M.Wood, {Name = "Wardrobe"}) B(6, L2, -14.4, 12, L2 + 3.2, -12, C.wood, M.WoodPlanks, {Name = "Desk"}) chair(CFrame.new(9, L2, -10.5) * CFrame.Angles(0, math.pi, 0)) B(2, L2, 12, 8, L2 + 2.5, 14.4, Color3.fromRGB(120, 110, 95), M.Fabric, {Name = "Crib"}) P(Vector3.new(1.4, 1.4, 1.4), CFrame.new(5, L2 + 3.2, 13), Color3.fromRGB(150, 120, 90), M.Fabric, {Shape = BALL, Name = "Teddy"}) shelf(12, L2, 14, true) B(-1, L2, 2, 1, L2 + 0.1, 6, C.fabric, M.Fabric) -- ковёр -- ЧЕРДАК: коробки, манекен, кресло-качалка for i = 1, 8 do crate(rng:NextNumber(-12, 14), L3, rng:NextNumber(-10, 10), rng:NextNumber(1.5, 3)) end P(Vector3.new(1.4, 3, 1), CFrame.new(10, L3 + 4.5, -6), Color3.fromRGB(200, 190, 170), M.SmoothPlastic, {Name = "Mannequin"}) P(Vector3.new(1.1, 1.1, 1.1), CFrame.new(10, L3 + 6.6, -6), Color3.fromRGB(200, 190, 170), M.SmoothPlastic, {Shape = BALL}) P(Vector3.new(0.3, 3, 0.3), CFrame.new(10, L3 + 1.5, -6), C.darkWood) chair(CFrame.new(-6, L3, 6) * CFrame.Angles(rad(-6), rad(200), 0)) ---------------------------------------------------------------- СВЕТ local lamps, flames = {}, {} local function lamp(x, ceilY, z, cord, bright) cord = cord or 1.5 P(Vector3.new(0.08, cord, 0.08), CFrame.new(x, ceilY - cord / 2, z), Color3.new(0, 0, 0), M.SmoothPlastic, {CanCollide = false}) P(Vector3.new(0.6, 1.8, 1.8), CFrame.new(x, ceilY - cord - 0.3, z) * CFrame.Angles(0, 0, rad(90)), C.metal, M.Metal, {Shape = CYL, CanCollide = false}) local bulb = P(Vector3.new(0.6, 0.6, 0.6), CFrame.new(x, ceilY - cord - 0.75, z), BULB_ON, M.Neon, {Shape = BALL, CanCollide = false, Name = "Bulb"}) local l = Instance.new("PointLight") l.Color, l.Brightness, l.Range, l.Shadows = LAMP_COLOR, (bright or 1) * LAMP_BRIGHTNESS, LAMP_RANGE, true l.Parent = bulb table.insert(lamps, {light = l, bulb = bulb, on = l.Brightness}) end local function flame(cf, size, color) local base = P(size, cf, color or Color3.fromRGB(255, 140, 50), M.Neon, {CanCollide = false, Name = "Flame", Transparency = 0.2}) local l = Instance.new("PointLight") l.Color, l.Brightness, l.Range, l.Shadows = Color3.fromRGB(255, 150, 70), FIRE_BRIGHTNESS, 18, true l.Parent = base local f = Instance.new("Fire") f.Size, f.Heat, f.Parent = size.X * 1.5, 6, base table.insert(flames, {light = l, base = base}) end lamp(-8, L1 - T, -2, 1.5, 0.6); lamp(9, L1 - T, 5, 1.5, 0.6) lamp(0, L2 - T, -7); lamp(-6, L2 - T, 9); lamp(9, L2 - T, 9) lamp(-10, L3 - T, -5); lamp(8, L3 - T, -5); lamp(6, L3 - T, 10) lamp(2, TOP + R - 0.5, 0, 2.5, 0.8) flame(CFrame.new(-6, L1 + 0.7, 13.4), Vector3.new(2.2, 0.6, 0.8)) for _, p in ipairs({Vector3.new(-6, L3 + 0.6, -12), Vector3.new(12, L3 + 0.6, 9)}) do P(Vector3.new(0.4, 1, 0.4), CFrame.new(p), Color3.fromRGB(230, 220, 200), M.SmoothPlastic, {CanCollide = false}) flame(CFrame.new(p + Vector3.new(0, 0.65, 0)), Vector3.new(0.2, 0.3, 0.2)) end do local l = Instance.new("PointLight") l.Color, l.Brightness, l.Range = Color3.fromRGB(255, 100, 40), 1.5, 14 l.Parent = house:FindFirstChild("BoilerGlow") end ---------------------------------------------------------------- МЁРТВЫЕ ДЕРЕВЬЯ for i = 1, 10 do local ang = i / 10 * math.pi * 2 + rng:NextNumber(-0.2, 0.2) local dist = rng:NextNumber(45, 80) local base = Vector3.new(math.cos(ang) * dist, 0, math.sin(ang) * dist) local hgt = rng:NextNumber(14, 22) P(Vector3.new(1.4, hgt, 1.4), CFrame.new(base + Vector3.new(0, hgt / 2, 0)) * CFrame.Angles(rng:NextNumber(-0.08, 0.08), 0, rng:NextNumber(-0.08, 0.08)), C.darkWood, M.Wood, {Name = "Tree"}) for b = 1, 3 do P(Vector3.new(0.5, rng:NextNumber(4, 7), 0.5), CFrame.new(base + Vector3.new(0, hgt * (0.5 + b * 0.12), 0)) * CFrame.Angles(0, rng:NextNumber(0, 6.28), rad(rng:NextNumber(35, 60))) * CFrame.new(0, 2.5, 0), C.darkWood, M.Wood) end end ---------------------------------------------------------------- СПАВН for _, s in ipairs(workspace:GetDescendants()) do if s:IsA("SpawnLocation") then s.Enabled = false end end local spawn = Instance.new("SpawnLocation") spawn.Name, spawn.Size, spawn.Anchored, spawn.Transparency = "HouseSpawn", Vector3.new(6, 0.2, 6), true, 1 spawn.CanCollide, spawn.Neutral, spawn.Duration = false, true, 0 spawn.CFrame = CFrame.lookAt(Vector3.new(0, 0.1, -42), Vector3.new(0, 0.1, 0)) spawn.Parent = house local decal = spawn:FindFirstChildOfClass("Decal") if decal then decal:Destroy() end ---------------------------------------------------------------- ОСВЕЩЕНИЕ for _, e in ipairs(Lighting:GetChildren()) do if e:IsA("PostEffect") or e:IsA("Atmosphere") then e:Destroy() end end Lighting.ClockTime, Lighting.Brightness = 0, 2 Lighting.Ambient, Lighting.OutdoorAmbient, Lighting.ExposureCompensation = AMBIENT, OUTDOOR, EXPOSURE Lighting.EnvironmentDiffuseScale, Lighting.EnvironmentSpecularScale, Lighting.GlobalShadows = 0.4, 0.4, true local atm = Instance.new("Atmosphere") atm.Density, atm.Color, atm.Decay, atm.Haze = FOG, Color3.fromRGB(60, 65, 80), Color3.fromRGB(35, 35, 45), 1 atm.Parent = Lighting local cc = Instance.new("ColorCorrectionEffect") cc.Brightness, cc.Contrast, cc.Saturation, cc.Parent = 0.05, 0.1, -0.15, Lighting local bloom = Instance.new("BloomEffect") bloom.Intensity, bloom.Size, bloom.Threshold, bloom.Parent = 0.8, 28, 1.3, Lighting if SOUND_AMBIENT ~= "" then local s = Instance.new("Sound") s.SoundId, s.Looped, s.Volume, s.Parent = SOUND_AMBIENT, true, 0.4, workspace s:Play() end ---------------------------------------------------------------- МИГАНИЕ local function setLamp(l, on) l.light.Brightness = on and l.on or 0 l.bulb.Color = on and BULB_ON or BULB_OFF end if FLICKER then task.spawn(function() while true do task.wait(rng:NextNumber(6, 15)) local l = lamps[rng:NextInteger(1, #lamps)] for _ = 1, rng:NextInteger(1, 3) do setLamp(l, false); task.wait(rng:NextNumber(0.05, 0.25)) setLamp(l, true); task.wait(rng:NextNumber(0.05, 0.2)) end end end) end task.spawn(function() while true do for _, f in ipairs(flames) do f.light.Brightness = FIRE_BRIGHTNESS * rng:NextNumber(0.75, 1.15) end task.wait(0.1) end end)