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 = V(0, 0, 1500) -- центр Мира 1 local GROUND_Y = 4 -- верх земли local WATER_Y = 0 -- поверхность воды -- озеро из нескольких кругов: { x, z, радиус } local LAKES = Config.Worlds[1].lakes 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 -- порядок важен: песок → выемка → ил → вода 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) end for _, l in ipairs(LAKES) do 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 -- то же самое напрямую по вокселям: вода ниже WATER_Y, воздух выше. -- Fill* с Air иногда оставляет песок над водой, и озеро выглядит сухим. local function carveLake(l) local region = Region3.new(W + V(l[1] - l[3], WATER_Y - 12, 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 = mats.Size local corner = region.CFrame.Position - region.Size / 2 local center = W + V(l[1], 0, l[2]) for x = 1, size.X do for y = 1, size.Y do for z = 1, size.Z do local c = corner + V(x - 0.5, y - 0.5, z - 0.5) * 4 if (V(c.X, 0, c.Z) - center).Magnitude <= l[3] then local water = c.Y < WATER_Y mats[x][y][z] = water and Enum.Material.Water or Enum.Material.Air occ[x][y][z] = water and 1 or 0 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, 100)), V(8, 4, 44), Enum.Material.Ground) terrain:FillCylinder(CFrame.new(W + V(0, 2, 130)), 4, 17, 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, 40) 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, 40)) -- прямо перед порталом в Мир 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)) 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) portal(CFrame.lookAt(pos, V(pos.X * 2, FLOOR, pos.Z * 2)), title, w.color, w.id, w.soon) 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(-14, FLOOR, 34) local cf = CFrame.lookAt(pos, V(0, FLOOR, 50)) 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) }) 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: ТИХОЕ ОЗЕРО (детали) local function inLake(x, z, extra) for _, l in ipairs(LAKES) do if (V(x, 0, z) - V(l[1], 0, l[2])).Magnitude < l[3] + (extra or 0) then return true end end return false end -- прибытие local arrive = W + V(0, GROUND_Y, 128) marker("World1Spawn", CFrame.lookAt(arrive + V(0, 1, 0), arrive + V(0, 1, -10))) arch(CFrame.new(W + V(0, GROUND_Y, 112)), 14, 11, "🌊 ТИХОЕ ОЗЕРО", Color3.fromRGB(80, 200, 255)) portal(CFrame.lookAt(W + V(-26, GROUND_Y, 140), arrive), "🏠 В лобби", Color3.fromRGB(255, 200, 80), "Lobby") stall(CFrame.lookAt(W + V(30, GROUND_Y, 140), arrive), { title = "💰 СКУПКА", titleColor = Color3.fromRGB(150, 255, 160), wall = Color3.fromRGB(150, 115, 80), 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(200, 150, 110), shirt = Color3.fromRGB(70, 130, 80), pants = Color3.fromRGB(60, 50, 40), hat = Color3.fromRGB(200, 170, 110) }, }) -- доска «Кто водится в озере» do local pos = W + V(-16, GROUND_Y, 104) local cf = CFrame.lookAt(pos, W + V(0, GROUND_Y, 120)) 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 = { "🐟 КТО ВОДИТСЯ В ОЗЕРЕ" } for _, f in ipairs(Config.Zones.World1.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 -- костёр с брёвнами do local c = W + V(14, GROUND_Y, 118) 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 fireBase = 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 = fireBase local light = Instance.new("PointLight") light.Color = Color3.fromRGB(255, 160, 80) light.Range = 20 light.Brightness = 2 light.Parent = fireBase for _, a in ipairs({ 0, 2.1, 4.2 }) do local p = c + V(math.cos(a) * 6, 0.6, math.sin(a) * 6) P({ Shape = Enum.PartType.Cylinder, Size = V(5, 1.4, 1.4), CFrame = CFrame.lookAt(p, c) * CFrame.Angles(0, math.rad(90), 0) * CFrame.Angles(0, math.rad(90), 0), Material = Enum.Material.Wood, Color = Color3.fromRGB(115, 80, 50) }) end end -- дед-рыбак с подсказками npc("Дед Петрович", CFrame.lookAt(W + V(-7, GROUND_Y + 3, 80), W + V(0, GROUND_Y + 3, 95)), { skin = Color3.fromRGB(225, 175, 140), shirt = Color3.fromRGB(110, 120, 80), pants = Color3.fromRGB(70, 60, 45), hat = Color3.fromRGB(90, 110, 60), }, "Talk", "Поговорить") -- домик рыбака do local cf = CFrame.lookAt(W + V(-34, GROUND_Y, 100), W + V(0, GROUND_Y, 100)) local logC = Color3.fromRGB(130, 90, 55) P({ Size = V(14, 1, 12), CFrame = cf * CFrame.new(0, 0.5, 0), Material = Enum.Material.WoodPlanks, Color = Color3.fromRGB(110, 80, 50) }) P({ Size = V(14, 8, 1), CFrame = cf * CFrame.new(0, 5, 5.5), Material = Enum.Material.Wood, Color = logC }) for _, s in ipairs({ -1, 1 }) do P({ Size = V(1, 8, 12), CFrame = cf * CFrame.new(s * 6.5, 5, 0), Material = Enum.Material.Wood, Color = logC }) P({ Size = V(5, 8, 1), CFrame = cf * CFrame.new(s * 4.5, 5, -5.5), Material = Enum.Material.Wood, Color = logC }) P({ Size = V(16, 1, 8.8), CFrame = cf * CFrame.new(0, 11.2, s * 3.4) * CFrame.Angles(math.rad(-s * 38), 0, 0), Material = Enum.Material.WoodPlanks, Color = Color3.fromRGB(150, 60, 45) }) end P({ Size = V(4, 2, 1), CFrame = cf * CFrame.new(0, 8, -5.5), Material = Enum.Material.Wood, Color = logC }) P({ Size = V(2.2, 2, 0.3), CFrame = cf * CFrame.new(-4.5, 5.5, -6.05), Material = Enum.Material.Glass, Color = Color3.fromRGB(255, 225, 150), Transparency = 0.2 }) P({ Size = V(14, 3, 1), CFrame = cf * CFrame.new(0, 10.5, 5.5), Material = Enum.Material.Wood, Color = logC }) end -- причалы local function pier(center, size) P({ Size = size, Position = center, Material = Enum.Material.WoodPlanks, Color = Color3.fromRGB(150, 110, 70) }) local alongZ = size.Z > size.X local len = alongZ and size.Z or size.X local wid = alongZ and size.X or size.Z for d = -len / 2 + 1, len / 2 - 1, 6 do for _, s in ipairs({ -1, 1 }) do local off = alongZ and V(s * (wid / 2 - 0.4), 0, d) or V(d, 0, s * (wid / 2 - 0.4)) vcyl(center + off + V(0, -6, 0), 13, 0.9, { Color = Color3.fromRGB(100, 70, 45), Material = Enum.Material.Wood }) end end end -- { центр от W, размер } local PIERS = { { V(0, GROUND_Y + 0.2, 58), V(8, 0.6, 42) }, { V(-86, GROUND_Y + 0.2, 15), V(34, 0.6, 7) }, { V(86, GROUND_Y + 0.2, -10), V(34, 0.6, 7) }, } for _, p in ipairs(PIERS) do pier(W + p[1], p[2]) end -- невидимое ограждение: в воду не зайти, рыбачить можно с берега и причалов do local function barrier(cf, size) P({ Name = "LakeBarrier", Size = size, CFrame = cf, Transparency = 1, CanQuery = false, CanTouch = false, CastShadow = false }) end local SEG = 3 -- длина секции по берегу local H = 500 -- высота: не перепрыгнуть local MID = WATER_Y + H / 2 local function onPier(x, z, pad) for _, p in ipairs(PIERS) do if math.abs(x - p[1].X) < p[2].X / 2 + pad and math.abs(z - p[1].Z) < p[2].Z / 2 + pad then return true end end return false end -- по внешнему краю озёр (участки внутри соседнего озера пропускаем) for _, l in ipairs(LAKES) do local r = l[3] + 2 local n = math.ceil(2 * math.pi * r / SEG) local len = 2 * math.pi * r / n + 0.6 for i = 0, n - 1 do local a = i / n * math.pi * 2 local x, z = l[1] + math.cos(a) * r, l[2] + math.sin(a) * r local inner = false for _, o in ipairs(LAKES) do if o ~= l and (x - o[1]) ^ 2 + (z - o[2]) ^ 2 < (o[3] + 2) ^ 2 then inner = true break end end if not inner and not onPier(x, z, len / 2 + 0.2) then local pos = W + V(x, MID, z) barrier(CFrame.lookAt(pos, W + V(l[1], MID, l[2])), V(len, H, 1)) end end end -- бортики причалов: по бокам и на конце, который над водой for _, p in ipairs(PIERS) do local c, s = p[1], p[2] local h, y = H, MID local alongZ = s.Z > s.X for _, side in ipairs({ -1, 1 }) do if alongZ then barrier(CFrame.new(W + V(c.X + side * (s.X / 2 + 0.5), y, c.Z)), V(1, h, s.Z)) else barrier(CFrame.new(W + V(c.X, y, c.Z + side * (s.Z / 2 + 0.5))), V(s.X, h, 1)) end end for _, side in ipairs({ -1, 1 }) do local ex = alongZ and c.X or c.X + side * s.X / 2 local ez = alongZ and c.Z + side * s.Z / 2 or c.Z if inLake(ex, ez) then if alongZ then barrier(CFrame.new(W + V(ex, y, ez + side * 0.5)), V(s.X + 2, h, 1)) else barrier(CFrame.new(W + V(ex + side * 0.5, y, ez)), V(1, h, s.Z + 2)) end end end end end lamp(W + V(-3.5, GROUND_Y + 0.5, 40), Color3.fromRGB(255, 220, 160)) lamp(W + V(-70, GROUND_Y + 0.5, 18), Color3.fromRGB(255, 220, 160)) lamp(W + V(70, GROUND_Y + 0.5, -13), Color3.fromRGB(255, 220, 160)) -- лодка у западного причала do local cf = CFrame.new(W + V(-74, WATER_Y + 0.3, 24)) * CFrame.Angles(0, math.rad(15), 0) local hull = Color3.fromRGB(170, 70, 50) P({ Size = V(4, 0.5, 9), CFrame = cf, Material = Enum.Material.WoodPlanks, Color = Color3.fromRGB(140, 100, 65) }) for _, s in ipairs({ -1, 1 }) do P({ Size = V(0.4, 1.4, 9), CFrame = cf * CFrame.new(s * 2, 0.7, 0), Material = Enum.Material.Wood, Color = hull }) P({ Size = V(4.4, 1.4, 0.4), CFrame = cf * CFrame.new(0, 0.7, s * 4.5), Material = Enum.Material.Wood, Color = hull }) end P({ Size = V(4, 0.3, 1.2), CFrame = cf * CFrame.new(0, 1, 0), Material = Enum.Material.WoodPlanks, Color = Color3.fromRGB(140, 100, 65) }) end -- кувшинки и камыши for _, l in ipairs(LAKES) do for _ = 1, 7 do local a, d = rng:NextNumber(0, math.pi * 2), rng:NextNumber(6, l[3] - 5) local x, z = l[1] + math.cos(a) * d, l[2] + math.sin(a) * d local size = rng:NextNumber(2, 3.5) P({ Shape = Enum.PartType.Cylinder, Size = V(0.15, size, size), CFrame = CFrame.new(W + V(x, WATER_Y + 0.28, z)) * CFrame.Angles(0, 0, math.rad(90)), Color = Color3.fromRGB(70, 150, 60), CanCollide = false }) if rng:NextNumber() < 0.4 then ball(W + V(x + 0.3, WATER_Y + 0.55, z), 0.7, { Color = Color3.fromRGB(255, 150, 190), CanCollide = false }) end 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 inOther = 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 inOther = true end end if not inOther and not (math.abs(x) < 6 and z > 30) then for _ = 1, 5 do local h = rng:NextNumber(3, 5) local p = W + V(x + rng:NextNumber(-1.2, 1.2), WATER_Y + h / 2 - 0.5, z + rng:NextNumber(-1.2, 1.2)) P({ Size = V(0.18, h, 0.18), Position = p, Color = Color3.fromRGB(85, 130, 50), CanCollide = false }) P({ Size = V(0.35, 0.9, 0.35), Position = p + V(0, h / 2 - 0.3, 0), Color = Color3.fromRGB(110, 70, 40), CanCollide = false }) end end end end -- деревья, кусты, камни local function freeSpot(x, z) if inLake(x, z, 14) then return false end if (V(x, 0, z) - V(0, 0, 128)).Magnitude < 34 then return false end if math.abs(x) < 9 and z > 70 and z < 125 then return false end if (V(x, 0, z) - V(-34, 0, 100)).Magnitude < 14 then return false end return true 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 freeSpot(x, z) then local y = groundY(W.X + x, W.Z + z) local roll = rng:NextNumber() tree(W + V(x, y - 0.5, z), roll < 0.35 and "pine" or (roll < 0.5 and "birch" or "round")) placed += 1 end end for _ = 1, 60 do local x, z = rng:NextNumber(-200, 200), rng:NextNumber(-200, 200) if freeSpot(x, z) then bush(W + V(x, groundY(W.X + x, W.Z + z) - 0.6, z)) 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 local s = rng:NextNumber(2.5, 5) P({ Size = V(s, s * 0.7, s * 0.9), CFrame = CFrame.new(W + V(x, groundY(W.X + x, W.Z + z), z)) * CFrame.Angles(rng:NextNumber(0, 1), rng:NextNumber(0, 6), rng:NextNumber(0, 1)), Material = Enum.Material.Rock, Color = Color3.fromRGB(125, 125, 130) }) end end end -- фонари вдоль дорожки for _, z in ipairs({ 84, 100 }) do lamp(W + V(6, GROUND_Y, z)) lamp(W + V(-6, GROUND_Y, z)) end -- невидимые стены по краю мира for _, w in ipairs({ { V(0, 0, 245), V(500, 120, 2) }, { V(0, 0, -245), V(500, 120, 2) }, { V(245, 0, 0), V(2, 120, 500) }, { V(-245, 0, 0), V(2, 120, 500) }, }) do P({ Size = w[2], Position = W + w[1] + V(0, 40, 0), Transparency = 1 }) 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, Color3.fromRGB(30, 120, 150)) 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 ]]>