MapBuilder ServerScriptService -- Строит лобби и Мир 1 «Тихое озеро» при запуске игры, настраивает свет и воду. -- Если в Workspace уже есть папка "FishingMap", детали не строятся заново -- (террейн, свет и точка появления настраиваются всегда). local Workspace = game:GetService("Workspace") local Lighting = game:GetService("Lighting") local Players = game:GetService("Players") local ReplicatedStorage = game:GetService("ReplicatedStorage") local Config = require(ReplicatedStorage:WaitForChild("FishConfig")) local Models = require(ReplicatedStorage:WaitForChild("GameModels")) local V = Vector3.new local rng = Random.new(7) ---------------------------------------------------------------- свет и атмосфера local function ensure(class, parent, props) local obj = parent:FindFirstChildOfClass(class) or Instance.new(class) for k, v in pairs(props) do obj[k] = v end obj.Parent = parent return obj end Lighting.ClockTime = 14.5 Lighting.Brightness = 2.3 Lighting.Ambient = Color3.fromRGB(70, 70, 85) Lighting.OutdoorAmbient = Color3.fromRGB(140, 145, 160) Lighting.EnvironmentDiffuseScale = 0.6 Lighting.EnvironmentSpecularScale = 0.8 ensure("Atmosphere", Lighting, { Density = 0.25, Offset = 0.12, Glare = 0, Haze = 0.6, Color = Color3.fromRGB(200, 215, 232), Decay = Color3.fromRGB(110, 140, 175), }) ensure("BloomEffect", Lighting, { Intensity = 0.5, Size = 24, Threshold = 1.4 }) ensure("ColorCorrectionEffect", Lighting, { Saturation = 0.15, Contrast = 0.06, Brightness = 0.02 }) ensure("SunRaysEffect", Lighting, { Intensity = 0.05, Spread = 0.8 }) ---------------------------------------------------------------- вода local terrain = Workspace.Terrain -- низкое отражение, иначе вода «засвечивается» небом и выглядит белой terrain.WaterColor = Color3.fromRGB(10, 55, 70) terrain.WaterTransparency = 0.15 terrain.WaterReflectance = 0.08 terrain.WaterWaveSize = 0.3 terrain.WaterWaveSpeed = 12 ---------------------------------------------------------------- МИР 1: террейн (строится всегда) local W = Config.Worlds[1].center local GROUND_Y, WATER_Y = 4, 0 local LAKES = Config.Worlds[1].lakes local WORLD1_TRAIL = { V(-104, 4.3, -34), V(-117, 7, -62), V(-108, 12, -90), V(-83, 19, -110), V(-62, 25, -96), V(-43, 32, -119), } -- Лесистый берег, холм с вышкой и скала справа от озера. terrain:FillBlock(CFrame.new(W + V(0, -10, 0)), V(500, 28, 500), Enum.Material.Grass) for _, h in ipairs({ { -190, 160, 50 }, { 185, 175, 45 }, { -175, -175, 60 }, { 190, -150, 55 }, { 0, -215, 50 }, { -215, 0, 40 }, { 215, 30, 42 } }) do terrain:FillBall(W + V(h[1], -14, h[2]), h[3], Enum.Material.Grass) end terrain:FillBall(W + V(-48, -7, -121), 42, Enum.Material.Grass) terrain:FillBall(W + V(-89, -7, -101), 30, Enum.Material.Grass) terrain:FillCylinder(CFrame.new(W + V(-43, 29, -119)), 6, 17, Enum.Material.Grass) for _, p in ipairs(WORLD1_TRAIL) do terrain:FillBall(W + p - V(0, 9, 0), 10, Enum.Material.Grass) end terrain:FillBlock(CFrame.new(W + V(45, 15, -78)), V(40, 30, 52), Enum.Material.Rock) terrain:FillBlock(CFrame.new(W + V(67, 9, -83)), V(18, 18, 39), Enum.Material.Slate) terrain:FillBlock(CFrame.new(W + V(45, 29, -86)), V(40, 2, 35), Enum.Material.Grass) -- Чаша озера: песок, выемка, дно, вода; круги совпадают с FishConfig. for _, l in ipairs(LAKES) do terrain:FillCylinder(CFrame.new(W + V(l[1], -10, l[2])), 28, l[3] + 11, Enum.Material.Sand) end for _, l in ipairs(LAKES) do terrain:FillCylinder(CFrame.new(W + V(l[1], 11, l[2])), 18, l[3] + 7, Enum.Material.Air) terrain:FillCylinder(CFrame.new(W + V(l[1], 10, l[2])), 20, l[3] + 2, Enum.Material.Air) end for _, l in ipairs(LAKES) do terrain:FillCylinder(CFrame.new(W + V(l[1], -18, l[2])), 12, l[3], Enum.Material.Mud) end for _, l in ipairs(LAKES) do terrain:FillCylinder(CFrame.new(W + V(l[1], -6, l[2])), 12, l[3], Enum.Material.Water) end -- Мелководье вычисляется по объединению кругов: на пересечениях нет песчаных стенок. local function carveLake(l) local region = Region3.new(W + V(l[1] - l[3], WATER_Y - 16, l[2] - l[3]), W + V(l[1] + l[3], WATER_Y + 16, l[2] + l[3])):ExpandToGrid(4) local mats, occ = terrain:ReadVoxels(region, 4) local size, corner = mats.Size, region.CFrame.Position - region.Size / 2 for x = 1, size.X do for z = 1, size.Z do local px, pz = corner.X + (x - 0.5) * 4 - W.X, corner.Z + (z - 0.5) * 4 - W.Z if (px - l[1]) ^ 2 + (pz - l[2]) ^ 2 <= l[3] ^ 2 then local inland = 0 for _, lake in ipairs(LAKES) do inland = math.max(inland, lake[3] - math.sqrt((px - lake[1]) ^ 2 + (pz - lake[2]) ^ 2)) end local floor = -3 - math.min(inland / 18, 1) * 8 for y = 1, size.Y do local py = corner.Y + (y - 0.5) * 4 local mat = Enum.Material.Air if py < floor then mat = inland < 20 and Enum.Material.Sand or Enum.Material.Mud elseif py < WATER_Y then mat = Enum.Material.Water end mats[x][y][z], occ[x][y][z] = mat, mat == Enum.Material.Air and 0 or 1 end end end end terrain:WriteVoxels(region, 4, mats, occ) end for _, l in ipairs(LAKES) do carveLake(l) end -- Прибытие и короткий подход к главному причалу. terrain:FillBlock(CFrame.new(W + V(0, 2, 86)), V(12, 4, 14), Enum.Material.Ground) terrain:FillCylinder(CFrame.new(W + V(0, 2, 94)), 4, 13, Enum.Material.Cobblestone) ---------------------------------------------------------------- точка появления в лобби local spawn = Workspace:FindFirstChildOfClass("SpawnLocation") if not spawn then spawn = Instance.new("SpawnLocation") spawn.Parent = Workspace end spawn.Anchored = true spawn.Size = V(8, 0.2, 8) spawn.CFrame = CFrame.new(0, 1.15, 57) spawn.Transparency = 1 spawn.Duration = 0 for _, d in ipairs(spawn:GetChildren()) do if d:IsA("Decal") or d:IsA("Texture") then d.Transparency = 1 end end if Workspace:FindFirstChild("FishingMap") then return end local map = Instance.new("Folder") map.Name = "FishingMap" map.Parent = Workspace local zonesFolder = Instance.new("Folder") zonesFolder.Name = "FishingZones" zonesFolder.Parent = map ---------------------------------------------------------------- помощники local function P(props) local p = Instance.new("Part") if props.Shape then p.Shape = props.Shape end p.Anchored = true p.TopSurface = Enum.SurfaceType.Smooth p.BottomSurface = Enum.SurfaceType.Smooth for k, v in pairs(props) do if k ~= "Parent" and k ~= "Shape" then p[k] = v end end p.Parent = props.Parent or map return p end local function vcyl(pos, h, d, props) props.Shape = Enum.PartType.Cylinder props.Size = V(h, d, d) props.CFrame = CFrame.new(pos) * CFrame.Angles(0, 0, math.rad(90)) return P(props) end local function ball(pos, d, props) props.Shape = Enum.PartType.Ball props.Size = V(d, d, d) props.Position = pos return P(props) end local function surfaceText(part, face, text, color, extra) local sg = Instance.new("SurfaceGui") sg.Face = face sg.SizingMode = Enum.SurfaceGuiSizingMode.PixelsPerStud sg.PixelsPerStud = 40 sg.LightInfluence = 0 sg.Parent = part local t = Instance.new("TextLabel") t.Size = UDim2.fromScale(1, 1) t.BackgroundTransparency = 1 t.Font = Enum.Font.FredokaOne t.TextScaled = true t.RichText = true t.TextColor3 = color or Color3.new(1, 1, 1) t.TextStrokeTransparency = 0.4 t.Text = text t.Parent = sg local pad = Instance.new("UIPadding") pad.PaddingLeft = UDim.new(0.05, 0) pad.PaddingRight = UDim.new(0.05, 0) pad.PaddingTop = UDim.new(0.06, 0) pad.PaddingBottom = UDim.new(0.06, 0) pad.Parent = t for k, v in pairs(extra or {}) do t[k] = v end return t end local function billboard(target, text, color, offsetY, width) local bb = Instance.new("BillboardGui") bb.Size = UDim2.fromOffset(width or 300, 64) bb.StudsOffset = V(0, offsetY or 5, 0) bb.MaxDistance = 160 bb.LightInfluence = 0 bb.Parent = target local t = Instance.new("TextLabel") t.Size = UDim2.fromScale(1, 1) t.BackgroundTransparency = 1 t.Font = Enum.Font.FredokaOne t.TextScaled = true t.TextColor3 = color or Color3.new(1, 1, 1) t.TextStrokeTransparency = 0.15 t.Text = text t.Parent = bb return bb end local function prompt(target, actionText, objectText, action, dist) local pp = Instance.new("ProximityPrompt") pp.ActionText = actionText pp.ObjectText = objectText pp.HoldDuration = 0 pp.MaxActivationDistance = dist or 13 pp.RequiresLineOfSight = false pp:SetAttribute("Action", action) pp.Parent = target return pp end local function marker(name, cf) return P({ Name = name, Size = V(4, 1, 4), CFrame = cf, Transparency = 1, CanCollide = false, CanQuery = false, CanTouch = false }) end local function groundY(x, z) local params = RaycastParams.new() params.FilterType = Enum.RaycastFilterType.Include params.FilterDescendantsInstances = { terrain } params.IgnoreWater = true local hit = Workspace:Raycast(V(x, 150, z), V(0, -300, 0), params) return hit and hit.Position.Y or GROUND_Y, hit and hit.Material end local function lamp(pos, color) vcyl(pos + V(0, 4.5, 0), 9, 0.5, { Color = Color3.fromRGB(40, 40, 45), Material = Enum.Material.Metal }) P({ Size = V(1.4, 0.3, 1.4), Position = pos + V(0, 9.1, 0), Color = Color3.fromRGB(40, 40, 45), Material = Enum.Material.Metal }) local bulb = P({ Size = V(1, 1.4, 1), Position = pos + V(0, 9.95, 0), Material = Enum.Material.Neon, Color = color or Color3.fromRGB(255, 215, 150) }) P({ Size = V(1.5, 0.35, 1.5), Position = pos + V(0, 10.8, 0), Color = Color3.fromRGB(40, 40, 45), Material = Enum.Material.Metal }) local light = Instance.new("PointLight") light.Range = 16 light.Brightness = 1.2 light.Color = color or Color3.fromRGB(255, 210, 150) light.Parent = bulb end local function tree(pos, kind) if kind == "pine" then local h = rng:NextNumber(8, 12) vcyl(pos + V(0, h / 2, 0), h, 1.3, { Color = Color3.fromRGB(95, 65, 40), Material = Enum.Material.Wood }) for i = 0, 3 do ball(pos + V(0, h * 0.4 + i * 2.8, 0), 10 - i * 2.2, { Color = Color3.fromRGB(35, 100 + i * 10, 55), Material = Enum.Material.Grass }) end else local birch = kind == "birch" local h = rng:NextNumber(7, 10) vcyl(pos + V(0, h / 2, 0), h, 1.5, { Color = birch and Color3.fromRGB(225, 222, 210) or Color3.fromRGB(105, 72, 45), Material = Enum.Material.Wood, }) local leaf = birch and Color3.fromRGB(150, 195, 80) or Color3.fromRGB(65, rng:NextInteger(135, 165), 60) local s = rng:NextNumber(9, 12) ball(pos + V(0, h + s * 0.25, 0), s, { Color = leaf, Material = Enum.Material.Grass }) ball(pos + V(s * 0.35, h - 0.5, s * 0.1), s * 0.7, { Color = leaf, Material = Enum.Material.Grass }) ball(pos + V(-s * 0.3, h - 0.2, -s * 0.2), s * 0.65, { Color = leaf, Material = Enum.Material.Grass }) end end local function bush(pos) local c = Color3.fromRGB(55, rng:NextInteger(120, 150), 55) for i = 1, 3 do ball(pos + V(rng:NextNumber(-1.5, 1.5), 1, rng:NextNumber(-1.5, 1.5)), rng:NextNumber(2.5, 4), { Color = c, Material = Enum.Material.Grass }) end if rng:NextNumber() < 0.5 then for i = 1, 4 do ball(pos + V(rng:NextNumber(-1.8, 1.8), rng:NextNumber(1.5, 2.6), rng:NextNumber(-1.8, 1.8)), 0.5, { Color = ({ Color3.fromRGB(255, 120, 150), Color3.fromRGB(255, 230, 90), Color3.fromRGB(240, 240, 255) })[rng:NextInteger(1, 3)], CanCollide = false, }) end end end local function bench(cf) local seat = Instance.new("Seat") seat.Anchored = true seat.Size = V(5, 0.4, 1.6) seat.CFrame = cf * CFrame.new(0, 1.6, 0) seat.Material = Enum.Material.WoodPlanks seat.Color = Color3.fromRGB(150, 105, 65) seat.TopSurface = Enum.SurfaceType.Smooth seat.Parent = map for _, x in ipairs({ -2.1, 2.1 }) do P({ Size = V(0.4, 1.4, 1.4), CFrame = cf * CFrame.new(x, 0.7, 0), Color = Color3.fromRGB(50, 50, 55), Material = Enum.Material.Metal }) end P({ Size = V(5, 1.3, 0.3), CFrame = cf * CFrame.new(0, 2.6, 0.75) * CFrame.Angles(math.rad(-10), 0, 0), Material = Enum.Material.WoodPlanks, Color = Color3.fromRGB(150, 105, 65) }) end local function npc(name, cf, colors, action, actionText) local ok, rig = pcall(function() local d = Instance.new("HumanoidDescription") d.HeadColor = colors.skin d.LeftArmColor = colors.skin d.RightArmColor = colors.skin d.TorsoColor = colors.shirt d.LeftLegColor = colors.pants d.RightLegColor = colors.pants return Players:CreateHumanoidModelFromDescription(d, Enum.HumanoidRigType.R15) end) if not ok or not rig then warn("NPC не создан: " .. tostring(rig)) return nil end rig.Name = name local hum = rig:FindFirstChildOfClass("Humanoid") hum.DisplayName = name hum.HealthDisplayType = Enum.HumanoidHealthDisplayType.AlwaysOff hum.NameDisplayDistance = 60 local root = rig:FindFirstChild("HumanoidRootPart") root.Anchored = true rig:PivotTo(cf) rig.Parent = map local head = rig:FindFirstChild("Head") if head then if not head:FindFirstChildOfClass("Decal") then local face = Instance.new("Decal") face.Name = "face" face.Texture = "rbxasset://textures/face.png" face.Parent = head end -- панама рыбака local function hatPart(size, offset, shape) local p = Instance.new("Part") p.Shape = shape p.Size = size p.CanCollide = false p.Massless = true p.Color = colors.hat p.Material = Enum.Material.Fabric p.CFrame = head.CFrame * offset local w = Instance.new("Weld") w.Part0 = head w.Part1 = p w.C0 = head.CFrame:Inverse() * p.CFrame w.Parent = p p.Parent = rig end hatPart(V(0.15, 2.0, 2.0), CFrame.new(0, 0.55, 0) * CFrame.Angles(0, 0, math.rad(90)), Enum.PartType.Cylinder) hatPart(V(0.6, 1.35, 1.35), CFrame.new(0, 0.85, 0) * CFrame.Angles(0, 0, math.rad(90)), Enum.PartType.Cylinder) end if action then prompt(root, actionText, name, action, 14) end return rig end -- лавка: cf стоит на полу, сторона -Z смотрит на покупателей local function stall(cf, opt) local function at(x, y, z) return cf * CFrame.new(x, y, z) end local wall, dark = opt.wall, opt.wall:Lerp(Color3.new(0, 0, 0), 0.3) P({ Size = V(24, 1, 17), CFrame = at(0, 0.5, 0), Material = Enum.Material.WoodPlanks, Color = Color3.fromRGB(160, 120, 80) }) P({ Size = V(24, 13, 1), CFrame = at(0, 7.5, 8), Material = Enum.Material.WoodPlanks, Color = wall }) for _, s in ipairs({ -1, 1 }) do P({ Size = V(1, 13, 17), CFrame = at(s * 11.5, 7.5, 0), Material = Enum.Material.WoodPlanks, Color = wall }) P({ Size = V(1.5, 14.5, 1.5), CFrame = at(s * 11.6, 7.25, -8.3), Material = Enum.Material.Wood, Color = dark }) end P({ Size = V(26, 1, 19), CFrame = at(0, 14.5, 0), Material = Enum.Material.WoodPlanks, Color = dark }) -- полосатый навес for i = 0, 7 do P({ Size = V(3, 0.35, 6), CFrame = at(-10.5 + i * 3, 13.1, -10.6) * CFrame.Angles(math.rad(-22), 0, 0), Material = Enum.Material.Fabric, Color = (i % 2 == 0) and opt.stripeA or opt.stripeB, }) ball(at(-10.5 + i * 3, 11.9, -13.3).Position, 0.9, { Color = (i % 2 == 0) and opt.stripeA or opt.stripeB, Material = Enum.Material.Fabric }) end -- прилавок local counter = P({ Size = V(18, 4, 3), CFrame = at(0, 3, -4), Material = Enum.Material.WoodPlanks, Color = wall }) P({ Size = V(19, 0.5, 3.8), CFrame = at(0, 5.25, -4), Material = Enum.Material.Wood, Color = dark }) -- вывеска local board = P({ Size = V(20, 4.5, 0.6), CFrame = at(0, 17.6, -9.2), Material = Enum.Material.WoodPlanks, Color = Color3.fromRGB(70, 45, 30) }) P({ Size = V(20.8, 5.3, 0.3), CFrame = at(0, 17.6, -8.9), Material = Enum.Material.Neon, Color = opt.glow }) for _, x in ipairs({ -8, 8 }) do P({ Size = V(0.6, 3, 0.6), CFrame = at(x, 15.5, -9.2), Material = Enum.Material.Wood, Color = dark }) end surfaceText(board, Enum.NormalId.Front, opt.title, opt.titleColor) -- фонарики for _, x in ipairs({ -9.5, 9.5 }) do local l = P({ Size = V(0.8, 1.1, 0.8), CFrame = at(x, 11.2, -9.4), Material = Enum.Material.Neon, Color = Color3.fromRGB(255, 210, 140) }) local light = Instance.new("PointLight") light.Range = 14 light.Brightness = 1 light.Color = Color3.fromRGB(255, 210, 150) light.Parent = l end -- бочки по бокам for _, s in ipairs({ -1, 1 }) do vcyl(at(s * 14.5, 2.6, -5).Position, 3.2, 2.6, { Color = Color3.fromRGB(130, 85, 50), Material = Enum.Material.Wood }) vcyl(at(s * 14.5, 2.6, -5).Position, 0.3, 2.75, { Color = Color3.fromRGB(70, 70, 75), Material = Enum.Material.Metal }) end prompt(counter, opt.promptText, opt.promptObject, opt.action, 14) if opt.npcName then npc(opt.npcName, at(0, 4, 1.5), opt.npcColors) end if opt.decor then opt.decor(at) end return counter end local function portal(baseCF, title, color, worldId, locked) local center = baseCF * CFrame.new(0, 10, 0) P({ Size = V(17, 1, 9), CFrame = baseCF * CFrame.new(0, 0.5, 0), Material = Enum.Material.Slate, Color = Color3.fromRGB(95, 100, 115) }) P({ Size = V(14, 1, 7), CFrame = baseCF * CFrame.new(0, 1.5, 0), Material = Enum.Material.Slate, Color = Color3.fromRGB(110, 115, 130) }) local R, n = 7, 20 for i = 0, n - 1 do local a = (i + 0.5) / n * math.pi * 2 P({ Size = V(2 * math.pi * R / n + 0.4, 1.7, 1.7), CFrame = center * CFrame.Angles(0, 0, a) * CFrame.new(0, R, 0), Material = Enum.Material.Slate, Color = Color3.fromRGB(80, 85, 100), }) if i % 2 == 0 then P({ Size = V(0.6, 0.6, 1.9), CFrame = center * CFrame.Angles(0, 0, a) * CFrame.new(0, R + 0.95, 0), Material = Enum.Material.Neon, Color = color, }) end end local disc = P({ Name = "Portal_" .. worldId, Shape = Enum.PartType.Cylinder, Size = V(0.3, 2 * R - 1, 2 * R - 1), CFrame = center * CFrame.Angles(0, math.rad(90), 0), Material = Enum.Material.Neon, Color = color, Transparency = 0.3, CanCollide = false, }) local pe = Instance.new("ParticleEmitter") pe.Color = ColorSequence.new(color, Color3.new(1, 1, 1)) pe.LightEmission = 1 pe.Rate = 25 pe.Lifetime = NumberRange.new(1, 1.8) pe.Speed = NumberRange.new(0.5, 2) pe.SpreadAngle = Vector2.new(180, 180) pe.Size = NumberSequence.new(0.5, 0) pe.Transparency = NumberSequence.new(0.2, 1) pe.Parent = disc billboard(disc, title, color:Lerp(Color3.new(1, 1, 1), 0.4), 10, 250) if locked then billboard(disc, "🔒", Color3.new(1, 1, 1), 0, 120) end local pp = prompt(disc, locked and "Посмотреть" or "Перейти", title, "Portal", 14) pp:SetAttribute("World", worldId) return disc end local function banner(pos, color, icon, text) local look = CFrame.lookAt(pos, V(0, pos.Y, 0)) -- смотрит в центр лобби vcyl(pos + V(0, 8, 0), 16, 0.7, { Color = Color3.fromRGB(60, 60, 65), Material = Enum.Material.Metal }) ball(pos + V(0, 16.3, 0), 1.2, { Color = Color3.fromRGB(255, 200, 60), Material = Enum.Material.Metal }) P({ Size = V(5.2, 0.4, 0.4), CFrame = look * CFrame.new(0, 15, -0.6), Color = Color3.fromRGB(60, 60, 65), Material = Enum.Material.Metal }) local flag = P({ Size = V(4.6, 8, 0.25), CFrame = look * CFrame.new(0, 10.8, -0.6), Color = color, Material = Enum.Material.Fabric, CanCollide = false }) P({ Size = V(4.6, 0.5, 0.3), CFrame = look * CFrame.new(0, 6.6, -0.6), Color = Color3.fromRGB(255, 200, 60), Material = Enum.Material.Metal }) local label = icon .. "\n" .. text surfaceText(flag, Enum.NormalId.Front, label, Color3.new(1, 1, 1)) surfaceText(flag, Enum.NormalId.Back, label, Color3.new(1, 1, 1)) end local function arch(cf, span, height, title, color) for _, s in ipairs({ -1, 1 }) do P({ Size = V(4, height, 4), CFrame = cf * CFrame.new(s * span / 2, height / 2, 0), Material = Enum.Material.Slate, Color = Color3.fromRGB(205, 200, 190) }) P({ Size = V(5, 1.2, 5), CFrame = cf * CFrame.new(s * span / 2, height + 0.6, 0), Material = Enum.Material.Metal, Color = Color3.fromRGB(255, 195, 60) }) P({ Size = V(5, 1.2, 5), CFrame = cf * CFrame.new(s * span / 2, 0.6, 0), Material = Enum.Material.Slate, Color = Color3.fromRGB(150, 145, 140) }) end local beam = P({ Size = V(span + 6, 6, 2.5), CFrame = cf * CFrame.new(0, height + 4.2, 0), Material = Enum.Material.WoodPlanks, Color = Color3.fromRGB(60, 85, 140) }) P({ Size = V(span + 7, 7, 2), CFrame = cf * CFrame.new(0, height + 4.2, 0), Material = Enum.Material.Neon, Color = color }) surfaceText(beam, Enum.NormalId.Front, title, Color3.fromRGB(255, 230, 120)) surfaceText(beam, Enum.NormalId.Back, title, Color3.fromRGB(255, 230, 120)) end ---------------------------------------------------------------- ЛОББИ local FLOOR = 1 -- верх пола лобби P({ Shape = Enum.PartType.Cylinder, Size = V(1, 170, 170), CFrame = CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, math.rad(90)), Material = Enum.Material.Cobblestone, Color = Color3.fromRGB(190, 180, 165) }) P({ Shape = Enum.PartType.Cylinder, Size = V(1.04, 74, 74), CFrame = CFrame.new(0, 0.52, 0) * CFrame.Angles(0, 0, math.rad(90)), Material = Enum.Material.Marble, Color = Color3.fromRGB(232, 226, 214) }) P({ Shape = Enum.PartType.Cylinder, Size = V(1.04, 78, 78), CFrame = CFrame.new(0, 0.51, 0) * CFrame.Angles(0, 0, math.rad(90)), Material = Enum.Material.SmoothPlastic, Color = Color3.fromRGB(60, 120, 190) }) -- дорожки-лучи к лавкам и порталам for _, a in ipairs({ 0, 90, 180, 270 }) do local r = math.rad(a) P({ Size = V(10, 1.0, 48), CFrame = CFrame.new(math.cos(r) * 60, 0.52, math.sin(r) * 60) * CFrame.Angles(0, -r + math.pi / 2, 0), Material = Enum.Material.Marble, Color = Color3.fromRGB(225, 218, 205) }) end marker("LobbySpawn", CFrame.new(0, FLOOR + 2, 57)) -- на дорожке за табличкой «Как играть»: сначала она, дальше портал в Мир 1 -- фонтан со статуей золотой рыбы vcyl(V(0, FLOOR + 1, 0), 2, 24, { Material = Enum.Material.Slate, Color = Color3.fromRGB(205, 200, 190) }) vcyl(V(0, FLOOR + 1.6, 0), 1.0, 21, { Material = Enum.Material.Glass, Color = Color3.fromRGB(60, 165, 225), Transparency = 0.2 }) vcyl(V(0, FLOOR + 4, 0), 6, 3, { Material = Enum.Material.Slate, Color = Color3.fromRGB(190, 185, 175) }) local bowl = vcyl(V(0, FLOOR + 7.3, 0), 1, 9, { Material = Enum.Material.Slate, Color = Color3.fromRGB(205, 200, 190) }) vcyl(V(0, FLOOR + 7.75, 0), 0.2, 8, { Material = Enum.Material.Glass, Color = Color3.fromRGB(60, 165, 225), Transparency = 0.2 }) do local statue = Models.buildFish("Gold", "Golden", 3.2, true) statue:PivotTo(CFrame.new(0, FLOOR + 12, 0) * CFrame.Angles(0, math.rad(30), math.rad(40))) statue.Parent = map local sp = Instance.new("ParticleEmitter") sp.Texture = "rbxasset://textures/particles/sparkles_main.dds" sp.Rate = 12 sp.LightEmission = 1 sp.Color = ColorSequence.new(Color3.fromRGB(255, 220, 90)) sp.Size = NumberSequence.new(0.6, 0) sp.Lifetime = NumberRange.new(1, 1.5) sp.SpreadAngle = Vector2.new(180, 180) sp.Speed = NumberRange.new(1, 2) sp.Parent = statue.PrimaryPart -- струи воды local att = Instance.new("Attachment") att.Position = V(0.6, 0, 0) -- у повёрнутого цилиндра ось X смотрит вверх att.Orientation = V(0, 0, -90) -- направить струю вверх att.Parent = bowl local water = Instance.new("ParticleEmitter") water.Color = ColorSequence.new(Color3.fromRGB(200, 235, 255)) water.Transparency = NumberSequence.new(0.3, 1) water.Size = NumberSequence.new(0.6, 1.2) water.Rate = 60 water.Lifetime = NumberRange.new(1.2, 1.5) water.Speed = NumberRange.new(10, 12) water.SpreadAngle = Vector2.new(25, 25) water.Acceleration = V(0, -25, 0) water.Parent = att end -- скамейки по внешнему краю площади, между порталами, лицом к фонтану for _, deg in ipairs({ 45, 135, 225, 315 }) do local a = math.rad(deg) for _, side in ipairs({ -1, 1 }) do local b = a + side * math.rad(9) bench(CFrame.lookAt(V(math.cos(b) * 34, FLOOR, math.sin(b) * 34), V(0, FLOOR, 0))) end end -- фонари по кругу (у спавна — за спиной игрока, чтобы не закрывали табличку и сундук) for i = 0, 7 do local deg = i * 45 + 22.5 if deg ~= 67.5 and deg ~= 112.5 then local a = math.rad(deg) lamp(V(math.cos(a) * 40, FLOOR, math.sin(a) * 40)) end end lamp(V(7, FLOOR, 48)) -- левый фонарь стоит за табличкой «Как играть» -- клумбы с деревьями for _, deg in ipairs({ 225, 315 }) do local a = math.rad(deg) local p = V(math.cos(a) * 58, FLOOR, math.sin(a) * 58) vcyl(p + V(0, 1, 0), 2, 12, { Material = Enum.Material.Brick, Color = Color3.fromRGB(150, 95, 70) }) vcyl(p + V(0, 1.6, 0), 1.0, 11, { Material = Enum.Material.Grass, Color = Color3.fromRGB(70, 140, 60) }) tree(p + V(0, 2, 0), "round") for j = 1, 5 do local b = rng:NextNumber(0, math.pi * 2) ball(p + V(math.cos(b) * 4, 2.4, math.sin(b) * 4), 0.8, { Color = ({ Color3.fromRGB(255, 110, 140), Color3.fromRGB(255, 220, 80), Color3.fromRGB(170, 120, 255) })[rng:NextInteger(1, 3)] }) end end -- баннеры local bannerData = { { 15, Color3.fromRGB(40, 110, 200), "🎣", "Лови!" }, { 70, Color3.fromRGB(240, 140, 40), "🐟", "Продавай" }, { 110, Color3.fromRGB(40, 110, 200), "⭐", "Качайся" }, { 165, Color3.fromRGB(240, 140, 40), "🍀", "Удача" }, { 205, Color3.fromRGB(40, 110, 200), "🏆", "Рекорды" }, { 335, Color3.fromRGB(240, 140, 40), "💎", "Мифика" }, } for _, b in ipairs(bannerData) do local a = math.rad(b[1]) banner(V(math.cos(a) * 74, FLOOR, math.sin(a) * 74), b[2], b[3], b[4]) end -- живая изгородь по краю (с проходами) for deg = 0, 359, 7 do local skip = (deg > 80 and deg < 100) or (deg > 255 and deg < 285) or deg < 8 or deg > 352 or (deg > 172 and deg < 188) if not skip then local a = math.rad(deg) local p = V(math.cos(a) * 82, FLOOR + 2, math.sin(a) * 82) P({ Size = V(10.5, 4, 3), CFrame = CFrame.lookAt(p, V(0, p.Y, 0)), Material = Enum.Material.Grass, Color = Color3.fromRGB(60, 130, 55) }) end end -- магазин (запад) и скупка (восток) stall(CFrame.lookAt(V(-62, FLOOR, 0), V(0, FLOOR, 0)), { title = "🎣 УДОЧКИ И СНАРЯЖЕНИЕ", titleColor = Color3.fromRGB(255, 230, 120), wall = Color3.fromRGB(185, 130, 85), stripeA = Color3.fromRGB(215, 55, 55), stripeB = Color3.fromRGB(245, 240, 230), glow = Color3.fromRGB(255, 170, 60), action = "Shop", promptText = "Открыть магазин", promptObject = "Магазин", npcName = "Продавец Михалыч", npcColors = { skin = Color3.fromRGB(234, 184, 146), shirt = Color3.fromRGB(200, 60, 50), pants = Color3.fromRGB(60, 70, 100), hat = Color3.fromRGB(90, 110, 60) }, decor = function(at) -- витрина удочек на задней стене for i, rod in ipairs(Config.Rods) do local x = -8 + (i - 1) * 4 local m = Models.buildRod(rod.id, 0, true) m:PivotTo(at(x, 3, 7) * CFrame.Angles(math.rad(80), 0, 0)) m.Parent = map local plaque = P({ Size = V(3.6, 1.6, 0.2), CFrame = at(x, 11.7, 7.4), Material = Enum.Material.Wood, Color = Color3.fromRGB(60, 40, 25) }) surfaceText(plaque, Enum.NormalId.Front, rod.name .. "\n" .. (rod.price > 0 and (rod.price .. " 💰") or "бесплатно"), Color3.fromRGB(255, 235, 180)) end end, }) stall(CFrame.lookAt(V(62, FLOOR, 0), V(0, FLOOR, 0)), { title = "💰 СКУПКА РЫБЫ", titleColor = Color3.fromRGB(150, 255, 160), wall = Color3.fromRGB(110, 150, 175), stripeA = Color3.fromRGB(50, 150, 80), stripeB = Color3.fromRGB(245, 240, 230), glow = Color3.fromRGB(80, 230, 120), action = "Sell", promptText = "Продать всю рыбу", promptObject = "Скупка", npcName = "Скупщица Зина", npcColors = { skin = Color3.fromRGB(240, 195, 160), shirt = Color3.fromRGB(60, 120, 170), pants = Color3.fromRGB(50, 50, 60), hat = Color3.fromRGB(230, 230, 230) }, decor = function(at) -- лёд с рыбой на прилавке P({ Size = V(10, 0.4, 3), CFrame = at(-3, 5.7, -4), Material = Enum.Material.Glass, Color = Color3.fromRGB(200, 235, 255), Transparency = 0.2 }) for i, id in ipairs({ "Karas", "Okun", "Shuka" }) do local f = Models.buildFish(id, nil, 0.9, true) f:PivotTo(at(-6.5 + i * 2.5, 6.2, -4) * CFrame.Angles(math.rad(90), 0, math.rad(90))) f.Parent = map end -- весы P({ Size = V(2, 0.5, 2), CFrame = at(6, 5.75, -4), Material = Enum.Material.Metal, Color = Color3.fromRGB(60, 60, 65) }) P({ Size = V(0.3, 1.4, 0.3), CFrame = at(6, 6.7, -4), Material = Enum.Material.Metal, Color = Color3.fromRGB(60, 60, 65) }) P({ Shape = Enum.PartType.Cylinder, Size = V(0.2, 2.4, 2.4), CFrame = at(6, 7.45, -4) * CFrame.Angles(0, 0, math.rad(90)), Material = Enum.Material.Metal, Color = Color3.fromRGB(200, 200, 205) }) -- ящики с уловом for _, s in ipairs({ -1, 1 }) do P({ Size = V(3, 2, 3), CFrame = at(s * 14.5, 2, 2), Material = Enum.Material.WoodPlanks, Color = Color3.fromRGB(150, 110, 70) }) local f = Models.buildFish(s < 0 and "Lesh" or "Sudak", nil, 0.7, true) f:PivotTo(at(s * 14.5, 3.3, 2) * CFrame.Angles(math.rad(90), 0, 0)) f.Parent = map end end, }) -- арка с названием arch(CFrame.lookAt(V(0, FLOOR, -66), V(0, FLOOR, 0)), 84, 24, "🎣 " .. string.upper(Config.GameName) .. " 🎣", Color3.fromRGB(255, 190, 60)) -- порталы по кругу у фонтана, лицом наружу; первый (бесплатный) мир — прямо перед точкой появления local PORTAL_R = 19 for i, w in ipairs(Config.Worlds) do local title = w.icon .. " " .. w.name .. (w.level > 1 and (" (ур. " .. w.level .. ")") or "") local a = math.rad(90 - (i - 1) * 90) -- 90° = сторона спавна (+Z) local pos = V(math.cos(a) * PORTAL_R, FLOOR, math.sin(a) * PORTAL_R) local disc = portal(CFrame.lookAt(pos, V(pos.X * 2, FLOOR, pos.Z * 2)), title, w.color, w.id, w.soon) if i == 1 then disc:SetAttribute("GuideTarget", "Portal") marker("GuidePortal", CFrame.new(pos.X * 1.3, FLOOR, pos.Z * 1.3)) -- точка перед порталом для линии-подсказки end end -- невидимая стена по кругу: из лобби не уйти for deg = 0, 359, 5 do local a = math.rad(deg) local p = V(math.cos(a) * 86, 30, math.sin(a) * 86) P({ Size = V(8, 60, 2), CFrame = CFrame.lookAt(p, V(0, 30, 0)), Transparency = 1, CanQuery = false }) end -- донат-лавки stall(CFrame.lookAt(V(41, FLOOR, 41), V(0, FLOOR, 0)), { title = "💎 ПРЕМИУМ", titleColor = Color3.fromRGB(255, 220, 120), wall = Color3.fromRGB(120, 70, 170), stripeA = Color3.fromRGB(255, 200, 60), stripeB = Color3.fromRGB(150, 80, 210), glow = Color3.fromRGB(255, 200, 60), action = "RobuxPasses", promptText = "Открыть", promptObject = "Премиум-пропуска", npcName = "Барон Злотов", npcColors = { skin = Color3.fromRGB(230, 185, 150), shirt = Color3.fromRGB(110, 40, 140), pants = Color3.fromRGB(30, 30, 40), hat = Color3.fromRGB(255, 200, 60) }, decor = function(at) -- сундук с самоцветами P({ Size = V(4, 2, 2.5), CFrame = at(-5, 6.5, -4), Material = Enum.Material.WoodPlanks, Color = Color3.fromRGB(120, 75, 40) }) P({ Size = V(4.2, 0.4, 2.7), CFrame = at(-5, 7.6, -4), Material = Enum.Material.Metal, Color = Color3.fromRGB(255, 200, 60) }) for i, c in ipairs({ Color3.fromRGB(255, 60, 90), Color3.fromRGB(80, 200, 255), Color3.fromRGB(120, 255, 120), Color3.fromRGB(200, 100, 255) }) do P({ Size = V(0.7, 0.7, 0.7), CFrame = at(-6.5 + i * 0.75, 8.1, -4) * CFrame.Angles(0.6, i, 0.6), Material = Enum.Material.Neon, Color = c }) end P({ Size = V(3, 4, 0.3), CFrame = at(5, 7.5, -4.8), Material = Enum.Material.Neon, Color = Color3.fromRGB(255, 200, 60) }) end, }) stall(CFrame.lookAt(V(-41, FLOOR, 41), V(0, FLOOR, 0)), { title = "🪙 СОКРОВИЩНИЦА", titleColor = Color3.fromRGB(255, 235, 140), wall = Color3.fromRGB(200, 160, 70), stripeA = Color3.fromRGB(230, 180, 40), stripeB = Color3.fromRGB(255, 250, 230), glow = Color3.fromRGB(255, 220, 90), action = "RobuxProducts", promptText = "Открыть", promptObject = "Наборы монет", npcName = "Купчиха Злата", npcColors = { skin = Color3.fromRGB(240, 200, 165), shirt = Color3.fromRGB(220, 170, 50), pants = Color3.fromRGB(90, 50, 30), hat = Color3.fromRGB(180, 40, 40) }, decor = function(at) -- горки монет for i = 0, 4 do for j = 0, 3 - (i % 3) do P({ Shape = Enum.PartType.Cylinder, Size = V(0.2, 0.9, 0.9), CFrame = at(-7 + i * 1.2, 5.6 + j * 0.2, -4) * CFrame.Angles(0, 0, math.rad(90)), Material = Enum.Material.Metal, Color = Color3.fromRGB(255, 205, 60) }) end end for _, s in ipairs({ -1, 1 }) do ball(at(s * 14.5, 2.2, 2).Position, 2.6, { Color = Color3.fromRGB(190, 160, 110), Material = Enum.Material.Fabric }) ball(at(s * 14.5, 3.5, 2).Position, 1.2, { Color = Color3.fromRGB(255, 205, 60), Material = Enum.Material.Metal }) end end, }) -- сундук с ежедневной наградой do local cf = CFrame.lookAt(V(14, FLOOR, 34), V(0, FLOOR, 50)) local base = P({ Size = V(5, 3, 3.2), CFrame = cf * CFrame.new(0, 1.5, 0), Material = Enum.Material.WoodPlanks, Color = Color3.fromRGB(140, 90, 50) }) P({ Shape = Enum.PartType.Cylinder, Size = V(5, 3.2, 3.2), CFrame = cf * CFrame.new(0, 3, 0), Material = Enum.Material.WoodPlanks, Color = Color3.fromRGB(160, 105, 60) }) for _, x in ipairs({ -1.8, 1.8 }) do P({ Size = V(0.4, 4.9, 3.4), CFrame = cf * CFrame.new(x, 2.3, 0), Material = Enum.Material.Metal, Color = Color3.fromRGB(255, 200, 60) }) end P({ Size = V(0.9, 1.1, 0.3), CFrame = cf * CFrame.new(0, 2.8, -1.7), Material = Enum.Material.Metal, Color = Color3.fromRGB(255, 220, 90) }) local sp = Instance.new("ParticleEmitter") sp.Texture = "rbxasset://textures/particles/sparkles_main.dds" sp.Rate = 8 sp.LightEmission = 1 sp.Color = ColorSequence.new(Color3.fromRGB(255, 220, 90)) sp.Size = NumberSequence.new(0.5, 0) sp.Parent = base billboard(base, "🎁 Ежедневная награда", Color3.fromRGB(255, 220, 120), 5, 260) prompt(base, "Забрать", "Сундук", "Daily", 12) end -- табличка «Как играть» do -- слева от дорожки за точкой появления, лицом к камере игрока; фонарь — за табличкой local pos = V(-12, FLOOR, 48) local cf = CFrame.lookAt(pos, V(0, FLOOR, 64)) lamp((cf * CFrame.new(0, 0, 2.5)).Position) marker("GuideBoard", cf * CFrame.new(0, 0, -6)) -- перед табличкой, для линии-подсказки for _, x in ipairs({ -6.5, 6.5 }) do P({ Size = V(0.8, 9, 0.8), CFrame = cf * CFrame.new(x, 4.5, 0.3), Material = Enum.Material.Wood, Color = Color3.fromRGB(90, 60, 40) }) end local board = P({ Size = V(14, 8, 0.5), CFrame = cf * CFrame.new(0, 6, 0), Material = Enum.Material.WoodPlanks, Color = Color3.fromRGB(70, 48, 32) }) board:SetAttribute("GuideTarget", "Board") -- подсвечивается на шаге обучения surfaceText(board, Enum.NormalId.Front, "КАК ИГРАТЬ\n1. Портал «Мир 1» или кнопка 🌍 Миры\n2. Удочка — клавиша 1, у воды зажми ЛКМ и отпусти\n3. Клюёт → кликай в зелёную зону\n4. 🎒 Сумка — B, 📜 Задания — Q\n5. Собирай коллекцию — получай награды!", Color3.fromRGB(255, 245, 225), { TextXAlignment = Enum.TextXAlignment.Left }) end ---------------------------------------------------------------- МИР 1: ТИХОЕ ОЗЕРО (детали) do local previous = {} for _, child in ipairs(map:GetChildren()) do previous[child] = true end local sharedRng = rng local rng = sharedRng:Clone() local scenery = Instance.new("Model") scenery.Name = "World1Scenery" scenery:SetAttribute("WorldId", "World1") scenery.Parent = map local C = { wood = Color3.fromRGB(190, 135, 85), dark = Color3.fromRGB(120, 80, 50), rope = Color3.fromRGB(215, 180, 125), roof = Color3.fromRGB(60, 100, 75), pine = Color3.fromRGB(45, 105, 60), pineDark = Color3.fromRGB(35, 85, 50), grass = Color3.fromRGB(125, 180, 75), rock = Color3.fromRGB(140, 138, 150), moss = Color3.fromRGB(95, 130, 70), warm = Color3.fromRGB(255, 200, 120), } local function part(props) props.Parent = props.Parent or scenery if props.CanCollide == nil then props.CanCollide = false end if props.CanQuery == nil then props.CanQuery = props.CanCollide end props.CanTouch = false if props.CastShadow == nil then props.CastShadow = props.CanCollide end return P(props) end local function block(name, size, cf, color, material, solid) return part({ Name = name, Size = size, CFrame = cf, Color = color, Material = material or Enum.Material.SmoothPlastic, CanCollide = solid or false }) end local function cylA(a, b, diameter, props) props = props or {} props.Shape, props.Size = Enum.PartType.Cylinder, V((b - a).Magnitude, diameter, diameter) props.CFrame = CFrame.lookAt((a + b) / 2, b) * CFrame.Angles(0, math.pi / 2, 0) return part(props) end local function sphere(pos, size, color, material) return part({ Name = "ShoreDetail", Shape = Enum.PartType.Ball, Size = size, Position = pos, Color = color, Material = material or Enum.Material.SmoothPlastic }) end local function inLake(x, z, margin) for _, l in ipairs(LAKES) do if (x - l[1]) ^ 2 + (z - l[2]) ^ 2 < (l[3] + (margin or 0)) ^ 2 then return true end end return false end local function light(parent, range, brightness) local obj = Instance.new("PointLight") obj.Color, obj.Range, obj.Brightness, obj.Shadows = C.warm, range, brightness, false obj.Parent = parent end local function lantern(cf) local bulb = block("Lantern", V(0.8, 1.15, 0.8), cf, C.warm, Enum.Material.Neon) light(bulb, 14, 0.8) for _, y in ipairs({ -0.7, 0.7 }) do block("LanternCap", V(1.25, 0.2, 1.25), cf * CFrame.new(0, y, 0), C.dark, Enum.Material.Metal) end for _, x in ipairs({ -0.48, 0.48 }) do for _, z in ipairs({ -0.48, 0.48 }) do block("LanternFrame", V(0.1, 1.4, 0.1), cf * CFrame.new(x, 0, z), C.dark, Enum.Material.Metal) end end end local function lanternPost(pos) cylA(pos, pos + V(0, 5, 0), 0.4, { Color = C.dark, Material = Enum.Material.Wood }) lantern(CFrame.new(pos + V(0, 5.4, 0))) end local function ropeRing(pos, radius) for i = 0, 7 do local a, b = i * math.pi / 4, (i + 1) * math.pi / 4 cylA(pos + V(math.cos(a) * radius, 0, math.sin(a) * radius), pos + V(math.cos(b) * radius, 0, math.sin(b) * radius), 0.16, { Color = C.rope, Material = Enum.Material.Fabric }) end end local function pier(center, size, primary) local cf = CFrame.new(center) local deck = block("PierDeck", size, cf, C.wood, Enum.Material.WoodPlanks, true) if primary then deck:SetAttribute("GuideTarget", "Pier") end local alongZ = size.Z > size.X local length, width = alongZ and size.Z or size.X, alongZ and size.X or size.Z for d = -length / 2 + 1, length / 2 - 0.5, 2 do local offset = alongZ and V(0, 0.34, d) or V(d, 0.34, 0) local boardSize = alongZ and V(width, 0.16, 1.88) or V(1.88, 0.16, width) block("IndividualPlank", boardSize, cf + offset, C.wood:Lerp(C.dark, rng:NextNumber(0, 0.12)), Enum.Material.WoodPlanks) end for d = -length / 2 + 1, length / 2 - 1, 8 do for _, side in ipairs({ -1, 1 }) do local p = center + (alongZ and V(side * (width / 2 - 0.4), 0, d) or V(d, 0, side * (width / 2 - 0.4))) cylA(p - V(0, 7, 0), p + V(0, 1.8, 0), 1.25, { Color = C.dark, Material = Enum.Material.Wood, CanCollide = true }) ropeRing(p + V(0, 0.8, 0), 0.7) ropeRing(p + V(0, 1.05, 0), 0.7) end end return deck end local function fishSign(cf, width, height, color) local panel = block("FishSign", V(width, height, 0.22), cf, color, Enum.Material.WoodPlanks) for _, face in ipairs({ Enum.NormalId.Front, Enum.NormalId.Back }) do local sg = Instance.new("SurfaceGui") sg.Face, sg.LightInfluence, sg.PixelsPerStud = face, 0, 30 sg.SizingMode, sg.Parent = Enum.SurfaceGuiSizingMode.PixelsPerStud, panel local body = Instance.new("Frame") body.Size, body.Position = UDim2.fromScale(0.5, 0.4), UDim2.fromScale(0.2, 0.3) body.BackgroundColor3, body.BorderSizePixel, body.Parent = Color3.fromRGB(245, 239, 214), 0, sg local curve = Instance.new("UICorner") curve.CornerRadius, curve.Parent = UDim.new(1, 0), body local tail = Instance.new("TextLabel") tail.Size, tail.Position, tail.BackgroundTransparency = UDim2.fromScale(0.3, 0.65), UDim2.fromScale(0.59, 0.175), 1 tail.Text, tail.TextScaled, tail.TextColor3, tail.Parent = "◀", true, body.BackgroundColor3, sg local eye = Instance.new("Frame") eye.Size, eye.Position, eye.BorderSizePixel = UDim2.fromScale(0.045, 0.08), UDim2.fromScale(0.26, 0.43), 0 eye.BackgroundColor3, eye.Parent = color, sg end end local function smoke(chimney) local effect = Instance.new("ParticleEmitter") effect.Texture = "rbxasset://textures/particles/smoke_main.dds" effect.Rate, effect.Lifetime, effect.Speed = 3, NumberRange.new(3, 5), NumberRange.new(1.5, 2.5) effect.Acceleration, effect.SpreadAngle = V(0.7, 0.5, 0), Vector2.new(10, 10) effect.Color = ColorSequence.new(Color3.fromRGB(220, 223, 219)) effect.Size = NumberSequence.new({ NumberSequenceKeypoint.new(0, 0.8), NumberSequenceKeypoint.new(1, 4) }) effect.Transparency = NumberSequence.new({ NumberSequenceKeypoint.new(0, 0.3), NumberSequenceKeypoint.new(1, 1) }) effect.Parent = chimney end local function pine(pos, height) cylA(pos, pos + V(0, height * 0.8, 0), height * 0.075, { Color = C.dark, Material = Enum.Material.Wood, CanCollide = true }) local tint = C.pine:Lerp(C.pineDark, rng:NextNumber()) for i = 0, 3 do local width = height * (0.6 - i * 0.115) local p = pos + V(0, height * (0.38 + i * 0.18), 0) local lower = block("PineCanopy", V(width, height * 0.26, width), CFrame.new(p) * CFrame.Angles(0, math.pi / 4, 0), tint) lower.Shape = Enum.PartType.Ball end end local function cabin(pos, lookAt, scale) local cf = CFrame.lookAt(pos, lookAt) local function at(x, y, z) return cf * CFrame.new(x * scale, y * scale, z * scale) end block("CabinFloor", V(21, 0.6, 19) * scale, at(0, 0.3, 0), C.wood, Enum.Material.WoodPlanks, true) for row = 0, 7 do local y = 1 + row * 0.95 cylA(at(-9, y, 7).Position, at(9, y, 7).Position, scale, { Color = C.dark, Material = Enum.Material.Wood, CanCollide = true }) for _, side in ipairs({ -1, 1 }) do cylA(at(side * 8.5, y, -6).Position, at(side * 8.5, y, 7).Position, scale, { Color = C.dark, Material = Enum.Material.Wood, CanCollide = true }) cylA(at(side * 2, y, -6).Position, at(side * 9, y, -6).Position, scale, { Color = C.dark, Material = Enum.Material.Wood, CanCollide = true }) end end for _, side in ipairs({ -1, 1 }) do block("GreenGableRoof", V(11.6, 0.65, 18) * scale, at(side * 4.7, 10.2, 0.5) * CFrame.Angles(0, 0, -side * 0.53), C.roof, Enum.Material.WoodPlanks, true) block("RoofTrim", V(12, 0.5, 0.5) * scale, at(side * 4.7, 10.2, -8.5) * CFrame.Angles(0, 0, -side * 0.53), C.dark, Enum.Material.Wood) local window = block("GoldenWindow", V(3.1, 3, 0.2) * scale, at(side * 5.1, 4.7, -6.55), C.warm, Enum.Material.Neon) if side == -1 then light(window, 12, 0.55) end block("WindowMullion", V(0.18, 3.2, 0.3) * scale, at(side * 5.1, 4.7, -6.7), C.dark) block("WindowMullion", V(3.3, 0.18, 0.3) * scale, at(side * 5.1, 4.7, -6.7), C.dark) cylA(at(side * 9, -5, -7).Position, at(side * 9, 0, -7).Position, 0.8 * scale, { Color = C.dark, Material = Enum.Material.Wood, CanCollide = true }) end for i = 0, 2 do block("PorchStep", V(5, 0.3 + i * 0.25, 1) * scale, at(0, -0.3 + i * 0.1, -11 + i), C.wood, Enum.Material.WoodPlanks, true) end lantern(at(-7.3, 3, -8.3)) block("StoneChimney", V(2.3, 7, 2.3) * scale, at(4, 12.5, 4), C.rock, Enum.Material.Cobblestone, true) local outlet = block("SmokeOutlet", V(1, 0.1, 1), at(4, 16, 4), C.rock) outlet.Transparency = 1 smoke(outlet) end local function crate(cf) block("WoodenCrate", V(2.5, 2.5, 2.5), cf, C.dark, Enum.Material.WoodPlanks, true) for _, y in ipairs({ -0.9, 0.9 }) do block("CrateBand", V(2.6, 0.22, 2.6), cf * CFrame.new(0, y, 0), C.wood, Enum.Material.Wood) end end -- Прибытие: всё необходимое находится в пределах 25 studs. local arrive = W + V(0, GROUND_Y, 94) marker("World1Spawn", CFrame.lookAt(arrive + V(0, 1, 0), arrive + V(0, 1, -10))) marker("GuideFishSpot", CFrame.new(W + V(0, GROUND_Y + 0.65, 40))) portal(CFrame.lookAt(W + V(20, GROUND_Y, 96), arrive), "🏠 В лобби", Color3.fromRGB(255, 200, 80), "Lobby") local shopCF = CFrame.lookAt(W + V(-18, GROUND_Y, 84), arrive) marker("GuideSell", shopCF * CFrame.new(0, 0, -10)) local counter = stall(shopCF, { title = "🐟 СКУПКА", titleColor = Color3.fromRGB(240, 230, 200), wall = C.dark, stripeA = Color3.fromRGB(45, 105, 70), stripeB = Color3.fromRGB(240, 230, 200), glow = C.warm, action = "Sell", promptText = "Продать всю рыбу", promptObject = "Скупка", npcName = "Скупщик Гриша", npcColors = { skin = Color3.fromRGB(220, 175, 133), shirt = C.roof, pants = Color3.fromRGB(80, 74, 52), hat = Color3.fromRGB(215, 180, 110) }, decor = function(at) for i, color in ipairs({ Color3.fromRGB(110, 190, 60), Color3.fromRGB(245, 211, 64), Color3.fromRGB(241, 140, 55), Color3.fromRGB(70, 160, 219) }) do local p = at(-5 + i * 2, 8.3, 6.7).Position sphere(p, V(0.65, 1.6, 0.45), color) cylA(p + V(0, 0.7, 0), p + V(0, 2.2, 0), 0.05, { Color = C.rope }) end for i = 0, 2 do local p = at(-5 + i * 1.4, 5.9, -4).Position sphere(p, V(0.75, 0.75, 0.75), Color3.fromRGB(240, 234, 219)) sphere(p + V(0, 0.3, 0), V(0.62, 0.5, 0.62), Color3.fromRGB(214, 66, 53)) end block("CounterBox", V(3, 1, 2), at(5, 5.9, -4), C.wood, Enum.Material.WoodPlanks) fishSign(at(0, 21.2, -9.2), 7, 2.6, C.roof) end, }) counter:SetAttribute("GuideTarget", "Sell") lantern(shopCF * CFrame.new(-10, 7.3, -10)) crate(shopCF * CFrame.new(-13, 1.25, -11)) npc("Дед Петрович", CFrame.lookAt(W + V(12, GROUND_Y + 3, 83), arrive + V(0, 3, 0)), { skin = Color3.fromRGB(225, 175, 140), shirt = Color3.fromRGB(110, 120, 80), pants = Color3.fromRGB(70, 60, 45), hat = C.roof, }, "Talk", "Поговорить") local boardCF = CFrame.lookAt(W + V(15, GROUND_Y, 74), arrive) for _, x in ipairs({ -4.6, 4.6 }) do cylA((boardCF * CFrame.new(x, 0, 0)).Position, (boardCF * CFrame.new(x, 10, 0)).Position, 0.6, { Color = C.dark, Material = Enum.Material.Wood, CanCollide = true }) end local board = block("World1Bestiary", V(10, 8, 0.4), boardCF * CFrame.new(0, 6, 0), C.dark, Enum.Material.WoodPlanks, true) local lines = { "🐟 КТО ВОДИТСЯ В ОЗЕРЕ" } for _, fish in ipairs(Config.Zones.World1.fish) do local rarity = Config.Rarities[fish.rarity] table.insert(lines, ("%s — %s"):format(rarity.color:ToHex(), fish.name, rarity.name)) end surfaceText(board, Enum.NormalId.Front, table.concat(lines, "\n"), Color3.new(1, 1, 1)) -- Дощатые причалы, кнехты с канатом и снасти на переднем плане. pier(W + V(0, 4.2, 58), V(12, 0.6, 42), true) pier(W + V(86, 4.2, -10), V(34, 0.6, 8)) pier(W + V(-86, 4.2, 15), V(34, 0.6, 8)) for _, p in ipairs({ V(-5, 4.7, 40), V(5, 4.7, 72), V(72, 4.7, -13) }) do lanternPost(W + p) end crate(CFrame.new(W + V(-3.8, 5.9, 67))) local tackle = CFrame.new(W + V(3.7, 5.4, 61)) block("TackleBox", V(2.6, 1.5, 1.6), tackle, Color3.fromRGB(91, 111, 101), Enum.Material.Metal) block("TackleLid", V(2.8, 0.25, 1.8), tackle * CFrame.new(0, 0.85, 0), Color3.fromRGB(116, 130, 114), Enum.Material.Metal) block("TackleLatch", V(0.3, 0.65, 0.12), tackle * CFrame.new(0, 0.3, -0.85), C.rope, Enum.Material.Metal) for _, x in ipairs({ -0.45, 0.45 }) do block("HandleLeg", V(0.15, 0.4, 0.15), tackle * CFrame.new(x, 1.12, 0), C.dark, Enum.Material.Metal) end block("TackleHandle", V(1, 0.15, 0.15), tackle * CFrame.new(0, 1.35, 0), C.dark, Enum.Material.Metal) local boat = CFrame.new(W + V(19, 0.5, 44)) * CFrame.Angles(0, -0.3, 0) block("BoatHull", V(4.5, 0.5, 10), boat, C.dark, Enum.Material.WoodPlanks) for _, side in ipairs({ -1, 1 }) do block("BoatGunwale", V(0.35, 1.5, 10), boat * CFrame.new(side * 2.2, 0.7, 0), C.wood, Enum.Material.Wood) block("BoatEnd", V(4.5, 1.5, 0.4), boat * CFrame.new(0, 0.7, side * 4.8), C.wood, Enum.Material.Wood) block("BoatSeat", V(4.3, 0.3, 1), boat * CFrame.new(0, 1, side * 2.1), C.dark, Enum.Material.WoodPlanks) cylA((boat * CFrame.new(side * 0.8, 1.4, -2)).Position, (boat * CFrame.new(side * 3.6, 2.3, 2.4)).Position, 0.18, { Color = C.wood, Material = Enum.Material.Wood }) block("OarBlade", V(0.7, 0.15, 1.8), boat * CFrame.new(side * 3.8, 2.4, 2.7) * CFrame.Angles(0, side * 0.5, 0), C.wood, Enum.Material.Wood) end cylA(W + V(14, -5, 44), W + V(14, 3.3, 44), 0.9, { Color = C.dark, Material = Enum.Material.Wood }) cylA(W + V(14, 2, 44), (boat * CFrame.new(-2.2, 1, 0)).Position, 0.12, { Color = C.rope, Material = Enum.Material.Fabric }) -- Домики и вывеска с рыбой вдоль левого берега. cabin(W + V(-49, 5, 66), W + V(0, 5, 45), 1) cabin(W + V(-91, 5, -30), W + V(-25, 5, 0), 0.75) cylA(W + V(-78, 4, -42), W + V(-78, 16, -42), 0.7, { Color = C.dark, Material = Enum.Material.Wood, CanCollide = true }) block("BannerArm", V(5, 0.4, 0.4), CFrame.new(W + V(-76, 15, -42)), C.dark, Enum.Material.Wood) fishSign(CFrame.new(W + V(-75.5, 12, -42)), 3.5, 5, C.roof) -- Подъём на холм: пологие отрезки дорожки и ограждение с одной стороны. for i = 1, #WORLD1_TRAIL - 1 do local a, b = W + WORLD1_TRAIL[i], W + WORLD1_TRAIL[i + 1] local cf = CFrame.lookAt((a + b) / 2, b) block("HillTrail", V(7, 0.5, (b - a).Magnitude + 1), cf, Color3.fromRGB(184, 148, 102), Enum.Material.Ground, true) local side = cf.RightVector * 4.2 for _, p in ipairs({ a + side, b + side }) do cylA(p, p + V(0, 3, 0), 0.35, { Color = C.dark, Material = Enum.Material.Wood }) end for _, h in ipairs({ 1.2, 2.5 }) do cylA(a + side + V(0, h, 0), b + side + V(0, h, 0), 0.22, { Color = C.wood, Material = Enum.Material.Wood }) end if i < 5 then lanternPost(a - side) end end local top = W + V(-43, 32, -119) for _, x in ipairs({ -5, 5 }) do for _, z in ipairs({ -5, 5 }) do cylA(top + V(x, 0, z), top + V(x, 19, z), 0.7, { Color = C.dark, Material = Enum.Material.Wood, CanCollide = true }) end end block("LookoutDeck", V(13, 0.65, 13), CFrame.new(top + V(0, 11, 0)), C.wood, Enum.Material.WoodPlanks, true) for _, side in ipairs({ -1, 1 }) do block("LookoutRoof", V(8, 0.6, 15), CFrame.new(top + V(side * 3.2, 21, 0)) * CFrame.Angles(0, 0, -side * 0.45), C.roof, Enum.Material.WoodPlanks, true) if side == 1 then for _, x in ipairs({ -1, 1 }) do cylA(top + V(x * 1.8, 14, 5), top + V(x * 5, 14, 5), 0.3, { Color = C.dark, Material = Enum.Material.Wood, CanCollide = true }) end else cylA(top + V(-5, 14, -5), top + V(5, 14, -5), 0.3, { Color = C.dark, Material = Enum.Material.Wood, CanCollide = true }) end cylA(top + V(side * 5, 14, -5), top + V(side * 5, 14, 5), 0.3, { Color = C.dark, Material = Enum.Material.Wood, CanCollide = true }) end for i = 0, 12 do block("LookoutSteps", V(3, 0.6 + i * 0.85, 1.3), CFrame.new(top + V(0, (0.6 + i * 0.85) / 2, 22 - i * 1.25)), C.dark, Enum.Material.WoodPlanks, true) end cylA(top + V(5, 18, 0), top + V(5, 28, 0), 0.25, { Color = C.dark, Material = Enum.Material.Wood }) fishSign(CFrame.new(top + V(8, 26, 0)), 6, 3, C.roof) lantern(CFrame.new(top + V(-4, 16, 4))) -- Водопад: движущиеся ленты, пена и тихий встроенный звук воды. for i = 0, 3 do local x = 35 + i * 7 block("WaterfallRockFace", V(9, 28 + (i % 2) * 4, 7), CFrame.new(W + V(x, 14, -56)) * CFrame.Angles(0, i * 0.15, 0.04), C.rock, Enum.Material.Slate, true) block("MossyLedge", V(9, 0.8, 8), CFrame.new(W + V(x, 29 + (i % 2) * 2, -57)), C.moss, Enum.Material.Grass) end for i = 0, 2 do local x = 39 + i * 5 local sheet = block("WaterfallSheet", V(4.8, 30, 0.35), CFrame.new(W + V(x, 15.2, -50.7)), Color3.fromRGB(162, 224, 223), Enum.Material.Glass) sheet.Transparency = 0.4 local upper, lower = Instance.new("Attachment"), Instance.new("Attachment") upper.Position, lower.Position = V(0, 14.8, 0), V(0, -14.8, 0) upper.Parent, lower.Parent = sheet, sheet local beam = Instance.new("Beam") beam.Attachment0, beam.Attachment1, beam.Width0, beam.Width1 = upper, lower, 4.8, 5.4 beam.Texture, beam.TextureSpeed, beam.TextureLength = "rbxasset://textures/particles/smoke_main.dds", 1.4, 6 beam.FaceCamera, beam.Color, beam.LightEmission = true, ColorSequence.new(Color3.fromRGB(224, 248, 242)), 0.15 beam.Transparency, beam.Parent = NumberSequence.new(0.35), sheet local foam = sphere(W + V(x, 0.3, -48), V(7, 0.3, 5), Color3.fromRGB(231, 247, 235)) foam.Transparency = 0.35 local mist = Instance.new("ParticleEmitter") mist.Texture = "rbxasset://textures/particles/smoke_main.dds" mist.Rate, mist.Lifetime, mist.Speed = 4, NumberRange.new(1, 2), NumberRange.new(1, 2.5) mist.Size = NumberSequence.new({ NumberSequenceKeypoint.new(0, 0.7), NumberSequenceKeypoint.new(1, 3) }) mist.Transparency = NumberSequence.new({ NumberSequenceKeypoint.new(0, 0.6), NumberSequenceKeypoint.new(1, 1) }) mist.Color, mist.SpreadAngle, mist.Parent = ColorSequence.new(Color3.fromRGB(235, 249, 244)), Vector2.new(40, 40), foam end local soundAnchor = block("WaterfallSound", V(1, 1, 1), CFrame.new(W + V(45, 5, -48)), C.rock) soundAnchor.Transparency = 1 local waterSound = Instance.new("Sound") waterSound.Name, waterSound.SoundId = "WaterfallAmbience", "rbxasset://sounds/action_swim.mp3" waterSound.Looped, waterSound.Volume, waterSound.PlaybackSpeed = true, 0.12, 0.65 waterSound.RollOffMinDistance, waterSound.RollOffMaxDistance = 10, 120 waterSound.Parent = soundAnchor waterSound:Play() for ring = 0, 2 do local ripple = Instance.new("Model") ripple.Name = "WaterfallRipple" ripple:SetAttribute("RippleCenter", W + V(45, 0.16, -42)) ripple:SetAttribute("RipplePhase", ring / 3) ripple.Parent = scenery for segment = 0, 11 do local a, b = segment * math.pi / 6, (segment + 1) * math.pi / 6 local p = W + V(45, 0.16, -42) local radius = 2 + ring * 2 local line = cylA(p + V(math.cos(a) * radius, 0, math.sin(a) * radius), p + V(math.cos(b) * radius, 0, math.sin(b) * radius), 0.07, { Color = Color3.fromRGB(218, 242, 228), Transparency = 0.75, Parent = ripple }) line:SetAttribute("RippleSegment", segment) end end local creek = block("NarrowFeederStream", V(5, 0.15, 48), CFrame.new(W + V(45, 30.2, -77)), Color3.fromRGB(62, 168, 165), Enum.Material.Glass) creek.Transparency = 0.3 for _, x in ipairs({ 41.7, 48.3 }) do block("CreekBank", V(1.5, 0.7, 48), CFrame.new(W + V(x, 30.2, -77)), C.moss, Enum.Material.Grass, true) end local previousBridge for i = 0, 16 do local t = i / 16 local pos = W + V(29 + t * 32, 30.7 + math.sin(t * math.pi) * 3.2, -77) local slope = math.atan(math.cos(t * math.pi) * 3.2 * math.pi / 32) block("ArchedBridgePlank", V(2.05, 0.45, 7), CFrame.new(pos) * CFrame.Angles(0, 0, slope), C.wood, Enum.Material.WoodPlanks, true) if i % 2 == 0 then for _, side in ipairs({ -1, 1 }) do cylA(pos + V(0, 0, side * 3.3), pos + V(0, 3.2, side * 3.3), 0.3, { Color = C.dark, Material = Enum.Material.Wood, CanCollide = true }) if previousBridge then cylA(previousBridge + V(0, 2.8, side * 3.3), pos + V(0, 2.8, side * 3.3), 0.25, { Color = C.dark, Material = Enum.Material.Wood, CanCollide = true }) end end previousBridge = pos end end for _, p in ipairs({ V(29, 30, -82), V(61, 30, -82) }) do lanternPost(W + p) end -- Кувшинки и камыш стоят у внешнего берега, вдали от проходов. for _, lake in ipairs(LAKES) do for i = 1, 8 do local a = rng:NextNumber(0, math.pi * 2) local d = lake[3] - rng:NextNumber(3, 9) local p = W + V(lake[1] + math.cos(a) * d, 0.13, lake[2] + math.sin(a) * d) if not (math.abs(p.X - W.X) < 8 and p.Z - W.Z > 30) then part({ Name = "LilyPad", Shape = Enum.PartType.Cylinder, Size = V(0.12, 2.6, 2.6), CFrame = CFrame.new(p) * CFrame.Angles(0, 0, math.pi / 2), Color = Color3.fromRGB(79, 147, 68) }) if i % 2 == 0 then for petal = 0, 4 do sphere(p + V(math.cos(petal * 1.26) * 0.3, 0.18, math.sin(petal * 1.26) * 0.3), V(0.55, 0.22, 0.4), Color3.fromRGB(239, 151, 177)) end end end end for i = 0, 9 do local a = i * math.pi / 5 local x, z = lake[1] + math.cos(a) * (lake[3] + 2), lake[2] + math.sin(a) * (lake[3] + 2) if not inLake(x, z, 0) and not (math.abs(x) < 15 and z > 30) and z < 73 then for j = 1, 4 do local h = rng:NextNumber(2.5, 4.8) local p = W + V(x + rng:NextNumber(-1, 1), 0, z + rng:NextNumber(-1, 1)) cylA(p, p + V(0, h, 0), 0.12, { Color = Color3.fromRGB(105, 139, 60) }) cylA(p + V(0, h - 0.8, 0), p + V(0, h, 0), 0.3, { Color = Color3.fromRGB(120, 78, 43) }) end local p = W + V(x, 0, z) sphere(p, V(4, 2.5, 3.3), C.rock, Enum.Material.Rock) end end end for i = 1, 8 do local lake = LAKES[(i - 1) % #LAKES + 1] local fish = Instance.new("Model") fish.Name = "AmbientFish" fish:SetAttribute("SwimCenter", W + V(lake[1], -1.8, lake[2])) fish:SetAttribute("SwimRadius", 8 + (i % 3) * 4) fish:SetAttribute("SwimPhase", i * 1.7) fish:SetAttribute("SwimSpeed", 0.08 + i * 0.008) fish.Parent = scenery local cf = CFrame.new(W + V(lake[1], -1.8, lake[2])) local body = part({ Name = "FishShadow", Shape = Enum.PartType.Ball, Size = V(0.7, 0.22, 2), CFrame = cf, Color = Color3.fromRGB(29, 85, 83), Transparency = 0.35, Parent = fish }) fish.PrimaryPart = body part({ Name = "TailShadow", Size = V(1, 0.12, 0.7), CFrame = cf * CFrame.new(0, 0, 1.2) * CFrame.Angles(0, math.pi / 4, 0), Color = body.Color, Transparency = 0.4, Parent = fish }) end -- Пояс сосен, отдельные деревья у воды и горы за границей мира. for i = 0, 83 do local a = i / 84 * math.pi * 2 local distance = rng:NextNumber(130, 230) local x, z = math.cos(a) * distance, math.sin(a) * distance if not (z < -65 and z > -145 and x > -125 and x < 85) then pine(W + V(x, groundY(W.X + x, W.Z + z), z), rng:NextNumber(14, 24)) end end for _, p in ipairs({ V(-72, 4, 68), V(-101, 4, 41), V(96, 4, 30), V(108, 4, -48), V(-85, 25, -133), V(-20, 27, -139), V(35, 30, -94), V(61, 30, -98) }) do pine(W + p, rng:NextNumber(14, 20)) end for _, p in ipairs({ V(-29, 4, 103), V(42, 4, 73), V(-72, 4, 49) }) do cylA(W + p, W + p + V(0, 11, 0), 1, { Color = C.dark, Material = Enum.Material.Wood, CanCollide = true }) for i = 0, 2 do sphere(W + p + V((i - 1) * 3, 11 + (i % 2) * 2, 0), V(9, 7, 8), C.grass) end end for i = 0, 6 do local mountain = block("DistantMountain", V(85, 90 + (i % 3) * 22, 85), CFrame.new(W + V(-240 + i * 80, 30, -300)) * CFrame.Angles(0.2, i * 0.5, 0.15), Color3.fromRGB(131, 157, 168), Enum.Material.Slate) mountain.Shape = Enum.PartType.Ball end for i = 0, 3 do local cloud = sphere(W + V(-120 + i * 83, 115 + (i % 2) * 12, -210), V(40, 12, 22), Color3.fromRGB(245, 245, 231)) cloud.Name = "CumulusCloud" sphere(cloud.Position + V(10, 4, 0), V(22, 15, 18), cloud.Color) end for _, wall in ipairs({ { V(0, 40, 245), V(500, 120, 2) }, { V(0, 40, -245), V(500, 120, 2) }, { V(245, 40, 0), V(2, 120, 500) }, { V(-245, 40, 0), V(2, 120, 500) } }) do part({ Name = "WorldBoundary", Position = W + wall[1], Size = wall[2], Transparency = 1, CanCollide = true, CanQuery = false }) end -- Сохраняем прежнюю последовательность rng для неизменённых Миров 2 и 3. do local rng = sharedRng for _, l in ipairs(LAKES) do for _ = 1, 7 do rng:NextNumber(0, math.pi * 2); rng:NextNumber(6, l[3] - 5); rng:NextNumber(2, 3.5); rng:NextNumber() end for _ = 1, 9 do local a = rng:NextNumber(0, math.pi * 2) local x, z = l[1] + math.cos(a) * (l[3] + 1.2), l[2] + math.sin(a) * (l[3] + 1.2) local other = false for _, o in ipairs(LAKES) do if o ~= l and (V(x, 0, z) - V(o[1], 0, o[2])).Magnitude < o[3] + 1 then other = true end end if not other and not (math.abs(x) < 6 and z > 30) then for _ = 1, 5 do rng:NextNumber(3, 5); rng:NextNumber(-1.2, 1.2); rng:NextNumber(-1.2, 1.2) end end end end local function free(x, z) return not inLake(x, z, 14) and (V(x, 0, z) - V(0, 0, 94)).Magnitude >= 36 and not (math.abs(x) < 9 and z > 60 and z < 125) and (V(x, 0, z) - V(-44, 0, 98)).Magnitude >= 14 end local placed = 0 for _ = 1, 400 do if placed >= 110 then break end local x, z = rng:NextNumber(-230, 230), rng:NextNumber(-230, 230) if free(x, z) then local roll = rng:NextNumber() if roll < 0.35 then rng:NextNumber(8, 12) else rng:NextNumber(7, 10); if roll >= 0.5 then rng:NextInteger(135, 165) end; rng:NextNumber(9, 12) end placed += 1 end end for _ = 1, 60 do local x, z = rng:NextNumber(-200, 200), rng:NextNumber(-200, 200) if free(x, z) then rng:NextInteger(120, 150) for _ = 1, 3 do rng:NextNumber(-1.5, 1.5); rng:NextNumber(-1.5, 1.5); rng:NextNumber(2.5, 4) end if rng:NextNumber() < 0.5 then for _ = 1, 4 do rng:NextNumber(-1.8, 1.8); rng:NextNumber(1.5, 2.6); rng:NextNumber(-1.8, 1.8); rng:NextInteger(1, 3) end end end end for _, l in ipairs(LAKES) do for _ = 1, 4 do local a = rng:NextNumber(0, math.pi * 2) local x, z = l[1] + math.cos(a) * (l[3] + 8), l[2] + math.sin(a) * (l[3] + 8) if not inLake(x, z, 3) and not (math.abs(x) < 8 and z > 30) then rng:NextNumber(2.5, 5); rng:NextNumber(0, 1); rng:NextNumber(0, 6); rng:NextNumber(0, 1) end end end end -- Счётчики позволяют быстро проверить бюджет локации в Studio. local parts, lights, emitters = 0, 0, 0 for _, child in ipairs(map:GetChildren()) do if not previous[child] then local instances = child:GetDescendants() table.insert(instances, child) for _, obj in ipairs(instances) do if obj:IsA("BasePart") then parts += 1 elseif obj:IsA("PointLight") or obj:IsA("SpotLight") then lights += 1 elseif obj:IsA("ParticleEmitter") then emitters += 1 end end end end scenery:SetAttribute("PartCount", parts) scenery:SetAttribute("LightCount", lights) scenery:SetAttribute("EmitterCount", emitters) if parts > 3000 or lights > 25 or emitters > 10 then warn("[World1] Превышен бюджет деталей или эффектов", parts, lights, emitters) end end ---------------------------------------------------------------- помощники для новых миров local function cylA(a, b, d, props) props.Shape = Enum.PartType.Cylinder props.Size = V(math.max(0.05, (b - a).Magnitude), d, d) props.CFrame = CFrame.lookAt((a + b) / 2, b) * CFrame.Angles(0, math.rad(90), 0) return P(props) end local function worldWalls(center) for _, w in ipairs({ { V(0, 0, 245), V(500, 160, 2) }, { V(0, 0, -245), V(500, 160, 2) }, { V(245, 0, 0), V(2, 160, 500) }, { V(-245, 0, 0), V(2, 160, 500) }, }) do P({ Size = w[2], Position = center + w[1] + V(0, 60, 0), Transparency = 1, CanQuery = false }) end end local function bestiary(pos, lookAt, worldId, title, titleHex) local cf = CFrame.lookAt(pos, lookAt) for _, x in ipairs({ -6, 6 }) do P({ Size = V(0.8, 11, 0.8), CFrame = cf * CFrame.new(x, 5.5, 0.3), Material = Enum.Material.Wood, Color = Color3.fromRGB(90, 60, 40) }) end local board = P({ Size = V(13, 10, 0.5), CFrame = cf * CFrame.new(0, 7, 0), Material = Enum.Material.WoodPlanks, Color = Color3.fromRGB(70, 48, 32) }) local lines = { ("%s"):format(titleHex, title) } for _, f in ipairs(Config.Zones[worldId].fish) do local r = Config.Rarities[f.rarity] table.insert(lines, ("%s — %s"):format(r.color:ToHex(), f.name, r.name)) end surfaceText(board, Enum.NormalId.Front, table.concat(lines, "\n"), Color3.new(1, 1, 1)) end local function campfire(c) for i = 0, 7 do local a = i / 8 * math.pi * 2 ball(c + V(math.cos(a) * 2.2, 0.3, math.sin(a) * 2.2), 1, { Color = Color3.fromRGB(120, 120, 125), Material = Enum.Material.Rock }) end for i = 0, 2 do P({ Shape = Enum.PartType.Cylinder, Size = V(3, 0.6, 0.6), CFrame = CFrame.new(c + V(0, 0.4, 0)) * CFrame.Angles(0, i * math.pi / 3, 0), Material = Enum.Material.Wood, Color = Color3.fromRGB(90, 60, 35) }) end local base = P({ Size = V(1, 1, 1), Position = c + V(0, 0.8, 0), Transparency = 1, CanCollide = false }) local fire = Instance.new("Fire") fire.Size = 5 fire.Heat = 9 fire.Parent = base local light = Instance.new("PointLight") light.Color = Color3.fromRGB(255, 160, 80) light.Range = 20 light.Brightness = 2 light.Parent = base end local function torch(pos) cylA(pos, pos + V(0, 5, 0), 0.35, { Color = Color3.fromRGB(170, 130, 70), Material = Enum.Material.Wood }) local top = P({ Size = V(0.8, 0.8, 0.8), Position = pos + V(0, 5.3, 0), Color = Color3.fromRGB(90, 60, 30), Material = Enum.Material.Wood }) local fire = Instance.new("Fire") fire.Size = 3 fire.Heat = 6 fire.Parent = top local light = Instance.new("PointLight") light.Color = Color3.fromRGB(255, 170, 90) light.Range = 14 light.Parent = top end ---------------------------------------------------------------- МИР 2: ТРОПИЧЕСКИЙ ОСТРОВ do local W2 = Config.Worlds[2].center local leafColors = { Color3.fromRGB(60, 160, 60), Color3.fromRGB(85, 185, 70) } -- море, мелководье уступами, песчаный пляж, зелёный остров, холм terrain:FillBlock(CFrame.new(W2 + V(0, -34, 0)), V(520, 8, 520), Enum.Material.Sand) terrain:FillBlock(CFrame.new(W2 + V(0, -15, 0)), V(520, 30, 520), Enum.Material.Water) terrain:FillCylinder(CFrame.new(W2 + V(0, -17, 0)), 28, 140, Enum.Material.Sand) terrain:FillCylinder(CFrame.new(W2 + V(0, -15, 0)), 32, 118, Enum.Material.Sand) terrain:FillCylinder(CFrame.new(W2 + V(0, -14, 0)), 34, 106, Enum.Material.Sand) terrain:FillCylinder(CFrame.new(W2 + V(0, -13.5, 0)), 35, 88, Enum.Material.Grass) terrain:FillBall(W2 + V(20, -20, -30), 32, Enum.Material.Grass) terrain:FillCylinder(CFrame.new(W2 + V(0, 2, 40)), 4, 14, Enum.Material.Sandstone) local function palm(pos) local h = rng:NextNumber(12, 18) local a = rng:NextNumber(0, math.pi * 2) local dir = V(math.cos(a), 0, math.sin(a)) local p = pos for i = 1, 6 do local t = i / 6 local q = pos + V(0, h * t, 0) + dir * (t * t * h * 0.3) local d = 1.4 - t * 0.45 cylA(p, q, d, { Color = Color3.fromRGB(150, 115, 70), Material = Enum.Material.Wood }) ball(q, d, { Color = Color3.fromRGB(130, 100, 60), Material = Enum.Material.Wood }) p = q end for k = 0, 7 do local b = k / 8 * math.pi * 2 + rng:NextNumber(-0.2, 0.2) local ld = V(math.cos(b), 0, math.sin(b)) local mid = p + ld * 3.5 + V(0, 0.8, 0) local tipP = p + ld * 7 + V(0, -2.2, 0) for _, seg in ipairs({ { p, mid }, { mid, tipP } }) do P({ Size = V(2, 0.15, (seg[2] - seg[1]).Magnitude), CFrame = CFrame.lookAt((seg[1] + seg[2]) / 2, seg[2]), Material = Enum.Material.Grass, Color = leafColors[k % 2 + 1], CanCollide = false }) end end for _ = 1, 3 do ball(p + V(rng:NextNumber(-0.7, 0.7), -0.7, rng:NextNumber(-0.7, 0.7)), 0.9, { Color = Color3.fromRGB(110, 75, 40) }) end end local function tikiHut(pos, look) local cf = CFrame.lookAt(pos, look) P({ Size = V(12, 1, 12), CFrame = cf * CFrame.new(0, 0.5, 0), Material = Enum.Material.WoodPlanks, Color = Color3.fromRGB(160, 120, 75) }) for _, c in ipairs({ { -5, -5 }, { 5, -5 }, { -5, 5 }, { 5, 5 } }) do vcyl((cf * CFrame.new(c[1], 4.5, c[2])).Position, 8, 0.8, { Color = Color3.fromRGB(200, 175, 100), Material = Enum.Material.Wood }) end for i = 0, 4 do vcyl((cf * CFrame.new(0, 8.8 + i * 1.2, 0)).Position, 1.4, 16 - i * 3.2, { Color = Color3.fromRGB(205, 170, 95), Material = Enum.Material.Grass }) end local bar = P({ Size = V(7, 3, 1.5), CFrame = cf * CFrame.new(0, 2.5, -3), Material = Enum.Material.WoodPlanks, Color = Color3.fromRGB(140, 95, 55) }) billboard(bar, "🍹", Color3.new(1, 1, 1), 3, 60) end local function umbrella(pos, color) cylA(pos, pos + V(0, 7, 0), 0.25, { Color = Color3.fromRGB(235, 235, 235), Material = Enum.Material.Metal }) vcyl(pos + V(0, 7, 0), 0.6, 9, { Color = color, Material = Enum.Material.Fabric }) vcyl(pos + V(0, 7.5, 0), 0.6, 4.5, { Color = Color3.new(1, 1, 1), Material = Enum.Material.Fabric }) P({ Size = V(2.2, 0.5, 6), CFrame = CFrame.new(pos + V(3.5, 0.6, 0)) * CFrame.Angles(0, rng:NextNumber(-0.5, 0.5), 0), Color = Color3.fromRGB(245, 245, 240), Material = Enum.Material.Fabric }) P({ Size = V(2.25, 0.52, 1.2), CFrame = CFrame.new(pos + V(3.5, 0.62, 1.5)), Color = color, Material = Enum.Material.Fabric }) end local coralColors = { Color3.fromRGB(255, 110, 150), Color3.fromRGB(255, 150, 60), Color3.fromRGB(170, 90, 255), Color3.fromRGB(255, 220, 80), Color3.fromRGB(80, 220, 200) } local function coral(pos) local c = coralColors[rng:NextInteger(1, #coralColors)] for _ = 1, rng:NextInteger(3, 5) do local dir = V(rng:NextNumber(-0.5, 0.5), 1, rng:NextNumber(-0.5, 0.5)).Unit local h = rng:NextNumber(1.5, 3.5) cylA(pos, pos + dir * h, 0.45, { Color = c, CanCollide = false }) ball(pos + dir * h, 0.75, { Color = c:Lerp(Color3.new(1, 1, 1), 0.3), CanCollide = false }) end end local function starfish(pos) local c = Color3.fromRGB(255, rng:NextInteger(90, 150), 60) ball(pos, 0.7, { Color = c, CanCollide = false }) for k = 0, 4 do local a = k / 5 * math.pi * 2 P({ Size = V(0.35, 0.2, 1.1), CFrame = CFrame.new(pos) * CFrame.Angles(0, a, 0) * CFrame.new(0, 0, -0.6), Color = c, CanCollide = false }) end end local spawn2 = W2 + V(0, 4, 40) marker("World2Spawn", CFrame.lookAt(spawn2 + V(0, 1, 0), spawn2 + V(0, 1, -10))) arch(CFrame.new(W2 + V(0, 4, 24)), 14, 11, "🏝 ТРОПИЧЕСКИЙ ОСТРОВ", Color3.fromRGB(255, 190, 70)) portal(CFrame.lookAt(W2 + V(-32, 4, 60), spawn2), "🏠 В лобби", Color3.fromRGB(255, 200, 80), "Lobby") stall(CFrame.lookAt(W2 + V(32, 4, 62), spawn2), { title = "💰 СКУПКА", titleColor = Color3.fromRGB(150, 255, 220), wall = Color3.fromRGB(200, 170, 110), stripeA = Color3.fromRGB(40, 180, 170), stripeB = Color3.fromRGB(255, 250, 230), glow = Color3.fromRGB(80, 230, 200), action = "Sell", promptText = "Продать всю рыбу", promptObject = "Скупка", npcName = "Скупщик Мигель", npcColors = { skin = Color3.fromRGB(190, 140, 100), shirt = Color3.fromRGB(240, 120, 60), pants = Color3.fromRGB(240, 230, 200), hat = Color3.fromRGB(230, 210, 150) }, }) bestiary(W2 + V(-18, 4, 22), spawn2, "World2", "🐠 КТО ВОДИТСЯ У ОСТРОВА", "#FFD27A") npc("Капитан Боря", CFrame.lookAt(W2 + V(10, 6, 100), W2 + V(0, 6, 120)), { skin = Color3.fromRGB(225, 175, 140), shirt = Color3.fromRGB(240, 240, 240), pants = Color3.fromRGB(30, 40, 80), hat = Color3.fromRGB(30, 30, 60), }, "Talk", "Поговорить") pier(W2 + V(0, 3.2, 125), V(8, 0.6, 50)) pier(W2 + V(125, 3.2, -10), V(50, 0.6, 8)) for _, z in ipairs({ 105, 125, 145 }) do torch(W2 + V(4.5, 3.5, z)) end for _, x in ipairs({ 110, 140 }) do torch(W2 + V(x, 3.5, -14.5)) end tikiHut(W2 + V(-50, groundY(W2.X - 50, W2.Z - 20), -20), W2) tikiHut(W2 + V(-20, groundY(W2.X - 20, W2.Z - 65), -65), W2) campfire(W2 + V(-10, 4, 55)) for _, deg in ipairs({ 200, 222, 318, 340 }) do local a = math.rad(deg) local x, z = math.cos(a) * 99, math.sin(a) * 99 umbrella(W2 + V(x, groundY(W2.X + x, W2.Z + z), z), coralColors[rng:NextInteger(1, #coralColors)]) end local function free2(x, z) local r = math.sqrt(x * x + z * z) if r > 100 then return false end if (V(x, 0, z) - V(0, 0, 45)).Magnitude < 28 then return false end for _, p in ipairs({ { 32, 62 }, { -32, 60 }, { -50, -20 }, { -20, -65 }, { -18, 22 }, { -10, 55 } }) do if (V(x, 0, z) - V(p[1], 0, p[2])).Magnitude < 16 then return false end end return true end local count = 0 for _ = 1, 300 do if count >= 40 then break end local x, z = rng:NextNumber(-100, 100), rng:NextNumber(-100, 100) if free2(x, z) then palm(W2 + V(x, groundY(W2.X + x, W2.Z + z) - 0.5, z)) count += 1 end end for _ = 1, 35 do local a = rng:NextNumber(0, math.pi * 2) local r = rng:NextNumber(121, 138) local x, z = math.cos(a) * r, math.sin(a) * r if not (math.abs(x) < 8 and z > 0) and not (math.abs(z + 10) < 8 and x > 0) then coral(W2 + V(x, groundY(W2.X + x, W2.Z + z) - 0.3, z)) end end for _ = 1, 12 do local a = rng:NextNumber(0, math.pi * 2) local r = rng:NextNumber(107, 115) local x, z = math.cos(a) * r, math.sin(a) * r starfish(W2 + V(x, groundY(W2.X + x, W2.Z + z) + 0.1, z)) end worldWalls(W2) end ---------------------------------------------------------------- МИР 3: ЛЕДЯНОЙ ФЬОРД do local W3 = Config.Worlds[3].center local LAKES3 = Config.Worlds[3].lakes local HOLES = Config.Worlds[3].holes terrain:FillBlock(CFrame.new(W3 + V(0, -10, 0)), V(500, 28, 500), Enum.Material.Snow) for i = 0, 13 do local a = i / 14 * math.pi * 2 local r = rng:NextNumber(215, 235) local rad = rng:NextNumber(50, 70) local c = W3 + V(math.cos(a) * r, -15, math.sin(a) * r) terrain:FillBall(c, rad, Enum.Material.Rock) terrain:FillBall(c + V(0, rad * 0.35, 0), rad * 0.7, Enum.Material.Snow) end for _, l in ipairs(LAKES3) do terrain:FillCylinder(CFrame.new(W3 + V(l[1], 16, l[2])), 30, l[3] + 4, Enum.Material.Air) end for _, l in ipairs(LAKES3) do terrain:FillCylinder(CFrame.new(W3 + V(l[1], -19, l[2])), 10, l[3], Enum.Material.Mud) terrain:FillCylinder(CFrame.new(W3 + V(l[1], -7, l[2])), 14, l[3], Enum.Material.Water) end for _, l in ipairs(LAKES3) do terrain:FillCylinder(CFrame.new(W3 + V(l[1], -1, l[2])), 4, l[3], Enum.Material.Glacier) end for _, h in ipairs(HOLES) do terrain:FillCylinder(CFrame.new(W3 + V(h[1], -1, h[2])), 4, 6, Enum.Material.Water) end local function snowPine(pos) local h = rng:NextNumber(8, 13) vcyl(pos + V(0, h / 2, 0), h, 1.3, { Color = Color3.fromRGB(90, 62, 40), Material = Enum.Material.Wood }) for i = 0, 3 do local s = 10 - i * 2.2 local y = h * 0.4 + i * 2.8 ball(pos + V(0, y, 0), s, { Color = Color3.fromRGB(35, 85 + i * 8, 60), Material = Enum.Material.Grass }) ball(pos + V(0, y + s * 0.3, 0), s * 0.75, { Color = Color3.fromRGB(240, 245, 255), Material = Enum.Material.Snow }) end end local function igloo(pos, look) local cf = CFrame.lookAt(pos, look) P({ Shape = Enum.PartType.Ball, Size = V(14, 14, 14), CFrame = cf, Material = Enum.Material.Snow, Color = Color3.fromRGB(240, 245, 255) }) P({ Shape = Enum.PartType.Cylinder, Size = V(5, 5, 5), CFrame = cf * CFrame.new(0, 1.2, -7) * CFrame.Angles(0, math.rad(90), 0), Material = Enum.Material.Snow, Color = Color3.fromRGB(235, 240, 250) }) P({ Shape = Enum.PartType.Cylinder, Size = V(0.2, 3.6, 3.6), CFrame = cf * CFrame.new(0, 1.2, -9.55) * CFrame.Angles(0, math.rad(90), 0), Color = Color3.fromRGB(20, 25, 35) }) end local function tent(pos, look) local cf = CFrame.lookAt(pos, look) for _, s in ipairs({ -1, 1 }) do P({ Size = V(0.2, 5, 6), CFrame = cf * CFrame.new(s * 1.6, 2.2, 0) * CFrame.Angles(0, 0, math.rad(s * 35)), Material = Enum.Material.Fabric, Color = Color3.fromRGB(230, 110, 40) }) end vcyl((cf * CFrame.new(0, 0.9, -4.5)).Position, 1.6, 1.4, { Color = Color3.fromRGB(110, 80, 50), Material = Enum.Material.Wood }) end local function crystal(pos) for _ = 1, 5 do local h = rng:NextNumber(3, 8) P({ Size = V(1.2, h, 1.2), CFrame = CFrame.new(pos + V(rng:NextNumber(-2, 2), h / 2 - 0.5, rng:NextNumber(-2, 2))) * CFrame.Angles(rng:NextNumber(-0.4, 0.4), rng:NextNumber(0, 3), rng:NextNumber(-0.4, 0.4)), Material = Enum.Material.Neon, Color = Color3.fromRGB(140, 230, 255), Transparency = 0.15, }) end end local function snowman(pos) ball(pos + V(0, 2, 0), 4, { Color = Color3.fromRGB(245, 248, 255), Material = Enum.Material.Snow }) ball(pos + V(0, 5, 0), 3, { Color = Color3.fromRGB(245, 248, 255), Material = Enum.Material.Snow }) ball(pos + V(0, 7.3, 0), 2.2, { Color = Color3.fromRGB(245, 248, 255), Material = Enum.Material.Snow }) cylA(pos + V(0, 7.3, -1), pos + V(0, 7.2, -2), 0.3, { Color = Color3.fromRGB(255, 130, 30) }) for _, x in ipairs({ -0.4, 0.4 }) do ball(pos + V(x, 7.7, -0.95), 0.3, { Color = Color3.fromRGB(20, 20, 20) }) end vcyl(pos + V(0, 8.6, 0), 1.2, 1.4, { Color = Color3.fromRGB(30, 30, 35) }) vcyl(pos + V(0, 8.1, 0), 0.2, 2.2, { Color = Color3.fromRGB(30, 30, 35) }) end -- лунки: льдинки по краю и флажки for i, h in ipairs(HOLES) do local c = W3 + V(h[1], 1.2, h[2]) for k = 0, 7 do local a = k / 8 * math.pi * 2 P({ Size = V(1.2, 0.6, 1.2), CFrame = CFrame.new(c + V(math.cos(a) * 6.6, 0, math.sin(a) * 6.6)) * CFrame.Angles(0, a, 0.2), Material = Enum.Material.Ice, Color = Color3.fromRGB(200, 235, 255) }) end if i % 3 == 1 then cylA(c + V(6, -0.2, 6), c + V(6, 4, 6), 0.15, { Color = Color3.fromRGB(80, 60, 40) }) P({ Size = V(1.4, 0.9, 0.1), Position = c + V(6.75, 3.5, 6), Material = Enum.Material.Fabric, Color = Color3.fromRGB(220, 40, 40) }) end if i % 4 == 0 then tent(c + V(-9, -0.2, 0), c) end end local spawn3 = W3 + V(0, 4, 120) marker("World3Spawn", CFrame.lookAt(spawn3 + V(0, 1, 0), spawn3 + V(0, 1, -10))) arch(CFrame.new(W3 + V(0, 4, 104)), 14, 11, "❄ ЛЕДЯНОЙ ФЬОРД", Color3.fromRGB(150, 220, 255)) portal(CFrame.lookAt(W3 + V(-32, 4, 140), spawn3), "🏠 В лобби", Color3.fromRGB(255, 200, 80), "Lobby") stall(CFrame.lookAt(W3 + V(32, 4, 138), spawn3), { title = "💰 СКУПКА", titleColor = Color3.fromRGB(180, 230, 255), wall = Color3.fromRGB(120, 95, 75), stripeA = Color3.fromRGB(60, 120, 200), stripeB = Color3.fromRGB(245, 250, 255), glow = Color3.fromRGB(140, 210, 255), action = "Sell", promptText = "Продать всю рыбу", promptObject = "Скупка", npcName = "Скупщица Нина", npcColors = { skin = Color3.fromRGB(240, 205, 175), shirt = Color3.fromRGB(180, 40, 50), pants = Color3.fromRGB(40, 40, 60), hat = Color3.fromRGB(240, 240, 250) }, }) bestiary(W3 + V(-20, 4, 100), spawn3, "World3", "❄ КТО ВОДИТСЯ ПОДО ЛЬДОМ", "#BFEAFF") npc("Полярник Саша", CFrame.lookAt(W3 + V(12, 7, 88), W3 + V(0, 7, 60)), { skin = Color3.fromRGB(230, 190, 160), shirt = Color3.fromRGB(230, 120, 30), pants = Color3.fromRGB(50, 55, 70), hat = Color3.fromRGB(200, 40, 40), }, "Talk", "Поговорить") igloo(W3 + V(-45, 4, 95), W3 + V(0, 4, 110)) campfire(W3 + V(20, 4, 108)) snowman(W3 + V(42, 4, 100)) for _, p in ipairs({ { -85, -45 }, { 90, 30 }, { -25, -110 }, { 70, -90 }, { -95, 60 } }) do crystal(W3 + V(p[1], groundY(W3.X + p[1], W3.Z + p[2]), p[2])) end local function free3(x, z) for _, l in ipairs(LAKES3) do if (V(x, 0, z) - V(l[1], 0, l[2])).Magnitude < l[3] + 12 then return false end end if (V(x, 0, z) - V(0, 0, 120)).Magnitude < 40 then return false end if (V(x, 0, z) - V(-45, 0, 95)).Magnitude < 14 then return false end return true end local count = 0 for _ = 1, 400 do if count >= 80 then break end local x, z = rng:NextNumber(-200, 200), rng:NextNumber(-200, 200) if free3(x, z) then snowPine(W3 + V(x, groundY(W3.X + x, W3.Z + z) - 0.5, z)) count += 1 end end -- северное сияние for i = 0, 7 do P({ Size = V(55, 26, 0.6), CFrame = CFrame.new(W3 + V(-175 + i * 50, 150 + math.sin(i * 1.3) * 10, -150 + math.cos(i * 0.9) * 25)) * CFrame.Angles(math.rad(10), math.rad(i * 8 - 28), 0), Material = Enum.Material.Neon, Color = (i % 3 == 0) and Color3.fromRGB(170, 90, 255) or Color3.fromRGB(80, 255, 170), Transparency = 0.6, CanCollide = false, CanQuery = false, CastShadow = false, }) end worldWalls(W3) end ---------------------------------------------------------------- проверка воды -- Если вода в террейне не создалась (бывает в некоторых плейсах/настройках), -- ставим поверхность воды из деталей, чтобы озёра и море точно были видны. local function terrainHasWater(pos) local region = Region3.new(pos - V(2, 2, 2), pos + V(2, 2, 2)):ExpandToGrid(4) local ok, mats = pcall(function() return terrain:ReadVoxels(region, 4) end) if not ok then return true end for _, plane in ipairs(mats) do for _, column in ipairs(plane) do for _, m in ipairs(column) do if m == Enum.Material.Water then return true end end end end return false end local function waterPlane(pos, diameter, color) return P({ Name = "WaterSurface", Shape = Enum.PartType.Cylinder, Size = V(0.4, diameter, diameter), CFrame = CFrame.new(pos) * CFrame.Angles(0, 0, math.rad(90)), Color = color, Material = Enum.Material.SmoothPlastic, Reflectance = 0.08, CanCollide = false, CanQuery = false, CanTouch = false, CastShadow = false, }) end do local w1, w2, w3 = Config.Worlds[1], Config.Worlds[2], Config.Worlds[3] -- Мир 1: каждое озеро; нет воды — заливаем ещё раз, не помогло — поверхность из деталей. -- Повторяем через несколько секунд на случай, если террейн перезаписал другой скрипт. local planes = {} -- материал вокселя (читаем воксели, а не лучом: физика террейна обновляется с задержкой) local function voxelAt(pos) local region = Region3.new(pos - V(1, 1, 1), pos + V(1, 1, 1)):ExpandToGrid(4) local ok, mats = pcall(function() return terrain:ReadVoxels(region, 4) end) return ok and mats[1] and mats[1][1] and mats[1][1][1] or nil end -- в центре озера: под поверхностью вода, над ней пусто local function lakeState(l) local c = w1.center + V(l[1], w1.waterY, l[2]) return voxelAt(c - V(0, 2, 0)), voxelAt(c + V(0, 2, 0)) end local function lakeOk(below, above) return below == nil or (below == Enum.Material.Water and above == Enum.Material.Air) end local function ensureLakeWater() for i, l in ipairs(w1.lakes) do local below, above = lakeState(l) if not planes[i] and not lakeOk(below, above) then warn(("[MapBuilder] Озеро %d Мира 1: под водой %s, над водой %s — заливаю заново"):format(i, tostring(below), tostring(above))) carveLake(l) below, above = lakeState(l) if not lakeOk(below, above) then warn(("[MapBuilder] Озеро %d Мира 1: всё ещё %s / %s — ставлю запасную поверхность воды"):format(i, tostring(below), tostring(above))) planes[i] = waterPlane(w1.center + V(l[1], w1.waterY + 0.05, l[2]), l[3] * 2, w1.water) end end end end ensureLakeWater() task.delay(5, ensureLakeWater) if not terrainHasWater(w2.center + V(180, -4, 0)) then warn("[MapBuilder] Вода в террейне Мира 2 не создалась — ставлю запасную поверхность воды") waterPlane(w2.center + V(0, w2.waterY, 0), 500, Color3.fromRGB(40, 180, 190)) end local h = w3.holes[1] if not terrainHasWater(w3.center + V(h[1], -1, h[2])) then warn("[MapBuilder] Вода в лунках Мира 3 не создалась — ставлю запасную поверхность воды") for _, hole in ipairs(w3.holes) do waterPlane(w3.center + V(hole[1], w3.waterY + 0.05, hole[2]), w3.holeRadius * 2, Color3.fromRGB(25, 75, 110)) end end end ]]>