From 6673d5b90d1720934847a0a99def04ef3a20330a Mon Sep 17 00:00:00 2001 From: listik Date: Wed, 4 Nov 2026 14:02:03 +0300 Subject: [PATCH] 1244 --- Fishing.rbxlx | 2809 +++++++++++++++-- install/1_FishConfig_ReplicatedStorage.rbxmx | 55 +- .../4_GameServer_ServerScriptService.rbxmx | 144 +- ...5_FishingClient_StarterPlayerScripts.rbxmx | 146 +- .../7_WorldBuilder_ServerScriptService.rbxmx | 6 - install/INSTALL.lua | 351 +- src/ReplicatedStorage/FishConfig.lua | 55 +- src/ServerScriptService/GameServer.server.lua | 144 +- src/ServerScriptService/WorldBuilder.lua | 6 - .../FishingClient.client.lua | 146 +- 10 files changed, 2705 insertions(+), 1157 deletions(-) diff --git a/Fishing.rbxlx b/Fishing.rbxlx index 09240a7..2108428 100644 --- a/Fishing.rbxlx +++ b/Fishing.rbxlx @@ -59266,27 +59266,27 @@ gReA/4D/gP+A54EXgP+A/4D/gOeBF4D/gP+A/4DngReA/4D/gP+A5w==]]> - 47.2727432 - 41.9268837 - -32.9533653 - -0.371816188 - -0.395115107 - 0.840021908 + 47.2955475 + 42.5527916 + -32.0579071 + -0.371817112 + -0.395114779 + 0.84002161 -0 - 0.904897392 - 0.425630033 - -0.92830646 - 0.158256143 - -0.336455464 + 0.904897332 + 0.425629884 + -0.928306043 + 0.158256471 + -0.336456299 null 0 70 0 - 45.5927048 - 41.0756264 - -32.2804565 + 45.615509 + 41.7015343 + -31.3849964 1 0 0 @@ -2754965,29 +2754965,19 @@ local Lighting = game:GetService("Lighting") local player = Players.LocalPlayer local Config = require(ReplicatedStorage:WaitForChild("FishConfig")) local Models = require(ReplicatedStorage:WaitForChild("GameModels")) +local Audio = require(script.Parent:WaitForChild("Audio")) local remote = ReplicatedStorage:WaitForChild("GameEvent") +local reelSound = Audio.loop("reel", "sfx") -- трещотка катушки, пока идёт вываживание ---------------------------------------------------------------- стиль -local C = { - bg = Color3.fromRGB(18, 24, 40), - panel = Color3.fromRGB(30, 38, 62), - panel2 = Color3.fromRGB(44, 56, 90), - gold = Color3.fromRGB(255, 200, 70), - green = Color3.fromRGB(60, 190, 95), - blue = Color3.fromRGB(60, 135, 230), - red = Color3.fromRGB(215, 65, 65), - purple = Color3.fromRGB(150, 90, 220), - grey = Color3.fromRGB(75, 82, 102), - text = Color3.new(1, 1, 1), - muted = Color3.fromRGB(170, 180, 205), - line = Color3.fromRGB(90, 110, 165), -} -local TITLE = Enum.Font.FredokaOne +-- палитра, шрифты и украшения — в модуле UiTheme («средневековая гильдия») +local Theme = require(script.Parent:WaitForChild("UiTheme")) +local C = Theme.C +local TITLE = Enum.Font.FredokaOne -- в new() подменяется на шрифт с кириллицей (Theme.FACES) local BODY = Enum.Font.GothamBold local BODY2 = Enum.Font.GothamMedium local WHITE, BLACK = Color3.new(1, 1, 1), Color3.new(0, 0, 0) -local DING = "rbxasset://sounds/electronicpingshort.wav" ---------------------------------------------------------------- помощники UI @@ -2754997,6 +2754987,8 @@ local function new(class, props, children) for k, v in pairs(props or {}) do if k == "Parent" then parent = v + elseif k == "Font" and Theme.FACES[v] then + obj.FontFace = Theme.FACES[v] else obj[k] = v end @@ -2755029,13 +2755021,20 @@ local function text(props) return new("TextLabel", d) end local function btn(props, onClick) - local d = { AutoButtonColor = true, Font = TITLE, TextColor3 = C.text, TextSize = 18, BackgroundColor3 = C.blue, Text = "" } + -- дерево/сургуч с золотой окантовкой; цвет кнопки задаёт BackgroundColor3, градиент даёт объём + local d = { AutoButtonColor = true, Font = TITLE, TextColor3 = C.text, TextSize = 18, BackgroundColor3 = C.blue, Text = "", TextStrokeColor3 = C.ink, TextStrokeTransparency = 0.55 } for k, v in pairs(props) do d[k] = v end - local b = new("TextButton", d, { corner(10), new("UIGradient", { Color = ColorSequence.new(WHITE, Color3.fromRGB(195, 195, 195)), Rotation = 90 }) }) + local b = new("TextButton", d, { + corner(8), new("UIGradient", { Color = ColorSequence.new(Color3.fromRGB(255, 240, 215), Color3.fromRGB(165, 150, 135)), Rotation = 90 }), + new("UIStroke", { Color = C.gold, Thickness = 1.5, Transparency = 0.15, ApplyStrokeMode = Enum.ApplyStrokeMode.Border }), + }) if onClick then - b.MouseButton1Click:Connect(onClick) + b.MouseButton1Click:Connect(function(...) + Audio.play("click") + onClick(...) + end) end return b end @@ -2755100,9 +2755099,7 @@ local function viewport(parent, model, dir, zoom) vf.CurrentCamera = cam return vf end -local FISH_VIEW = Vector3.new(0.12, 0.15, 1) -local ROD_VIEW = Vector3.new(1, 0.1, 0.05) -local BAG_VIEW = Vector3.new(0.6, 0.25, 1) +local VIEW = { fish = Vector3.new(0.12, 0.15, 1), rod = Vector3.new(1, 0.1, 0.05), bag = Vector3.new(0.6, 0.25, 1) } local function silhouette(model) for _, p in ipairs(model:GetDescendants()) do @@ -2755122,44 +2755119,56 @@ local gui = new("ScreenGui", { Name = "FishingUI", ResetOnSpawn = false, IgnoreGuiInset = false, ZIndexBehavior = Enum.ZIndexBehavior.Sibling, Parent = player:WaitForChild("PlayerGui"), }) +-- холст с масштабом под экран: всё ниже кладём в него, а не прямо в ScreenGui +local screen = Theme.scaleRoot(gui) ---------------------------------------------------------------- HUD +-- hud — содержимое; его родитель — деревянная панель с рамкой и заклёпками (её двигает раскладка) local hud = new("Frame", { - Size = UDim2.fromOffset(290, 172), Position = UDim2.fromOffset(12, 10), BackgroundColor3 = WHITE, Parent = gui, -}, { corner(16), stroke(C.line, 2, 0.35), gradient(C.panel2, C.bg, 90), - new("UIPadding", { PaddingLeft = UDim.new(0, 14), PaddingRight = UDim.new(0, 14), PaddingTop = UDim.new(0, 10) }) }) -local coinsText = text({ Size = UDim2.new(1, 0, 0, 32), Font = TITLE, TextSize = 30, TextColor3 = C.gold, Text = "💰 0", TextStrokeTransparency = 0.6, Parent = hud }) -local lvlBadge = new("Frame", { Size = UDim2.fromOffset(36, 36), Position = UDim2.fromOffset(0, 38), BackgroundColor3 = WHITE, Parent = hud }, - { corner(18), gradient(Color3.fromRGB(255, 225, 110), Color3.fromRGB(235, 145, 30), 90), stroke(Color3.fromRGB(120, 70, 10), 2, 0.2) }) -local lvlText = text({ Size = UDim2.fromScale(1, 1), Font = TITLE, TextSize = 19, TextXAlignment = Enum.TextXAlignment.Center, TextColor3 = Color3.fromRGB(70, 40, 0), Text = "1", Parent = lvlBadge }) -local xpBack = new("Frame", { Size = UDim2.new(1, -46, 0, 18), Position = UDim2.fromOffset(46, 47), BackgroundColor3 = Color3.fromRGB(14, 18, 30), Parent = hud }, { corner(9) }) -local xpFill = new("Frame", { Size = UDim2.fromScale(0, 1), BackgroundColor3 = WHITE, Parent = xpBack }, { corner(9), gradient(Color3.fromRGB(110, 225, 255), Color3.fromRGB(60, 110, 255), 0) }) -local xpText = text({ Size = UDim2.fromScale(1, 1), TextSize = 12, TextXAlignment = Enum.TextXAlignment.Center, ZIndex = 2, Text = "", TextStrokeTransparency = 0.5, Parent = xpBack }) -local luckText = text({ Size = UDim2.new(1, 0, 0, 22), Position = UDim2.fromOffset(0, 82), TextSize = 16, RichText = true, TextColor3 = Color3.fromRGB(130, 255, 150), Text = "", Parent = hud }) -local bagText = text({ Size = UDim2.new(1, 0, 0, 20), Position = UDim2.fromOffset(0, 106), TextSize = 14, Font = BODY2, Text = "", Parent = hud }) -local rodText = text({ Size = UDim2.new(1, 0, 0, 20), Position = UDim2.fromOffset(0, 128), TextSize = 14, Font = BODY2, TextColor3 = C.muted, RichText = true, Text = "", Parent = hud }) + Size = UDim2.new(1, -28, 1, -10), Position = UDim2.fromOffset(14, 10), BackgroundTransparency = 1, + Parent = new("Frame", { + Name = "Hud", Size = UDim2.fromOffset(290, 172), Position = UDim2.fromOffset(12, 10), BackgroundColor3 = WHITE, Parent = screen, + }, { corner(10), stroke(C.goldDark, 2.5, 0), Theme.woodGradient(C.wood, C.woodDark) }), +}) +Theme.innerBorder(hud.Parent, 5, 7, C.gold, 0.5) +Theme.rivets(hud.Parent, 8, 6) +local H = {} -- элементы HUD (в таблице: у скрипта лимит 200 локальных переменных) +H.coins = text({ Size = UDim2.new(1, 0, 0, 32), Font = TITLE, TextSize = 28, TextColor3 = C.silver, Text = "⚪ 0", TextStrokeColor3 = C.ink, TextStrokeTransparency = 0.3, Parent = hud }) +H.lvlBadge = new("Frame", { Size = UDim2.fromOffset(36, 36), Position = UDim2.fromOffset(0, 38), BackgroundColor3 = WHITE, Rotation = 45, Parent = hud }, + { corner(6), gradient(C.goldBright, C.goldDark, 90), stroke(C.ink, 2, 0.1) }) +H.lvl = text({ Size = UDim2.fromScale(1, 1), Font = TITLE, TextSize = 17, Rotation = -45, TextXAlignment = Enum.TextXAlignment.Center, TextColor3 = C.ink, Text = "1", Parent = H.lvlBadge }) +H.xpBack = new("Frame", { Size = UDim2.new(1, -46, 0, 18), Position = UDim2.fromOffset(46, 47), BackgroundColor3 = C.dark, Parent = hud }, { corner(4), stroke(C.goldDark, 1.5, 0.2) }) +H.xpFill = new("Frame", { Size = UDim2.fromScale(0, 1), BackgroundColor3 = WHITE, Parent = H.xpBack }, { corner(4), gradient(C.goldBright, Color3.fromRGB(196, 128, 48), 0) }) +H.xpText = text({ Size = UDim2.fromScale(1, 1), TextSize = 12, TextXAlignment = Enum.TextXAlignment.Center, ZIndex = 2, Text = "", TextStrokeTransparency = 0.5, Parent = H.xpBack }) +H.luck = text({ Size = UDim2.new(1, 0, 0, 22), Position = UDim2.fromOffset(0, 82), TextSize = 16, RichText = true, TextColor3 = Color3.fromRGB(130, 255, 150), Text = "", Parent = hud }) +H.bag = text({ Size = UDim2.new(1, 0, 0, 20), Position = UDim2.fromOffset(0, 106), TextSize = 14, Font = BODY2, Text = "", Parent = hud }) +H.rod = text({ Size = UDim2.new(1, 0, 0, 20), Position = UDim2.fromOffset(0, 128), TextSize = 14, Font = BODY2, TextColor3 = C.muted, RichText = true, Text = "", Parent = hud }) -- баннер события (справа сверху) local eventBanner = new("Frame", { Size = UDim2.fromOffset(280, 58), AnchorPoint = Vector2.new(1, 0), Position = UDim2.new(1, -12, 0, 10), - BackgroundColor3 = WHITE, Visible = false, Parent = gui, + BackgroundColor3 = WHITE, Visible = false, Parent = screen, }, { corner(14), stroke(C.gold, 2, 0.1), gradient(Color3.fromRGB(90, 60, 20), C.bg, 90) }) local eventTitle = text({ Size = UDim2.new(1, -20, 0, 26), Position = UDim2.fromOffset(12, 4), Font = TITLE, TextSize = 19, TextColor3 = C.gold, Text = "", Parent = eventBanner }) local eventDesc = text({ Size = UDim2.new(1, -20, 0, 20), Position = UDim2.fromOffset(12, 30), Font = BODY2, TextSize = 13, TextColor3 = C.text, Text = "", Parent = eventBanner }) -- кнопки слева +-- столбик на компьютере, сетка 2×N на телефоне (раскладка — в applyLayout ниже) local side = new("Frame", { Size = UDim2.fromOffset(70, 380), AnchorPoint = Vector2.new(0, 0.5), Position = UDim2.new(0, 12, 0.5, 60), - BackgroundTransparency = 1, Parent = gui, -}, { new("UIListLayout", { Padding = UDim.new(0, 8), SortOrder = Enum.SortOrder.LayoutOrder }) }) + BackgroundTransparency = 1, Parent = screen, +}, { new("UIGridLayout", { CellSize = UDim2.fromOffset(68, 68), CellPadding = UDim2.fromOffset(8, 8), FillDirectionMaxCells = 1, SortOrder = Enum.SortOrder.LayoutOrder }) }) local sideDots = {} local function sideButton(order, icon, label, key, color, onClick) - local b = btn({ Size = UDim2.fromOffset(68, 68), BackgroundColor3 = color, LayoutOrder = order, Parent = side }, onClick) - stroke(color:Lerp(BLACK, 0.45), 3).Parent = b - text({ Size = UDim2.new(1, 0, 0, 36), Position = UDim2.fromOffset(0, 3), TextSize = 28, TextXAlignment = Enum.TextXAlignment.Center, Text = icon, Parent = b }) - text({ Size = UDim2.new(1, 0, 0, 18), Position = UDim2.fromOffset(0, 44), Font = TITLE, TextSize = 13, TextXAlignment = Enum.TextXAlignment.Center, Text = label, TextStrokeTransparency = 0.5, Parent = b }) + -- деревянная плитка; цвет раздела — полоска-лента снизу + local b = btn({ Size = UDim2.fromOffset(68, 68), BackgroundColor3 = C.woodLight, LayoutOrder = order, Parent = side }, onClick) + b:FindFirstChildOfClass("UIStroke").Color = C.goldDark + b:FindFirstChildOfClass("UIStroke").Thickness = 2.5 + new("Frame", { Size = UDim2.new(1, -10, 0, 4), AnchorPoint = Vector2.new(0.5, 1), Position = UDim2.new(0.5, 0, 1, -4), BackgroundColor3 = color, BorderSizePixel = 0, Parent = b }, { corner(2) }) + text({ Size = UDim2.fromScale(1, 0.5), Position = UDim2.fromScale(0, 0.06), TextScaled = true, TextXAlignment = Enum.TextXAlignment.Center, Text = icon, Parent = b }) + text({ Size = UDim2.fromScale(1, 0.24), Position = UDim2.fromScale(0, 0.6), Font = TITLE, TextScaled = true, TextXAlignment = Enum.TextXAlignment.Center, Text = label, TextStrokeColor3 = C.ink, TextStrokeTransparency = 0.3, Parent = b }) if key and not UserInputService.TouchEnabled then local tag = new("Frame", { Size = UDim2.fromOffset(20, 20), Position = UDim2.new(1, -14, 0, -6), BackgroundColor3 = C.bg, Parent = b }, { corner(6), stroke(C.gold, 1.5) }) text({ Size = UDim2.fromScale(1, 1), Font = TITLE, TextSize = 12, TextXAlignment = Enum.TextXAlignment.Center, TextColor3 = C.gold, Text = key, Parent = tag }) @@ -2755178,11 +2755187,12 @@ local SOFT_EDGES = NumberSequence.new({ NumberSequenceKeypoint.new(0.82, 0.62), NumberSequenceKeypoint.new(1, 1), }) -- жирный округлый шрифт с кириллицей (у FredokaOne кириллицы нет — Roblox подставляет тонкий шрифт) -local HINT_FONT = Font.new("rbxasset://fonts/families/Nunito.json", Enum.FontWeight.Heavy) --- плашка-дымка (Frame) с текстом внутри; градиент только на плашке, на текст он не действует +local HINT_FONT = Theme.HINT_FACE +-- плашка-дымка (Frame) с текстом внутри; градиент только на плашке, на текст он не действует. +-- Цвет — тёмное дерево local function softPlate(props, textProps) local plate = new("Frame", props) - plate.BackgroundColor3 = BLACK + plate.BackgroundColor3 = C.woodDark plate.BackgroundTransparency = 0 corner(30).Parent = plate new("UIGradient", { Transparency = SOFT_EDGES, Parent = plate }) @@ -2755208,7 +2755218,7 @@ end -- уведомления — под подсказкой обучения, которая стоит в самом верху local toasts = new("Frame", { Size = UDim2.new(0, 900, 0, 200), AnchorPoint = Vector2.new(0.5, 0), Position = UDim2.new(0.5, 0, 0, 84), - BackgroundTransparency = 1, Parent = gui, + BackgroundTransparency = 1, ZIndex = 30, Parent = screen, }, { new("UIListLayout", { Padding = UDim.new(0, 6), HorizontalAlignment = Enum.HorizontalAlignment.Center, SortOrder = Enum.SortOrder.LayoutOrder }) }) local toastOrder = 0 local toastTimers = {} @@ -2755239,7 +2755249,7 @@ local function notify(msg, color) end local t, l = softPlate( { Size = UDim2.new(0, 0, 0, 54), AutomaticSize = Enum.AutomaticSize.X, LayoutOrder = toastOrder, Parent = toasts }, - { TextSize = 30, TextColor3 = color or WHITE, Text = msg } + { TextSize = 30, TextColor3 = color or C.text, Text = msg } ) popIn(t) t:SetAttribute("Msg", msg) @@ -2755257,8 +2755267,10 @@ end -- карточка пойманной рыбы local catchCard = new("Frame", { Size = UDim2.fromOffset(400, 128), AnchorPoint = Vector2.new(0.5, 0), Position = UDim2.new(0.5, 0, 0, -220), - BackgroundColor3 = WHITE, Visible = false, Parent = gui, -}, { corner(18) }) + BackgroundColor3 = WHITE, Visible = false, ZIndex = 25, Parent = screen, +}, { corner(10) }) +Theme.innerBorder(catchCard, 6, 6, C.gold, 0.5) +Theme.rivets(catchCard, 8, 6) local catchStroke = stroke(WHITE, 3) catchStroke.Parent = catchCard local catchGrad = gradient(C.panel2, C.bg, 90) @@ -2755276,7 +2755288,7 @@ local function showCatch(fish, extra) local r = Config.Rarities[fish.rarity] local mut = fish.mutation and Config.Find(Config.Mutations, fish.mutation) clear(catchView) - viewport(catchView, Models.buildFish(fish.id, fish.mutation, 1, true), FISH_VIEW, 0.75) + viewport(catchView, Models.buildFish(fish.id, fish.mutation, 1, true), VIEW.fish, 0.75) catchStroke.Color = mut and mut.color or r.color catchGrad.Color = ColorSequence.new(r.color:Lerp(C.bg, 0.55), C.bg) catchHeader.Text = extra and extra.new and "🆕 НОВЫЙ ВИД! Опыт x2" or (extra and extra.record and "🏆 НОВЫЙ РЕКОРД!" or "ПОЙМАНА РЫБА") @@ -2755285,7 +2755297,7 @@ local function showCatch(fish, extra) catchName.TextColor3 = r.color catchInfo.Text = ("%s%s · %.2f кг"):format( hex(r.color), r.name, mut and (" · " .. mut.name .. " x" .. mut.mult .. "") or "", fish.weight) - catchValue.Text = ("💰 %s ⭐ +%d XP%s"):format(fmt(fish.value), fish.xp * ((extra and extra.new) and 2 or 1), + catchValue.Text = ("⚪ %s ⭐ +%d XP%s"):format(fmt(fish.value), fish.xp * ((extra and extra.new) and 2 or 1), (extra and extra.combo and extra.combo > 1.001) and (" 🔥 x%.1f"):format(extra.combo) or "") catchCard.Visible = true TweenService:Create(catchCard, TweenInfo.new(0.45, Enum.EasingStyle.Back, Enum.EasingDirection.Out), { Position = UDim2.new(0.5, 0, 0, 120) }):Play() @@ -2755305,7 +2755317,7 @@ local function floatText(msg, color) local l = text({ Size = UDim2.fromOffset(400, 60), AnchorPoint = Vector2.new(0.5, 0.5), Position = UDim2.fromScale(0.5, 0.42), Font = TITLE, TextSize = 46, TextXAlignment = Enum.TextXAlignment.Center, TextColor3 = color, - TextStrokeTransparency = 0.2, Text = msg, Parent = gui, + TextStrokeTransparency = 0.2, Text = msg, Parent = screen, }) TweenService:Create(l, TweenInfo.new(1.4, Enum.EasingStyle.Quad), { Position = UDim2.fromScale(0.5, 0.3), TextTransparency = 1, TextStrokeTransparency = 1 }):Play() task.delay(1.5, function() @@ -2755317,22 +2755329,24 @@ end -- вверху, на месте подсказки обучения (она во время рыбалки скрыта) local statusLabel = softPlate( - { Size = UDim2.fromOffset(0, 64), AutomaticSize = Enum.AutomaticSize.X, AnchorPoint = Vector2.new(0.5, 0), Position = UDim2.new(0.5, 0, 0, 12), Visible = false, Parent = gui }, + { Size = UDim2.fromOffset(0, 64), AutomaticSize = Enum.AutomaticSize.X, AnchorPoint = Vector2.new(0.5, 0), Position = UDim2.new(0.5, 0, 0, 12), Visible = false, Parent = screen }, { TextSize = 36, Text = "🎣 Ждём клёв…" } ) wobble(statusLabel, 1.2, 1.4) local mgFrame = new("Frame", { Size = UDim2.fromOffset(480, 124), AnchorPoint = Vector2.new(0.5, 1), Position = UDim2.new(0.5, 0, 1, -100), - BackgroundColor3 = WHITE, Visible = false, Parent = gui, -}, { corner(16), stroke(C.gold, 2.5, 0.1), gradient(C.panel2, C.bg, 90) }) + BackgroundColor3 = WHITE, Visible = false, Parent = screen, +}, { corner(10), stroke(C.goldDark, 3, 0), Theme.woodGradient(C.wood, C.woodDark) }) +Theme.innerBorder(mgFrame, 5, 7, C.gold, 0.4) +Theme.rivets(mgFrame, 9, 6) text({ - Size = UDim2.new(1, 0, 0, 30), Position = UDim2.fromOffset(0, 6), Font = TITLE, TextSize = 24, - TextXAlignment = Enum.TextXAlignment.Center, TextColor3 = C.gold, TextStrokeTransparency = 0.5, - Text = "❗ КЛЮЁТ! Кликай, когда метка в зелёной зоне", Parent = mgFrame, + Size = UDim2.new(1, 0, 0, 30), Position = UDim2.fromOffset(0, 6), Font = TITLE, TextSize = 22, + TextXAlignment = Enum.TextXAlignment.Center, TextColor3 = C.goldBright, TextStrokeColor3 = C.ink, TextStrokeTransparency = 0.3, + Text = UserInputService.TouchEnabled and "❗ КЛЮЁТ! Жми, когда метка в зелёной зоне" or "❗ КЛЮЁТ! Кликай, когда метка в зелёной зоне", Parent = mgFrame, }) -local bar = new("Frame", { Size = UDim2.new(1, -30, 0, 36), Position = UDim2.fromOffset(15, 42), BackgroundColor3 = Color3.fromRGB(22, 28, 46), ClipsDescendants = true, Parent = mgFrame }, { corner(9), stroke(BLACK, 1.5, 0.4) }) -local zoneF = new("Frame", { Size = UDim2.fromScale(0.25, 1), BackgroundColor3 = WHITE, BorderSizePixel = 0, Parent = bar }, { gradient(Color3.fromRGB(130, 245, 150), Color3.fromRGB(35, 165, 75), 90) }) -local markerF = new("Frame", { Size = UDim2.new(0, 8, 1, 4), AnchorPoint = Vector2.new(0.5, 0.5), Position = UDim2.fromScale(0, 0.5), BackgroundColor3 = WHITE, ZIndex = 3, Parent = bar }, { corner(4), stroke(BLACK, 2) }) +local bar = new("Frame", { Size = UDim2.new(1, -30, 0, 36), Position = UDim2.fromOffset(15, 42), BackgroundColor3 = C.dark, ClipsDescendants = true, Parent = mgFrame }, { corner(5), stroke(C.goldDark, 2, 0) }) +local zoneF = new("Frame", { Size = UDim2.fromScale(0.25, 1), BackgroundColor3 = WHITE, BorderSizePixel = 0, Parent = bar }, { gradient(Color3.fromRGB(150, 220, 110), Color3.fromRGB(56, 116, 52), 90) }) +local markerF = new("Frame", { Size = UDim2.new(0, 8, 1, 4), AnchorPoint = Vector2.new(0.5, 0.5), Position = UDim2.fromScale(0, 0.5), BackgroundColor3 = C.parchment, ZIndex = 3, Parent = bar }, { corner(3), stroke(C.ink, 2) }) local pipsText = text({ Size = UDim2.new(0.5, -15, 0, 24), Position = UDim2.fromOffset(15, 84), Font = TITLE, TextSize = 19, RichText = true, Text = "", Parent = mgFrame }) local missText = text({ Size = UDim2.new(0.5, -15, 0, 24), Position = UDim2.new(0.5, 0, 0, 84), Font = TITLE, TextSize = 19, TextXAlignment = Enum.TextXAlignment.Right, RichText = true, Text = "", Parent = mgFrame }) local timeBar = new("Frame", { Size = UDim2.new(1, -30, 0, 5), Position = UDim2.fromOffset(15, 112), BackgroundColor3 = C.gold, BorderSizePixel = 0, Parent = mgFrame }, { corner(3) }) @@ -2755343,31 +2755357,54 @@ local openWindow = nil local function makeWindow(title, accent, tabs) local w = { pages = {}, tabButtons = {}, current = nil } + -- деревянная панель, золотая рамка в 2 слоя, ромбики-заклёпки, заголовок на багровой ленте, + -- закрытие — круглая багровая печать. accent — цвет раздела: тонкая полоска под лентой local frame = new("Frame", { Size = UDim2.fromScale(0.92, 0.82), AnchorPoint = Vector2.new(0.5, 0.5), Position = UDim2.fromScale(0.5, 0.53), - BackgroundColor3 = WHITE, Visible = false, Parent = gui, - }, { corner(20), stroke(accent, 3, 0.05), gradient(C.panel, C.bg, 90), new("UISizeConstraint", { MaxSize = Vector2.new(760, 540) }) }) + BackgroundColor3 = WHITE, Visible = false, ZIndex = 20, Parent = screen, -- поверх HUD, целей и подсказок + }, { corner(12), stroke(C.goldDark, 4, 0), Theme.woodGradient(C.wood, C.woodDark), new("UISizeConstraint", { MaxSize = Vector2.new(760, 540) }) }) + Theme.innerBorder(frame, 7, 8, C.gold, 0.2) + Theme.rivets(frame, 12, 8) local scale = new("UIScale", { Parent = frame }) - local header = new("Frame", { Size = UDim2.new(1, 0, 0, 56), BackgroundColor3 = WHITE, Parent = frame }, { corner(20), gradient(accent, accent:Lerp(BLACK, 0.35), 90) }) - new("Frame", { Size = UDim2.new(1, 0, 0, 20), Position = UDim2.new(0, 0, 1, -20), BackgroundColor3 = accent:Lerp(BLACK, 0.3), BorderSizePixel = 0, Parent = header }) - text({ Size = UDim2.new(1, -80, 1, 0), Position = UDim2.fromOffset(20, 0), Font = TITLE, TextSize = 30, Text = title, TextStrokeTransparency = 0.5, ZIndex = 2, Parent = header }) - btn({ Size = UDim2.fromOffset(42, 42), Position = UDim2.new(1, -52, 0, 7), BackgroundColor3 = C.red, Text = "✕", TextSize = 22, ZIndex = 3, Parent = header }, function() + local header = new("Frame", { Size = UDim2.new(1, 0, 0, 56), BackgroundTransparency = 1, Parent = frame }) + -- багровая лента по центру, ширина — по тексту + local ribbon = new("Frame", { + Size = UDim2.new(0, 0, 0, 44), AutomaticSize = Enum.AutomaticSize.X, AnchorPoint = Vector2.new(0.5, 0), Position = UDim2.new(0.5, 0, 0, 8), + BackgroundColor3 = WHITE, ZIndex = 3, Parent = header, + }, { corner(4), gradient(Color3.fromRGB(184, 58, 48), Color3.fromRGB(118, 28, 26), 90), stroke(C.gold, 2, 0), + new("UIListLayout", { HorizontalAlignment = Enum.HorizontalAlignment.Center, VerticalAlignment = Enum.VerticalAlignment.Center }), + new("UIPadding", { PaddingLeft = UDim.new(0, 36), PaddingRight = UDim.new(0, 36) }) }) + text({ Size = UDim2.fromScale(0, 1), AutomaticSize = Enum.AutomaticSize.X, Font = TITLE, TextSize = 24, TextXAlignment = Enum.TextXAlignment.Center, + TextColor3 = C.goldBright, TextStrokeColor3 = C.ink, TextStrokeTransparency = 0.2, Text = title, ZIndex = 4, Parent = ribbon }) + new("Frame", { Size = UDim2.new(0, 120, 0, 3), AnchorPoint = Vector2.new(0.5, 0), Position = UDim2.new(0.5, 0, 1, 2), BackgroundColor3 = accent, BorderSizePixel = 0, Parent = header }, { corner(2) }) + local closeB = btn({ Size = UDim2.fromOffset(44, 44), AnchorPoint = Vector2.new(0.5, 0.5), Position = UDim2.new(1, -24, 0, 22), BackgroundColor3 = C.crimson, Text = "×", TextSize = 30, TextColor3 = C.goldBright, ZIndex = 7, Parent = frame }, function() w.close() end) + closeB:FindFirstChildOfClass("UICorner").CornerRadius = UDim.new(1, 0) + closeB:FindFirstChildOfClass("UIStroke").Thickness = 2.5 local hasTabs = #tabs > 1 - local tabBar = new("Frame", { Size = UDim2.new(1, -28, 0, 42), Position = UDim2.fromOffset(14, 66), BackgroundTransparency = 1, Visible = hasTabs, Parent = frame }, + local tabBar = new("Frame", { Size = UDim2.new(1, -36, 0, 40), Position = UDim2.fromOffset(18, 68), BackgroundTransparency = 1, Visible = hasTabs, Parent = frame }, { new("UIListLayout", { FillDirection = Enum.FillDirection.Horizontal, Padding = UDim.new(0, 8), SortOrder = Enum.SortOrder.LayoutOrder }) }) - local top = hasTabs and 116 or 68 - local body = new("Frame", { Size = UDim2.new(1, -28, 1, -(top + 12)), Position = UDim2.fromOffset(14, top), BackgroundTransparency = 1, Parent = frame }) + local top = hasTabs and 118 or 70 + local body = new("Frame", { Size = UDim2.new(1, -36, 1, -(top + 16)), Position = UDim2.fromOffset(18, top), BackgroundTransparency = 1, Parent = frame }) w.frame = frame + -- на телефоне окно почти на весь экран + Theme.onLayout(function(compact) + frame.Size = compact and UDim2.new(1, -16, 1, -12) or UDim2.fromScale(0.92, 0.82) + frame.UISizeConstraint.MaxSize = compact and Vector2.new(1100, 640) or Vector2.new(760, 540) + frame.Position = compact and UDim2.fromScale(0.5, 0.5) or UDim2.fromScale(0.5, 0.53) + end) function w.setTab(id) w.current = id for k, page in pairs(w.pages) do page.Visible = (k == id) end + -- выбранная вкладка — золотая с тёмными буквами, остальные — светлое дерево for k, b in pairs(w.tabButtons) do - b.BackgroundColor3 = (k == id) and accent or C.panel2 + b.BackgroundColor3 = (k == id) and C.gold or C.woodLight + b.TextColor3 = (k == id) and C.ink or C.text + b.TextStrokeTransparency = (k == id) and 1 or 0.55 end if w.render then w.render(id) @@ -2755384,6 +2755421,9 @@ local function makeWindow(title, accent, tabs) openWindow.close() end openWindow = w + if not frame.Visible then + Audio.play("open") + end frame.Visible = true scale.Scale = 0.85 TweenService:Create(scale, TweenInfo.new(0.25, Enum.EasingStyle.Back, Enum.EasingDirection.Out), { Scale = 1 }):Play() @@ -2755449,11 +2755489,19 @@ local function itemRow(parent, order, o) end local function progressBar(parent, pos, size, frac, color) - local back = new("Frame", { Size = size, Position = pos, BackgroundColor3 = Color3.fromRGB(14, 18, 30), Parent = parent }, { corner(7) }) + local back = new("Frame", { Size = size, Position = pos, BackgroundColor3 = C.dark, Parent = parent }, { corner(7) }) new("Frame", { Size = UDim2.fromScale(math.clamp(frac, 0, 1), 1), BackgroundColor3 = color, Parent = back }, { corner(7) }) return back end +-- помощники интерфейса для других скриптов (GuildClient): тот же стиль окон, кнопок и уведомлений +Theme.kit = { + new = new, text = text, btn = btn, corner = corner, stroke = stroke, gradient = gradient, clear = clear, + makeWindow = makeWindow, scrollArea = scrollArea, itemRow = itemRow, progressBar = progressBar, + sideButton = sideButton, notify = notify, popIn = popIn, fmt = fmt, timeStr = timeStr, + screen = screen, hud = hud, TITLE = TITLE, BODY = BODY, BODY2 = BODY2, +} + ---------------------------------------------------------------- данные с сервера local inventory, discovered, claimed = {}, {}, {} @@ -2755481,7 +2755529,7 @@ local function buyButton(price, level, myLevel, coins) if myLevel < level then return "🔒 Ур. " .. level, C.grey, false end - return "💰 " .. fmt(price), coins >= price and C.green or Color3.fromRGB(150, 95, 60), true + return "⚪ " .. fmt(price), coins >= price and C.green or Color3.fromRGB(150, 95, 60), true end shopWin.render = function(tab) @@ -2755508,7 +2755556,7 @@ shopWin.render = function(tab) bText, bColor, active = buyButton(rod.price, rod.level, myLevel, coins) end itemRow(list, i, { - model = Models.buildRod(rod.id, lv, true), dir = ROD_VIEW, zoom = 0.6, + model = Models.buildRod(rod.id, lv, true), dir = VIEW.rod, zoom = 0.6, title = rod.name .. (owned[rod.id] and (" " .. stars(lv) .. "") or ""), lines = statLine(Config.RodStats(rod.id, lv)) .. "\n" .. (owned[rod.id] and "Куплена" or ("Нужен уровень " .. rod.level)), strokeColor = equipped and C.gold or nil, @@ -2755543,7 +2755591,7 @@ shopWin.render = function(tab) end local cost = Config.UpgradeCost(rod, lv) itemRow(list, order, { - model = Models.buildRod(rod.id, lv, true), dir = ROD_VIEW, zoom = 0.6, + model = Models.buildRod(rod.id, lv, true), dir = VIEW.rod, zoom = 0.6, title = rod.name .. " " .. stars(lv) .. "", lines = lines, strokeColor = player:GetAttribute("Rod") == rod.id and C.gold or nil, @@ -2755570,7 +2755618,7 @@ shopWin.render = function(tab) bText, bColor, active = buyButton(bag.price, bag.level, myLevel, coins) end itemRow(list, i, { - model = Models.buildBag(bag.id, true), dir = BAG_VIEW, zoom = 0.8, + model = Models.buildBag(bag.id, true), dir = VIEW.bag, zoom = 0.8, title = bag.name, lines = ("🎒 Вмещает %d рыб%s\n%s"):format(bag.capacity + bonus, bonus > 0 and " (с пропуском)" or "", owned[bag.id] and "Куплена" or ("Нужен уровень " .. bag.level)), strokeColor = equipped and C.gold or nil, @@ -2755593,7 +2755641,7 @@ shopWin.render = function(tab) table.insert(mutLine, ("%s %.1f%%"):format(hex(m.color), m.name, math.min(100, m.chance * total / 100 * ((event and event.mutation) or 1) * 100))) end local lines = { - ("🍀 Твоя удача: %d%%"):format(total), + ("🍀 Твоя удача: %d%%"):format(total), ("Базовая 100%% · 🎣 Удочка +%d%% · ✨ Улучшения +%d%%"):format(math.floor(rod.luck * 100 + 0.5), math.floor(lv * Config.RodUpgrade.luckPerLevel * 100 + 0.5)), ("⭐ Уровень +%d%% · 🏆 Мастерство миров +%d%%"):format(math.floor(((player:GetAttribute("Level") or 1) - 1) * Config.LuckPerPlayerLevel * 100 + 0.5), math.floor((player:GetAttribute("Mastery") or 0) * Config.MasteryLuck * 100 + 0.5)), ("🧪 Зелье +%d%%%s · 👑 Пропуска +%d%%%s"):format(math.floor(boost * 100 + 0.5), boost > 0 and (" (" .. timeStr(player:GetAttribute("BoostLeft") or 0) .. ")") or "", @@ -2755627,7 +2755675,7 @@ local bagWin = makeWindow("🎒 Сумка", Color3.fromRGB(60, 140, 220), { local fishHeader = new("Frame", { Size = UDim2.new(1, 0, 0, 50), BackgroundColor3 = WHITE, Parent = bagWin.pages.fish }, { corner(12), gradient(C.panel2, C.panel, 90) }) local fishSummary = text({ Size = UDim2.new(1, -200, 1, 0), Position = UDim2.fromOffset(14, 0), Font = TITLE, TextSize = 19, RichText = true, Text = "", Parent = fishHeader }) -btn({ Size = UDim2.fromOffset(170, 38), AnchorPoint = Vector2.new(1, 0.5), Position = UDim2.new(1, -8, 0.5, 0), BackgroundColor3 = C.green, Text = "💰 Продать всё", TextSize = 18, Parent = fishHeader }, function() +btn({ Size = UDim2.fromOffset(170, 38), AnchorPoint = Vector2.new(1, 0.5), Position = UDim2.new(1, -8, 0.5, 0), BackgroundColor3 = C.green, Text = "⚪ Продать всё", TextSize = 18, Parent = fishHeader }, function() remote:FireServer("SellAll") end) local fishGrid = scrollArea(bagWin.pages.fish, UDim2.fromOffset(132, 176), 60) @@ -2755639,8 +2755687,13 @@ local dexList = scrollArea(bagWin.pages.dex, nil, 46) local dexTabButtons = {} local function fishCard(parent, order, rarityColor, strokeColor) - return new("Frame", { BackgroundColor3 = WHITE, LayoutOrder = order, Parent = parent }, - { corner(14), stroke(strokeColor or rarityColor, 2.5, 0.05), gradient(rarityColor:Lerp(C.bg, 0.55), C.panel, 90) }) + -- тёмное дерево; редкость — цветная полоса сверху и камень в углу, мутация — цвет рамки + local card = new("Frame", { BackgroundColor3 = WHITE, LayoutOrder = order, Parent = parent }, + { corner(8), stroke(strokeColor or C.goldDark, strokeColor and 2.5 or 2, 0), gradient(rarityColor:Lerp(C.woodDark, 0.78), C.woodDark, 90) }) + new("Frame", { Size = UDim2.new(1, -16, 0, 4), AnchorPoint = Vector2.new(0.5, 0), Position = UDim2.new(0.5, 0, 0, 3), BackgroundColor3 = rarityColor, BorderSizePixel = 0, Parent = card }, { corner(2) }) + new("Frame", { Size = UDim2.fromOffset(12, 12), AnchorPoint = Vector2.new(0.5, 0.5), Position = UDim2.new(1, -11, 0, 13), Rotation = 45, BackgroundColor3 = rarityColor, ZIndex = 5, Parent = card }, + { stroke(C.ink, 1.5), gradient(WHITE, Color3.fromRGB(150, 150, 150), 90) }) + return card end local function rewardButton(parent, state, label, onClick) @@ -2755670,7 +2755723,7 @@ local function renderDex() { corner(12), stroke(C.gold, 2, 0.3), gradient(Color3.fromRGB(70, 55, 20), C.panel, 90) }) text({ Size = UDim2.new(1, -180, 1, 0), Position = UDim2.fromOffset(14, 0), Font = TITLE, TextSize = 17, RichText = true, TextWrapped = true, - Text = ("%s %s — %d / %d\nСобери всех: +%s 💰 и +%d%% удачи навсегда"):format( + Text = ("%s %s — %d / %d\nСобери всех: +%s ⚪ и +%d%% удачи навсегда"):format( world.icon, world.name, found, #all, fmt(Config.MasteryCoins * world.mult), math.floor(Config.MasteryLuck * 100 + 0.5)), Parent = head, }) @@ -2755702,7 +2755755,7 @@ local function renderDex() local reward = Config.CollectionRewards[rarity] text({ Size = UDim2.new(1, -180, 1, 0), Position = UDim2.fromOffset(12, 0), Font = TITLE, TextSize = 17, RichText = true, - Text = ("%s %d/%d +%s 💰 +%s XP"):format( + Text = ("%s %d/%d +%s ⚪ +%s XP"):format( hex(r.color), r.name, have, #group, fmt(reward.coins * world.mult), fmt(reward.xp * world.mult)), Parent = hdr, }) @@ -2755718,7 +2755771,7 @@ local function renderDex() local card = fishCard(grid, i, rec and r.color or C.grey) local view = new("Frame", { Size = UDim2.new(1, -12, 0, 76), Position = UDim2.fromOffset(6, 6), BackgroundTransparency = 1, Parent = card }) local model = Models.buildFish(f.id, nil, 1, true) - viewport(view, rec and model or silhouette(model), FISH_VIEW, 0.72) + viewport(view, rec and model or silhouette(model), VIEW.fish, 0.72) text({ Size = UDim2.new(1, -10, 0, 20), Position = UDim2.fromOffset(6, 84), Font = TITLE, TextSize = 15, TextColor3 = rec and r.color or C.muted, Text = rec and f.name or "???", TextTruncate = Enum.TextTruncate.AtEnd, Parent = card }) text({ Size = UDim2.new(1, -10, 0, 40), Position = UDim2.fromOffset(6, 104), Font = BODY2, TextSize = 12, TextColor3 = C.muted, TextWrapped = true, @@ -2755746,7 +2755799,7 @@ bagWin.render = function(tab) for _, it in ipairs(inventory) do total += it.value end - fishSummary.Text = ("🐟 %d / %d · 💰 ≈%s"):format(#inventory, player:GetAttribute("BagCap") or 0, fmt(player:GetAttribute("BagValue") or total)) + fishSummary.Text = ("🐟 %d / %d · ⚪ ≈%s"):format(#inventory, player:GetAttribute("BagCap") or 0, fmt(player:GetAttribute("BagValue") or total)) if #inventory == 0 then text({ Size = UDim2.fromOffset(400, 60), Font = TITLE, TextSize = 20, TextColor3 = C.muted, TextWrapped = true, Text = "Сумка пуста. Иди к воде и поймай рыбу! 🎣", Parent = fishGrid }) return @@ -2755760,7 +2755813,7 @@ bagWin.render = function(tab) local mut = it.mutation and Config.Find(Config.Mutations, it.mutation) local card = fishCard(fishGrid, i, r.color, mut and mut.color) local view = new("Frame", { Size = UDim2.new(1, -12, 0, 84), Position = UDim2.fromOffset(6, 6), BackgroundTransparency = 1, Parent = card }) - viewport(view, Models.buildFish(it.id, it.mutation, 1, true), FISH_VIEW, 0.72) + viewport(view, Models.buildFish(it.id, it.mutation, 1, true), VIEW.fish, 0.72) if mut then local tag = new("Frame", { Size = UDim2.fromOffset(0, 20), AutomaticSize = Enum.AutomaticSize.X, Position = UDim2.fromOffset(6, 6), BackgroundColor3 = mut.color, ZIndex = 3, Parent = card }, { corner(6), new("UIPadding", { PaddingLeft = UDim.new(0, 6), PaddingRight = UDim.new(0, 6) }) }) @@ -2755768,7 +2755821,7 @@ bagWin.render = function(tab) end text({ Size = UDim2.new(1, -10, 0, 20), Position = UDim2.fromOffset(6, 92), Font = TITLE, TextSize = 16, TextColor3 = r.color, Text = it.name, TextTruncate = Enum.TextTruncate.AtEnd, Parent = card }) text({ Size = UDim2.new(1, -10, 0, 16), Position = UDim2.fromOffset(6, 112), Font = BODY2, TextSize = 13, TextColor3 = C.muted, Text = ("%.2f кг · %s"):format(it.weight, r.name), Parent = card }) - btn({ Size = UDim2.new(1, -12, 0, 32), Position = UDim2.fromOffset(6, 136), BackgroundColor3 = C.green, Text = "💰 " .. fmt(it.value), TextSize = 17, Parent = card }, function() + btn({ Size = UDim2.new(1, -12, 0, 32), Position = UDim2.fromOffset(6, 136), BackgroundColor3 = C.green, Text = "⚪ " .. fmt(it.value), TextSize = 17, Parent = card }, function() remote:FireServer("SellOne", it.uid) end) end @@ -2755817,6 +2755870,8 @@ worldsWin.render = function() bText, bColor, active = "Скоро…", C.grey, false elseif myLevel < w.level then bText, bColor, active = "🔒 Ур. " .. w.level, C.grey, false + elseif (Config.Guild.worldRank[w.id] or 1) > (player:GetAttribute("RankIdx") or 1) then + bText, bColor, active = "🔒 Ранг " .. Config.Guild.ranks[Config.Guild.worldRank[w.id]].id, C.grey, false elseif here and here.id == w.id then bText, bColor, active = "Вы здесь", C.grey, false else @@ -2755825,7 +2755880,8 @@ worldsWin.render = function() itemRow(worldsList, i, { icon = w.icon, iconBg = w.color:Lerp(C.bg, 0.6), title = w.name, titleColor = w.color, - lines = w.desc .. "\n" .. (w.soon and "В разработке" or ("Уровень: %d · Рыб поймано: %d / %d · Награды x%d"):format(w.level, found, total, w.mult)), + lines = w.desc .. "\n" .. (w.soon and "В разработке" or ("Уровень: %d%s · Рыб поймано: %d / %d · Награды x%d"):format(w.level, + Config.Guild.worldRank[w.id] and (", ранг " .. Config.Guild.ranks[Config.Guild.worldRank[w.id]].id) or "", found, total, w.mult)), strokeColor = (here and here.id == w.id) and C.gold or nil, buttonText = bText, buttonColor = bColor, active = active, onClick = function() @@ -2755866,7 +2755922,7 @@ questWin.render = function(tab) end text({ Size = UDim2.new(1, -4, 0, 30), LayoutOrder = 0, Font = TITLE, TextSize = 22, RichText = true, - Text = ("%s круг %d · награда сразу, следующее задание — тоже"):format(chain.name, chain.round), Parent = questList, + Text = ("%s круг %d · награда сразу, следующее задание — тоже"):format(chain.name, chain.round), Parent = questList, }) for i, st in ipairs(chain.steps) do local done, cur = i < chain.step, i == chain.step @@ -2755879,7 +2755935,7 @@ questWin.render = function(tab) }) text({ Size = UDim2.fromOffset(180, 28), AnchorPoint = Vector2.new(1, 0), Position = UDim2.new(1, -14, 0, cur and 8 or 14), Font = TITLE, TextSize = 17, - TextXAlignment = Enum.TextXAlignment.Right, TextColor3 = done and C.muted or C.gold, Text = ("+%s 💰 +%s XP"):format(fmt(st.coins), fmt(st.xp)), Parent = row, + TextXAlignment = Enum.TextXAlignment.Right, TextColor3 = done and C.muted or C.gold, Text = ("+%s ⚪ +%s XP"):format(fmt(st.coins), fmt(st.xp)), Parent = row, }) if cur then progressBar(row, UDim2.fromOffset(16, 44), UDim2.new(1, -110, 0, 16), chain.progress / st.goal, C.gold) @@ -2755892,7 +2755948,7 @@ questWin.render = function(tab) { corner(14), stroke(C.purple, 2, 0.2), gradient(Color3.fromRGB(70, 40, 100), C.panel, 90) }) text({ Size = UDim2.new(1, -32, 1, 0), Position = UDim2.fromOffset(16, 0), Font = TITLE, TextSize = 18, RichText = true, - Text = ("🎁 За всю цепочку: +%s 💰 +%s XP%s"):format(fmt(b.coins), fmt(b.xp), b.potion and (" + " .. b.potion) or ""), Parent = row, + Text = ("🎁 За всю цепочку: +%s ⚪ +%s XP%s"):format(fmt(b.coins), fmt(b.xp), b.potion and (" + " .. b.potion) or ""), Parent = row, }) elseif tab == "daily" then clear(dailyPage) @@ -2755909,10 +2755965,10 @@ questWin.render = function(tab) local cell = new("Frame", { BackgroundColor3 = WHITE, Parent = row }, { corner(12), stroke(isNext and C.gold or C.line, isNext and 3 or 2, isNext and 0 or 0.4), gradient(isNext and Color3.fromRGB(90, 70, 20) or C.panel2, C.panel, 90) }) text({ Size = UDim2.new(1, 0, 0, 24), Position = UDim2.fromOffset(0, 6), Font = TITLE, TextSize = 15, TextXAlignment = Enum.TextXAlignment.Center, Text = "День " .. d, Parent = cell }) - text({ Size = UDim2.new(1, 0, 0, 44), Position = UDim2.fromOffset(0, 32), TextSize = 32, TextXAlignment = Enum.TextXAlignment.Center, Text = passed and "✅" or (r.potion and "🧪" or "💰"), Parent = cell }) + text({ Size = UDim2.new(1, 0, 0, 44), Position = UDim2.fromOffset(0, 32), TextSize = 32, TextXAlignment = Enum.TextXAlignment.Center, Text = passed and "✅" or (r.potion and "🧪" or "⚪"), Parent = cell }) text({ Size = UDim2.new(1, -6, 0, 50), Position = UDim2.fromOffset(3, 80), Font = BODY2, TextSize = 12, TextXAlignment = Enum.TextXAlignment.Center, TextWrapped = true, TextColor3 = C.gold, - Text = fmt(r.coins * (1 + (myLevel - 1) * 0.2)) .. " 💰" .. (r.potion and "\n+ зелье" or ""), Parent = cell, + Text = fmt(r.coins * (1 + (myLevel - 1) * 0.2)) .. " ⚪" .. (r.potion and "\n+ зелье" or ""), Parent = cell, }) end btn({ @@ -2755929,7 +2755985,7 @@ end local robuxWin = makeWindow("💎 Премиум", Color3.fromRGB(150, 80, 210), { { id = "passes", label = "👑 Пропуска" }, - { id = "products", label = "🪙 Наборы" }, + { id = "products", label = "⚪ Наборы" }, }) local robuxLists = { passes = scrollArea(robuxWin.pages.passes), products = scrollArea(robuxWin.pages.products) } @@ -2755951,16 +2756007,57 @@ robuxWin.render = function(tab) notify("⚙ Товар не настроен", Color3.fromRGB(255, 200, 120)) return end - if tab == "passes" then - MarketplaceService:PromptGamePassPurchase(player, it.id) - else - MarketplaceService:PromptProductPurchase(player, it.id) - end + -- и наборы, и пропуска — Developer Products; пропуск сервер запоминает навсегда + MarketplaceService:PromptProductPurchase(player, it.id) end, }) end end +---------------------------------------------------------------- настройки звука + +local settingsWin = makeWindow("⚙ Настройки", Color3.fromRGB(150, 120, 80), { { id = "sound", label = "Звук" } }) +local settingsPage = settingsWin.pages.sound +local volumes = { + music = player:GetAttribute("VolMusic") or Config.DefaultVolume.music, + sfx = player:GetAttribute("VolSfx") or Config.DefaultVolume.sfx, +} + +local function setVolume(key, value) + volumes[key] = math.clamp(math.floor(value * 10 + 0.5) / 10, 0, 1) + -- сразу у себя (слышно без задержки), сервер сохранит и подтвердит + player:SetAttribute(key == "music" and "VolMusic" or "VolSfx", volumes[key]) + remote:FireServer("Settings", volumes.music, volumes.sfx) + settingsWin.refresh() +end + +settingsWin.render = function() + clear(settingsPage) + for i, row in ipairs({ { "music", "🎵 Музыка" }, { "sfx", "🔊 Звуки и окружение" } }) do + local key, label = row[1], row[2] + local f = new("Frame", { Size = UDim2.new(1, -4, 0, 70), Position = UDim2.fromOffset(0, (i - 1) * 82), BackgroundColor3 = WHITE, Parent = settingsPage }, + { corner(14), stroke(C.line, 2, 0.45), gradient(C.panel2, C.panel, 90) }) + text({ Size = UDim2.new(1, -260, 1, 0), Position = UDim2.fromOffset(18, 0), Font = TITLE, TextSize = 21, Text = label, Parent = f }) + btn({ Size = UDim2.fromOffset(52, 46), AnchorPoint = Vector2.new(1, 0.5), Position = UDim2.new(1, -170, 0.5, 0), BackgroundColor3 = C.grey, Text = "−", TextSize = 26, Parent = f }, function() + setVolume(key, volumes[key] - 0.1) + end) + text({ Size = UDim2.fromOffset(90, 46), AnchorPoint = Vector2.new(1, 0.5), Position = UDim2.new(1, -74, 0.5, 0), Font = TITLE, TextSize = 22, + TextXAlignment = Enum.TextXAlignment.Center, TextColor3 = C.gold, Text = math.floor(volumes[key] * 100 + 0.5) .. "%", Parent = f }) + btn({ Size = UDim2.fromOffset(52, 46), AnchorPoint = Vector2.new(1, 0.5), Position = UDim2.new(1, -14, 0.5, 0), BackgroundColor3 = C.green, Text = "+", TextSize = 26, Parent = f }, function() + setVolume(key, volumes[key] + 0.1) + end) + end +end +-- сервер прислал сохранённую громкость +player:GetAttributeChangedSignal("VolMusic"):Connect(function() + volumes.music = player:GetAttribute("VolMusic") or volumes.music + settingsWin.refresh() +end) +player:GetAttributeChangedSignal("VolSfx"):Connect(function() + volumes.sfx = player:GetAttribute("VolSfx") or volumes.sfx + settingsWin.refresh() +end) + ---------------------------------------------------------------- боковые кнопки sideButton(1, "🎒", "Сумка", "B", Color3.fromRGB(60, 140, 220), function() @@ -2755978,6 +2756075,38 @@ end) sideButton(5, "💎", "Донат", nil, Color3.fromRGB(150, 80, 210), function() robuxWin.toggle() end) +sideButton(6, "⚙", "Звук", nil, Color3.fromRGB(150, 120, 80), function() + settingsWin.toggle() +end) + +-- раскладка: компьютер — как раньше; телефон — HUD и кнопки компактнее, кнопки сеткой 3×N под HUD +-- (левый низ свободен под джойстик, правый низ — под кнопку прыжка) +do + local function scaleOf(obj) + local sc = obj:FindFirstChild("LayoutScale") or new("UIScale", { Name = "LayoutScale", Parent = obj }) + return sc + end + local grid = side:FindFirstChildOfClass("UIGridLayout") + Theme.onLayout(function(compact) + scaleOf(hud.Parent).Scale = compact and 0.82 or 1 + hud.Parent.Position = compact and UDim2.fromOffset(8, 6) or UDim2.fromOffset(12, 10) + grid.CellSize = compact and UDim2.fromOffset(52, 52) or UDim2.fromOffset(62, 62) + grid.CellPadding = compact and UDim2.fromOffset(6, 6) or UDim2.fromOffset(6, 6) + grid.FillDirectionMaxCells = compact and 3 or 1 + side.AnchorPoint = Vector2.zero + -- под HUD (он выше на строку гильдии — её добавляет GuildClient) + side.Position = compact and UDim2.fromOffset(8, 172) or UDim2.fromOffset(12, 216) + side.Size = compact and UDim2.fromOffset(170, 240) or UDim2.fromOffset(70, 480) + toasts.Size = compact and UDim2.fromOffset(640, 200) or UDim2.fromOffset(900, 200) + toasts.Position = compact and UDim2.new(0.5, 0, 0, 66) or UDim2.new(0.5, 0, 0, 84) + scaleOf(toasts).Scale = compact and 0.75 or 1 + scaleOf(catchCard).Scale = compact and 0.8 or 1 + scaleOf(mgFrame).Scale = compact and 0.85 or 1 + mgFrame.Position = compact and UDim2.new(0.5, 0, 1, -60) or UDim2.new(0.5, 0, 1, -100) + scaleOf(eventBanner).Scale = compact and 0.8 or 1 + statusLabel:FindFirstChildOfClass("TextLabel").TextSize = compact and 28 or 36 + end) +end local function refreshDots() -- задания цепочки награждаются сами, точка — только для ежедневной награды @@ -2756010,18 +2756139,18 @@ end local function refreshHud() local xp = player:GetAttribute("XP") or 0 local need = player:GetAttribute("XPNeed") or 100 - coinsText.Text = "💰 " .. fmt(player:GetAttribute("Coins") or 0) - lvlText.Text = tostring(player:GetAttribute("Level") or 1) - xpText.Text = ("%d / %d XP"):format(xp, need) - TweenService:Create(xpFill, TweenInfo.new(0.3), { Size = UDim2.fromScale(math.clamp(xp / need, 0, 1), 1) }):Play() + H.coins.Text = "⚪ " .. fmt(player:GetAttribute("Coins") or 0) + H.lvl.Text = tostring(player:GetAttribute("Level") or 1) + H.xpText.Text = ("%d / %d XP"):format(xp, need) + TweenService:Create(H.xpFill, TweenInfo.new(0.3), { Size = UDim2.fromScale(math.clamp(xp / need, 0, 1), 1) }):Play() local boost = player:GetAttribute("BoostBonus") or 0 - luckText.Text = ("🍀 Удача %d%%%s"):format(player:GetAttribute("Luck") or 100, + H.luck.Text = ("🍀 Удача %d%%%s"):format(player:GetAttribute("Luck") or 100, boost > 0 and (" 🧪 +%d%% %s"):format(boost * 100, timeStr(player:GetAttribute("BoostLeft") or 0)) or "") local count, cap = player:GetAttribute("BagCount") or 0, player:GetAttribute("BagCap") or 10 - bagText.Text = ("🎒 %d / %d · ≈ %s 💰"):format(count, cap, fmt(player:GetAttribute("BagValue") or 0)) - bagText.TextColor3 = count >= cap and Color3.fromRGB(255, 120, 120) or C.text + H.bag.Text = ("🎒 %d / %d · ≈ %s ⚪"):format(count, cap, fmt(player:GetAttribute("BagValue") or 0)) + H.bag.TextColor3 = count >= cap and Color3.fromRGB(255, 120, 120) or C.text local rod = Config.Find(Config.Rods, player:GetAttribute("Rod") or "Basic") - rodText.Text = ("🎣 %s %s"):format(rod and rod.name or "", stars(player:GetAttribute("RodLevel") or 0)) + H.rod.Text = ("🎣 %s %s"):format(rod and rod.name or "", stars(player:GetAttribute("RodLevel") or 0)) end local pending = false @@ -2756124,7 +2756253,7 @@ end local GAUGE_R, GAUGE_DEG, GAUGE_N = 190, 110, 32 local gauge = new("Frame", { Size = UDim2.fromOffset(150, 280), AnchorPoint = Vector2.new(0, 0.5), Position = UDim2.new(0.57, 0, 0.48, 0), - BackgroundTransparency = 1, Visible = false, Parent = gui, + BackgroundTransparency = 1, Visible = false, Parent = screen, }) local GAUGE_C = Vector2.new(110 - GAUGE_R, 140) -- центр окружности левее рамки: дуга выгнута вправо local function arcPoint(v, r) @@ -2756309,6 +2756438,7 @@ local function setState(s) charge = nil end state = s + Audio.fade(reelSound, s == "bite" and 1 or 0, s == "bite" and 0.2 or 0.4) statusLabel.Visible = (s == "waiting") mgFrame.Visible = (s == "bite") gauge.Visible = (s == "charging") @@ -2756327,12 +2756457,12 @@ local function setState(s) end end local function updatePips() - pipsText.Text = "🎯 " .. string.rep("●", mg.hits) .. string.rep("●", mg.need - mg.hits) - missText.Text = string.rep("✖", mg.misses) .. string.rep("❤️", mg.maxMisses - mg.misses) + pipsText.Text = "🎯 " .. string.rep("●", mg.hits) .. string.rep("●", mg.need - mg.hits) + missText.Text = string.rep("✖", mg.misses) .. string.rep("❤️", mg.maxMisses - mg.misses) end local function flash(color) bar.BackgroundColor3 = color - TweenService:Create(bar, TweenInfo.new(0.35), { BackgroundColor3 = Color3.fromRGB(22, 28, 46) }):Play() + TweenService:Create(bar, TweenInfo.new(0.35), { BackgroundColor3 = C.dark }):Play() end local function placeZone() mg.zoneStart = math.random() * (1 - mg.zoneWidth) @@ -2756541,6 +2756671,17 @@ local function setLook(obj, goal, instant) end end +-- погода сгущает дымку поверх настроек локации (туман — сильно, дождь и гроза — слегка) +local WEATHER_ATMO = { + Fog = { Density = 0.22, Haze = 1.5 }, + Rain = { Density = 0.06, Haze = 0.4 }, + Storm = { Density = 0.12, Haze = 0.8 }, +} +local function weatherAtmo(prop) + local add = WEATHER_ATMO[workspace:GetAttribute("Weather") or ""] + return (add and add[prop]) or 0 +end + local function applyLook(world, instant) -- исходные значения запоминаем до первой правки; эффект мог ещё не прийти с сервера, тогда в следующий раз for _, w in ipairs(lookSources) do @@ -2756564,6 +2756705,9 @@ local function applyLook(world, instant) for prop, def in pairs(defaults) do local v = look[section] and look[section][prop] if v == nil then v = def end + if section == "atmosphere" and typeof(v) == "number" then + v += weatherAtmo(prop) + end -- плавно меняются только числа и цвета; флаги и режимы (EnumItem) ставим сразу local kind = typeof(v) if kind == "number" or kind == "Color3" then goal[prop] = v else obj[prop] = v end @@ -2756580,8 +2756724,10 @@ local function applyAmbience(world, instant) end table.clear(lookTweens) world = world or Config.Lobby - local clock = (world and world.clock) or 14.5 - setLook(Lighting, { ClockTime = clock }, instant) + -- при смене суток часы двигает Ambience; иначе у каждой локации своё время + if not Config.DayNight.enabled then + setLook(Lighting, { ClockTime = (world and world.clock) or 14.5 }, instant) + end local cc = Lighting:FindFirstChildOfClass("ColorCorrectionEffect") if cc then setLook(cc, { TintColor = (world and world.tint) or DEFAULT_LOOK.tint }, instant) @@ -2756685,6 +2756831,25 @@ local function enterWorld(w, instant) end end +-- погода сменилась: плавно пересчитываем дымку текущей локации +workspace:GetAttributeChangedSignal("Weather"):Connect(function() + if lastWorldId ~= "none" and not loadingVisible() then + applyAmbience(currentWorld(), false) + end +end) + +-- новый уровень — арфа +do + local lastLevel = player:GetAttribute("Level") + player:GetAttributeChangedSignal("Level"):Connect(function() + local lv = player:GetAttribute("Level") + if lastLevel and lv and lv > lastLevel then + Audio.play("levelUp") + end + lastLevel = lv + end) +end + -- первое появление: ждём персонажа, ставим свет его локации сразу и отпускаем экран загрузки task.spawn(function() local char = player.Character or player.CharacterAdded:Wait() @@ -2756762,10 +2756927,13 @@ local guideStep = 0 -- шаг, отправленный на сервер (ат -- крупная мультяшная подсказка под уведомлениями: покачивается, при смене шага «выпрыгивает» local guideHint, guideHintText = softPlate( - { Size = UDim2.fromOffset(0, 70), AutomaticSize = Enum.AutomaticSize.X, AnchorPoint = Vector2.new(0.5, 0), Position = UDim2.new(0.5, 0, 0, 10), Visible = false, Parent = gui }, + { Size = UDim2.fromOffset(0, 70), AutomaticSize = Enum.AutomaticSize.X, AnchorPoint = Vector2.new(0.5, 0), Position = UDim2.new(0.5, 0, 0, 10), Visible = false, Parent = screen }, { TextSize = 42, Text = "" } ) wobble(guideHint, 1.2, 1.6) +Theme.onLayout(function(compact) + guideHintText.TextSize = compact and 30 or 42 +end) local lastHint = nil local guideFolder = new("Folder", { Name = "TutorialGuide", Parent = workspace }) @@ -2756966,7 +2757134,7 @@ local function guideRoute(step, pos, world) elseif step == 2 and inW1 then return { guideMarker("GuideFishSpot") }, "🎣 Зажми ЛКМ у воды", "Pier" elseif step == 3 and inW1 then - return { sellTargetW1() }, "💰 Продай рыбу", "Sell" -- лавка у самого причала, идём напрямую + return { sellTargetW1() }, "⚪ Продай рыбу", "Sell" -- лавка у самого причала, идём напрямую end return nil end @@ -2757131,11 +2757299,11 @@ local FIRE = Color3.fromRGB(255, 150, 60) -- серия улова — справа от HUD; полоска показывает, сколько осталось до того, как серия сгорит local comboBox = new("Frame", { - Size = UDim2.fromOffset(140, 66), Position = UDim2.fromOffset(310, 10), BackgroundColor3 = WHITE, Visible = false, Parent = gui, + Size = UDim2.fromOffset(140, 66), Position = UDim2.fromOffset(310, 10), BackgroundColor3 = WHITE, Visible = false, Parent = screen, }, { corner(14), stroke(FIRE, 2, 0.1), gradient(Color3.fromRGB(110, 50, 20), C.bg, 90) }) local comboMultText = text({ Size = UDim2.new(1, 0, 0, 34), Position = UDim2.fromOffset(0, 3), Font = TITLE, TextSize = 28, TextXAlignment = CENTER, TextColor3 = Color3.fromRGB(255, 195, 95), TextStrokeTransparency = 0.5, Text = "", Parent = comboBox }) local comboSub = text({ Size = UDim2.new(1, 0, 0, 16), Position = UDim2.fromOffset(0, 36), Font = BODY2, TextSize = 12, TextXAlignment = CENTER, TextColor3 = C.muted, Text = "", Parent = comboBox }) -local comboBack = new("Frame", { Size = UDim2.new(1, -20, 0, 5), Position = UDim2.new(0, 10, 1, -10), BackgroundColor3 = Color3.fromRGB(14, 18, 30), Parent = comboBox }, { corner(3) }) +local comboBack = new("Frame", { Size = UDim2.new(1, -20, 0, 5), Position = UDim2.new(0, 10, 1, -10), BackgroundColor3 = C.dark, Parent = comboBox }, { corner(3) }) local comboFill = new("Frame", { Size = UDim2.fromScale(1, 1), BackgroundColor3 = FIRE, BorderSizePixel = 0, Parent = comboBack }, { corner(3) }) local function refreshCombo(pop) @@ -2757158,14 +2757326,23 @@ refreshCombo(false) -- правая колонка: босс и цели local rightCol = new("Frame", { Size = UDim2.fromOffset(300, 0), AutomaticSize = Enum.AutomaticSize.Y, AnchorPoint = Vector2.new(1, 0.5), Position = UDim2.new(1, -12, 0.5, 10), - BackgroundTransparency = 1, Parent = gui, + BackgroundTransparency = 1, Parent = screen, }, { new("UIListLayout", { Padding = UDim.new(0, 8), SortOrder = Enum.SortOrder.LayoutOrder }) }) +-- на телефоне колонка выше и мельче, чтобы не заходить на кнопку прыжка; серия — правее компактного HUD +local rightScale = new("UIScale", { Parent = rightCol }) +Theme.onLayout(function(compact) + rightScale.Scale = compact and 0.8 or 1 + rightCol.AnchorPoint = compact and Vector2.new(1, 0) or Vector2.new(1, 0.5) + rightCol.Position = compact and UDim2.new(1, -8, 0, 128) or UDim2.new(1, -12, 0.5, 10) + comboBox.Position = compact and UDim2.fromOffset(254, 6) or UDim2.fromOffset(310, 10) +end) + local bossBox = new("Frame", { Size = UDim2.fromOffset(300, 78), BackgroundColor3 = WHITE, Visible = false, LayoutOrder = 1, Parent = rightCol }, { corner(14), stroke(C.red, 2.5, 0.05), gradient(Color3.fromRGB(110, 30, 40), C.bg, 90) }) local bossTitle = text({ Size = UDim2.new(1, -80, 0, 24), Position = UDim2.fromOffset(12, 5), Font = TITLE, TextSize = 18, TextColor3 = Color3.fromRGB(255, 205, 120), TextTruncate = Enum.TextTruncate.AtEnd, Text = "", Parent = bossBox }) local bossTime = text({ Size = UDim2.fromOffset(60, 24), AnchorPoint = Vector2.new(1, 0), Position = UDim2.new(1, -12, 0, 5), Font = TITLE, TextSize = 17, TextXAlignment = RIGHT, Text = "", Parent = bossBox }) -local bossBack = new("Frame", { Size = UDim2.new(1, -24, 0, 18), Position = UDim2.fromOffset(12, 32), BackgroundColor3 = Color3.fromRGB(14, 18, 30), Parent = bossBox }, { corner(9) }) +local bossBack = new("Frame", { Size = UDim2.new(1, -24, 0, 18), Position = UDim2.fromOffset(12, 32), BackgroundColor3 = C.dark, Parent = bossBox }, { corner(9) }) local bossFill = new("Frame", { Size = UDim2.fromScale(1, 1), BackgroundColor3 = WHITE, Parent = bossBack }, { corner(9), gradient(Color3.fromRGB(255, 120, 90), Color3.fromRGB(190, 30, 50), 0) }) local bossHpText = text({ Size = UDim2.fromScale(1, 1), TextSize = 12, TextXAlignment = CENTER, ZIndex = 2, TextStrokeTransparency = 0.5, Text = "", Parent = bossBack }) local bossHint = text({ Size = UDim2.new(1, -24, 0, 18), Position = UDim2.fromOffset(12, 54), Font = BODY2, TextSize = 12, TextColor3 = C.muted, Text = "", Parent = bossBox }) @@ -2757180,7 +2757357,7 @@ text({ Size = UDim2.new(1, 0, 0, 20), LayoutOrder = 0, Font = TITLE, TextSize = local function trackerLine(order, onClick) local root = new("TextButton", { Size = UDim2.new(1, 0, 0, 38), BackgroundTransparency = 1, AutoButtonColor = false, Text = "", LayoutOrder = order, Parent = tracker }) local label = text({ Size = UDim2.new(1, 0, 0, 22), Font = BODY, TextSize = 14, RichText = true, TextTruncate = Enum.TextTruncate.AtEnd, Text = "", Parent = root }) - local back = new("Frame", { Size = UDim2.new(1, 0, 0, 8), Position = UDim2.fromOffset(0, 26), BackgroundColor3 = Color3.fromRGB(14, 18, 30), Parent = root }, { corner(4) }) + local back = new("Frame", { Size = UDim2.new(1, 0, 0, 8), Position = UDim2.fromOffset(0, 26), BackgroundColor3 = C.dark, Parent = root }, { corner(4) }) local fill = new("Frame", { Size = UDim2.fromScale(0, 1), BackgroundColor3 = C.gold, BorderSizePixel = 0, Parent = back }, { corner(4) }) if onClick then root.MouseButton1Click:Connect(onClick) @@ -2757235,7 +2757412,7 @@ local function buyGoal() elseif coins >= r.price then return ("🎣 %s — можно купить!"):format(r.name), 1, C.green end - return ("🎣 До «%s»: ещё %s 💰"):format(r.name, fmt(r.price - coins)), coins / r.price, C.gold + return ("🎣 До «%s»: ещё %s ⚪"):format(r.name, fmt(r.price - coins)), coins / r.price, C.gold end end local rod = Config.Find(Config.Rods, player:GetAttribute("Rod") or "Basic") @@ -2757245,7 +2757422,7 @@ local function buyGoal() if coins >= cost then return ("✨ Улучшение до +%d — можно купить!"):format(rl + 1), 1, C.green end - return ("✨ До улучшения +%d: ещё %s 💰"):format(rl + 1, fmt(cost - coins)), coins / cost, C.gold + return ("✨ До улучшения +%d: ещё %s ⚪"):format(rl + 1, fmt(cost - coins)), coins / cost, C.gold end return nil end @@ -2757389,7 +2757566,7 @@ end) -- у скупщика после продажи: предложение купить то, на что уже хватает local offerCard = new("Frame", { Size = UDim2.fromOffset(440, 96), AnchorPoint = Vector2.new(0.5, 1), Position = UDim2.new(0.5, 0, 1, -110), - BackgroundColor3 = WHITE, Visible = false, Parent = gui, + BackgroundColor3 = WHITE, Visible = false, Parent = screen, }, { corner(16), stroke(C.green, 2.5, 0.05), gradient(Color3.fromRGB(30, 85, 55), C.bg, 90) }) local offerIcon = text({ Size = UDim2.fromOffset(70, 70), Position = UDim2.fromOffset(12, 13), TextSize = 46, TextXAlignment = CENTER, Text = "", Parent = offerCard }) local offerTitle = text({ Size = UDim2.new(1, -250, 0, 26), Position = UDim2.fromOffset(90, 12), Font = TITLE, TextSize = 19, TextTruncate = Enum.TextTruncate.AtEnd, Text = "", Parent = offerCard }) @@ -2757402,11 +2757579,11 @@ end local offerBuy = btn({ Size = UDim2.fromOffset(146, 52), AnchorPoint = Vector2.new(1, 0.5), Position = UDim2.new(1, -14, 0.5, 0), BackgroundColor3 = C.green, TextSize = 18, Text = "", Parent = offerCard }, function() if offerItem then remote:FireServer("Buy", offerItem.kind, offerItem.id) - playUiSound(DING, 0.5) + Audio.play("coins") end hideOffer() end) -btn({ Size = UDim2.fromOffset(26, 26), Position = UDim2.new(1, -18, 0, -8), BackgroundColor3 = C.red, Text = "✕", TextSize = 14, Parent = offerCard }, hideOffer) +btn({ Size = UDim2.fromOffset(26, 26), Position = UDim2.new(1, -18, 0, -8), BackgroundColor3 = C.red, Text = "×", TextSize = 22, Parent = offerCard }, hideOffer) bestOffer = function(bagWasFull) local coins, lvl = player:GetAttribute("Coins") or 0, player:GetAttribute("Level") or 1 @@ -2757458,7 +2757635,7 @@ showOffer = function(o) offerIcon.Text = o.icon offerTitle.Text = o.title offerDesc.Text = o.desc - offerBuy.Text = ("Купить · %s 💰"):format(fmt(o.price)) + offerBuy.Text = ("Купить · %s ⚪"):format(fmt(o.price)) offerCard.Visible = true popIn(offerCard, 0.6) task.delay(9, function() @@ -2757483,9 +2757660,13 @@ remote.OnClientEvent:Connect(function(action, a, b, c, d) elseif action == "TeleportFade" then teleportLoading(a, b) elseif action == "Cast" then + Audio.play("cast") setState("waiting") startCastCam(a, b) elseif action == "CastFail" or action == "Cancel" or action == "Escaped" then + if action == "Escaped" then + Audio.play("escape") + end if action == "CastFail" and castTool and castTool.Parent then castTool.Grip = gripCF(REST_ANGLE) -- сервер удочку не трогал, а у нас она в замахе end @@ -2757502,17 +2757683,24 @@ remote.OnClientEvent:Connect(function(action, a, b, c, d) mg.pos, mg.dir = 0, 1 placeZone() updatePips() + Audio.play("bite") setState("bite") elseif action == "Caught" then setState("idle") showCatch(a, b) - playUiSound(DING, 0.5) + Audio.play("catchSplash") + local r = Config.Rarities[a.rarity] + Audio.play((r and r.rank >= 4) and "fanfare" or "catch") + if a.mutation then + Audio.play("sparkle") + end elseif action == "Sold" then + Audio.play("coins") if tutorialStep() == 3 then advanceTutorial(Config.TutorialDone) end - floatText("+" .. fmt(a) .. " 💰", C.gold) - notify(("💰 +%s"):format(fmt(a)), Color3.fromRGB(120, 255, 140)) + floatText("+" .. fmt(a) .. " ⚪", C.gold) + notify(("⚪ +%s"):format(fmt(a)), Color3.fromRGB(120, 255, 140)) -- монеты приходят атрибутом чуть позже события, поэтому предложение — с задержкой local wasFull = offerState.bagWasFull offerState.bagWasFull = false @@ -2757541,17 +2757729,17 @@ remote.OnClientEvent:Connect(function(action, a, b, c, d) refreshDots() refreshTracker() elseif action == "QuestDone" then - notify(("✅ %s +%s 💰 +%s XP"):format(questText(a, b), fmt(c), fmt(d or 0)), Color3.fromRGB(120, 255, 140)) - playUiSound(DING, 0.6) + notify(("✅ %s +%s ⚪ +%s XP"):format(questText(a, b), fmt(c), fmt(d or 0)), Color3.fromRGB(120, 255, 140)) + Audio.play("quest") elseif action == "ChainDone" then floatText("🏆 Цепочка пройдена!", C.gold) - notify(("🎁 %s: +%s 💰 +%s XP%s"):format(a, fmt(b), fmt(c), d and (" + " .. d) or ""), C.gold) - playUiSound(DING, 0.8) + notify(("🎁 %s: +%s ⚪ +%s XP%s"):format(a, fmt(b), fmt(c), d and (" + " .. d) or ""), C.gold) + Audio.play("fanfare") elseif action == "ComboLost" then notify(("💔 Серия из %d прервана"):format(a), Color3.fromRGB(255, 130, 110)) elseif action == "BossStart" then notify(("👑 %s в мире «%s»! Ловите всем сервером"):format(a, b), C.gold) - playUiSound(DING, 0.8) + Audio.play("quest") elseif action == "BossHit" then floatText(("⚔ -%d боссу"):format(a), Color3.fromRGB(255, 130, 100)) elseif action == "BossDone" then @@ -2757561,7 +2757749,7 @@ remote.OnClientEvent:Connect(function(action, a, b, c, d) notify(("🌊 %s ушёл на глубину…"):format(b), C.muted) end elseif action == "BossReward" then - notify(("🎁 За босса: +%s 💰 +%s XP%s"):format(fmt(a), fmt(b), c and (" + " .. c) or ""), Color3.fromRGB(120, 255, 140)) + notify(("🎁 За босса: +%s ⚪ +%s XP%s"):format(fmt(a), fmt(b), c and (" + " .. c) or ""), Color3.fromRGB(120, 255, 140)) elseif action == "OpenShop" then shopWin.open("rods") elseif action == "OpenQuests" then @@ -2757943,6 +2758131,780 @@ end) 7d5633f4c280c36c0afca57d00001884 + + + + StarterPlayer > StarterPlayerScripts +-- Звуки у этого игрока. Три группы громкости: музыка, эффекты и окружение (окружение — по громкости эффектов). +-- Громкость берётся из атрибутов игрока VolMusic / VolSfx (их выставляет и сохраняет сервер). +-- Audio.play(name) — разовый звук из Config.Sounds +-- Audio.loop(name, group) — петля (молчит, пока не вызвать Audio.fade) +-- Audio.fade(sound, factor) — плавно к громкости «базовая × factor» (0 — тишина, звук ставится на паузу) + +local Players = game:GetService("Players") +local SoundService = game:GetService("SoundService") +local TweenService = game:GetService("TweenService") +local ReplicatedStorage = game:GetService("ReplicatedStorage") + +local Config = require(ReplicatedStorage:WaitForChild("FishConfig")) +local player = Players.LocalPlayer +local rng = Random.new() + +local Audio = {} + +local function group(name) + local g = SoundService:FindFirstChild(name) + if not g then + g = Instance.new("SoundGroup") + g.Name = name + g.Parent = SoundService + end + return g +end +Audio.groups = { + music = group("MusicGroup"), + sfx = group("SfxGroup"), + ambient = group("AmbientGroup"), +} + +local function applyVolumes() + local music = player:GetAttribute("VolMusic") or Config.DefaultVolume.music + local sfx = player:GetAttribute("VolSfx") or Config.DefaultVolume.sfx + Audio.groups.music.Volume = music + Audio.groups.sfx.Volume = sfx + Audio.groups.ambient.Volume = sfx +end +applyVolumes() +player:GetAttributeChangedSignal("VolMusic"):Connect(applyVolumes) +player:GetAttributeChangedSignal("VolSfx"):Connect(applyVolumes) + +function Audio.play(name, volumeMult) + local def = Config.Sounds[name] + if not def or not def.id then + return nil + end + local s = Instance.new("Sound") + s.SoundId = def.id + s.Volume = (def.volume or 0.5) * (volumeMult or 1) + if def.pitch then + s.PlaybackSpeed = rng:NextNumber(def.pitch[1], def.pitch[2]) + end + s.SoundGroup = Audio.groups.sfx + s.Parent = SoundService + s:Play() + s.Ended:Connect(function() + s:Destroy() + end) + task.delay(30, function() + if s.Parent then + s:Destroy() + end + end) + return s +end + +-- разовый звук по прямому id (например, случайный раскат грома из списка) +function Audio.playId(id, volume, groupName) + local s = Instance.new("Sound") + s.SoundId = id + s.Volume = volume or 0.5 + s.SoundGroup = Audio.groups[groupName or "sfx"] + s.Parent = SoundService + s:Play() + s.Ended:Connect(function() + s:Destroy() + end) + return s +end + +function Audio.loop(name, groupName) + local def = Config.Sounds[name] + if not def then + return nil + end + local s = Instance.new("Sound") + s.Name = name + s.SoundId = def.id + s.Looped = true + s.Volume = 0 + s.SoundGroup = Audio.groups[groupName or "ambient"] + s:SetAttribute("BaseVolume", def.volume or 0.5) + s.Parent = SoundService + return s +end + +local fades = {} +function Audio.fade(s, factor, time) + if not s then + return + end + local target = (s:GetAttribute("BaseVolume") or 0.5) * (factor or 0) + if fades[s] and fades[s].target == target then + return + end + if fades[s] then + fades[s].tween:Cancel() + end + if target > 0 and not s.IsPlaying then + s:Resume() + if not s.IsPlaying then + s:Play() + end + end + local tw = TweenService:Create(s, TweenInfo.new(time or 2), { Volume = target }) + fades[s] = { tween = tw, target = target } + tw.Completed:Connect(function(state) + if state == Enum.PlaybackState.Completed and target <= 0.001 then + s:Pause() + end + end) + tw:Play() +end + +return Audio +]]> + {F43D3CDF-1BA3-498F-9133-D7CBD4023741} + + 0 + false + 00000000000000000000000000000000 + Audio + + -1 + yuZpQdnvvUBOTYh1jqZ2cA== + 7d5633f4c280c36c0afca57d00004265 + + + + + StarterPlayer > StarterPlayerScripts +-- Окно гильдии рыбаков (ранг и испытание, заказы, наживка, ловушки), строка жемчуга и печатей в HUD, +-- кнопки наживки и автоловли, церемония нового ранга. Стиль и помощники — из FishingClient (Theme.kit). + +local Players = game:GetService("Players") +local ReplicatedStorage = game:GetService("ReplicatedStorage") +local TweenService = game:GetService("TweenService") +local UserInputService = game:GetService("UserInputService") +local RunService = game:GetService("RunService") + +local player = Players.LocalPlayer +local Config = require(ReplicatedStorage:WaitForChild("FishConfig")) +local Theme = require(script.Parent:WaitForChild("UiTheme")) +local Audio = require(script.Parent:WaitForChild("Audio")) +local remote = ReplicatedStorage:WaitForChild("GameEvent") + +while not Theme.kit do + task.wait(0.1) +end +local K = Theme.kit +local C = Theme.C +local new, text, btn, corner, stroke, gradient = K.new, K.text, K.btn, K.corner, K.stroke, K.gradient +local fmt = K.fmt +local TITLE, BODY2 = K.TITLE, K.BODY2 +local RANKS = Config.Guild.ranks +local CENTER, RIGHT = Enum.TextXAlignment.Center, Enum.TextXAlignment.Right +local WHITE = Color3.new(1, 1, 1) + +local state = nil -- последнее состояние гильдии от сервера + +local function rankOf(idx) + return RANKS[math.clamp(idx or 1, 1, #RANKS)] +end + +-- щит ранга: ромб цвета ранга с буквой +local function shield(parent, size, idx, props) + local r = rankOf(idx) + local f = new("Frame", { Size = UDim2.fromOffset(size, size), Rotation = 45, BackgroundColor3 = r.color, Parent = parent }, + { corner(math.floor(size / 6)), stroke(C.gold, math.max(2, size / 14), 0), gradient(WHITE, Color3.fromRGB(150, 150, 150), 45) }) + for k, v in pairs(props or {}) do + f[k] = v + end + text({ Size = UDim2.fromScale(1, 1), Rotation = -45, Font = TITLE, TextScaled = true, TextXAlignment = CENTER, Text = r.id, + TextColor3 = WHITE, TextStrokeColor3 = C.ink, TextStrokeTransparency = 0.2, Parent = f }) + return f +end + +---------------------------------------------------------------- окно гильдии + +local win = K.makeWindow("⚔ Гильдия рыбаков", C.crimson, { + { id = "rank", label = "⚔ Ранг" }, + { id = "orders", label = "📜 Заказы" }, + { id = "bait", label = "🐛 Наживка" }, + { id = "traps", label = "🧺 Ловушки" }, +}) +local lists = { + rank = K.scrollArea(win.pages.rank), + orders = K.scrollArea(win.pages.orders), + bait = K.scrollArea(win.pages.bait), + traps = K.scrollArea(win.pages.traps), +} + +-- деревянная карточка-строка +local function card(parent, order, height, strokeColor) + return new("Frame", { Size = UDim2.new(1, -4, 0, height), BackgroundColor3 = WHITE, LayoutOrder = order, Parent = parent }, + { corner(8), stroke(strokeColor or C.goldDark, 2, 0), gradient(C.woodLight, C.wood, 90) }) +end + +local function rewardText(o) + return ("+%d %s +%s %s%s"):format(o.seals, Theme.SEAL, fmt(o.coins), Theme.SILVER, (o.pearls or 0) > 0 and (" +" .. o.pearls .. " " .. Theme.PEARL) or "") +end + +local function renderRank(list) + local idx = player:GetAttribute("RankIdx") or 1 + local r = rankOf(idx) + local seals = player:GetAttribute("Seals") or 0 + local nextR = RANKS[idx + 1] + + -- шапка: щит, звание, печати + local head = card(list, 0, 120, C.gold) + shield(head, 64, idx, { AnchorPoint = Vector2.new(0.5, 0.5), Position = UDim2.fromOffset(62, 60) }) + text({ Size = UDim2.new(1, -140, 0, 30), Position = UDim2.fromOffset(122, 10), Font = TITLE, TextSize = 24, TextColor3 = r.color:Lerp(WHITE, 0.35), + Text = ("Ранг %s — %s"):format(r.id, r.name), Parent = head }) + text({ Size = UDim2.new(1, -140, 0, 22), Position = UDim2.fromOffset(122, 42), Font = BODY2, TextSize = 15, TextColor3 = C.muted, RichText = true, + Text = ("%s Печати: %s%s %s Жемчуг: %s"):format(Theme.SEAL, fmt(seals), nextR and (" / " .. fmt(nextR.seals)) or "", Theme.PEARL, fmt(player:GetAttribute("Pearls") or 0)), + Parent = head }) + if nextR then + K.progressBar(head, UDim2.fromOffset(122, 74), UDim2.new(1, -140, 0, 14), (seals - r.seals) / math.max(1, nextR.seals - r.seals), C.gold) + text({ Size = UDim2.new(1, -140, 0, 18), Position = UDim2.fromOffset(122, 92), Font = BODY2, TextSize = 13, TextColor3 = C.muted, + Text = "Печати дают только заказы гильдии и испытания", Parent = head }) + end + + -- испытание на следующий ранг + local t = state and state.trial + if t and nextR then + local box = card(list, 1, 96, t.ready and C.goldBright or C.goldDark) + text({ Size = UDim2.new(1, -220, 0, 26), Position = UDim2.fromOffset(16, 10), Font = TITLE, TextSize = 19, TextColor3 = C.goldBright, + Text = ("⚔ Испытание на ранг %s"):format(nextR.id), Parent = box }) + text({ Size = UDim2.new(1, -220, 0, 40), Position = UDim2.fromOffset(16, 38), Font = BODY2, TextSize = 15, TextWrapped = true, RichText = true, + TextYAlignment = Enum.TextYAlignment.Top, + Text = t.text .. (t.active and (" " .. t.progress .. " / " .. t.goal .. "") or "") + .. (t.ready and "" or ("\nСначала накопи " .. fmt(nextR.seals) .. " печатей")), + Parent = box }) + local label, color, active + if not t.ready then + label, color, active = "🔒 " .. fmt(nextR.seals) .. " " .. Theme.SEAL, C.grey, false + elseif t.active and nextR.trial.kind == "deliver" then + label, color, active = "🐟 Сдать рыбу", C.green, true + elseif t.active then + label, color, active = "Идёт…", C.grey, false + else + label, color, active = "⚔ Взять", C.crimson, true + end + btn({ Size = UDim2.fromOffset(180, 50), AnchorPoint = Vector2.new(1, 0.5), Position = UDim2.new(1, -14, 0.5, 0), BackgroundColor3 = color, + AutoButtonColor = active, Text = label, TextSize = 18, Parent = box }, active and function() + remote:FireServer("TakeTrial") + end or nil) + end + + -- лестница рангов + for i, rr in ipairs(RANKS) do + local here = i == idx + local row = card(list, 10 + i, 58, here and C.gold or nil) + if i > idx then + row.BackgroundTransparency = 0.35 + end + shield(row, 30, i, { AnchorPoint = Vector2.new(0.5, 0.5), Position = UDim2.fromOffset(34, 29) }) + text({ Size = UDim2.fromOffset(230, 24), Position = UDim2.fromOffset(64, 6), Font = TITLE, TextSize = 17, + TextColor3 = i <= idx and C.text or C.muted, Text = ("%s — %s"):format(rr.id, rr.name), Parent = row }) + text({ Size = UDim2.new(1, -200, 0, 20), Position = UDim2.fromOffset(64, 31), Font = BODY2, TextSize = 13, TextColor3 = C.muted, + TextTruncate = Enum.TextTruncate.AtEnd, Text = rr.unlocks, Parent = row }) + text({ Size = UDim2.fromOffset(120, 24), AnchorPoint = Vector2.new(1, 0), Position = UDim2.new(1, -14, 0, 17), Font = TITLE, TextSize = 16, + TextXAlignment = RIGHT, TextColor3 = i <= idx and C.green:Lerp(WHITE, 0.4) or C.gold, + Text = i <= idx and "✓" or (fmt(rr.seals) .. " " .. Theme.SEAL), Parent = row }) + end +end + +local function renderOrders(list) + if not state then + return + end + local left = (state.ordersEnd or 0) - workspace:GetServerTimeNow() + local h = math.floor(math.max(0, left) / 3600) + local m = math.floor(math.max(0, left) % 3600 / 60) + text({ Size = UDim2.new(1, -4, 0, 26), LayoutOrder = 0, Font = BODY2, TextSize = 15, TextColor3 = C.muted, RichText = true, + Text = ("Личные заказы гильдии. Новые через %d ч %02d мин. Рыбу сдают у доски заказов в лобби."):format(h, m), Parent = list }) + for i, o in ipairs(state.orders) do + local row = card(list, i, 92, o.done and C.green or nil) + text({ Size = UDim2.new(1, -230, 0, 26), Position = UDim2.fromOffset(16, 8), Font = TITLE, TextSize = 18, + TextColor3 = o.done and C.muted or C.text, TextTruncate = Enum.TextTruncate.AtEnd, Text = (o.done and "✅ " or "📜 ") .. o.text, Parent = row }) + text({ Size = UDim2.new(1, -230, 0, 20), Position = UDim2.fromOffset(16, 36), Font = BODY2, TextSize = 14, TextColor3 = C.gold, + Text = rewardText(o), Parent = row }) + K.progressBar(row, UDim2.fromOffset(16, 64), UDim2.new(1, -310, 0, 12), o.progress / math.max(1, o.count), o.done and C.green or C.gold) + text({ Size = UDim2.fromOffset(70, 18), AnchorPoint = Vector2.new(1, 0), Position = UDim2.new(1, -224, 0, 61), Font = TITLE, TextSize = 14, + TextXAlignment = RIGHT, Text = ("%d / %d"):format(o.progress, o.count), Parent = row }) + if not o.done then + if o.deliver then + btn({ Size = UDim2.fromOffset(120, 40), AnchorPoint = Vector2.new(1, 0), Position = UDim2.new(1, -86, 0, 10), BackgroundColor3 = C.green, + Text = "🐟 Сдать", TextSize = 17, Parent = row }, function() + remote:FireServer("DeliverOrder", i) + end) + end + btn({ Size = UDim2.fromOffset(66, 40), AnchorPoint = Vector2.new(1, 0), Position = UDim2.new(1, -12, 0, 10), BackgroundColor3 = C.woodLight, + Text = "🎲 " .. Config.Orders.rerollPearls .. Theme.PEARL, TextSize = 14, Parent = row }, function() + remote:FireServer("RerollOrder", i) + end) + end + end + text({ Size = UDim2.new(1, -4, 0, 24), LayoutOrder = 99, Font = BODY2, TextSize = 13, TextColor3 = C.muted, + Text = ("🎲 — заменить заказ другим за %d %s"):format(Config.Orders.rerollPearls, Theme.PEARL), Parent = list }) +end + +local function renderBait(list) + local idx = player:GetAttribute("RankIdx") or 1 + local coins = player:GetAttribute("Coins") or 0 + local pearls = player:GetAttribute("Pearls") or 0 + local counts = state and state.baits or {} + local equipped = player:GetAttribute("Bait") + text({ Size = UDim2.new(1, -4, 0, 26), LayoutOrder = 0, Font = BODY2, TextSize = 15, TextColor3 = C.muted, + Text = "Один слот наживки: 1 штука тратится на каждый заброс.", Parent = list }) + for i, b in ipairs(Config.Baits) do + local have = counts[b.id] or 0 + local locked = b.rank and idx < b.rank + local pearl = b.currency == "pearls" + local row = card(list, i, 84, equipped == b.id and C.goldBright or nil) + text({ Size = UDim2.fromOffset(60, 60), Position = UDim2.fromOffset(10, 12), TextSize = 40, TextXAlignment = CENTER, Text = b.icon, Parent = row }) + text({ Size = UDim2.new(1, -330, 0, 26), Position = UDim2.fromOffset(78, 10), Font = TITLE, TextSize = 18, + Text = b.name .. (have > 0 and (" ×" .. have) or ""), Parent = row }) + text({ Size = UDim2.new(1, -330, 0, 36), Position = UDim2.fromOffset(78, 38), Font = BODY2, TextSize = 14, TextColor3 = C.muted, TextWrapped = true, + TextYAlignment = Enum.TextYAlignment.Top, Text = b.desc, Parent = row }) + local can = (pearl and pearls >= b.price) or (not pearl and coins >= b.price) + btn({ + Size = UDim2.fromOffset(130, 42), AnchorPoint = Vector2.new(1, 0.5), Position = UDim2.new(1, -12, 0.5, 0), + BackgroundColor3 = locked and C.grey or (can and C.green or C.woodLight), AutoButtonColor = not locked, + Text = locked and ("🔒 Ранг " .. RANKS[b.rank].id) or (("%s %d · ×%d"):format(pearl and Theme.PEARL or Theme.SILVER, b.price, b.pack)), TextSize = 15, Parent = row, + }, (not locked) and function() + remote:FireServer("BuyBait", b.id) + end or nil) + if have > 0 then + local on = equipped == b.id + btn({ + Size = UDim2.fromOffset(100, 42), AnchorPoint = Vector2.new(1, 0.5), Position = UDim2.new(1, -150, 0.5, 0), + BackgroundColor3 = on and C.gold or C.blue, TextColor3 = on and C.ink or C.text, Text = on and "✓ В слоте" or "Взять", TextSize = 15, Parent = row, + }, function() + remote:FireServer("EquipBait", on and "" or b.id) + end) + end + end +end + +local function renderTraps(list) + if not state then + return + end + if (state.trapSlots or 0) == 0 then + local box = card(list, 0, 90) + text({ Size = UDim2.new(1, -32, 1, 0), Position = UDim2.fromOffset(16, 0), Font = TITLE, TextSize = 18, TextWrapped = true, TextColor3 = C.muted, + Text = "🔒 Ловушки-вентери открываются с ранга D.\nКаждая сама ловит рыбу «Тихого озера», даже когда ты не в игре.", Parent = box }) + return + end + text({ Size = UDim2.new(1, -4, 0, 26), LayoutOrder = 0, Font = BODY2, TextSize = 15, TextColor3 = C.muted, + Text = ("Каждая ловушка: 1 рыба за %d мин, не больше %d. Работает и офлайн."):format(state.trapEvery / 60, state.trapMax), Parent = list }) + local total = 0 + for i = 1, state.trapSlots do + local n = state.traps[i] or 0 + total += n + local row = card(list, i, 64, n >= state.trapMax and C.goldBright or nil) + text({ Size = UDim2.new(1, -40, 0, 26), Position = UDim2.fromOffset(16, 6), Font = TITLE, TextSize = 18, + Text = ("🧺 Ловушка %d: %d / %d рыб%s"):format(i, n, state.trapMax, n >= state.trapMax and " · полная!" or ""), Parent = row }) + K.progressBar(row, UDim2.fromOffset(16, 38), UDim2.new(1, -32, 0, 12), n / state.trapMax, C.gold) + end + local b = btn({ + Size = UDim2.fromOffset(260, 52), BackgroundColor3 = total > 0 and C.green or C.grey, AutoButtonColor = total > 0, + Text = ("🧺 Забрать улов (%d)"):format(total), TextSize = 19, LayoutOrder = 50, Parent = list, + }, total > 0 and function() + remote:FireServer("CollectTraps") + end or nil) + b.AnchorPoint = Vector2.new(0, 0) +end + +win.render = function(tab) + local list = lists[tab] + if not list then + return + end + K.clear(list) + if tab == "rank" then + renderRank(list) + elseif tab == "orders" then + renderOrders(list) + elseif tab == "bait" then + renderBait(list) + elseif tab == "traps" then + renderTraps(list) + end +end + +local function openGuild(tab) + remote:FireServer("GuildState") + win.open(tab) +end + +K.sideButton(7, "⚔", "Гильдия", "G", C.crimson, function() + if win.isOpen() then + win.close() + else + openGuild() + end +end) +UserInputService.InputBegan:Connect(function(input, processed) + if not processed and input.KeyCode == Enum.KeyCode.G then + if win.isOpen() then + win.close() + else + openGuild() + end + end +end) + +---------------------------------------------------------------- HUD: жемчуг, печати, ранг, отдых + +local hud = K.hud +hud.Parent.Size = UDim2.fromOffset(290, 198) +local guildLine = text({ Size = UDim2.new(1, 0, 0, 20), Position = UDim2.fromOffset(0, 149), TextSize = 14, Font = BODY2, RichText = true, Text = "", Parent = hud }) +-- отдых: строка видна, только пока есть двойной опыт +local restText = text({ Size = UDim2.new(1, 0, 0, 18), Position = UDim2.fromOffset(0, 169), Font = BODY2, TextSize = 13, TextColor3 = Color3.fromRGB(170, 215, 255), Text = "", Parent = hud }) +local restPlate = restText + +local function refreshHud() + local idx = player:GetAttribute("RankIdx") or 1 + local r = rankOf(idx) + local nextSeals = player:GetAttribute("SealsNext") + guildLine.Text = ("⚔ %s %s %s%s %s %s"):format(r.color:Lerp(WHITE, 0.3):ToHex(), r.id, + Theme.SEAL, fmt(player:GetAttribute("Seals") or 0), nextSeals and ("/" .. fmt(nextSeals)) or "", Theme.PEARL, fmt(player:GetAttribute("Pearls") or 0)) + local rest = player:GetAttribute("RestLeft") or 0 + restPlate.Visible = rest > 0 + restText.Text = ("🛌 Отдых: опыт ×2 ещё %d мин"):format(math.ceil(rest / 60)) +end + +---------------------------------------------------------------- наживка и автоловля (правый низ, над кнопкой прыжка на телефоне) + +local bar = new("Frame", { + Size = UDim2.fromOffset(250, 56), AnchorPoint = Vector2.new(1, 1), Position = UDim2.new(1, -12, 1, -12), BackgroundTransparency = 1, Parent = K.screen, +}, { new("UIListLayout", { FillDirection = Enum.FillDirection.Horizontal, HorizontalAlignment = Enum.HorizontalAlignment.Right, Padding = UDim.new(0, 8), SortOrder = Enum.SortOrder.LayoutOrder }) }) +local baitBtn = btn({ Size = UDim2.fromOffset(110, 52), BackgroundColor3 = C.woodLight, Text = "", TextSize = 16, LayoutOrder = 1, Parent = bar }, function() + openGuild("bait") +end) +local autoBtn = btn({ Size = UDim2.fromOffset(130, 52), BackgroundColor3 = C.woodLight, Text = "", TextSize = 15, LayoutOrder = 2, Visible = false, Parent = bar }, function() + remote:FireServer("AutoFish", not player:GetAttribute("AutoFish")) +end) +Theme.onLayout(function(compact) + -- на телефоне — внизу, левее кнопки прыжка (над ней — панель целей) + bar.Position = compact and UDim2.new(1, -140, 1, -8) or UDim2.new(1, -12, 1, -12) +end) + +local function refreshBar() + local id = player:GetAttribute("Bait") + local b = id and Config.Find(Config.Baits, id) + baitBtn.Text = b and ("%s ×%d"):format(b.icon, player:GetAttribute("BaitCount") or 0) or "🐛 Наживка" + baitBtn.BackgroundColor3 = b and C.woodLight or C.wood + local idx = player:GetAttribute("RankIdx") or 1 + autoBtn.Visible = rankOf(idx).auto == true + local on = player:GetAttribute("AutoFish") == true + autoBtn.Text = on and "🎣 Авто: ВКЛ" or "🎣 Автоловля" + autoBtn.BackgroundColor3 = on and C.green or C.woodLight +end + +---------------------------------------------------------------- церемония нового ранга + +local ceremonyGui = new("ScreenGui", { Name = "RankCeremony", ResetOnSpawn = false, IgnoreGuiInset = true, DisplayOrder = 40, Enabled = false, Parent = player:WaitForChild("PlayerGui") }) +local function ceremony(letter, name, unlocks, pearls) + ceremonyGui.Enabled = true + local root = Theme.followScale(ceremonyGui) + local dim = new("Frame", { Size = UDim2.fromScale(1, 1), BackgroundColor3 = Color3.new(0, 0, 0), BackgroundTransparency = 0.45, Parent = root }) + local _, idx = Config.RankById(letter) + local panel = new("Frame", { + Size = UDim2.fromOffset(520, 300), AnchorPoint = Vector2.new(0.5, 0.5), Position = UDim2.fromScale(0.5, 0.5), BackgroundColor3 = WHITE, Parent = root, + }, { corner(12), stroke(C.goldDark, 4, 0), Theme.woodGradient(C.wood, C.woodDark) }) + Theme.innerBorder(panel, 7, 8, C.gold, 0.2) + Theme.rivets(panel, 12, 8) + text({ Size = UDim2.new(1, 0, 0, 34), Position = UDim2.fromOffset(0, 16), Font = TITLE, TextSize = 26, TextXAlignment = CENTER, TextColor3 = C.goldBright, + TextStrokeColor3 = C.ink, TextStrokeTransparency = 0.2, Text = "⚔ НОВЫЙ РАНГ ГИЛЬДИИ ⚔", Parent = panel }) + local sh = shield(panel, 96, idx, { AnchorPoint = Vector2.new(0.5, 0.5), Position = UDim2.fromOffset(260, 118) }) + text({ Size = UDim2.new(1, -40, 0, 30), Position = UDim2.fromOffset(20, 180), Font = TITLE, TextSize = 24, TextXAlignment = CENTER, + Text = ("%s — «%s»"):format(letter, name), Parent = panel }) + text({ Size = UDim2.new(1, -40, 0, 40), Position = UDim2.fromOffset(20, 212), Font = BODY2, TextSize = 15, TextXAlignment = CENTER, TextWrapped = true, + TextColor3 = C.muted, Text = "Открыто: " .. unlocks, Parent = panel }) + text({ Size = UDim2.new(1, -40, 0, 26), Position = UDim2.fromOffset(20, 256), Font = TITLE, TextSize = 19, TextXAlignment = CENTER, + TextColor3 = C.pearl, Text = ("+%d %s"):format(pearls or 0, Theme.PEARL), Parent = panel }) + K.popIn(panel, 0.3) + TweenService:Create(sh, TweenInfo.new(1.2, Enum.EasingStyle.Back, Enum.EasingDirection.Out), { Rotation = 405 }):Play() + Audio.play("fanfare") + -- конфетти + local colors = { C.goldBright, C.crimson, C.forest, C.parchment, Color3.fromRGB(120, 200, 255) } + for i = 1, 70 do + local p = new("Frame", { + Size = UDim2.fromOffset(math.random(6, 12), math.random(10, 18)), Position = UDim2.new(math.random(), 0, 0, -30), + Rotation = math.random(0, 360), BackgroundColor3 = colors[(i % #colors) + 1], BorderSizePixel = 0, Parent = root, + }) + local t = math.random(18, 34) / 10 + TweenService:Create(p, TweenInfo.new(t, Enum.EasingStyle.Quad, Enum.EasingDirection.In), { + Position = UDim2.new(p.Position.X.Scale + (math.random() - 0.5) * 0.2, 0, 1.1, 0), Rotation = p.Rotation + math.random(-360, 360), + }):Play() + end + task.delay(5, function() + TweenService:Create(dim, TweenInfo.new(0.4), { BackgroundTransparency = 1 }):Play() + task.wait(0.4) + root:Destroy() + ceremonyGui.Enabled = false + end) +end + +---------------------------------------------------------------- события + +remote.OnClientEvent:Connect(function(action, a, b, c, d) + if action == "Guild" then + state = a + win.refresh() + elseif action == "OpenGuild" then + openGuild(a) + elseif action == "RankUp" then + win.close() + ceremony(a, b, c, d) + elseif action == "OrderDone" then + Audio.play("quest") + end +end) + +player.AttributeChanged:Connect(function(name) + if name == "Seals" or name == "Pearls" or name == "RankIdx" or name == "SealsNext" or name == "RestLeft" then + refreshHud() + end + if name == "Bait" or name == "BaitCount" or name == "AutoFish" or name == "RankIdx" then + refreshBar() + end + if (name == "Coins" or name == "Pearls" or name == "Bait") and win.isOpen() and win.current == "bait" then + win.refresh() + end +end) +refreshHud() +refreshBar() + +-- таймер заказов и ловушки тикают, пока окно открыто +task.spawn(function() + while true do + task.wait(30) + if win.isOpen() and (win.current == "orders" or win.current == "traps") then + remote:FireServer("GuildState") + end + end +end) +remote:FireServer("GuildState") +]]> + false + + 0 + {CD961325-CFE0-4745-AEEC-C6E97D3E1E10} + + 0 + false + 00000000000000000000000000000000 + GuildClient + + -1 + yuZpQdnvvUBOTYh1jqZ2cA== + 7d5633f4c280c36c0afca57d00004267 + + + + + + StarterPlayer > StarterPlayerScripts +-- Общий стиль интерфейса «средневековая гильдия»: палитра, шрифты с кириллицей, +-- украшения окон (золотая рамка, заклёпки, багровая лента) и масштаб под размер экрана. + +local UserInputService = game:GetService("UserInputService") + +local Theme = {} + +---------------------------------------------------------------- палитра +-- старые ключи (bg, panel, blue…) оставлены, чтобы весь интерфейс перекрасился сразу + +local C = { + woodDark = Color3.fromRGB(40, 28, 20), + wood = Color3.fromRGB(66, 46, 30), + woodLight = Color3.fromRGB(98, 70, 44), + parchment = Color3.fromRGB(236, 220, 180), + ink = Color3.fromRGB(52, 36, 24), + gold = Color3.fromRGB(218, 172, 92), + goldBright = Color3.fromRGB(255, 214, 120), + goldDark = Color3.fromRGB(140, 102, 52), + crimson = Color3.fromRGB(150, 40, 35), + forest = Color3.fromRGB(64, 112, 62), + silver = Color3.fromRGB(214, 220, 228), + pearl = Color3.fromRGB(235, 225, 245), +} +C.bg = C.woodDark +C.panel = C.wood +C.panel2 = C.woodLight +C.green = C.forest +C.red = C.crimson +C.blue = Color3.fromRGB(70, 92, 112) -- «сталь»: телепорт, надеть +C.purple = Color3.fromRGB(110, 62, 118) +C.grey = Color3.fromRGB(84, 72, 60) +C.text = C.parchment +C.muted = Color3.fromRGB(192, 172, 136) +C.line = C.goldDark +C.dark = Color3.fromRGB(24, 16, 11) -- подложка полосок прогресса +Theme.C = C + +-- цвета для RichText +Theme.HEX = { + gold = "#FFD678", + muted = "#C0AC88", + green = "#9BE08C", + red = "#FF8A7A", + silver = "#DCE2EA", +} + +---------------------------------------------------------------- значки валют +-- 🪙 в Roblox не рисуется (квадратик), поэтому серебро — светлый кружок +Theme.SILVER = "⚪" +Theme.PEARL = "🦪" +Theme.SEAL = "📜" + +---------------------------------------------------------------- шрифты +-- проверено в Studio: у Merriweather и Nunito есть кириллица (у FredokaOne и Gotham — нет) + +local function family(name, weight) + return Font.new("rbxasset://fonts/families/" .. name .. ".json", weight) +end +Theme.TITLE_FACE = family("Merriweather", Enum.FontWeight.Heavy) +Theme.BODY_FACE = family("Nunito", Enum.FontWeight.ExtraBold) +Theme.BODY2_FACE = family("Nunito", Enum.FontWeight.Bold) +Theme.HINT_FACE = family("Nunito", Enum.FontWeight.Heavy) +-- старые Enum.Font в коде подменяются на эти шрифты +Theme.FACES = { + [Enum.Font.FredokaOne] = Theme.TITLE_FACE, + [Enum.Font.GothamBold] = Theme.BODY_FACE, + [Enum.Font.GothamMedium] = Theme.BODY2_FACE, + [Enum.Font.GothamBlack] = Theme.TITLE_FACE, +} + +---------------------------------------------------------------- украшения + +local function make(class, props) + local o = Instance.new(class) + for k, v in pairs(props) do + if k ~= "Parent" then + o[k] = v + end + end + o.Parent = props.Parent + return o +end + +-- ромбики-заклёпки по углам +function Theme.rivets(frame, size, inset, color) + size = size or 10 + inset = inset or 6 + for _, a in ipairs({ Vector2.new(0, 0), Vector2.new(1, 0), Vector2.new(0, 1), Vector2.new(1, 1) }) do + local r = make("Frame", { + Name = "Rivet", Size = UDim2.fromOffset(size, size), AnchorPoint = Vector2.new(0.5, 0.5), Rotation = 45, + Position = UDim2.new(a.X, a.X == 0 and inset or -inset, a.Y, a.Y == 0 and inset or -inset), + BackgroundColor3 = color or C.gold, BorderSizePixel = 0, ZIndex = 6, Parent = frame, + }) + make("UIStroke", { Color = C.ink, Thickness = 1.5, Parent = r }) + end +end + +-- рамка в 2 слоя: снаружи тёмное золото (UIStroke у самого окна), внутри — светлая тонкая линия +function Theme.innerBorder(frame, inset, radius, color, transparency) + inset = inset or 5 + local b = make("Frame", { + Name = "InnerBorder", Size = UDim2.new(1, -inset * 2, 1, -inset * 2), Position = UDim2.fromOffset(inset, inset), + BackgroundTransparency = 1, ZIndex = 1, Parent = frame, + }) + make("UICorner", { CornerRadius = UDim.new(0, radius or 8), Parent = b }) + make("UIStroke", { Color = color or C.gold, Thickness = 1.5, Transparency = transparency or 0.25, Parent = b }) + return b +end + +-- деревянная панель: тёплый градиент сверху вниз +function Theme.woodGradient(top, bottom) + return make("UIGradient", { Color = ColorSequence.new(top or C.wood, bottom or C.woodDark), Rotation = 90 }) +end + +---------------------------------------------------------------- масштаб под экран +-- Весь интерфейс лежит в «холсте» Root: он во столько же раз больше экрана, во сколько уменьшен +-- UIScale. Поэтому вёрстка в пикселях одинакова на любом экране, а на телефоне всё меньше и плотнее. +-- compact — узкий/сенсорный экран: другая раскладка (сетка кнопок, окна на весь экран). + +local BASE = Vector2.new(1280, 720) +local BASE_COMPACT = Vector2.new(780, 430) +local listeners = {} +Theme.compact = false +Theme.scale = 1 + +local function isCompact(size) + return size.X < 900 or UserInputService.TouchEnabled +end + +function Theme.onLayout(fn) + table.insert(listeners, fn) + fn(Theme.compact, Theme.scale) +end + +function Theme.scaleRoot(screenGui, name) + local root = make("Frame", { Name = name or "Root", BackgroundTransparency = 1, Size = UDim2.fromScale(1, 1), Parent = screenGui }) + local uiScale = make("UIScale", { Parent = root }) + local function update() + local size = screenGui.AbsoluteSize + if size.X < 2 or size.Y < 2 then + return + end + local compact = isCompact(size) + local base = compact and BASE_COMPACT or BASE + local s = math.clamp(math.min(size.X / base.X, size.Y / base.Y), 0.45, 1) + uiScale.Scale = s + root.Size = UDim2.fromScale(1 / s, 1 / s) + if compact ~= Theme.compact or s ~= Theme.scale then + Theme.compact, Theme.scale = compact, s + for _, fn in ipairs(listeners) do + task.spawn(fn, compact, s) + end + end + end + screenGui:GetPropertyChangedSignal("AbsoluteSize"):Connect(update) + update() + return root +end + +-- второй ScreenGui (погода и т.п.) — тот же масштаб, но без своей раскладки +function Theme.followScale(screenGui) + local root = make("Frame", { Name = "Root", BackgroundTransparency = 1, Size = UDim2.fromScale(1, 1), Parent = screenGui }) + local uiScale = make("UIScale", { Parent = root }) + local function apply(_, s) + uiScale.Scale = s + root.Size = UDim2.fromScale(1 / s, 1 / s) + end + local function update() + local size = screenGui.AbsoluteSize + if size.X < 2 or size.Y < 2 then + return + end + local compact = isCompact(size) + local base = compact and BASE_COMPACT or BASE + apply(compact, math.clamp(math.min(size.X / base.X, size.Y / base.Y), 0.45, 1)) + end + screenGui:GetPropertyChangedSignal("AbsoluteSize"):Connect(update) + update() + return root +end + +return Theme +]]> + {943B089F-F032-46C1-B33E-1D459028C0AA} + + 0 + false + 00000000000000000000000000000000 + UiTheme + + -1 + yuZpQdnvvUBOTYh1jqZ2cA== + 7d5633f4c280c36c0afca57d00004269 + + @@ -2758634,7 +2759596,7 @@ Config.QuestKinds = { perfectCast = { text = "Забрось в зелёную зону %d %s", forms = TIMES, coins = 8, xp = 6 }, combo = { text = "Набери серию из %d рыб", coins = 12, xp = 10, max = 15 }, sell = { text = "Продай %d %s", forms = FISH, coins = 3, xp = 3 }, - earn = { text = "Заработай %d 💰 на продаже", coins = 0.25, xp = 0.2, byLevel = true }, + earn = { text = "Заработай %d ⚪ на продаже", coins = 0.25, xp = 0.2, byLevel = true }, buy = { text = "Купи что-нибудь в магазине", coins = 40, xp = 30, max = 1 }, boss = { text = "Нанеси боссу %d урона", coins = 15, xp = 12 }, } @@ -2758667,7 +2759629,7 @@ Config.Boss = { }, } --- ежедневная награда (7 дней по кругу), монеты растут с уровнем +-- ежедневная награда (7 дней по кругу), серебро растёт с уровнем Config.DailyRewards = { { coins = 100 }, { coins = 200 }, @@ -2758683,26 +2759645,127 @@ Config.Events = { { id = "Bite", name = "⚡ Клёвый час", desc = "Рыба клюёт в 2 раза быстрее", duration = 180, speed = 0.5 }, { id = "Luck", name = "🍀 Удачный ветер", desc = "Удача +50% для всех", duration = 180, luck = 0.5 }, { id = "Stars", name = "🌟 Звездопад", desc = "Мутации в 3 раза чаще", duration = 180, mutation = 3 }, - { id = "Fair", name = "💰 Рыбная ярмарка", desc = "Рыба продаётся на 50% дороже", duration = 180, sell = 1.5 }, + { id = "Fair", name = "🐟 Рыбная ярмарка", desc = "Рыба продаётся на 50% дороже", duration = 180, sell = 1.5 }, } Config.EventFirstDelay = 120 Config.EventGapMin = 420 Config.EventGapMax = 720 +---------------------------------------------------------------- время суток +-- одни сутки длятся length секунд реального времени; время общее для всего сервера +Config.DayNight = { + enabled = true, + length = 1200, -- 20 минут на сутки + startClock = 9, -- во сколько начинается день при запуске сервера + nightLuck = 0.10, -- ночью удача +10% +} + +-- время на часах в момент serverTime (workspace:GetServerTimeNow()), dayStart — атрибут workspace "DayStart" +function Config.ClockAt(serverTime, dayStart) + local d = Config.DayNight + return (d.startClock + (serverTime - (dayStart or serverTime)) / d.length * 24) % 24 +end + +-- 0 днём, 1 глубокой ночью, плавно на рассвете и закате +function Config.Nightness(clock) + if clock >= 7 and clock <= 17.5 then + return 0 + elseif clock > 17.5 and clock < 20 then + return (clock - 17.5) / 2.5 + elseif clock >= 5 and clock < 7 then + return 1 - (clock - 5) / 2 + end + return 1 +end + +function Config.IsNight(clock) + return Config.Nightness(clock) >= 0.5 +end + +---------------------------------------------------------------- погода +-- меняется на всём сервере; weight — как часто выпадает, duration — сколько длится (секунды) +-- luck / speed / mutation — бонусы к рыбалке, пока погода держится +-- names — как погода называется в отдельных мирах (во фьорде вместо дождя снег) +Config.Weathers = { + { id = "Clear", name = "Ясно", icon = "☀", weight = 40, duration = { 240, 420 } }, + { id = "Cloudy", name = "Пасмурно", icon = "☁", weight = 25, duration = { 180, 360 }, luck = 0.05, desc = "Удача +5%" }, + { id = "Rain", name = "Дождь", icon = "🌧", weight = 20, duration = { 150, 300 }, speed = 0.85, desc = "Клюёт на 15% быстрее", + names = { World3 = "Снегопад" } }, + { id = "Storm", name = "Гроза", icon = "⛈", weight = 8, duration = { 120, 240 }, luck = 0.25, speed = 0.9, desc = "Удача +25%", + names = { World3 = "Метель" } }, + { id = "Fog", name = "Туман", icon = "🌫", weight = 7, duration = { 150, 300 }, mutation = 1.5, desc = "Мутации ×1.5" }, +} + +function Config.WeatherById(id) + for _, w in ipairs(Config.Weathers) do + if w.id == id then + return w + end + end + return Config.Weathers[1] +end + +---------------------------------------------------------------- звуки +-- ID из Creator Store: эффекты — Pro Sound Effects (официальная библиотека Roblox), +-- музыка — APM и DistroKid (лицензированы для Roblox). volume — громкость, pitch — разброс высоты +local function S(id, volume, extra) + local t = extra or {} + t.id = "rbxassetid://" .. id + t.volume = volume + return t +end +Config.Sounds = { + -- музыка + musicLobby = S(137023744071437, 0.35), -- The Ancient Lutes | Medieval Tavern Music + musicLobby2 = S(116079409060113, 0.35), -- The Lute Lament | Medieval Tavern Music + musicLake = S(1838853377, 0.3), -- Harp Fantasy + musicLake2 = S(86472274853159, 0.3), -- Calm Fantasy Atmosphere + musicNight = S(140195397978848, 0.3), -- Moonlit Meadow Whisper + -- окружение (петли) + birdsLake = S(9112877174, 0.35), -- Squam Lake 1 + birdsPark = S(9113444360, 0.25), -- Birds Park 2 + birdsJungle = S(9114892930, 0.3), -- Jungle Birds Ambience 3 + crickets = S(9112764573, 0.3), -- Crickets Night 3 + lakeWater = S(9116203162, 0.25), -- Lake Lap Water Movement 2 + wind = S(9113286782, 0.18), -- Barstow Wind Light Blustery Low Howl 1 + rainLight = S(9112852668, 0.45), -- Rain Continuous Drizzle 1 + rainHeavy = S(9112853287, 0.55), -- Rain Heavy 1 + fire = S(9112780193, 0.6, { roll = 30 }), -- Fireplace Constant Burning Flame 1 (слышно у костра) + thunder = { "rbxassetid://9116282875", "rbxassetid://9116282646", "rbxassetid://9116282791", "rbxassetid://9116282544" }, + -- рыбалка + cast = S(9120718279, 0.5, { pitch = { 0.9, 1.1 } }), -- Whoosh Fast Swish By 1 + bite = S(9112751536, 0.7, { pitch = { 0.9, 1.15 } }), -- Bubble Bloop High Pitched Cute 1 + reel = S(9114454019, 0.4), -- Fishing Reel 4 (петля, пока тянешь) + catchSplash = S(9119293555, 0.6), -- Small Splash Shallow Water + catch = S(9126073001, 0.5), -- Bell Tone Ding + fanfare = S(1836473422, 0.45), -- Victory Fanfare Sting (редкая рыба) + sparkle = S(9114369623, 0.5), -- Fairy Dust 1 (мутация) + escape = S(9117944976, 0.5), -- Puddle Splash 2 (сорвалась) + -- интерфейс + click = S(15675032796, 0.5), -- Roblox_UI_Small_Click + open = S(9117231552, 0.45), -- Paper Scroll Unroll Handle 4 + coins = S(9113849306, 0.6), -- Coins Or Keys Jingle 1 + levelUp = S(1840525342, 0.5), -- Harp Glissando (A) + quest = S(9126073318, 0.5), -- Bell Tone Ding 2 +} +Config.DefaultVolume = { music = 0.6, sfx = 0.8 } + ---------------------------------------------------------------- донат (Robux) --- ВАЖНО: впиши сюда ID своих пропусков и товаров с create.roblox.com. +-- Все товары — Developer Products игры (create.roblox.com → Monetization → Developer Products); +-- id — Product ID оттуда, robux — цена для кнопки (должна совпадать с ценой в Roblox). +-- Пропуска тоже Developer Products: покупаются один раз, сервер запоминает их в данных игрока навсегда. -- Пока id = 0, кнопка покупки покажет подсказку, что товар не настроен. Config.GamePasses = { - { key = "VIP", id = 0, robux = 199, icon = "👑", name = "VIP", desc = "+25% удачи и монет, корона над головой" }, - { key = "DoubleCoins", id = 0, robux = 299, icon = "💰", name = "x2 Монеты", desc = "Вся рыба продаётся в 2 раза дороже" }, - { key = "LuckyCharm", id = 0, robux = 349, icon = "🍀", name = "Талисман удачи", desc = "+50% удачи навсегда" }, - { key = "BigBag", id = 0, robux = 149, icon = "🎒", name = "Бездонная сумка", desc = "+100 мест в любой сумке" }, + { key = "VIP", id = 3728143641, robux = 199, icon = "👑", name = "VIP", desc = "+25% удачи и серебра, корона над головой" }, + { key = "DoubleCoins", id = 3728143692, robux = 299, icon = "⚪", name = "x2 Серебро", desc = "Вся рыба продаётся в 2 раза дороже" }, + { key = "LuckyCharm", id = 3728143735, robux = 349, icon = "🍀", name = "Талисман удачи", desc = "+50% удачи навсегда" }, + { key = "BigBag", id = 3728143773, robux = 149, icon = "🎒", name = "Бездонная сумка", desc = "+100 мест в любой сумке" }, } Config.Products = { - { key = "Coins1", id = 0, robux = 49, icon = "🪙", name = "Мешок монет", desc = "+1 000 монет (больше с уровнем)", coins = 1000 }, - { key = "Coins2", id = 0, robux = 199, icon = "💰", name = "Сундук монет", desc = "+5 000 монет (больше с уровнем)", coins = 5000 }, - { key = "Coins3", id = 0, robux = 599, icon = "🏆", name = "Гора золота", desc = "+20 000 монет (больше с уровнем)", coins = 20000 }, - { key = "Luck", id = 0, robux = 99, icon = "🧪", name = "Супер-зелье удачи", desc = "+200% удачи на 15 минут", boost = 2.0, duration = 900 }, + { key = "Coins1", id = 3728142264, robux = 49, icon = "👝", name = "Кошель серебра", desc = "+1 000 серебра (больше с уровнем)", coins = 1000 }, + { key = "Coins2", id = 3728142848, robux = 199, icon = "⚪", name = "Сундук серебра", desc = "+5 000 серебра (больше с уровнем)", coins = 5000 }, + { key = "Coins3", id = 3728142885, robux = 599, icon = "🏆", name = "Гора золота", desc = "+20 000 серебра (больше с уровнем)", coins = 20000 }, + { key = "Luck", id = 3728142916, robux = 99, icon = "🧪", name = "Супер-зелье удачи", desc = "+200% удачи на 15 минут", boost = 2.0, duration = 900 }, } ---------------------------------------------------------------- рыбалка @@ -2758723,8 +2759786,105 @@ Config.TutorialDone = 4 function Config.HitsNeeded(rank) return math.ceil(rank / 2) end +-- опыт до следующего уровня: до 8-го ≈ 3 600 (1,5–2 часа вместе с заказами гильдии); +-- у старых сохранений уровень не понижается — копится только опыт внутри уровня function Config.XPForLevel(level) - return 60 + level * 60 + return math.floor(50 * level ^ 1.6) +end + +---------------------------------------------------------------- гильдия рыбаков +-- три валюты: серебро (coins в данных), жемчуг (pearls), печати гильдии (seals — копятся для ранга) +Config.Pearls = { + mutation = { Shiny = 1, Golden = 3, Rainbow = 10 }, -- за пойманную рыбу с мутацией + boss = 5, -- за победу над боссом + daily7 = 5, -- 7-й день ежедневной награды + rankUp = 10, -- за новый ранг +} + +-- ранги: seals — сколько печатей нужно накопить, trial — испытание у Старейшины, +-- orders — заказов на доске, traps — ловушек, discount — скидка у торговцев +-- trial.kind: deliver (сдать рыбу из сумки), catch (поймать с условием), bossWin (участие в победе над боссом), +-- dex (собрать коллекцию мира) +Config.Guild = { + elder = "Старейшина Ворон", + ranks = { + { id = "F", name = "Ученик", seals = 0, orders = 3, color = Color3.fromRGB(150, 150, 150), + unlocks = "Мир 1, доска заказов" }, + { id = "E", name = "Подмастерье", seals = 30, orders = 4, color = Color3.fromRGB(90, 190, 90), auto = true, + trial = { kind = "deliver", fish = "Okun", count = 5, text = "Сдать 5 окуней" }, + unlocks = "🎣 Автоловля, 4-й заказ на доске" }, + { id = "D", name = "Рыбак", seals = 120, orders = 4, color = Color3.fromRGB(70, 130, 230), auto = true, traps = 1, + trial = { kind = "catch", minRank = 3, weathers = { Rain = true, Storm = true }, count = 1, text = "Поймать «Редкую» рыбу в дождь или грозу" }, + unlocks = "🏝 Мир 2 (и ур. 8), 🧺 ловушка" }, + { id = "C", name = "Опытный рыбак", seals = 350, orders = 4, color = Color3.fromRGB(150, 80, 200), auto = true, traps = 2, discount = 0.05, + trial = { kind = "bossWin", count = 1, text = "Помочь одолеть босса озера" }, + unlocks = "🧺 2 ловушки, скидка у торговцев 5%" }, + { id = "B", name = "Мастер", seals = 900, orders = 4, color = Color3.fromRGB(200, 50, 45), auto = true, traps = 3, discount = 0.05, + trial = { kind = "dex", world = "World1", text = "Собрать всю коллекцию «Тихого озера»" }, + unlocks = "❄ Мир 3 (и ур. 18), 🧺 3 ловушки" }, + { id = "A", name = "Магистр", seals = 2000, orders = 4, color = Color3.fromRGB(230, 180, 60), auto = true, traps = 3, discount = 0.10, + trial = { kind = "catch", minRank = 4, night = true, count = 1, text = "Поймать «Эпическую» рыбу ночью" }, + unlocks = "Титул «Магистр», скидка 10%" }, + { id = "S", name = "Легенда", seals = 4500, orders = 4, color = Color3.fromRGB(255, 120, 200), auto = true, traps = 3, discount = 0.10, autoNoCap = true, + trial = { kind = "catch", minRank = 6, count = 1, text = "Поймать «Мифическую» рыбу" }, + unlocks = "Золотой жетон, автоловля без ограничения редкости" }, + }, + -- миры требуют и уровень, и ранг (номер в списке ranks) + worldRank = { World2 = 3, World3 = 5 }, + elderDistance = 22, -- взять испытание / сдать рыбу — рядом со Старейшиной или доской +} + +-- заказы гильдии: личные, обновляются каждые period секунд (окно floor(os.time()/period)), +-- один заказ можно перебросить за rerollPearls жемчуга. Награда растёт с рангом +Config.Orders = { + period = 10800, + rerollPearls = 2, + pearlChance = 0.2, pearlsMin = 1, pearlsMax = 3, + coinsPerSeal = 12, -- серебро за заказ = печати × это × (1 + 0.5 · (ранг − 1)) + -- weight — как часто выпадает; seals — печати {мин, макс} + kinds = { + deliver = { weight = 3, seals = { 5, 12 } }, + heavy = { weight = 2, seals = { 8, 16 } }, + weather = { weight = 1, seals = { 10, 20 } }, + night = { weight = 1, seals = { 10, 22 } }, + combo = { weight = 2, seals = { 8, 18 } }, + perfect = { weight = 2, seals = { 6, 14 } }, + }, +} + +-- наживка: 1 слот, 1 штука тратится на заброс. price — за пачку из pack штук; currency = "pearls" — за жемчуг +Config.Baits = { + { id = "Worm", name = "Червь", icon = "🐛", price = 40, pack = 10, speed = 0.9, desc = "Клюёт на 10% быстрее" }, + { id = "Larva", name = "Мотыль", icon = "🦐", price = 90, pack = 10, luck = 0.15, desc = "Удача +15%" }, + { id = "Firefly", name = "Светлячок", icon = "✨", price = 120, pack = 10, nightLuck = 0.30, desc = "Ночью удача +30% (вместо +10%)" }, + { id = "Blood", name = "Кровавая приманка", icon = "🩸", price = 400, pack = 10, rareWeight = 1.5, rank = 3, desc = "Редкие и выше попадаются в 1,5 раза чаще" }, + { id = "Pearl", name = "Жемчужная блесна", icon = "🦪", price = 5, pack = 5, mutation = 2, currency = "pearls", desc = "Шанс мутаций ×2" }, +} + +-- автоловля (с ранга E): сервер сам забрасывает и вытаскивает, но со штрафами +Config.AutoFish = { + luck = 0.6, -- удача ×0.6 + maxRarity = 3, -- не выше «Редкой» (ранг S снимает) + slower = 1.5, -- каждая поимка на 50% дольше + reel = 2.5, -- секунд «вываживания» вместо мини-игры +} + +-- ловушки-вентери (с ранга D): 1 рыба Мира 1 каждые every секунд, не больше max, копятся и офлайн +Config.Traps = { + every = 900, max = 16, + world = "World1", rarities = { Common = 3, Uncommon = 1 }, -- вес редкостей +} + +-- отдых: пока игрока нет, копится двойной опыт — 1 минута за каждые perOffline минут офлайн, не больше max +Config.Rest = { perOffline = 4, max = 3600, mult = 2 } + +function Config.RankById(id) + for i, r in ipairs(Config.Guild.ranks) do + if r.id == id then + return r, i + end + end + return nil end ---------------------------------------------------------------- помощники @@ -2759431,6 +2760591,7 @@ local Debris = game:GetService("Debris") local Config = require(ReplicatedStorage:WaitForChild("FishConfig")) local Models = require(ReplicatedStorage:WaitForChild("GameModels")) +local Guild = require(script.Parent:WaitForChild("Guild")) local remote = ReplicatedStorage:FindFirstChild("GameEvent") or Instance.new("RemoteEvent") remote.Name = "GameEvent" @@ -2759462,6 +2760623,10 @@ local function defaultData() chain = { index = 1, step = 1, progress = 0, tier = 0 }, daily = { last = 0, streak = 0 }, boostUntil = 0, boostBonus = 0, totalCaught = 0, nextUid = 1, receipts = {}, + passes = {}, -- купленные пропуска (Developer Products): [key] = true + settings = { music = Config.DefaultVolume.music, sfx = Config.DefaultVolume.sfx }, + -- гильдия: жемчуг, печати, отдых (ранг, заказы, наживку, ловушки дополняет Guild.defaults) + pearls = 0, seals = 0, rest = 0, } end @@ -2759504,16 +2760669,12 @@ local function hasPass(player, key) return passes[player] ~= nil and passes[player][key] == true end -local function loadPasses(player) +-- пропуска продаются как Developer Products, поэтому владение хранится в данных игрока, а не в Roblox +local function loadPasses(player, data) passes[player] = {} for _, gp in ipairs(Config.GamePasses) do - if gp.id and gp.id > 0 then - local ok, owns = pcall(function() - return MarketplaceService:UserOwnsGamePassAsync(player.UserId, gp.id) - end) - if ok and owns then - passes[player][gp.key] = true - end + if data.passes[gp.key] then + passes[player][gp.key] = true end end end @@ -2759523,6 +2760684,17 @@ local function ev(field, default) return (currentEvent and currentEvent[field]) or default end +-- погода и время суток (их ведёт WeatherServer через атрибуты workspace) +local function weather() + return Config.WeatherById(workspace:GetAttribute("Weather")) +end +local function isNight() + if not Config.DayNight.enabled then + return false + end + return Config.IsNight(Config.ClockAt(workspace:GetServerTimeNow(), workspace:GetAttribute("DayStart"))) +end + ---------------------------------------------------------------- расчёты local function rodLevel(data, rodId) @@ -2759552,7 +2760724,7 @@ local function totalLuck(player, data) if hasPass(player, "LuckyCharm") then l += 0.5 end - return l + ev("luck", 0) + return l + ev("luck", 0) + (weather().luck or 0) + (isNight() and Config.DayNight.nightLuck or 0) end local function bagCapacity(player, data) @@ -2759686,10 +2760858,11 @@ local function updateStats(player) player:SetAttribute("Tutorial", data.tutorial or (data.totalCaught > 0 and Config.TutorialDone or 0)) player:SetAttribute("Mastery", masteryCount(data)) player:SetAttribute("Passes", table.concat(ps, ",")) + Guild.attrs(player, data) local ls = player:FindFirstChild("leaderstats") if ls then - ls["Монеты"].Value = data.coins + ls["Серебро"].Value = data.coins ls["Уровень"].Value = data.level ls["Улов"].Value = data.totalCaught end @@ -2759713,6 +2760886,11 @@ local function addXp(player, data, amount) end end +Guild.init({ + profiles = profiles, notify = notify, updateStats = updateStats, addXp = addXp, sendInventory = sendInventory, + bagCapacity = bagCapacity, isNight = isNight, weather = weather, remote = remote, +}) + local function applyPotion(data, bonus, duration) data.boostBonus = math.max(boostActive(data), bonus) data.boostUntil = math.max(os.time(), data.boostUntil) + duration @@ -2759791,9 +2760969,13 @@ local function claimDaily(player) end end data.daily = { last = t, streak = streak } + if streak == 7 then + data.pearls += Config.Pearls.daily7 + extra ..= (" + %d 🦪"):format(Config.Pearls.daily7) + end updateStats(player) sendQuests(player) - notify(player, ("🎁 День %d: +%d 💰%s"):format(streak, coins, extra), GOLD) + notify(player, ("🎁 День %d: +%d ⚪%s"):format(streak, coins, extra), GOLD) end ---------------------------------------------------------------- коллекция @@ -2759819,7 +2761001,7 @@ local function claimCollection(player, worldId, rarity) if rarity == "Master" then local coins = Config.MasteryCoins * world.mult data.coins += coins - notify(player, ("🏆 «%s» собран! +%d 💰"):format(world.name, coins), GOLD) + notify(player, ("🏆 «%s» собран! +%d ⚪"):format(world.name, coins), GOLD) else local r = Config.CollectionRewards[rarity] if not r then @@ -2759827,7 +2761009,7 @@ local function claimCollection(player, worldId, rarity) end data.coins += r.coins * world.mult addXp(player, data, r.xp * world.mult) - notify(player, ("📖 +%d 💰 +%d XP"):format(r.coins * world.mult, r.xp * world.mult), GREEN) + notify(player, ("📖 +%d ⚪ +%d XP"):format(r.coins * world.mult, r.xp * world.mult), GREEN) end updateStats(player) sendInventory(player) @@ -2760151,12 +2761333,19 @@ local function stopFishing(player, tellClient) end end -local function rollFish(player, data, worldId, luckMult) +-- mods: { bait = наживка из Config.Baits, maxRank = потолок редкости (автоловля) } +local function rollFish(player, data, worldId, luckMult, mods) local zone = Config.Zones[worldId] if not zone then return nil end - local luck = totalLuck(player, data) * (luckMult or 1) + mods = mods or {} + local bait = mods.bait + local base = totalLuck(player, data) + (bait and bait.luck or 0) + if bait and bait.nightLuck and isNight() then + base += bait.nightLuck - Config.DayNight.nightLuck -- светлячок: ночью +30% вместо обычных +10% + end + local luck = base * (luckMult or 1) local bonus = luck - 1 local weights, total = {}, 0 for i, f in ipairs(zone.fish) do @@ -2760165,6 +2761354,12 @@ local function rollFish(player, data, worldId, luckMult) if r.rank == 1 then w = r.weight / math.max(1, luck) end + if bait and bait.rareWeight and r.rank >= 3 then + w *= bait.rareWeight + end + if mods.maxRank and r.rank > mods.maxRank then + w = 0 + end weights[i] = w total += w end @@ -2760179,7 +2761374,7 @@ local function rollFish(player, data, worldId, luckMult) end local mutation = nil for _, m in ipairs(Config.Mutations) do - if rng:NextNumber() < m.chance * luck * ev("mutation", 1) then + if rng:NextNumber() < m.chance * luck * ev("mutation", 1) * (weather().mutation or 1) * (bait and bait.mutation or 1) then mutation = m break end @@ -2760235,12 +2761430,21 @@ local function flyBobber(s, tool, target, dur, arc) end end +local autoFishing = {} -- [player] = токен работающей автоловли +local setAutoFish, grantFish -- объявлены ниже + local function onCast(player, power) power = math.clamp(tonumber(power) or 0.6, 0, 1) local data = profiles[player] if not data then return end + if autoFishing[player] then + -- клик удочкой во время автоловли — выключить её + setAutoFish(player, false) + remote:FireClient(player, "CastFail") + return + end if fishing[player] then stopFishing(player, true) return @@ -2760273,7 +2761477,8 @@ local function onCast(player, power) local stats = Config.RodStats(data.rod, rodLevel(data)) local perfect = power >= Config.CastPerfect[1] and power <= Config.CastPerfect[2] - local fish = rollFish(player, data, world.id, perfect and Config.CastPerfectLuck or 1) + local bait = Guild.useBait(player, data) -- 1 штука наживки на заброс + local fish = rollFish(player, data, world.id, perfect and Config.CastPerfectLuck or 1, { bait = bait }) if not fish then remote:FireClient(player, "CastFail") return @@ -2760303,7 +2761508,7 @@ local function onCast(player, power) end s.stage = "waiting" - local waitTime = rng:NextNumber(Config.BiteTimeMin, Config.BiteTimeMax) * stats.speed * ev("speed", 1) + local waitTime = rng:NextNumber(Config.BiteTimeMin, Config.BiteTimeMax) * stats.speed * ev("speed", 1) * (weather().speed or 1) * (bait and bait.speed or 1) task.wait(waitTime) if fishing[player] ~= s then return @@ -2760374,14 +2761579,22 @@ local function onCatch(player, success, misses) return end gripSequence(tool, { { 85, 0.15 }, { REST_ANGLE, 0.45 } }) + grantFish(player, data, s.fish, { perfect = s.perfect, misses = misses, fromPos = fromPos }) +end - -- серия: каждая рыба подряд дороже и даёт больше опыта - local fish = s.fish +-- рыба поймана (руками или автоловлей): в сумку, опыт, коллекция, задания, гильдия, босс. +-- ctx: { perfect, misses, fromPos, auto }; у автоловли нет серии и бонусов за точность +grantFish = function(player, data, fish, ctx) local streak = combo[player] or 0 - local comboMult = math.min(Config.Combo.max, 1 + Config.Combo.step * streak) - fish.value = math.floor(fish.value * comboMult + 0.5) - fish.xp = math.floor(fish.xp * comboMult + 0.5) - setCombo(player, streak + 1) + local comboMult = 1 + if not ctx.auto then + -- серия: каждая рыба подряд дороже и даёт больше опыта + comboMult = math.min(Config.Combo.max, 1 + Config.Combo.step * streak) + fish.value = math.floor(fish.value * comboMult + 0.5) + fish.xp = math.floor(fish.xp * comboMult + 0.5) + setCombo(player, streak + 1) + end + fish.xp = math.floor(fish.xp * Guild.xpMult(data)) -- бонус отдыха: двойной опыт table.insert(data.items, { uid = data.nextUid, id = fish.id, name = fish.name, rarity = fish.rarity, weight = fish.weight, value = fish.value, mutation = fish.mutation, @@ -2760404,10 +2761617,10 @@ local function onCatch(player, success, misses) addXp(player, data, fish.xp * (isNew and 2 or 1)) updateStats(player) sendInventory(player) - if fromPos then - showFishFlight(player, fish, fromPos) + if ctx.fromPos then + showFishFlight(player, fish, ctx.fromPos) end - remote:FireClient(player, "Caught", fish, { new = isNew, record = isRecord, combo = comboMult, streak = streak + 1 }) + remote:FireClient(player, "Caught", fish, { new = isNew, record = isRecord, combo = comboMult, streak = ctx.auto and 0 or streak + 1, auto = ctx.auto }) local rank = Config.Rarities[fish.rarity].rank questProgress(player, "catch", 1) @@ -2760417,16 +2761630,160 @@ local function onCatch(player, success, misses) if rank >= 3 then questProgress(player, "rare", 1) end - if misses == 0 then - questProgress(player, "perfect", 1) + if not ctx.auto then + if ctx.misses == 0 then + questProgress(player, "perfect", 1) + end + if ctx.perfect then + questProgress(player, "perfectCast", 1) + end + questProgress(player, "combo", streak + 1, true) end - if s.perfect then - questProgress(player, "perfectCast", 1) - end - questProgress(player, "combo", streak + 1, true) + Guild.onCatch(player, data, fish, { + weather = workspace:GetAttribute("Weather"), night = isNight(), + perfect = ctx.perfect and not ctx.auto, streak = (not ctx.auto) and streak + 1 or 0, + }) local hrp = player.Character and player.Character:FindFirstChild("HumanoidRootPart") - bossHit(player, hrp and Config.WorldAt(hrp.Position), rank + (misses == 0 and 1 or 0)) + bossHit(player, hrp and Config.WorldAt(hrp.Position), rank + (ctx.misses == 0 and 1 or 0)) +end + +---------------------------------------------------------------- автоловля (с ранга E) +-- сервер сам забрасывает и вытаскивает: удача ×0.6, не выше «Редкой», без серии и бонуса заброса, +-- каждая поимка на 50% дольше. Стоп — полная сумка, отошёл от места, сменил мир, убрал удочку + +local function autoFishLoop(player, token) + local A = Config.AutoFish + local home = nil -- где включили: отошёл дальше 10 studs или сменил мир — стоп + local function stop(reason) + if autoFishing[player] == token then + setAutoFish(player, false, reason) + end + end + while autoFishing[player] == token do + local data = profiles[player] + local char = player.Character + local hrp = char and char:FindFirstChild("HumanoidRootPart") + local tool = char and char:FindFirstChildOfClass("Tool") + if not data or not hrp then + return stop(nil) + end + if not tool or not tool:GetAttribute("IsRod") then + return stop("🎣 Автоловля: возьми удочку в руки") + end + local world = Config.WorldAt(hrp.Position) + if not world or Config.CanCastFrom(world, hrp.Position) ~= true then + return stop("🌊 Автоловля: встань у воды") + end + home = home or { pos = hrp.Position, world = world.id } + if world.id ~= home.world or (hrp.Position - home.pos).Magnitude > 10 then + return stop("🎣 Автоловля остановлена: ты отошёл") + end + if #data.items >= bagCapacity(player, data) then + return stop("🎒 Сумка полна — автоловля остановлена") + end + local target, dist = findWater(hrp, world, 0.6) + if not target then + return stop("🌊 Автоловля: встань у воды") + end + if fishing[player] then + task.wait(0.5) + continue + end + + local bait = Guild.useBait(player, data) + local fish = rollFish(player, data, world.id, A.luck, { bait = bait, maxRank = (not Guild.rank(data).autoNoCap) and A.maxRarity or nil }) + local s = { stage = "casting", fish = fish, tool = tool, auto = true } + fishing[player] = s + local splashAt = target + Vector3.new(0, 0.15, 0) + local tw = tweenGrip(tool, 8, 0.15) + if tw then + tw.Completed:Wait() + end + if fishing[player] == s then + flyBobber(s, tool, splashAt, 0.35 + dist * 0.018, 2 + dist * 0.3) + tweenGrip(tool, REST_ANGLE - 5, 0.4) + end + if fishing[player] ~= s then + if s.bobber then + s.bobber:Destroy() + end + continue + end + s.stage = "waiting" + local stats = Config.RodStats(data.rod, rodLevel(data)) + local waitTime = rng:NextNumber(Config.BiteTimeMin, Config.BiteTimeMax) * stats.speed * ev("speed", 1) + * (weather().speed or 1) * (bait and bait.speed or 1) * A.slower + local t0, bit = os.clock(), false + while fishing[player] == s and autoFishing[player] == token and os.clock() - t0 < waitTime + A.reel do + local h = player.Character and player.Character:FindFirstChild("HumanoidRootPart") + if not h or (h.Position - home.pos).Magnitude > 10 then + break + end + if not bit and os.clock() - t0 >= waitTime then + -- клюёт: всплеск и удочка дёргается до конца «вываживания» + bit = true + if s.bobber and s.bobber.PrimaryPart then + splash(s.bobber.PrimaryPart, 25) + playSound(s.bobber.PrimaryPart, SPLASH_SOUND, 0.35) + end + end + if bit then + tweenGrip(tool, (math.floor(os.clock() * 8) % 2 == 0) and 38 or 18, 0.12) + end + task.wait(0.13) + end + if fishing[player] ~= s or autoFishing[player] ~= token or not bit or os.clock() - t0 < waitTime + A.reel - 0.05 then + if fishing[player] == s then + stopFishing(player, false) + end + continue -- наверху цикла проверим, почему прервались (отошёл, выключил) + end + fishing[player] = nil + local fromPos = s.bobber and s.bobber.PrimaryPart and s.bobber.PrimaryPart.Position + if s.bobber then + s.bobber:Destroy() + end + gripSequence(tool, { { 85, 0.15 }, { REST_ANGLE, 0.45 } }) + grantFish(player, data, fish, { auto = true, fromPos = fromPos }) + task.wait(1.2) + end +end + +setAutoFish = function(player, on, reason) + local data = profiles[player] + if on then + if not data then + return + end + if not Guild.rank(data).auto then + notify(player, "🔒 Автоловля — с ранга гильдии E", RED) + player:SetAttribute("AutoFish", false) + return + end + if autoFishing[player] then + return + end + if fishing[player] then + stopFishing(player, true) + end + local token = {} + autoFishing[player] = token + player:SetAttribute("AutoFish", true) + notify(player, "🎣 Автоловля включена", GREEN) + task.spawn(autoFishLoop, player, token) + else + player:SetAttribute("AutoFish", false) + if not autoFishing[player] then + return + end + autoFishing[player] = nil + local s = fishing[player] + if s and s.auto then + stopFishing(player, false) + end + notify(player, reason or "🎣 Автоловля выключена", Color3.fromRGB(255, 200, 120)) + end end ---------------------------------------------------------------- скупка @@ -2760503,9 +2761860,9 @@ local function buy(player, kind, id) notify(player, "★★★★★ Максимум", GOLD) return end - local cost = Config.UpgradeCost(rod, lvl) + local cost = Guild.price(data, Config.UpgradeCost(rod, lvl)) -- скидка ранга гильдии if data.coins < cost then - notify(player, "Нужно " .. cost .. " 💰", RED) + notify(player, "Нужно " .. cost .. " ⚪", RED) return end data.coins -= cost @@ -2760528,11 +2761885,12 @@ local function buy(player, kind, id) notify(player, "🔒 Нужен ур. " .. potion.level, RED) return end - if data.coins < potion.price then - notify(player, "Нужно " .. potion.price .. " 💰", RED) + local price = Guild.price(data, potion.price) + if data.coins < price then + notify(player, "Нужно " .. price .. " ⚪", RED) return end - data.coins -= potion.price + data.coins -= price applyPotion(data, potion.bonus, potion.duration) updateStats(player) notify(player, ("🍀 +%d%% удачи, %d мин"):format(potion.bonus * 100, potion.duration / 60), GREEN) @@ -2760557,11 +2761915,12 @@ local function buy(player, kind, id) notify(player, "🔒 Нужен ур. " .. item.level, RED) return end - if data.coins < item.price then - notify(player, "Нужно " .. item.price .. " 💰", RED) + local price = Guild.price(data, item.price) + if data.coins < price then + notify(player, "Нужно " .. price .. " ⚪", RED) return end - data.coins -= item.price + data.coins -= price owned[id] = true bought = true notify(player, "✅ " .. item.name, GREEN) @@ -2760610,6 +2761969,11 @@ local function teleportTo(player, worldId) notify(player, ("🔒 %s: ур. %d"):format(world.name, world.level), RED) return end + local okRank, why = Guild.canEnter(data, world.id) + if not okRank then + notify(player, why, RED) + return + end markerName = world.id .. "Spawn" end local map = workspace:FindFirstChild("FishingMap") @@ -2760673,6 +2762037,10 @@ ProximityPromptService.PromptTriggered:Connect(function(prompt, player) remote:FireClient(player, "OpenRobux", "passes") elseif action == "RobuxProducts" then remote:FireClient(player, "OpenRobux", "products") + elseif action == "Guild" or action == "Orders" or action == "Bait" or action == "Traps" then + -- Старейшина, доска заказов, лавка наживки: окно гильдии на нужной вкладке + Guild.sendState(player) + remote:FireClient(player, "OpenGuild", ({ Guild = "rank", Orders = "orders", Bait = "bait", Traps = "traps" })[action]) end end) @@ -2760702,13 +2762070,13 @@ remote.OnServerEvent:Connect(function(player, action, a, b) if nearSeller(player) then sellItems(player, a) else - notify(player, "💰 Только у скупщика", Color3.fromRGB(255, 200, 120)) + notify(player, "⚪ Только у скупщика", Color3.fromRGB(255, 200, 120)) end elseif action == "SellAll" then if nearSeller(player) then sellItems(player, nil) else - notify(player, "💰 Только у скупщика", Color3.fromRGB(255, 200, 120)) + notify(player, "⚪ Только у скупщика", Color3.fromRGB(255, 200, 120)) end elseif action == "Teleport" then teleportTo(player, a) @@ -2760719,27 +2762087,38 @@ remote.OnServerEvent:Connect(function(player, action, a, b) elseif action == "RequestInventory" then sendInventory(player) sendQuests(player) + elseif action == "Settings" then + -- громкость музыки и эффектов (0..1), сохраняется вместе с прогрессом + local data = profiles[player] + local music, sfx = tonumber(a), tonumber(b) + if data and music and sfx then + data.settings = { music = math.clamp(music, 0, 1), sfx = math.clamp(sfx, 0, 1) } + player:SetAttribute("VolMusic", data.settings.music) + player:SetAttribute("VolSfx", data.settings.sfx) + end + elseif action == "AutoFish" then + setAutoFish(player, a == true) + else + Guild.onAction(player, action, a, b) end end) ---------------------------------------------------------------- донат -MarketplaceService.PromptGamePassPurchaseFinished:Connect(function(player, passId, purchased) - if not purchased then - return - end - for _, gp in ipairs(Config.GamePasses) do - if gp.id == passId then - passes[player] = passes[player] or {} - passes[player][gp.key] = true - notify(player, "✅ " .. gp.icon .. " " .. gp.name, GOLD) - if gp.key == "VIP" then - vipTag(player) - end - updateStats(player) +-- все покупки — Developer Products: и наборы (Config.Products), и пропуска навсегда (Config.GamePasses) +local function findProduct(productId) + for _, p in ipairs(Config.Products) do + if p.id == productId then + return p, false end end -end) + for _, gp in ipairs(Config.GamePasses) do + if gp.id == productId then + return gp, true + end + end + return nil +end MarketplaceService.ProcessReceipt = function(info) local player = Players:GetPlayerByUserId(info.PlayerId) @@ -2760752,19 +2762131,24 @@ MarketplaceService.ProcessReceipt = function(info) return Enum.ProductPurchaseDecision.PurchaseGranted end end - local product - for _, p in ipairs(Config.Products) do - if p.id == info.ProductId then - product = p - end - end + local product, isPass = findProduct(info.ProductId) if not product then + warn("ProcessReceipt: неизвестный товар " .. tostring(info.ProductId)) return Enum.ProductPurchaseDecision.NotProcessedYet end + if isPass then + data.passes[product.key] = true + passes[player] = passes[player] or {} + passes[player][product.key] = true + notify(player, "✅ " .. product.icon .. " " .. product.name .. " — навсегда!", GOLD) + if product.key == "VIP" then + vipTag(player) + end + end if product.coins then local coins = math.floor(product.coins * (1 + (data.level - 1) * 0.15)) data.coins += coins - notify(player, ("Спасибо! +%d 💰"):format(coins), GOLD) + notify(player, ("Спасибо! +%d ⚪"):format(coins), GOLD) end if product.boost then applyPotion(data, product.boost, product.duration) @@ -2760849,6 +2762233,7 @@ local function finishBoss(won) if potion then applyPotion(data, potion.bonus, potion.duration) end + Guild.onBossWin(p, data) updateStats(p) remote:FireClient(p, "BossReward", coins, xp, potion and potion.name) end @@ -2760906,7 +2762291,7 @@ local function onPlayerAdded(player) local ls = Instance.new("Folder") ls.Name = "leaderstats" ls.Parent = player - for _, name in ipairs({ "Монеты", "Уровень", "Улов" }) do + for _, name in ipairs({ "Серебро", "Уровень", "Улов" }) do local v = Instance.new("IntValue") v.Name = name v.Parent = ls @@ -2760916,13 +2762301,19 @@ local function onPlayerAdded(player) if not player.Parent then return end - loadPasses(player) + loadPasses(player, data) ensureChain(data) + Guild.defaults(data) + Guild.onJoin(player, data) profiles[player] = data loadedOk[player] = ok + local settings = type(data.settings) == "table" and data.settings or {} + player:SetAttribute("VolMusic", tonumber(settings.music) or Config.DefaultVolume.music) + player:SetAttribute("VolSfx", tonumber(settings.sfx) or Config.DefaultVolume.sfx) updateStats(player) sendInventory(player) sendQuests(player) + Guild.sendState(player) local function onCharacter() stopFishing(player, false) @@ -2760930,6 +2762321,7 @@ local function onPlayerAdded(player) giveRodTool(player) attachBag(player) vipTag(player) + Guild.badge(player) end player.CharacterAdded:Connect(onCharacter) if player.Character then @@ -2760945,6 +2762337,10 @@ end Players.PlayerRemoving:Connect(function(player) stopFishing(player, false) combo[player], comboUntil[player] = nil, nil + autoFishing[player] = nil + if profiles[player] then + Guild.onLeave(profiles[player]) + end saveData(player) profiles[player] = nil loadedOk[player] = nil @@ -2760953,21 +2762349,42 @@ end) game:BindToClose(function() for _, p in ipairs(Players:GetPlayers()) do + if profiles[p] then + Guild.onLeave(profiles[p]) + end saveData(p) end end) +-- погода и ночь меняют удачу: пересчитываем её у всех, когда они меняются +local function refreshAllStats() + for _, p in ipairs(Players:GetPlayers()) do + updateStats(p) + end +end +workspace:GetAttributeChangedSignal("Weather"):Connect(refreshAllStats) + -- таймер зелий + автосохранение task.spawn(function() local t = 0 + local wasNight = isNight() while true do task.wait(1) t += 1 + local night = isNight() + if night ~= wasNight then + wasNight = night + refreshAllStats() + end for _, p in ipairs(Players:GetPlayers()) do local data = profiles[p] if data and data.boostUntil > os.time() - 2 then updateStats(p) end + -- бонус отдыха тратится, пока игрок рыбачит + if data and (fishing[p] or autoFishing[p]) then + Guild.spendRest(p, data, 1) + end -- серия сгорает, если долго нет улова (пока рыба на крючке — ждём) if comboUntil[p] and os.time() > comboUntil[p] and not fishing[p] then breakCombo(p) @@ -2763853,9 +2765270,23 @@ local function spawnNpc(spot, parent) w.C0 = head.CFrame:Inverse() * p.CFrame w.Parent = p p.Parent = rig + return p + end + if spot:GetAttribute("Look") == "Elder" then + -- Старейшина Ворон: седые волосы и борода (цвет HatColor), чёрная повязка на глазу + local function elderPart(size, offset, color, shape) + local p = hatPart(size, offset, shape or Enum.PartType.Block) + p.Color = color + p.Material = Enum.Material.SmoothPlastic + end + elderPart(V(1.25, 0.35, 1.25), CFrame.new(0, 0.55, 0.05), colors.hat) + elderPart(V(1.0, 0.75, 0.35), CFrame.new(0, -0.55, -0.5), colors.hat) + elderPart(V(0.32, 0.3, 0.08), CFrame.new(0.22, 0.12, -0.6), Color3.fromRGB(20, 20, 22)) + elderPart(V(1.24, 0.08, 1.24), CFrame.new(0, 0.18, 0) * CFrame.Angles(0, 0, math.rad(-12)), Color3.fromRGB(20, 20, 22)) + else + 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 - 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 local action = spot:GetAttribute("NpcAction") if action then @@ -2763899,6 +2765330,924 @@ return Builder 30e450f77d4212330afb913d00000b83 + + + + ServerScriptService +-- Гильдия рыбаков: ранги F–S, печати и жемчуг, испытания у Старейшины, личные заказы на доске, +-- наживка, ловушки-вентери, бонус отдыха и жетон ранга над головой. +-- Данные игрока хранит GameServer (profiles); он же вызывает отсюда хуки (улов, вход, статы). + +local Players = game:GetService("Players") +local ReplicatedStorage = game:GetService("ReplicatedStorage") + +local Config = require(ReplicatedStorage:WaitForChild("FishConfig")) + +local Guild = {} +local api -- функции GameServer: profiles, notify, updateStats, addXp, sendInventory, bagCapacity, isNight, weather, remote +local RANKS = Config.Guild.ranks +local GOLD = Color3.fromRGB(255, 214, 120) +local RED = Color3.fromRGB(255, 120, 120) +local GREEN = Color3.fromRGB(150, 230, 130) + +function Guild.init(a) + api = a + -- только в Studio: проверки из командной строки/MCP (ServerStorage.GuildDebug:Invoke("get", player, "seals")) + if game:GetService("RunService"):IsStudio() then + local f = Instance.new("BindableFunction") + f.Name = "GuildDebug" + f.OnInvoke = function(op, player, key, value, extra) + local data = api.profiles[player] + if not data then + return nil + end + if op == "get" then + return data[key] + elseif op == "set" then + data[key] = value + api.updateStats(player) + elseif op == "addItem" then + key.uid = data.nextUid + data.nextUid += 1 + table.insert(data.items, key) + api.sendInventory(player) + api.updateStats(player) + elseif op == "action" then + Guild.onAction(player, key, value, extra) + elseif op == "orders" then + Guild.refreshOrders(data, player) + return data.orders.list + end + return true + end + f.Parent = game:GetService("ServerStorage") + end +end + +---------------------------------------------------------------- данные + +-- новые поля (старые сохранения грузятся: чего нет — дополняем) +function Guild.defaults(data) + data.pearls = data.pearls or 0 + data.seals = data.seals or 0 + data.trial = data.trial -- { rank = номер ранга, progress = n } или nil + if type(data.orders) ~= "table" then + data.orders = { window = -1, list = {} } + end + if type(data.bait) ~= "table" then + data.bait = { equipped = nil, counts = {} } + end + data.bait.counts = data.bait.counts or {} + if type(data.traps) ~= "table" then + data.traps = {} + end + data.rest = data.rest or 0 + if not data.rank then + -- сохранение до гильдии: кто уже дошёл до дальних миров, сохраняет к ним доступ + local lvl = data.level or 1 + data.rank = (lvl >= 18 and 5) or (lvl >= 8 and 3) or 1 + if data.rank > 1 then + data.seals = math.max(data.seals, RANKS[data.rank].seals) + end + end +end + +-- данные игрока (для проверок из Studio) +function Guild.profile(player) + return api.profiles[player] +end + +function Guild.rank(data) + return RANKS[math.clamp(data.rank or 1, 1, #RANKS)], data.rank or 1 +end + +local function nearSpot(player, attr) + local hrp = player.Character and player.Character:FindFirstChild("HumanoidRootPart") + local map = workspace:FindFirstChild("FishingMap") + if not hrp or not map then + return false + end + for _, d in ipairs(map:GetDescendants()) do + if d:IsA("BasePart") and d:GetAttribute(attr) then + if (d.Position - hrp.Position).Magnitude <= Config.Guild.elderDistance then + return true + end + end + end + return false +end + +---------------------------------------------------------------- жетон ранга над головой + +function Guild.badge(player) + local data = api.profiles[player] + local head = player.Character and player.Character:FindFirstChild("Head") + if not data or not head then + return + end + local r = Guild.rank(data) + local bb = head:FindFirstChild("RankBadge") + if not bb then + bb = Instance.new("BillboardGui") + bb.Name = "RankBadge" + bb.Size = UDim2.fromOffset(46, 52) + bb.StudsOffset = Vector3.new(0, 2.4, 0) + bb.MaxDistance = 70 + bb.LightInfluence = 0 + bb.Parent = head + -- щит: ромб с золотой каймой и буквой + local shield = Instance.new("Frame") + shield.Name = "Shield" + shield.Size = UDim2.fromOffset(34, 34) + shield.AnchorPoint = Vector2.new(0.5, 0.5) + shield.Position = UDim2.fromScale(0.5, 0.5) + shield.Rotation = 45 + shield.Parent = bb + local c = Instance.new("UICorner") + c.CornerRadius = UDim.new(0, 6) + c.Parent = shield + local s = Instance.new("UIStroke") + s.Color = Color3.fromRGB(218, 172, 92) + s.Thickness = 3 + s.Parent = shield + local g = Instance.new("UIGradient") + g.Color = ColorSequence.new(Color3.new(1, 1, 1), Color3.fromRGB(150, 150, 150)) + g.Rotation = 45 + g.Parent = shield + local t = Instance.new("TextLabel") + t.Name = "Letter" + t.Size = UDim2.fromScale(1, 1) + t.BackgroundTransparency = 1 + t.FontFace = Font.new("rbxasset://fonts/families/Merriweather.json", Enum.FontWeight.Heavy) + t.TextScaled = true + t.TextColor3 = Color3.new(1, 1, 1) + t.TextStrokeTransparency = 0.2 + t.TextStrokeColor3 = Color3.fromRGB(40, 28, 20) + t.ZIndex = 2 + t.Parent = bb + end + bb.Shield.BackgroundColor3 = r.color + bb.Shield.UIGradient.Color = r.id == "S" + and ColorSequence.new({ + ColorSequenceKeypoint.new(0, Color3.fromRGB(255, 120, 120)), ColorSequenceKeypoint.new(0.35, Color3.fromRGB(255, 230, 120)), + ColorSequenceKeypoint.new(0.7, Color3.fromRGB(120, 230, 255)), ColorSequenceKeypoint.new(1, Color3.fromRGB(220, 130, 255)), + }) + or ColorSequence.new(Color3.new(1, 1, 1), Color3.fromRGB(150, 150, 150)) + bb.Shield.UIStroke.Color = (r.id == "S" or r.id == "A") and Color3.fromRGB(255, 225, 130) or Color3.fromRGB(218, 172, 92) + bb.Letter.Text = r.id + -- корона VIP — над жетоном + local vip = head:FindFirstChild("VipTag") + if vip then + vip.StudsOffset = Vector3.new(0, 4, 0) + end +end + +---------------------------------------------------------------- состояние для клиента + +local function orderText(o) + local f = o.fish and Config.FindFish(o.fish) + if o.kind == "deliver" then + return ("Сдай %d × %s"):format(o.count, f and f.name or "?") + elseif o.kind == "heavy" then + return ("Принеси %s тяжелее %.1f кг"):format(f and f.name or "?", o.minW) + elseif o.kind == "weather" then + return ("Поймай %d рыб в дождь или грозу"):format(o.count) + elseif o.kind == "night" then + return ("Поймай %d «Необычных» или реже ночью"):format(o.count) + elseif o.kind == "combo" then + return ("Набери серию из %d рыб"):format(o.count) + elseif o.kind == "perfect" then + return ("Сделай %d забросов в зелёную зону"):format(o.count) + end + return o.kind +end +Guild.orderText = orderText + +local function trialState(data) + local nextRank = RANKS[(data.rank or 1) + 1] + if not nextRank then + return nil + end + local active = data.trial and data.trial.rank == data.rank + 1 + local t = nextRank.trial + local goal = t.count or 1 + local progress = active and data.trial.progress or 0 + if t.kind == "dex" then + local zone = Config.Zones[t.world] + goal, progress = #zone.fish, 0 + for _, f in ipairs(zone.fish) do + if data.discovered[f.id] then + progress += 1 + end + end + end + return { + rank = data.rank + 1, text = t.text, active = active, progress = progress, goal = goal, + ready = data.seals >= nextRank.seals, + } +end + +function Guild.sendState(player) + local data = api.profiles[player] + if not data then + return + end + Guild.refreshOrders(data, player) + local list = {} + for i, o in ipairs(data.orders.list) do + list[i] = { + kind = o.kind, text = orderText(o), progress = o.progress, count = o.count, done = o.done, + seals = o.seals, coins = o.coins, pearls = o.pearls, deliver = (o.kind == "deliver" or o.kind == "heavy"), + } + end + local now = os.time() + local traps = {} + for i, t0 in ipairs(data.traps) do + traps[i] = math.min(Config.Traps.max, math.floor((now - t0) / Config.Traps.every)) + end + api.remote:FireClient(player, "Guild", { + trial = trialState(data), + orders = list, + ordersEnd = (data.orders.window + 1) * Config.Orders.period, + traps = traps, trapSlots = Guild.rank(data).traps or 0, trapEvery = Config.Traps.every, trapMax = Config.Traps.max, + baits = data.bait.counts, bait = data.bait.equipped, + }) +end + +-- атрибуты игрока (HUD и окна читают их) +function Guild.attrs(player, data) + local r, idx = Guild.rank(data) + player:SetAttribute("Pearls", data.pearls) + player:SetAttribute("Seals", data.seals) + player:SetAttribute("GuildRank", r.id) + player:SetAttribute("RankIdx", idx) + local nextRank = RANKS[idx + 1] + player:SetAttribute("SealsNext", nextRank and nextRank.seals or nil) + player:SetAttribute("RestLeft", math.floor(data.rest)) + player:SetAttribute("Bait", data.bait.equipped) + player:SetAttribute("BaitCount", data.bait.equipped and (data.bait.counts[data.bait.equipped] or 0) or 0) + local ready = 0 + for _, t0 in ipairs(data.traps) do + ready += math.min(Config.Traps.max, math.floor((os.time() - t0) / Config.Traps.every)) + end + player:SetAttribute("TrapFish", ready) +end + +---------------------------------------------------------------- ранги и испытания + +local function rankUp(player, data) + data.rank += 1 + data.trial = nil + data.pearls += Config.Pearls.rankUp + local r = RANKS[data.rank] + -- новые ловушки начинают копить с этого момента + while #data.traps < (r.traps or 0) do + table.insert(data.traps, os.time()) + end + api.remote:FireClient(player, "RankUp", r.id, r.name, r.unlocks, Config.Pearls.rankUp) + for _, p in ipairs(Players:GetPlayers()) do + api.notify(p, ("⚔ %s получил ранг %s — «%s»!"):format(player.DisplayName, r.id, r.name), GOLD) + end + Guild.badge(player) + api.updateStats(player) + Guild.sendState(player) +end + +local function trialProgress(player, data, amount) + local st = data.trial + local nextRank = RANKS[data.rank + 1] + if not st or not nextRank or st.rank ~= data.rank + 1 then + return + end + st.progress = (st.progress or 0) + amount + if st.progress >= (nextRank.trial.count or 1) then + rankUp(player, data) + else + Guild.sendState(player) + end +end + +local function checkDexTrial(player, data) + local st = data.trial + local nextRank = RANKS[data.rank + 1] + if st and nextRank and st.rank == data.rank + 1 and nextRank.trial.kind == "dex" then + local s = trialState(data) + if s.progress >= s.goal then + rankUp(player, data) + end + end +end + +local function takeTrial(player, data) + local nextRank = RANKS[data.rank + 1] + if not nextRank then + api.notify(player, "👑 Ты уже Легенда гильдии!", GOLD) + return + end + if data.seals < nextRank.seals then + api.notify(player, ("📜 Нужно %d печатей (у тебя %d)"):format(nextRank.seals, data.seals), RED) + return + end + if not nearSpot(player, "GuildElder") then + api.notify(player, "⚔ Испытание выдаёт " .. Config.Guild.elder .. " — он в здании гильдии в лобби", Color3.fromRGB(255, 200, 120)) + return + end + local t = nextRank.trial + if t.kind == "deliver" then + -- сдать рыбу из сумки сразу, если она есть + local have, keep = 0, {} + for _, item in ipairs(data.items) do + if item.id == t.fish and have < t.count then + have += 1 + else + table.insert(keep, item) + end + end + if have < t.count then + local f = Config.FindFish(t.fish) + api.notify(player, ("🐟 Принеси %d × %s (в сумке %d)"):format(t.count, f and f.name or t.fish, have), RED) + data.trial = { rank = data.rank + 1, progress = 0 } + Guild.sendState(player) + return + end + data.items = keep + api.sendInventory(player) + data.trial = { rank = data.rank + 1, progress = 0 } + trialProgress(player, data, t.count) + return + end + if not (data.trial and data.trial.rank == data.rank + 1) then + data.trial = { rank = data.rank + 1, progress = 0 } + api.notify(player, "⚔ Испытание принято: " .. t.text, GOLD) + end + if t.kind == "dex" then + checkDexTrial(player, data) + end + Guild.sendState(player) +end + +---------------------------------------------------------------- заказы + +local function pick(rng, weights) + local total = 0 + for _, w in pairs(weights) do + total += w + end + local roll = rng:NextNumber() * total + for k, w in pairs(weights) do + roll -= w + if roll <= 0 then + return k + end + end + return next(weights) +end + +-- рыба для заказов: из миров, куда игрок уже может попасть +local function fishPool(data, rarities) + local pool = {} + for _, w in ipairs(Config.Worlds) do + local zone = Config.Zones[w.id] + local needRank = Config.Guild.worldRank[w.id] or 1 + if zone and not w.soon and data.level >= w.level and data.rank >= needRank then + for _, f in ipairs(zone.fish) do + if rarities[f.rarity] then + table.insert(pool, f) + end + end + end + end + return pool +end + +local function makeOrder(data, rng) + local O = Config.Orders + local weights = {} + for k, v in pairs(O.kinds) do + weights[k] = v.weight + end + -- порядок ключей в pairs не задан: сортируем, чтобы при одном зерне выпадало одно и то же + local kind + do + local keys = {} + for k in pairs(weights) do + table.insert(keys, k) + end + table.sort(keys) + local total = 0 + for _, k in ipairs(keys) do + total += weights[k] + end + local roll = rng:NextNumber() * total + for _, k in ipairs(keys) do + roll -= weights[k] + if roll <= 0 then + kind = k + break + end + end + kind = kind or keys[1] + end + local r = data.rank or 1 + local hard = rng:NextNumber() -- сложность заказа 0..1 + local o = { kind = kind, progress = 0, done = false } + if kind == "deliver" then + local pool = fishPool(data, r >= 3 and { Common = true, Uncommon = true, Rare = true } or { Common = true, Uncommon = true }) + local f = pool[rng:NextInteger(1, #pool)] + local rank = Config.Rarities[f.rarity].rank + o.fish = f.id + o.count = math.max(1, math.floor((rank == 1 and 5 or (rank == 2 and 3 or 1)) * (0.7 + hard * 0.8) + 0.5)) + elseif kind == "heavy" then + local pool = fishPool(data, { Uncommon = true, Rare = true }) + local f = pool[rng:NextInteger(1, #pool)] + o.fish = f.id + o.count = 1 + o.minW = math.floor((f.minW + (f.maxW - f.minW) * (0.25 + hard * 0.3)) * 10) / 10 + elseif kind == "weather" then + o.count = 2 + math.floor(hard * 3) + r + elseif kind == "night" then + o.count = 1 + math.floor(hard * 2) + math.floor(r / 2) + elseif kind == "combo" then + o.count = math.min(15, 4 + math.floor(hard * 4) + r) + elseif kind == "perfect" then + o.count = 3 + math.floor(hard * 4) + r + end + local s = O.kinds[kind].seals + o.seals = math.floor(s[1] + (s[2] - s[1]) * hard + 0.5) + (r - 1) * 2 + o.coins = math.floor(o.seals * O.coinsPerSeal * (1 + 0.5 * (r - 1))) + o.pearls = rng:NextNumber() < O.pearlChance and rng:NextInteger(O.pearlsMin, O.pearlsMax) or 0 + return o +end + +-- новое окно (каждые 3 часа) — новые заказы; на ранге E и выше их 4 +function Guild.refreshOrders(data, player) + local window = math.floor(os.time() / Config.Orders.period) + local want = Guild.rank(data).orders + if data.orders.window ~= window then + local seed = ((player and player.UserId or 0) % 100000) * 7919 + window + local rng = Random.new(seed) + data.orders = { window = window, list = {} } + local seen = {} + for i = 1, want do + -- без повторов: один и тот же тип с той же рыбой не выпадает дважды + local o + for _ = 1, 6 do + o = makeOrder(data, rng) + if not seen[o.kind .. (o.fish or "")] then + break + end + end + seen[o.kind .. (o.fish or "")] = true + data.orders.list[i] = o + end + else + -- ранг вырос посреди окна: добавляем недостающий заказ + local seen = {} + for _, o in ipairs(data.orders.list) do + seen[o.kind .. (o.fish or "")] = true + end + while #data.orders.list < want do + local o + for _ = 1, 6 do + o = makeOrder(data, Random.new()) + if not seen[o.kind .. (o.fish or "")] then + break + end + end + seen[o.kind .. (o.fish or "")] = true + table.insert(data.orders.list, o) + end + end +end + +local function finishOrder(player, data, o) + o.done = true + data.seals += o.seals + data.coins += o.coins + data.pearls += o.pearls + api.notify(player, ("📜 Заказ выполнен! +%d печатей +%d ⚪%s"):format(o.seals, o.coins, o.pearls > 0 and (" +" .. o.pearls .. " 🦪") or ""), GOLD) + api.remote:FireClient(player, "OrderDone") + local nextRank = RANKS[data.rank + 1] + if nextRank and data.seals >= nextRank.seals and data.seals - o.seals < nextRank.seals then + api.notify(player, ("⚔ Печатей хватает на ранг %s! Иди к Старейшине за испытанием"):format(nextRank.id), GOLD) + end + api.updateStats(player) + Guild.sendState(player) +end + +local function deliverOrder(player, data, i) + Guild.refreshOrders(data, player) + local o = data.orders.list[i] + if not o or o.done or (o.kind ~= "deliver" and o.kind ~= "heavy") then + return + end + if not nearSpot(player, "OrderBoard") then + api.notify(player, "📜 Рыбу сдают у доски заказов в здании гильдии", Color3.fromRGB(255, 200, 120)) + return + end + local need = o.count - o.progress + local keep = {} + -- сдаём сначала самую дешёвую подходящую рыбу + local fit = {} + for _, item in ipairs(data.items) do + if item.id == o.fish and (not o.minW or item.weight >= o.minW) then + table.insert(fit, item) + end + end + table.sort(fit, function(a, b) + return a.value < b.value + end) + local take = {} + for k = 1, math.min(need, #fit) do + take[fit[k].uid] = true + end + local given = 0 + for _, item in ipairs(data.items) do + if take[item.uid] then + given += 1 + else + table.insert(keep, item) + end + end + if given == 0 then + local f = Config.FindFish(o.fish) + api.notify(player, ("🎒 В сумке нет подходящей рыбы: %s"):format(f and f.name or o.fish), RED) + return + end + data.items = keep + o.progress += given + api.sendInventory(player) + if o.progress >= o.count then + finishOrder(player, data, o) + else + api.updateStats(player) + Guild.sendState(player) + end +end + +local function rerollOrder(player, data, i) + Guild.refreshOrders(data, player) + local o = data.orders.list[i] + if not o or o.done then + return + end + local cost = Config.Orders.rerollPearls + if data.pearls < cost then + api.notify(player, ("🦪 Нужно %d жемчуга"):format(cost), RED) + return + end + data.pearls -= cost + data.orders.list[i] = makeOrder(data, Random.new()) + api.updateStats(player) + Guild.sendState(player) +end + +---------------------------------------------------------------- улов: заказы, испытания, жемчуг + +-- ctx: { weather = id, night = bool, perfect = bool (заброс в зелёную зону), streak = n, auto = bool } +function Guild.onCatch(player, data, fish, ctx) + local rank = Config.Rarities[fish.rarity].rank + -- жемчуг за мутацию + local pearls = fish.mutation and Config.Pearls.mutation[fish.mutation] or 0 + if pearls > 0 then + data.pearls += pearls + api.notify(player, ("🦪 +%d жемчуга за мутацию!"):format(pearls), Color3.fromRGB(235, 225, 245)) + end + local rainy = ctx.weather == "Rain" or ctx.weather == "Storm" + -- заказы «по ходу» + Guild.refreshOrders(data, player) + local changed = false + for _, o in ipairs(data.orders.list) do + if not o.done then + local add = 0 + if o.kind == "weather" and rainy then + add = 1 + elseif o.kind == "night" and ctx.night and rank >= 2 then + add = 1 + elseif o.kind == "perfect" and ctx.perfect then + add = 1 + elseif o.kind == "combo" and (ctx.streak or 0) > o.progress then + o.progress = math.min(o.count, ctx.streak) + changed = true + if o.progress >= o.count then + finishOrder(player, data, o) + end + end + if add > 0 then + o.progress = math.min(o.count, o.progress + add) + changed = true + if o.progress >= o.count then + finishOrder(player, data, o) + end + end + end + end + -- испытание + local nextRank = RANKS[data.rank + 1] + if data.trial and nextRank and data.trial.rank == data.rank + 1 then + local t = nextRank.trial + if t.kind == "catch" and rank >= (t.minRank or 1) + and (not t.weathers or t.weathers[ctx.weather]) + and (not t.night or ctx.night) then + trialProgress(player, data, 1) + elseif t.kind == "dex" then + checkDexTrial(player, data) + end + end + if changed or pearls > 0 then + Guild.sendState(player) + end +end + +-- победа над боссом: испытание ранга C и жемчуг +function Guild.onBossWin(player, data) + data.pearls += Config.Pearls.boss + api.notify(player, ("🦪 +%d жемчуга за босса!"):format(Config.Pearls.boss), Color3.fromRGB(235, 225, 245)) + local nextRank = RANKS[data.rank + 1] + if data.trial and nextRank and data.trial.rank == data.rank + 1 and nextRank.trial.kind == "bossWin" then + trialProgress(player, data, 1) + end +end + +---------------------------------------------------------------- миры, скидки + +function Guild.canEnter(data, worldId) + local need = Config.Guild.worldRank[worldId] + if need and (data.rank or 1) < need then + return false, ("🔒 Нужен ранг гильдии %s"):format(RANKS[need].id) + end + return true +end + +function Guild.price(data, price) + local d = Guild.rank(data).discount or 0 + return math.floor(price * (1 - d) + 0.5) +end + +---------------------------------------------------------------- наживка + +function Guild.bait(data) + local id = data.bait.equipped + if id and (data.bait.counts[id] or 0) > 0 then + return Config.Find(Config.Baits, id) + end + return nil +end + +-- тратим 1 штуку на заброс; кончилась — слот пустеет +function Guild.useBait(player, data) + local b = Guild.bait(data) + if not b then + return nil + end + data.bait.counts[b.id] -= 1 + if data.bait.counts[b.id] <= 0 then + data.bait.counts[b.id] = nil + data.bait.equipped = nil + api.notify(player, b.icon .. " " .. b.name .. " закончился", Color3.fromRGB(255, 200, 120)) + end + player:SetAttribute("BaitCount", data.bait.equipped and (data.bait.counts[data.bait.equipped] or 0) or 0) + player:SetAttribute("Bait", data.bait.equipped) + return b +end + +local function buyBait(player, data, id) + local b = Config.Find(Config.Baits, id) + if not b then + return + end + if b.rank and data.rank < b.rank then + api.notify(player, ("🔒 Нужен ранг гильдии %s"):format(RANKS[b.rank].id), RED) + return + end + if b.currency == "pearls" then + if data.pearls < b.price then + api.notify(player, ("Нужно %d 🦪"):format(b.price), RED) + return + end + data.pearls -= b.price + else + local price = Guild.price(data, b.price) + if data.coins < price then + api.notify(player, ("Нужно %d ⚪"):format(price), RED) + return + end + data.coins -= price + end + data.bait.counts[b.id] = (data.bait.counts[b.id] or 0) + b.pack + if not Guild.bait(data) then + data.bait.equipped = b.id + end + api.notify(player, ("%s +%d × %s"):format(b.icon, b.pack, b.name), GREEN) + api.updateStats(player) + Guild.sendState(player) +end + +local function equipBait(player, data, id) + if id == nil or id == "" then + data.bait.equipped = nil + elseif (data.bait.counts[id] or 0) > 0 then + data.bait.equipped = id + else + return + end + api.updateStats(player) + Guild.sendState(player) +end + +---------------------------------------------------------------- ловушки + +local function rollTrapFish(rng) + local T = Config.Traps + local rarity = pick(rng, T.rarities) + local pool = {} + for _, f in ipairs(Config.Zones[T.world].fish) do + if f.rarity == rarity then + table.insert(pool, f) + end + end + local f = pool[rng:NextInteger(1, #pool)] + local wf = rng:NextNumber() ^ 2.2 + return { + id = f.id, name = f.name, rarity = f.rarity, + weight = math.floor((f.minW + (f.maxW - f.minW) * wf) * 100) / 100, + value = math.floor(f.price * (0.75 + 0.9 * wf) + 0.5), + } +end + +local function collectTraps(player, data) + local T = Config.Traps + local now = os.time() + local cap = api.bagCapacity(player, data) + local rng = Random.new() + local got = 0 + for i, t0 in ipairs(data.traps) do + local ready = math.min(T.max, math.floor((now - t0) / T.every)) + local take = math.min(ready, cap - #data.items) + for _ = 1, take do + local f = rollTrapFish(rng) + f.uid = data.nextUid + data.nextUid += 1 + table.insert(data.items, f) + local rec = data.discovered[f.id] + if not rec then + data.discovered[f.id] = { count = 1, best = f.weight } + else + rec.count += 1 + end + end + got += take + -- что не влезло, остаётся в ловушке; полная ловушка дальше не копит + local left = ready - take + data.traps[i] = now - left * T.every + end + if got == 0 then + api.notify(player, #data.traps == 0 and "🧺 Ловушки — с ранга D" or ((#data.items >= cap) and "🎒 Сумка полна!" or "🧺 В ловушках пока пусто"), Color3.fromRGB(255, 200, 120)) + else + data.totalCaught += got + api.notify(player, ("🧺 Из ловушек: +%d рыб"):format(got), GREEN) + api.sendInventory(player) + end + api.updateStats(player) + Guild.sendState(player) +end + +---------------------------------------------------------------- отдых + +function Guild.onJoin(player, data) + local last = data.lastOnline + if last and last > 0 then + local away = os.time() - last + data.rest = math.min(Config.Rest.max, (data.rest or 0) + away / Config.Rest.perOffline) + end + -- ловушки по рангу (старые сохранения, ранг выдан миграцией) + while #data.traps < (Guild.rank(data).traps or 0) do + table.insert(data.traps, os.time()) + end +end + +function Guild.onLeave(data) + data.lastOnline = os.time() +end + +-- множитель опыта: двойной, пока есть отдых +function Guild.xpMult(data) + return (data.rest or 0) > 0 and Config.Rest.mult or 1 +end + +-- отдых тратится секундами, пока игрок рыбачит +function Guild.spendRest(player, data, seconds) + if (data.rest or 0) > 0 then + data.rest = math.max(0, data.rest - seconds) + player:SetAttribute("RestLeft", math.floor(data.rest)) + end +end + +---------------------------------------------------------------- события от клиента + +function Guild.onAction(player, action, a, b) + local data = api.profiles[player] + if not data then + return false + end + if action == "GuildState" then + Guild.sendState(player) + elseif action == "TakeTrial" then + takeTrial(player, data) + elseif action == "DeliverOrder" then + deliverOrder(player, data, tonumber(a)) + elseif action == "RerollOrder" then + rerollOrder(player, data, tonumber(a)) + elseif action == "BuyBait" then + buyBait(player, data, a) + elseif action == "EquipBait" then + equipBait(player, data, a) + elseif action == "CollectTraps" then + collectTraps(player, data) + else + return false + end + return true +end + +return Guild +]]> + {A6140B7E-7052-4615-8FCE-342CE4164B1B} + + 0 + false + 00000000000000000000000000000000 + Guild + + -1 + yuZpQdnvvUBOTYh1jqZ2cA== + 7d5633f4c280c36c0afca57d00004261 + + + + + ServerScriptService +-- Общие для всего сервера время суток и погода. Ничего не рисует — только выставляет атрибуты workspace: +-- DayStart — серверное время начала суток (часы считает Config.ClockAt) +-- Weather — id погоды из Config.Weathers +-- WeatherEnds — когда сменится (workspace:GetServerTimeNow()) +-- Небо, дождь, звуки и свет делает клиент (Ambience), бонусы к рыбалке учитывает GameServer. + +local ReplicatedStorage = game:GetService("ReplicatedStorage") +local Config = require(ReplicatedStorage:WaitForChild("FishConfig")) + +local rng = Random.new() + +if Config.DayNight.enabled then + workspace:SetAttribute("DayStart", workspace:GetServerTimeNow()) +end + +local function pickWeather(previous) + local total = 0 + for _, w in ipairs(Config.Weathers) do + if w.id ~= previous then + total += w.weight + end + end + local roll = rng:NextNumber() * total + for _, w in ipairs(Config.Weathers) do + if w.id ~= previous then + roll -= w.weight + if roll <= 0 then + return w + end + end + end + return Config.Weathers[1] +end + +task.spawn(function() + -- первая погода всегда ясная: новичок видит мир чистым + local current = Config.Weathers[1] + while true do + local duration = rng:NextInteger(current.duration[1], current.duration[2]) + workspace:SetAttribute("Weather", current.id) + workspace:SetAttribute("WeatherEnds", workspace:GetServerTimeNow() + duration) + task.wait(duration) + current = pickWeather(current.id) + end +end) +]]> + false + + 0 + {E98F6BC0-A8FE-4D49-BF37-B358D220F1B4} + + 0 + false + 00000000000000000000000000000000 + WeatherServer + + -1 + yuZpQdnvvUBOTYh1jqZ2cA== + 7d5633f4c280c36c0afca57d00004263 + + diff --git a/install/1_FishConfig_ReplicatedStorage.rbxmx b/install/1_FishConfig_ReplicatedStorage.rbxmx index e5ef4b7..029c8a1 100644 --- a/install/1_FishConfig_ReplicatedStorage.rbxmx +++ b/install/1_FishConfig_ReplicatedStorage.rbxmx @@ -365,7 +365,6 @@ Config.QuestKinds = { perfectCast = { text = "Забрось в зелёную зону %d %s", forms = TIMES, coins = 8, xp = 6 }, combo = { text = "Набери серию из %d рыб", coins = 12, xp = 10, max = 15 }, sell = { text = "Продай %d %s", forms = FISH, coins = 3, xp = 3 }, -<<<<<<< HEAD earn = { text = "Заработай %d ⚪ на продаже", coins = 0.25, xp = 0.2, byLevel = true }, buy = { text = "Купи что-нибудь в магазине", coins = 40, xp = 30, max = 1 }, boss = { text = "Нанеси боссу %d урона", coins = 15, xp = 12 }, @@ -378,40 +377,6 @@ Config.QuestChains = { } Config.QuestTierGrowth = 0.5 -- каждый следующий круг цепочек: цели ×(1 + 0.5 · номер круга) Config.ChainBonus = { coins = 120, xp = 100, potion = "Luck1" } -- за всю цепочку (растёт с уровнем и кругом) -======= - earn = { text = "Заработай %d 💰 на продаже", coins = 0.25, xp = 0.2, byLevel = true }, - buy = { text = "Купи что-нибудь в магазине", coins = 40, xp = 30, max = 1 }, - boss = { text = "Нанеси боссу %d урона", coins = 15, xp = 12 }, -} -Config.QuestChains = { - { name = "🎣 Утренний клёв", steps = { { "catch", 3 }, { "perfectCast", 2 }, { "sell", 3 }, { "catch", 5 }, { "uncommon", 1 } } }, - { name = "🔥 Без промаха", steps = { { "perfect", 3 }, { "combo", 3 }, { "catch", 6 }, { "earn", 80 }, { "combo", 5 } } }, - { name = "💎 Охота за редкостью", steps = { { "uncommon", 3 }, { "perfectCast", 3 }, { "rare", 1 }, { "sell", 8 }, { "buy", 1 } } }, - { name = "🏆 Мастер озера", steps = { { "combo", 6 }, { "catch", 10 }, { "perfect", 6 }, { "rare", 2 }, { "earn", 300 } } }, -} -Config.QuestTierGrowth = 0.5 -- каждый следующий круг цепочек: цели ×(1 + 0.5 · номер круга) -Config.ChainBonus = { coins = 120, xp = 100, potion = "Luck1" } -- за всю цепочку (растёт с уровнем и кругом) - ----------------------------------------------------------------- серия улова --- каждая рыба подряд без срыва: +10% к цене и опыту следующей, до ×2; --- срыв, ушедшая рыба или timeout секунд без улова — серия сгорает -Config.Combo = { step = 0.1, max = 2.0, timeout = 90 } - ----------------------------------------------------------------- босс озера --- раз в interval секунд в мир, где больше всего игроков, приплывает босс. Его ловят всем сервером: --- каждая пойманная там рыба наносит урон = ранг редкости (+1 за подсечку без промаха). --- Если за duration секунд урона хватило — награда всем, кто помог (× mult мира, минимум 40% за малый вклад) -Config.Boss = { - firstDelay = 240, interval = 600, duration = 180, - hpPerPlayer = 12, - reward = { coins = 300, xp = 250, potion = "Luck1" }, - worlds = { - World1 = { name = "Сом-великан", fish = "Som", mutation = "Golden", scale = 5 }, - World2 = { name = "Королевская акула", fish = "Shark", mutation = "Golden", scale = 3 }, - World3 = { name = "Ледяной левиафан", fish = "Leviathan", mutation = "Rainbow", scale = 2.5 }, - }, -} ->>>>>>> 1ff7ef7e83a97a0e100d5c3805ebc4ad762a2806 ---------------------------------------------------------------- серия улова -- каждая рыба подряд без срыва: +10% к цене и опыту следующей, до ×2; @@ -555,19 +520,21 @@ Config.Sounds = { Config.DefaultVolume = { music = 0.6, sfx = 0.8 } ---------------------------------------------------------------- донат (Robux) --- ВАЖНО: впиши сюда ID своих пропусков и товаров с create.roblox.com. +-- Все товары — Developer Products игры (create.roblox.com → Monetization → Developer Products); +-- id — Product ID оттуда, robux — цена для кнопки (должна совпадать с ценой в Roblox). +-- Пропуска тоже Developer Products: покупаются один раз, сервер запоминает их в данных игрока навсегда. -- Пока id = 0, кнопка покупки покажет подсказку, что товар не настроен. Config.GamePasses = { - { key = "VIP", id = 0, robux = 199, icon = "👑", name = "VIP", desc = "+25% удачи и серебра, корона над головой" }, - { key = "DoubleCoins", id = 0, robux = 299, icon = "⚪", name = "x2 Серебро", desc = "Вся рыба продаётся в 2 раза дороже" }, - { key = "LuckyCharm", id = 0, robux = 349, icon = "🍀", name = "Талисман удачи", desc = "+50% удачи навсегда" }, - { key = "BigBag", id = 0, robux = 149, icon = "🎒", name = "Бездонная сумка", desc = "+100 мест в любой сумке" }, + { key = "VIP", id = 3728143641, robux = 199, icon = "👑", name = "VIP", desc = "+25% удачи и серебра, корона над головой" }, + { key = "DoubleCoins", id = 3728143692, robux = 299, icon = "⚪", name = "x2 Серебро", desc = "Вся рыба продаётся в 2 раза дороже" }, + { key = "LuckyCharm", id = 3728143735, robux = 349, icon = "🍀", name = "Талисман удачи", desc = "+50% удачи навсегда" }, + { key = "BigBag", id = 3728143773, robux = 149, icon = "🎒", name = "Бездонная сумка", desc = "+100 мест в любой сумке" }, } Config.Products = { - { key = "Coins1", id = 0, robux = 49, icon = "👝", name = "Кошель серебра", desc = "+1 000 серебра (больше с уровнем)", coins = 1000 }, - { key = "Coins2", id = 0, robux = 199, icon = "⚪", name = "Сундук серебра", desc = "+5 000 серебра (больше с уровнем)", coins = 5000 }, - { key = "Coins3", id = 0, robux = 599, icon = "🏆", name = "Гора золота", desc = "+20 000 серебра (больше с уровнем)", coins = 20000 }, - { key = "Luck", id = 0, robux = 99, icon = "🧪", name = "Супер-зелье удачи", desc = "+200% удачи на 15 минут", boost = 2.0, duration = 900 }, + { key = "Coins1", id = 3728142264, robux = 49, icon = "👝", name = "Кошель серебра", desc = "+1 000 серебра (больше с уровнем)", coins = 1000 }, + { key = "Coins2", id = 3728142848, robux = 199, icon = "⚪", name = "Сундук серебра", desc = "+5 000 серебра (больше с уровнем)", coins = 5000 }, + { key = "Coins3", id = 3728142885, robux = 599, icon = "🏆", name = "Гора золота", desc = "+20 000 серебра (больше с уровнем)", coins = 20000 }, + { key = "Luck", id = 3728142916, robux = 99, icon = "🧪", name = "Супер-зелье удачи", desc = "+200% удачи на 15 минут", boost = 2.0, duration = 900 }, } ---------------------------------------------------------------- рыбалка diff --git a/install/4_GameServer_ServerScriptService.rbxmx b/install/4_GameServer_ServerScriptService.rbxmx index bc41010..f08125c 100644 --- a/install/4_GameServer_ServerScriptService.rbxmx +++ b/install/4_GameServer_ServerScriptService.rbxmx @@ -46,6 +46,7 @@ local function defaultData() chain = { index = 1, step = 1, progress = 0, tier = 0 }, daily = { last = 0, streak = 0 }, boostUntil = 0, boostBonus = 0, totalCaught = 0, nextUid = 1, receipts = {}, + passes = {}, -- купленные пропуска (Developer Products): [key] = true settings = { music = Config.DefaultVolume.music, sfx = Config.DefaultVolume.sfx }, -- гильдия: жемчуг, печати, отдых (ранг, заказы, наживку, ловушки дополняет Guild.defaults) pearls = 0, seals = 0, rest = 0, @@ -91,16 +92,12 @@ local function hasPass(player, key) return passes[player] ~= nil and passes[player][key] == true end -local function loadPasses(player) +-- пропуска продаются как Developer Products, поэтому владение хранится в данных игрока, а не в Roblox +local function loadPasses(player, data) passes[player] = {} for _, gp in ipairs(Config.GamePasses) do - if gp.id and gp.id > 0 then - local ok, owns = pcall(function() - return MarketplaceService:UserOwnsGamePassAsync(player.UserId, gp.id) - end) - if ok and owns then - passes[player][gp.key] = true - end + if data.passes[gp.key] then + passes[player][gp.key] = true end end end @@ -427,11 +424,7 @@ local function claimCollection(player, worldId, rarity) if rarity == "Master" then local coins = Config.MasteryCoins * world.mult data.coins += coins -<<<<<<< HEAD notify(player, ("🏆 «%s» собран! +%d ⚪"):format(world.name, coins), GOLD) -======= - notify(player, ("🏆 «%s» собран! +%d 💰"):format(world.name, coins), GOLD) ->>>>>>> 1ff7ef7e83a97a0e100d5c3805ebc4ad762a2806 else local r = Config.CollectionRewards[rarity] if not r then @@ -439,11 +432,7 @@ local function claimCollection(player, worldId, rarity) end data.coins += r.coins * world.mult addXp(player, data, r.xp * world.mult) -<<<<<<< HEAD notify(player, ("📖 +%d ⚪ +%d XP"):format(r.coins * world.mult, r.xp * world.mult), GREEN) -======= - notify(player, ("📖 +%d 💰 +%d XP"):format(r.coins * world.mult, r.xp * world.mult), GREEN) ->>>>>>> 1ff7ef7e83a97a0e100d5c3805ebc4ad762a2806 end updateStats(player) sendInventory(player) @@ -767,17 +756,12 @@ local function stopFishing(player, tellClient) end end -<<<<<<< HEAD -- mods: { bait = наживка из Config.Baits, maxRank = потолок редкости (автоловля) } local function rollFish(player, data, worldId, luckMult, mods) -======= -local function rollFish(player, data, worldId, luckMult) ->>>>>>> 1ff7ef7e83a97a0e100d5c3805ebc4ad762a2806 local zone = Config.Zones[worldId] if not zone then return nil end -<<<<<<< HEAD mods = mods or {} local bait = mods.bait local base = totalLuck(player, data) + (bait and bait.luck or 0) @@ -785,9 +769,6 @@ local function rollFish(player, data, worldId, luckMult) base += bait.nightLuck - Config.DayNight.nightLuck -- светлячок: ночью +30% вместо обычных +10% end local luck = base * (luckMult or 1) -======= - local luck = totalLuck(player, data) * (luckMult or 1) ->>>>>>> 1ff7ef7e83a97a0e100d5c3805ebc4ad762a2806 local bonus = luck - 1 local weights, total = {}, 0 for i, f in ipairs(zone.fish) do @@ -872,12 +853,9 @@ local function flyBobber(s, tool, target, dur, arc) end end -<<<<<<< HEAD local autoFishing = {} -- [player] = токен работающей автоловли local setAutoFish, grantFish -- объявлены ниже -======= ->>>>>>> 1ff7ef7e83a97a0e100d5c3805ebc4ad762a2806 local function onCast(player, power) power = math.clamp(tonumber(power) or 0.6, 0, 1) local data = profiles[player] @@ -922,12 +900,8 @@ local function onCast(player, power) local stats = Config.RodStats(data.rod, rodLevel(data)) local perfect = power >= Config.CastPerfect[1] and power <= Config.CastPerfect[2] -<<<<<<< HEAD local bait = Guild.useBait(player, data) -- 1 штука наживки на заброс local fish = rollFish(player, data, world.id, perfect and Config.CastPerfectLuck or 1, { bait = bait }) -======= - local fish = rollFish(player, data, world.id, perfect and Config.CastPerfectLuck or 1) ->>>>>>> 1ff7ef7e83a97a0e100d5c3805ebc4ad762a2806 if not fish then remote:FireClient(player, "CastFail") return @@ -1031,7 +1005,6 @@ local function onCatch(player, success, misses) grantFish(player, data, s.fish, { perfect = s.perfect, misses = misses, fromPos = fromPos }) end -<<<<<<< HEAD -- рыба поймана (руками или автоловлей): в сумку, опыт, коллекция, задания, гильдия, босс. -- ctx: { perfect, misses, fromPos, auto }; у автоловли нет серии и бонусов за точность grantFish = function(player, data, fish, ctx) @@ -1045,15 +1018,6 @@ grantFish = function(player, data, fish, ctx) setCombo(player, streak + 1) end fish.xp = math.floor(fish.xp * Guild.xpMult(data)) -- бонус отдыха: двойной опыт -======= - -- серия: каждая рыба подряд дороже и даёт больше опыта - local fish = s.fish - local streak = combo[player] or 0 - local comboMult = math.min(Config.Combo.max, 1 + Config.Combo.step * streak) - fish.value = math.floor(fish.value * comboMult + 0.5) - fish.xp = math.floor(fish.xp * comboMult + 0.5) - setCombo(player, streak + 1) ->>>>>>> 1ff7ef7e83a97a0e100d5c3805ebc4ad762a2806 table.insert(data.items, { uid = data.nextUid, id = fish.id, name = fish.name, rarity = fish.rarity, weight = fish.weight, value = fish.value, mutation = fish.mutation, @@ -1079,11 +1043,7 @@ grantFish = function(player, data, fish, ctx) if ctx.fromPos then showFishFlight(player, fish, ctx.fromPos) end -<<<<<<< HEAD remote:FireClient(player, "Caught", fish, { new = isNew, record = isRecord, combo = comboMult, streak = ctx.auto and 0 or streak + 1, auto = ctx.auto }) -======= - remote:FireClient(player, "Caught", fish, { new = isNew, record = isRecord, combo = comboMult, streak = streak + 1 }) ->>>>>>> 1ff7ef7e83a97a0e100d5c3805ebc4ad762a2806 local rank = Config.Rarities[fish.rarity].rank questProgress(player, "catch", 1) @@ -1093,7 +1053,6 @@ grantFish = function(player, data, fish, ctx) if rank >= 3 then questProgress(player, "rare", 1) end -<<<<<<< HEAD if not ctx.auto then if ctx.misses == 0 then questProgress(player, "perfect", 1) @@ -1247,18 +1206,7 @@ setAutoFish = function(player, on, reason) stopFishing(player, false) end notify(player, reason or "🎣 Автоловля выключена", Color3.fromRGB(255, 200, 120)) -======= - if misses == 0 then - questProgress(player, "perfect", 1) ->>>>>>> 1ff7ef7e83a97a0e100d5c3805ebc4ad762a2806 end - if s.perfect then - questProgress(player, "perfectCast", 1) - end - questProgress(player, "combo", streak + 1, true) - - local hrp = player.Character and player.Character:FindFirstChild("HumanoidRootPart") - bossHit(player, hrp and Config.WorldAt(hrp.Position), rank + (misses == 0 and 1 or 0)) end ---------------------------------------------------------------- скупка @@ -1337,11 +1285,7 @@ local function buy(player, kind, id) end local cost = Guild.price(data, Config.UpgradeCost(rod, lvl)) -- скидка ранга гильдии if data.coins < cost then -<<<<<<< HEAD notify(player, "Нужно " .. cost .. " ⚪", RED) -======= - notify(player, "Нужно " .. cost .. " 💰", RED) ->>>>>>> 1ff7ef7e83a97a0e100d5c3805ebc4ad762a2806 return end data.coins -= cost @@ -1364,14 +1308,9 @@ local function buy(player, kind, id) notify(player, "🔒 Нужен ур. " .. potion.level, RED) return end -<<<<<<< HEAD local price = Guild.price(data, potion.price) if data.coins < price then notify(player, "Нужно " .. price .. " ⚪", RED) -======= - if data.coins < potion.price then - notify(player, "Нужно " .. potion.price .. " 💰", RED) ->>>>>>> 1ff7ef7e83a97a0e100d5c3805ebc4ad762a2806 return end data.coins -= price @@ -1399,14 +1338,9 @@ local function buy(player, kind, id) notify(player, "🔒 Нужен ур. " .. item.level, RED) return end -<<<<<<< HEAD local price = Guild.price(data, item.price) if data.coins < price then notify(player, "Нужно " .. price .. " ⚪", RED) -======= - if data.coins < item.price then - notify(player, "Нужно " .. item.price .. " 💰", RED) ->>>>>>> 1ff7ef7e83a97a0e100d5c3805ebc4ad762a2806 return end data.coins -= price @@ -1456,14 +1390,11 @@ local function teleportTo(player, worldId) end if data.level < world.level then notify(player, ("🔒 %s: ур. %d"):format(world.name, world.level), RED) -<<<<<<< HEAD return end local okRank, why = Guild.canEnter(data, world.id) if not okRank then notify(player, why, RED) -======= ->>>>>>> 1ff7ef7e83a97a0e100d5c3805ebc4ad762a2806 return end markerName = world.id .. "Spawn" @@ -1562,21 +1493,13 @@ remote.OnServerEvent:Connect(function(player, action, a, b) if nearSeller(player) then sellItems(player, a) else -<<<<<<< HEAD notify(player, "⚪ Только у скупщика", Color3.fromRGB(255, 200, 120)) -======= - notify(player, "💰 Только у скупщика", Color3.fromRGB(255, 200, 120)) ->>>>>>> 1ff7ef7e83a97a0e100d5c3805ebc4ad762a2806 end elseif action == "SellAll" then if nearSeller(player) then sellItems(player, nil) else -<<<<<<< HEAD notify(player, "⚪ Только у скупщика", Color3.fromRGB(255, 200, 120)) -======= - notify(player, "💰 Только у скупщика", Color3.fromRGB(255, 200, 120)) ->>>>>>> 1ff7ef7e83a97a0e100d5c3805ebc4ad762a2806 end elseif action == "Teleport" then teleportTo(player, a) @@ -1605,22 +1528,20 @@ end) ---------------------------------------------------------------- донат -MarketplaceService.PromptGamePassPurchaseFinished:Connect(function(player, passId, purchased) - if not purchased then - return - end - for _, gp in ipairs(Config.GamePasses) do - if gp.id == passId then - passes[player] = passes[player] or {} - passes[player][gp.key] = true - notify(player, "✅ " .. gp.icon .. " " .. gp.name, GOLD) - if gp.key == "VIP" then - vipTag(player) - end - updateStats(player) +-- все покупки — Developer Products: и наборы (Config.Products), и пропуска навсегда (Config.GamePasses) +local function findProduct(productId) + for _, p in ipairs(Config.Products) do + if p.id == productId then + return p, false end end -end) + for _, gp in ipairs(Config.GamePasses) do + if gp.id == productId then + return gp, true + end + end + return nil +end MarketplaceService.ProcessReceipt = function(info) local player = Players:GetPlayerByUserId(info.PlayerId) @@ -1633,15 +1554,20 @@ MarketplaceService.ProcessReceipt = function(info) return Enum.ProductPurchaseDecision.PurchaseGranted end end - local product - for _, p in ipairs(Config.Products) do - if p.id == info.ProductId then - product = p - end - end + local product, isPass = findProduct(info.ProductId) if not product then + warn("ProcessReceipt: неизвестный товар " .. tostring(info.ProductId)) return Enum.ProductPurchaseDecision.NotProcessedYet end + if isPass then + data.passes[product.key] = true + passes[player] = passes[player] or {} + passes[player][product.key] = true + notify(player, "✅ " .. product.icon .. " " .. product.name .. " — навсегда!", GOLD) + if product.key == "VIP" then + vipTag(player) + end + end if product.coins then local coins = math.floor(product.coins * (1 + (data.level - 1) * 0.15)) data.coins += coins @@ -1730,10 +1656,7 @@ local function finishBoss(won) if potion then applyPotion(data, potion.bonus, potion.duration) end -<<<<<<< HEAD Guild.onBossWin(p, data) -======= ->>>>>>> 1ff7ef7e83a97a0e100d5c3805ebc4ad762a2806 updateStats(p) remote:FireClient(p, "BossReward", coins, xp, potion and potion.name) end @@ -1801,13 +1724,10 @@ local function onPlayerAdded(player) if not player.Parent then return end - loadPasses(player) + loadPasses(player, data) ensureChain(data) -<<<<<<< HEAD Guild.defaults(data) Guild.onJoin(player, data) -======= ->>>>>>> 1ff7ef7e83a97a0e100d5c3805ebc4ad762a2806 profiles[player] = data loadedOk[player] = ok local settings = type(data.settings) == "table" and data.settings or {} @@ -1840,13 +1760,10 @@ end Players.PlayerRemoving:Connect(function(player) stopFishing(player, false) combo[player], comboUntil[player] = nil, nil -<<<<<<< HEAD autoFishing[player] = nil if profiles[player] then Guild.onLeave(profiles[player]) end -======= ->>>>>>> 1ff7ef7e83a97a0e100d5c3805ebc4ad762a2806 saveData(player) profiles[player] = nil loadedOk[player] = nil @@ -1887,13 +1804,10 @@ task.spawn(function() if data and data.boostUntil > os.time() - 2 then updateStats(p) end -<<<<<<< HEAD -- бонус отдыха тратится, пока игрок рыбачит if data and (fishing[p] or autoFishing[p]) then Guild.spendRest(p, data, 1) end -======= ->>>>>>> 1ff7ef7e83a97a0e100d5c3805ebc4ad762a2806 -- серия сгорает, если долго нет улова (пока рыба на крючке — ждём) if comboUntil[p] and os.time() > comboUntil[p] and not fishing[p] then breakCombo(p) diff --git a/install/5_FishingClient_StarterPlayerScripts.rbxmx b/install/5_FishingClient_StarterPlayerScripts.rbxmx index 354711d..761e89f 100644 --- a/install/5_FishingClient_StarterPlayerScripts.rbxmx +++ b/install/5_FishingClient_StarterPlayerScripts.rbxmx @@ -236,20 +236,12 @@ local SOFT_EDGES = NumberSequence.new({ NumberSequenceKeypoint.new(0.82, 0.62), NumberSequenceKeypoint.new(1, 1), }) -- жирный округлый шрифт с кириллицей (у FredokaOne кириллицы нет — Roblox подставляет тонкий шрифт) -<<<<<<< HEAD local HINT_FONT = Theme.HINT_FACE -- плашка-дымка (Frame) с текстом внутри; градиент только на плашке, на текст он не действует. -- Цвет — тёмное дерево local function softPlate(props, textProps) local plate = new("Frame", props) plate.BackgroundColor3 = C.woodDark -======= -local HINT_FONT = Font.new("rbxasset://fonts/families/Nunito.json", Enum.FontWeight.Heavy) --- плашка-дымка (Frame) с текстом внутри; градиент только на плашке, на текст он не действует -local function softPlate(props, textProps) - local plate = new("Frame", props) - plate.BackgroundColor3 = BLACK ->>>>>>> 1ff7ef7e83a97a0e100d5c3805ebc4ad762a2806 plate.BackgroundTransparency = 0 corner(30).Parent = plate new("UIGradient", { Transparency = SOFT_EDGES, Parent = plate }) @@ -275,11 +267,7 @@ end -- уведомления — под подсказкой обучения, которая стоит в самом верху local toasts = new("Frame", { Size = UDim2.new(0, 900, 0, 200), AnchorPoint = Vector2.new(0.5, 0), Position = UDim2.new(0.5, 0, 0, 84), -<<<<<<< HEAD BackgroundTransparency = 1, ZIndex = 30, Parent = screen, -======= - BackgroundTransparency = 1, Parent = gui, ->>>>>>> 1ff7ef7e83a97a0e100d5c3805ebc4ad762a2806 }, { new("UIListLayout", { Padding = UDim.new(0, 6), HorizontalAlignment = Enum.HorizontalAlignment.Center, SortOrder = Enum.SortOrder.LayoutOrder }) }) local toastOrder = 0 local toastTimers = {} @@ -310,11 +298,7 @@ local function notify(msg, color) end local t, l = softPlate( { Size = UDim2.new(0, 0, 0, 54), AutomaticSize = Enum.AutomaticSize.X, LayoutOrder = toastOrder, Parent = toasts }, -<<<<<<< HEAD { TextSize = 30, TextColor3 = color or C.text, Text = msg } -======= - { TextSize = 30, TextColor3 = color or WHITE, Text = msg } ->>>>>>> 1ff7ef7e83a97a0e100d5c3805ebc4ad762a2806 ) popIn(t) t:SetAttribute("Msg", msg) @@ -362,11 +346,7 @@ local function showCatch(fish, extra) catchName.TextColor3 = r.color catchInfo.Text = ("%s%s · %.2f кг"):format( hex(r.color), r.name, mut and (" · " .. mut.name .. " x" .. mut.mult .. "") or "", fish.weight) -<<<<<<< HEAD catchValue.Text = ("⚪ %s ⭐ +%d XP%s"):format(fmt(fish.value), fish.xp * ((extra and extra.new) and 2 or 1), -======= - catchValue.Text = ("💰 %s ⭐ +%d XP%s"):format(fmt(fish.value), fish.xp * ((extra and extra.new) and 2 or 1), ->>>>>>> 1ff7ef7e83a97a0e100d5c3805ebc4ad762a2806 (extra and extra.combo and extra.combo > 1.001) and (" 🔥 x%.1f"):format(extra.combo) or "") catchCard.Visible = true TweenService:Create(catchCard, TweenInfo.new(0.45, Enum.EasingStyle.Back, Enum.EasingDirection.Out), { Position = UDim2.new(0.5, 0, 0, 120) }):Play() @@ -398,11 +378,7 @@ end -- вверху, на месте подсказки обучения (она во время рыбалки скрыта) local statusLabel = softPlate( -<<<<<<< HEAD { Size = UDim2.fromOffset(0, 64), AutomaticSize = Enum.AutomaticSize.X, AnchorPoint = Vector2.new(0.5, 0), Position = UDim2.new(0.5, 0, 0, 12), Visible = false, Parent = screen }, -======= - { Size = UDim2.fromOffset(0, 64), AutomaticSize = Enum.AutomaticSize.X, AnchorPoint = Vector2.new(0.5, 0), Position = UDim2.new(0.5, 0, 0, 12), Visible = false, Parent = gui }, ->>>>>>> 1ff7ef7e83a97a0e100d5c3805ebc4ad762a2806 { TextSize = 36, Text = "🎣 Ждём клёв…" } ) wobble(statusLabel, 1.2, 1.4) @@ -995,11 +971,7 @@ questWin.render = function(tab) end text({ Size = UDim2.new(1, -4, 0, 30), LayoutOrder = 0, Font = TITLE, TextSize = 22, RichText = true, -<<<<<<< HEAD Text = ("%s круг %d · награда сразу, следующее задание — тоже"):format(chain.name, chain.round), Parent = questList, -======= - Text = ("%s круг %d · награда сразу, следующее задание — тоже"):format(chain.name, chain.round), Parent = questList, ->>>>>>> 1ff7ef7e83a97a0e100d5c3805ebc4ad762a2806 }) for i, st in ipairs(chain.steps) do local done, cur = i < chain.step, i == chain.step @@ -1012,11 +984,7 @@ questWin.render = function(tab) }) text({ Size = UDim2.fromOffset(180, 28), AnchorPoint = Vector2.new(1, 0), Position = UDim2.new(1, -14, 0, cur and 8 or 14), Font = TITLE, TextSize = 17, -<<<<<<< HEAD TextXAlignment = Enum.TextXAlignment.Right, TextColor3 = done and C.muted or C.gold, Text = ("+%s ⚪ +%s XP"):format(fmt(st.coins), fmt(st.xp)), Parent = row, -======= - TextXAlignment = Enum.TextXAlignment.Right, TextColor3 = done and C.muted or C.gold, Text = ("+%s 💰 +%s XP"):format(fmt(st.coins), fmt(st.xp)), Parent = row, ->>>>>>> 1ff7ef7e83a97a0e100d5c3805ebc4ad762a2806 }) if cur then progressBar(row, UDim2.fromOffset(16, 44), UDim2.new(1, -110, 0, 16), chain.progress / st.goal, C.gold) @@ -1029,11 +997,7 @@ questWin.render = function(tab) { corner(14), stroke(C.purple, 2, 0.2), gradient(Color3.fromRGB(70, 40, 100), C.panel, 90) }) text({ Size = UDim2.new(1, -32, 1, 0), Position = UDim2.fromOffset(16, 0), Font = TITLE, TextSize = 18, RichText = true, -<<<<<<< HEAD Text = ("🎁 За всю цепочку: +%s ⚪ +%s XP%s"):format(fmt(b.coins), fmt(b.xp), b.potion and (" + " .. b.potion) or ""), Parent = row, -======= - Text = ("🎁 За всю цепочку: +%s 💰 +%s XP%s"):format(fmt(b.coins), fmt(b.xp), b.potion and (" + " .. b.potion) or ""), Parent = row, ->>>>>>> 1ff7ef7e83a97a0e100d5c3805ebc4ad762a2806 }) elseif tab == "daily" then clear(dailyPage) @@ -1092,11 +1056,8 @@ robuxWin.render = function(tab) notify("⚙ Товар не настроен", Color3.fromRGB(255, 200, 120)) return end - if tab == "passes" then - MarketplaceService:PromptGamePassPurchase(player, it.id) - else - MarketplaceService:PromptProductPurchase(player, it.id) - end + -- и наборы, и пропуска — Developer Products; пропуск сервер запоминает навсегда + MarketplaceService:PromptProductPurchase(player, it.id) end, }) end @@ -1341,11 +1302,7 @@ end local GAUGE_R, GAUGE_DEG, GAUGE_N = 190, 110, 32 local gauge = new("Frame", { Size = UDim2.fromOffset(150, 280), AnchorPoint = Vector2.new(0, 0.5), Position = UDim2.new(0.57, 0, 0.48, 0), -<<<<<<< HEAD BackgroundTransparency = 1, Visible = false, Parent = screen, -======= - BackgroundTransparency = 1, Visible = false, Parent = gui, ->>>>>>> 1ff7ef7e83a97a0e100d5c3805ebc4ad762a2806 }) local GAUGE_C = Vector2.new(110 - GAUGE_R, 140) -- центр окружности левее рамки: дуга выгнута вправо local function arcPoint(v, r) @@ -1763,7 +1720,6 @@ local function setLook(obj, goal, instant) end end -<<<<<<< HEAD -- погода сгущает дымку поверх настроек локации (туман — сильно, дождь и гроза — слегка) local WEATHER_ATMO = { Fog = { Density = 0.22, Haze = 1.5 }, @@ -1775,8 +1731,6 @@ local function weatherAtmo(prop) return (add and add[prop]) or 0 end -======= ->>>>>>> 1ff7ef7e83a97a0e100d5c3805ebc4ad762a2806 local function applyLook(world, instant) -- исходные значения запоминаем до первой правки; эффект мог ещё не прийти с сервера, тогда в следующий раз for _, w in ipairs(lookSources) do @@ -1800,12 +1754,9 @@ local function applyLook(world, instant) for prop, def in pairs(defaults) do local v = look[section] and look[section][prop] if v == nil then v = def end -<<<<<<< HEAD if section == "atmosphere" and typeof(v) == "number" then v += weatherAtmo(prop) end -======= ->>>>>>> 1ff7ef7e83a97a0e100d5c3805ebc4ad762a2806 -- плавно меняются только числа и цвета; флаги и режимы (EnumItem) ставим сразу local kind = typeof(v) if kind == "number" or kind == "Color3" then goal[prop] = v else obj[prop] = v end @@ -1822,15 +1773,10 @@ local function applyAmbience(world, instant) end table.clear(lookTweens) world = world or Config.Lobby -<<<<<<< HEAD -- при смене суток часы двигает Ambience; иначе у каждой локации своё время if not Config.DayNight.enabled then setLook(Lighting, { ClockTime = (world and world.clock) or 14.5 }, instant) end -======= - local clock = (world and world.clock) or 14.5 - setLook(Lighting, { ClockTime = clock }, instant) ->>>>>>> 1ff7ef7e83a97a0e100d5c3805ebc4ad762a2806 local cc = Lighting:FindFirstChildOfClass("ColorCorrectionEffect") if cc then setLook(cc, { TintColor = (world and world.tint) or DEFAULT_LOOK.tint }, instant) @@ -1934,7 +1880,6 @@ local function enterWorld(w, instant) end end -<<<<<<< HEAD -- погода сменилась: плавно пересчитываем дымку текущей локации workspace:GetAttributeChangedSignal("Weather"):Connect(function() if lastWorldId ~= "none" and not loadingVisible() then @@ -1954,8 +1899,6 @@ do end) end -======= ->>>>>>> 1ff7ef7e83a97a0e100d5c3805ebc4ad762a2806 -- первое появление: ждём персонажа, ставим свет его локации сразу и отпускаем экран загрузки task.spawn(function() local char = player.Character or player.CharacterAdded:Wait() @@ -2033,7 +1976,6 @@ local guideStep = 0 -- шаг, отправленный на сервер (ат -- крупная мультяшная подсказка под уведомлениями: покачивается, при смене шага «выпрыгивает» local guideHint, guideHintText = softPlate( -<<<<<<< HEAD { Size = UDim2.fromOffset(0, 70), AutomaticSize = Enum.AutomaticSize.X, AnchorPoint = Vector2.new(0.5, 0), Position = UDim2.new(0.5, 0, 0, 10), Visible = false, Parent = screen }, { TextSize = 42, Text = "" } ) @@ -2041,12 +1983,6 @@ wobble(guideHint, 1.2, 1.6) Theme.onLayout(function(compact) guideHintText.TextSize = compact and 30 or 42 end) -======= - { Size = UDim2.fromOffset(0, 70), AutomaticSize = Enum.AutomaticSize.X, AnchorPoint = Vector2.new(0.5, 0), Position = UDim2.new(0.5, 0, 0, 10), Visible = false, Parent = gui }, - { TextSize = 42, Text = "" } -) -wobble(guideHint, 1.2, 1.6) ->>>>>>> 1ff7ef7e83a97a0e100d5c3805ebc4ad762a2806 local lastHint = nil local guideFolder = new("Folder", { Name = "TutorialGuide", Parent = workspace }) @@ -2247,11 +2183,7 @@ local function guideRoute(step, pos, world) elseif step == 2 and inW1 then return { guideMarker("GuideFishSpot") }, "🎣 Зажми ЛКМ у воды", "Pier" elseif step == 3 and inW1 then -<<<<<<< HEAD return { sellTargetW1() }, "⚪ Продай рыбу", "Sell" -- лавка у самого причала, идём напрямую -======= - return { sellTargetW1() }, "💰 Продай рыбу", "Sell" -- лавка у самого причала, идём напрямую ->>>>>>> 1ff7ef7e83a97a0e100d5c3805ebc4ad762a2806 end return nil end @@ -2416,19 +2348,11 @@ local FIRE = Color3.fromRGB(255, 150, 60) -- серия улова — справа от HUD; полоска показывает, сколько осталось до того, как серия сгорит local comboBox = new("Frame", { -<<<<<<< HEAD Size = UDim2.fromOffset(140, 66), Position = UDim2.fromOffset(310, 10), BackgroundColor3 = WHITE, Visible = false, Parent = screen, }, { corner(14), stroke(FIRE, 2, 0.1), gradient(Color3.fromRGB(110, 50, 20), C.bg, 90) }) local comboMultText = text({ Size = UDim2.new(1, 0, 0, 34), Position = UDim2.fromOffset(0, 3), Font = TITLE, TextSize = 28, TextXAlignment = CENTER, TextColor3 = Color3.fromRGB(255, 195, 95), TextStrokeTransparency = 0.5, Text = "", Parent = comboBox }) local comboSub = text({ Size = UDim2.new(1, 0, 0, 16), Position = UDim2.fromOffset(0, 36), Font = BODY2, TextSize = 12, TextXAlignment = CENTER, TextColor3 = C.muted, Text = "", Parent = comboBox }) local comboBack = new("Frame", { Size = UDim2.new(1, -20, 0, 5), Position = UDim2.new(0, 10, 1, -10), BackgroundColor3 = C.dark, Parent = comboBox }, { corner(3) }) -======= - Size = UDim2.fromOffset(140, 66), Position = UDim2.fromOffset(310, 10), BackgroundColor3 = WHITE, Visible = false, Parent = gui, -}, { corner(14), stroke(FIRE, 2, 0.1), gradient(Color3.fromRGB(110, 50, 20), C.bg, 90) }) -local comboMultText = text({ Size = UDim2.new(1, 0, 0, 34), Position = UDim2.fromOffset(0, 3), Font = TITLE, TextSize = 28, TextXAlignment = CENTER, TextColor3 = Color3.fromRGB(255, 195, 95), TextStrokeTransparency = 0.5, Text = "", Parent = comboBox }) -local comboSub = text({ Size = UDim2.new(1, 0, 0, 16), Position = UDim2.fromOffset(0, 36), Font = BODY2, TextSize = 12, TextXAlignment = CENTER, TextColor3 = C.muted, Text = "", Parent = comboBox }) -local comboBack = new("Frame", { Size = UDim2.new(1, -20, 0, 5), Position = UDim2.new(0, 10, 1, -10), BackgroundColor3 = Color3.fromRGB(14, 18, 30), Parent = comboBox }, { corner(3) }) ->>>>>>> 1ff7ef7e83a97a0e100d5c3805ebc4ad762a2806 local comboFill = new("Frame", { Size = UDim2.fromScale(1, 1), BackgroundColor3 = FIRE, BorderSizePixel = 0, Parent = comboBack }, { corner(3) }) local function refreshCombo(pop) @@ -2451,7 +2375,6 @@ refreshCombo(false) -- правая колонка: босс и цели local rightCol = new("Frame", { Size = UDim2.fromOffset(300, 0), AutomaticSize = Enum.AutomaticSize.Y, AnchorPoint = Vector2.new(1, 0.5), Position = UDim2.new(1, -12, 0.5, 10), -<<<<<<< HEAD BackgroundTransparency = 1, Parent = screen, }, { new("UIListLayout", { Padding = UDim.new(0, 8), SortOrder = Enum.SortOrder.LayoutOrder }) }) @@ -2464,20 +2387,11 @@ Theme.onLayout(function(compact) comboBox.Position = compact and UDim2.fromOffset(254, 6) or UDim2.fromOffset(310, 10) end) -======= - BackgroundTransparency = 1, Parent = gui, -}, { new("UIListLayout", { Padding = UDim.new(0, 8), SortOrder = Enum.SortOrder.LayoutOrder }) }) - ->>>>>>> 1ff7ef7e83a97a0e100d5c3805ebc4ad762a2806 local bossBox = new("Frame", { Size = UDim2.fromOffset(300, 78), BackgroundColor3 = WHITE, Visible = false, LayoutOrder = 1, Parent = rightCol }, { corner(14), stroke(C.red, 2.5, 0.05), gradient(Color3.fromRGB(110, 30, 40), C.bg, 90) }) local bossTitle = text({ Size = UDim2.new(1, -80, 0, 24), Position = UDim2.fromOffset(12, 5), Font = TITLE, TextSize = 18, TextColor3 = Color3.fromRGB(255, 205, 120), TextTruncate = Enum.TextTruncate.AtEnd, Text = "", Parent = bossBox }) local bossTime = text({ Size = UDim2.fromOffset(60, 24), AnchorPoint = Vector2.new(1, 0), Position = UDim2.new(1, -12, 0, 5), Font = TITLE, TextSize = 17, TextXAlignment = RIGHT, Text = "", Parent = bossBox }) -<<<<<<< HEAD local bossBack = new("Frame", { Size = UDim2.new(1, -24, 0, 18), Position = UDim2.fromOffset(12, 32), BackgroundColor3 = C.dark, Parent = bossBox }, { corner(9) }) -======= -local bossBack = new("Frame", { Size = UDim2.new(1, -24, 0, 18), Position = UDim2.fromOffset(12, 32), BackgroundColor3 = Color3.fromRGB(14, 18, 30), Parent = bossBox }, { corner(9) }) ->>>>>>> 1ff7ef7e83a97a0e100d5c3805ebc4ad762a2806 local bossFill = new("Frame", { Size = UDim2.fromScale(1, 1), BackgroundColor3 = WHITE, Parent = bossBack }, { corner(9), gradient(Color3.fromRGB(255, 120, 90), Color3.fromRGB(190, 30, 50), 0) }) local bossHpText = text({ Size = UDim2.fromScale(1, 1), TextSize = 12, TextXAlignment = CENTER, ZIndex = 2, TextStrokeTransparency = 0.5, Text = "", Parent = bossBack }) local bossHint = text({ Size = UDim2.new(1, -24, 0, 18), Position = UDim2.fromOffset(12, 54), Font = BODY2, TextSize = 12, TextColor3 = C.muted, Text = "", Parent = bossBox }) @@ -2492,11 +2406,7 @@ text({ Size = UDim2.new(1, 0, 0, 20), LayoutOrder = 0, Font = TITLE, TextSize = local function trackerLine(order, onClick) local root = new("TextButton", { Size = UDim2.new(1, 0, 0, 38), BackgroundTransparency = 1, AutoButtonColor = false, Text = "", LayoutOrder = order, Parent = tracker }) local label = text({ Size = UDim2.new(1, 0, 0, 22), Font = BODY, TextSize = 14, RichText = true, TextTruncate = Enum.TextTruncate.AtEnd, Text = "", Parent = root }) -<<<<<<< HEAD local back = new("Frame", { Size = UDim2.new(1, 0, 0, 8), Position = UDim2.fromOffset(0, 26), BackgroundColor3 = C.dark, Parent = root }, { corner(4) }) -======= - local back = new("Frame", { Size = UDim2.new(1, 0, 0, 8), Position = UDim2.fromOffset(0, 26), BackgroundColor3 = Color3.fromRGB(14, 18, 30), Parent = root }, { corner(4) }) ->>>>>>> 1ff7ef7e83a97a0e100d5c3805ebc4ad762a2806 local fill = new("Frame", { Size = UDim2.fromScale(0, 1), BackgroundColor3 = C.gold, BorderSizePixel = 0, Parent = back }, { corner(4) }) if onClick then root.MouseButton1Click:Connect(onClick) @@ -2551,11 +2461,7 @@ local function buyGoal() elseif coins >= r.price then return ("🎣 %s — можно купить!"):format(r.name), 1, C.green end -<<<<<<< HEAD return ("🎣 До «%s»: ещё %s ⚪"):format(r.name, fmt(r.price - coins)), coins / r.price, C.gold -======= - return ("🎣 До «%s»: ещё %s 💰"):format(r.name, fmt(r.price - coins)), coins / r.price, C.gold ->>>>>>> 1ff7ef7e83a97a0e100d5c3805ebc4ad762a2806 end end local rod = Config.Find(Config.Rods, player:GetAttribute("Rod") or "Basic") @@ -2565,11 +2471,7 @@ local function buyGoal() if coins >= cost then return ("✨ Улучшение до +%d — можно купить!"):format(rl + 1), 1, C.green end -<<<<<<< HEAD return ("✨ До улучшения +%d: ещё %s ⚪"):format(rl + 1, fmt(cost - coins)), coins / cost, C.gold -======= - return ("✨ До улучшения +%d: ещё %s 💰"):format(rl + 1, fmt(cost - coins)), coins / cost, C.gold ->>>>>>> 1ff7ef7e83a97a0e100d5c3805ebc4ad762a2806 end return nil end @@ -2713,11 +2615,7 @@ end) -- у скупщика после продажи: предложение купить то, на что уже хватает local offerCard = new("Frame", { Size = UDim2.fromOffset(440, 96), AnchorPoint = Vector2.new(0.5, 1), Position = UDim2.new(0.5, 0, 1, -110), -<<<<<<< HEAD BackgroundColor3 = WHITE, Visible = false, Parent = screen, -======= - BackgroundColor3 = WHITE, Visible = false, Parent = gui, ->>>>>>> 1ff7ef7e83a97a0e100d5c3805ebc4ad762a2806 }, { corner(16), stroke(C.green, 2.5, 0.05), gradient(Color3.fromRGB(30, 85, 55), C.bg, 90) }) local offerIcon = text({ Size = UDim2.fromOffset(70, 70), Position = UDim2.fromOffset(12, 13), TextSize = 46, TextXAlignment = CENTER, Text = "", Parent = offerCard }) local offerTitle = text({ Size = UDim2.new(1, -250, 0, 26), Position = UDim2.fromOffset(90, 12), Font = TITLE, TextSize = 19, TextTruncate = Enum.TextTruncate.AtEnd, Text = "", Parent = offerCard }) @@ -2730,19 +2628,11 @@ end local offerBuy = btn({ Size = UDim2.fromOffset(146, 52), AnchorPoint = Vector2.new(1, 0.5), Position = UDim2.new(1, -14, 0.5, 0), BackgroundColor3 = C.green, TextSize = 18, Text = "", Parent = offerCard }, function() if offerItem then remote:FireServer("Buy", offerItem.kind, offerItem.id) -<<<<<<< HEAD Audio.play("coins") end hideOffer() end) btn({ Size = UDim2.fromOffset(26, 26), Position = UDim2.new(1, -18, 0, -8), BackgroundColor3 = C.red, Text = "×", TextSize = 22, Parent = offerCard }, hideOffer) -======= - playUiSound(DING, 0.5) - end - hideOffer() -end) -btn({ Size = UDim2.fromOffset(26, 26), Position = UDim2.new(1, -18, 0, -8), BackgroundColor3 = C.red, Text = "✕", TextSize = 14, Parent = offerCard }, hideOffer) ->>>>>>> 1ff7ef7e83a97a0e100d5c3805ebc4ad762a2806 bestOffer = function(bagWasFull) local coins, lvl = player:GetAttribute("Coins") or 0, player:GetAttribute("Level") or 1 @@ -2794,11 +2684,7 @@ showOffer = function(o) offerIcon.Text = o.icon offerTitle.Text = o.title offerDesc.Text = o.desc -<<<<<<< HEAD offerBuy.Text = ("Купить · %s ⚪"):format(fmt(o.price)) -======= - offerBuy.Text = ("Купить · %s 💰"):format(fmt(o.price)) ->>>>>>> 1ff7ef7e83a97a0e100d5c3805ebc4ad762a2806 offerCard.Visible = true popIn(offerCard, 0.6) task.delay(9, function() @@ -2827,12 +2713,9 @@ remote.OnClientEvent:Connect(function(action, a, b, c, d) setState("waiting") startCastCam(a, b) elseif action == "CastFail" or action == "Cancel" or action == "Escaped" then -<<<<<<< HEAD if action == "Escaped" then Audio.play("escape") end -======= ->>>>>>> 1ff7ef7e83a97a0e100d5c3805ebc4ad762a2806 if action == "CastFail" and castTool and castTool.Parent then castTool.Grip = gripCF(REST_ANGLE) -- сервер удочку не трогал, а у нас она в замахе end @@ -2861,20 +2744,12 @@ remote.OnClientEvent:Connect(function(action, a, b, c, d) Audio.play("sparkle") end elseif action == "Sold" then -<<<<<<< HEAD Audio.play("coins") if tutorialStep() == 3 then advanceTutorial(Config.TutorialDone) end floatText("+" .. fmt(a) .. " ⚪", C.gold) notify(("⚪ +%s"):format(fmt(a)), Color3.fromRGB(120, 255, 140)) -======= - if tutorialStep() == 3 then - advanceTutorial(Config.TutorialDone) - end - floatText("+" .. fmt(a) .. " 💰", C.gold) - notify(("💰 +%s"):format(fmt(a)), Color3.fromRGB(120, 255, 140)) ->>>>>>> 1ff7ef7e83a97a0e100d5c3805ebc4ad762a2806 -- монеты приходят атрибутом чуть позже события, поэтому предложение — с задержкой local wasFull = offerState.bagWasFull offerState.bagWasFull = false @@ -2903,30 +2778,17 @@ remote.OnClientEvent:Connect(function(action, a, b, c, d) refreshDots() refreshTracker() elseif action == "QuestDone" then -<<<<<<< HEAD notify(("✅ %s +%s ⚪ +%s XP"):format(questText(a, b), fmt(c), fmt(d or 0)), Color3.fromRGB(120, 255, 140)) Audio.play("quest") elseif action == "ChainDone" then floatText("🏆 Цепочка пройдена!", C.gold) notify(("🎁 %s: +%s ⚪ +%s XP%s"):format(a, fmt(b), fmt(c), d and (" + " .. d) or ""), C.gold) Audio.play("fanfare") -======= - notify(("✅ %s +%s 💰 +%s XP"):format(questText(a, b), fmt(c), fmt(d or 0)), Color3.fromRGB(120, 255, 140)) - playUiSound(DING, 0.6) - elseif action == "ChainDone" then - floatText("🏆 Цепочка пройдена!", C.gold) - notify(("🎁 %s: +%s 💰 +%s XP%s"):format(a, fmt(b), fmt(c), d and (" + " .. d) or ""), C.gold) - playUiSound(DING, 0.8) ->>>>>>> 1ff7ef7e83a97a0e100d5c3805ebc4ad762a2806 elseif action == "ComboLost" then notify(("💔 Серия из %d прервана"):format(a), Color3.fromRGB(255, 130, 110)) elseif action == "BossStart" then notify(("👑 %s в мире «%s»! Ловите всем сервером"):format(a, b), C.gold) -<<<<<<< HEAD Audio.play("quest") -======= - playUiSound(DING, 0.8) ->>>>>>> 1ff7ef7e83a97a0e100d5c3805ebc4ad762a2806 elseif action == "BossHit" then floatText(("⚔ -%d боссу"):format(a), Color3.fromRGB(255, 130, 100)) elseif action == "BossDone" then @@ -2936,11 +2798,7 @@ remote.OnClientEvent:Connect(function(action, a, b, c, d) notify(("🌊 %s ушёл на глубину…"):format(b), C.muted) end elseif action == "BossReward" then -<<<<<<< HEAD notify(("🎁 За босса: +%s ⚪ +%s XP%s"):format(fmt(a), fmt(b), c and (" + " .. c) or ""), Color3.fromRGB(120, 255, 140)) -======= - notify(("🎁 За босса: +%s 💰 +%s XP%s"):format(fmt(a), fmt(b), c and (" + " .. c) or ""), Color3.fromRGB(120, 255, 140)) ->>>>>>> 1ff7ef7e83a97a0e100d5c3805ebc4ad762a2806 elseif action == "OpenShop" then shopWin.open("rods") elseif action == "OpenQuests" then diff --git a/install/7_WorldBuilder_ServerScriptService.rbxmx b/install/7_WorldBuilder_ServerScriptService.rbxmx index 9d020dc..8b2acdd 100644 --- a/install/7_WorldBuilder_ServerScriptService.rbxmx +++ b/install/7_WorldBuilder_ServerScriptService.rbxmx @@ -1828,7 +1828,6 @@ local function spawnNpc(spot, parent) w.C0 = head.CFrame:Inverse() * p.CFrame w.Parent = p p.Parent = rig -<<<<<<< HEAD return p end if spot:GetAttribute("Look") == "Elder" then @@ -1846,11 +1845,6 @@ local function spawnNpc(spot, parent) 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 -======= - 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) ->>>>>>> 1ff7ef7e83a97a0e100d5c3805ebc4ad762a2806 end local action = spot:GetAttribute("NpcAction") if action then diff --git a/install/INSTALL.lua b/install/INSTALL.lua index 5ade575..575c00e 100644 --- a/install/INSTALL.lua +++ b/install/INSTALL.lua @@ -374,7 +374,6 @@ Config.QuestKinds = { perfectCast = { text = "Забрось в зелёную зону %d %s", forms = TIMES, coins = 8, xp = 6 }, combo = { text = "Набери серию из %d рыб", coins = 12, xp = 10, max = 15 }, sell = { text = "Продай %d %s", forms = FISH, coins = 3, xp = 3 }, -<<<<<<< HEAD earn = { text = "Заработай %d ⚪ на продаже", coins = 0.25, xp = 0.2, byLevel = true }, buy = { text = "Купи что-нибудь в магазине", coins = 40, xp = 30, max = 1 }, boss = { text = "Нанеси боссу %d урона", coins = 15, xp = 12 }, @@ -387,40 +386,6 @@ Config.QuestChains = { } Config.QuestTierGrowth = 0.5 -- каждый следующий круг цепочек: цели ×(1 + 0.5 · номер круга) Config.ChainBonus = { coins = 120, xp = 100, potion = "Luck1" } -- за всю цепочку (растёт с уровнем и кругом) -======= - earn = { text = "Заработай %d 💰 на продаже", coins = 0.25, xp = 0.2, byLevel = true }, - buy = { text = "Купи что-нибудь в магазине", coins = 40, xp = 30, max = 1 }, - boss = { text = "Нанеси боссу %d урона", coins = 15, xp = 12 }, -} -Config.QuestChains = { - { name = "🎣 Утренний клёв", steps = { { "catch", 3 }, { "perfectCast", 2 }, { "sell", 3 }, { "catch", 5 }, { "uncommon", 1 } } }, - { name = "🔥 Без промаха", steps = { { "perfect", 3 }, { "combo", 3 }, { "catch", 6 }, { "earn", 80 }, { "combo", 5 } } }, - { name = "💎 Охота за редкостью", steps = { { "uncommon", 3 }, { "perfectCast", 3 }, { "rare", 1 }, { "sell", 8 }, { "buy", 1 } } }, - { name = "🏆 Мастер озера", steps = { { "combo", 6 }, { "catch", 10 }, { "perfect", 6 }, { "rare", 2 }, { "earn", 300 } } }, -} -Config.QuestTierGrowth = 0.5 -- каждый следующий круг цепочек: цели ×(1 + 0.5 · номер круга) -Config.ChainBonus = { coins = 120, xp = 100, potion = "Luck1" } -- за всю цепочку (растёт с уровнем и кругом) - ----------------------------------------------------------------- серия улова --- каждая рыба подряд без срыва: +10% к цене и опыту следующей, до ×2; --- срыв, ушедшая рыба или timeout секунд без улова — серия сгорает -Config.Combo = { step = 0.1, max = 2.0, timeout = 90 } - ----------------------------------------------------------------- босс озера --- раз в interval секунд в мир, где больше всего игроков, приплывает босс. Его ловят всем сервером: --- каждая пойманная там рыба наносит урон = ранг редкости (+1 за подсечку без промаха). --- Если за duration секунд урона хватило — награда всем, кто помог (× mult мира, минимум 40% за малый вклад) -Config.Boss = { - firstDelay = 240, interval = 600, duration = 180, - hpPerPlayer = 12, - reward = { coins = 300, xp = 250, potion = "Luck1" }, - worlds = { - World1 = { name = "Сом-великан", fish = "Som", mutation = "Golden", scale = 5 }, - World2 = { name = "Королевская акула", fish = "Shark", mutation = "Golden", scale = 3 }, - World3 = { name = "Ледяной левиафан", fish = "Leviathan", mutation = "Rainbow", scale = 2.5 }, - }, -} ->>>>>>> 1ff7ef7e83a97a0e100d5c3805ebc4ad762a2806 ---------------------------------------------------------------- серия улова -- каждая рыба подряд без срыва: +10% к цене и опыту следующей, до ×2; @@ -564,19 +529,21 @@ Config.Sounds = { Config.DefaultVolume = { music = 0.6, sfx = 0.8 } ---------------------------------------------------------------- донат (Robux) --- ВАЖНО: впиши сюда ID своих пропусков и товаров с create.roblox.com. +-- Все товары — Developer Products игры (create.roblox.com → Monetization → Developer Products); +-- id — Product ID оттуда, robux — цена для кнопки (должна совпадать с ценой в Roblox). +-- Пропуска тоже Developer Products: покупаются один раз, сервер запоминает их в данных игрока навсегда. -- Пока id = 0, кнопка покупки покажет подсказку, что товар не настроен. Config.GamePasses = { - { key = "VIP", id = 0, robux = 199, icon = "👑", name = "VIP", desc = "+25% удачи и серебра, корона над головой" }, - { key = "DoubleCoins", id = 0, robux = 299, icon = "⚪", name = "x2 Серебро", desc = "Вся рыба продаётся в 2 раза дороже" }, - { key = "LuckyCharm", id = 0, robux = 349, icon = "🍀", name = "Талисман удачи", desc = "+50% удачи навсегда" }, - { key = "BigBag", id = 0, robux = 149, icon = "🎒", name = "Бездонная сумка", desc = "+100 мест в любой сумке" }, + { key = "VIP", id = 3728143641, robux = 199, icon = "👑", name = "VIP", desc = "+25% удачи и серебра, корона над головой" }, + { key = "DoubleCoins", id = 3728143692, robux = 299, icon = "⚪", name = "x2 Серебро", desc = "Вся рыба продаётся в 2 раза дороже" }, + { key = "LuckyCharm", id = 3728143735, robux = 349, icon = "🍀", name = "Талисман удачи", desc = "+50% удачи навсегда" }, + { key = "BigBag", id = 3728143773, robux = 149, icon = "🎒", name = "Бездонная сумка", desc = "+100 мест в любой сумке" }, } Config.Products = { - { key = "Coins1", id = 0, robux = 49, icon = "👝", name = "Кошель серебра", desc = "+1 000 серебра (больше с уровнем)", coins = 1000 }, - { key = "Coins2", id = 0, robux = 199, icon = "⚪", name = "Сундук серебра", desc = "+5 000 серебра (больше с уровнем)", coins = 5000 }, - { key = "Coins3", id = 0, robux = 599, icon = "🏆", name = "Гора золота", desc = "+20 000 серебра (больше с уровнем)", coins = 20000 }, - { key = "Luck", id = 0, robux = 99, icon = "🧪", name = "Супер-зелье удачи", desc = "+200% удачи на 15 минут", boost = 2.0, duration = 900 }, + { key = "Coins1", id = 3728142264, robux = 49, icon = "👝", name = "Кошель серебра", desc = "+1 000 серебра (больше с уровнем)", coins = 1000 }, + { key = "Coins2", id = 3728142848, robux = 199, icon = "⚪", name = "Сундук серебра", desc = "+5 000 серебра (больше с уровнем)", coins = 5000 }, + { key = "Coins3", id = 3728142885, robux = 599, icon = "🏆", name = "Гора золота", desc = "+20 000 серебра (больше с уровнем)", coins = 20000 }, + { key = "Luck", id = 3728142916, robux = 99, icon = "🧪", name = "Супер-зелье удачи", desc = "+200% удачи на 15 минут", boost = 2.0, duration = 900 }, } ---------------------------------------------------------------- рыбалка @@ -1374,6 +1341,7 @@ local function defaultData() chain = { index = 1, step = 1, progress = 0, tier = 0 }, daily = { last = 0, streak = 0 }, boostUntil = 0, boostBonus = 0, totalCaught = 0, nextUid = 1, receipts = {}, + passes = {}, -- купленные пропуска (Developer Products): [key] = true settings = { music = Config.DefaultVolume.music, sfx = Config.DefaultVolume.sfx }, -- гильдия: жемчуг, печати, отдых (ранг, заказы, наживку, ловушки дополняет Guild.defaults) pearls = 0, seals = 0, rest = 0, @@ -1419,16 +1387,12 @@ local function hasPass(player, key) return passes[player] ~= nil and passes[player][key] == true end -local function loadPasses(player) +-- пропуска продаются как Developer Products, поэтому владение хранится в данных игрока, а не в Roblox +local function loadPasses(player, data) passes[player] = {} for _, gp in ipairs(Config.GamePasses) do - if gp.id and gp.id > 0 then - local ok, owns = pcall(function() - return MarketplaceService:UserOwnsGamePassAsync(player.UserId, gp.id) - end) - if ok and owns then - passes[player][gp.key] = true - end + if data.passes[gp.key] then + passes[player][gp.key] = true end end end @@ -1755,11 +1719,7 @@ local function claimCollection(player, worldId, rarity) if rarity == "Master" then local coins = Config.MasteryCoins * world.mult data.coins += coins -<<<<<<< HEAD notify(player, ("🏆 «%s» собран! +%d ⚪"):format(world.name, coins), GOLD) -======= - notify(player, ("🏆 «%s» собран! +%d 💰"):format(world.name, coins), GOLD) ->>>>>>> 1ff7ef7e83a97a0e100d5c3805ebc4ad762a2806 else local r = Config.CollectionRewards[rarity] if not r then @@ -1767,11 +1727,7 @@ local function claimCollection(player, worldId, rarity) end data.coins += r.coins * world.mult addXp(player, data, r.xp * world.mult) -<<<<<<< HEAD notify(player, ("📖 +%d ⚪ +%d XP"):format(r.coins * world.mult, r.xp * world.mult), GREEN) -======= - notify(player, ("📖 +%d 💰 +%d XP"):format(r.coins * world.mult, r.xp * world.mult), GREEN) ->>>>>>> 1ff7ef7e83a97a0e100d5c3805ebc4ad762a2806 end updateStats(player) sendInventory(player) @@ -2095,17 +2051,12 @@ local function stopFishing(player, tellClient) end end -<<<<<<< HEAD -- mods: { bait = наживка из Config.Baits, maxRank = потолок редкости (автоловля) } local function rollFish(player, data, worldId, luckMult, mods) -======= -local function rollFish(player, data, worldId, luckMult) ->>>>>>> 1ff7ef7e83a97a0e100d5c3805ebc4ad762a2806 local zone = Config.Zones[worldId] if not zone then return nil end -<<<<<<< HEAD mods = mods or {} local bait = mods.bait local base = totalLuck(player, data) + (bait and bait.luck or 0) @@ -2113,9 +2064,6 @@ local function rollFish(player, data, worldId, luckMult) base += bait.nightLuck - Config.DayNight.nightLuck -- светлячок: ночью +30% вместо обычных +10% end local luck = base * (luckMult or 1) -======= - local luck = totalLuck(player, data) * (luckMult or 1) ->>>>>>> 1ff7ef7e83a97a0e100d5c3805ebc4ad762a2806 local bonus = luck - 1 local weights, total = {}, 0 for i, f in ipairs(zone.fish) do @@ -2200,12 +2148,9 @@ local function flyBobber(s, tool, target, dur, arc) end end -<<<<<<< HEAD local autoFishing = {} -- [player] = токен работающей автоловли local setAutoFish, grantFish -- объявлены ниже -======= ->>>>>>> 1ff7ef7e83a97a0e100d5c3805ebc4ad762a2806 local function onCast(player, power) power = math.clamp(tonumber(power) or 0.6, 0, 1) local data = profiles[player] @@ -2250,12 +2195,8 @@ local function onCast(player, power) local stats = Config.RodStats(data.rod, rodLevel(data)) local perfect = power >= Config.CastPerfect[1] and power <= Config.CastPerfect[2] -<<<<<<< HEAD local bait = Guild.useBait(player, data) -- 1 штука наживки на заброс local fish = rollFish(player, data, world.id, perfect and Config.CastPerfectLuck or 1, { bait = bait }) -======= - local fish = rollFish(player, data, world.id, perfect and Config.CastPerfectLuck or 1) ->>>>>>> 1ff7ef7e83a97a0e100d5c3805ebc4ad762a2806 if not fish then remote:FireClient(player, "CastFail") return @@ -2359,7 +2300,6 @@ local function onCatch(player, success, misses) grantFish(player, data, s.fish, { perfect = s.perfect, misses = misses, fromPos = fromPos }) end -<<<<<<< HEAD -- рыба поймана (руками или автоловлей): в сумку, опыт, коллекция, задания, гильдия, босс. -- ctx: { perfect, misses, fromPos, auto }; у автоловли нет серии и бонусов за точность grantFish = function(player, data, fish, ctx) @@ -2373,15 +2313,6 @@ grantFish = function(player, data, fish, ctx) setCombo(player, streak + 1) end fish.xp = math.floor(fish.xp * Guild.xpMult(data)) -- бонус отдыха: двойной опыт -======= - -- серия: каждая рыба подряд дороже и даёт больше опыта - local fish = s.fish - local streak = combo[player] or 0 - local comboMult = math.min(Config.Combo.max, 1 + Config.Combo.step * streak) - fish.value = math.floor(fish.value * comboMult + 0.5) - fish.xp = math.floor(fish.xp * comboMult + 0.5) - setCombo(player, streak + 1) ->>>>>>> 1ff7ef7e83a97a0e100d5c3805ebc4ad762a2806 table.insert(data.items, { uid = data.nextUid, id = fish.id, name = fish.name, rarity = fish.rarity, weight = fish.weight, value = fish.value, mutation = fish.mutation, @@ -2407,11 +2338,7 @@ grantFish = function(player, data, fish, ctx) if ctx.fromPos then showFishFlight(player, fish, ctx.fromPos) end -<<<<<<< HEAD remote:FireClient(player, "Caught", fish, { new = isNew, record = isRecord, combo = comboMult, streak = ctx.auto and 0 or streak + 1, auto = ctx.auto }) -======= - remote:FireClient(player, "Caught", fish, { new = isNew, record = isRecord, combo = comboMult, streak = streak + 1 }) ->>>>>>> 1ff7ef7e83a97a0e100d5c3805ebc4ad762a2806 local rank = Config.Rarities[fish.rarity].rank questProgress(player, "catch", 1) @@ -2421,7 +2348,6 @@ grantFish = function(player, data, fish, ctx) if rank >= 3 then questProgress(player, "rare", 1) end -<<<<<<< HEAD if not ctx.auto then if ctx.misses == 0 then questProgress(player, "perfect", 1) @@ -2575,18 +2501,7 @@ setAutoFish = function(player, on, reason) stopFishing(player, false) end notify(player, reason or "🎣 Автоловля выключена", Color3.fromRGB(255, 200, 120)) -======= - if misses == 0 then - questProgress(player, "perfect", 1) ->>>>>>> 1ff7ef7e83a97a0e100d5c3805ebc4ad762a2806 end - if s.perfect then - questProgress(player, "perfectCast", 1) - end - questProgress(player, "combo", streak + 1, true) - - local hrp = player.Character and player.Character:FindFirstChild("HumanoidRootPart") - bossHit(player, hrp and Config.WorldAt(hrp.Position), rank + (misses == 0 and 1 or 0)) end ---------------------------------------------------------------- скупка @@ -2665,11 +2580,7 @@ local function buy(player, kind, id) end local cost = Guild.price(data, Config.UpgradeCost(rod, lvl)) -- скидка ранга гильдии if data.coins < cost then -<<<<<<< HEAD notify(player, "Нужно " .. cost .. " ⚪", RED) -======= - notify(player, "Нужно " .. cost .. " 💰", RED) ->>>>>>> 1ff7ef7e83a97a0e100d5c3805ebc4ad762a2806 return end data.coins -= cost @@ -2692,14 +2603,9 @@ local function buy(player, kind, id) notify(player, "🔒 Нужен ур. " .. potion.level, RED) return end -<<<<<<< HEAD local price = Guild.price(data, potion.price) if data.coins < price then notify(player, "Нужно " .. price .. " ⚪", RED) -======= - if data.coins < potion.price then - notify(player, "Нужно " .. potion.price .. " 💰", RED) ->>>>>>> 1ff7ef7e83a97a0e100d5c3805ebc4ad762a2806 return end data.coins -= price @@ -2727,14 +2633,9 @@ local function buy(player, kind, id) notify(player, "🔒 Нужен ур. " .. item.level, RED) return end -<<<<<<< HEAD local price = Guild.price(data, item.price) if data.coins < price then notify(player, "Нужно " .. price .. " ⚪", RED) -======= - if data.coins < item.price then - notify(player, "Нужно " .. item.price .. " 💰", RED) ->>>>>>> 1ff7ef7e83a97a0e100d5c3805ebc4ad762a2806 return end data.coins -= price @@ -2784,14 +2685,11 @@ local function teleportTo(player, worldId) end if data.level < world.level then notify(player, ("🔒 %s: ур. %d"):format(world.name, world.level), RED) -<<<<<<< HEAD return end local okRank, why = Guild.canEnter(data, world.id) if not okRank then notify(player, why, RED) -======= ->>>>>>> 1ff7ef7e83a97a0e100d5c3805ebc4ad762a2806 return end markerName = world.id .. "Spawn" @@ -2890,21 +2788,13 @@ remote.OnServerEvent:Connect(function(player, action, a, b) if nearSeller(player) then sellItems(player, a) else -<<<<<<< HEAD notify(player, "⚪ Только у скупщика", Color3.fromRGB(255, 200, 120)) -======= - notify(player, "💰 Только у скупщика", Color3.fromRGB(255, 200, 120)) ->>>>>>> 1ff7ef7e83a97a0e100d5c3805ebc4ad762a2806 end elseif action == "SellAll" then if nearSeller(player) then sellItems(player, nil) else -<<<<<<< HEAD notify(player, "⚪ Только у скупщика", Color3.fromRGB(255, 200, 120)) -======= - notify(player, "💰 Только у скупщика", Color3.fromRGB(255, 200, 120)) ->>>>>>> 1ff7ef7e83a97a0e100d5c3805ebc4ad762a2806 end elseif action == "Teleport" then teleportTo(player, a) @@ -2933,22 +2823,20 @@ end) ---------------------------------------------------------------- донат -MarketplaceService.PromptGamePassPurchaseFinished:Connect(function(player, passId, purchased) - if not purchased then - return - end - for _, gp in ipairs(Config.GamePasses) do - if gp.id == passId then - passes[player] = passes[player] or {} - passes[player][gp.key] = true - notify(player, "✅ " .. gp.icon .. " " .. gp.name, GOLD) - if gp.key == "VIP" then - vipTag(player) - end - updateStats(player) +-- все покупки — Developer Products: и наборы (Config.Products), и пропуска навсегда (Config.GamePasses) +local function findProduct(productId) + for _, p in ipairs(Config.Products) do + if p.id == productId then + return p, false end end -end) + for _, gp in ipairs(Config.GamePasses) do + if gp.id == productId then + return gp, true + end + end + return nil +end MarketplaceService.ProcessReceipt = function(info) local player = Players:GetPlayerByUserId(info.PlayerId) @@ -2961,15 +2849,20 @@ MarketplaceService.ProcessReceipt = function(info) return Enum.ProductPurchaseDecision.PurchaseGranted end end - local product - for _, p in ipairs(Config.Products) do - if p.id == info.ProductId then - product = p - end - end + local product, isPass = findProduct(info.ProductId) if not product then + warn("ProcessReceipt: неизвестный товар " .. tostring(info.ProductId)) return Enum.ProductPurchaseDecision.NotProcessedYet end + if isPass then + data.passes[product.key] = true + passes[player] = passes[player] or {} + passes[player][product.key] = true + notify(player, "✅ " .. product.icon .. " " .. product.name .. " — навсегда!", GOLD) + if product.key == "VIP" then + vipTag(player) + end + end if product.coins then local coins = math.floor(product.coins * (1 + (data.level - 1) * 0.15)) data.coins += coins @@ -3058,10 +2951,7 @@ local function finishBoss(won) if potion then applyPotion(data, potion.bonus, potion.duration) end -<<<<<<< HEAD Guild.onBossWin(p, data) -======= ->>>>>>> 1ff7ef7e83a97a0e100d5c3805ebc4ad762a2806 updateStats(p) remote:FireClient(p, "BossReward", coins, xp, potion and potion.name) end @@ -3129,13 +3019,10 @@ local function onPlayerAdded(player) if not player.Parent then return end - loadPasses(player) + loadPasses(player, data) ensureChain(data) -<<<<<<< HEAD Guild.defaults(data) Guild.onJoin(player, data) -======= ->>>>>>> 1ff7ef7e83a97a0e100d5c3805ebc4ad762a2806 profiles[player] = data loadedOk[player] = ok local settings = type(data.settings) == "table" and data.settings or {} @@ -3168,13 +3055,10 @@ end Players.PlayerRemoving:Connect(function(player) stopFishing(player, false) combo[player], comboUntil[player] = nil, nil -<<<<<<< HEAD autoFishing[player] = nil if profiles[player] then Guild.onLeave(profiles[player]) end -======= ->>>>>>> 1ff7ef7e83a97a0e100d5c3805ebc4ad762a2806 saveData(player) profiles[player] = nil loadedOk[player] = nil @@ -3215,13 +3099,10 @@ task.spawn(function() if data and data.boostUntil > os.time() - 2 then updateStats(p) end -<<<<<<< HEAD -- бонус отдыха тратится, пока игрок рыбачит if data and (fishing[p] or autoFishing[p]) then Guild.spendRest(p, data, 1) end -======= ->>>>>>> 1ff7ef7e83a97a0e100d5c3805ebc4ad762a2806 -- серия сгорает, если долго нет улова (пока рыба на крючке — ждём) if comboUntil[p] and os.time() > comboUntil[p] and not fishing[p] then breakCombo(p) @@ -6074,7 +5955,6 @@ local function spawnNpc(spot, parent) w.C0 = head.CFrame:Inverse() * p.CFrame w.Parent = p p.Parent = rig -<<<<<<< HEAD return p end if spot:GetAttribute("Look") == "Elder" then @@ -6092,11 +5972,6 @@ local function spawnNpc(spot, parent) 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 -======= - 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) ->>>>>>> 1ff7ef7e83a97a0e100d5c3805ebc4ad762a2806 end local action = spot:GetAttribute("NpcAction") if action then @@ -6365,20 +6240,12 @@ local SOFT_EDGES = NumberSequence.new({ NumberSequenceKeypoint.new(0.82, 0.62), NumberSequenceKeypoint.new(1, 1), }) -- жирный округлый шрифт с кириллицей (у FredokaOne кириллицы нет — Roblox подставляет тонкий шрифт) -<<<<<<< HEAD local HINT_FONT = Theme.HINT_FACE -- плашка-дымка (Frame) с текстом внутри; градиент только на плашке, на текст он не действует. -- Цвет — тёмное дерево local function softPlate(props, textProps) local plate = new("Frame", props) plate.BackgroundColor3 = C.woodDark -======= -local HINT_FONT = Font.new("rbxasset://fonts/families/Nunito.json", Enum.FontWeight.Heavy) --- плашка-дымка (Frame) с текстом внутри; градиент только на плашке, на текст он не действует -local function softPlate(props, textProps) - local plate = new("Frame", props) - plate.BackgroundColor3 = BLACK ->>>>>>> 1ff7ef7e83a97a0e100d5c3805ebc4ad762a2806 plate.BackgroundTransparency = 0 corner(30).Parent = plate new("UIGradient", { Transparency = SOFT_EDGES, Parent = plate }) @@ -6404,11 +6271,7 @@ end -- уведомления — под подсказкой обучения, которая стоит в самом верху local toasts = new("Frame", { Size = UDim2.new(0, 900, 0, 200), AnchorPoint = Vector2.new(0.5, 0), Position = UDim2.new(0.5, 0, 0, 84), -<<<<<<< HEAD BackgroundTransparency = 1, ZIndex = 30, Parent = screen, -======= - BackgroundTransparency = 1, Parent = gui, ->>>>>>> 1ff7ef7e83a97a0e100d5c3805ebc4ad762a2806 }, { new("UIListLayout", { Padding = UDim.new(0, 6), HorizontalAlignment = Enum.HorizontalAlignment.Center, SortOrder = Enum.SortOrder.LayoutOrder }) }) local toastOrder = 0 local toastTimers = {} @@ -6439,11 +6302,7 @@ local function notify(msg, color) end local t, l = softPlate( { Size = UDim2.new(0, 0, 0, 54), AutomaticSize = Enum.AutomaticSize.X, LayoutOrder = toastOrder, Parent = toasts }, -<<<<<<< HEAD { TextSize = 30, TextColor3 = color or C.text, Text = msg } -======= - { TextSize = 30, TextColor3 = color or WHITE, Text = msg } ->>>>>>> 1ff7ef7e83a97a0e100d5c3805ebc4ad762a2806 ) popIn(t) t:SetAttribute("Msg", msg) @@ -6491,11 +6350,7 @@ local function showCatch(fish, extra) catchName.TextColor3 = r.color catchInfo.Text = ("%s%s · %.2f кг"):format( hex(r.color), r.name, mut and (" · " .. mut.name .. " x" .. mut.mult .. "") or "", fish.weight) -<<<<<<< HEAD catchValue.Text = ("⚪ %s ⭐ +%d XP%s"):format(fmt(fish.value), fish.xp * ((extra and extra.new) and 2 or 1), -======= - catchValue.Text = ("💰 %s ⭐ +%d XP%s"):format(fmt(fish.value), fish.xp * ((extra and extra.new) and 2 or 1), ->>>>>>> 1ff7ef7e83a97a0e100d5c3805ebc4ad762a2806 (extra and extra.combo and extra.combo > 1.001) and (" 🔥 x%.1f"):format(extra.combo) or "") catchCard.Visible = true TweenService:Create(catchCard, TweenInfo.new(0.45, Enum.EasingStyle.Back, Enum.EasingDirection.Out), { Position = UDim2.new(0.5, 0, 0, 120) }):Play() @@ -6527,11 +6382,7 @@ end -- вверху, на месте подсказки обучения (она во время рыбалки скрыта) local statusLabel = softPlate( -<<<<<<< HEAD { Size = UDim2.fromOffset(0, 64), AutomaticSize = Enum.AutomaticSize.X, AnchorPoint = Vector2.new(0.5, 0), Position = UDim2.new(0.5, 0, 0, 12), Visible = false, Parent = screen }, -======= - { Size = UDim2.fromOffset(0, 64), AutomaticSize = Enum.AutomaticSize.X, AnchorPoint = Vector2.new(0.5, 0), Position = UDim2.new(0.5, 0, 0, 12), Visible = false, Parent = gui }, ->>>>>>> 1ff7ef7e83a97a0e100d5c3805ebc4ad762a2806 { TextSize = 36, Text = "🎣 Ждём клёв…" } ) wobble(statusLabel, 1.2, 1.4) @@ -7124,11 +6975,7 @@ questWin.render = function(tab) end text({ Size = UDim2.new(1, -4, 0, 30), LayoutOrder = 0, Font = TITLE, TextSize = 22, RichText = true, -<<<<<<< HEAD Text = ("%s круг %d · награда сразу, следующее задание — тоже"):format(chain.name, chain.round), Parent = questList, -======= - Text = ("%s круг %d · награда сразу, следующее задание — тоже"):format(chain.name, chain.round), Parent = questList, ->>>>>>> 1ff7ef7e83a97a0e100d5c3805ebc4ad762a2806 }) for i, st in ipairs(chain.steps) do local done, cur = i < chain.step, i == chain.step @@ -7141,11 +6988,7 @@ questWin.render = function(tab) }) text({ Size = UDim2.fromOffset(180, 28), AnchorPoint = Vector2.new(1, 0), Position = UDim2.new(1, -14, 0, cur and 8 or 14), Font = TITLE, TextSize = 17, -<<<<<<< HEAD TextXAlignment = Enum.TextXAlignment.Right, TextColor3 = done and C.muted or C.gold, Text = ("+%s ⚪ +%s XP"):format(fmt(st.coins), fmt(st.xp)), Parent = row, -======= - TextXAlignment = Enum.TextXAlignment.Right, TextColor3 = done and C.muted or C.gold, Text = ("+%s 💰 +%s XP"):format(fmt(st.coins), fmt(st.xp)), Parent = row, ->>>>>>> 1ff7ef7e83a97a0e100d5c3805ebc4ad762a2806 }) if cur then progressBar(row, UDim2.fromOffset(16, 44), UDim2.new(1, -110, 0, 16), chain.progress / st.goal, C.gold) @@ -7158,11 +7001,7 @@ questWin.render = function(tab) { corner(14), stroke(C.purple, 2, 0.2), gradient(Color3.fromRGB(70, 40, 100), C.panel, 90) }) text({ Size = UDim2.new(1, -32, 1, 0), Position = UDim2.fromOffset(16, 0), Font = TITLE, TextSize = 18, RichText = true, -<<<<<<< HEAD Text = ("🎁 За всю цепочку: +%s ⚪ +%s XP%s"):format(fmt(b.coins), fmt(b.xp), b.potion and (" + " .. b.potion) or ""), Parent = row, -======= - Text = ("🎁 За всю цепочку: +%s 💰 +%s XP%s"):format(fmt(b.coins), fmt(b.xp), b.potion and (" + " .. b.potion) or ""), Parent = row, ->>>>>>> 1ff7ef7e83a97a0e100d5c3805ebc4ad762a2806 }) elseif tab == "daily" then clear(dailyPage) @@ -7221,11 +7060,8 @@ robuxWin.render = function(tab) notify("⚙ Товар не настроен", Color3.fromRGB(255, 200, 120)) return end - if tab == "passes" then - MarketplaceService:PromptGamePassPurchase(player, it.id) - else - MarketplaceService:PromptProductPurchase(player, it.id) - end + -- и наборы, и пропуска — Developer Products; пропуск сервер запоминает навсегда + MarketplaceService:PromptProductPurchase(player, it.id) end, }) end @@ -7470,11 +7306,7 @@ end local GAUGE_R, GAUGE_DEG, GAUGE_N = 190, 110, 32 local gauge = new("Frame", { Size = UDim2.fromOffset(150, 280), AnchorPoint = Vector2.new(0, 0.5), Position = UDim2.new(0.57, 0, 0.48, 0), -<<<<<<< HEAD BackgroundTransparency = 1, Visible = false, Parent = screen, -======= - BackgroundTransparency = 1, Visible = false, Parent = gui, ->>>>>>> 1ff7ef7e83a97a0e100d5c3805ebc4ad762a2806 }) local GAUGE_C = Vector2.new(110 - GAUGE_R, 140) -- центр окружности левее рамки: дуга выгнута вправо local function arcPoint(v, r) @@ -7892,7 +7724,6 @@ local function setLook(obj, goal, instant) end end -<<<<<<< HEAD -- погода сгущает дымку поверх настроек локации (туман — сильно, дождь и гроза — слегка) local WEATHER_ATMO = { Fog = { Density = 0.22, Haze = 1.5 }, @@ -7904,8 +7735,6 @@ local function weatherAtmo(prop) return (add and add[prop]) or 0 end -======= ->>>>>>> 1ff7ef7e83a97a0e100d5c3805ebc4ad762a2806 local function applyLook(world, instant) -- исходные значения запоминаем до первой правки; эффект мог ещё не прийти с сервера, тогда в следующий раз for _, w in ipairs(lookSources) do @@ -7929,12 +7758,9 @@ local function applyLook(world, instant) for prop, def in pairs(defaults) do local v = look[section] and look[section][prop] if v == nil then v = def end -<<<<<<< HEAD if section == "atmosphere" and typeof(v) == "number" then v += weatherAtmo(prop) end -======= ->>>>>>> 1ff7ef7e83a97a0e100d5c3805ebc4ad762a2806 -- плавно меняются только числа и цвета; флаги и режимы (EnumItem) ставим сразу local kind = typeof(v) if kind == "number" or kind == "Color3" then goal[prop] = v else obj[prop] = v end @@ -7951,15 +7777,10 @@ local function applyAmbience(world, instant) end table.clear(lookTweens) world = world or Config.Lobby -<<<<<<< HEAD -- при смене суток часы двигает Ambience; иначе у каждой локации своё время if not Config.DayNight.enabled then setLook(Lighting, { ClockTime = (world and world.clock) or 14.5 }, instant) end -======= - local clock = (world and world.clock) or 14.5 - setLook(Lighting, { ClockTime = clock }, instant) ->>>>>>> 1ff7ef7e83a97a0e100d5c3805ebc4ad762a2806 local cc = Lighting:FindFirstChildOfClass("ColorCorrectionEffect") if cc then setLook(cc, { TintColor = (world and world.tint) or DEFAULT_LOOK.tint }, instant) @@ -8063,7 +7884,6 @@ local function enterWorld(w, instant) end end -<<<<<<< HEAD -- погода сменилась: плавно пересчитываем дымку текущей локации workspace:GetAttributeChangedSignal("Weather"):Connect(function() if lastWorldId ~= "none" and not loadingVisible() then @@ -8083,8 +7903,6 @@ do end) end -======= ->>>>>>> 1ff7ef7e83a97a0e100d5c3805ebc4ad762a2806 -- первое появление: ждём персонажа, ставим свет его локации сразу и отпускаем экран загрузки task.spawn(function() local char = player.Character or player.CharacterAdded:Wait() @@ -8162,7 +7980,6 @@ local guideStep = 0 -- шаг, отправленный на сервер (ат -- крупная мультяшная подсказка под уведомлениями: покачивается, при смене шага «выпрыгивает» local guideHint, guideHintText = softPlate( -<<<<<<< HEAD { Size = UDim2.fromOffset(0, 70), AutomaticSize = Enum.AutomaticSize.X, AnchorPoint = Vector2.new(0.5, 0), Position = UDim2.new(0.5, 0, 0, 10), Visible = false, Parent = screen }, { TextSize = 42, Text = "" } ) @@ -8170,12 +7987,6 @@ wobble(guideHint, 1.2, 1.6) Theme.onLayout(function(compact) guideHintText.TextSize = compact and 30 or 42 end) -======= - { Size = UDim2.fromOffset(0, 70), AutomaticSize = Enum.AutomaticSize.X, AnchorPoint = Vector2.new(0.5, 0), Position = UDim2.new(0.5, 0, 0, 10), Visible = false, Parent = gui }, - { TextSize = 42, Text = "" } -) -wobble(guideHint, 1.2, 1.6) ->>>>>>> 1ff7ef7e83a97a0e100d5c3805ebc4ad762a2806 local lastHint = nil local guideFolder = new("Folder", { Name = "TutorialGuide", Parent = workspace }) @@ -8376,11 +8187,7 @@ local function guideRoute(step, pos, world) elseif step == 2 and inW1 then return { guideMarker("GuideFishSpot") }, "🎣 Зажми ЛКМ у воды", "Pier" elseif step == 3 and inW1 then -<<<<<<< HEAD return { sellTargetW1() }, "⚪ Продай рыбу", "Sell" -- лавка у самого причала, идём напрямую -======= - return { sellTargetW1() }, "💰 Продай рыбу", "Sell" -- лавка у самого причала, идём напрямую ->>>>>>> 1ff7ef7e83a97a0e100d5c3805ebc4ad762a2806 end return nil end @@ -8545,19 +8352,11 @@ local FIRE = Color3.fromRGB(255, 150, 60) -- серия улова — справа от HUD; полоска показывает, сколько осталось до того, как серия сгорит local comboBox = new("Frame", { -<<<<<<< HEAD Size = UDim2.fromOffset(140, 66), Position = UDim2.fromOffset(310, 10), BackgroundColor3 = WHITE, Visible = false, Parent = screen, }, { corner(14), stroke(FIRE, 2, 0.1), gradient(Color3.fromRGB(110, 50, 20), C.bg, 90) }) local comboMultText = text({ Size = UDim2.new(1, 0, 0, 34), Position = UDim2.fromOffset(0, 3), Font = TITLE, TextSize = 28, TextXAlignment = CENTER, TextColor3 = Color3.fromRGB(255, 195, 95), TextStrokeTransparency = 0.5, Text = "", Parent = comboBox }) local comboSub = text({ Size = UDim2.new(1, 0, 0, 16), Position = UDim2.fromOffset(0, 36), Font = BODY2, TextSize = 12, TextXAlignment = CENTER, TextColor3 = C.muted, Text = "", Parent = comboBox }) local comboBack = new("Frame", { Size = UDim2.new(1, -20, 0, 5), Position = UDim2.new(0, 10, 1, -10), BackgroundColor3 = C.dark, Parent = comboBox }, { corner(3) }) -======= - Size = UDim2.fromOffset(140, 66), Position = UDim2.fromOffset(310, 10), BackgroundColor3 = WHITE, Visible = false, Parent = gui, -}, { corner(14), stroke(FIRE, 2, 0.1), gradient(Color3.fromRGB(110, 50, 20), C.bg, 90) }) -local comboMultText = text({ Size = UDim2.new(1, 0, 0, 34), Position = UDim2.fromOffset(0, 3), Font = TITLE, TextSize = 28, TextXAlignment = CENTER, TextColor3 = Color3.fromRGB(255, 195, 95), TextStrokeTransparency = 0.5, Text = "", Parent = comboBox }) -local comboSub = text({ Size = UDim2.new(1, 0, 0, 16), Position = UDim2.fromOffset(0, 36), Font = BODY2, TextSize = 12, TextXAlignment = CENTER, TextColor3 = C.muted, Text = "", Parent = comboBox }) -local comboBack = new("Frame", { Size = UDim2.new(1, -20, 0, 5), Position = UDim2.new(0, 10, 1, -10), BackgroundColor3 = Color3.fromRGB(14, 18, 30), Parent = comboBox }, { corner(3) }) ->>>>>>> 1ff7ef7e83a97a0e100d5c3805ebc4ad762a2806 local comboFill = new("Frame", { Size = UDim2.fromScale(1, 1), BackgroundColor3 = FIRE, BorderSizePixel = 0, Parent = comboBack }, { corner(3) }) local function refreshCombo(pop) @@ -8580,7 +8379,6 @@ refreshCombo(false) -- правая колонка: босс и цели local rightCol = new("Frame", { Size = UDim2.fromOffset(300, 0), AutomaticSize = Enum.AutomaticSize.Y, AnchorPoint = Vector2.new(1, 0.5), Position = UDim2.new(1, -12, 0.5, 10), -<<<<<<< HEAD BackgroundTransparency = 1, Parent = screen, }, { new("UIListLayout", { Padding = UDim.new(0, 8), SortOrder = Enum.SortOrder.LayoutOrder }) }) @@ -8593,20 +8391,11 @@ Theme.onLayout(function(compact) comboBox.Position = compact and UDim2.fromOffset(254, 6) or UDim2.fromOffset(310, 10) end) -======= - BackgroundTransparency = 1, Parent = gui, -}, { new("UIListLayout", { Padding = UDim.new(0, 8), SortOrder = Enum.SortOrder.LayoutOrder }) }) - ->>>>>>> 1ff7ef7e83a97a0e100d5c3805ebc4ad762a2806 local bossBox = new("Frame", { Size = UDim2.fromOffset(300, 78), BackgroundColor3 = WHITE, Visible = false, LayoutOrder = 1, Parent = rightCol }, { corner(14), stroke(C.red, 2.5, 0.05), gradient(Color3.fromRGB(110, 30, 40), C.bg, 90) }) local bossTitle = text({ Size = UDim2.new(1, -80, 0, 24), Position = UDim2.fromOffset(12, 5), Font = TITLE, TextSize = 18, TextColor3 = Color3.fromRGB(255, 205, 120), TextTruncate = Enum.TextTruncate.AtEnd, Text = "", Parent = bossBox }) local bossTime = text({ Size = UDim2.fromOffset(60, 24), AnchorPoint = Vector2.new(1, 0), Position = UDim2.new(1, -12, 0, 5), Font = TITLE, TextSize = 17, TextXAlignment = RIGHT, Text = "", Parent = bossBox }) -<<<<<<< HEAD local bossBack = new("Frame", { Size = UDim2.new(1, -24, 0, 18), Position = UDim2.fromOffset(12, 32), BackgroundColor3 = C.dark, Parent = bossBox }, { corner(9) }) -======= -local bossBack = new("Frame", { Size = UDim2.new(1, -24, 0, 18), Position = UDim2.fromOffset(12, 32), BackgroundColor3 = Color3.fromRGB(14, 18, 30), Parent = bossBox }, { corner(9) }) ->>>>>>> 1ff7ef7e83a97a0e100d5c3805ebc4ad762a2806 local bossFill = new("Frame", { Size = UDim2.fromScale(1, 1), BackgroundColor3 = WHITE, Parent = bossBack }, { corner(9), gradient(Color3.fromRGB(255, 120, 90), Color3.fromRGB(190, 30, 50), 0) }) local bossHpText = text({ Size = UDim2.fromScale(1, 1), TextSize = 12, TextXAlignment = CENTER, ZIndex = 2, TextStrokeTransparency = 0.5, Text = "", Parent = bossBack }) local bossHint = text({ Size = UDim2.new(1, -24, 0, 18), Position = UDim2.fromOffset(12, 54), Font = BODY2, TextSize = 12, TextColor3 = C.muted, Text = "", Parent = bossBox }) @@ -8621,11 +8410,7 @@ text({ Size = UDim2.new(1, 0, 0, 20), LayoutOrder = 0, Font = TITLE, TextSize = local function trackerLine(order, onClick) local root = new("TextButton", { Size = UDim2.new(1, 0, 0, 38), BackgroundTransparency = 1, AutoButtonColor = false, Text = "", LayoutOrder = order, Parent = tracker }) local label = text({ Size = UDim2.new(1, 0, 0, 22), Font = BODY, TextSize = 14, RichText = true, TextTruncate = Enum.TextTruncate.AtEnd, Text = "", Parent = root }) -<<<<<<< HEAD local back = new("Frame", { Size = UDim2.new(1, 0, 0, 8), Position = UDim2.fromOffset(0, 26), BackgroundColor3 = C.dark, Parent = root }, { corner(4) }) -======= - local back = new("Frame", { Size = UDim2.new(1, 0, 0, 8), Position = UDim2.fromOffset(0, 26), BackgroundColor3 = Color3.fromRGB(14, 18, 30), Parent = root }, { corner(4) }) ->>>>>>> 1ff7ef7e83a97a0e100d5c3805ebc4ad762a2806 local fill = new("Frame", { Size = UDim2.fromScale(0, 1), BackgroundColor3 = C.gold, BorderSizePixel = 0, Parent = back }, { corner(4) }) if onClick then root.MouseButton1Click:Connect(onClick) @@ -8680,11 +8465,7 @@ local function buyGoal() elseif coins >= r.price then return ("🎣 %s — можно купить!"):format(r.name), 1, C.green end -<<<<<<< HEAD return ("🎣 До «%s»: ещё %s ⚪"):format(r.name, fmt(r.price - coins)), coins / r.price, C.gold -======= - return ("🎣 До «%s»: ещё %s 💰"):format(r.name, fmt(r.price - coins)), coins / r.price, C.gold ->>>>>>> 1ff7ef7e83a97a0e100d5c3805ebc4ad762a2806 end end local rod = Config.Find(Config.Rods, player:GetAttribute("Rod") or "Basic") @@ -8694,11 +8475,7 @@ local function buyGoal() if coins >= cost then return ("✨ Улучшение до +%d — можно купить!"):format(rl + 1), 1, C.green end -<<<<<<< HEAD return ("✨ До улучшения +%d: ещё %s ⚪"):format(rl + 1, fmt(cost - coins)), coins / cost, C.gold -======= - return ("✨ До улучшения +%d: ещё %s 💰"):format(rl + 1, fmt(cost - coins)), coins / cost, C.gold ->>>>>>> 1ff7ef7e83a97a0e100d5c3805ebc4ad762a2806 end return nil end @@ -8842,11 +8619,7 @@ end) -- у скупщика после продажи: предложение купить то, на что уже хватает local offerCard = new("Frame", { Size = UDim2.fromOffset(440, 96), AnchorPoint = Vector2.new(0.5, 1), Position = UDim2.new(0.5, 0, 1, -110), -<<<<<<< HEAD BackgroundColor3 = WHITE, Visible = false, Parent = screen, -======= - BackgroundColor3 = WHITE, Visible = false, Parent = gui, ->>>>>>> 1ff7ef7e83a97a0e100d5c3805ebc4ad762a2806 }, { corner(16), stroke(C.green, 2.5, 0.05), gradient(Color3.fromRGB(30, 85, 55), C.bg, 90) }) local offerIcon = text({ Size = UDim2.fromOffset(70, 70), Position = UDim2.fromOffset(12, 13), TextSize = 46, TextXAlignment = CENTER, Text = "", Parent = offerCard }) local offerTitle = text({ Size = UDim2.new(1, -250, 0, 26), Position = UDim2.fromOffset(90, 12), Font = TITLE, TextSize = 19, TextTruncate = Enum.TextTruncate.AtEnd, Text = "", Parent = offerCard }) @@ -8859,19 +8632,11 @@ end local offerBuy = btn({ Size = UDim2.fromOffset(146, 52), AnchorPoint = Vector2.new(1, 0.5), Position = UDim2.new(1, -14, 0.5, 0), BackgroundColor3 = C.green, TextSize = 18, Text = "", Parent = offerCard }, function() if offerItem then remote:FireServer("Buy", offerItem.kind, offerItem.id) -<<<<<<< HEAD Audio.play("coins") end hideOffer() end) btn({ Size = UDim2.fromOffset(26, 26), Position = UDim2.new(1, -18, 0, -8), BackgroundColor3 = C.red, Text = "×", TextSize = 22, Parent = offerCard }, hideOffer) -======= - playUiSound(DING, 0.5) - end - hideOffer() -end) -btn({ Size = UDim2.fromOffset(26, 26), Position = UDim2.new(1, -18, 0, -8), BackgroundColor3 = C.red, Text = "✕", TextSize = 14, Parent = offerCard }, hideOffer) ->>>>>>> 1ff7ef7e83a97a0e100d5c3805ebc4ad762a2806 bestOffer = function(bagWasFull) local coins, lvl = player:GetAttribute("Coins") or 0, player:GetAttribute("Level") or 1 @@ -8923,11 +8688,7 @@ showOffer = function(o) offerIcon.Text = o.icon offerTitle.Text = o.title offerDesc.Text = o.desc -<<<<<<< HEAD offerBuy.Text = ("Купить · %s ⚪"):format(fmt(o.price)) -======= - offerBuy.Text = ("Купить · %s 💰"):format(fmt(o.price)) ->>>>>>> 1ff7ef7e83a97a0e100d5c3805ebc4ad762a2806 offerCard.Visible = true popIn(offerCard, 0.6) task.delay(9, function() @@ -8956,12 +8717,9 @@ remote.OnClientEvent:Connect(function(action, a, b, c, d) setState("waiting") startCastCam(a, b) elseif action == "CastFail" or action == "Cancel" or action == "Escaped" then -<<<<<<< HEAD if action == "Escaped" then Audio.play("escape") end -======= ->>>>>>> 1ff7ef7e83a97a0e100d5c3805ebc4ad762a2806 if action == "CastFail" and castTool and castTool.Parent then castTool.Grip = gripCF(REST_ANGLE) -- сервер удочку не трогал, а у нас она в замахе end @@ -8990,20 +8748,12 @@ remote.OnClientEvent:Connect(function(action, a, b, c, d) Audio.play("sparkle") end elseif action == "Sold" then -<<<<<<< HEAD Audio.play("coins") if tutorialStep() == 3 then advanceTutorial(Config.TutorialDone) end floatText("+" .. fmt(a) .. " ⚪", C.gold) notify(("⚪ +%s"):format(fmt(a)), Color3.fromRGB(120, 255, 140)) -======= - if tutorialStep() == 3 then - advanceTutorial(Config.TutorialDone) - end - floatText("+" .. fmt(a) .. " 💰", C.gold) - notify(("💰 +%s"):format(fmt(a)), Color3.fromRGB(120, 255, 140)) ->>>>>>> 1ff7ef7e83a97a0e100d5c3805ebc4ad762a2806 -- монеты приходят атрибутом чуть позже события, поэтому предложение — с задержкой local wasFull = offerState.bagWasFull offerState.bagWasFull = false @@ -9032,30 +8782,17 @@ remote.OnClientEvent:Connect(function(action, a, b, c, d) refreshDots() refreshTracker() elseif action == "QuestDone" then -<<<<<<< HEAD notify(("✅ %s +%s ⚪ +%s XP"):format(questText(a, b), fmt(c), fmt(d or 0)), Color3.fromRGB(120, 255, 140)) Audio.play("quest") elseif action == "ChainDone" then floatText("🏆 Цепочка пройдена!", C.gold) notify(("🎁 %s: +%s ⚪ +%s XP%s"):format(a, fmt(b), fmt(c), d and (" + " .. d) or ""), C.gold) Audio.play("fanfare") -======= - notify(("✅ %s +%s 💰 +%s XP"):format(questText(a, b), fmt(c), fmt(d or 0)), Color3.fromRGB(120, 255, 140)) - playUiSound(DING, 0.6) - elseif action == "ChainDone" then - floatText("🏆 Цепочка пройдена!", C.gold) - notify(("🎁 %s: +%s 💰 +%s XP%s"):format(a, fmt(b), fmt(c), d and (" + " .. d) or ""), C.gold) - playUiSound(DING, 0.8) ->>>>>>> 1ff7ef7e83a97a0e100d5c3805ebc4ad762a2806 elseif action == "ComboLost" then notify(("💔 Серия из %d прервана"):format(a), Color3.fromRGB(255, 130, 110)) elseif action == "BossStart" then notify(("👑 %s в мире «%s»! Ловите всем сервером"):format(a, b), C.gold) -<<<<<<< HEAD Audio.play("quest") -======= - playUiSound(DING, 0.8) ->>>>>>> 1ff7ef7e83a97a0e100d5c3805ebc4ad762a2806 elseif action == "BossHit" then floatText(("⚔ -%d боссу"):format(a), Color3.fromRGB(255, 130, 100)) elseif action == "BossDone" then @@ -9065,11 +8802,7 @@ remote.OnClientEvent:Connect(function(action, a, b, c, d) notify(("🌊 %s ушёл на глубину…"):format(b), C.muted) end elseif action == "BossReward" then -<<<<<<< HEAD notify(("🎁 За босса: +%s ⚪ +%s XP%s"):format(fmt(a), fmt(b), c and (" + " .. c) or ""), Color3.fromRGB(120, 255, 140)) -======= - notify(("🎁 За босса: +%s 💰 +%s XP%s"):format(fmt(a), fmt(b), c and (" + " .. c) or ""), Color3.fromRGB(120, 255, 140)) ->>>>>>> 1ff7ef7e83a97a0e100d5c3805ebc4ad762a2806 elseif action == "OpenShop" then shopWin.open("rods") elseif action == "OpenQuests" then diff --git a/src/ReplicatedStorage/FishConfig.lua b/src/ReplicatedStorage/FishConfig.lua index 5f925d6..ba0fbf4 100644 --- a/src/ReplicatedStorage/FishConfig.lua +++ b/src/ReplicatedStorage/FishConfig.lua @@ -364,7 +364,6 @@ Config.QuestKinds = { perfectCast = { text = "Забрось в зелёную зону %d %s", forms = TIMES, coins = 8, xp = 6 }, combo = { text = "Набери серию из %d рыб", coins = 12, xp = 10, max = 15 }, sell = { text = "Продай %d %s", forms = FISH, coins = 3, xp = 3 }, -<<<<<<< HEAD earn = { text = "Заработай %d ⚪ на продаже", coins = 0.25, xp = 0.2, byLevel = true }, buy = { text = "Купи что-нибудь в магазине", coins = 40, xp = 30, max = 1 }, boss = { text = "Нанеси боссу %d урона", coins = 15, xp = 12 }, @@ -377,40 +376,6 @@ Config.QuestChains = { } Config.QuestTierGrowth = 0.5 -- каждый следующий круг цепочек: цели ×(1 + 0.5 · номер круга) Config.ChainBonus = { coins = 120, xp = 100, potion = "Luck1" } -- за всю цепочку (растёт с уровнем и кругом) -======= - earn = { text = "Заработай %d 💰 на продаже", coins = 0.25, xp = 0.2, byLevel = true }, - buy = { text = "Купи что-нибудь в магазине", coins = 40, xp = 30, max = 1 }, - boss = { text = "Нанеси боссу %d урона", coins = 15, xp = 12 }, -} -Config.QuestChains = { - { name = "🎣 Утренний клёв", steps = { { "catch", 3 }, { "perfectCast", 2 }, { "sell", 3 }, { "catch", 5 }, { "uncommon", 1 } } }, - { name = "🔥 Без промаха", steps = { { "perfect", 3 }, { "combo", 3 }, { "catch", 6 }, { "earn", 80 }, { "combo", 5 } } }, - { name = "💎 Охота за редкостью", steps = { { "uncommon", 3 }, { "perfectCast", 3 }, { "rare", 1 }, { "sell", 8 }, { "buy", 1 } } }, - { name = "🏆 Мастер озера", steps = { { "combo", 6 }, { "catch", 10 }, { "perfect", 6 }, { "rare", 2 }, { "earn", 300 } } }, -} -Config.QuestTierGrowth = 0.5 -- каждый следующий круг цепочек: цели ×(1 + 0.5 · номер круга) -Config.ChainBonus = { coins = 120, xp = 100, potion = "Luck1" } -- за всю цепочку (растёт с уровнем и кругом) - ----------------------------------------------------------------- серия улова --- каждая рыба подряд без срыва: +10% к цене и опыту следующей, до ×2; --- срыв, ушедшая рыба или timeout секунд без улова — серия сгорает -Config.Combo = { step = 0.1, max = 2.0, timeout = 90 } - ----------------------------------------------------------------- босс озера --- раз в interval секунд в мир, где больше всего игроков, приплывает босс. Его ловят всем сервером: --- каждая пойманная там рыба наносит урон = ранг редкости (+1 за подсечку без промаха). --- Если за duration секунд урона хватило — награда всем, кто помог (× mult мира, минимум 40% за малый вклад) -Config.Boss = { - firstDelay = 240, interval = 600, duration = 180, - hpPerPlayer = 12, - reward = { coins = 300, xp = 250, potion = "Luck1" }, - worlds = { - World1 = { name = "Сом-великан", fish = "Som", mutation = "Golden", scale = 5 }, - World2 = { name = "Королевская акула", fish = "Shark", mutation = "Golden", scale = 3 }, - World3 = { name = "Ледяной левиафан", fish = "Leviathan", mutation = "Rainbow", scale = 2.5 }, - }, -} ->>>>>>> 1ff7ef7e83a97a0e100d5c3805ebc4ad762a2806 ---------------------------------------------------------------- серия улова -- каждая рыба подряд без срыва: +10% к цене и опыту следующей, до ×2; @@ -554,19 +519,21 @@ Config.Sounds = { Config.DefaultVolume = { music = 0.6, sfx = 0.8 } ---------------------------------------------------------------- донат (Robux) --- ВАЖНО: впиши сюда ID своих пропусков и товаров с create.roblox.com. +-- Все товары — Developer Products игры (create.roblox.com → Monetization → Developer Products); +-- id — Product ID оттуда, robux — цена для кнопки (должна совпадать с ценой в Roblox). +-- Пропуска тоже Developer Products: покупаются один раз, сервер запоминает их в данных игрока навсегда. -- Пока id = 0, кнопка покупки покажет подсказку, что товар не настроен. Config.GamePasses = { - { key = "VIP", id = 0, robux = 199, icon = "👑", name = "VIP", desc = "+25% удачи и серебра, корона над головой" }, - { key = "DoubleCoins", id = 0, robux = 299, icon = "⚪", name = "x2 Серебро", desc = "Вся рыба продаётся в 2 раза дороже" }, - { key = "LuckyCharm", id = 0, robux = 349, icon = "🍀", name = "Талисман удачи", desc = "+50% удачи навсегда" }, - { key = "BigBag", id = 0, robux = 149, icon = "🎒", name = "Бездонная сумка", desc = "+100 мест в любой сумке" }, + { key = "VIP", id = 3728143641, robux = 199, icon = "👑", name = "VIP", desc = "+25% удачи и серебра, корона над головой" }, + { key = "DoubleCoins", id = 3728143692, robux = 299, icon = "⚪", name = "x2 Серебро", desc = "Вся рыба продаётся в 2 раза дороже" }, + { key = "LuckyCharm", id = 3728143735, robux = 349, icon = "🍀", name = "Талисман удачи", desc = "+50% удачи навсегда" }, + { key = "BigBag", id = 3728143773, robux = 149, icon = "🎒", name = "Бездонная сумка", desc = "+100 мест в любой сумке" }, } Config.Products = { - { key = "Coins1", id = 0, robux = 49, icon = "👝", name = "Кошель серебра", desc = "+1 000 серебра (больше с уровнем)", coins = 1000 }, - { key = "Coins2", id = 0, robux = 199, icon = "⚪", name = "Сундук серебра", desc = "+5 000 серебра (больше с уровнем)", coins = 5000 }, - { key = "Coins3", id = 0, robux = 599, icon = "🏆", name = "Гора золота", desc = "+20 000 серебра (больше с уровнем)", coins = 20000 }, - { key = "Luck", id = 0, robux = 99, icon = "🧪", name = "Супер-зелье удачи", desc = "+200% удачи на 15 минут", boost = 2.0, duration = 900 }, + { key = "Coins1", id = 3728142264, robux = 49, icon = "👝", name = "Кошель серебра", desc = "+1 000 серебра (больше с уровнем)", coins = 1000 }, + { key = "Coins2", id = 3728142848, robux = 199, icon = "⚪", name = "Сундук серебра", desc = "+5 000 серебра (больше с уровнем)", coins = 5000 }, + { key = "Coins3", id = 3728142885, robux = 599, icon = "🏆", name = "Гора золота", desc = "+20 000 серебра (больше с уровнем)", coins = 20000 }, + { key = "Luck", id = 3728142916, robux = 99, icon = "🧪", name = "Супер-зелье удачи", desc = "+200% удачи на 15 минут", boost = 2.0, duration = 900 }, } ---------------------------------------------------------------- рыбалка diff --git a/src/ServerScriptService/GameServer.server.lua b/src/ServerScriptService/GameServer.server.lua index 7c7ad72..fc70fc2 100644 --- a/src/ServerScriptService/GameServer.server.lua +++ b/src/ServerScriptService/GameServer.server.lua @@ -45,6 +45,7 @@ local function defaultData() chain = { index = 1, step = 1, progress = 0, tier = 0 }, daily = { last = 0, streak = 0 }, boostUntil = 0, boostBonus = 0, totalCaught = 0, nextUid = 1, receipts = {}, + passes = {}, -- купленные пропуска (Developer Products): [key] = true settings = { music = Config.DefaultVolume.music, sfx = Config.DefaultVolume.sfx }, -- гильдия: жемчуг, печати, отдых (ранг, заказы, наживку, ловушки дополняет Guild.defaults) pearls = 0, seals = 0, rest = 0, @@ -90,16 +91,12 @@ local function hasPass(player, key) return passes[player] ~= nil and passes[player][key] == true end -local function loadPasses(player) +-- пропуска продаются как Developer Products, поэтому владение хранится в данных игрока, а не в Roblox +local function loadPasses(player, data) passes[player] = {} for _, gp in ipairs(Config.GamePasses) do - if gp.id and gp.id > 0 then - local ok, owns = pcall(function() - return MarketplaceService:UserOwnsGamePassAsync(player.UserId, gp.id) - end) - if ok and owns then - passes[player][gp.key] = true - end + if data.passes[gp.key] then + passes[player][gp.key] = true end end end @@ -426,11 +423,7 @@ local function claimCollection(player, worldId, rarity) if rarity == "Master" then local coins = Config.MasteryCoins * world.mult data.coins += coins -<<<<<<< HEAD notify(player, ("🏆 «%s» собран! +%d ⚪"):format(world.name, coins), GOLD) -======= - notify(player, ("🏆 «%s» собран! +%d 💰"):format(world.name, coins), GOLD) ->>>>>>> 1ff7ef7e83a97a0e100d5c3805ebc4ad762a2806 else local r = Config.CollectionRewards[rarity] if not r then @@ -438,11 +431,7 @@ local function claimCollection(player, worldId, rarity) end data.coins += r.coins * world.mult addXp(player, data, r.xp * world.mult) -<<<<<<< HEAD notify(player, ("📖 +%d ⚪ +%d XP"):format(r.coins * world.mult, r.xp * world.mult), GREEN) -======= - notify(player, ("📖 +%d 💰 +%d XP"):format(r.coins * world.mult, r.xp * world.mult), GREEN) ->>>>>>> 1ff7ef7e83a97a0e100d5c3805ebc4ad762a2806 end updateStats(player) sendInventory(player) @@ -766,17 +755,12 @@ local function stopFishing(player, tellClient) end end -<<<<<<< HEAD -- mods: { bait = наживка из Config.Baits, maxRank = потолок редкости (автоловля) } local function rollFish(player, data, worldId, luckMult, mods) -======= -local function rollFish(player, data, worldId, luckMult) ->>>>>>> 1ff7ef7e83a97a0e100d5c3805ebc4ad762a2806 local zone = Config.Zones[worldId] if not zone then return nil end -<<<<<<< HEAD mods = mods or {} local bait = mods.bait local base = totalLuck(player, data) + (bait and bait.luck or 0) @@ -784,9 +768,6 @@ local function rollFish(player, data, worldId, luckMult) base += bait.nightLuck - Config.DayNight.nightLuck -- светлячок: ночью +30% вместо обычных +10% end local luck = base * (luckMult or 1) -======= - local luck = totalLuck(player, data) * (luckMult or 1) ->>>>>>> 1ff7ef7e83a97a0e100d5c3805ebc4ad762a2806 local bonus = luck - 1 local weights, total = {}, 0 for i, f in ipairs(zone.fish) do @@ -871,12 +852,9 @@ local function flyBobber(s, tool, target, dur, arc) end end -<<<<<<< HEAD local autoFishing = {} -- [player] = токен работающей автоловли local setAutoFish, grantFish -- объявлены ниже -======= ->>>>>>> 1ff7ef7e83a97a0e100d5c3805ebc4ad762a2806 local function onCast(player, power) power = math.clamp(tonumber(power) or 0.6, 0, 1) local data = profiles[player] @@ -921,12 +899,8 @@ local function onCast(player, power) local stats = Config.RodStats(data.rod, rodLevel(data)) local perfect = power >= Config.CastPerfect[1] and power <= Config.CastPerfect[2] -<<<<<<< HEAD local bait = Guild.useBait(player, data) -- 1 штука наживки на заброс local fish = rollFish(player, data, world.id, perfect and Config.CastPerfectLuck or 1, { bait = bait }) -======= - local fish = rollFish(player, data, world.id, perfect and Config.CastPerfectLuck or 1) ->>>>>>> 1ff7ef7e83a97a0e100d5c3805ebc4ad762a2806 if not fish then remote:FireClient(player, "CastFail") return @@ -1030,7 +1004,6 @@ local function onCatch(player, success, misses) grantFish(player, data, s.fish, { perfect = s.perfect, misses = misses, fromPos = fromPos }) end -<<<<<<< HEAD -- рыба поймана (руками или автоловлей): в сумку, опыт, коллекция, задания, гильдия, босс. -- ctx: { perfect, misses, fromPos, auto }; у автоловли нет серии и бонусов за точность grantFish = function(player, data, fish, ctx) @@ -1044,15 +1017,6 @@ grantFish = function(player, data, fish, ctx) setCombo(player, streak + 1) end fish.xp = math.floor(fish.xp * Guild.xpMult(data)) -- бонус отдыха: двойной опыт -======= - -- серия: каждая рыба подряд дороже и даёт больше опыта - local fish = s.fish - local streak = combo[player] or 0 - local comboMult = math.min(Config.Combo.max, 1 + Config.Combo.step * streak) - fish.value = math.floor(fish.value * comboMult + 0.5) - fish.xp = math.floor(fish.xp * comboMult + 0.5) - setCombo(player, streak + 1) ->>>>>>> 1ff7ef7e83a97a0e100d5c3805ebc4ad762a2806 table.insert(data.items, { uid = data.nextUid, id = fish.id, name = fish.name, rarity = fish.rarity, weight = fish.weight, value = fish.value, mutation = fish.mutation, @@ -1078,11 +1042,7 @@ grantFish = function(player, data, fish, ctx) if ctx.fromPos then showFishFlight(player, fish, ctx.fromPos) end -<<<<<<< HEAD remote:FireClient(player, "Caught", fish, { new = isNew, record = isRecord, combo = comboMult, streak = ctx.auto and 0 or streak + 1, auto = ctx.auto }) -======= - remote:FireClient(player, "Caught", fish, { new = isNew, record = isRecord, combo = comboMult, streak = streak + 1 }) ->>>>>>> 1ff7ef7e83a97a0e100d5c3805ebc4ad762a2806 local rank = Config.Rarities[fish.rarity].rank questProgress(player, "catch", 1) @@ -1092,7 +1052,6 @@ grantFish = function(player, data, fish, ctx) if rank >= 3 then questProgress(player, "rare", 1) end -<<<<<<< HEAD if not ctx.auto then if ctx.misses == 0 then questProgress(player, "perfect", 1) @@ -1246,18 +1205,7 @@ setAutoFish = function(player, on, reason) stopFishing(player, false) end notify(player, reason or "🎣 Автоловля выключена", Color3.fromRGB(255, 200, 120)) -======= - if misses == 0 then - questProgress(player, "perfect", 1) ->>>>>>> 1ff7ef7e83a97a0e100d5c3805ebc4ad762a2806 end - if s.perfect then - questProgress(player, "perfectCast", 1) - end - questProgress(player, "combo", streak + 1, true) - - local hrp = player.Character and player.Character:FindFirstChild("HumanoidRootPart") - bossHit(player, hrp and Config.WorldAt(hrp.Position), rank + (misses == 0 and 1 or 0)) end ---------------------------------------------------------------- скупка @@ -1336,11 +1284,7 @@ local function buy(player, kind, id) end local cost = Guild.price(data, Config.UpgradeCost(rod, lvl)) -- скидка ранга гильдии if data.coins < cost then -<<<<<<< HEAD notify(player, "Нужно " .. cost .. " ⚪", RED) -======= - notify(player, "Нужно " .. cost .. " 💰", RED) ->>>>>>> 1ff7ef7e83a97a0e100d5c3805ebc4ad762a2806 return end data.coins -= cost @@ -1363,14 +1307,9 @@ local function buy(player, kind, id) notify(player, "🔒 Нужен ур. " .. potion.level, RED) return end -<<<<<<< HEAD local price = Guild.price(data, potion.price) if data.coins < price then notify(player, "Нужно " .. price .. " ⚪", RED) -======= - if data.coins < potion.price then - notify(player, "Нужно " .. potion.price .. " 💰", RED) ->>>>>>> 1ff7ef7e83a97a0e100d5c3805ebc4ad762a2806 return end data.coins -= price @@ -1398,14 +1337,9 @@ local function buy(player, kind, id) notify(player, "🔒 Нужен ур. " .. item.level, RED) return end -<<<<<<< HEAD local price = Guild.price(data, item.price) if data.coins < price then notify(player, "Нужно " .. price .. " ⚪", RED) -======= - if data.coins < item.price then - notify(player, "Нужно " .. item.price .. " 💰", RED) ->>>>>>> 1ff7ef7e83a97a0e100d5c3805ebc4ad762a2806 return end data.coins -= price @@ -1455,14 +1389,11 @@ local function teleportTo(player, worldId) end if data.level < world.level then notify(player, ("🔒 %s: ур. %d"):format(world.name, world.level), RED) -<<<<<<< HEAD return end local okRank, why = Guild.canEnter(data, world.id) if not okRank then notify(player, why, RED) -======= ->>>>>>> 1ff7ef7e83a97a0e100d5c3805ebc4ad762a2806 return end markerName = world.id .. "Spawn" @@ -1561,21 +1492,13 @@ remote.OnServerEvent:Connect(function(player, action, a, b) if nearSeller(player) then sellItems(player, a) else -<<<<<<< HEAD notify(player, "⚪ Только у скупщика", Color3.fromRGB(255, 200, 120)) -======= - notify(player, "💰 Только у скупщика", Color3.fromRGB(255, 200, 120)) ->>>>>>> 1ff7ef7e83a97a0e100d5c3805ebc4ad762a2806 end elseif action == "SellAll" then if nearSeller(player) then sellItems(player, nil) else -<<<<<<< HEAD notify(player, "⚪ Только у скупщика", Color3.fromRGB(255, 200, 120)) -======= - notify(player, "💰 Только у скупщика", Color3.fromRGB(255, 200, 120)) ->>>>>>> 1ff7ef7e83a97a0e100d5c3805ebc4ad762a2806 end elseif action == "Teleport" then teleportTo(player, a) @@ -1604,22 +1527,20 @@ end) ---------------------------------------------------------------- донат -MarketplaceService.PromptGamePassPurchaseFinished:Connect(function(player, passId, purchased) - if not purchased then - return - end - for _, gp in ipairs(Config.GamePasses) do - if gp.id == passId then - passes[player] = passes[player] or {} - passes[player][gp.key] = true - notify(player, "✅ " .. gp.icon .. " " .. gp.name, GOLD) - if gp.key == "VIP" then - vipTag(player) - end - updateStats(player) +-- все покупки — Developer Products: и наборы (Config.Products), и пропуска навсегда (Config.GamePasses) +local function findProduct(productId) + for _, p in ipairs(Config.Products) do + if p.id == productId then + return p, false end end -end) + for _, gp in ipairs(Config.GamePasses) do + if gp.id == productId then + return gp, true + end + end + return nil +end MarketplaceService.ProcessReceipt = function(info) local player = Players:GetPlayerByUserId(info.PlayerId) @@ -1632,15 +1553,20 @@ MarketplaceService.ProcessReceipt = function(info) return Enum.ProductPurchaseDecision.PurchaseGranted end end - local product - for _, p in ipairs(Config.Products) do - if p.id == info.ProductId then - product = p - end - end + local product, isPass = findProduct(info.ProductId) if not product then + warn("ProcessReceipt: неизвестный товар " .. tostring(info.ProductId)) return Enum.ProductPurchaseDecision.NotProcessedYet end + if isPass then + data.passes[product.key] = true + passes[player] = passes[player] or {} + passes[player][product.key] = true + notify(player, "✅ " .. product.icon .. " " .. product.name .. " — навсегда!", GOLD) + if product.key == "VIP" then + vipTag(player) + end + end if product.coins then local coins = math.floor(product.coins * (1 + (data.level - 1) * 0.15)) data.coins += coins @@ -1729,10 +1655,7 @@ local function finishBoss(won) if potion then applyPotion(data, potion.bonus, potion.duration) end -<<<<<<< HEAD Guild.onBossWin(p, data) -======= ->>>>>>> 1ff7ef7e83a97a0e100d5c3805ebc4ad762a2806 updateStats(p) remote:FireClient(p, "BossReward", coins, xp, potion and potion.name) end @@ -1800,13 +1723,10 @@ local function onPlayerAdded(player) if not player.Parent then return end - loadPasses(player) + loadPasses(player, data) ensureChain(data) -<<<<<<< HEAD Guild.defaults(data) Guild.onJoin(player, data) -======= ->>>>>>> 1ff7ef7e83a97a0e100d5c3805ebc4ad762a2806 profiles[player] = data loadedOk[player] = ok local settings = type(data.settings) == "table" and data.settings or {} @@ -1839,13 +1759,10 @@ end Players.PlayerRemoving:Connect(function(player) stopFishing(player, false) combo[player], comboUntil[player] = nil, nil -<<<<<<< HEAD autoFishing[player] = nil if profiles[player] then Guild.onLeave(profiles[player]) end -======= ->>>>>>> 1ff7ef7e83a97a0e100d5c3805ebc4ad762a2806 saveData(player) profiles[player] = nil loadedOk[player] = nil @@ -1886,13 +1803,10 @@ task.spawn(function() if data and data.boostUntil > os.time() - 2 then updateStats(p) end -<<<<<<< HEAD -- бонус отдыха тратится, пока игрок рыбачит if data and (fishing[p] or autoFishing[p]) then Guild.spendRest(p, data, 1) end -======= ->>>>>>> 1ff7ef7e83a97a0e100d5c3805ebc4ad762a2806 -- серия сгорает, если долго нет улова (пока рыба на крючке — ждём) if comboUntil[p] and os.time() > comboUntil[p] and not fishing[p] then breakCombo(p) diff --git a/src/ServerScriptService/WorldBuilder.lua b/src/ServerScriptService/WorldBuilder.lua index 4794fc6..6809e41 100644 --- a/src/ServerScriptService/WorldBuilder.lua +++ b/src/ServerScriptService/WorldBuilder.lua @@ -1827,7 +1827,6 @@ local function spawnNpc(spot, parent) w.C0 = head.CFrame:Inverse() * p.CFrame w.Parent = p p.Parent = rig -<<<<<<< HEAD return p end if spot:GetAttribute("Look") == "Elder" then @@ -1845,11 +1844,6 @@ local function spawnNpc(spot, parent) 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 -======= - 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) ->>>>>>> 1ff7ef7e83a97a0e100d5c3805ebc4ad762a2806 end local action = spot:GetAttribute("NpcAction") if action then diff --git a/src/StarterPlayer/StarterPlayerScripts/FishingClient.client.lua b/src/StarterPlayer/StarterPlayerScripts/FishingClient.client.lua index 37582a1..24ffa72 100644 --- a/src/StarterPlayer/StarterPlayerScripts/FishingClient.client.lua +++ b/src/StarterPlayer/StarterPlayerScripts/FishingClient.client.lua @@ -235,20 +235,12 @@ local SOFT_EDGES = NumberSequence.new({ NumberSequenceKeypoint.new(0.82, 0.62), NumberSequenceKeypoint.new(1, 1), }) -- жирный округлый шрифт с кириллицей (у FredokaOne кириллицы нет — Roblox подставляет тонкий шрифт) -<<<<<<< HEAD local HINT_FONT = Theme.HINT_FACE -- плашка-дымка (Frame) с текстом внутри; градиент только на плашке, на текст он не действует. -- Цвет — тёмное дерево local function softPlate(props, textProps) local plate = new("Frame", props) plate.BackgroundColor3 = C.woodDark -======= -local HINT_FONT = Font.new("rbxasset://fonts/families/Nunito.json", Enum.FontWeight.Heavy) --- плашка-дымка (Frame) с текстом внутри; градиент только на плашке, на текст он не действует -local function softPlate(props, textProps) - local plate = new("Frame", props) - plate.BackgroundColor3 = BLACK ->>>>>>> 1ff7ef7e83a97a0e100d5c3805ebc4ad762a2806 plate.BackgroundTransparency = 0 corner(30).Parent = plate new("UIGradient", { Transparency = SOFT_EDGES, Parent = plate }) @@ -274,11 +266,7 @@ end -- уведомления — под подсказкой обучения, которая стоит в самом верху local toasts = new("Frame", { Size = UDim2.new(0, 900, 0, 200), AnchorPoint = Vector2.new(0.5, 0), Position = UDim2.new(0.5, 0, 0, 84), -<<<<<<< HEAD BackgroundTransparency = 1, ZIndex = 30, Parent = screen, -======= - BackgroundTransparency = 1, Parent = gui, ->>>>>>> 1ff7ef7e83a97a0e100d5c3805ebc4ad762a2806 }, { new("UIListLayout", { Padding = UDim.new(0, 6), HorizontalAlignment = Enum.HorizontalAlignment.Center, SortOrder = Enum.SortOrder.LayoutOrder }) }) local toastOrder = 0 local toastTimers = {} @@ -309,11 +297,7 @@ local function notify(msg, color) end local t, l = softPlate( { Size = UDim2.new(0, 0, 0, 54), AutomaticSize = Enum.AutomaticSize.X, LayoutOrder = toastOrder, Parent = toasts }, -<<<<<<< HEAD { TextSize = 30, TextColor3 = color or C.text, Text = msg } -======= - { TextSize = 30, TextColor3 = color or WHITE, Text = msg } ->>>>>>> 1ff7ef7e83a97a0e100d5c3805ebc4ad762a2806 ) popIn(t) t:SetAttribute("Msg", msg) @@ -361,11 +345,7 @@ local function showCatch(fish, extra) catchName.TextColor3 = r.color catchInfo.Text = ("%s%s · %.2f кг"):format( hex(r.color), r.name, mut and (" · " .. mut.name .. " x" .. mut.mult .. "") or "", fish.weight) -<<<<<<< HEAD catchValue.Text = ("⚪ %s ⭐ +%d XP%s"):format(fmt(fish.value), fish.xp * ((extra and extra.new) and 2 or 1), -======= - catchValue.Text = ("💰 %s ⭐ +%d XP%s"):format(fmt(fish.value), fish.xp * ((extra and extra.new) and 2 or 1), ->>>>>>> 1ff7ef7e83a97a0e100d5c3805ebc4ad762a2806 (extra and extra.combo and extra.combo > 1.001) and (" 🔥 x%.1f"):format(extra.combo) or "") catchCard.Visible = true TweenService:Create(catchCard, TweenInfo.new(0.45, Enum.EasingStyle.Back, Enum.EasingDirection.Out), { Position = UDim2.new(0.5, 0, 0, 120) }):Play() @@ -397,11 +377,7 @@ end -- вверху, на месте подсказки обучения (она во время рыбалки скрыта) local statusLabel = softPlate( -<<<<<<< HEAD { Size = UDim2.fromOffset(0, 64), AutomaticSize = Enum.AutomaticSize.X, AnchorPoint = Vector2.new(0.5, 0), Position = UDim2.new(0.5, 0, 0, 12), Visible = false, Parent = screen }, -======= - { Size = UDim2.fromOffset(0, 64), AutomaticSize = Enum.AutomaticSize.X, AnchorPoint = Vector2.new(0.5, 0), Position = UDim2.new(0.5, 0, 0, 12), Visible = false, Parent = gui }, ->>>>>>> 1ff7ef7e83a97a0e100d5c3805ebc4ad762a2806 { TextSize = 36, Text = "🎣 Ждём клёв…" } ) wobble(statusLabel, 1.2, 1.4) @@ -994,11 +970,7 @@ questWin.render = function(tab) end text({ Size = UDim2.new(1, -4, 0, 30), LayoutOrder = 0, Font = TITLE, TextSize = 22, RichText = true, -<<<<<<< HEAD Text = ("%s круг %d · награда сразу, следующее задание — тоже"):format(chain.name, chain.round), Parent = questList, -======= - Text = ("%s круг %d · награда сразу, следующее задание — тоже"):format(chain.name, chain.round), Parent = questList, ->>>>>>> 1ff7ef7e83a97a0e100d5c3805ebc4ad762a2806 }) for i, st in ipairs(chain.steps) do local done, cur = i < chain.step, i == chain.step @@ -1011,11 +983,7 @@ questWin.render = function(tab) }) text({ Size = UDim2.fromOffset(180, 28), AnchorPoint = Vector2.new(1, 0), Position = UDim2.new(1, -14, 0, cur and 8 or 14), Font = TITLE, TextSize = 17, -<<<<<<< HEAD TextXAlignment = Enum.TextXAlignment.Right, TextColor3 = done and C.muted or C.gold, Text = ("+%s ⚪ +%s XP"):format(fmt(st.coins), fmt(st.xp)), Parent = row, -======= - TextXAlignment = Enum.TextXAlignment.Right, TextColor3 = done and C.muted or C.gold, Text = ("+%s 💰 +%s XP"):format(fmt(st.coins), fmt(st.xp)), Parent = row, ->>>>>>> 1ff7ef7e83a97a0e100d5c3805ebc4ad762a2806 }) if cur then progressBar(row, UDim2.fromOffset(16, 44), UDim2.new(1, -110, 0, 16), chain.progress / st.goal, C.gold) @@ -1028,11 +996,7 @@ questWin.render = function(tab) { corner(14), stroke(C.purple, 2, 0.2), gradient(Color3.fromRGB(70, 40, 100), C.panel, 90) }) text({ Size = UDim2.new(1, -32, 1, 0), Position = UDim2.fromOffset(16, 0), Font = TITLE, TextSize = 18, RichText = true, -<<<<<<< HEAD Text = ("🎁 За всю цепочку: +%s ⚪ +%s XP%s"):format(fmt(b.coins), fmt(b.xp), b.potion and (" + " .. b.potion) or ""), Parent = row, -======= - Text = ("🎁 За всю цепочку: +%s 💰 +%s XP%s"):format(fmt(b.coins), fmt(b.xp), b.potion and (" + " .. b.potion) or ""), Parent = row, ->>>>>>> 1ff7ef7e83a97a0e100d5c3805ebc4ad762a2806 }) elseif tab == "daily" then clear(dailyPage) @@ -1091,11 +1055,8 @@ robuxWin.render = function(tab) notify("⚙ Товар не настроен", Color3.fromRGB(255, 200, 120)) return end - if tab == "passes" then - MarketplaceService:PromptGamePassPurchase(player, it.id) - else - MarketplaceService:PromptProductPurchase(player, it.id) - end + -- и наборы, и пропуска — Developer Products; пропуск сервер запоминает навсегда + MarketplaceService:PromptProductPurchase(player, it.id) end, }) end @@ -1340,11 +1301,7 @@ end local GAUGE_R, GAUGE_DEG, GAUGE_N = 190, 110, 32 local gauge = new("Frame", { Size = UDim2.fromOffset(150, 280), AnchorPoint = Vector2.new(0, 0.5), Position = UDim2.new(0.57, 0, 0.48, 0), -<<<<<<< HEAD BackgroundTransparency = 1, Visible = false, Parent = screen, -======= - BackgroundTransparency = 1, Visible = false, Parent = gui, ->>>>>>> 1ff7ef7e83a97a0e100d5c3805ebc4ad762a2806 }) local GAUGE_C = Vector2.new(110 - GAUGE_R, 140) -- центр окружности левее рамки: дуга выгнута вправо local function arcPoint(v, r) @@ -1762,7 +1719,6 @@ local function setLook(obj, goal, instant) end end -<<<<<<< HEAD -- погода сгущает дымку поверх настроек локации (туман — сильно, дождь и гроза — слегка) local WEATHER_ATMO = { Fog = { Density = 0.22, Haze = 1.5 }, @@ -1774,8 +1730,6 @@ local function weatherAtmo(prop) return (add and add[prop]) or 0 end -======= ->>>>>>> 1ff7ef7e83a97a0e100d5c3805ebc4ad762a2806 local function applyLook(world, instant) -- исходные значения запоминаем до первой правки; эффект мог ещё не прийти с сервера, тогда в следующий раз for _, w in ipairs(lookSources) do @@ -1799,12 +1753,9 @@ local function applyLook(world, instant) for prop, def in pairs(defaults) do local v = look[section] and look[section][prop] if v == nil then v = def end -<<<<<<< HEAD if section == "atmosphere" and typeof(v) == "number" then v += weatherAtmo(prop) end -======= ->>>>>>> 1ff7ef7e83a97a0e100d5c3805ebc4ad762a2806 -- плавно меняются только числа и цвета; флаги и режимы (EnumItem) ставим сразу local kind = typeof(v) if kind == "number" or kind == "Color3" then goal[prop] = v else obj[prop] = v end @@ -1821,15 +1772,10 @@ local function applyAmbience(world, instant) end table.clear(lookTweens) world = world or Config.Lobby -<<<<<<< HEAD -- при смене суток часы двигает Ambience; иначе у каждой локации своё время if not Config.DayNight.enabled then setLook(Lighting, { ClockTime = (world and world.clock) or 14.5 }, instant) end -======= - local clock = (world and world.clock) or 14.5 - setLook(Lighting, { ClockTime = clock }, instant) ->>>>>>> 1ff7ef7e83a97a0e100d5c3805ebc4ad762a2806 local cc = Lighting:FindFirstChildOfClass("ColorCorrectionEffect") if cc then setLook(cc, { TintColor = (world and world.tint) or DEFAULT_LOOK.tint }, instant) @@ -1933,7 +1879,6 @@ local function enterWorld(w, instant) end end -<<<<<<< HEAD -- погода сменилась: плавно пересчитываем дымку текущей локации workspace:GetAttributeChangedSignal("Weather"):Connect(function() if lastWorldId ~= "none" and not loadingVisible() then @@ -1953,8 +1898,6 @@ do end) end -======= ->>>>>>> 1ff7ef7e83a97a0e100d5c3805ebc4ad762a2806 -- первое появление: ждём персонажа, ставим свет его локации сразу и отпускаем экран загрузки task.spawn(function() local char = player.Character or player.CharacterAdded:Wait() @@ -2032,7 +1975,6 @@ local guideStep = 0 -- шаг, отправленный на сервер (ат -- крупная мультяшная подсказка под уведомлениями: покачивается, при смене шага «выпрыгивает» local guideHint, guideHintText = softPlate( -<<<<<<< HEAD { Size = UDim2.fromOffset(0, 70), AutomaticSize = Enum.AutomaticSize.X, AnchorPoint = Vector2.new(0.5, 0), Position = UDim2.new(0.5, 0, 0, 10), Visible = false, Parent = screen }, { TextSize = 42, Text = "" } ) @@ -2040,12 +1982,6 @@ wobble(guideHint, 1.2, 1.6) Theme.onLayout(function(compact) guideHintText.TextSize = compact and 30 or 42 end) -======= - { Size = UDim2.fromOffset(0, 70), AutomaticSize = Enum.AutomaticSize.X, AnchorPoint = Vector2.new(0.5, 0), Position = UDim2.new(0.5, 0, 0, 10), Visible = false, Parent = gui }, - { TextSize = 42, Text = "" } -) -wobble(guideHint, 1.2, 1.6) ->>>>>>> 1ff7ef7e83a97a0e100d5c3805ebc4ad762a2806 local lastHint = nil local guideFolder = new("Folder", { Name = "TutorialGuide", Parent = workspace }) @@ -2246,11 +2182,7 @@ local function guideRoute(step, pos, world) elseif step == 2 and inW1 then return { guideMarker("GuideFishSpot") }, "🎣 Зажми ЛКМ у воды", "Pier" elseif step == 3 and inW1 then -<<<<<<< HEAD return { sellTargetW1() }, "⚪ Продай рыбу", "Sell" -- лавка у самого причала, идём напрямую -======= - return { sellTargetW1() }, "💰 Продай рыбу", "Sell" -- лавка у самого причала, идём напрямую ->>>>>>> 1ff7ef7e83a97a0e100d5c3805ebc4ad762a2806 end return nil end @@ -2415,19 +2347,11 @@ local FIRE = Color3.fromRGB(255, 150, 60) -- серия улова — справа от HUD; полоска показывает, сколько осталось до того, как серия сгорит local comboBox = new("Frame", { -<<<<<<< HEAD Size = UDim2.fromOffset(140, 66), Position = UDim2.fromOffset(310, 10), BackgroundColor3 = WHITE, Visible = false, Parent = screen, }, { corner(14), stroke(FIRE, 2, 0.1), gradient(Color3.fromRGB(110, 50, 20), C.bg, 90) }) local comboMultText = text({ Size = UDim2.new(1, 0, 0, 34), Position = UDim2.fromOffset(0, 3), Font = TITLE, TextSize = 28, TextXAlignment = CENTER, TextColor3 = Color3.fromRGB(255, 195, 95), TextStrokeTransparency = 0.5, Text = "", Parent = comboBox }) local comboSub = text({ Size = UDim2.new(1, 0, 0, 16), Position = UDim2.fromOffset(0, 36), Font = BODY2, TextSize = 12, TextXAlignment = CENTER, TextColor3 = C.muted, Text = "", Parent = comboBox }) local comboBack = new("Frame", { Size = UDim2.new(1, -20, 0, 5), Position = UDim2.new(0, 10, 1, -10), BackgroundColor3 = C.dark, Parent = comboBox }, { corner(3) }) -======= - Size = UDim2.fromOffset(140, 66), Position = UDim2.fromOffset(310, 10), BackgroundColor3 = WHITE, Visible = false, Parent = gui, -}, { corner(14), stroke(FIRE, 2, 0.1), gradient(Color3.fromRGB(110, 50, 20), C.bg, 90) }) -local comboMultText = text({ Size = UDim2.new(1, 0, 0, 34), Position = UDim2.fromOffset(0, 3), Font = TITLE, TextSize = 28, TextXAlignment = CENTER, TextColor3 = Color3.fromRGB(255, 195, 95), TextStrokeTransparency = 0.5, Text = "", Parent = comboBox }) -local comboSub = text({ Size = UDim2.new(1, 0, 0, 16), Position = UDim2.fromOffset(0, 36), Font = BODY2, TextSize = 12, TextXAlignment = CENTER, TextColor3 = C.muted, Text = "", Parent = comboBox }) -local comboBack = new("Frame", { Size = UDim2.new(1, -20, 0, 5), Position = UDim2.new(0, 10, 1, -10), BackgroundColor3 = Color3.fromRGB(14, 18, 30), Parent = comboBox }, { corner(3) }) ->>>>>>> 1ff7ef7e83a97a0e100d5c3805ebc4ad762a2806 local comboFill = new("Frame", { Size = UDim2.fromScale(1, 1), BackgroundColor3 = FIRE, BorderSizePixel = 0, Parent = comboBack }, { corner(3) }) local function refreshCombo(pop) @@ -2450,7 +2374,6 @@ refreshCombo(false) -- правая колонка: босс и цели local rightCol = new("Frame", { Size = UDim2.fromOffset(300, 0), AutomaticSize = Enum.AutomaticSize.Y, AnchorPoint = Vector2.new(1, 0.5), Position = UDim2.new(1, -12, 0.5, 10), -<<<<<<< HEAD BackgroundTransparency = 1, Parent = screen, }, { new("UIListLayout", { Padding = UDim.new(0, 8), SortOrder = Enum.SortOrder.LayoutOrder }) }) @@ -2463,20 +2386,11 @@ Theme.onLayout(function(compact) comboBox.Position = compact and UDim2.fromOffset(254, 6) or UDim2.fromOffset(310, 10) end) -======= - BackgroundTransparency = 1, Parent = gui, -}, { new("UIListLayout", { Padding = UDim.new(0, 8), SortOrder = Enum.SortOrder.LayoutOrder }) }) - ->>>>>>> 1ff7ef7e83a97a0e100d5c3805ebc4ad762a2806 local bossBox = new("Frame", { Size = UDim2.fromOffset(300, 78), BackgroundColor3 = WHITE, Visible = false, LayoutOrder = 1, Parent = rightCol }, { corner(14), stroke(C.red, 2.5, 0.05), gradient(Color3.fromRGB(110, 30, 40), C.bg, 90) }) local bossTitle = text({ Size = UDim2.new(1, -80, 0, 24), Position = UDim2.fromOffset(12, 5), Font = TITLE, TextSize = 18, TextColor3 = Color3.fromRGB(255, 205, 120), TextTruncate = Enum.TextTruncate.AtEnd, Text = "", Parent = bossBox }) local bossTime = text({ Size = UDim2.fromOffset(60, 24), AnchorPoint = Vector2.new(1, 0), Position = UDim2.new(1, -12, 0, 5), Font = TITLE, TextSize = 17, TextXAlignment = RIGHT, Text = "", Parent = bossBox }) -<<<<<<< HEAD local bossBack = new("Frame", { Size = UDim2.new(1, -24, 0, 18), Position = UDim2.fromOffset(12, 32), BackgroundColor3 = C.dark, Parent = bossBox }, { corner(9) }) -======= -local bossBack = new("Frame", { Size = UDim2.new(1, -24, 0, 18), Position = UDim2.fromOffset(12, 32), BackgroundColor3 = Color3.fromRGB(14, 18, 30), Parent = bossBox }, { corner(9) }) ->>>>>>> 1ff7ef7e83a97a0e100d5c3805ebc4ad762a2806 local bossFill = new("Frame", { Size = UDim2.fromScale(1, 1), BackgroundColor3 = WHITE, Parent = bossBack }, { corner(9), gradient(Color3.fromRGB(255, 120, 90), Color3.fromRGB(190, 30, 50), 0) }) local bossHpText = text({ Size = UDim2.fromScale(1, 1), TextSize = 12, TextXAlignment = CENTER, ZIndex = 2, TextStrokeTransparency = 0.5, Text = "", Parent = bossBack }) local bossHint = text({ Size = UDim2.new(1, -24, 0, 18), Position = UDim2.fromOffset(12, 54), Font = BODY2, TextSize = 12, TextColor3 = C.muted, Text = "", Parent = bossBox }) @@ -2491,11 +2405,7 @@ text({ Size = UDim2.new(1, 0, 0, 20), LayoutOrder = 0, Font = TITLE, TextSize = local function trackerLine(order, onClick) local root = new("TextButton", { Size = UDim2.new(1, 0, 0, 38), BackgroundTransparency = 1, AutoButtonColor = false, Text = "", LayoutOrder = order, Parent = tracker }) local label = text({ Size = UDim2.new(1, 0, 0, 22), Font = BODY, TextSize = 14, RichText = true, TextTruncate = Enum.TextTruncate.AtEnd, Text = "", Parent = root }) -<<<<<<< HEAD local back = new("Frame", { Size = UDim2.new(1, 0, 0, 8), Position = UDim2.fromOffset(0, 26), BackgroundColor3 = C.dark, Parent = root }, { corner(4) }) -======= - local back = new("Frame", { Size = UDim2.new(1, 0, 0, 8), Position = UDim2.fromOffset(0, 26), BackgroundColor3 = Color3.fromRGB(14, 18, 30), Parent = root }, { corner(4) }) ->>>>>>> 1ff7ef7e83a97a0e100d5c3805ebc4ad762a2806 local fill = new("Frame", { Size = UDim2.fromScale(0, 1), BackgroundColor3 = C.gold, BorderSizePixel = 0, Parent = back }, { corner(4) }) if onClick then root.MouseButton1Click:Connect(onClick) @@ -2550,11 +2460,7 @@ local function buyGoal() elseif coins >= r.price then return ("🎣 %s — можно купить!"):format(r.name), 1, C.green end -<<<<<<< HEAD return ("🎣 До «%s»: ещё %s ⚪"):format(r.name, fmt(r.price - coins)), coins / r.price, C.gold -======= - return ("🎣 До «%s»: ещё %s 💰"):format(r.name, fmt(r.price - coins)), coins / r.price, C.gold ->>>>>>> 1ff7ef7e83a97a0e100d5c3805ebc4ad762a2806 end end local rod = Config.Find(Config.Rods, player:GetAttribute("Rod") or "Basic") @@ -2564,11 +2470,7 @@ local function buyGoal() if coins >= cost then return ("✨ Улучшение до +%d — можно купить!"):format(rl + 1), 1, C.green end -<<<<<<< HEAD return ("✨ До улучшения +%d: ещё %s ⚪"):format(rl + 1, fmt(cost - coins)), coins / cost, C.gold -======= - return ("✨ До улучшения +%d: ещё %s 💰"):format(rl + 1, fmt(cost - coins)), coins / cost, C.gold ->>>>>>> 1ff7ef7e83a97a0e100d5c3805ebc4ad762a2806 end return nil end @@ -2712,11 +2614,7 @@ end) -- у скупщика после продажи: предложение купить то, на что уже хватает local offerCard = new("Frame", { Size = UDim2.fromOffset(440, 96), AnchorPoint = Vector2.new(0.5, 1), Position = UDim2.new(0.5, 0, 1, -110), -<<<<<<< HEAD BackgroundColor3 = WHITE, Visible = false, Parent = screen, -======= - BackgroundColor3 = WHITE, Visible = false, Parent = gui, ->>>>>>> 1ff7ef7e83a97a0e100d5c3805ebc4ad762a2806 }, { corner(16), stroke(C.green, 2.5, 0.05), gradient(Color3.fromRGB(30, 85, 55), C.bg, 90) }) local offerIcon = text({ Size = UDim2.fromOffset(70, 70), Position = UDim2.fromOffset(12, 13), TextSize = 46, TextXAlignment = CENTER, Text = "", Parent = offerCard }) local offerTitle = text({ Size = UDim2.new(1, -250, 0, 26), Position = UDim2.fromOffset(90, 12), Font = TITLE, TextSize = 19, TextTruncate = Enum.TextTruncate.AtEnd, Text = "", Parent = offerCard }) @@ -2729,19 +2627,11 @@ end local offerBuy = btn({ Size = UDim2.fromOffset(146, 52), AnchorPoint = Vector2.new(1, 0.5), Position = UDim2.new(1, -14, 0.5, 0), BackgroundColor3 = C.green, TextSize = 18, Text = "", Parent = offerCard }, function() if offerItem then remote:FireServer("Buy", offerItem.kind, offerItem.id) -<<<<<<< HEAD Audio.play("coins") end hideOffer() end) btn({ Size = UDim2.fromOffset(26, 26), Position = UDim2.new(1, -18, 0, -8), BackgroundColor3 = C.red, Text = "×", TextSize = 22, Parent = offerCard }, hideOffer) -======= - playUiSound(DING, 0.5) - end - hideOffer() -end) -btn({ Size = UDim2.fromOffset(26, 26), Position = UDim2.new(1, -18, 0, -8), BackgroundColor3 = C.red, Text = "✕", TextSize = 14, Parent = offerCard }, hideOffer) ->>>>>>> 1ff7ef7e83a97a0e100d5c3805ebc4ad762a2806 bestOffer = function(bagWasFull) local coins, lvl = player:GetAttribute("Coins") or 0, player:GetAttribute("Level") or 1 @@ -2793,11 +2683,7 @@ showOffer = function(o) offerIcon.Text = o.icon offerTitle.Text = o.title offerDesc.Text = o.desc -<<<<<<< HEAD offerBuy.Text = ("Купить · %s ⚪"):format(fmt(o.price)) -======= - offerBuy.Text = ("Купить · %s 💰"):format(fmt(o.price)) ->>>>>>> 1ff7ef7e83a97a0e100d5c3805ebc4ad762a2806 offerCard.Visible = true popIn(offerCard, 0.6) task.delay(9, function() @@ -2826,12 +2712,9 @@ remote.OnClientEvent:Connect(function(action, a, b, c, d) setState("waiting") startCastCam(a, b) elseif action == "CastFail" or action == "Cancel" or action == "Escaped" then -<<<<<<< HEAD if action == "Escaped" then Audio.play("escape") end -======= ->>>>>>> 1ff7ef7e83a97a0e100d5c3805ebc4ad762a2806 if action == "CastFail" and castTool and castTool.Parent then castTool.Grip = gripCF(REST_ANGLE) -- сервер удочку не трогал, а у нас она в замахе end @@ -2860,20 +2743,12 @@ remote.OnClientEvent:Connect(function(action, a, b, c, d) Audio.play("sparkle") end elseif action == "Sold" then -<<<<<<< HEAD Audio.play("coins") if tutorialStep() == 3 then advanceTutorial(Config.TutorialDone) end floatText("+" .. fmt(a) .. " ⚪", C.gold) notify(("⚪ +%s"):format(fmt(a)), Color3.fromRGB(120, 255, 140)) -======= - if tutorialStep() == 3 then - advanceTutorial(Config.TutorialDone) - end - floatText("+" .. fmt(a) .. " 💰", C.gold) - notify(("💰 +%s"):format(fmt(a)), Color3.fromRGB(120, 255, 140)) ->>>>>>> 1ff7ef7e83a97a0e100d5c3805ebc4ad762a2806 -- монеты приходят атрибутом чуть позже события, поэтому предложение — с задержкой local wasFull = offerState.bagWasFull offerState.bagWasFull = false @@ -2902,30 +2777,17 @@ remote.OnClientEvent:Connect(function(action, a, b, c, d) refreshDots() refreshTracker() elseif action == "QuestDone" then -<<<<<<< HEAD notify(("✅ %s +%s ⚪ +%s XP"):format(questText(a, b), fmt(c), fmt(d or 0)), Color3.fromRGB(120, 255, 140)) Audio.play("quest") elseif action == "ChainDone" then floatText("🏆 Цепочка пройдена!", C.gold) notify(("🎁 %s: +%s ⚪ +%s XP%s"):format(a, fmt(b), fmt(c), d and (" + " .. d) or ""), C.gold) Audio.play("fanfare") -======= - notify(("✅ %s +%s 💰 +%s XP"):format(questText(a, b), fmt(c), fmt(d or 0)), Color3.fromRGB(120, 255, 140)) - playUiSound(DING, 0.6) - elseif action == "ChainDone" then - floatText("🏆 Цепочка пройдена!", C.gold) - notify(("🎁 %s: +%s 💰 +%s XP%s"):format(a, fmt(b), fmt(c), d and (" + " .. d) or ""), C.gold) - playUiSound(DING, 0.8) ->>>>>>> 1ff7ef7e83a97a0e100d5c3805ebc4ad762a2806 elseif action == "ComboLost" then notify(("💔 Серия из %d прервана"):format(a), Color3.fromRGB(255, 130, 110)) elseif action == "BossStart" then notify(("👑 %s в мире «%s»! Ловите всем сервером"):format(a, b), C.gold) -<<<<<<< HEAD Audio.play("quest") -======= - playUiSound(DING, 0.8) ->>>>>>> 1ff7ef7e83a97a0e100d5c3805ebc4ad762a2806 elseif action == "BossHit" then floatText(("⚔ -%d боссу"):format(a), Color3.fromRGB(255, 130, 100)) elseif action == "BossDone" then @@ -2935,11 +2797,7 @@ remote.OnClientEvent:Connect(function(action, a, b, c, d) notify(("🌊 %s ушёл на глубину…"):format(b), C.muted) end elseif action == "BossReward" then -<<<<<<< HEAD notify(("🎁 За босса: +%s ⚪ +%s XP%s"):format(fmt(a), fmt(b), c and (" + " .. c) or ""), Color3.fromRGB(120, 255, 140)) -======= - notify(("🎁 За босса: +%s 💰 +%s XP%s"):format(fmt(a), fmt(b), c and (" + " .. c) or ""), Color3.fromRGB(120, 255, 140)) ->>>>>>> 1ff7ef7e83a97a0e100d5c3805ebc4ad762a2806 elseif action == "OpenShop" then shopWin.open("rods") elseif action == "OpenQuests" then