This commit is contained in:
listik committed 2026-11-04 00:01:19 +03:00
1 parent e1459c9834
commit b48d1f68f6
14 files changed
+51156 -45815

No files matched your search

+50195 -45717
View File
File diff suppressed because it is too large. Load diff
+5 -2
View File
@@ -15,7 +15,8 @@ $scripts = @(
@{ Name = 'GameServer'; Class = 'Script'; Service = 'ServerScriptService'; Path = 'src\ServerScriptService\GameServer.server.lua'; Rbxmx = '4_GameServer_ServerScriptService.rbxmx' }, @{ Name = 'GameServer'; Class = 'Script'; Service = 'ServerScriptService'; Path = 'src\ServerScriptService\GameServer.server.lua'; Rbxmx = '4_GameServer_ServerScriptService.rbxmx' },
@{ Name = 'World1Builder'; Class = 'ModuleScript'; Service = 'ServerScriptService'; Path = 'src\ServerScriptService\World1Builder.lua'; Rbxmx = '6_World1Builder_ServerScriptService.rbxmx' }, @{ Name = 'World1Builder'; Class = 'ModuleScript'; Service = 'ServerScriptService'; Path = 'src\ServerScriptService\World1Builder.lua'; Rbxmx = '6_World1Builder_ServerScriptService.rbxmx' },
@{ Name = 'WorldBuilder'; Class = 'ModuleScript'; Service = 'ServerScriptService'; Path = 'src\ServerScriptService\WorldBuilder.lua'; Rbxmx = '7_WorldBuilder_ServerScriptService.rbxmx' }, @{ Name = 'WorldBuilder'; Class = 'ModuleScript'; Service = 'ServerScriptService'; Path = 'src\ServerScriptService\WorldBuilder.lua'; Rbxmx = '7_WorldBuilder_ServerScriptService.rbxmx' },
@{ Name = 'FishingClient'; Class = 'LocalScript'; Service = 'StarterPlayerScripts'; Path = 'src\StarterPlayer\StarterPlayerScripts\FishingClient.client.lua'; Rbxmx = '5_FishingClient_StarterPlayerScripts.rbxmx' } @{ Name = 'FishingClient'; Class = 'LocalScript'; Service = 'StarterPlayerScripts'; Path = 'src\StarterPlayer\StarterPlayerScripts\FishingClient.client.lua'; Rbxmx = '5_FishingClient_StarterPlayerScripts.rbxmx' },
@{ Name = 'Loading'; Class = 'LocalScript'; Service = 'ReplicatedFirst'; Path = 'src\ReplicatedFirst\Loading.client.lua'; Rbxmx = '8_Loading_ReplicatedFirst.rbxmx' }
) )
$header = '<roblox xmlns:xmime="http://www.w3.org/2005/05/xmlmime" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://www.roblox.com/roblox.xsd" version="4">' $header = '<roblox xmlns:xmime="http://www.w3.org/2005/05/xmlmime" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://www.roblox.com/roblox.xsd" version="4">'
@@ -36,8 +37,10 @@ function ServiceItem($class, $children) {
$rs = ($scripts | Where-Object { $_.Service -eq 'ReplicatedStorage' } | ForEach-Object { ScriptItem $_ }) -join '' $rs = ($scripts | Where-Object { $_.Service -eq 'ReplicatedStorage' } | ForEach-Object { ScriptItem $_ }) -join ''
$sss = ($scripts | Where-Object { $_.Service -eq 'ServerScriptService' } | ForEach-Object { ScriptItem $_ }) -join '' $sss = ($scripts | Where-Object { $_.Service -eq 'ServerScriptService' } | ForEach-Object { ScriptItem $_ }) -join ''
$sps = ($scripts | Where-Object { $_.Service -eq 'StarterPlayerScripts' } | ForEach-Object { ScriptItem $_ }) -join '' $sps = ($scripts | Where-Object { $_.Service -eq 'StarterPlayerScripts' } | ForEach-Object { ScriptItem $_ }) -join ''
$rf = ($scripts | Where-Object { $_.Service -eq 'ReplicatedFirst' } | ForEach-Object { ScriptItem $_ }) -join ''
$place = $header + "`n" + $place = $header + "`n" +
(ServiceItem 'ReplicatedFirst' $rf) +
(ServiceItem 'ReplicatedStorage' $rs) + (ServiceItem 'ReplicatedStorage' $rs) +
(ServiceItem 'ServerScriptService' $sss) + (ServiceItem 'ServerScriptService' $sss) +
(ServiceItem 'StarterPlayer' (ServiceItem 'StarterPlayerScripts' $sps)) + (ServiceItem 'StarterPlayer' (ServiceItem 'StarterPlayerScripts' $sps)) +
@@ -53,7 +56,7 @@ if ($Force -or -not (Test-Path $placePath)) {
# --- install/*.rbxmx and install/INSTALL.lua --- # --- install/*.rbxmx and install/INSTALL.lua ---
$installDir = Join-Path $root 'install' $installDir = Join-Path $root 'install'
New-Item -ItemType Directory -Force $installDir | Out-Null New-Item -ItemType Directory -Force $installDir | Out-Null
$parents = @{ ReplicatedStorage = 'game.ReplicatedStorage'; ServerScriptService = 'game.ServerScriptService'; StarterPlayerScripts = 'game.StarterPlayer.StarterPlayerScripts' } $parents = @{ ReplicatedStorage = 'game.ReplicatedStorage'; ServerScriptService = 'game.ServerScriptService'; StarterPlayerScripts = 'game.StarterPlayer.StarterPlayerScripts'; ReplicatedFirst = 'game.ReplicatedFirst' }
$sb = New-Object System.Text.StringBuilder $sb = New-Object System.Text.StringBuilder
[void]$sb.Append("local function make(class, name, parent, src)`n local old = parent:FindFirstChild(name)`n if old then old:Destroy() end`n local s = Instance.new(class)`n s.Name = name`n s.Source = src`n s.Parent = parent`nend`nlocal oldMap = workspace:FindFirstChild('FishingMap')`nif oldMap then oldMap:Destroy() end`n") [void]$sb.Append("local function make(class, name, parent, src)`n local old = parent:FindFirstChild(name)`n if old then old:Destroy() end`n local s = Instance.new(class)`n s.Name = name`n s.Source = src`n s.Parent = parent`nend`nlocal oldMap = workspace:FindFirstChild('FishingMap')`nif oldMap then oldMap:Destroy() end`n")
foreach ($s in $scripts) { foreach ($s in $scripts) {
+3
View File
@@ -2,6 +2,9 @@
"name": "Fishing", "name": "Fishing",
"tree": { "tree": {
"$className": "DataModel", "$className": "DataModel",
"ReplicatedFirst": {
"$path": "src/ReplicatedFirst"
},
"ReplicatedStorage": { "ReplicatedStorage": {
"$path": "src/ReplicatedStorage" "$path": "src/ReplicatedStorage"
}, },
@@ -76,6 +76,13 @@ Config.Worlds = {
} }
Config.WorldRadius = 260 Config.WorldRadius = 260
-- экран загрузки: при входе в игру и при каждом телепорте игрок уже стоит на месте, сцена прогружается
-- и свет локации ставится под ним; картинку видно только после этого (секунды — минимум показа)
Config.Loading = {
firstJoin = 3,
teleport = 2.5,
}
-- лобби: те же поля внешнего вида, что у миров (clock, tint, look, terrainColors); клиент применяет их вне миров -- лобби: те же поля внешнего вида, что у миров (clock, tint, look, terrainColors); клиент применяет их вне миров
Config.Lobby = { Config.Lobby = {
id = "Lobby", id = "Lobby",
+15 -1
View File
@@ -1165,6 +1165,12 @@ end
---------------------------------------------------------------- телепорт ---------------------------------------------------------------- телепорт
local TELEPORT_FADE = 0.3 -- сколько клиент затемняет экран перед переносом
local teleporting = {}
Players.PlayerRemoving:Connect(function(p)
teleporting[p] = nil
end)
local function teleportTo(player, worldId) local function teleportTo(player, worldId)
local data = profiles[player] local data = profiles[player]
local char = player.Character local char = player.Character
@@ -1191,11 +1197,19 @@ local function teleportTo(player, worldId)
end end
local map = workspace:FindFirstChild("FishingMap") local map = workspace:FindFirstChild("FishingMap")
local m = map and map:FindFirstChild(markerName, true) -- маркеры могут лежать в папках уровня (World1Map) local m = map and map:FindFirstChild(markerName, true) -- маркеры могут лежать в папках уровня (World1Map)
if m then if m and not teleporting[player] then
-- клиент затемняет экран, переносим уже в темноте: свет новой локации ставится до того, как её видно
teleporting[player] = true
stopFishing(player, true) stopFishing(player, true)
remote:FireClient(player, "TeleportFade", worldId, TELEPORT_FADE)
task.wait(TELEPORT_FADE)
teleporting[player] = nil
char = player.Character
if char and char.Parent then
char:PivotTo(m.CFrame + Vector3.new(0, 3, 0)) char:PivotTo(m.CFrame + Vector3.new(0, 3, 0))
end end
end end
end
---------------------------------------------------------------- подсказки NPC ---------------------------------------------------------------- подсказки NPC
@@ -1576,7 +1576,21 @@ local lookDefaults = {}
local lookSources = table.clone(Config.Worlds) local lookSources = table.clone(Config.Worlds)
table.insert(lookSources, Config.Lobby) table.insert(lookSources, Config.Lobby)
local function applyLook(world) -- смена света: плавно или сразу (за экраном загрузки)
local lookTweens = {}
local function setLook(obj, goal, instant)
if instant then
for prop, v in pairs(goal) do
obj[prop] = v
end
else
local tw = TweenService:Create(obj, TweenInfo.new(2), goal)
table.insert(lookTweens, tw)
tw:Play()
end
end
local function applyLook(world, instant)
-- исходные значения запоминаем до первой правки; эффект мог ещё не прийти с сервера, тогда в следующий раз -- исходные значения запоминаем до первой правки; эффект мог ещё не прийти с сервера, тогда в следующий раз
for _, w in ipairs(lookSources) do for _, w in ipairs(lookSources) do
for section, props in pairs(w.look or {}) do for section, props in pairs(w.look or {}) do
@@ -1603,18 +1617,23 @@ local function applyLook(world)
local kind = typeof(v) local kind = typeof(v)
if kind == "number" or kind == "Color3" then goal[prop] = v else obj[prop] = v end if kind == "number" or kind == "Color3" then goal[prop] = v else obj[prop] = v end
end end
TweenService:Create(obj, TweenInfo.new(2), goal):Play() setLook(obj, goal, instant)
end end
end end
end end
local function applyAmbience(world) local function applyAmbience(world, instant)
-- прошлая плавная смена ещё может идти — она перебила бы новые значения
for _, tw in ipairs(lookTweens) do
tw:Cancel()
end
table.clear(lookTweens)
world = world or Config.Lobby world = world or Config.Lobby
local clock = (world and world.clock) or 14.5 local clock = (world and world.clock) or 14.5
TweenService:Create(Lighting, TweenInfo.new(2), { ClockTime = clock }):Play() setLook(Lighting, { ClockTime = clock }, instant)
local cc = Lighting:FindFirstChildOfClass("ColorCorrectionEffect") local cc = Lighting:FindFirstChildOfClass("ColorCorrectionEffect")
if cc then if cc then
TweenService:Create(cc, TweenInfo.new(2), { TintColor = (world and world.tint) or DEFAULT_LOOK.tint }):Play() setLook(cc, { TintColor = (world and world.tint) or DEFAULT_LOOK.tint }, instant)
end end
-- цвета материалов террейна общие для всей карты, поэтому меняем их только у себя и возвращаем при выходе -- цвета материалов террейна общие для всей карты, поэтому меняем их только у себя и возвращаем при выходе
if not defaultTerrainColors then if not defaultTerrainColors then
@@ -1630,12 +1649,12 @@ local function applyAmbience(world)
local atm = Lighting:FindFirstChildOfClass("Atmosphere") local atm = Lighting:FindFirstChildOfClass("Atmosphere")
if atm then if atm then
local frost = world and world.id == "World3" local frost = world and world.id == "World3"
TweenService:Create(atm, TweenInfo.new(2), { setLook(atm, {
Density = frost and 0.38 or 0.25, Density = frost and 0.38 or 0.25,
Color = frost and Color3.fromRGB(170, 200, 235) or Color3.fromRGB(200, 215, 232), Color = frost and Color3.fromRGB(170, 200, 235) or Color3.fromRGB(200, 215, 232),
}):Play() }, instant)
end end
applyLook(world) applyLook(world, instant)
snow.Rate = (world and world.id == "World3") and 140 or 0 snow.Rate = (world and world.id == "World3") and 140 or 0
end end
@@ -1691,16 +1710,80 @@ do
end) end)
end end
-- экран загрузки (ReplicatedFirst/Loading): при входе и телепорте свет локации ставится, пока он закрывает картинку
local loadingGui = player:WaitForChild("PlayerGui"):WaitForChild("LoadingScreen", 10)
local function loadingVisible()
return loadingGui ~= nil and loadingGui.Enabled
end
local function placeTitle(w)
return w and (w.icon .. " " .. w.name) or "🏠 Лобби"
end
local function enterWorld(w, instant)
lastWorldId = w and w.id or "lobby"
applyAmbience(w, instant)
if w then
-- название локации — когда экран загрузки уже ушёл
task.spawn(function()
while loadingVisible() do
task.wait(0.1)
end
notify(w.icon .. " " .. w.name, w.color)
end)
end
end
-- первое появление: ждём персонажа, ставим свет его локации сразу и отпускаем экран загрузки
task.spawn(function()
local char = player.Character or player.CharacterAdded:Wait()
char:WaitForChild("HumanoidRootPart", 30)
local w = currentWorld()
enterWorld(w, true)
if loadingGui then
loadingGui:SetAttribute("Title", placeTitle(w))
loadingGui:SetAttribute("Ready", true)
end
end)
-- телепорт: экран загрузки закрывает картинку, сервер переносит персонажа, свет новой локации ставится сразу
local teleportToken = 0
local function teleportLoading(targetId, delay)
teleportToken += 1
local token = teleportToken
local target = Config.Find(Config.Worlds, targetId)
if loadingGui then
local now = os.clock()
loadingGui:SetAttribute("Ready", false)
loadingGui:SetAttribute("StartAt", now)
loadingGui:SetAttribute("MinUntil", now + Config.Loading.teleport)
loadingGui:SetAttribute("Title", placeTitle(target))
loadingGui:SetAttribute("Visible", true)
end
task.spawn(function()
-- ждём, пока персонаж окажется в новой локации (или сдаёмся через пару секунд)
local deadline = os.clock() + delay + 3
local w
repeat
task.wait()
w = currentWorld()
until (w and w.id or "Lobby") == targetId or os.clock() > deadline or token ~= teleportToken
if token ~= teleportToken then
return
end
enterWorld(w, true)
if loadingGui then
loadingGui:SetAttribute("Ready", true)
end
end)
end
task.spawn(function() task.spawn(function()
while true do while true do
local w = currentWorld() local w = currentWorld()
local id = w and w.id or "lobby" local id = w and w.id or "lobby"
if id ~= lastWorldId then if id ~= lastWorldId and lastWorldId ~= "none" and not loadingVisible() then
lastWorldId = id enterWorld(w, false) -- без телепорта (например, после возрождения): плавно
applyAmbience(w)
if w then
notify(w.icon .. " " .. w.name, w.color)
end
end end
local cam = workspace.CurrentCamera local cam = workspace.CurrentCamera
if cam then if cam then
@@ -1785,10 +1868,11 @@ local function guideMarker(name)
return m and m.Position return m and m.Position
end end
-- объект цели подсвечивается голубым (атрибут GuideTarget ставит MapBuilder) -- объект цели обводится мягким светящимся контуром (атрибут GuideTarget ставит MapBuilder);
-- Occluded: то, что стоит перед объектом (персонаж на мостике), не перекрашивается
local guideHighlight = new("Highlight", { local guideHighlight = new("Highlight", {
FillColor = Color3.fromRGB(70, 195, 255), OutlineColor = Color3.fromRGB(170, 235, 255), FillColor = Color3.fromRGB(150, 225, 255), OutlineColor = Color3.fromRGB(190, 240, 255),
DepthMode = Enum.HighlightDepthMode.AlwaysOnTop, Enabled = false, Parent = guideFolder, DepthMode = Enum.HighlightDepthMode.Occluded, Enabled = false, Parent = guideFolder,
}) })
local guideObjects, guideScanAt = {}, {} local guideObjects, guideScanAt = {}, {}
local function guideObject(key) local function guideObject(key)
@@ -2011,8 +2095,8 @@ RunService.RenderStepped:Connect(function()
guideHighlight.Enabled = target ~= nil guideHighlight.Enabled = target ~= nil
if target then if target then
local pulse = (math.sin(os.clock() * 4) + 1) / 2 -- мягкое мигание local pulse = (math.sin(os.clock() * 4) + 1) / 2 -- мягкое мигание
guideHighlight.FillTransparency = 0.45 + 0.3 * pulse guideHighlight.FillTransparency = 0.86 + 0.1 * pulse -- лёгкое «дыхание», цвет объекта виден
guideHighlight.OutlineTransparency = 0.3 * pulse guideHighlight.OutlineTransparency = 0.1 + 0.45 * pulse
end end
if not route or #route == 0 or state ~= "idle" then if not route or #route == 0 or state ~= "idle" then
hideChevrons(1) hideChevrons(1)
@@ -2426,6 +2510,8 @@ end)()
remote.OnClientEvent:Connect(function(action, a, b, c, d) remote.OnClientEvent:Connect(function(action, a, b, c, d)
if action == "Notify" then if action == "Notify" then
notify(a, b) notify(a, b)
elseif action == "TeleportFade" then
teleportLoading(a, b)
elseif action == "Cast" then elseif action == "Cast" then
setState("waiting") setState("waiting")
startCastCam(a, b) startCastCam(a, b)
@@ -62,20 +62,29 @@ local function ensure(class, parent, props)
return obj return obj
end end
-- Базовый свет при запуске игры (совпадает со светом лобби). Под каждую локацию его меняет клиент
-- по полям look из FishConfig, пока игрок за экраном загрузки.
function Builder.applyLighting() function Builder.applyLighting()
Lighting.ClockTime = 14.5 Lighting.ClockTime = 16.3
Lighting.Brightness = 2.3 Lighting.Brightness = 2.0
Lighting.Ambient = Color3.fromRGB(70, 70, 85) Lighting.ExposureCompensation = -0.3
Lighting.OutdoorAmbient = Color3.fromRGB(140, 145, 160) Lighting.Ambient = Color3.fromRGB(64, 60, 72)
Lighting.EnvironmentDiffuseScale = 0.6 Lighting.OutdoorAmbient = Color3.fromRGB(120, 114, 124)
Lighting.EnvironmentSpecularScale = 0.8 Lighting.ColorShift_Top = Color3.fromRGB(255, 224, 186)
Lighting.EnvironmentDiffuseScale = 0.5
Lighting.EnvironmentSpecularScale = 0.5
Lighting.GlobalShadows = true
ensure("Atmosphere", Lighting, { ensure("Atmosphere", Lighting, {
Density = 0.25, Offset = 0.12, Glare = 0, Haze = 0.6, Density = 0.4, Offset = 0.18, Glare = 0.25, Haze = 1.6,
Color = Color3.fromRGB(200, 215, 232), Decay = Color3.fromRGB(110, 140, 175), Color = Color3.fromRGB(222, 212, 204), Decay = Color3.fromRGB(186, 160, 150),
}) })
ensure("BloomEffect", Lighting, { Intensity = 0.5, Size = 24, Threshold = 1.4 }) ensure("BloomEffect", Lighting, { Intensity = 0.3, Size = 24, Threshold = 1.8 })
ensure("ColorCorrectionEffect", Lighting, { Saturation = 0.15, Contrast = 0.06, Brightness = 0.02 }) ensure("ColorCorrectionEffect", Lighting, {
ensure("SunRaysEffect", Lighting, { Intensity = 0.05, Spread = 0.8 }) Saturation = 0.18, Contrast = 0.14, Brightness = -0.04, TintColor = Color3.fromRGB(255, 242, 228),
})
ensure("SunRaysEffect", Lighting, { Intensity = 0.05, Spread = 0.7 })
-- размытие дальнего плана включают миры и лобби через look.dof
ensure("DepthOfFieldEffect", Lighting, { Enabled = false, FarIntensity = 0.18, FocusDistance = 55, InFocusRadius = 95, NearIntensity = 0 })
end end
---------------------------------------------------------------- помощники ---------------------------------------------------------------- помощники
+165
View File
@@ -0,0 +1,165 @@
<roblox xmlns:xmime="http://www.w3.org/2005/05/xmlmime" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://www.roblox.com/roblox.xsd" version="4">
<Item class="LocalScript" referent="RBX1"><Properties><string name="Name">Loading</string><ProtectedString name="Source"><![CDATA[-- Loading (LocalScript) -> ReplicatedFirst
-- Экран загрузки. Закрывает картинку при входе в игру и при каждом телепорте: игрок уже стоит на месте,
-- сцена прогружается, клиент ставит свет локации — и только потом экран плавно уходит.
--
-- FishingClient управляет экраном через атрибуты ScreenGui «LoadingScreen»:
-- Visible = true — показать (при телепорте);
-- Ready = true — свет и террейн локации выставлены;
-- StartAt / MinUntil — os.clock() начала и минимального конца показа (полоска заполняется за это время);
-- Title — подпись под названием игры (куда идём).
-- Экран уходит, когда Ready = true и минимальное время прошло.
local Players = game:GetService("Players")
local ReplicatedFirst = game:GetService("ReplicatedFirst")
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local RunService = game:GetService("RunService")
local TweenService = game:GetService("TweenService")
local player = Players.LocalPlayer
pcall(function() ReplicatedFirst:RemoveDefaultLoadingScreen() end)
local GOLD = Color3.fromRGB(255, 205, 90)
local TIPS = {
"Чем реже рыба, тем быстрее бегает метка — нужна точность!",
"Улучшай удочку в магазине: рыба клюёт быстрее, удача выше.",
"Собери все виды одной редкости — получишь награду в коллекции (C).",
"Каждый день заходи за наградой из сундука в лобби.",
"Новые миры открываются с уровнем: следи за опытом!",
}
local function new(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
local gui = new("ScreenGui", {
Name = "LoadingScreen", ResetOnSpawn = false, IgnoreGuiInset = true, DisplayOrder = 200,
ZIndexBehavior = Enum.ZIndexBehavior.Sibling, Parent = player:WaitForChild("PlayerGui"),
})
-- фон: арт лобби (временная заглушка); пока картинка грузится, виден тёплый закатный градиент
local BG_IMAGE = "rbxassetid://118616665961176"
local root = new("CanvasGroup", { Size = UDim2.fromScale(1, 1), BackgroundColor3 = Color3.fromRGB(255, 190, 120), BorderSizePixel = 0, Parent = gui })
new("UIGradient", {
Rotation = 90,
Color = ColorSequence.new(Color3.fromRGB(120, 200, 255), Color3.fromRGB(255, 170, 110)),
Parent = root,
})
local bg = new("ImageLabel", {
Size = UDim2.fromScale(1, 1), BackgroundTransparency = 1, Image = BG_IMAGE,
ScaleType = Enum.ScaleType.Crop, Parent = root,
})
task.spawn(function()
pcall(function() game:GetService("ContentProvider"):PreloadAsync({ bg }) end)
end)
-- плашка снизу: куда идём, полоска загрузки, совет
local panel = new("Frame", {
AnchorPoint = Vector2.new(0.5, 1), Position = UDim2.new(0.5, 0, 1, -28), Size = UDim2.fromOffset(560, 118),
BackgroundColor3 = Color3.fromRGB(70, 40, 22), BackgroundTransparency = 0.18, BorderSizePixel = 0, Parent = root,
})
new("UICorner", { CornerRadius = UDim.new(0, 18), Parent = panel })
new("UIStroke", { Color = GOLD, Thickness = 3, Transparency = 0.1, Parent = panel })
new("UIGradient", {
Rotation = 90,
Color = ColorSequence.new(Color3.fromRGB(150, 95, 50), Color3.fromRGB(95, 55, 28)),
Parent = panel,
})
local float = new("TextLabel", {
AnchorPoint = Vector2.new(0.5, 0.5), Position = UDim2.fromOffset(44, 32), Size = UDim2.fromOffset(46, 46),
BackgroundTransparency = 1, Text = "🎣", TextScaled = true, Font = Enum.Font.FredokaOne, Parent = panel,
})
local title = new("TextLabel", {
Position = UDim2.fromOffset(78, 12), Size = UDim2.new(1, -96, 0, 38), BackgroundTransparency = 1,
Text = "", TextColor3 = Color3.fromRGB(255, 240, 200), TextScaled = true, TextXAlignment = Enum.TextXAlignment.Left,
Font = Enum.Font.FredokaOne, Parent = panel,
})
new("UIStroke", { Color = Color3.fromRGB(60, 30, 10), Thickness = 2, Parent = title })
local barBack = new("Frame", {
AnchorPoint = Vector2.new(0.5, 0), Position = UDim2.new(0.5, 0, 0, 62), Size = UDim2.new(1, -36, 0, 16),
BackgroundColor3 = Color3.fromRGB(40, 22, 10), BackgroundTransparency = 0.15, BorderSizePixel = 0, Parent = panel,
})
new("UICorner", { CornerRadius = UDim.new(1, 0), Parent = barBack })
local bar = new("Frame", { Size = UDim2.fromScale(0, 1), BackgroundColor3 = GOLD, BorderSizePixel = 0, Parent = barBack })
new("UICorner", { CornerRadius = UDim.new(1, 0), Parent = bar })
new("UIGradient", { Color = ColorSequence.new(Color3.fromRGB(255, 230, 120), Color3.fromRGB(255, 160, 60)), Parent = bar })
local tip = new("TextLabel", {
Position = UDim2.fromOffset(18, 86), Size = UDim2.new(1, -36, 0, 22), BackgroundTransparency = 1,
Text = "", TextColor3 = Color3.fromRGB(255, 228, 185), TextScaled = true,
Font = Enum.Font.GothamMedium, Parent = panel,
})
local rng = Random.new()
local function showTip()
tip.Text = "💡 " .. TIPS[rng:NextInteger(1, #TIPS)]
end
-- при входе: экран виден сразу, минимум — из FishConfig, когда он загрузится
local now = os.clock()
gui:SetAttribute("Visible", true)
gui:SetAttribute("Ready", false)
gui:SetAttribute("StartAt", now)
gui:SetAttribute("MinUntil", now + 3)
gui:SetAttribute("Title", "Загрузка…")
showTip()
task.spawn(function()
if not game:IsLoaded() then
game.Loaded:Wait()
end
local ok, Config = pcall(require, ReplicatedStorage:WaitForChild("FishConfig"))
if ok and Config.Loading then
gui:SetAttribute("MinUntil", gui:GetAttribute("StartAt") + Config.Loading.firstJoin)
end
end)
local hiding = false
gui:GetAttributeChangedSignal("Visible"):Connect(function()
-- новый телепорт мог прийти, пока экран ещё уходил: тогда возвращаем его
if gui:GetAttribute("Visible") and (hiding or not gui.Enabled) then
hiding = false
showTip()
gui.Enabled = true
TweenService:Create(root, TweenInfo.new(0.25), { GroupTransparency = 0 }):Play()
end
end)
gui:GetAttributeChangedSignal("Title"):Connect(function()
title.Text = gui:GetAttribute("Title") or ""
end)
title.Text = gui:GetAttribute("Title")
RunService.RenderStepped:Connect(function()
if not gui.Enabled then
return
end
local t = os.clock()
float.Rotation = math.sin(t * 2.2) * 12
float.Position = UDim2.fromOffset(44, 32 + math.sin(t * 3) * 3)
local startAt, minUntil = gui:GetAttribute("StartAt") or t, gui:GetAttribute("MinUntil") or t
local p = math.clamp((t - startAt) / math.max(0.01, minUntil - startAt), 0, 1)
local ready = gui:GetAttribute("Ready") == true
if not ready then
p = math.min(p, 0.95) -- пока локация не готова, полоска не доходит до конца
end
bar.Size = UDim2.fromScale(p, 1)
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
gui.Enabled = false
gui:SetAttribute("Visible", false)
end
end)
tw:Play()
end
end)
]]></ProtectedString></Properties></Item>
</roblox>
+311 -32
View File
@@ -85,6 +85,13 @@ Config.Worlds = {
} }
Config.WorldRadius = 260 Config.WorldRadius = 260
-- экран загрузки: при входе в игру и при каждом телепорте игрок уже стоит на месте, сцена прогружается
-- и свет локации ставится под ним; картинку видно только после этого (секунды — минимум показа)
Config.Loading = {
firstJoin = 3,
teleport = 2.5,
}
-- лобби: те же поля внешнего вида, что у миров (clock, tint, look, terrainColors); клиент применяет их вне миров -- лобби: те же поля внешнего вида, что у миров (clock, tint, look, terrainColors); клиент применяет их вне миров
Config.Lobby = { Config.Lobby = {
id = "Lobby", id = "Lobby",
@@ -2255,6 +2262,12 @@ end
---------------------------------------------------------------- телепорт ---------------------------------------------------------------- телепорт
local TELEPORT_FADE = 0.3 -- сколько клиент затемняет экран перед переносом
local teleporting = {}
Players.PlayerRemoving:Connect(function(p)
teleporting[p] = nil
end)
local function teleportTo(player, worldId) local function teleportTo(player, worldId)
local data = profiles[player] local data = profiles[player]
local char = player.Character local char = player.Character
@@ -2281,11 +2294,19 @@ local function teleportTo(player, worldId)
end end
local map = workspace:FindFirstChild("FishingMap") local map = workspace:FindFirstChild("FishingMap")
local m = map and map:FindFirstChild(markerName, true) -- маркеры могут лежать в папках уровня (World1Map) local m = map and map:FindFirstChild(markerName, true) -- маркеры могут лежать в папках уровня (World1Map)
if m then if m and not teleporting[player] then
-- клиент затемняет экран, переносим уже в темноте: свет новой локации ставится до того, как её видно
teleporting[player] = true
stopFishing(player, true) stopFishing(player, true)
remote:FireClient(player, "TeleportFade", worldId, TELEPORT_FADE)
task.wait(TELEPORT_FADE)
teleporting[player] = nil
char = player.Character
if char and char.Parent then
char:PivotTo(m.CFrame + Vector3.new(0, 3, 0)) char:PivotTo(m.CFrame + Vector3.new(0, 3, 0))
end end
end end
end
---------------------------------------------------------------- подсказки NPC ---------------------------------------------------------------- подсказки NPC
@@ -3713,20 +3734,29 @@ local function ensure(class, parent, props)
return obj return obj
end end
-- Базовый свет при запуске игры (совпадает со светом лобби). Под каждую локацию его меняет клиент
-- по полям look из FishConfig, пока игрок за экраном загрузки.
function Builder.applyLighting() function Builder.applyLighting()
Lighting.ClockTime = 14.5 Lighting.ClockTime = 16.3
Lighting.Brightness = 2.3 Lighting.Brightness = 2.0
Lighting.Ambient = Color3.fromRGB(70, 70, 85) Lighting.ExposureCompensation = -0.3
Lighting.OutdoorAmbient = Color3.fromRGB(140, 145, 160) Lighting.Ambient = Color3.fromRGB(64, 60, 72)
Lighting.EnvironmentDiffuseScale = 0.6 Lighting.OutdoorAmbient = Color3.fromRGB(120, 114, 124)
Lighting.EnvironmentSpecularScale = 0.8 Lighting.ColorShift_Top = Color3.fromRGB(255, 224, 186)
Lighting.EnvironmentDiffuseScale = 0.5
Lighting.EnvironmentSpecularScale = 0.5
Lighting.GlobalShadows = true
ensure("Atmosphere", Lighting, { ensure("Atmosphere", Lighting, {
Density = 0.25, Offset = 0.12, Glare = 0, Haze = 0.6, Density = 0.4, Offset = 0.18, Glare = 0.25, Haze = 1.6,
Color = Color3.fromRGB(200, 215, 232), Decay = Color3.fromRGB(110, 140, 175), Color = Color3.fromRGB(222, 212, 204), Decay = Color3.fromRGB(186, 160, 150),
}) })
ensure("BloomEffect", Lighting, { Intensity = 0.5, Size = 24, Threshold = 1.4 }) ensure("BloomEffect", Lighting, { Intensity = 0.3, Size = 24, Threshold = 1.8 })
ensure("ColorCorrectionEffect", Lighting, { Saturation = 0.15, Contrast = 0.06, Brightness = 0.02 }) ensure("ColorCorrectionEffect", Lighting, {
ensure("SunRaysEffect", Lighting, { Intensity = 0.05, Spread = 0.8 }) Saturation = 0.18, Contrast = 0.14, Brightness = -0.04, TintColor = Color3.fromRGB(255, 242, 228),
})
ensure("SunRaysEffect", Lighting, { Intensity = 0.05, Spread = 0.7 })
-- размытие дальнего плана включают миры и лобби через look.dof
ensure("DepthOfFieldEffect", Lighting, { Enabled = false, FarIntensity = 0.18, FocusDistance = 55, InFocusRadius = 95, NearIntensity = 0 })
end end
---------------------------------------------------------------- помощники ---------------------------------------------------------------- помощники
@@ -6983,7 +7013,21 @@ local lookDefaults = {}
local lookSources = table.clone(Config.Worlds) local lookSources = table.clone(Config.Worlds)
table.insert(lookSources, Config.Lobby) table.insert(lookSources, Config.Lobby)
local function applyLook(world) -- смена света: плавно или сразу (за экраном загрузки)
local lookTweens = {}
local function setLook(obj, goal, instant)
if instant then
for prop, v in pairs(goal) do
obj[prop] = v
end
else
local tw = TweenService:Create(obj, TweenInfo.new(2), goal)
table.insert(lookTweens, tw)
tw:Play()
end
end
local function applyLook(world, instant)
-- исходные значения запоминаем до первой правки; эффект мог ещё не прийти с сервера, тогда в следующий раз -- исходные значения запоминаем до первой правки; эффект мог ещё не прийти с сервера, тогда в следующий раз
for _, w in ipairs(lookSources) do for _, w in ipairs(lookSources) do
for section, props in pairs(w.look or {}) do for section, props in pairs(w.look or {}) do
@@ -7010,18 +7054,23 @@ local function applyLook(world)
local kind = typeof(v) local kind = typeof(v)
if kind == "number" or kind == "Color3" then goal[prop] = v else obj[prop] = v end if kind == "number" or kind == "Color3" then goal[prop] = v else obj[prop] = v end
end end
TweenService:Create(obj, TweenInfo.new(2), goal):Play() setLook(obj, goal, instant)
end end
end end
end end
local function applyAmbience(world) local function applyAmbience(world, instant)
-- прошлая плавная смена ещё может идти — она перебила бы новые значения
for _, tw in ipairs(lookTweens) do
tw:Cancel()
end
table.clear(lookTweens)
world = world or Config.Lobby world = world or Config.Lobby
local clock = (world and world.clock) or 14.5 local clock = (world and world.clock) or 14.5
TweenService:Create(Lighting, TweenInfo.new(2), { ClockTime = clock }):Play() setLook(Lighting, { ClockTime = clock }, instant)
local cc = Lighting:FindFirstChildOfClass("ColorCorrectionEffect") local cc = Lighting:FindFirstChildOfClass("ColorCorrectionEffect")
if cc then if cc then
TweenService:Create(cc, TweenInfo.new(2), { TintColor = (world and world.tint) or DEFAULT_LOOK.tint }):Play() setLook(cc, { TintColor = (world and world.tint) or DEFAULT_LOOK.tint }, instant)
end end
-- цвета материалов террейна общие для всей карты, поэтому меняем их только у себя и возвращаем при выходе -- цвета материалов террейна общие для всей карты, поэтому меняем их только у себя и возвращаем при выходе
if not defaultTerrainColors then if not defaultTerrainColors then
@@ -7037,12 +7086,12 @@ local function applyAmbience(world)
local atm = Lighting:FindFirstChildOfClass("Atmosphere") local atm = Lighting:FindFirstChildOfClass("Atmosphere")
if atm then if atm then
local frost = world and world.id == "World3" local frost = world and world.id == "World3"
TweenService:Create(atm, TweenInfo.new(2), { setLook(atm, {
Density = frost and 0.38 or 0.25, Density = frost and 0.38 or 0.25,
Color = frost and Color3.fromRGB(170, 200, 235) or Color3.fromRGB(200, 215, 232), Color = frost and Color3.fromRGB(170, 200, 235) or Color3.fromRGB(200, 215, 232),
}):Play() }, instant)
end end
applyLook(world) applyLook(world, instant)
snow.Rate = (world and world.id == "World3") and 140 or 0 snow.Rate = (world and world.id == "World3") and 140 or 0
end end
@@ -7098,16 +7147,80 @@ do
end) end)
end end
-- экран загрузки (ReplicatedFirst/Loading): при входе и телепорте свет локации ставится, пока он закрывает картинку
local loadingGui = player:WaitForChild("PlayerGui"):WaitForChild("LoadingScreen", 10)
local function loadingVisible()
return loadingGui ~= nil and loadingGui.Enabled
end
local function placeTitle(w)
return w and (w.icon .. " " .. w.name) or "🏠 Лобби"
end
local function enterWorld(w, instant)
lastWorldId = w and w.id or "lobby"
applyAmbience(w, instant)
if w then
-- название локации — когда экран загрузки уже ушёл
task.spawn(function()
while loadingVisible() do
task.wait(0.1)
end
notify(w.icon .. " " .. w.name, w.color)
end)
end
end
-- первое появление: ждём персонажа, ставим свет его локации сразу и отпускаем экран загрузки
task.spawn(function()
local char = player.Character or player.CharacterAdded:Wait()
char:WaitForChild("HumanoidRootPart", 30)
local w = currentWorld()
enterWorld(w, true)
if loadingGui then
loadingGui:SetAttribute("Title", placeTitle(w))
loadingGui:SetAttribute("Ready", true)
end
end)
-- телепорт: экран загрузки закрывает картинку, сервер переносит персонажа, свет новой локации ставится сразу
local teleportToken = 0
local function teleportLoading(targetId, delay)
teleportToken += 1
local token = teleportToken
local target = Config.Find(Config.Worlds, targetId)
if loadingGui then
local now = os.clock()
loadingGui:SetAttribute("Ready", false)
loadingGui:SetAttribute("StartAt", now)
loadingGui:SetAttribute("MinUntil", now + Config.Loading.teleport)
loadingGui:SetAttribute("Title", placeTitle(target))
loadingGui:SetAttribute("Visible", true)
end
task.spawn(function()
-- ждём, пока персонаж окажется в новой локации (или сдаёмся через пару секунд)
local deadline = os.clock() + delay + 3
local w
repeat
task.wait()
w = currentWorld()
until (w and w.id or "Lobby") == targetId or os.clock() > deadline or token ~= teleportToken
if token ~= teleportToken then
return
end
enterWorld(w, true)
if loadingGui then
loadingGui:SetAttribute("Ready", true)
end
end)
end
task.spawn(function() task.spawn(function()
while true do while true do
local w = currentWorld() local w = currentWorld()
local id = w and w.id or "lobby" local id = w and w.id or "lobby"
if id ~= lastWorldId then if id ~= lastWorldId and lastWorldId ~= "none" and not loadingVisible() then
lastWorldId = id enterWorld(w, false) -- без телепорта (например, после возрождения): плавно
applyAmbience(w)
if w then
notify(w.icon .. " " .. w.name, w.color)
end
end end
local cam = workspace.CurrentCamera local cam = workspace.CurrentCamera
if cam then if cam then
@@ -7192,10 +7305,11 @@ local function guideMarker(name)
return m and m.Position return m and m.Position
end end
-- объект цели подсвечивается голубым (атрибут GuideTarget ставит MapBuilder) -- объект цели обводится мягким светящимся контуром (атрибут GuideTarget ставит MapBuilder);
-- Occluded: то, что стоит перед объектом (персонаж на мостике), не перекрашивается
local guideHighlight = new("Highlight", { local guideHighlight = new("Highlight", {
FillColor = Color3.fromRGB(70, 195, 255), OutlineColor = Color3.fromRGB(170, 235, 255), FillColor = Color3.fromRGB(150, 225, 255), OutlineColor = Color3.fromRGB(190, 240, 255),
DepthMode = Enum.HighlightDepthMode.AlwaysOnTop, Enabled = false, Parent = guideFolder, DepthMode = Enum.HighlightDepthMode.Occluded, Enabled = false, Parent = guideFolder,
}) })
local guideObjects, guideScanAt = {}, {} local guideObjects, guideScanAt = {}, {}
local function guideObject(key) local function guideObject(key)
@@ -7418,8 +7532,8 @@ RunService.RenderStepped:Connect(function()
guideHighlight.Enabled = target ~= nil guideHighlight.Enabled = target ~= nil
if target then if target then
local pulse = (math.sin(os.clock() * 4) + 1) / 2 -- мягкое мигание local pulse = (math.sin(os.clock() * 4) + 1) / 2 -- мягкое мигание
guideHighlight.FillTransparency = 0.45 + 0.3 * pulse guideHighlight.FillTransparency = 0.86 + 0.1 * pulse -- лёгкое «дыхание», цвет объекта виден
guideHighlight.OutlineTransparency = 0.3 * pulse guideHighlight.OutlineTransparency = 0.1 + 0.45 * pulse
end end
if not route or #route == 0 or state ~= "idle" then if not route or #route == 0 or state ~= "idle" then
hideChevrons(1) hideChevrons(1)
@@ -7833,6 +7947,8 @@ end)()
remote.OnClientEvent:Connect(function(action, a, b, c, d) remote.OnClientEvent:Connect(function(action, a, b, c, d)
if action == "Notify" then if action == "Notify" then
notify(a, b) notify(a, b)
elseif action == "TeleportFade" then
teleportLoading(a, b)
elseif action == "Cast" then elseif action == "Cast" then
setState("waiting") setState("waiting")
startCastCam(a, b) startCastCam(a, b)
@@ -7924,4 +8040,167 @@ end)
remote:FireServer("RequestInventory") remote:FireServer("RequestInventory")
]=====]) ]=====])
print('DONE! 7 scripts installed. Press Play (F5).') make('LocalScript', 'Loading', game.ReplicatedFirst, [=====[-- Loading (LocalScript) -> ReplicatedFirst
-- Экран загрузки. Закрывает картинку при входе в игру и при каждом телепорте: игрок уже стоит на месте,
-- сцена прогружается, клиент ставит свет локации — и только потом экран плавно уходит.
--
-- FishingClient управляет экраном через атрибуты ScreenGui «LoadingScreen»:
-- Visible = true — показать (при телепорте);
-- Ready = true — свет и террейн локации выставлены;
-- StartAt / MinUntil — os.clock() начала и минимального конца показа (полоска заполняется за это время);
-- Title — подпись под названием игры (куда идём).
-- Экран уходит, когда Ready = true и минимальное время прошло.
local Players = game:GetService("Players")
local ReplicatedFirst = game:GetService("ReplicatedFirst")
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local RunService = game:GetService("RunService")
local TweenService = game:GetService("TweenService")
local player = Players.LocalPlayer
pcall(function() ReplicatedFirst:RemoveDefaultLoadingScreen() end)
local GOLD = Color3.fromRGB(255, 205, 90)
local TIPS = {
"Чем реже рыба, тем быстрее бегает метка — нужна точность!",
"Улучшай удочку в магазине: рыба клюёт быстрее, удача выше.",
"Собери все виды одной редкости — получишь награду в коллекции (C).",
"Каждый день заходи за наградой из сундука в лобби.",
"Новые миры открываются с уровнем: следи за опытом!",
}
local function new(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
local gui = new("ScreenGui", {
Name = "LoadingScreen", ResetOnSpawn = false, IgnoreGuiInset = true, DisplayOrder = 200,
ZIndexBehavior = Enum.ZIndexBehavior.Sibling, Parent = player:WaitForChild("PlayerGui"),
})
-- фон: арт лобби (временная заглушка); пока картинка грузится, виден тёплый закатный градиент
local BG_IMAGE = "rbxassetid://118616665961176"
local root = new("CanvasGroup", { Size = UDim2.fromScale(1, 1), BackgroundColor3 = Color3.fromRGB(255, 190, 120), BorderSizePixel = 0, Parent = gui })
new("UIGradient", {
Rotation = 90,
Color = ColorSequence.new(Color3.fromRGB(120, 200, 255), Color3.fromRGB(255, 170, 110)),
Parent = root,
})
local bg = new("ImageLabel", {
Size = UDim2.fromScale(1, 1), BackgroundTransparency = 1, Image = BG_IMAGE,
ScaleType = Enum.ScaleType.Crop, Parent = root,
})
task.spawn(function()
pcall(function() game:GetService("ContentProvider"):PreloadAsync({ bg }) end)
end)
-- плашка снизу: куда идём, полоска загрузки, совет
local panel = new("Frame", {
AnchorPoint = Vector2.new(0.5, 1), Position = UDim2.new(0.5, 0, 1, -28), Size = UDim2.fromOffset(560, 118),
BackgroundColor3 = Color3.fromRGB(70, 40, 22), BackgroundTransparency = 0.18, BorderSizePixel = 0, Parent = root,
})
new("UICorner", { CornerRadius = UDim.new(0, 18), Parent = panel })
new("UIStroke", { Color = GOLD, Thickness = 3, Transparency = 0.1, Parent = panel })
new("UIGradient", {
Rotation = 90,
Color = ColorSequence.new(Color3.fromRGB(150, 95, 50), Color3.fromRGB(95, 55, 28)),
Parent = panel,
})
local float = new("TextLabel", {
AnchorPoint = Vector2.new(0.5, 0.5), Position = UDim2.fromOffset(44, 32), Size = UDim2.fromOffset(46, 46),
BackgroundTransparency = 1, Text = "🎣", TextScaled = true, Font = Enum.Font.FredokaOne, Parent = panel,
})
local title = new("TextLabel", {
Position = UDim2.fromOffset(78, 12), Size = UDim2.new(1, -96, 0, 38), BackgroundTransparency = 1,
Text = "", TextColor3 = Color3.fromRGB(255, 240, 200), TextScaled = true, TextXAlignment = Enum.TextXAlignment.Left,
Font = Enum.Font.FredokaOne, Parent = panel,
})
new("UIStroke", { Color = Color3.fromRGB(60, 30, 10), Thickness = 2, Parent = title })
local barBack = new("Frame", {
AnchorPoint = Vector2.new(0.5, 0), Position = UDim2.new(0.5, 0, 0, 62), Size = UDim2.new(1, -36, 0, 16),
BackgroundColor3 = Color3.fromRGB(40, 22, 10), BackgroundTransparency = 0.15, BorderSizePixel = 0, Parent = panel,
})
new("UICorner", { CornerRadius = UDim.new(1, 0), Parent = barBack })
local bar = new("Frame", { Size = UDim2.fromScale(0, 1), BackgroundColor3 = GOLD, BorderSizePixel = 0, Parent = barBack })
new("UICorner", { CornerRadius = UDim.new(1, 0), Parent = bar })
new("UIGradient", { Color = ColorSequence.new(Color3.fromRGB(255, 230, 120), Color3.fromRGB(255, 160, 60)), Parent = bar })
local tip = new("TextLabel", {
Position = UDim2.fromOffset(18, 86), Size = UDim2.new(1, -36, 0, 22), BackgroundTransparency = 1,
Text = "", TextColor3 = Color3.fromRGB(255, 228, 185), TextScaled = true,
Font = Enum.Font.GothamMedium, Parent = panel,
})
local rng = Random.new()
local function showTip()
tip.Text = "💡 " .. TIPS[rng:NextInteger(1, #TIPS)]
end
-- при входе: экран виден сразу, минимум — из FishConfig, когда он загрузится
local now = os.clock()
gui:SetAttribute("Visible", true)
gui:SetAttribute("Ready", false)
gui:SetAttribute("StartAt", now)
gui:SetAttribute("MinUntil", now + 3)
gui:SetAttribute("Title", "Загрузка…")
showTip()
task.spawn(function()
if not game:IsLoaded() then
game.Loaded:Wait()
end
local ok, Config = pcall(require, ReplicatedStorage:WaitForChild("FishConfig"))
if ok and Config.Loading then
gui:SetAttribute("MinUntil", gui:GetAttribute("StartAt") + Config.Loading.firstJoin)
end
end)
local hiding = false
gui:GetAttributeChangedSignal("Visible"):Connect(function()
-- новый телепорт мог прийти, пока экран ещё уходил: тогда возвращаем его
if gui:GetAttribute("Visible") and (hiding or not gui.Enabled) then
hiding = false
showTip()
gui.Enabled = true
TweenService:Create(root, TweenInfo.new(0.25), { GroupTransparency = 0 }):Play()
end
end)
gui:GetAttributeChangedSignal("Title"):Connect(function()
title.Text = gui:GetAttribute("Title") or ""
end)
title.Text = gui:GetAttribute("Title")
RunService.RenderStepped:Connect(function()
if not gui.Enabled then
return
end
local t = os.clock()
float.Rotation = math.sin(t * 2.2) * 12
float.Position = UDim2.fromOffset(44, 32 + math.sin(t * 3) * 3)
local startAt, minUntil = gui:GetAttribute("StartAt") or t, gui:GetAttribute("MinUntil") or t
local p = math.clamp((t - startAt) / math.max(0.01, minUntil - startAt), 0, 1)
local ready = gui:GetAttribute("Ready") == true
if not ready then
p = math.min(p, 0.95) -- пока локация не готова, полоска не доходит до конца
end
bar.Size = UDim2.fromScale(p, 1)
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
gui.Enabled = false
gui:SetAttribute("Visible", false)
end
end)
tw:Play()
end
end)
]=====])
print('DONE! 8 scripts installed. Press Play (F5).')
+162
View File
@@ -0,0 +1,162 @@
-- Loading (LocalScript) -> ReplicatedFirst
-- Экран загрузки. Закрывает картинку при входе в игру и при каждом телепорте: игрок уже стоит на месте,
-- сцена прогружается, клиент ставит свет локации — и только потом экран плавно уходит.
--
-- FishingClient управляет экраном через атрибуты ScreenGui «LoadingScreen»:
-- Visible = true — показать (при телепорте);
-- Ready = true — свет и террейн локации выставлены;
-- StartAt / MinUntil — os.clock() начала и минимального конца показа (полоска заполняется за это время);
-- Title — подпись под названием игры (куда идём).
-- Экран уходит, когда Ready = true и минимальное время прошло.
local Players = game:GetService("Players")
local ReplicatedFirst = game:GetService("ReplicatedFirst")
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local RunService = game:GetService("RunService")
local TweenService = game:GetService("TweenService")
local player = Players.LocalPlayer
pcall(function() ReplicatedFirst:RemoveDefaultLoadingScreen() end)
local GOLD = Color3.fromRGB(255, 205, 90)
local TIPS = {
"Чем реже рыба, тем быстрее бегает метка — нужна точность!",
"Улучшай удочку в магазине: рыба клюёт быстрее, удача выше.",
"Собери все виды одной редкости — получишь награду в коллекции (C).",
"Каждый день заходи за наградой из сундука в лобби.",
"Новые миры открываются с уровнем: следи за опытом!",
}
local function new(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
local gui = new("ScreenGui", {
Name = "LoadingScreen", ResetOnSpawn = false, IgnoreGuiInset = true, DisplayOrder = 200,
ZIndexBehavior = Enum.ZIndexBehavior.Sibling, Parent = player:WaitForChild("PlayerGui"),
})
-- фон: арт лобби (временная заглушка); пока картинка грузится, виден тёплый закатный градиент
local BG_IMAGE = "rbxassetid://118616665961176"
local root = new("CanvasGroup", { Size = UDim2.fromScale(1, 1), BackgroundColor3 = Color3.fromRGB(255, 190, 120), BorderSizePixel = 0, Parent = gui })
new("UIGradient", {
Rotation = 90,
Color = ColorSequence.new(Color3.fromRGB(120, 200, 255), Color3.fromRGB(255, 170, 110)),
Parent = root,
})
local bg = new("ImageLabel", {
Size = UDim2.fromScale(1, 1), BackgroundTransparency = 1, Image = BG_IMAGE,
ScaleType = Enum.ScaleType.Crop, Parent = root,
})
task.spawn(function()
pcall(function() game:GetService("ContentProvider"):PreloadAsync({ bg }) end)
end)
-- плашка снизу: куда идём, полоска загрузки, совет
local panel = new("Frame", {
AnchorPoint = Vector2.new(0.5, 1), Position = UDim2.new(0.5, 0, 1, -28), Size = UDim2.fromOffset(560, 118),
BackgroundColor3 = Color3.fromRGB(70, 40, 22), BackgroundTransparency = 0.18, BorderSizePixel = 0, Parent = root,
})
new("UICorner", { CornerRadius = UDim.new(0, 18), Parent = panel })
new("UIStroke", { Color = GOLD, Thickness = 3, Transparency = 0.1, Parent = panel })
new("UIGradient", {
Rotation = 90,
Color = ColorSequence.new(Color3.fromRGB(150, 95, 50), Color3.fromRGB(95, 55, 28)),
Parent = panel,
})
local float = new("TextLabel", {
AnchorPoint = Vector2.new(0.5, 0.5), Position = UDim2.fromOffset(44, 32), Size = UDim2.fromOffset(46, 46),
BackgroundTransparency = 1, Text = "🎣", TextScaled = true, Font = Enum.Font.FredokaOne, Parent = panel,
})
local title = new("TextLabel", {
Position = UDim2.fromOffset(78, 12), Size = UDim2.new(1, -96, 0, 38), BackgroundTransparency = 1,
Text = "", TextColor3 = Color3.fromRGB(255, 240, 200), TextScaled = true, TextXAlignment = Enum.TextXAlignment.Left,
Font = Enum.Font.FredokaOne, Parent = panel,
})
new("UIStroke", { Color = Color3.fromRGB(60, 30, 10), Thickness = 2, Parent = title })
local barBack = new("Frame", {
AnchorPoint = Vector2.new(0.5, 0), Position = UDim2.new(0.5, 0, 0, 62), Size = UDim2.new(1, -36, 0, 16),
BackgroundColor3 = Color3.fromRGB(40, 22, 10), BackgroundTransparency = 0.15, BorderSizePixel = 0, Parent = panel,
})
new("UICorner", { CornerRadius = UDim.new(1, 0), Parent = barBack })
local bar = new("Frame", { Size = UDim2.fromScale(0, 1), BackgroundColor3 = GOLD, BorderSizePixel = 0, Parent = barBack })
new("UICorner", { CornerRadius = UDim.new(1, 0), Parent = bar })
new("UIGradient", { Color = ColorSequence.new(Color3.fromRGB(255, 230, 120), Color3.fromRGB(255, 160, 60)), Parent = bar })
local tip = new("TextLabel", {
Position = UDim2.fromOffset(18, 86), Size = UDim2.new(1, -36, 0, 22), BackgroundTransparency = 1,
Text = "", TextColor3 = Color3.fromRGB(255, 228, 185), TextScaled = true,
Font = Enum.Font.GothamMedium, Parent = panel,
})
local rng = Random.new()
local function showTip()
tip.Text = "💡 " .. TIPS[rng:NextInteger(1, #TIPS)]
end
-- при входе: экран виден сразу, минимум — из FishConfig, когда он загрузится
local now = os.clock()
gui:SetAttribute("Visible", true)
gui:SetAttribute("Ready", false)
gui:SetAttribute("StartAt", now)
gui:SetAttribute("MinUntil", now + 3)
gui:SetAttribute("Title", "Загрузка…")
showTip()
task.spawn(function()
if not game:IsLoaded() then
game.Loaded:Wait()
end
local ok, Config = pcall(require, ReplicatedStorage:WaitForChild("FishConfig"))
if ok and Config.Loading then
gui:SetAttribute("MinUntil", gui:GetAttribute("StartAt") + Config.Loading.firstJoin)
end
end)
local hiding = false
gui:GetAttributeChangedSignal("Visible"):Connect(function()
-- новый телепорт мог прийти, пока экран ещё уходил: тогда возвращаем его
if gui:GetAttribute("Visible") and (hiding or not gui.Enabled) then
hiding = false
showTip()
gui.Enabled = true
TweenService:Create(root, TweenInfo.new(0.25), { GroupTransparency = 0 }):Play()
end
end)
gui:GetAttributeChangedSignal("Title"):Connect(function()
title.Text = gui:GetAttribute("Title") or ""
end)
title.Text = gui:GetAttribute("Title")
RunService.RenderStepped:Connect(function()
if not gui.Enabled then
return
end
local t = os.clock()
float.Rotation = math.sin(t * 2.2) * 12
float.Position = UDim2.fromOffset(44, 32 + math.sin(t * 3) * 3)
local startAt, minUntil = gui:GetAttribute("StartAt") or t, gui:GetAttribute("MinUntil") or t
local p = math.clamp((t - startAt) / math.max(0.01, minUntil - startAt), 0, 1)
local ready = gui:GetAttribute("Ready") == true
if not ready then
p = math.min(p, 0.95) -- пока локация не готова, полоска не доходит до конца
end
bar.Size = UDim2.fromScale(p, 1)
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
gui.Enabled = false
gui:SetAttribute("Visible", false)
end
end)
tw:Play()
end
end)
+7
View File
@@ -75,6 +75,13 @@ Config.Worlds = {
} }
Config.WorldRadius = 260 Config.WorldRadius = 260
-- экран загрузки: при входе в игру и при каждом телепорте игрок уже стоит на месте, сцена прогружается
-- и свет локации ставится под ним; картинку видно только после этого (секунды — минимум показа)
Config.Loading = {
firstJoin = 3,
teleport = 2.5,
}
-- лобби: те же поля внешнего вида, что у миров (clock, tint, look, terrainColors); клиент применяет их вне миров -- лобби: те же поля внешнего вида, что у миров (clock, tint, look, terrainColors); клиент применяет их вне миров
Config.Lobby = { Config.Lobby = {
id = "Lobby", id = "Lobby",
+15 -1
View File
@@ -1164,6 +1164,12 @@ end
---------------------------------------------------------------- телепорт ---------------------------------------------------------------- телепорт
local TELEPORT_FADE = 0.3 -- сколько клиент затемняет экран перед переносом
local teleporting = {}
Players.PlayerRemoving:Connect(function(p)
teleporting[p] = nil
end)
local function teleportTo(player, worldId) local function teleportTo(player, worldId)
local data = profiles[player] local data = profiles[player]
local char = player.Character local char = player.Character
@@ -1190,11 +1196,19 @@ local function teleportTo(player, worldId)
end end
local map = workspace:FindFirstChild("FishingMap") local map = workspace:FindFirstChild("FishingMap")
local m = map and map:FindFirstChild(markerName, true) -- маркеры могут лежать в папках уровня (World1Map) local m = map and map:FindFirstChild(markerName, true) -- маркеры могут лежать в папках уровня (World1Map)
if m then if m and not teleporting[player] then
-- клиент затемняет экран, переносим уже в темноте: свет новой локации ставится до того, как её видно
teleporting[player] = true
stopFishing(player, true) stopFishing(player, true)
remote:FireClient(player, "TeleportFade", worldId, TELEPORT_FADE)
task.wait(TELEPORT_FADE)
teleporting[player] = nil
char = player.Character
if char and char.Parent then
char:PivotTo(m.CFrame + Vector3.new(0, 3, 0)) char:PivotTo(m.CFrame + Vector3.new(0, 3, 0))
end end
end end
end
---------------------------------------------------------------- подсказки NPC ---------------------------------------------------------------- подсказки NPC
+20 -11
View File
@@ -61,20 +61,29 @@ local function ensure(class, parent, props)
return obj return obj
end end
-- Базовый свет при запуске игры (совпадает со светом лобби). Под каждую локацию его меняет клиент
-- по полям look из FishConfig, пока игрок за экраном загрузки.
function Builder.applyLighting() function Builder.applyLighting()
Lighting.ClockTime = 14.5 Lighting.ClockTime = 16.3
Lighting.Brightness = 2.3 Lighting.Brightness = 2.0
Lighting.Ambient = Color3.fromRGB(70, 70, 85) Lighting.ExposureCompensation = -0.3
Lighting.OutdoorAmbient = Color3.fromRGB(140, 145, 160) Lighting.Ambient = Color3.fromRGB(64, 60, 72)
Lighting.EnvironmentDiffuseScale = 0.6 Lighting.OutdoorAmbient = Color3.fromRGB(120, 114, 124)
Lighting.EnvironmentSpecularScale = 0.8 Lighting.ColorShift_Top = Color3.fromRGB(255, 224, 186)
Lighting.EnvironmentDiffuseScale = 0.5
Lighting.EnvironmentSpecularScale = 0.5
Lighting.GlobalShadows = true
ensure("Atmosphere", Lighting, { ensure("Atmosphere", Lighting, {
Density = 0.25, Offset = 0.12, Glare = 0, Haze = 0.6, Density = 0.4, Offset = 0.18, Glare = 0.25, Haze = 1.6,
Color = Color3.fromRGB(200, 215, 232), Decay = Color3.fromRGB(110, 140, 175), Color = Color3.fromRGB(222, 212, 204), Decay = Color3.fromRGB(186, 160, 150),
}) })
ensure("BloomEffect", Lighting, { Intensity = 0.5, Size = 24, Threshold = 1.4 }) ensure("BloomEffect", Lighting, { Intensity = 0.3, Size = 24, Threshold = 1.8 })
ensure("ColorCorrectionEffect", Lighting, { Saturation = 0.15, Contrast = 0.06, Brightness = 0.02 }) ensure("ColorCorrectionEffect", Lighting, {
ensure("SunRaysEffect", Lighting, { Intensity = 0.05, Spread = 0.8 }) Saturation = 0.18, Contrast = 0.14, Brightness = -0.04, TintColor = Color3.fromRGB(255, 242, 228),
})
ensure("SunRaysEffect", Lighting, { Intensity = 0.05, Spread = 0.7 })
-- размытие дальнего плана включают миры и лобби через look.dof
ensure("DepthOfFieldEffect", Lighting, { Enabled = false, FarIntensity = 0.18, FocusDistance = 55, InFocusRadius = 95, NearIntensity = 0 })
end end
---------------------------------------------------------------- помощники ---------------------------------------------------------------- помощники
@@ -1575,7 +1575,21 @@ local lookDefaults = {}
local lookSources = table.clone(Config.Worlds) local lookSources = table.clone(Config.Worlds)
table.insert(lookSources, Config.Lobby) table.insert(lookSources, Config.Lobby)
local function applyLook(world) -- смена света: плавно или сразу (за экраном загрузки)
local lookTweens = {}
local function setLook(obj, goal, instant)
if instant then
for prop, v in pairs(goal) do
obj[prop] = v
end
else
local tw = TweenService:Create(obj, TweenInfo.new(2), goal)
table.insert(lookTweens, tw)
tw:Play()
end
end
local function applyLook(world, instant)
-- исходные значения запоминаем до первой правки; эффект мог ещё не прийти с сервера, тогда в следующий раз -- исходные значения запоминаем до первой правки; эффект мог ещё не прийти с сервера, тогда в следующий раз
for _, w in ipairs(lookSources) do for _, w in ipairs(lookSources) do
for section, props in pairs(w.look or {}) do for section, props in pairs(w.look or {}) do
@@ -1602,18 +1616,23 @@ local function applyLook(world)
local kind = typeof(v) local kind = typeof(v)
if kind == "number" or kind == "Color3" then goal[prop] = v else obj[prop] = v end if kind == "number" or kind == "Color3" then goal[prop] = v else obj[prop] = v end
end end
TweenService:Create(obj, TweenInfo.new(2), goal):Play() setLook(obj, goal, instant)
end end
end end
end end
local function applyAmbience(world) local function applyAmbience(world, instant)
-- прошлая плавная смена ещё может идти — она перебила бы новые значения
for _, tw in ipairs(lookTweens) do
tw:Cancel()
end
table.clear(lookTweens)
world = world or Config.Lobby world = world or Config.Lobby
local clock = (world and world.clock) or 14.5 local clock = (world and world.clock) or 14.5
TweenService:Create(Lighting, TweenInfo.new(2), { ClockTime = clock }):Play() setLook(Lighting, { ClockTime = clock }, instant)
local cc = Lighting:FindFirstChildOfClass("ColorCorrectionEffect") local cc = Lighting:FindFirstChildOfClass("ColorCorrectionEffect")
if cc then if cc then
TweenService:Create(cc, TweenInfo.new(2), { TintColor = (world and world.tint) or DEFAULT_LOOK.tint }):Play() setLook(cc, { TintColor = (world and world.tint) or DEFAULT_LOOK.tint }, instant)
end end
-- цвета материалов террейна общие для всей карты, поэтому меняем их только у себя и возвращаем при выходе -- цвета материалов террейна общие для всей карты, поэтому меняем их только у себя и возвращаем при выходе
if not defaultTerrainColors then if not defaultTerrainColors then
@@ -1629,12 +1648,12 @@ local function applyAmbience(world)
local atm = Lighting:FindFirstChildOfClass("Atmosphere") local atm = Lighting:FindFirstChildOfClass("Atmosphere")
if atm then if atm then
local frost = world and world.id == "World3" local frost = world and world.id == "World3"
TweenService:Create(atm, TweenInfo.new(2), { setLook(atm, {
Density = frost and 0.38 or 0.25, Density = frost and 0.38 or 0.25,
Color = frost and Color3.fromRGB(170, 200, 235) or Color3.fromRGB(200, 215, 232), Color = frost and Color3.fromRGB(170, 200, 235) or Color3.fromRGB(200, 215, 232),
}):Play() }, instant)
end end
applyLook(world) applyLook(world, instant)
snow.Rate = (world and world.id == "World3") and 140 or 0 snow.Rate = (world and world.id == "World3") and 140 or 0
end end
@@ -1690,16 +1709,80 @@ do
end) end)
end end
-- экран загрузки (ReplicatedFirst/Loading): при входе и телепорте свет локации ставится, пока он закрывает картинку
local loadingGui = player:WaitForChild("PlayerGui"):WaitForChild("LoadingScreen", 10)
local function loadingVisible()
return loadingGui ~= nil and loadingGui.Enabled
end
local function placeTitle(w)
return w and (w.icon .. " " .. w.name) or "🏠 Лобби"
end
local function enterWorld(w, instant)
lastWorldId = w and w.id or "lobby"
applyAmbience(w, instant)
if w then
-- название локации — когда экран загрузки уже ушёл
task.spawn(function()
while loadingVisible() do
task.wait(0.1)
end
notify(w.icon .. " " .. w.name, w.color)
end)
end
end
-- первое появление: ждём персонажа, ставим свет его локации сразу и отпускаем экран загрузки
task.spawn(function()
local char = player.Character or player.CharacterAdded:Wait()
char:WaitForChild("HumanoidRootPart", 30)
local w = currentWorld()
enterWorld(w, true)
if loadingGui then
loadingGui:SetAttribute("Title", placeTitle(w))
loadingGui:SetAttribute("Ready", true)
end
end)
-- телепорт: экран загрузки закрывает картинку, сервер переносит персонажа, свет новой локации ставится сразу
local teleportToken = 0
local function teleportLoading(targetId, delay)
teleportToken += 1
local token = teleportToken
local target = Config.Find(Config.Worlds, targetId)
if loadingGui then
local now = os.clock()
loadingGui:SetAttribute("Ready", false)
loadingGui:SetAttribute("StartAt", now)
loadingGui:SetAttribute("MinUntil", now + Config.Loading.teleport)
loadingGui:SetAttribute("Title", placeTitle(target))
loadingGui:SetAttribute("Visible", true)
end
task.spawn(function()
-- ждём, пока персонаж окажется в новой локации (или сдаёмся через пару секунд)
local deadline = os.clock() + delay + 3
local w
repeat
task.wait()
w = currentWorld()
until (w and w.id or "Lobby") == targetId or os.clock() > deadline or token ~= teleportToken
if token ~= teleportToken then
return
end
enterWorld(w, true)
if loadingGui then
loadingGui:SetAttribute("Ready", true)
end
end)
end
task.spawn(function() task.spawn(function()
while true do while true do
local w = currentWorld() local w = currentWorld()
local id = w and w.id or "lobby" local id = w and w.id or "lobby"
if id ~= lastWorldId then if id ~= lastWorldId and lastWorldId ~= "none" and not loadingVisible() then
lastWorldId = id enterWorld(w, false) -- без телепорта (например, после возрождения): плавно
applyAmbience(w)
if w then
notify(w.icon .. " " .. w.name, w.color)
end
end end
local cam = workspace.CurrentCamera local cam = workspace.CurrentCamera
if cam then if cam then
@@ -1784,10 +1867,11 @@ local function guideMarker(name)
return m and m.Position return m and m.Position
end end
-- объект цели подсвечивается голубым (атрибут GuideTarget ставит MapBuilder) -- объект цели обводится мягким светящимся контуром (атрибут GuideTarget ставит MapBuilder);
-- Occluded: то, что стоит перед объектом (персонаж на мостике), не перекрашивается
local guideHighlight = new("Highlight", { local guideHighlight = new("Highlight", {
FillColor = Color3.fromRGB(70, 195, 255), OutlineColor = Color3.fromRGB(170, 235, 255), FillColor = Color3.fromRGB(150, 225, 255), OutlineColor = Color3.fromRGB(190, 240, 255),
DepthMode = Enum.HighlightDepthMode.AlwaysOnTop, Enabled = false, Parent = guideFolder, DepthMode = Enum.HighlightDepthMode.Occluded, Enabled = false, Parent = guideFolder,
}) })
local guideObjects, guideScanAt = {}, {} local guideObjects, guideScanAt = {}, {}
local function guideObject(key) local function guideObject(key)
@@ -1901,6 +1985,25 @@ closeBoardView = function()
advanceTutorial(1) advanceTutorial(1)
end end
-- скупка «Тихого озера»: ведём к прилавку с подсказкой «Продать» внутри лавки (GuideTarget = "Sell"),
-- поэтому стрелка идёт за лавкой, куда бы её ни переставили; маркер GuideSell — запасной вариант
local function sellTargetW1()
local shop = guideObject("Sell")
if shop then
for _, d in ipairs(shop:GetDescendants()) do
if d:IsA("ProximityPrompt") and d:GetAttribute("Action") == "Sell" then
local p = d.Parent
local at = (p:IsA("BasePart") and p.Position) or (p:IsA("Attachment") and p.WorldPosition)
if at then
return at
end
end
end
return shop:IsA("Model") and shop:GetPivot().Position or shop.Position
end
return guideMarker("GuideSell")
end
-- маршрут для текущего шага: точки ломаной (без игрока), подсказка и что подсветить; nil — линию не показываем -- маршрут для текущего шага: точки ломаной (без игрока), подсказка и что подсветить; nil — линию не показываем
local function guideRoute(step, pos, world) local function guideRoute(step, pos, world)
local inW1 = world and world.id == "World1" local inW1 = world and world.id == "World1"
@@ -1911,7 +2014,7 @@ local function guideRoute(step, pos, world)
elseif step == 2 and inW1 then elseif step == 2 and inW1 then
return { guideMarker("GuideFishSpot") }, "🎣 Зажми ЛКМ у воды", "Pier" return { guideMarker("GuideFishSpot") }, "🎣 Зажми ЛКМ у воды", "Pier"
elseif step == 3 and inW1 then elseif step == 3 and inW1 then
return { guideMarker("GuideSell") }, "💰 Продай рыбу", "Sell" -- лавка у самого причала, идём напрямую return { sellTargetW1() }, "💰 Продай рыбу", "Sell" -- лавка у самого причала, идём напрямую
end end
return nil return nil
end end
@@ -1995,7 +2098,7 @@ RunService.RenderStepped:Connect(function()
end end
if not route and bagFull then if not route and bagFull then
local inW1 = world and world.id == "World1" local inW1 = world and world.id == "World1"
local at = (inW1 and guideMarker("GuideSell")) or nearestSell(pos, world) local at = (inW1 and sellTargetW1()) or nearestSell(pos, world)
route, hint, key = at and { at } or nil, "🎒 Сумка полна — продай рыбу!", inW1 and "Sell" or nil route, hint, key = at and { at } or nil, "🎒 Сумка полна — продай рыбу!", inW1 and "Sell" or nil
end end
guideHintText.Text = hint or "" guideHintText.Text = hint or ""
@@ -2010,8 +2113,8 @@ RunService.RenderStepped:Connect(function()
guideHighlight.Enabled = target ~= nil guideHighlight.Enabled = target ~= nil
if target then if target then
local pulse = (math.sin(os.clock() * 4) + 1) / 2 -- мягкое мигание local pulse = (math.sin(os.clock() * 4) + 1) / 2 -- мягкое мигание
guideHighlight.FillTransparency = 0.45 + 0.3 * pulse guideHighlight.FillTransparency = 0.86 + 0.1 * pulse -- лёгкое «дыхание», цвет объекта виден
guideHighlight.OutlineTransparency = 0.3 * pulse guideHighlight.OutlineTransparency = 0.1 + 0.45 * pulse
end end
if not route or #route == 0 or state ~= "idle" then if not route or #route == 0 or state ~= "idle" then
hideChevrons(1) hideChevrons(1)
@@ -2425,6 +2528,8 @@ end)()
remote.OnClientEvent:Connect(function(action, a, b, c, d) remote.OnClientEvent:Connect(function(action, a, b, c, d)
if action == "Notify" then if action == "Notify" then
notify(a, b) notify(a, b)
elseif action == "TeleportFade" then
teleportLoading(a, b)
elseif action == "Cast" then elseif action == "Cast" then
setState("waiting") setState("waiting")
startCastCam(a, b) startCastCam(a, b)