428 lines
20 KiB
Lua
428 lines
20 KiB
Lua
-- Правки лобби №6 (Studio, режим редактирования, потом Ctrl+S). Повторный запуск безопасен:
|
||
-- порталы ставятся на точные места, скамейки разворачиваются только один раз, антураж пересобирается.
|
||
-- 1) Порталы — ровным крестом вокруг фонтана: озеро на юге (к точке появления), остров на востоке, фьорд на севере,
|
||
-- вулкан на западе; все на одном радиусе, на мостовой, проходом наружу.
|
||
-- 2) Статичная рыбка в фонтане → Backup (плавающих рыбок делает FountainFish.client.lua).
|
||
-- 3) Скамейки — сиденьем к фонтану, спинкой наружу; невидимое сиденье развёрнуто вместе с ними.
|
||
-- 4) Антураж: колодец, повозка с бочками, стог с курами, сушащиеся сети с лодкой и вёслами, указатель у дорожки,
|
||
-- гирлянды флажков между фонарями вокруг площади, кошки. Папка FishingMap.LobbyAmbience.
|
||
-- 5) Надписи: порталы — название и строкой ниже требования (ур. · ранг), одинаковый размер; замок Вулкана убран
|
||
-- в подпись; все тексты лобби — Merriweather (у FredokaOne нет кириллицы); «Ежедневная награда» в одну строку.
|
||
|
||
local ServerStorage = game:GetService("ServerStorage")
|
||
local ReplicatedStorage = game:GetService("ReplicatedStorage")
|
||
local map = workspace.FishingMap
|
||
local FLOOR = 1
|
||
local PORTAL_R = 24.5
|
||
local FONT = Font.new("rbxasset://fonts/families/Merriweather.json", Enum.FontWeight.Heavy)
|
||
local FONT_BODY = Font.new("rbxasset://fonts/families/Merriweather.json", Enum.FontWeight.Bold)
|
||
local report = {}
|
||
|
||
local backup = ServerStorage:FindFirstChild("Backup") or Instance.new("Folder")
|
||
backup.Name = "Backup"
|
||
backup.Parent = ServerStorage
|
||
local store = backup:FindFirstChild("LobbyFix6") or Instance.new("Folder")
|
||
store.Name = "LobbyFix6"
|
||
store.Parent = backup
|
||
|
||
local copy = ReplicatedStorage.FishConfig:Clone()
|
||
copy.Parent = ReplicatedStorage
|
||
local Config = require(copy)
|
||
copy:Destroy()
|
||
|
||
local function flat(v)
|
||
return Vector3.new(v.X, 0, v.Z)
|
||
end
|
||
|
||
---------------------------------------------------------------- 1. порталы
|
||
|
||
local PORTALS = { World1 = Vector3.new(0, 0, 1), World2 = Vector3.new(1, 0, 0), World3 = Vector3.new(0, 0, -1), World4 = Vector3.new(-1, 0, 0) }
|
||
for id, dir in pairs(PORTALS) do
|
||
local arch = map:FindFirstChild("PortalArch_" .. id)
|
||
local old = map:FindFirstChild("PortalModel_" .. id)
|
||
local trigger = map:FindFirstChild("Portal_" .. id)
|
||
if arch and old and trigger then
|
||
local at = dir * PORTAL_R + Vector3.new(0, FLOOR, 0)
|
||
local target = CFrame.lookAt(at, at + dir)
|
||
local T = target * arch:GetPivot():Inverse()
|
||
for _, o in ipairs({ arch, old }) do
|
||
o:PivotTo(T * o:GetPivot())
|
||
end
|
||
trigger.CFrame = T * trigger.CFrame
|
||
if id == "World1" then
|
||
local g = map:FindFirstChild("GuidePortal")
|
||
if g then
|
||
g.CFrame = CFrame.new(flat((T * g.CFrame).Position) + Vector3.new(0, g.Position.Y, 0))
|
||
end
|
||
end
|
||
-- подпись: название крупно, строкой ниже — требования
|
||
local w = Config.Find(Config.Worlds, id)
|
||
local rank = Config.Guild and Config.Guild.worldRank[id]
|
||
local need = {}
|
||
if w.soon then
|
||
table.insert(need, "🔒 скоро")
|
||
end
|
||
if w.level > 1 then
|
||
table.insert(need, "ур. " .. w.level)
|
||
end
|
||
if rank then
|
||
table.insert(need, "ранг " .. Config.Guild.ranks[rank].id)
|
||
end
|
||
local sub = #need > 0 and table.concat(need, " · ") or "открыт для всех"
|
||
for _, bb in ipairs(trigger:GetChildren()) do
|
||
if bb:IsA("BillboardGui") then
|
||
bb:Destroy()
|
||
end
|
||
end
|
||
local _, asize = arch:GetBoundingBox()
|
||
local bb = Instance.new("BillboardGui")
|
||
bb.Name = "PortalLabel"
|
||
bb.Size = UDim2.fromScale(14, 3.6)
|
||
bb.StudsOffsetWorldSpace = Vector3.new(0, FLOOR + asize.Y + 2.4 - trigger.Position.Y, 0)
|
||
bb.MaxDistance = 220
|
||
bb.LightInfluence = 0
|
||
bb.Parent = trigger
|
||
local function line(text, y, h, color)
|
||
local t = Instance.new("TextLabel")
|
||
t.BackgroundTransparency = 1
|
||
t.Position = UDim2.fromScale(0, y)
|
||
t.Size = UDim2.fromScale(1, h)
|
||
t.FontFace = y == 0 and FONT or FONT_BODY
|
||
t.TextScaled = true
|
||
t.TextColor3 = color
|
||
t.TextStrokeTransparency = 0.15
|
||
t.TextStrokeColor3 = Color3.fromRGB(30, 22, 16)
|
||
t.Text = text
|
||
t.Parent = bb
|
||
end
|
||
line(w.icon .. " " .. w.name, 0, 0.62, w.color:Lerp(Color3.new(1, 1, 1), 0.35))
|
||
line(sub, 0.64, 0.36, Color3.fromRGB(236, 220, 180))
|
||
end
|
||
end
|
||
table.insert(report, "порталы: крест на радиусе " .. PORTAL_R)
|
||
|
||
---------------------------------------------------------------- 2. рыбка из фонтана
|
||
|
||
local fountain = map:FindFirstChild("LobbyFix3") and map.LobbyFix3:FindFirstChild("LobbyFountain")
|
||
if fountain then
|
||
for _, c in ipairs(fountain:GetChildren()) do
|
||
if c:IsA("Model") and c.Name == "Золотая рыбка" then
|
||
c.Parent = store
|
||
end
|
||
end
|
||
end
|
||
|
||
---------------------------------------------------------------- 3. скамейки
|
||
|
||
for _, m in ipairs(map:FindFirstChild("LobbyFix3") and map.LobbyFix3:GetChildren() or {}) do
|
||
if m:IsA("Model") and m.Name:find("^LobbyBench_") and not m:GetAttribute("Fix6Flipped") then
|
||
local seat = m:FindFirstChildWhichIsA("Seat")
|
||
local seatCF = seat and seat.CFrame
|
||
m:PivotTo(m:GetPivot() * CFrame.Angles(0, math.pi, 0))
|
||
if seat then
|
||
-- сиденье над досками, лицом к фонтану (как и сидящий человек)
|
||
local p = seat.Position
|
||
seat.CFrame = CFrame.lookAt(p, Vector3.new(0, p.Y, 0))
|
||
end
|
||
m:SetAttribute("Fix6Flipped", true)
|
||
end
|
||
end
|
||
table.insert(report, "скамейки развернуты")
|
||
|
||
---------------------------------------------------------------- 5. шрифты и подписи лобби
|
||
|
||
local fixed = 0
|
||
for _, c in ipairs(map:GetChildren()) do
|
||
local p = c:IsA("Model") and c:GetPivot().Position or (c:IsA("BasePart") and c.Position)
|
||
if p and flat(p).Magnitude < 110 then
|
||
for _, d in ipairs(c:GetDescendants()) do
|
||
if d:IsA("TextLabel") and (d:FindFirstAncestorWhichIsA("SurfaceGui") or d:FindFirstAncestorWhichIsA("BillboardGui")) then
|
||
local f = d.FontFace.Family
|
||
-- 🪙 Roblox не рисует (квадратик)
|
||
if d.Text:find("🪙") then
|
||
d.Text = d.Text:gsub("🪙", "👑")
|
||
end
|
||
if not f:find("Merriweather") then
|
||
d.FontFace = (d.Name == "PlayerName" or d.Name == "Value" or d.Name == "Rank") and FONT_BODY or FONT
|
||
fixed += 1
|
||
end
|
||
end
|
||
end
|
||
end
|
||
end
|
||
local chest = map:FindFirstChild("DailyChestPrompt")
|
||
local chestBB = chest and chest:FindFirstChildOfClass("BillboardGui")
|
||
if chestBB then
|
||
chestBB.Size = UDim2.fromScale(12, 1.8)
|
||
local t = chestBB:FindFirstChildWhichIsA("TextLabel", true)
|
||
if t then
|
||
t.TextWrapped = false
|
||
t.TextScaled = true
|
||
end
|
||
end
|
||
table.insert(report, "шрифт заменён у " .. fixed .. " надписей")
|
||
|
||
---------------------------------------------------------------- 4. антураж
|
||
|
||
local amb = map:FindFirstChild("LobbyAmbience")
|
||
if amb then
|
||
amb:Destroy()
|
||
end
|
||
amb = Instance.new("Folder")
|
||
amb.Name = "LobbyAmbience"
|
||
amb.Parent = map
|
||
local rng = Random.new(2026)
|
||
local group
|
||
local function G(name)
|
||
group = Instance.new("Model")
|
||
group.Name = name
|
||
group.Parent = amb
|
||
return group
|
||
end
|
||
local function P(props)
|
||
local p = Instance.new(props.Class or "Part")
|
||
p.Anchored = true
|
||
p.TopSurface, p.BottomSurface = Enum.SurfaceType.Smooth, Enum.SurfaceType.Smooth
|
||
p.Material = Enum.Material.SmoothPlastic
|
||
for k, v in pairs(props) do
|
||
if k ~= "Class" then
|
||
p[k] = v
|
||
end
|
||
end
|
||
p.Parent = group
|
||
return p
|
||
end
|
||
local function cyl(cf, h, d, color, props)
|
||
local t = { Shape = Enum.PartType.Cylinder, Size = Vector3.new(h, d, d), CFrame = cf * CFrame.Angles(0, 0, math.rad(90)), Color = color }
|
||
for k, v in pairs(props or {}) do
|
||
t[k] = v
|
||
end
|
||
return P(t)
|
||
end
|
||
local WOOD, DARK, STONE = Color3.fromRGB(122, 82, 50), Color3.fromRGB(78, 52, 34), Color3.fromRGB(132, 126, 120)
|
||
local IRON, HAY = Color3.fromRGB(56, 54, 58), Color3.fromRGB(214, 182, 96)
|
||
local function at(x, z, yaw)
|
||
return CFrame.new(x, FLOOR, z) * CFrame.Angles(0, math.rad(yaw or 0), 0)
|
||
end
|
||
local function barrel(cf)
|
||
cyl(cf * CFrame.new(0, 1.6, 0), 3.2, 2.6, WOOD:Lerp(DARK, rng:NextNumber(0, 0.4)))
|
||
cyl(cf * CFrame.new(0, 0.7, 0), 0.25, 2.72, IRON)
|
||
cyl(cf * CFrame.new(0, 2.5, 0), 0.25, 2.72, IRON)
|
||
end
|
||
local function crate(cf, s)
|
||
s = s or 2.6
|
||
P({ Size = Vector3.new(s, s * 0.9, s), CFrame = cf * CFrame.new(0, s * 0.45, 0), Color = Color3.fromRGB(150, 104, 62) })
|
||
P({ Size = Vector3.new(s + 0.1, 0.25, s + 0.1), CFrame = cf * CFrame.new(0, s * 0.85, 0), Color = DARK })
|
||
end
|
||
local function tub(cf)
|
||
cyl(cf * CFrame.new(0, 0.7, 0), 1.4, 2.2, WOOD)
|
||
cyl(cf * CFrame.new(0, 1.42, 0), 0.1, 1.9, Color3.fromRGB(70, 52, 36), { Material = Enum.Material.Ground })
|
||
local colors = { Color3.fromRGB(230, 90, 90), Color3.fromRGB(250, 210, 90), Color3.fromRGB(240, 240, 240), Color3.fromRGB(180, 110, 220) }
|
||
for i = 1, 5 do
|
||
local a = i / 5 * math.pi * 2
|
||
P({ Shape = Enum.PartType.Ball, Size = Vector3.new(0.6, 0.6, 0.6), CFrame = cf * CFrame.new(math.cos(a) * 0.55, 1.75, math.sin(a) * 0.55), Color = colors[(i % #colors) + 1], CanCollide = false })
|
||
end
|
||
P({ Shape = Enum.PartType.Ball, Size = Vector3.new(1.3, 0.8, 1.3), CFrame = cf * CFrame.new(0, 1.6, 0), Color = Color3.fromRGB(70, 130, 60), CanCollide = false })
|
||
end
|
||
local function cat(cf, color)
|
||
P({ Size = Vector3.new(1.3, 0.7, 2.0), CFrame = cf * CFrame.new(0, 0.35, 0), Color = color, CanCollide = false }) -- лежит
|
||
P({ Size = Vector3.new(1.0, 0.85, 0.9), CFrame = cf * CFrame.new(0, 0.55, -1.2), Color = color, CanCollide = false })
|
||
for _, x in ipairs({ -0.3, 0.3 }) do
|
||
P({ Class = "WedgePart", Size = Vector3.new(0.25, 0.4, 0.3), CFrame = cf * CFrame.new(x, 1.15, -1.2) * CFrame.Angles(0, math.pi, 0), Color = color, CanCollide = false })
|
||
end
|
||
P({ Size = Vector3.new(0.25, 0.25, 1.6), CFrame = cf * CFrame.new(0.7, 0.15, 0.8) * CFrame.Angles(0, math.rad(-30), 0), Color = color, CanCollide = false })
|
||
end
|
||
local function hen(cf)
|
||
P({ Shape = Enum.PartType.Ball, Size = Vector3.new(0.9, 0.85, 1.1), CFrame = cf * CFrame.new(0, 0.7, 0), Color = Color3.fromRGB(240, 236, 226), CanCollide = false })
|
||
P({ Shape = Enum.PartType.Ball, Size = Vector3.new(0.5, 0.5, 0.5), CFrame = cf * CFrame.new(0, 1.2, -0.45), Color = Color3.fromRGB(240, 236, 226), CanCollide = false })
|
||
P({ Size = Vector3.new(0.12, 0.25, 0.25), CFrame = cf * CFrame.new(0, 1.5, -0.45), Color = Color3.fromRGB(200, 40, 40), CanCollide = false })
|
||
P({ Size = Vector3.new(0.12, 0.1, 0.2), CFrame = cf * CFrame.new(0, 1.2, -0.75), Color = Color3.fromRGB(240, 170, 60), CanCollide = false })
|
||
for _, x in ipairs({ -0.15, 0.15 }) do
|
||
P({ Size = Vector3.new(0.08, 0.35, 0.08), CFrame = cf * CFrame.new(x, 0.17, 0), Color = Color3.fromRGB(240, 170, 60), CanCollide = false })
|
||
end
|
||
end
|
||
|
||
-- колодец (северо-запад, между доской «Топ донатеров» и двором гильдии)
|
||
do
|
||
local c = at(-55, -62)
|
||
G("Well")
|
||
for i = 0, 11 do
|
||
local a = i / 12 * math.pi * 2
|
||
P({ Size = Vector3.new(1.4, 2.2, 0.9), CFrame = c * CFrame.Angles(0, a, 0) * CFrame.new(0, 1.1, -2.4), Color = STONE:Lerp(Color3.new(0, 0, 0), rng:NextNumber(0, 0.15)), Material = Enum.Material.Slate })
|
||
end
|
||
cyl(c * CFrame.new(0, 1.5, 0), 0.2, 4.2, Color3.fromRGB(40, 90, 120), { Material = Enum.Material.Glass, Transparency = 0.2 })
|
||
for _, x in ipairs({ -2.4, 2.4 }) do
|
||
P({ Size = Vector3.new(0.5, 5, 0.5), CFrame = c * CFrame.new(x, 4.4, 0), Color = WOOD })
|
||
end
|
||
P({ Class = "WedgePart", Size = Vector3.new(6, 1.4, 2.2), CFrame = c * CFrame.new(0, 7.6, -1.1), Color = Color3.fromRGB(150, 70, 52) })
|
||
P({ Class = "WedgePart", Size = Vector3.new(6, 1.4, 2.2), CFrame = c * CFrame.new(0, 7.6, 1.1) * CFrame.Angles(0, math.pi, 0), Color = Color3.fromRGB(150, 70, 52) })
|
||
cyl(c * CFrame.new(0, 5.6, 0) * CFrame.Angles(0, math.rad(90), 0), 5, 0.35, DARK)
|
||
P({ Size = Vector3.new(0.05, 1.6, 0.05), CFrame = c * CFrame.new(0, 4.8, 0), Color = Color3.fromRGB(190, 170, 120) })
|
||
cyl(c * CFrame.new(0, 3.8, 0), 0.9, 0.9, WOOD)
|
||
tub(c * CFrame.new(4, 0, 1.5))
|
||
barrel(c * CFrame.new(-4, 0, 1))
|
||
cat(c * CFrame.new(3.2, 0, -2.8) * CFrame.Angles(0, math.rad(40), 0), Color3.fromRGB(232, 150, 70))
|
||
end
|
||
|
||
-- сушащиеся сети, лодка и вёсла (северо-восток)
|
||
do
|
||
local c = at(55, -62, 30)
|
||
G("Nets")
|
||
for _, x in ipairs({ -4, 0, 4 }) do
|
||
P({ Size = Vector3.new(0.45, 7, 0.45), CFrame = c * CFrame.new(x, 3.5, 0), Color = WOOD })
|
||
end
|
||
P({ Size = Vector3.new(8.6, 0.1, 0.1), CFrame = c * CFrame.new(0, 6.6, 0), Color = Color3.fromRGB(190, 170, 120) })
|
||
for _, x in ipairs({ -2, 2 }) do
|
||
local net = P({ Size = Vector3.new(3.4, 4, 0.05), CFrame = c * CFrame.new(x, 4.5, 0), Color = Color3.fromRGB(120, 100, 70), Transparency = 0.35, CanCollide = false })
|
||
for k = 0, 3 do
|
||
P({ Size = Vector3.new(3.4, 0.06, 0.08), CFrame = c * CFrame.new(x, 3 + k, 0), Color = Color3.fromRGB(90, 72, 50), CanCollide = false })
|
||
end
|
||
P({ Shape = Enum.PartType.Ball, Size = Vector3.new(0.4, 0.4, 0.4), CFrame = c * CFrame.new(x + 1.2, 2.6, 0), Color = Color3.fromRGB(230, 200, 120), CanCollide = false })
|
||
end
|
||
-- лодка вверх дном и вёсла
|
||
local b = c * CFrame.new(0, 0, 5) * CFrame.Angles(0, math.rad(90), 0)
|
||
P({ Size = Vector3.new(7, 0.9, 2.4), CFrame = b * CFrame.new(0, 0.9, 0), Color = Color3.fromRGB(110, 140, 160) })
|
||
P({ Size = Vector3.new(6.6, 0.6, 2.0), CFrame = b * CFrame.new(0, 0.3, 0), Color = Color3.fromRGB(96, 70, 46) })
|
||
P({ Class = "WedgePart", Size = Vector3.new(2.4, 0.9, 1.4), CFrame = b * CFrame.new(4.2, 0.9, 0) * CFrame.Angles(0, math.rad(-90), 0), Color = Color3.fromRGB(110, 140, 160) })
|
||
for _, z in ipairs({ -0.5, 0.5 }) do
|
||
P({ Size = Vector3.new(0.25, 0.15, 5), CFrame = b * CFrame.new(-1, 1.45, z) * CFrame.Angles(0, math.rad(80), 0), Color = WOOD })
|
||
end
|
||
crate(c * CFrame.new(-6, 0, 2.5))
|
||
crate(c * CFrame.new(-6, 2.35, 2.5), 2.0)
|
||
barrel(c * CFrame.new(6.2, 0, 2))
|
||
end
|
||
|
||
-- повозка с бочками (юго-запад от точки появления)
|
||
do
|
||
local c = at(-17, 60, 15)
|
||
G("Cart")
|
||
P({ Size = Vector3.new(4.4, 0.4, 7), CFrame = c * CFrame.new(0, 2.2, 0), Color = WOOD })
|
||
for _, x in ipairs({ -2.1, 2.1 }) do
|
||
P({ Size = Vector3.new(0.3, 1.2, 7), CFrame = c * CFrame.new(x, 2.9, 0), Color = DARK })
|
||
for _, z in ipairs({ -2.2, 2.2 }) do
|
||
cyl(c * CFrame.new(x * 1.1, 1.6, z) * CFrame.Angles(0, 0, math.rad(90)), 0.35, 3.2, DARK)
|
||
cyl(c * CFrame.new(x * 1.12, 1.6, z) * CFrame.Angles(0, 0, math.rad(90)), 0.4, 0.7, IRON)
|
||
end
|
||
end
|
||
for _, s in ipairs({ -1, 1 }) do
|
||
P({ Size = Vector3.new(0.3, 0.3, 4), CFrame = c * CFrame.new(s * 0.9, 2, -5.4), Color = WOOD })
|
||
end
|
||
barrel(c * CFrame.new(-1, 2.4, -1.6))
|
||
barrel(c * CFrame.new(1, 2.4, -1.6))
|
||
barrel(c * CFrame.new(0, 2.4, 1.8))
|
||
tub(c * CFrame.new(4.5, 0, 3))
|
||
cat(c * CFrame.new(-3.6, 0, 3) * CFrame.Angles(0, math.rad(-60), 0), Color3.fromRGB(70, 66, 64))
|
||
end
|
||
|
||
-- стог сена и куры (юго-восток от точки появления)
|
||
do
|
||
local c = at(17, 60, -10)
|
||
G("Hay")
|
||
P({ Size = Vector3.new(5, 3, 4), CFrame = c * CFrame.new(0, 1.5, 0), Color = HAY, Material = Enum.Material.Grass })
|
||
P({ Size = Vector3.new(4, 1.4, 3.2), CFrame = c * CFrame.new(0.3, 3.7, 0), Color = HAY:Lerp(Color3.new(1, 1, 1), 0.1), Material = Enum.Material.Grass })
|
||
P({ Size = Vector3.new(0.15, 4.4, 0.15), CFrame = c * CFrame.new(1.8, 3.4, 1.4) * CFrame.Angles(0, 0, math.rad(-15)), Color = WOOD })
|
||
for i, p in ipairs({ { -3.6, 2.2, 30 }, { -2.4, 3.8, -50 }, { 3.5, 2.8, 120 } }) do
|
||
hen(c * CFrame.new(p[1], 0, p[2]) * CFrame.Angles(0, math.rad(p[3] + i), 0))
|
||
end
|
||
crate(c * CFrame.new(-3.2, 0, -2.8), 2)
|
||
tub(c * CFrame.new(3.6, 0, -2.6))
|
||
end
|
||
|
||
-- указатель у дорожки
|
||
do
|
||
local c = at(-8.5, 40, 0)
|
||
G("Signpost")
|
||
P({ Size = Vector3.new(0.6, 9, 0.6), CFrame = c * CFrame.new(0, 4.5, 0), Color = WOOD })
|
||
local function arrow(y, yaw, text)
|
||
local board = P({ Size = Vector3.new(5.6, 1.1, 0.25), CFrame = c * CFrame.new(0, y, 0) * CFrame.Angles(0, math.rad(yaw), 0) * CFrame.new(2.6, 0, 0), Color = Color3.fromRGB(150, 104, 62) })
|
||
P({ Class = "WedgePart", Size = Vector3.new(0.25, 1.1, 0.8), CFrame = board.CFrame * CFrame.new(3.2, 0, 0) * CFrame.Angles(0, math.rad(90), 0), Color = Color3.fromRGB(150, 104, 62) })
|
||
for _, face in ipairs({ Enum.NormalId.Front, Enum.NormalId.Back }) do
|
||
local sg = Instance.new("SurfaceGui")
|
||
sg.Face = face
|
||
sg.SizingMode = Enum.SurfaceGuiSizingMode.PixelsPerStud
|
||
sg.PixelsPerStud = 40
|
||
sg.LightInfluence = 0.3
|
||
sg.Parent = board
|
||
local t = Instance.new("TextLabel")
|
||
t.Size = UDim2.fromScale(1, 1)
|
||
t.BackgroundTransparency = 1
|
||
t.FontFace = FONT
|
||
t.TextScaled = true
|
||
t.TextColor3 = Color3.fromRGB(255, 232, 180)
|
||
t.TextStrokeTransparency = 0.4
|
||
t.Text = text
|
||
t.Parent = sg
|
||
end
|
||
end
|
||
-- стрелки смотрят на свою сторону (угол — от оси X к −Z, как Roblox поворачивает вокруг Y)
|
||
arrow(7.6, 90, "⚓ Гильдия")
|
||
arrow(6.3, 180, "🎣 Удочки")
|
||
arrow(5.0, 0, "⚪ Скупка")
|
||
tub(c * CFrame.new(-1.8, 0, 1.2))
|
||
end
|
||
|
||
-- гирлянды флажков между фонарями вокруг площади (столбы с плафонами на радиусе 35–55)
|
||
do
|
||
G("Garlands")
|
||
local posts = {}
|
||
for _, p in ipairs(map:GetChildren()) do
|
||
if p:IsA("BasePart") and p.Shape == Enum.PartType.Cylinder and math.abs(p.Size.X - 9) < 0.5 and math.abs(p.Position.Y - 5.5) < 0.6 then
|
||
local r = flat(p.Position).Magnitude
|
||
if r > 33 and r < 56 then
|
||
table.insert(posts, p.Position)
|
||
end
|
||
end
|
||
end
|
||
table.sort(posts, function(a, b)
|
||
return math.atan2(a.Z, a.X) < math.atan2(b.Z, b.X)
|
||
end)
|
||
local colors = { Color3.fromRGB(190, 50, 44), Color3.fromRGB(236, 200, 90), Color3.fromRGB(70, 110, 160), Color3.fromRGB(80, 140, 80) }
|
||
local strings = 0
|
||
for i = 1, #posts do
|
||
local a, b = posts[i], posts[i % #posts + 1]
|
||
local A, B = Vector3.new(a.X, 10.2, a.Z), Vector3.new(b.X, 10.2, b.Z)
|
||
local len = (B - A).Magnitude
|
||
if len > 6 and len < 42 then
|
||
strings += 1
|
||
local n = math.floor(len / 1.6)
|
||
local prev
|
||
for k = 0, n do
|
||
local t = k / n
|
||
local p = A:Lerp(B, t) - Vector3.new(0, math.sin(t * math.pi) * 1.6, 0)
|
||
if prev then
|
||
local mid = (prev + p) / 2
|
||
P({ Size = Vector3.new(0.06, 0.06, (p - prev).Magnitude), CFrame = CFrame.lookAt(mid, p), Color = Color3.fromRGB(70, 60, 50), CanCollide = false, CanQuery = false })
|
||
end
|
||
if k > 0 and k < n then
|
||
P({ Class = "WedgePart", Size = Vector3.new(0.08, 0.9, 0.7), CFrame = CFrame.lookAt(p, p + (B - A)) * CFrame.new(0, -0.45, 0) * CFrame.Angles(math.pi, 0, 0) * CFrame.Angles(0, math.rad(90), 0),
|
||
Color = colors[(k % #colors) + 1], CanCollide = false, CanQuery = false, CastShadow = false })
|
||
end
|
||
prev = p
|
||
end
|
||
end
|
||
end
|
||
table.insert(report, ("гирлянды: столбов %d, гирлянд %d"):format(#posts, strings))
|
||
end
|
||
|
||
-- проверка: антураж не задевает лавки, порталы, двор гильдии, доски
|
||
local overlap = OverlapParams.new()
|
||
overlap.FilterType = Enum.RaycastFilterType.Exclude
|
||
overlap.FilterDescendantsInstances = { amb }
|
||
for _, g in ipairs(amb:GetChildren()) do
|
||
if g.Name ~= "Garlands" then
|
||
local cf, size = g:GetBoundingBox()
|
||
local hits = {}
|
||
for _, p in ipairs(workspace:GetPartBoundsInBox(cf * CFrame.new(0, 0.6, 0), size - Vector3.new(0, 1.2, 0), overlap)) do
|
||
if p.CanCollide and p.Size.X < 60 and p.Size.Z < 60 and p.Position.Y > 1.3 then
|
||
hits[(p.Parent and p.Parent ~= map) and p.Parent.Name or p.Name] = true
|
||
end
|
||
end
|
||
local list = {}
|
||
for k in pairs(hits) do
|
||
table.insert(list, k)
|
||
end
|
||
table.insert(report, g.Name .. ": " .. (#list > 0 and ("задевает " .. table.concat(list, ", ")) or "свободно"))
|
||
end
|
||
end
|
||
return table.concat(report, "\n")
|