This commit is contained in:
listik committed 2026-11-05 12:29:43 +03:00
1 parent aaa3fc2c7d
commit 980ce9757c
1 file changed
+530 -34
+530 -34
View File
@@ -3549932,18 +3549932,18 @@ uDg+jYyMPgkAAABTa2luQ29sb3IP395eP7GwMD+NjAw/]]></BinaryString>
<Item class="Camera" referent="RBX692F8856D9EB4BB69EFC89144B0FFDE4"> <Item class="Camera" referent="RBX692F8856D9EB4BB69EFC89144B0FFDE4">
<Properties> <Properties>
<CoordinateFrame name="CFrame"> <CoordinateFrame name="CFrame">
<X>-10.8320637</X> <X>-7.86362267</X>
<Y>38.5710449</Y> <Y>37.1614075</Y>
<Z>9.58815002</Z> <Z>11.670269</Z>
<R00>-0.677038074</R00> <R00>0.478917122</R00>
<R01>0.399777532</R01> <R01>0.141866773</R01>
<R02>-0.617897689</R02> <R02>0.866321146</R02>
<R10>-0</R10> <R10>-7.45057971e-09</R10>
<R11>0.839594245</R11> <R11>0.986855507</R11>
<R12>0.543214321</R12> <R12>-0.161605224</R12>
<R20>0.735948086</R20> <R20>-0.877860069</R20>
<R21>0.367776781</R21> <R21>0.0773954988</R21>
<R22>-0.568437159</R22> <R22>0.472622037</R22>
</CoordinateFrame> </CoordinateFrame>
<Ref name="CameraSubject">null</Ref> <Ref name="CameraSubject">null</Ref>
<token name="CameraType">0</token> <token name="CameraType">0</token>
@@ -4155146,6 +4155146,10 @@ local function setCoreHidden(hidden)
end end
end) end)
for t, on in pairs(snapshot) do for t, on in pairs(snapshot) do
-- рюкзак и список игроков Roblox в игре заменены своими (HudBar.client.lua) — их не возвращаем
if t == Enum.CoreGuiType.Backpack or t == Enum.CoreGuiType.PlayerList then
on = false
end
pcall(function() StarterGui:SetCoreGuiEnabled(t, (not hidden) and on) end) pcall(function() StarterGui:SetCoreGuiEnabled(t, (not hidden) and on) end)
end end
end end
@@ -4156622,33 +4156626,50 @@ H.rod = text({ Size = UDim2.new(1, 0, 0, 20), Position = UDim2.fromOffset(0, 128
-- баннер события (справа сверху) -- баннер события (справа сверху)
local eventBanner = new("Frame", { local eventBanner = new("Frame", {
Name = "EventBanner", -- по имени его ставит под таблицу игроков HudBar.client.lua
Size = UDim2.fromOffset(280, 58), AnchorPoint = Vector2.new(1, 0), Position = UDim2.new(1, -12, 0, 10), Size = UDim2.fromOffset(280, 58), AnchorPoint = Vector2.new(1, 0), Position = UDim2.new(1, -12, 0, 10),
BackgroundColor3 = WHITE, Visible = false, Parent = screen, BackgroundColor3 = WHITE, Visible = false, Parent = screen,
}, { corner(14), stroke(C.gold, 2, 0.1), gradient(Color3.fromRGB(90, 60, 20), C.bg, 90) }) }, { 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 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 }) 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 ниже) -- side — сетка кнопок внутри панели H.sidePanel (раскладку для телефона и компьютера задаёт applyLayout ниже)
H.sidePanel = new("Frame", {
Name = "SideMenu", Size = UDim2.fromOffset(170, 0), AutomaticSize = Enum.AutomaticSize.Y, Position = UDim2.fromOffset(12, 228),
BackgroundColor3 = WHITE, Parent = screen,
}, { corner(10), stroke(C.goldDark, 2.5, 0), Theme.woodGradient(C.wood, C.woodDark) })
Theme.rivets(H.sidePanel, 7, 6)
do
local tab = new("Frame", {
Size = UDim2.fromOffset(48, 24), AnchorPoint = Vector2.new(0.5, 0.5), Position = UDim2.new(0.5, 0, 0, 0),
BackgroundColor3 = WHITE, ZIndex = 3, Parent = H.sidePanel,
}, { corner(8), stroke(C.goldDark, 2, 0), Theme.woodGradient(C.woodLight, C.wood) })
text({ Size = UDim2.fromScale(1, 1), Font = TITLE, TextSize = 18, TextXAlignment = Enum.TextXAlignment.Center, TextColor3 = C.goldBright, Text = "≡", ZIndex = 4, Parent = tab })
end
local side = new("Frame", { local side = new("Frame", {
Size = UDim2.fromOffset(70, 380), AnchorPoint = Vector2.new(0, 0.5), Position = UDim2.new(0, 12, 0.5, 60), Size = UDim2.new(1, 0, 0, 0), AutomaticSize = Enum.AutomaticSize.Y, BackgroundTransparency = 1, Parent = H.sidePanel,
BackgroundTransparency = 1, Parent = screen, }, {
}, { new("UIGridLayout", { CellSize = UDim2.fromOffset(68, 68), CellPadding = UDim2.fromOffset(8, 8), FillDirectionMaxCells = 1, SortOrder = Enum.SortOrder.LayoutOrder }) }) new("UIPadding", { PaddingTop = UDim.new(0, 18), PaddingBottom = UDim.new(0, 10), PaddingLeft = UDim.new(0, 8), PaddingRight = UDim.new(0, 8) }),
new("UIGridLayout", { CellSize = UDim2.fromOffset(154, 40), CellPadding = UDim2.fromOffset(6, 6), FillDirectionMaxCells = 1, SortOrder = Enum.SortOrder.LayoutOrder }),
})
local sideDots = {} local sideDots = {}
local function sideButton(order, icon, label, key, color, onClick) local function sideButton(order, icon, label, key, color, onClick)
-- деревянная плитка; цвет раздела — полоска-лента снизу -- широкая деревянная кнопка: цветной значок слева, подпись, справа — клавиша
local b = btn({ Size = UDim2.fromOffset(68, 68), BackgroundColor3 = C.woodLight, LayoutOrder = order, Parent = side }, onClick) local b = btn({ Size = UDim2.fromOffset(154, 40), BackgroundColor3 = C.woodLight, LayoutOrder = order, Parent = side }, onClick)
b:FindFirstChildOfClass("UIStroke").Color = C.goldDark b:FindFirstChildOfClass("UIStroke").Color = C.goldDark
b:FindFirstChildOfClass("UIStroke").Thickness = 2.5 b:FindFirstChildOfClass("UIStroke").Thickness = 2
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) }) local badge = new("Frame", { Size = UDim2.new(0, 30, 1, -10), Position = UDim2.fromOffset(5, 5), BackgroundColor3 = color, Parent = b },
text({ Size = UDim2.fromScale(1, 0.5), Position = UDim2.fromScale(0, 0.06), TextScaled = true, TextXAlignment = Enum.TextXAlignment.Center, Text = icon, Parent = b }) { corner(6), stroke(C.ink, 1.5, 0.3), gradient(WHITE, Color3.fromRGB(170, 170, 170), 90) })
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 }) text({ Size = UDim2.fromScale(1, 1), TextScaled = true, TextXAlignment = Enum.TextXAlignment.Center, Text = icon, Parent = badge })
new("UITextSizeConstraint", { MaxTextSize = 17, Parent = text({ Size = UDim2.new(1, -66, 1, 0), Position = UDim2.fromOffset(42, 0), Font = TITLE,
TextScaled = true, Text = label, TextStrokeColor3 = C.ink, TextStrokeTransparency = 0.3, Parent = b }) })
if key and not UserInputService.TouchEnabled then 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) }) local tag = new("Frame", { Size = UDim2.fromOffset(20, 20), AnchorPoint = Vector2.new(1, 0.5), Position = UDim2.new(1, -6, 0.5, 0), BackgroundColor3 = C.bg, Parent = b }, { corner(5), stroke(C.gold, 1.2) })
text({ Size = UDim2.fromScale(1, 1), Font = TITLE, TextSize = 12, TextXAlignment = Enum.TextXAlignment.Center, TextColor3 = C.gold, Text = key, Parent = tag }) text({ Size = UDim2.fromScale(1, 1), Font = TITLE, TextSize = 12, TextXAlignment = Enum.TextXAlignment.Center, TextColor3 = C.gold, Text = key, Parent = tag })
end end
local dot = new("Frame", { Size = UDim2.fromOffset(16, 16), Position = UDim2.new(0, -5, 0, -5), BackgroundColor3 = C.red, Visible = false, ZIndex = 3, Parent = b }, { corner(8), stroke(WHITE, 2) }) local dot = new("Frame", { Size = UDim2.fromOffset(14, 14), Position = UDim2.new(0, -4, 0, -4), BackgroundColor3 = C.red, Visible = false, ZIndex = 3, Parent = b }, { corner(7), stroke(WHITE, 2) })
sideDots[label] = dot sideDots[label] = dot
return b return b
end end
@@ -4156842,6 +4156863,13 @@ local timeBar = new("Frame", { Size = UDim2.new(1, -30, 0, 5), Position = UDim2.
---------------------------------------------------------------- окна ---------------------------------------------------------------- окна
local openWindow = nil local openWindow = nil
-- окно, открытое у ларька (сразу после нажатия на подсказку), закрывается, если отойти дальше WINDOW_CLOSE_DIST
-- (5 м ≈ 18 studs); окна, открытые клавишами и кнопками меню, так не закрываются
H.WINDOW_CLOSE_DIST = 18
H.promptAt = -math.huge
game:GetService("ProximityPromptService").PromptTriggered:Connect(function()
H.promptAt = os.clock()
end)
local function makeWindow(title, accent, tabs) local function makeWindow(title, accent, tabs)
local w = { pages = {}, tabButtons = {}, current = nil } local w = { pages = {}, tabButtons = {}, current = nil }
@@ -4156853,6 +4156881,8 @@ local function makeWindow(title, accent, tabs)
}, { corner(12), stroke(C.goldDark, 4, 0), Theme.woodGradient(C.wood, C.woodDark), new("UISizeConstraint", { MaxSize = Vector2.new(760, 540) }) }) }, { 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.innerBorder(frame, 7, 8, C.gold, 0.2)
Theme.rivets(frame, 12, 8) Theme.rivets(frame, 12, 8)
-- Modal: пока окно открыто, Roblox отпускает курсор и в виде от первого лица (иначе он прибит к центру экрана)
new("TextButton", { Name = "FreeCursor", Size = UDim2.fromOffset(1, 1), BackgroundTransparency = 1, Text = "", Modal = true, Parent = frame })
local scale = new("UIScale", { Parent = frame }) local scale = new("UIScale", { Parent = frame })
local header = new("Frame", { Size = UDim2.new(1, 0, 0, 56), BackgroundTransparency = 1, Parent = frame }) local header = new("Frame", { Size = UDim2.new(1, 0, 0, 56), BackgroundTransparency = 1, Parent = frame })
-- багровая лента по центру, ширина — по тексту -- багровая лента по центру, ширина — по тексту
@@ -4156911,6 +4156941,9 @@ local function makeWindow(title, accent, tabs)
openWindow = w openWindow = w
if not frame.Visible then if not frame.Visible then
Audio.play("open") Audio.play("open")
-- открыли у ларька — запоминаем, где стоим; отойдёт игрок — окно закроется само
local hrp = player.Character and player.Character:FindFirstChild("HumanoidRootPart")
w.anchor = (hrp and os.clock() - H.promptAt < 2) and hrp.Position or nil
end end
frame.Visible = true frame.Visible = true
scale.Scale = 0.85 scale.Scale = 0.85
@@ -4156919,6 +4156952,7 @@ local function makeWindow(title, accent, tabs)
end end
function w.close() function w.close()
frame.Visible = false frame.Visible = false
w.anchor = nil
if openWindow == w then if openWindow == w then
openWindow = nil openWindow = nil
end end
@@ -4156941,6 +4156975,21 @@ local function makeWindow(title, accent, tabs)
return w return w
end end
-- отошёл от ларька — его окно закрывается
RunService.Heartbeat:Connect(function()
local w = openWindow
if not (w and w.anchor) then
return
end
local hrp = player.Character and player.Character:FindFirstChild("HumanoidRootPart")
if hrp then
local d = hrp.Position - w.anchor
if Vector3.new(d.X, 0, d.Z).Magnitude > H.WINDOW_CLOSE_DIST then
w.close()
end
end
end)
local function scrollArea(parent, cell, topOffset) local function scrollArea(parent, cell, topOffset)
local sf = new("ScrollingFrame", { local sf = new("ScrollingFrame", {
Size = UDim2.new(1, 0, 1, -(topOffset or 0)), Position = UDim2.fromOffset(0, topOffset or 0), Size = UDim2.new(1, 0, 1, -(topOffset or 0)), Position = UDim2.fromOffset(0, topOffset or 0),
@@ -4156988,6 +4157037,7 @@ Theme.kit = {
makeWindow = makeWindow, scrollArea = scrollArea, itemRow = itemRow, progressBar = progressBar, makeWindow = makeWindow, scrollArea = scrollArea, itemRow = itemRow, progressBar = progressBar,
sideButton = sideButton, notify = notify, popIn = popIn, fmt = fmt, timeStr = timeStr, sideButton = sideButton, notify = notify, popIn = popIn, fmt = fmt, timeStr = timeStr,
screen = screen, hud = hud, TITLE = TITLE, BODY = BODY, BODY2 = BODY2, screen = screen, hud = hud, TITLE = TITLE, BODY = BODY, BODY2 = BODY2,
viewport = viewport, VIEW = VIEW, -- 3D-превью моделей (удочки на нижней панели — HudBar.client.lua)
} }
---------------------------------------------------------------- данные с сервера ---------------------------------------------------------------- данные с сервера
@@ -4157566,6 +4157616,7 @@ end)
sideButton(6, "⚙", "Звук", nil, Color3.fromRGB(150, 120, 80), function() sideButton(6, "⚙", "Звук", nil, Color3.fromRGB(150, 120, 80), function()
settingsWin.toggle() settingsWin.toggle()
end) end)
Theme.kit.bagWin = bagWin -- кнопка «Рюкзак» внизу справа (HudBar.client.lua)
-- раскладка: компьютер — как раньше; телефон — HUD и кнопки компактнее, кнопки сеткой 3×N под HUD -- раскладка: компьютер — как раньше; телефон — HUD и кнопки компактнее, кнопки сеткой 3×N под HUD
-- (левый низ свободен под джойстик, правый низ — под кнопку прыжка) -- (левый низ свободен под джойстик, правый низ — под кнопку прыжка)
@@ -4157578,13 +4157629,13 @@ do
Theme.onLayout(function(compact) Theme.onLayout(function(compact)
scaleOf(hud.Parent).Scale = compact and 0.82 or 1 scaleOf(hud.Parent).Scale = compact and 0.82 or 1
hud.Parent.Position = compact and UDim2.fromOffset(8, 6) or UDim2.fromOffset(12, 10) 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.CellSize = compact and UDim2.fromOffset(112, 32) or UDim2.fromOffset(154, 40)
grid.FillDirectionMaxCells = compact and 3 or 1 grid.CellPadding = compact and UDim2.fromOffset(5, 5) or UDim2.fromOffset(6, 6)
side.AnchorPoint = Vector2.zero grid.FillDirectionMaxCells = compact and 2 or 1
-- под HUD (он выше на строку гильдии — её добавляет GuildClient) -- под HUD (он выше на строку гильдии — её добавляет GuildClient)
side.Position = compact and UDim2.fromOffset(8, 172) or UDim2.fromOffset(12, 216) H.sidePanel.Position = compact and UDim2.fromOffset(8, 176) or UDim2.fromOffset(12, 228)
side.Size = compact and UDim2.fromOffset(170, 240) or UDim2.fromOffset(70, 480) H.sidePanel.Size = compact and UDim2.fromOffset(2 * 112 + 5 + 16, 0) or UDim2.fromOffset(154 + 16, 0)
toasts.Size = compact and UDim2.fromOffset(640, 200) or UDim2.fromOffset(900, 200) toasts.Size = compact and UDim2.fromOffset(640, 200) or UDim2.fromOffset(900, 200)
H.toastBaseY = compact and 66 or 84 H.toastBaseY = compact and 66 or 84
toasts.Position = UDim2.new(0.5, 0, 0, H.toastBaseY) toasts.Position = UDim2.new(0.5, 0, 0, H.toastBaseY)
@@ -4158550,6 +4158601,11 @@ local function setInterfaceHidden(hidden)
boardGui.Enabled = hidden boardGui.Enabled = hidden
pcall(function() pcall(function()
StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.All, not hidden) StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.All, not hidden)
if not hidden then
-- рюкзак и список игроков Roblox заменены своими (HudBar.client.lua)
StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.Backpack, false)
StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.PlayerList, false)
end
end) end)
-- надписи над объектами (порталы, лавки) тоже прячем, потом возвращаем как было -- надписи над объектами (порталы, лавки) тоже прячем, потом возвращаем как было
if hidden then if hidden then
@@ -4160152,15 +4160208,19 @@ end
local bar = new("Frame", { 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, 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 }) }) }, { 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() -- наживка теперь — карточка на нижней панели (HudBar.client.lua); старая кнопка скрыта, вкладку открывает K.openBait
local baitBtn = btn({ Size = UDim2.fromOffset(110, 52), BackgroundColor3 = C.woodLight, Text = "", TextSize = 16, LayoutOrder = 1, Visible = false, Parent = bar }, function()
openGuild("bait") openGuild("bait")
end) end)
K.openBait = 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() 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")) remote:FireServer("AutoFish", not player:GetAttribute("AutoFish"))
end) end)
Theme.onLayout(function(compact) Theme.onLayout(function(compact)
-- на телефоне — внизу, левее кнопки прыжка (над ней — панель целей) -- над кнопкой «Рюкзак» (правый низ): на телефоне — левее кнопки прыжка
bar.Position = compact and UDim2.new(1, -140, 1, -8) or UDim2.new(1, -12, 1, -12) bar.Position = compact and UDim2.new(1, -140, 1, -66) or UDim2.new(1, -12, 1, -92)
end) end)
local function refreshBar() local function refreshBar()
@@ -4161410,6 +4161470,429 @@ end)
<UniqueId name="UniqueId">584cb0948457a2380afcb0410000f84f</UniqueId> <UniqueId name="UniqueId">584cb0948457a2380afcb0410000f84f</UniqueId>
</Properties> </Properties>
</Item> </Item>
<Item class="LocalScript" referent="RBX34BC8B962A634032BE59394F469B3DB0">
<Properties>
<ProtectedString name="Source"><![CDATA[-- HudBar (LocalScript) -> StarterPlayer > StarterPlayerScripts
-- Нижняя панель и правый верх в стиле игры (вместо стандартных панелей Roblox):
-- слоты удочек со стрелками (клик / клавиши 1–3 — выбрать удочку и взять её в руки),
-- карточка удочки в руке (клик — взять или убрать), карточка наживки (⇄ — вкладка наживки гильдии),
-- кнопка «Рюкзак» с заполненностью сумки, таблица игроков (уровень, серебро, улов) справа сверху —
-- под ней встают плашка погоды и баннер события.
-- Стиль и помощники — из FishingClient (Theme.kit), всё лежит в его холсте и прячется вместе с ним.
local Players = game:GetService("Players")
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local StarterGui = game:GetService("StarterGui")
local UserInputService = game:GetService("UserInputService")
local TweenService = game:GetService("TweenService")
local player = Players.LocalPlayer
local Config = require(ReplicatedStorage:WaitForChild("FishConfig"))
local Models = require(ReplicatedStorage:WaitForChild("GameModels"))
local Theme = require(script.Parent:WaitForChild("UiTheme"))
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, fmt = K.new, K.text, K.btn, K.corner, K.stroke, K.gradient, K.fmt
local TITLE, BODY2 = K.TITLE, K.BODY2
local CENTER = Enum.TextXAlignment.Center
local WHITE = Color3.new(1, 1, 1)
-- стандартные рюкзак и список игроков Roblox заменены своими
local function hideCore()
for _ = 1, 20 do
local ok = pcall(function()
StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.Backpack, false)
StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.PlayerList, false)
end)
if ok then
return
end
task.wait(0.5)
end
end
task.spawn(hideCore)
-- деревянная панель в стиле HUD
local function woodPanel(props)
local f = new("Frame", props, { corner(10), stroke(C.goldDark, 2.5, 0), Theme.woodGradient(C.wood, C.woodDark) })
Theme.innerBorder(f, 4, 7, C.gold, 0.55)
return f
end
---------------------------------------------------------------- удочки и наживка (низ по центру)
local SLOTS = 3
local bar = woodPanel({
Name = "HotBar", Size = UDim2.fromOffset(0, 74), AutomaticSize = Enum.AutomaticSize.X, AnchorPoint = Vector2.new(0.5, 1),
Position = UDim2.new(0.5, 0, 1, -10), BackgroundColor3 = WHITE, Parent = K.screen,
})
Theme.rivets(bar, 7, 6)
new("UIPadding", { PaddingLeft = UDim.new(0, 12), PaddingRight = UDim.new(0, 12), Parent = bar })
local row = new("Frame", { Size = UDim2.fromScale(0, 1), AutomaticSize = Enum.AutomaticSize.X, BackgroundTransparency = 1, Parent = bar }, {
new("UIListLayout", { FillDirection = Enum.FillDirection.Horizontal, VerticalAlignment = Enum.VerticalAlignment.Center, Padding = UDim.new(0, 6), SortOrder = Enum.SortOrder.LayoutOrder }),
})
-- ярлычок над слотами
do
local tag = new("Frame", {
Size = UDim2.fromOffset(0, 24), AutomaticSize = Enum.AutomaticSize.X, AnchorPoint = Vector2.new(0, 1), Position = UDim2.new(0, 34, 0, 6),
BackgroundColor3 = WHITE, ZIndex = 3, Parent = bar,
}, { corner(8), stroke(C.goldDark, 2, 0), Theme.woodGradient(C.woodLight, C.wood), new("UIPadding", { PaddingLeft = UDim.new(0, 10), PaddingRight = UDim.new(0, 10) }) })
text({ Size = UDim2.fromScale(0, 1), AutomaticSize = Enum.AutomaticSize.X, Font = BODY2, TextSize = 13, TextColor3 = C.parchment, Text = "Выбрать удочку", ZIndex = 4, Parent = tag })
end
local page = 0 -- какие удочки видны в слотах: page*SLOTS + 1 …
local refresh -- обновление панели, объявлена ниже
local function ownedRods()
local set = {}
for id in string.gmatch(player:GetAttribute("OwnedRods") or "Basic", "[^,]+") do
set[id] = true
end
local list = {}
for _, r in ipairs(Config.Rods) do
if set[r.id] then
table.insert(list, r)
end
end
return list
end
local function rodLevel(id)
for pair in string.gmatch(player:GetAttribute("RodLevels") or "", "[^,]+") do
local k, v = pair:match("^(%w+):(%d+)$")
if k == id then
return tonumber(v)
end
end
return 0
end
local function rodTool()
for _, container in ipairs({ player.Character, player:FindFirstChild("Backpack") }) do
if container then
for _, t in ipairs(container:GetChildren()) do
if t:IsA("Tool") and t:GetAttribute("IsRod") then
return t
end
end
end
end
end
local function inHand()
local t = rodTool()
return t ~= nil and t.Parent == player.Character
end
local function equip(on)
local hum = player.Character and player.Character:FindFirstChildOfClass("Humanoid")
if not hum then
return
end
if on then
local t = rodTool()
if t then
hum:EquipTool(t)
end
else
hum:UnequipTools()
end
end
-- 3D-модель удочки (как в магазине): картинки-иконки удочек могут быть недоступны (права на ассет),
-- модель строится из деталей и видна всегда. В квадрате удочка наклонена по диагонали, иначе она — тонкая черта
local function rodView(holder, rodId, lvl)
local key = rodId and (rodId .. ":" .. lvl) or ""
if holder:GetAttribute("Shown") == key then
return
end
holder:SetAttribute("Shown", key)
for _, c in ipairs(holder:GetChildren()) do
if c:IsA("ViewportFrame") then
c:Destroy()
end
end
if rodId and K.viewport then
local ok, model = pcall(Models.buildRod, rodId, lvl, true)
if ok and model then
local p = model:GetPivot()
model:PivotTo(CFrame.new(p.Position) * CFrame.Angles(math.rad(42), 0, 0) * (p - p.Position))
K.viewport(holder, model, K.VIEW.rod, 0.62)
end
end
end
local function arrow(order, label, dir)
local b = btn({ Size = UDim2.fromOffset(26, 56), BackgroundColor3 = C.woodLight, Text = label, TextSize = 18, LayoutOrder = order, Parent = row }, function()
local count = #ownedRods()
local pages = math.max(1, math.ceil(count / SLOTS))
page = (page + dir) % pages
refresh()
end)
return b
end
arrow(1, "‹", -1)
local slots = {}
for i = 1, SLOTS do
local s = btn({ Size = UDim2.fromOffset(56, 56), BackgroundColor3 = C.wood, Text = "", LayoutOrder = 1 + i, Parent = row }, function()
local rod = slots[i].rod
if rod then
if rod.id ~= player:GetAttribute("Rod") then
remote:FireServer("Buy", "Rod", rod.id) -- своя удочка — бесплатно, сервер выдаёт её в руки
task.delay(0.4, equip, true)
else
equip(not inHand())
end
end
end)
local icon = new("Frame", { Size = UDim2.new(1, -6, 1, -6), Position = UDim2.fromOffset(3, 3), BackgroundTransparency = 1, Parent = s })
local num = new("Frame", { Size = UDim2.fromOffset(18, 18), AnchorPoint = Vector2.new(0.5, 1), Position = UDim2.new(0.5, 0, 1, 6), BackgroundColor3 = C.bg, ZIndex = 3, Parent = s },
{ corner(9), stroke(C.gold, 1.2) })
text({ Size = UDim2.fromScale(1, 1), Font = TITLE, TextSize = 11, TextXAlignment = CENTER, TextColor3 = C.goldBright, Text = tostring(i), ZIndex = 4, Parent = num })
slots[i] = { button = s, icon = icon, stroke = s:FindFirstChildOfClass("UIStroke") }
end
arrow(10, "›", 1)
-- разделитель
new("Frame", { Size = UDim2.fromOffset(2, 52), BackgroundColor3 = C.goldDark, BorderSizePixel = 0, LayoutOrder = 11, Parent = row })
-- удочка в руке
local rodCard = btn({ Size = UDim2.fromOffset(196, 60), BackgroundColor3 = C.woodLight, Text = "", LayoutOrder = 12, Parent = row }, function()
equip(not inHand())
end)
local rodIcon = new("Frame", { Size = UDim2.fromOffset(52, 52), Position = UDim2.fromOffset(4, 4), BackgroundTransparency = 1, Parent = rodCard })
local rodName = text({ Size = UDim2.new(1, -66, 1, -8), Position = UDim2.fromOffset(58, 4), Font = TITLE, TextScaled = true, TextWrapped = true, Text = "", Parent = rodCard })
new("UITextSizeConstraint", { MaxTextSize = 17, Parent = rodName })
local rodCheck = new("Frame", { Size = UDim2.fromOffset(22, 22), AnchorPoint = Vector2.new(0.5, 0.5), Position = UDim2.new(1, -4, 0, 4), BackgroundColor3 = C.forest, ZIndex = 3, Parent = rodCard },
{ corner(11), stroke(WHITE, 2) })
text({ Size = UDim2.fromScale(1, 1), Font = TITLE, TextSize = 13, TextXAlignment = CENTER, Text = "✓", ZIndex = 4, Parent = rodCheck })
-- наживка
local baitCard = new("Frame", { Size = UDim2.fromOffset(190, 60), BackgroundColor3 = WHITE, LayoutOrder = 13, Parent = row },
{ corner(8), stroke(C.gold, 1.5, 0.15), Theme.woodGradient(C.woodLight, C.wood) })
local baitIcon = text({ Size = UDim2.fromOffset(44, 44), Position = UDim2.fromOffset(6, 8), TextScaled = true, TextXAlignment = CENTER, Text = "🐛", Parent = baitCard })
local baitName = text({ Size = UDim2.new(1, -104, 0, 24), Position = UDim2.fromOffset(54, 6), Font = TITLE, TextScaled = true, Text = "", Parent = baitCard })
new("UITextSizeConstraint", { MaxTextSize = 17, Parent = baitName })
local baitCount = text({ Size = UDim2.new(1, -104, 0, 20), Position = UDim2.fromOffset(54, 32), Font = BODY2, TextSize = 14, TextColor3 = C.muted, Text = "", Parent = baitCard })
btn({ Size = UDim2.fromOffset(40, 40), AnchorPoint = Vector2.new(1, 0.5), Position = UDim2.new(1, -8, 0.5, 0), BackgroundColor3 = C.wood, Text = "⇄", TextSize = 20, Parent = baitCard }, function()
if K.openBait then
K.openBait()
end
end)
---------------------------------------------------------------- рюкзак (правый низ)
local pack = btn({
Name = "BackpackButton", Size = UDim2.fromOffset(170, 70), AnchorPoint = Vector2.new(1, 1), Position = UDim2.new(1, -12, 1, -12),
BackgroundColor3 = C.woodLight, Text = "", Parent = K.screen,
}, function()
if K.bagWin then
K.bagWin.toggle("fish")
end
end)
pack:FindFirstChildOfClass("UIStroke").Color = C.goldDark
pack:FindFirstChildOfClass("UIStroke").Thickness = 2.5
text({ Size = UDim2.fromOffset(52, 52), Position = UDim2.fromOffset(8, 9), TextScaled = true, TextXAlignment = CENTER, Text = "🎒", Parent = pack })
text({ Size = UDim2.new(1, -70, 0, 30), Position = UDim2.fromOffset(64, 8), Font = TITLE, TextSize = 22, Text = "Рюкзак", TextStrokeColor3 = C.ink, TextStrokeTransparency = 0.3, Parent = pack })
local packCount = text({ Size = UDim2.new(1, -70, 0, 22), Position = UDim2.fromOffset(64, 38), Font = BODY2, TextSize = 15, Text = "", Parent = pack })
---------------------------------------------------------------- таблица игроков (правый верх)
local ROW_H, MAX_ROWS = 26, 6
local board = woodPanel({
Name = "PlayersBoard", Size = UDim2.fromOffset(310, 34), AnchorPoint = Vector2.new(1, 0), Position = UDim2.new(1, -12, 0, 8),
BackgroundColor3 = WHITE, Parent = K.screen,
})
local function cols(parent, y, a, b, c, d, color, font)
local function cell(x, w, t, align)
text({ Size = UDim2.fromOffset(w, ROW_H), Position = UDim2.fromOffset(x, y), Font = font or BODY2, TextSize = 13, TextColor3 = color,
TextXAlignment = align or CENTER, TextTruncate = Enum.TextTruncate.AtEnd, Text = t, Parent = parent })
end
cell(12, 130, a, Enum.TextXAlignment.Left)
cell(142, 46, b)
cell(188, 62, c)
cell(250, 50, d)
end
local header = new("Frame", { Size = UDim2.new(1, 0, 0, 30), BackgroundTransparency = 1, Parent = board })
cols(header, 3, "👥 Игроки", "Уровень", "Серебро", "Улов", C.muted)
local rowsFrame = new("Frame", { Size = UDim2.new(1, 0, 1, -32), Position = UDim2.fromOffset(0, 30), BackgroundTransparency = 1, Parent = board })
local collapsed = false
local function stat(p, name)
local ls = p:FindFirstChild("leaderstats")
local v = ls and ls:FindFirstChild(name)
return v and v.Value or 0
end
local function placeBelowBoard()
-- плашку погоды (Ambience) и баннер события (FishingClient) ставим под таблицей
local y = 8 + board.Size.Y.Offset + 8
local weather = player.PlayerGui:FindFirstChild("WeatherHud")
local pill = weather and weather:FindFirstChild("Root") and weather.Root:FindFirstChildOfClass("Frame")
if pill then
pill.Position = UDim2.new(1, -12, 0, y)
y += pill.Size.Y.Offset + 8
end
local ev = K.screen:FindFirstChild("EventBanner")
if ev then
ev.Position = UDim2.new(1, -12, 0, y)
end
end
local function refreshBoard()
for _, c in ipairs(rowsFrame:GetChildren()) do
c:Destroy()
end
local list = Players:GetPlayers()
table.sort(list, function(a, b)
local la, lb = stat(a, "Уровень"), stat(b, "Уровень")
if la ~= lb then
return la > lb
end
return stat(a, "Серебро") > stat(b, "Серебро")
end)
local shown = collapsed and 0 or math.min(#list, MAX_ROWS)
for i = 1, shown do
local p = list[i]
local me = p == player
local r = new("Frame", { Size = UDim2.new(1, -12, 0, ROW_H - 2), Position = UDim2.fromOffset(6, (i - 1) * ROW_H), BackgroundColor3 = me and C.goldDark or C.woodDark,
BackgroundTransparency = me and 0.55 or 0.6, Parent = rowsFrame }, { corner(5) })
cols(r, -1, p.DisplayName, fmt(stat(p, "Уровень")), fmt(stat(p, "Серебро")), fmt(stat(p, "Улов")), me and C.goldBright or C.parchment, me and TITLE or BODY2)
end
board.Size = UDim2.fromOffset(310, 34 + shown * ROW_H + (shown > 0 and 6 or 0))
placeBelowBoard()
end
-- Tab — свернуть/развернуть, как стандартный список
UserInputService.InputBegan:Connect(function(input, processed)
if not processed and input.KeyCode == Enum.KeyCode.Tab then
collapsed = not collapsed
refreshBoard()
end
end)
---------------------------------------------------------------- обновление
refresh = function()
-- слоты удочек
local rods = ownedRods()
local pages = math.max(1, math.ceil(#rods / SLOTS))
page = math.clamp(page, 0, pages - 1)
local current = player:GetAttribute("Rod") or "Basic"
local hand = inHand()
for i, s in ipairs(slots) do
local rod = rods[page * SLOTS + i]
s.rod = rod
rodView(s.icon, rod and rod.id, rod and rodLevel(rod.id) or 0)
s.button.BackgroundColor3 = rod and C.woodLight or C.woodDark
s.button.AutoButtonColor = rod ~= nil
local on = rod and rod.id == current
s.stroke.Color = on and Color3.fromRGB(120, 230, 255) or C.goldDark
s.stroke.Thickness = on and 3 or 1.5
end
-- удочка в руке
local rod = Config.Find(Config.Rods, current) or Config.Rods[1]
local lvl = rodLevel(rod.id)
rodView(rodIcon, rod.id, lvl)
rodName.Text = rod.name .. (lvl > 0 and (" +" .. lvl) or "")
rodCheck.Visible = hand
rodCard:FindFirstChildOfClass("UIStroke").Color = hand and Color3.fromRGB(120, 230, 255) or C.gold
-- наживка
local id = player:GetAttribute("Bait")
local b = id and id ~= "" and Config.Find(Config.Baits, id)
baitIcon.Text = b and b.icon or "🐛"
baitName.Text = b and b.name or "Наживка"
baitCount.Text = b and ("×%d"):format(player:GetAttribute("BaitCount") or 0) or "не выбрана"
-- рюкзак
local count, cap = player:GetAttribute("BagCount") or 0, player:GetAttribute("BagCap") or 10
packCount.Text = ("📦 %d / %d"):format(count, cap)
packCount.TextColor3 = count >= cap and Color3.fromRGB(255, 130, 120) or C.parchment
end
-- клавиши 1–3: удочка из слота (взять в руки; повторно — убрать)
UserInputService.InputBegan:Connect(function(input, processed)
if processed then
return
end
local n = ({ [Enum.KeyCode.One] = 1, [Enum.KeyCode.Two] = 2, [Enum.KeyCode.Three] = 3 })[input.KeyCode]
local rod = n and slots[n].rod
if rod then
if rod.id ~= player:GetAttribute("Rod") then
remote:FireServer("Buy", "Rod", rod.id)
task.delay(0.4, equip, true)
else
equip(not inHand())
end
end
end)
Theme.onLayout(function(compact)
local function scale(obj, s)
local sc = obj:FindFirstChild("LayoutScale") or new("UIScale", { Name = "LayoutScale", Parent = obj })
sc.Scale = s
end
-- телефон: всё мельче; рюкзак левее кнопки прыжка, таблица игроков — компактнее
scale(bar, compact and 0.62 or 1)
bar.Position = compact and UDim2.new(0.5, 0, 1, -4) or UDim2.new(0.5, 0, 1, -10)
scale(pack, compact and 0.7 or 1)
pack.Position = compact and UDim2.new(1, -140, 1, -6) or UDim2.new(1, -12, 1, -12)
scale(board, compact and 0.75 or 1)
MAX_ROWS = compact and 4 or 6
refreshBoard()
end)
player.AttributeChanged:Connect(refresh)
local function watchChar(char)
char.ChildAdded:Connect(refresh)
char.ChildRemoved:Connect(refresh)
end
if player.Character then
watchChar(player.Character)
end
player.CharacterAdded:Connect(watchChar)
refresh()
-- таблица: игроки приходят и уходят, значения меняются
local function watchPlayer(p)
local ls = p:WaitForChild("leaderstats", 30)
if ls then
for _, v in ipairs(ls:GetChildren()) do
v.Changed:Connect(refreshBoard)
end
ls.ChildAdded:Connect(function(v)
v.Changed:Connect(refreshBoard)
end)
end
refreshBoard()
end
for _, p in ipairs(Players:GetPlayers()) do
task.spawn(watchPlayer, p)
end
Players.PlayerAdded:Connect(function(p)
task.spawn(watchPlayer, p)
end)
Players.PlayerRemoving:Connect(function()
task.defer(refreshBoard)
end)
refreshBoard()
-- плашка погоды создаётся другим скриптом — подождать её
task.delay(3, placeBelowBoard)
]]></ProtectedString>
<bool name="Disabled">false</bool>
<Content name="LinkedSource"><null></null></Content>
<token name="RunContext">0</token>
<string name="ScriptGuid">{341DC661-CCA3-4B30-8AA6-40F380E04EDB}</string>
<BinaryString name="AttributesSerialize"></BinaryString>
<SecurityCapabilities name="Capabilities">0</SecurityCapabilities>
<bool name="DefinesCapabilities">false</bool>
<UniqueId name="HistoryId">00000000000000000000000000000000</UniqueId>
<string name="Name">HudBar</string>
<BinaryString name="SerializedOverrides"></BinaryString>
<int64 name="SourceAssetId">-1</int64>
<SharedString name="Tags">yuZpQdnvvUBOTYh1jqZ2cA==</SharedString>
<UniqueId name="UniqueId">55155e9528101acf0afde28100001c96</UniqueId>
</Properties>
</Item>
</Item> </Item>
<Item class="StarterCharacterScripts" referent="RBX0FE933A93C2644989CA238292A56C9B5"> <Item class="StarterCharacterScripts" referent="RBX0FE933A93C2644989CA238292A56C9B5">
<Properties> <Properties>
@@ -5310359,6 +5310842,19 @@ X09yaWdpbmFsVGVjaG5vbG9neU9uRmlsZUxvYWQEAQAAAA==]]></BinaryString>
<UniqueId name="UniqueId">5241aa4869bd12870afb1bfc0000067a</UniqueId> <UniqueId name="UniqueId">5241aa4869bd12870afb1bfc0000067a</UniqueId>
</Properties> </Properties>
</Item> </Item>
<Item class="VideoScreenCaptureService" referent="RBXABF22BCB29C341E8A65AC72D45FC5EDB">
<Properties>
<BinaryString name="AttributesSerialize"></BinaryString>
<SecurityCapabilities name="Capabilities">0</SecurityCapabilities>
<bool name="DefinesCapabilities">false</bool>
<UniqueId name="HistoryId">00000000000000000000000000000000</UniqueId>
<string name="Name">VideoScreenCaptureService</string>
<BinaryString name="SerializedOverrides"></BinaryString>
<int64 name="SourceAssetId">-1</int64>
<SharedString name="Tags">yuZpQdnvvUBOTYh1jqZ2cA==</SharedString>
<UniqueId name="UniqueId">55155e9528101acf0afde28100000411</UniqueId>
</Properties>
</Item>
<SharedStrings> <SharedStrings>
<SharedString md5="AbQ0svVULdJR0NSLoPPjGg==">PHJvYmxveCGJ/w0KGgoAAAEAAAAEAAAAAAAAAAAAAABTU1RSEQAAABwAAAAAAAAAUAAAAAAB <SharedString md5="AbQ0svVULdJR0NSLoPPjGg==">PHJvYmxveCGJ/w0KGgoAAAEAAAAEAAAAAAAAAAAAAABTU1RSEQAAABwAAAAAAAAAUAAAAAAB
BQAKAgBQAAAAAABJTlNUGAAAACEAAAAAAAAAwQAAAAAEAAAAUGFydAkABwIAUAAAAgICUFJP BQAKAgBQAAAAAABJTlNUGAAAACEAAAAAAAAAwQAAAAAEAAAAUGFydAkABwIAUAAAAgICUFJP