Поправки багов, иконки и переделка второго острова

This commit is contained in:
Xkrules_Wood committed 2026-11-04 21:10:31 +05:00
1 parent dcf89d037a
commit c9795cc50e
6 files changed
+8315 -8415

No files matched your search

+77 -6
View File
@@ -46,7 +46,9 @@ local gui = new("ScreenGui", {
-- Градиент — на отдельной подложке: UIGradient на самой CanvasGroup тонирует всё содержимое и затемнял картинку.
-- Свет и цветокоррекция сцены на экранный интерфейс не действуют, их не трогаем.
local BG_IMAGE = "rbxassetid://82266337853896" -- осветлённая и более насыщенная версия заставки
local root = new("CanvasGroup", { Size = UDim2.fromScale(1, 1), BackgroundTransparency = 1, BorderSizePixel = 0, Parent = gui })
-- обычный Frame, а не CanvasGroup: CanvasGroup рендерит содержимое в текстуру пониженного разрешения — картинка мылится.
-- Плавное появление/исчезновение делаем сами (setFade ниже).
local root = new("Frame", { Size = UDim2.fromScale(1, 1), BackgroundTransparency = 1, BorderSizePixel = 0, Parent = gui })
local backdrop = new("Frame", { Size = UDim2.fromScale(1, 1), BackgroundColor3 = Color3.new(1, 1, 1), BorderSizePixel = 0, Parent = root })
new("UIGradient", {
Rotation = 90,
@@ -103,6 +105,74 @@ local function showTip()
tip.Text = "💡 " .. TIPS[rng:NextInteger(1, #TIPS)]
end
-- плавность без CanvasGroup: запоминаем исходную прозрачность каждого элемента и смешиваем её с 1
local fadeProps = { "BackgroundTransparency", "ImageTransparency", "TextTransparency", "TextStrokeTransparency" }
local fadeItems = {}
for _, o in ipairs(root:GetDescendants()) do
local orig = {}
for _, prop in ipairs(o:IsA("UIStroke") and { "Transparency" } or fadeProps) do
local ok, v = pcall(function() return o[prop] end)
if ok and type(v) == "number" then
orig[prop] = v
end
end
if next(orig) then
fadeItems[o] = orig
end
end
local fadeValue = Instance.new("NumberValue") -- 0 — экран виден, 1 — прозрачен
local function setFade(a)
for o, orig in pairs(fadeItems) do
for prop, v in pairs(orig) do
o[prop] = v + (1 - v) * a
end
end
end
fadeValue.Changed:Connect(setFade)
local function fadeTo(a, time)
local tw = TweenService:Create(fadeValue, TweenInfo.new(time), { Value = a })
tw:Play()
return tw
end
-- HUD Roblox (хотбар, чат, список игроков, верхняя панель) рисуется поверх любых ScreenGui — прячем на время загрузки
-- и возвращаем как было (FishingClient сам выключает его у таблички, поэтому сохраняем состояние каждого типа)
local StarterGui = game:GetService("StarterGui")
local savedCore = nil -- [CoreGuiType] = было ли включено до загрузки; nil — HUD сейчас не спрятан
local coreGen = 0
local function setCoreHidden(hidden)
if hidden == (savedCore ~= nil) then
return
end
local snapshot
if hidden then
savedCore = {}
for _, t in ipairs(Enum.CoreGuiType:GetEnumItems()) do
local ok, on = pcall(function() return StarterGui:GetCoreGuiEnabled(t) end)
if t ~= Enum.CoreGuiType.All and ok then
savedCore[t] = on
end
end
snapshot = savedCore
else
snapshot, savedCore = savedCore, nil
end
coreGen += 1
local gen = coreGen
-- верхняя панель (меню Roblox); в новых версиях может не поддерживаться — тогда просто пропускаем
task.spawn(function()
for _ = 1, 20 do
if gen ~= coreGen or pcall(function() StarterGui:SetCore("TopbarEnabled", not hidden) end) then
return
end
task.wait(0.25) -- в первые кадры CoreScripts ещё не готовы и SetCore падает
end
end)
for t, on in pairs(snapshot) do
pcall(function() StarterGui:SetCoreGuiEnabled(t, (not hidden) and on) end)
end
end
-- при входе: экран виден сразу, минимум — из FishConfig, когда он загрузится
local now = os.clock()
gui:SetAttribute("Visible", true)
@@ -111,6 +181,7 @@ gui:SetAttribute("StartAt", now)
gui:SetAttribute("MinUntil", now + 3)
gui:SetAttribute("Title", "Загрузка…")
showTip()
setCoreHidden(true)
task.spawn(function()
if not game:IsLoaded() then
@@ -129,7 +200,8 @@ gui:GetAttributeChangedSignal("Visible"):Connect(function()
hiding = false
showTip()
gui.Enabled = true
TweenService:Create(root, TweenInfo.new(0.25), { GroupTransparency = 0 }):Play()
setCoreHidden(true)
fadeTo(0, 0.25)
end
end)
gui:GetAttributeChangedSignal("Title"):Connect(function()
@@ -154,13 +226,12 @@ RunService.RenderStepped:Connect(function()
local hrp = player.Character and player.Character:FindFirstChild("HumanoidRootPart")
if ready and hrp and t >= minUntil and not hiding then
hiding = true
local tw = TweenService:Create(root, TweenInfo.new(0.6), { GroupTransparency = 1 })
tw.Completed:Connect(function()
if hiding then
fadeTo(1, 0.6).Completed:Connect(function(state)
if hiding and state == Enum.PlaybackState.Completed then
gui.Enabled = false
gui:SetAttribute("Visible", false)
setCoreHidden(false)
end
end)
tw:Play()
end
end)