Lobby
This commit is contained in:
1 parent
73a2db8bb8
commit
44cf31ce6b
231 files changed
+3396887
-1109081
No files matched your search
@@ -21,19 +21,23 @@ Config.Worlds = {
|
||||
-- свет и эффекты: свойства Lighting и его эффектов; чего здесь нет, остаётся как в MapBuilder
|
||||
look = {
|
||||
lighting = {
|
||||
Brightness = 2.6, ExposureCompensation = -0.15,
|
||||
-- днём солнце не выжигает светлый песок и траву: яркость и экспозиция ниже
|
||||
Brightness = 2.0, ExposureCompensation = -0.35,
|
||||
Ambient = Color3.fromRGB(62, 66, 84), OutdoorAmbient = Color3.fromRGB(105, 112, 132),
|
||||
ColorShift_Top = Color3.fromRGB(255, 232, 196),
|
||||
EnvironmentDiffuseScale = 0.6, EnvironmentSpecularScale = 0.8,
|
||||
EnvironmentDiffuseScale = 0.5, EnvironmentSpecularScale = 0.6,
|
||||
},
|
||||
-- дымка вдали: Density — сколько тумана, Haze — насколько он плотный у горизонта
|
||||
atmosphere = {
|
||||
Density = 0.38, Offset = 0.1, Haze = 1.2, Glare = 0.15,
|
||||
Color = Color3.fromRGB(188, 204, 224), Decay = Color3.fromRGB(196, 176, 160),
|
||||
},
|
||||
color = { Saturation = 0.28, Contrast = 0.2, Brightness = -0.02 },
|
||||
bloom = { Intensity = 0.45, Size = 28, Threshold = 1.2 },
|
||||
sunRays = { Intensity = 0.06, Spread = 0.6 },
|
||||
color = { Saturation = 0.16, Contrast = 0.12, Brightness = -0.04 },
|
||||
-- свечение только у по-настоящему ярких мест (огни ночью), без ореолов вокруг светлого днём
|
||||
bloom = { Intensity = 0.25, Size = 24, Threshold = 1.9 },
|
||||
sunRays = { Intensity = 0.05, Spread = 0.6 },
|
||||
-- мягкий тонмаппинг: светлое не выгорает в белое
|
||||
grading = { TonemapperPreset = Enum.TonemapperPreset.Default },
|
||||
-- лёгкое размытие дальнего плана
|
||||
dof = { Enabled = true, FarIntensity = 0.2, FocusDistance = 60, InFocusRadius = 120, NearIntensity = 0 },
|
||||
},
|
||||
@@ -76,6 +80,31 @@ Config.Worlds = {
|
||||
}
|
||||
Config.WorldRadius = 260
|
||||
|
||||
-- камера игрока: насколько близко и далеко можно отвести колесом (в studs);
|
||||
-- maxZoom держит обзор внутри локаций — дальше видно край карты
|
||||
Config.Camera = { minZoom = 0.5, maxZoom = 35 }
|
||||
|
||||
-- лента активности (слева внизу у всех игроков) и оповещения о редком улове
|
||||
-- announceRank / announceMutations — крупный баннер со звуком у всех на сервере;
|
||||
-- globalRank / globalMutations — улов уходит и на другие серверы игры (MessagingService);
|
||||
-- lines — сколько строк в ленте, lineTime — сколько секунд строка остаётся видна
|
||||
Config.Feed = {
|
||||
announceRank = 4, announceMutations = { Golden = true, Rainbow = true },
|
||||
globalRank = 5, globalMutations = { Rainbow = true },
|
||||
lines = 6, lineTime = 30,
|
||||
}
|
||||
|
||||
-- доски лидеров в лобби (глобальные, по всем серверам; обновляются раз в refresh секунд).
|
||||
-- attr — атрибут игрока, который считает сервер; store — имя OrderedDataStore (смена имени = новый топ с нуля)
|
||||
Config.Leaderboards = {
|
||||
refresh = 60, size = 10,
|
||||
boards = {
|
||||
{ id = "Donate", title = "💎 Топ донатеров", attr = "RobuxSpent", store = "TopRobux_v1", unit = "R$", color = Color3.fromRGB(205, 140, 255) },
|
||||
{ id = "Earn", title = "⚪ Топ по заработку", attr = "CoinsEarned", store = "TopEarned_v1", unit = "⚪", color = Color3.fromRGB(255, 214, 90) },
|
||||
{ id = "Catch", title = "🎣 Топ рыболовов", attr = "TotalCaught", store = "TopCaught_v1", unit = "🐟", color = Color3.fromRGB(120, 210, 255) },
|
||||
},
|
||||
}
|
||||
|
||||
-- экран загрузки: при входе в игру и при каждом телепорте игрок уже стоит на месте, сцена прогружается
|
||||
-- и свет локации ставится под ним; картинку видно только после этого (секунды — минимум показа)
|
||||
Config.Loading = {
|
||||
@@ -302,16 +331,17 @@ Config.Zones = {
|
||||
}
|
||||
|
||||
---------------------------------------------------------------- удочки
|
||||
-- luck = бонус удачи, speed = множитель ожидания клёва (меньше = быстрее), zone = ширина зелёной зоны
|
||||
-- luck = бонус удачи, speed = множитель ожидания клёва (меньше = быстрее), zone = ширина зелёной зоны,
|
||||
-- icon = картинка удочки в хотбаре (Tool.TextureId)
|
||||
Config.Rods = {
|
||||
{ id = "Basic", name = "Старая удочка", price = 0, level = 1, luck = 0.00, speed = 1.00, zone = 0.22, upgradeCost = 40, style = "wood" },
|
||||
{ id = "Bamboo", name = "Бамбуковая удочка", price = 150, level = 3, luck = 0.15, speed = 0.88, zone = 0.25, upgradeCost = 120, style = "bamboo" },
|
||||
{ id = "Fiberglass", name = "Стеклопластиковая", price = 600, level = 5, luck = 0.30, speed = 0.78, zone = 0.27, upgradeCost = 300, style = "glass" },
|
||||
{ id = "Carbon", name = "Карбоновая удочка", price = 1800, level = 8, luck = 0.55, speed = 0.68, zone = 0.29, upgradeCost = 700, style = "carbon" },
|
||||
{ id = "Coral", name = "Коралловая удочка", price = 4500, level = 10, luck = 0.80, speed = 0.62, zone = 0.31, upgradeCost = 1300, style = "coral" },
|
||||
{ id = "Golden", name = "Золотая удочка", price = 9000, level = 13, luck = 1.00, speed = 0.56, zone = 0.33, upgradeCost = 2200, style = "gold" },
|
||||
{ id = "Frost", name = "Ледяная удочка", price = 25000, level = 18, luck = 1.40, speed = 0.50, zone = 0.35, upgradeCost = 5000, style = "frost" },
|
||||
{ id = "Legend", name = "Удочка Легенды", price = 75000, level = 25, luck = 2.00, speed = 0.42, zone = 0.38, upgradeCost = 12000, style = "legend" },
|
||||
{ id = "Basic", name = "Старая удочка", price = 0, level = 1, luck = 0.00, speed = 1.00, zone = 0.22, upgradeCost = 40, style = "wood", icon = "rbxassetid://83350883185349" },
|
||||
{ id = "Bamboo", name = "Бамбуковая удочка", price = 150, level = 3, luck = 0.15, speed = 0.88, zone = 0.25, upgradeCost = 120, style = "bamboo", icon = "rbxassetid://98615001898640" },
|
||||
{ id = "Fiberglass", name = "Стеклопластиковая", price = 600, level = 5, luck = 0.30, speed = 0.78, zone = 0.27, upgradeCost = 300, style = "glass", icon = "rbxassetid://100031752289540" },
|
||||
{ id = "Carbon", name = "Карбоновая удочка", price = 1800, level = 8, luck = 0.55, speed = 0.68, zone = 0.29, upgradeCost = 700, style = "carbon", icon = "rbxassetid://71788597596034" },
|
||||
{ id = "Coral", name = "Коралловая удочка", price = 4500, level = 10, luck = 0.80, speed = 0.62, zone = 0.31, upgradeCost = 1300, style = "coral", icon = "rbxassetid://139114393074237" },
|
||||
{ id = "Golden", name = "Золотая удочка", price = 9000, level = 13, luck = 1.00, speed = 0.56, zone = 0.33, upgradeCost = 2200, style = "gold", icon = "rbxassetid://83212298735071" },
|
||||
{ id = "Frost", name = "Ледяная удочка", price = 25000, level = 18, luck = 1.40, speed = 0.50, zone = 0.35, upgradeCost = 5000, style = "frost", icon = "rbxassetid://134579643216329" },
|
||||
{ id = "Legend", name = "Удочка Легенды", price = 75000, level = 25, luck = 2.00, speed = 0.42, zone = 0.38, upgradeCost = 12000, style = "legend", icon = "rbxassetid://84863811378769" },
|
||||
}
|
||||
|
||||
Config.RodUpgrade = { maxLevel = 5, luckPerLevel = 0.08, zonePerLevel = 0.012, speedPerLevel = 0.96 }
|
||||
@@ -365,7 +395,7 @@ Config.QuestKinds = {
|
||||
perfectCast = { text = "Забрось в зелёную зону %d %s", forms = TIMES, coins = 8, xp = 6 },
|
||||
combo = { text = "Набери серию из %d рыб", coins = 12, xp = 10, max = 15 },
|
||||
sell = { text = "Продай %d %s", forms = FISH, coins = 3, xp = 3 },
|
||||
earn = { text = "Заработай %d 💰 на продаже", coins = 0.25, xp = 0.2, byLevel = true },
|
||||
earn = { text = "Заработай %d ⚪ на продаже", coins = 0.25, xp = 0.2, byLevel = true },
|
||||
buy = { text = "Купи что-нибудь в магазине", coins = 40, xp = 30, max = 1 },
|
||||
boss = { text = "Нанеси боссу %d урона", coins = 15, xp = 12 },
|
||||
}
|
||||
@@ -398,7 +428,7 @@ Config.Boss = {
|
||||
},
|
||||
}
|
||||
|
||||
-- ежедневная награда (7 дней по кругу), монеты растут с уровнем
|
||||
-- ежедневная награда (7 дней по кругу), серебро растёт с уровнем
|
||||
Config.DailyRewards = {
|
||||
{ coins = 100 },
|
||||
{ coins = 200 },
|
||||
@@ -414,26 +444,129 @@ Config.Events = {
|
||||
{ id = "Bite", name = "⚡ Клёвый час", desc = "Рыба клюёт в 2 раза быстрее", duration = 180, speed = 0.5 },
|
||||
{ id = "Luck", name = "🍀 Удачный ветер", desc = "Удача +50% для всех", duration = 180, luck = 0.5 },
|
||||
{ id = "Stars", name = "🌟 Звездопад", desc = "Мутации в 3 раза чаще", duration = 180, mutation = 3 },
|
||||
{ id = "Fair", name = "💰 Рыбная ярмарка", desc = "Рыба продаётся на 50% дороже", duration = 180, sell = 1.5 },
|
||||
{ id = "Fair", name = "🐟 Рыбная ярмарка", desc = "Рыба продаётся на 50% дороже", duration = 180, sell = 1.5 },
|
||||
}
|
||||
Config.EventFirstDelay = 120
|
||||
Config.EventGapMin = 420
|
||||
Config.EventGapMax = 720
|
||||
|
||||
---------------------------------------------------------------- время суток
|
||||
-- одни сутки длятся length секунд реального времени; время общее для всего сервера
|
||||
Config.DayNight = {
|
||||
enabled = true,
|
||||
length = 1200, -- 20 минут на сутки
|
||||
startClock = 9, -- во сколько начинается день при запуске сервера
|
||||
nightLuck = 0.10, -- ночью удача +10%
|
||||
}
|
||||
|
||||
-- время на часах в момент serverTime (workspace:GetServerTimeNow()), dayStart — атрибут workspace "DayStart"
|
||||
function Config.ClockAt(serverTime, dayStart)
|
||||
local d = Config.DayNight
|
||||
return (d.startClock + (serverTime - (dayStart or serverTime)) / d.length * 24) % 24
|
||||
end
|
||||
|
||||
-- 0 днём, 1 глубокой ночью, плавно на рассвете и закате
|
||||
function Config.Nightness(clock)
|
||||
if clock >= 7 and clock <= 17.5 then
|
||||
return 0
|
||||
elseif clock > 17.5 and clock < 20 then
|
||||
return (clock - 17.5) / 2.5
|
||||
elseif clock >= 5 and clock < 7 then
|
||||
return 1 - (clock - 5) / 2
|
||||
end
|
||||
return 1
|
||||
end
|
||||
|
||||
function Config.IsNight(clock)
|
||||
return Config.Nightness(clock) >= 0.5
|
||||
end
|
||||
|
||||
---------------------------------------------------------------- погода
|
||||
-- меняется на всём сервере; weight — как часто выпадает, duration — сколько длится (секунды)
|
||||
-- luck / speed / mutation — бонусы к рыбалке, пока погода держится
|
||||
-- names — как погода называется в отдельных мирах (во фьорде вместо дождя снег)
|
||||
Config.Weathers = {
|
||||
{ id = "Clear", name = "Ясно", icon = "☀", weight = 40, duration = { 240, 420 } },
|
||||
{ id = "Cloudy", name = "Пасмурно", icon = "☁", weight = 25, duration = { 180, 360 }, luck = 0.05, desc = "Удача +5%" },
|
||||
{ id = "Rain", name = "Дождь", icon = "🌧", weight = 20, duration = { 150, 300 }, speed = 0.85, desc = "Клюёт на 15% быстрее",
|
||||
names = { World3 = "Снегопад" } },
|
||||
{ id = "Storm", name = "Гроза", icon = "⛈", weight = 8, duration = { 120, 240 }, luck = 0.25, speed = 0.9, desc = "Удача +25%",
|
||||
names = { World3 = "Метель" } },
|
||||
{ id = "Fog", name = "Туман", icon = "🌫", weight = 7, duration = { 150, 300 }, mutation = 1.5, desc = "Мутации ×1.5" },
|
||||
}
|
||||
|
||||
function Config.WeatherById(id)
|
||||
for _, w in ipairs(Config.Weathers) do
|
||||
if w.id == id then
|
||||
return w
|
||||
end
|
||||
end
|
||||
return Config.Weathers[1]
|
||||
end
|
||||
|
||||
---------------------------------------------------------------- звуки
|
||||
-- ID из Creator Store: эффекты — Pro Sound Effects (официальная библиотека Roblox),
|
||||
-- музыка — APM и DistroKid (лицензированы для Roblox). volume — громкость, pitch — разброс высоты
|
||||
local function S(id, volume, extra)
|
||||
local t = extra or {}
|
||||
t.id = "rbxassetid://" .. id
|
||||
t.volume = volume
|
||||
return t
|
||||
end
|
||||
Config.Sounds = {
|
||||
-- музыка
|
||||
musicLobby = S(137023744071437, 0.35), -- The Ancient Lutes | Medieval Tavern Music
|
||||
musicLobby2 = S(116079409060113, 0.35), -- The Lute Lament | Medieval Tavern Music
|
||||
musicLake = S(1838853377, 0.3), -- Harp Fantasy
|
||||
musicLake2 = S(86472274853159, 0.3), -- Calm Fantasy Atmosphere
|
||||
musicNight = S(140195397978848, 0.3), -- Moonlit Meadow Whisper
|
||||
-- окружение (петли)
|
||||
birdsLake = S(9112877174, 0.35), -- Squam Lake 1
|
||||
birdsPark = S(9113444360, 0.25), -- Birds Park 2
|
||||
birdsJungle = S(9114892930, 0.3), -- Jungle Birds Ambience 3
|
||||
crickets = S(9112764573, 0.3), -- Crickets Night 3
|
||||
lakeWater = S(9116203162, 0.25), -- Lake Lap Water Movement 2
|
||||
wind = S(9113286782, 0.18), -- Barstow Wind Light Blustery Low Howl 1
|
||||
rainLight = S(9112852668, 0.45), -- Rain Continuous Drizzle 1
|
||||
rainHeavy = S(9112853287, 0.55), -- Rain Heavy 1
|
||||
fire = S(9112780193, 0.6, { roll = 30 }), -- Fireplace Constant Burning Flame 1 (слышно у костра)
|
||||
thunder = { "rbxassetid://9116282875", "rbxassetid://9116282646", "rbxassetid://9116282791", "rbxassetid://9116282544" },
|
||||
-- рыбалка
|
||||
cast = S(9120718279, 0.5, { pitch = { 0.9, 1.1 } }), -- Whoosh Fast Swish By 1
|
||||
bite = S(9112751536, 0.7, { pitch = { 0.9, 1.15 } }), -- Bubble Bloop High Pitched Cute 1
|
||||
reel = S(9114454019, 0.4), -- Fishing Reel 4 (петля, пока тянешь)
|
||||
catchSplash = S(9119293555, 0.6), -- Small Splash Shallow Water
|
||||
catch = S(9126073001, 0.5), -- Bell Tone Ding
|
||||
fanfare = S(1836473422, 0.45), -- Victory Fanfare Sting (редкая рыба)
|
||||
sparkle = S(9114369623, 0.5), -- Fairy Dust 1 (мутация)
|
||||
escape = S(9117944976, 0.5), -- Puddle Splash 2 (сорвалась)
|
||||
-- интерфейс
|
||||
click = S(15675032796, 0.5), -- Roblox_UI_Small_Click
|
||||
open = S(9117231552, 0.45), -- Paper Scroll Unroll Handle 4
|
||||
coins = S(9113849306, 0.6), -- Coins Or Keys Jingle 1
|
||||
chestHop = S(9120718279, 0.35, { pitch = { 0.7, 0.8 } }), -- Whoosh Fast Swish By 1 (сундук награды подпрыгивает)
|
||||
chestLand = S(9113769181, 0.7, { pitch = { 0.95, 1.05 } }), -- Chair Drop 2: тяжёлый деревянный удар о землю
|
||||
levelUp = S(1840525342, 0.5), -- Harp Glissando (A)
|
||||
quest = S(9126073318, 0.5), -- Bell Tone Ding 2
|
||||
}
|
||||
Config.DefaultVolume = { music = 0.6, sfx = 0.8 }
|
||||
|
||||
---------------------------------------------------------------- донат (Robux)
|
||||
-- ВАЖНО: впиши сюда ID своих пропусков и товаров с create.roblox.com.
|
||||
-- Все товары — Developer Products игры (create.roblox.com → Monetization → Developer Products);
|
||||
-- id — Product ID оттуда, robux — цена для кнопки (должна совпадать с ценой в Roblox).
|
||||
-- Пропуска тоже Developer Products: покупаются один раз, сервер запоминает их в данных игрока навсегда.
|
||||
-- Пока id = 0, кнопка покупки покажет подсказку, что товар не настроен.
|
||||
Config.GamePasses = {
|
||||
{ key = "VIP", id = 0, robux = 199, icon = "👑", name = "VIP", desc = "+25% удачи и монет, корона над головой" },
|
||||
{ key = "DoubleCoins", id = 0, robux = 299, icon = "💰", name = "x2 Монеты", desc = "Вся рыба продаётся в 2 раза дороже" },
|
||||
{ key = "LuckyCharm", id = 0, robux = 349, icon = "🍀", name = "Талисман удачи", desc = "+50% удачи навсегда" },
|
||||
{ key = "BigBag", id = 0, robux = 149, icon = "🎒", name = "Бездонная сумка", desc = "+100 мест в любой сумке" },
|
||||
{ key = "VIP", id = 3728143641, robux = 199, icon = "👑", name = "VIP", desc = "+25% удачи и серебра, корона над головой" },
|
||||
{ key = "DoubleCoins", id = 3728143692, robux = 299, icon = "⚪", name = "x2 Серебро", desc = "Вся рыба продаётся в 2 раза дороже" },
|
||||
{ key = "LuckyCharm", id = 3728143735, robux = 349, icon = "🍀", name = "Талисман удачи", desc = "+50% удачи навсегда" },
|
||||
{ key = "BigBag", id = 3728143773, robux = 149, icon = "🎒", name = "Бездонная сумка", desc = "+100 мест в любой сумке" },
|
||||
}
|
||||
Config.Products = {
|
||||
{ key = "Coins1", id = 0, robux = 49, icon = "🪙", name = "Мешок монет", desc = "+1 000 монет (больше с уровнем)", coins = 1000 },
|
||||
{ key = "Coins2", id = 0, robux = 199, icon = "💰", name = "Сундук монет", desc = "+5 000 монет (больше с уровнем)", coins = 5000 },
|
||||
{ key = "Coins3", id = 0, robux = 599, icon = "🏆", name = "Гора золота", desc = "+20 000 монет (больше с уровнем)", coins = 20000 },
|
||||
{ key = "Luck", id = 0, robux = 99, icon = "🧪", name = "Супер-зелье удачи", desc = "+200% удачи на 15 минут", boost = 2.0, duration = 900 },
|
||||
{ key = "Coins1", id = 3728142264, robux = 49, icon = "👝", name = "Кошель серебра", desc = "+1 000 серебра (больше с уровнем)", coins = 1000 },
|
||||
{ key = "Coins2", id = 3728142848, robux = 199, icon = "⚪", name = "Сундук серебра", desc = "+5 000 серебра (больше с уровнем)", coins = 5000 },
|
||||
{ key = "Coins3", id = 3728142885, robux = 599, icon = "🏆", name = "Гора золота", desc = "+20 000 серебра (больше с уровнем)", coins = 20000 },
|
||||
{ key = "Luck", id = 3728142916, robux = 99, icon = "🧪", name = "Супер-зелье удачи", desc = "+200% удачи на 15 минут", boost = 2.0, duration = 900 },
|
||||
}
|
||||
|
||||
---------------------------------------------------------------- рыбалка
|
||||
@@ -454,8 +587,105 @@ Config.TutorialDone = 4
|
||||
function Config.HitsNeeded(rank)
|
||||
return math.ceil(rank / 2)
|
||||
end
|
||||
-- опыт до следующего уровня: до 8-го ≈ 3 600 (1,5–2 часа вместе с заказами гильдии);
|
||||
-- у старых сохранений уровень не понижается — копится только опыт внутри уровня
|
||||
function Config.XPForLevel(level)
|
||||
return 60 + level * 60
|
||||
return math.floor(50 * level ^ 1.6)
|
||||
end
|
||||
|
||||
---------------------------------------------------------------- гильдия рыбаков
|
||||
-- три валюты: серебро (coins в данных), жемчуг (pearls), печати гильдии (seals — копятся для ранга)
|
||||
Config.Pearls = {
|
||||
mutation = { Shiny = 1, Golden = 3, Rainbow = 10 }, -- за пойманную рыбу с мутацией
|
||||
boss = 5, -- за победу над боссом
|
||||
daily7 = 5, -- 7-й день ежедневной награды
|
||||
rankUp = 10, -- за новый ранг
|
||||
}
|
||||
|
||||
-- ранги: seals — сколько печатей нужно накопить, trial — испытание у Старейшины,
|
||||
-- orders — заказов на доске, traps — ловушек, discount — скидка у торговцев
|
||||
-- trial.kind: deliver (сдать рыбу из сумки), catch (поймать с условием), bossWin (участие в победе над боссом),
|
||||
-- dex (собрать коллекцию мира)
|
||||
Config.Guild = {
|
||||
elder = "Старейшина Ворон",
|
||||
ranks = {
|
||||
{ id = "F", name = "Ученик", seals = 0, orders = 3, color = Color3.fromRGB(150, 150, 150),
|
||||
unlocks = "Мир 1, доска заказов" },
|
||||
{ id = "E", name = "Подмастерье", seals = 30, orders = 4, color = Color3.fromRGB(90, 190, 90), auto = true,
|
||||
trial = { kind = "deliver", fish = "Okun", count = 5, text = "Сдать 5 окуней" },
|
||||
unlocks = "🎣 Автоловля, 4-й заказ на доске" },
|
||||
{ id = "D", name = "Рыбак", seals = 120, orders = 4, color = Color3.fromRGB(70, 130, 230), auto = true, traps = 1,
|
||||
trial = { kind = "catch", minRank = 3, weathers = { Rain = true, Storm = true }, count = 1, text = "Поймать «Редкую» рыбу в дождь или грозу" },
|
||||
unlocks = "🏝 Мир 2 (и ур. 8), 🧺 ловушка" },
|
||||
{ id = "C", name = "Опытный рыбак", seals = 350, orders = 4, color = Color3.fromRGB(150, 80, 200), auto = true, traps = 2, discount = 0.05,
|
||||
trial = { kind = "bossWin", count = 1, text = "Помочь одолеть босса озера" },
|
||||
unlocks = "🧺 2 ловушки, скидка у торговцев 5%" },
|
||||
{ id = "B", name = "Мастер", seals = 900, orders = 4, color = Color3.fromRGB(200, 50, 45), auto = true, traps = 3, discount = 0.05,
|
||||
trial = { kind = "dex", world = "World1", text = "Собрать всю коллекцию «Тихого озера»" },
|
||||
unlocks = "❄ Мир 3 (и ур. 18), 🧺 3 ловушки" },
|
||||
{ id = "A", name = "Магистр", seals = 2000, orders = 4, color = Color3.fromRGB(230, 180, 60), auto = true, traps = 3, discount = 0.10,
|
||||
trial = { kind = "catch", minRank = 4, night = true, count = 1, text = "Поймать «Эпическую» рыбу ночью" },
|
||||
unlocks = "Титул «Магистр», скидка 10%" },
|
||||
{ id = "S", name = "Легенда", seals = 4500, orders = 4, color = Color3.fromRGB(255, 120, 200), auto = true, traps = 3, discount = 0.10, autoNoCap = true,
|
||||
trial = { kind = "catch", minRank = 6, count = 1, text = "Поймать «Мифическую» рыбу" },
|
||||
unlocks = "Золотой жетон, автоловля без ограничения редкости" },
|
||||
},
|
||||
-- миры требуют и уровень, и ранг (номер в списке ranks)
|
||||
worldRank = { World2 = 3, World3 = 5 },
|
||||
elderDistance = 22, -- взять испытание / сдать рыбу — рядом со Старейшиной или доской
|
||||
}
|
||||
|
||||
-- заказы гильдии: личные, обновляются каждые period секунд (окно floor(os.time()/period)),
|
||||
-- один заказ можно перебросить за rerollPearls жемчуга. Награда растёт с рангом
|
||||
Config.Orders = {
|
||||
period = 10800,
|
||||
rerollPearls = 2,
|
||||
pearlChance = 0.2, pearlsMin = 1, pearlsMax = 3,
|
||||
coinsPerSeal = 12, -- серебро за заказ = печати × это × (1 + 0.5 · (ранг − 1))
|
||||
-- weight — как часто выпадает; seals — печати {мин, макс}
|
||||
kinds = {
|
||||
deliver = { weight = 3, seals = { 5, 12 } },
|
||||
heavy = { weight = 2, seals = { 8, 16 } },
|
||||
weather = { weight = 1, seals = { 10, 20 } },
|
||||
night = { weight = 1, seals = { 10, 22 } },
|
||||
combo = { weight = 2, seals = { 8, 18 } },
|
||||
perfect = { weight = 2, seals = { 6, 14 } },
|
||||
},
|
||||
}
|
||||
|
||||
-- наживка: 1 слот, 1 штука тратится на заброс. price — за пачку из pack штук; currency = "pearls" — за жемчуг
|
||||
Config.Baits = {
|
||||
{ id = "Worm", name = "Червь", icon = "🐛", price = 40, pack = 10, speed = 0.9, desc = "Клюёт на 10% быстрее" },
|
||||
{ id = "Larva", name = "Мотыль", icon = "🦐", price = 90, pack = 10, luck = 0.15, desc = "Удача +15%" },
|
||||
{ id = "Firefly", name = "Светлячок", icon = "✨", price = 120, pack = 10, nightLuck = 0.30, desc = "Ночью удача +30% (вместо +10%)" },
|
||||
{ id = "Blood", name = "Кровавая приманка", icon = "🩸", price = 400, pack = 10, rareWeight = 1.5, rank = 3, desc = "Редкие и выше попадаются в 1,5 раза чаще" },
|
||||
{ id = "Pearl", name = "Жемчужная блесна", icon = "🦪", price = 5, pack = 5, mutation = 2, currency = "pearls", desc = "Шанс мутаций ×2" },
|
||||
}
|
||||
|
||||
-- автоловля (с ранга E): сервер сам забрасывает и вытаскивает, но со штрафами
|
||||
Config.AutoFish = {
|
||||
luck = 0.6, -- удача ×0.6
|
||||
maxRarity = 3, -- не выше «Редкой» (ранг S снимает)
|
||||
slower = 1.5, -- каждая поимка на 50% дольше
|
||||
reel = 2.5, -- секунд «вываживания» вместо мини-игры
|
||||
}
|
||||
|
||||
-- ловушки-вентери (с ранга D): 1 рыба Мира 1 каждые every секунд, не больше max, копятся и офлайн
|
||||
Config.Traps = {
|
||||
every = 900, max = 16,
|
||||
world = "World1", rarities = { Common = 3, Uncommon = 1 }, -- вес редкостей
|
||||
}
|
||||
|
||||
-- отдых: пока игрока нет, копится двойной опыт — 1 минута за каждые perOffline минут офлайн, не больше max
|
||||
Config.Rest = { perOffline = 4, max = 3600, mult = 2 }
|
||||
|
||||
function Config.RankById(id)
|
||||
for i, r in ipairs(Config.Guild.ranks) do
|
||||
if r.id == id then
|
||||
return r, i
|
||||
end
|
||||
end
|
||||
return nil
|
||||
end
|
||||
|
||||
---------------------------------------------------------------- помощники
|
||||
|
||||
@@ -116,7 +116,7 @@ local function sparkles(parent, color, rate)
|
||||
end
|
||||
|
||||
---------------------------------------------------------------- удочки
|
||||
-- Рука в (0,0,0), удочка смотрит в -Z и изгибается вверх (+Y).
|
||||
-- Рука в (0,0,0), удочка смотрит в -Z почти прямо, кончик слегка провисает вниз (-Y).
|
||||
|
||||
local STYLES = {
|
||||
wood = { blank = C(125, 90, 60), mat = Enum.Material.Wood, grip = C(80, 55, 35), gripMat = Enum.Material.Fabric, wrap = C(175, 175, 175), reel = C(95, 95, 100) },
|
||||
@@ -177,8 +177,8 @@ function M.buildRod(rodId, upgradeLevel, anchored)
|
||||
cyl(model, V(0.24, -0.68, -0.58), V(0.5, -0.86, -0.58), 0.07, { Color = st.reel, Material = METAL })
|
||||
ball(model, V(0.54, -0.9, -0.5), 0.19, { Color = st.grip, Material = SP })
|
||||
|
||||
-- бланк: 8 колен с плавным изгибом и шарами на стыках
|
||||
local angles = { 6, 9, 12, 16, 20, 25, 30, 36 }
|
||||
-- бланк: 8 колен, почти прямой, к кончику плавно провисает; шары на стыках
|
||||
local angles = { 0, -1, -2, -3, -5, -7, -9, -12 }
|
||||
local lengths = { 1.2, 1.15, 1.1, 1.0, 0.95, 0.9, 0.85, 0.8 }
|
||||
local p = V(0, 0, -1.55)
|
||||
local lastSeg
|
||||
|
||||
@@ -14,11 +14,57 @@ local Debris = game:GetService("Debris")
|
||||
|
||||
local Config = require(ReplicatedStorage:WaitForChild("FishConfig"))
|
||||
local Models = require(ReplicatedStorage:WaitForChild("GameModels"))
|
||||
local Guild = require(script.Parent:WaitForChild("Guild"))
|
||||
|
||||
local remote = ReplicatedStorage:FindFirstChild("GameEvent") or Instance.new("RemoteEvent")
|
||||
remote.Name = "GameEvent"
|
||||
remote.Parent = ReplicatedStorage
|
||||
|
||||
---------------------------------------------------------------- лента активности
|
||||
-- события для всех игроков (FishingClient показывает их в ленте и крупным баннером для редкого улова);
|
||||
-- самые редкие уловы уходят и на другие серверы игры через MessagingService (Config.Feed)
|
||||
local MessagingService = game:GetService("MessagingService")
|
||||
local FEED_TOPIC = "FishFeed"
|
||||
|
||||
local function feed(kind, info)
|
||||
remote:FireAllClients("Feed", kind, info)
|
||||
end
|
||||
|
||||
-- подписка — в фоне: SubscribeAsync ждёт ответа сервиса (в неопубликованном плейсе — долго),
|
||||
-- а скрипт должен сразу дойти до загрузки игроков, телепортов и остального
|
||||
task.spawn(function()
|
||||
pcall(function()
|
||||
MessagingService:SubscribeAsync(FEED_TOPIC, function(msg)
|
||||
local d = msg.Data
|
||||
if type(d) == "table" and d.jobId ~= game.JobId then
|
||||
d.remote = true -- улов на другом сервере
|
||||
feed("catch", d)
|
||||
end
|
||||
end)
|
||||
end)
|
||||
end)
|
||||
|
||||
-- улов в ленту; big — крупный баннер со звуком у всех, global — ещё и на другие серверы
|
||||
local function feedCatch(player, fish, world)
|
||||
local r = Config.Rarities[fish.rarity]
|
||||
local F = Config.Feed
|
||||
local info = {
|
||||
name = player.DisplayName, userId = player.UserId,
|
||||
fish = fish.name, rarity = fish.rarity, mutation = fish.mutation, value = fish.value,
|
||||
world = world and (world.icon .. " " .. world.name) or nil,
|
||||
big = r.rank >= F.announceRank or F.announceMutations[fish.mutation or ""] == true,
|
||||
}
|
||||
feed("catch", info)
|
||||
if r.rank >= F.globalRank or F.globalMutations[fish.mutation or ""] then
|
||||
info.jobId = game.JobId
|
||||
task.spawn(function()
|
||||
pcall(function()
|
||||
MessagingService:PublishAsync(FEED_TOPIC, info)
|
||||
end)
|
||||
end)
|
||||
end
|
||||
end
|
||||
|
||||
local rng = Random.new()
|
||||
local GOLD = Color3.fromRGB(255, 220, 80)
|
||||
local RED = Color3.fromRGB(255, 120, 120)
|
||||
@@ -45,6 +91,11 @@ local function defaultData()
|
||||
chain = { index = 1, step = 1, progress = 0, tier = 0 }, daily = { last = 0, streak = 0 },
|
||||
boostUntil = 0, boostBonus = 0,
|
||||
totalCaught = 0, nextUid = 1, receipts = {},
|
||||
passes = {}, -- купленные пропуска (Developer Products): [key] = true
|
||||
coinsEarned = 0, robuxSpent = 0, -- для досок лидеров: всего выручено за рыбу и потрачено Robux
|
||||
settings = { music = Config.DefaultVolume.music, sfx = Config.DefaultVolume.sfx },
|
||||
-- гильдия: жемчуг, печати, отдых (ранг, заказы, наживку, ловушки дополняет Guild.defaults)
|
||||
pearls = 0, seals = 0, rest = 0,
|
||||
}
|
||||
end
|
||||
|
||||
@@ -87,16 +138,12 @@ local function hasPass(player, key)
|
||||
return passes[player] ~= nil and passes[player][key] == true
|
||||
end
|
||||
|
||||
local function loadPasses(player)
|
||||
-- пропуска продаются как Developer Products, поэтому владение хранится в данных игрока, а не в Roblox
|
||||
local function loadPasses(player, data)
|
||||
passes[player] = {}
|
||||
for _, gp in ipairs(Config.GamePasses) do
|
||||
if gp.id and gp.id > 0 then
|
||||
local ok, owns = pcall(function()
|
||||
return MarketplaceService:UserOwnsGamePassAsync(player.UserId, gp.id)
|
||||
end)
|
||||
if ok and owns then
|
||||
passes[player][gp.key] = true
|
||||
end
|
||||
if data.passes[gp.key] then
|
||||
passes[player][gp.key] = true
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -106,6 +153,17 @@ local function ev(field, default)
|
||||
return (currentEvent and currentEvent[field]) or default
|
||||
end
|
||||
|
||||
-- погода и время суток (их ведёт WeatherServer через атрибуты workspace)
|
||||
local function weather()
|
||||
return Config.WeatherById(workspace:GetAttribute("Weather"))
|
||||
end
|
||||
local function isNight()
|
||||
if not Config.DayNight.enabled then
|
||||
return false
|
||||
end
|
||||
return Config.IsNight(Config.ClockAt(workspace:GetServerTimeNow(), workspace:GetAttribute("DayStart")))
|
||||
end
|
||||
|
||||
---------------------------------------------------------------- расчёты
|
||||
|
||||
local function rodLevel(data, rodId)
|
||||
@@ -135,7 +193,7 @@ local function totalLuck(player, data)
|
||||
if hasPass(player, "LuckyCharm") then
|
||||
l += 0.5
|
||||
end
|
||||
return l + ev("luck", 0)
|
||||
return l + ev("luck", 0) + (weather().luck or 0) + (isNight() and Config.DayNight.nightLuck or 0)
|
||||
end
|
||||
|
||||
local function bagCapacity(player, data)
|
||||
@@ -265,14 +323,20 @@ local function updateStats(player)
|
||||
player:SetAttribute("BoostBonus", boostActive(data))
|
||||
player:SetAttribute("BoostLeft", math.max(0, data.boostUntil - os.time()))
|
||||
player:SetAttribute("TotalCaught", data.totalCaught)
|
||||
player:SetAttribute("CoinsEarned", data.coinsEarned)
|
||||
-- когда откроется следующая ежедневная награда (0 — уже доступна); по ней сундук в лобби прыгает только для тех,
|
||||
-- кому есть что забрать
|
||||
player:SetAttribute("DailyNextAt", data.daily.last >= today() and (data.daily.last + 1) * 86400 or 0)
|
||||
player:SetAttribute("RobuxSpent", data.robuxSpent)
|
||||
-- шаг обучения (линия-подсказка); у старых игроков без поля, уже ловивших рыбу, обучение пройдено
|
||||
player:SetAttribute("Tutorial", data.tutorial or (data.totalCaught > 0 and Config.TutorialDone or 0))
|
||||
player:SetAttribute("Mastery", masteryCount(data))
|
||||
player:SetAttribute("Passes", table.concat(ps, ","))
|
||||
Guild.attrs(player, data)
|
||||
|
||||
local ls = player:FindFirstChild("leaderstats")
|
||||
if ls then
|
||||
ls["Монеты"].Value = data.coins
|
||||
ls["Серебро"].Value = data.coins
|
||||
ls["Уровень"].Value = data.level
|
||||
ls["Улов"].Value = data.totalCaught
|
||||
end
|
||||
@@ -288,6 +352,7 @@ local function addXp(player, data, amount)
|
||||
end
|
||||
if leveled then
|
||||
notify(player, "⭐ Уровень " .. data.level .. "!", GOLD)
|
||||
feed("level", { name = player.DisplayName, userId = player.UserId, level = data.level })
|
||||
for _, w in ipairs(Config.Worlds) do
|
||||
if w.level == data.level and not w.soon then
|
||||
notify(player, "🌍 Открыт: " .. w.icon .. " " .. w.name, w.color)
|
||||
@@ -296,6 +361,11 @@ local function addXp(player, data, amount)
|
||||
end
|
||||
end
|
||||
|
||||
Guild.init({
|
||||
profiles = profiles, notify = notify, updateStats = updateStats, addXp = addXp, sendInventory = sendInventory,
|
||||
bagCapacity = bagCapacity, isNight = isNight, weather = weather, remote = remote,
|
||||
})
|
||||
|
||||
local function applyPotion(data, bonus, duration)
|
||||
data.boostBonus = math.max(boostActive(data), bonus)
|
||||
data.boostUntil = math.max(os.time(), data.boostUntil) + duration
|
||||
@@ -374,9 +444,13 @@ local function claimDaily(player)
|
||||
end
|
||||
end
|
||||
data.daily = { last = t, streak = streak }
|
||||
if streak == 7 then
|
||||
data.pearls += Config.Pearls.daily7
|
||||
extra ..= (" + %d 🦪"):format(Config.Pearls.daily7)
|
||||
end
|
||||
updateStats(player)
|
||||
sendQuests(player)
|
||||
notify(player, ("🎁 День %d: +%d 💰%s"):format(streak, coins, extra), GOLD)
|
||||
notify(player, ("🎁 День %d: +%d ⚪%s"):format(streak, coins, extra), GOLD)
|
||||
end
|
||||
|
||||
---------------------------------------------------------------- коллекция
|
||||
@@ -402,7 +476,7 @@ local function claimCollection(player, worldId, rarity)
|
||||
if rarity == "Master" then
|
||||
local coins = Config.MasteryCoins * world.mult
|
||||
data.coins += coins
|
||||
notify(player, ("🏆 «%s» собран! +%d 💰"):format(world.name, coins), GOLD)
|
||||
notify(player, ("🏆 «%s» собран! +%d ⚪"):format(world.name, coins), GOLD)
|
||||
else
|
||||
local r = Config.CollectionRewards[rarity]
|
||||
if not r then
|
||||
@@ -410,7 +484,7 @@ local function claimCollection(player, worldId, rarity)
|
||||
end
|
||||
data.coins += r.coins * world.mult
|
||||
addXp(player, data, r.xp * world.mult)
|
||||
notify(player, ("📖 +%d 💰 +%d XP"):format(r.coins * world.mult, r.xp * world.mult), GREEN)
|
||||
notify(player, ("📖 +%d ⚪ +%d XP"):format(r.coins * world.mult, r.xp * world.mult), GREEN)
|
||||
end
|
||||
updateStats(player)
|
||||
sendInventory(player)
|
||||
@@ -418,7 +492,7 @@ end
|
||||
|
||||
---------------------------------------------------------------- удочка, сумка, VIP на персонаже
|
||||
|
||||
local REST_ANGLE = 30
|
||||
local REST_ANGLE = 42 -- удочка в покое: рукоять под ~42° вверх-вперёд, кончик провисает до ~30°
|
||||
local function gripCF(angle)
|
||||
return (CFrame.Angles(math.rad(angle), 0, 0) * CFrame.new(0, 0, -0.3)):Inverse()
|
||||
end
|
||||
@@ -472,6 +546,7 @@ local function giveRodTool(player)
|
||||
local tool = Instance.new("Tool")
|
||||
tool.Name = rod.name .. (lvl > 0 and (" +" .. lvl) or "")
|
||||
tool.ToolTip = "Кликни у воды, чтобы закинуть"
|
||||
tool.TextureId = rod.icon or ""
|
||||
tool.CanBeDropped = false
|
||||
tool.Grip = gripCF(REST_ANGLE)
|
||||
tool:SetAttribute("IsRod", true)
|
||||
@@ -734,12 +809,19 @@ local function stopFishing(player, tellClient)
|
||||
end
|
||||
end
|
||||
|
||||
local function rollFish(player, data, worldId, luckMult)
|
||||
-- mods: { bait = наживка из Config.Baits, maxRank = потолок редкости (автоловля) }
|
||||
local function rollFish(player, data, worldId, luckMult, mods)
|
||||
local zone = Config.Zones[worldId]
|
||||
if not zone then
|
||||
return nil
|
||||
end
|
||||
local luck = totalLuck(player, data) * (luckMult or 1)
|
||||
mods = mods or {}
|
||||
local bait = mods.bait
|
||||
local base = totalLuck(player, data) + (bait and bait.luck or 0)
|
||||
if bait and bait.nightLuck and isNight() then
|
||||
base += bait.nightLuck - Config.DayNight.nightLuck -- светлячок: ночью +30% вместо обычных +10%
|
||||
end
|
||||
local luck = base * (luckMult or 1)
|
||||
local bonus = luck - 1
|
||||
local weights, total = {}, 0
|
||||
for i, f in ipairs(zone.fish) do
|
||||
@@ -748,6 +830,12 @@ local function rollFish(player, data, worldId, luckMult)
|
||||
if r.rank == 1 then
|
||||
w = r.weight / math.max(1, luck)
|
||||
end
|
||||
if bait and bait.rareWeight and r.rank >= 3 then
|
||||
w *= bait.rareWeight
|
||||
end
|
||||
if mods.maxRank and r.rank > mods.maxRank then
|
||||
w = 0
|
||||
end
|
||||
weights[i] = w
|
||||
total += w
|
||||
end
|
||||
@@ -762,7 +850,7 @@ local function rollFish(player, data, worldId, luckMult)
|
||||
end
|
||||
local mutation = nil
|
||||
for _, m in ipairs(Config.Mutations) do
|
||||
if rng:NextNumber() < m.chance * luck * ev("mutation", 1) then
|
||||
if rng:NextNumber() < m.chance * luck * ev("mutation", 1) * (weather().mutation or 1) * (bait and bait.mutation or 1) then
|
||||
mutation = m
|
||||
break
|
||||
end
|
||||
@@ -818,12 +906,21 @@ local function flyBobber(s, tool, target, dur, arc)
|
||||
end
|
||||
end
|
||||
|
||||
local autoFishing = {} -- [player] = токен работающей автоловли
|
||||
local setAutoFish, grantFish -- объявлены ниже
|
||||
|
||||
local function onCast(player, power)
|
||||
power = math.clamp(tonumber(power) or 0.6, 0, 1)
|
||||
local data = profiles[player]
|
||||
if not data then
|
||||
return
|
||||
end
|
||||
if autoFishing[player] then
|
||||
-- клик удочкой во время автоловли — выключить её
|
||||
setAutoFish(player, false)
|
||||
remote:FireClient(player, "CastFail")
|
||||
return
|
||||
end
|
||||
if fishing[player] then
|
||||
stopFishing(player, true)
|
||||
return
|
||||
@@ -856,7 +953,8 @@ local function onCast(player, power)
|
||||
|
||||
local stats = Config.RodStats(data.rod, rodLevel(data))
|
||||
local perfect = power >= Config.CastPerfect[1] and power <= Config.CastPerfect[2]
|
||||
local fish = rollFish(player, data, world.id, perfect and Config.CastPerfectLuck or 1)
|
||||
local bait = Guild.useBait(player, data) -- 1 штука наживки на заброс
|
||||
local fish = rollFish(player, data, world.id, perfect and Config.CastPerfectLuck or 1, { bait = bait })
|
||||
if not fish then
|
||||
remote:FireClient(player, "CastFail")
|
||||
return
|
||||
@@ -886,7 +984,7 @@ local function onCast(player, power)
|
||||
end
|
||||
s.stage = "waiting"
|
||||
|
||||
local waitTime = rng:NextNumber(Config.BiteTimeMin, Config.BiteTimeMax) * stats.speed * ev("speed", 1)
|
||||
local waitTime = rng:NextNumber(Config.BiteTimeMin, Config.BiteTimeMax) * stats.speed * ev("speed", 1) * (weather().speed or 1) * (bait and bait.speed or 1)
|
||||
task.wait(waitTime)
|
||||
if fishing[player] ~= s then
|
||||
return
|
||||
@@ -957,14 +1055,22 @@ local function onCatch(player, success, misses)
|
||||
return
|
||||
end
|
||||
gripSequence(tool, { { 85, 0.15 }, { REST_ANGLE, 0.45 } })
|
||||
grantFish(player, data, s.fish, { perfect = s.perfect, misses = misses, fromPos = fromPos })
|
||||
end
|
||||
|
||||
-- серия: каждая рыба подряд дороже и даёт больше опыта
|
||||
local fish = s.fish
|
||||
-- рыба поймана (руками или автоловлей): в сумку, опыт, коллекция, задания, гильдия, босс.
|
||||
-- ctx: { perfect, misses, fromPos, auto }; у автоловли нет серии и бонусов за точность
|
||||
grantFish = function(player, data, fish, ctx)
|
||||
local streak = combo[player] or 0
|
||||
local comboMult = math.min(Config.Combo.max, 1 + Config.Combo.step * streak)
|
||||
fish.value = math.floor(fish.value * comboMult + 0.5)
|
||||
fish.xp = math.floor(fish.xp * comboMult + 0.5)
|
||||
setCombo(player, streak + 1)
|
||||
local comboMult = 1
|
||||
if not ctx.auto then
|
||||
-- серия: каждая рыба подряд дороже и даёт больше опыта
|
||||
comboMult = math.min(Config.Combo.max, 1 + Config.Combo.step * streak)
|
||||
fish.value = math.floor(fish.value * comboMult + 0.5)
|
||||
fish.xp = math.floor(fish.xp * comboMult + 0.5)
|
||||
setCombo(player, streak + 1)
|
||||
end
|
||||
fish.xp = math.floor(fish.xp * Guild.xpMult(data)) -- бонус отдыха: двойной опыт
|
||||
table.insert(data.items, {
|
||||
uid = data.nextUid, id = fish.id, name = fish.name, rarity = fish.rarity,
|
||||
weight = fish.weight, value = fish.value, mutation = fish.mutation,
|
||||
@@ -987,10 +1093,14 @@ local function onCatch(player, success, misses)
|
||||
addXp(player, data, fish.xp * (isNew and 2 or 1))
|
||||
updateStats(player)
|
||||
sendInventory(player)
|
||||
if fromPos then
|
||||
showFishFlight(player, fish, fromPos)
|
||||
if ctx.fromPos then
|
||||
showFishFlight(player, fish, ctx.fromPos)
|
||||
end
|
||||
remote:FireClient(player, "Caught", fish, { new = isNew, record = isRecord, combo = comboMult, streak = ctx.auto and 0 or streak + 1, auto = ctx.auto })
|
||||
do
|
||||
local h = player.Character and player.Character:FindFirstChild("HumanoidRootPart")
|
||||
feedCatch(player, fish, h and Config.WorldAt(h.Position))
|
||||
end
|
||||
remote:FireClient(player, "Caught", fish, { new = isNew, record = isRecord, combo = comboMult, streak = streak + 1 })
|
||||
|
||||
local rank = Config.Rarities[fish.rarity].rank
|
||||
questProgress(player, "catch", 1)
|
||||
@@ -1000,16 +1110,160 @@ local function onCatch(player, success, misses)
|
||||
if rank >= 3 then
|
||||
questProgress(player, "rare", 1)
|
||||
end
|
||||
if misses == 0 then
|
||||
questProgress(player, "perfect", 1)
|
||||
if not ctx.auto then
|
||||
if ctx.misses == 0 then
|
||||
questProgress(player, "perfect", 1)
|
||||
end
|
||||
if ctx.perfect then
|
||||
questProgress(player, "perfectCast", 1)
|
||||
end
|
||||
questProgress(player, "combo", streak + 1, true)
|
||||
end
|
||||
if s.perfect then
|
||||
questProgress(player, "perfectCast", 1)
|
||||
end
|
||||
questProgress(player, "combo", streak + 1, true)
|
||||
Guild.onCatch(player, data, fish, {
|
||||
weather = workspace:GetAttribute("Weather"), night = isNight(),
|
||||
perfect = ctx.perfect and not ctx.auto, streak = (not ctx.auto) and streak + 1 or 0,
|
||||
})
|
||||
|
||||
local hrp = player.Character and player.Character:FindFirstChild("HumanoidRootPart")
|
||||
bossHit(player, hrp and Config.WorldAt(hrp.Position), rank + (misses == 0 and 1 or 0))
|
||||
bossHit(player, hrp and Config.WorldAt(hrp.Position), rank + (ctx.misses == 0 and 1 or 0))
|
||||
end
|
||||
|
||||
---------------------------------------------------------------- автоловля (с ранга E)
|
||||
-- сервер сам забрасывает и вытаскивает: удача ×0.6, не выше «Редкой», без серии и бонуса заброса,
|
||||
-- каждая поимка на 50% дольше. Стоп — полная сумка, отошёл от места, сменил мир, убрал удочку
|
||||
|
||||
local function autoFishLoop(player, token)
|
||||
local A = Config.AutoFish
|
||||
local home = nil -- где включили: отошёл дальше 10 studs или сменил мир — стоп
|
||||
local function stop(reason)
|
||||
if autoFishing[player] == token then
|
||||
setAutoFish(player, false, reason)
|
||||
end
|
||||
end
|
||||
while autoFishing[player] == token do
|
||||
local data = profiles[player]
|
||||
local char = player.Character
|
||||
local hrp = char and char:FindFirstChild("HumanoidRootPart")
|
||||
local tool = char and char:FindFirstChildOfClass("Tool")
|
||||
if not data or not hrp then
|
||||
return stop(nil)
|
||||
end
|
||||
if not tool or not tool:GetAttribute("IsRod") then
|
||||
return stop("🎣 Автоловля: возьми удочку в руки")
|
||||
end
|
||||
local world = Config.WorldAt(hrp.Position)
|
||||
if not world or Config.CanCastFrom(world, hrp.Position) ~= true then
|
||||
return stop("🌊 Автоловля: встань у воды")
|
||||
end
|
||||
home = home or { pos = hrp.Position, world = world.id }
|
||||
if world.id ~= home.world or (hrp.Position - home.pos).Magnitude > 10 then
|
||||
return stop("🎣 Автоловля остановлена: ты отошёл")
|
||||
end
|
||||
if #data.items >= bagCapacity(player, data) then
|
||||
return stop("🎒 Сумка полна — автоловля остановлена")
|
||||
end
|
||||
local target, dist = findWater(hrp, world, 0.6)
|
||||
if not target then
|
||||
return stop("🌊 Автоловля: встань у воды")
|
||||
end
|
||||
if fishing[player] then
|
||||
task.wait(0.5)
|
||||
continue
|
||||
end
|
||||
|
||||
local bait = Guild.useBait(player, data)
|
||||
local fish = rollFish(player, data, world.id, A.luck, { bait = bait, maxRank = (not Guild.rank(data).autoNoCap) and A.maxRarity or nil })
|
||||
local s = { stage = "casting", fish = fish, tool = tool, auto = true }
|
||||
fishing[player] = s
|
||||
local splashAt = target + Vector3.new(0, 0.15, 0)
|
||||
local tw = tweenGrip(tool, 8, 0.15)
|
||||
if tw then
|
||||
tw.Completed:Wait()
|
||||
end
|
||||
if fishing[player] == s then
|
||||
flyBobber(s, tool, splashAt, 0.35 + dist * 0.018, 2 + dist * 0.3)
|
||||
tweenGrip(tool, REST_ANGLE - 5, 0.4)
|
||||
end
|
||||
if fishing[player] ~= s then
|
||||
if s.bobber then
|
||||
s.bobber:Destroy()
|
||||
end
|
||||
continue
|
||||
end
|
||||
s.stage = "waiting"
|
||||
local stats = Config.RodStats(data.rod, rodLevel(data))
|
||||
local waitTime = rng:NextNumber(Config.BiteTimeMin, Config.BiteTimeMax) * stats.speed * ev("speed", 1)
|
||||
* (weather().speed or 1) * (bait and bait.speed or 1) * A.slower
|
||||
local t0, bit = os.clock(), false
|
||||
while fishing[player] == s and autoFishing[player] == token and os.clock() - t0 < waitTime + A.reel do
|
||||
local h = player.Character and player.Character:FindFirstChild("HumanoidRootPart")
|
||||
if not h or (h.Position - home.pos).Magnitude > 10 then
|
||||
break
|
||||
end
|
||||
if not bit and os.clock() - t0 >= waitTime then
|
||||
-- клюёт: всплеск и удочка дёргается до конца «вываживания»
|
||||
bit = true
|
||||
if s.bobber and s.bobber.PrimaryPart then
|
||||
splash(s.bobber.PrimaryPart, 25)
|
||||
playSound(s.bobber.PrimaryPart, SPLASH_SOUND, 0.35)
|
||||
end
|
||||
end
|
||||
if bit then
|
||||
tweenGrip(tool, (math.floor(os.clock() * 8) % 2 == 0) and 38 or 18, 0.12)
|
||||
end
|
||||
task.wait(0.13)
|
||||
end
|
||||
if fishing[player] ~= s or autoFishing[player] ~= token or not bit or os.clock() - t0 < waitTime + A.reel - 0.05 then
|
||||
if fishing[player] == s then
|
||||
stopFishing(player, false)
|
||||
end
|
||||
continue -- наверху цикла проверим, почему прервались (отошёл, выключил)
|
||||
end
|
||||
fishing[player] = nil
|
||||
local fromPos = s.bobber and s.bobber.PrimaryPart and s.bobber.PrimaryPart.Position
|
||||
if s.bobber then
|
||||
s.bobber:Destroy()
|
||||
end
|
||||
gripSequence(tool, { { 85, 0.15 }, { REST_ANGLE, 0.45 } })
|
||||
grantFish(player, data, fish, { auto = true, fromPos = fromPos })
|
||||
task.wait(1.2)
|
||||
end
|
||||
end
|
||||
|
||||
setAutoFish = function(player, on, reason)
|
||||
local data = profiles[player]
|
||||
if on then
|
||||
if not data then
|
||||
return
|
||||
end
|
||||
if not Guild.rank(data).auto then
|
||||
notify(player, "🔒 Автоловля — с ранга гильдии E", RED)
|
||||
player:SetAttribute("AutoFish", false)
|
||||
return
|
||||
end
|
||||
if autoFishing[player] then
|
||||
return
|
||||
end
|
||||
if fishing[player] then
|
||||
stopFishing(player, true)
|
||||
end
|
||||
local token = {}
|
||||
autoFishing[player] = token
|
||||
player:SetAttribute("AutoFish", true)
|
||||
notify(player, "🎣 Автоловля включена", GREEN)
|
||||
task.spawn(autoFishLoop, player, token)
|
||||
else
|
||||
player:SetAttribute("AutoFish", false)
|
||||
if not autoFishing[player] then
|
||||
return
|
||||
end
|
||||
autoFishing[player] = nil
|
||||
local s = fishing[player]
|
||||
if s and s.auto then
|
||||
stopFishing(player, false)
|
||||
end
|
||||
notify(player, reason or "🎣 Автоловля выключена", Color3.fromRGB(255, 200, 120))
|
||||
end
|
||||
end
|
||||
|
||||
---------------------------------------------------------------- скупка
|
||||
@@ -1062,6 +1316,7 @@ local function sellItems(player, filterUid)
|
||||
end
|
||||
data.items = keep
|
||||
data.coins += total
|
||||
data.coinsEarned += total
|
||||
updateStats(player)
|
||||
sendInventory(player)
|
||||
remote:FireClient(player, "Sold", total, count)
|
||||
@@ -1086,9 +1341,9 @@ local function buy(player, kind, id)
|
||||
notify(player, "★★★★★ Максимум", GOLD)
|
||||
return
|
||||
end
|
||||
local cost = Config.UpgradeCost(rod, lvl)
|
||||
local cost = Guild.price(data, Config.UpgradeCost(rod, lvl)) -- скидка ранга гильдии
|
||||
if data.coins < cost then
|
||||
notify(player, "Нужно " .. cost .. " 💰", RED)
|
||||
notify(player, "Нужно " .. cost .. " ⚪", RED)
|
||||
return
|
||||
end
|
||||
data.coins -= cost
|
||||
@@ -1111,11 +1366,12 @@ local function buy(player, kind, id)
|
||||
notify(player, "🔒 Нужен ур. " .. potion.level, RED)
|
||||
return
|
||||
end
|
||||
if data.coins < potion.price then
|
||||
notify(player, "Нужно " .. potion.price .. " 💰", RED)
|
||||
local price = Guild.price(data, potion.price)
|
||||
if data.coins < price then
|
||||
notify(player, "Нужно " .. price .. " ⚪", RED)
|
||||
return
|
||||
end
|
||||
data.coins -= potion.price
|
||||
data.coins -= price
|
||||
applyPotion(data, potion.bonus, potion.duration)
|
||||
updateStats(player)
|
||||
notify(player, ("🍀 +%d%% удачи, %d мин"):format(potion.bonus * 100, potion.duration / 60), GREEN)
|
||||
@@ -1140,11 +1396,12 @@ local function buy(player, kind, id)
|
||||
notify(player, "🔒 Нужен ур. " .. item.level, RED)
|
||||
return
|
||||
end
|
||||
if data.coins < item.price then
|
||||
notify(player, "Нужно " .. item.price .. " 💰", RED)
|
||||
local price = Guild.price(data, item.price)
|
||||
if data.coins < price then
|
||||
notify(player, "Нужно " .. price .. " ⚪", RED)
|
||||
return
|
||||
end
|
||||
data.coins -= item.price
|
||||
data.coins -= price
|
||||
owned[id] = true
|
||||
bought = true
|
||||
notify(player, "✅ " .. item.name, GREEN)
|
||||
@@ -1193,6 +1450,11 @@ local function teleportTo(player, worldId)
|
||||
notify(player, ("🔒 %s: ур. %d"):format(world.name, world.level), RED)
|
||||
return
|
||||
end
|
||||
local okRank, why = Guild.canEnter(data, world.id)
|
||||
if not okRank then
|
||||
notify(player, why, RED)
|
||||
return
|
||||
end
|
||||
markerName = world.id .. "Spawn"
|
||||
end
|
||||
local map = workspace:FindFirstChild("FishingMap")
|
||||
@@ -1256,6 +1518,10 @@ ProximityPromptService.PromptTriggered:Connect(function(prompt, player)
|
||||
remote:FireClient(player, "OpenRobux", "passes")
|
||||
elseif action == "RobuxProducts" then
|
||||
remote:FireClient(player, "OpenRobux", "products")
|
||||
elseif action == "Guild" or action == "Orders" or action == "Bait" or action == "Traps" then
|
||||
-- Старейшина, доска заказов, лавка наживки: окно гильдии на нужной вкладке
|
||||
Guild.sendState(player)
|
||||
remote:FireClient(player, "OpenGuild", ({ Guild = "rank", Orders = "orders", Bait = "bait", Traps = "traps" })[action])
|
||||
end
|
||||
end)
|
||||
|
||||
@@ -1285,13 +1551,13 @@ remote.OnServerEvent:Connect(function(player, action, a, b)
|
||||
if nearSeller(player) then
|
||||
sellItems(player, a)
|
||||
else
|
||||
notify(player, "💰 Только у скупщика", Color3.fromRGB(255, 200, 120))
|
||||
notify(player, "⚪ Только у скупщика", Color3.fromRGB(255, 200, 120))
|
||||
end
|
||||
elseif action == "SellAll" then
|
||||
if nearSeller(player) then
|
||||
sellItems(player, nil)
|
||||
else
|
||||
notify(player, "💰 Только у скупщика", Color3.fromRGB(255, 200, 120))
|
||||
notify(player, "⚪ Только у скупщика", Color3.fromRGB(255, 200, 120))
|
||||
end
|
||||
elseif action == "Teleport" then
|
||||
teleportTo(player, a)
|
||||
@@ -1302,27 +1568,38 @@ remote.OnServerEvent:Connect(function(player, action, a, b)
|
||||
elseif action == "RequestInventory" then
|
||||
sendInventory(player)
|
||||
sendQuests(player)
|
||||
elseif action == "Settings" then
|
||||
-- громкость музыки и эффектов (0..1), сохраняется вместе с прогрессом
|
||||
local data = profiles[player]
|
||||
local music, sfx = tonumber(a), tonumber(b)
|
||||
if data and music and sfx then
|
||||
data.settings = { music = math.clamp(music, 0, 1), sfx = math.clamp(sfx, 0, 1) }
|
||||
player:SetAttribute("VolMusic", data.settings.music)
|
||||
player:SetAttribute("VolSfx", data.settings.sfx)
|
||||
end
|
||||
elseif action == "AutoFish" then
|
||||
setAutoFish(player, a == true)
|
||||
else
|
||||
Guild.onAction(player, action, a, b)
|
||||
end
|
||||
end)
|
||||
|
||||
---------------------------------------------------------------- донат
|
||||
|
||||
MarketplaceService.PromptGamePassPurchaseFinished:Connect(function(player, passId, purchased)
|
||||
if not purchased then
|
||||
return
|
||||
end
|
||||
for _, gp in ipairs(Config.GamePasses) do
|
||||
if gp.id == passId then
|
||||
passes[player] = passes[player] or {}
|
||||
passes[player][gp.key] = true
|
||||
notify(player, "✅ " .. gp.icon .. " " .. gp.name, GOLD)
|
||||
if gp.key == "VIP" then
|
||||
vipTag(player)
|
||||
end
|
||||
updateStats(player)
|
||||
-- все покупки — Developer Products: и наборы (Config.Products), и пропуска навсегда (Config.GamePasses)
|
||||
local function findProduct(productId)
|
||||
for _, p in ipairs(Config.Products) do
|
||||
if p.id == productId then
|
||||
return p, false
|
||||
end
|
||||
end
|
||||
end)
|
||||
for _, gp in ipairs(Config.GamePasses) do
|
||||
if gp.id == productId then
|
||||
return gp, true
|
||||
end
|
||||
end
|
||||
return nil
|
||||
end
|
||||
|
||||
MarketplaceService.ProcessReceipt = function(info)
|
||||
local player = Players:GetPlayerByUserId(info.PlayerId)
|
||||
@@ -1335,19 +1612,26 @@ MarketplaceService.ProcessReceipt = function(info)
|
||||
return Enum.ProductPurchaseDecision.PurchaseGranted
|
||||
end
|
||||
end
|
||||
local product
|
||||
for _, p in ipairs(Config.Products) do
|
||||
if p.id == info.ProductId then
|
||||
product = p
|
||||
end
|
||||
end
|
||||
local product, isPass = findProduct(info.ProductId)
|
||||
if not product then
|
||||
warn("ProcessReceipt: неизвестный товар " .. tostring(info.ProductId))
|
||||
return Enum.ProductPurchaseDecision.NotProcessedYet
|
||||
end
|
||||
data.robuxSpent += info.CurrencySpent or product.robux or 0
|
||||
feed("buy", { name = player.DisplayName, userId = player.UserId, item = product.icon .. " " .. product.name })
|
||||
if isPass then
|
||||
data.passes[product.key] = true
|
||||
passes[player] = passes[player] or {}
|
||||
passes[player][product.key] = true
|
||||
notify(player, "✅ " .. product.icon .. " " .. product.name .. " — навсегда!", GOLD)
|
||||
if product.key == "VIP" then
|
||||
vipTag(player)
|
||||
end
|
||||
end
|
||||
if product.coins then
|
||||
local coins = math.floor(product.coins * (1 + (data.level - 1) * 0.15))
|
||||
data.coins += coins
|
||||
notify(player, ("Спасибо! +%d 💰"):format(coins), GOLD)
|
||||
notify(player, ("Спасибо! +%d ⚪"):format(coins), GOLD)
|
||||
end
|
||||
if product.boost then
|
||||
applyPotion(data, product.boost, product.duration)
|
||||
@@ -1432,6 +1716,7 @@ local function finishBoss(won)
|
||||
if potion then
|
||||
applyPotion(data, potion.bonus, potion.duration)
|
||||
end
|
||||
Guild.onBossWin(p, data)
|
||||
updateStats(p)
|
||||
remote:FireClient(p, "BossReward", coins, xp, potion and potion.name)
|
||||
end
|
||||
@@ -1486,10 +1771,13 @@ end)
|
||||
---------------------------------------------------------------- игроки
|
||||
|
||||
local function onPlayerAdded(player)
|
||||
-- камеру нельзя отвести так далеко, чтобы заглянуть за скалы и край карты
|
||||
player.CameraMinZoomDistance = Config.Camera.minZoom
|
||||
player.CameraMaxZoomDistance = Config.Camera.maxZoom
|
||||
local ls = Instance.new("Folder")
|
||||
ls.Name = "leaderstats"
|
||||
ls.Parent = player
|
||||
for _, name in ipairs({ "Монеты", "Уровень", "Улов" }) do
|
||||
for _, name in ipairs({ "Серебро", "Уровень", "Улов" }) do
|
||||
local v = Instance.new("IntValue")
|
||||
v.Name = name
|
||||
v.Parent = ls
|
||||
@@ -1499,13 +1787,19 @@ local function onPlayerAdded(player)
|
||||
if not player.Parent then
|
||||
return
|
||||
end
|
||||
loadPasses(player)
|
||||
loadPasses(player, data)
|
||||
ensureChain(data)
|
||||
Guild.defaults(data)
|
||||
Guild.onJoin(player, data)
|
||||
profiles[player] = data
|
||||
loadedOk[player] = ok
|
||||
local settings = type(data.settings) == "table" and data.settings or {}
|
||||
player:SetAttribute("VolMusic", tonumber(settings.music) or Config.DefaultVolume.music)
|
||||
player:SetAttribute("VolSfx", tonumber(settings.sfx) or Config.DefaultVolume.sfx)
|
||||
updateStats(player)
|
||||
sendInventory(player)
|
||||
sendQuests(player)
|
||||
Guild.sendState(player)
|
||||
|
||||
local function onCharacter()
|
||||
stopFishing(player, false)
|
||||
@@ -1513,6 +1807,7 @@ local function onPlayerAdded(player)
|
||||
giveRodTool(player)
|
||||
attachBag(player)
|
||||
vipTag(player)
|
||||
Guild.badge(player)
|
||||
end
|
||||
player.CharacterAdded:Connect(onCharacter)
|
||||
if player.Character then
|
||||
@@ -1528,6 +1823,10 @@ end
|
||||
Players.PlayerRemoving:Connect(function(player)
|
||||
stopFishing(player, false)
|
||||
combo[player], comboUntil[player] = nil, nil
|
||||
autoFishing[player] = nil
|
||||
if profiles[player] then
|
||||
Guild.onLeave(profiles[player])
|
||||
end
|
||||
saveData(player)
|
||||
profiles[player] = nil
|
||||
loadedOk[player] = nil
|
||||
@@ -1536,21 +1835,42 @@ end)
|
||||
|
||||
game:BindToClose(function()
|
||||
for _, p in ipairs(Players:GetPlayers()) do
|
||||
if profiles[p] then
|
||||
Guild.onLeave(profiles[p])
|
||||
end
|
||||
saveData(p)
|
||||
end
|
||||
end)
|
||||
|
||||
-- погода и ночь меняют удачу: пересчитываем её у всех, когда они меняются
|
||||
local function refreshAllStats()
|
||||
for _, p in ipairs(Players:GetPlayers()) do
|
||||
updateStats(p)
|
||||
end
|
||||
end
|
||||
workspace:GetAttributeChangedSignal("Weather"):Connect(refreshAllStats)
|
||||
|
||||
-- таймер зелий + автосохранение
|
||||
task.spawn(function()
|
||||
local t = 0
|
||||
local wasNight = isNight()
|
||||
while true do
|
||||
task.wait(1)
|
||||
t += 1
|
||||
local night = isNight()
|
||||
if night ~= wasNight then
|
||||
wasNight = night
|
||||
refreshAllStats()
|
||||
end
|
||||
for _, p in ipairs(Players:GetPlayers()) do
|
||||
local data = profiles[p]
|
||||
if data and data.boostUntil > os.time() - 2 then
|
||||
updateStats(p)
|
||||
end
|
||||
-- бонус отдыха тратится, пока игрок рыбачит
|
||||
if data and (fishing[p] or autoFishing[p]) then
|
||||
Guild.spendRest(p, data, 1)
|
||||
end
|
||||
-- серия сгорает, если долго нет улова (пока рыба на крючке — ждём)
|
||||
if comboUntil[p] and os.time() > comboUntil[p] and not fishing[p] then
|
||||
breakCombo(p)
|
||||
|
||||
File diff suppressed because it is too large.
Load diff
@@ -701,6 +701,125 @@ function Builder.stallParts(cf, parent)
|
||||
return list
|
||||
end
|
||||
|
||||
-- Доска лидеров (low poly): два столба, двускатная крыша, табличка с названием, фонарики и экран на rows строк.
|
||||
-- cf стоит на полу и смотрит LookVector на зрителей. Строки Row1…RowN заполняет Leaderboards.server.lua.
|
||||
function Builder.leaderboard(cf, board, rows, parent)
|
||||
local model = Instance.new("Model")
|
||||
model.Name = "Leaderboard_" .. board.id
|
||||
model:SetAttribute("Leaderboard", board.id)
|
||||
local function part(props)
|
||||
local p = Instance.new(props.Class or "Part")
|
||||
p.Anchored = true
|
||||
p.TopSurface, p.BottomSurface = Enum.SurfaceType.Smooth, Enum.SurfaceType.Smooth
|
||||
p.Material = Enum.Material.SmoothPlastic
|
||||
for k, v in pairs(props) do
|
||||
if k ~= "Class" and k ~= "At" then
|
||||
p[k] = v
|
||||
end
|
||||
end
|
||||
p.CFrame = cf * props.At
|
||||
p.Parent = model
|
||||
return p
|
||||
end
|
||||
local WOOD, DARK, TRIM = Color3.fromRGB(122, 82, 50), Color3.fromRGB(58, 38, 26), Color3.fromRGB(176, 122, 66)
|
||||
for _, s in ipairs({ -1, 1 }) do
|
||||
part({ Name = "Foot", Size = V(2.2, 1, 2.2), At = CFrame.new(s * 6.6, 0.5, 0), Color = Color3.fromRGB(128, 118, 122) })
|
||||
part({ Name = "Post", Size = V(1.3, 16.5, 1.3), At = CFrame.new(s * 6.6, 8.25, 0), Color = WOOD })
|
||||
-- фонарик на столбе
|
||||
local lamp = part({ Name = "Lantern", Size = V(0.9, 1.2, 0.9), At = CFrame.new(s * 6.6, 14.2, -0.95),
|
||||
Material = Enum.Material.Neon, Color = Color3.fromRGB(255, 196, 110), CanCollide = false })
|
||||
part({ Name = "LanternCap", Size = V(1.2, 0.3, 1.2), At = CFrame.new(s * 6.6, 14.95, -0.95), Color = DARK, CanCollide = false })
|
||||
local light = Instance.new("PointLight")
|
||||
light.Range, light.Brightness, light.Color = 12, 0.9, Color3.fromRGB(255, 190, 110)
|
||||
light.Parent = lamp
|
||||
end
|
||||
local screen = part({ Name = "Screen", Size = V(12, 9.6, 0.5), At = CFrame.new(0, 9.4, 0), Color = DARK })
|
||||
part({ Name = "Trim", Size = V(13.4, 0.6, 0.8), At = CFrame.new(0, 14.5, 0), Color = TRIM })
|
||||
part({ Name = "Trim", Size = V(13.4, 0.6, 0.8), At = CFrame.new(0, 4.3, 0), Color = TRIM })
|
||||
local plaque = part({ Name = "Plaque", Size = V(11, 2.3, 0.7), At = CFrame.new(0, 16.2, -0.1), Color = WOOD })
|
||||
part({ Name = "PlaqueTrim", Size = V(11.6, 2.8, 0.5), At = CFrame.new(0, 16.2, 0.15), Color = TRIM })
|
||||
-- двускатная крыша
|
||||
for _, s in ipairs({ -1, 1 }) do
|
||||
part({ Name = "Roof", Size = V(8, 0.5, 2.6), At = CFrame.new(s * 3.55, 18.35, 0) * CFrame.Angles(0, 0, math.rad(-s * 17)),
|
||||
Color = Color3.fromRGB(150, 70, 52) })
|
||||
end
|
||||
|
||||
-- заголовок
|
||||
local titleGui = Instance.new("SurfaceGui")
|
||||
titleGui.Face = Enum.NormalId.Front
|
||||
titleGui.SizingMode = Enum.SurfaceGuiSizingMode.PixelsPerStud
|
||||
titleGui.PixelsPerStud = 40
|
||||
titleGui.LightInfluence = 0
|
||||
titleGui.Parent = plaque
|
||||
local title = Instance.new("TextLabel")
|
||||
title.Size = UDim2.new(1, -16, 1, -8)
|
||||
title.Position = UDim2.fromOffset(8, 4)
|
||||
title.BackgroundTransparency = 1
|
||||
title.Font = Enum.Font.FredokaOne
|
||||
title.TextScaled = true
|
||||
title.Text = board.title
|
||||
title.TextColor3 = board.color
|
||||
title.Parent = titleGui
|
||||
local ts = Instance.new("UIStroke")
|
||||
ts.Color, ts.Thickness = Color3.fromRGB(40, 22, 10), 3
|
||||
ts.Parent = title
|
||||
|
||||
-- строки топа
|
||||
local gui = Instance.new("SurfaceGui")
|
||||
gui.Name = "Rows"
|
||||
gui.Face = Enum.NormalId.Front
|
||||
gui.SizingMode = Enum.SurfaceGuiSizingMode.PixelsPerStud
|
||||
gui.PixelsPerStud = 40
|
||||
gui.LightInfluence = 0.2
|
||||
gui.Parent = screen
|
||||
local list = Instance.new("Frame")
|
||||
list.Size = UDim2.new(1, -24, 1, -20)
|
||||
list.Position = UDim2.fromOffset(12, 10)
|
||||
list.BackgroundTransparency = 1
|
||||
list.Parent = gui
|
||||
local layout = Instance.new("UIListLayout")
|
||||
layout.Padding = UDim.new(0, 3)
|
||||
layout.SortOrder = Enum.SortOrder.LayoutOrder
|
||||
layout.Parent = list
|
||||
local RANK_COLOR = { Color3.fromRGB(255, 210, 80), Color3.fromRGB(215, 225, 235), Color3.fromRGB(230, 150, 90) }
|
||||
for i = 1, rows do
|
||||
local row = Instance.new("Frame")
|
||||
row.Name = "Row" .. i
|
||||
row.LayoutOrder = i
|
||||
row.Size = UDim2.new(1, 0, 1 / rows, -3)
|
||||
row.BackgroundColor3 = Color3.fromRGB(255, 240, 210)
|
||||
row.BackgroundTransparency = (i % 2 == 0) and 0.94 or 0.88
|
||||
row.BorderSizePixel = 0
|
||||
row.Parent = list
|
||||
local corner = Instance.new("UICorner")
|
||||
corner.CornerRadius = UDim.new(0, 6)
|
||||
corner.Parent = row
|
||||
local color = RANK_COLOR[i] or Color3.fromRGB(245, 232, 205)
|
||||
local function label(name, pos, size, align, text)
|
||||
local t = Instance.new("TextLabel")
|
||||
t.Name = name
|
||||
t.Position, t.Size = pos, size
|
||||
t.BackgroundTransparency = 1
|
||||
t.Font = Enum.Font.FredokaOne
|
||||
t.TextScaled = true
|
||||
t.TextXAlignment = align
|
||||
t.TextColor3 = color
|
||||
t.Text = text
|
||||
t.Parent = row
|
||||
return t
|
||||
end
|
||||
label("Rank", UDim2.new(0, 6, 0.1, 0), UDim2.new(0, 46, 0.8, 0), Enum.TextXAlignment.Center, ({ "🥇", "🥈", "🥉" })[i] or (i .. "."))
|
||||
label("PlayerName", UDim2.new(0, 58, 0.12, 0), UDim2.new(0.58, -58, 0.76, 0), Enum.TextXAlignment.Left, "—")
|
||||
label("Value", UDim2.new(0.58, 0, 0.12, 0), UDim2.new(0.42, -8, 0.76, 0), Enum.TextXAlignment.Right, "")
|
||||
end
|
||||
-- опора модели — экран, точка опоры на земле под центром доски и без наклона:
|
||||
-- иначе Studio берёт поворот случайной детали (ската крыши) и стрелки инструментов встают наискосок
|
||||
model.PrimaryPart = screen
|
||||
screen.PivotOffset = CFrame.new(0, -9.4, 0)
|
||||
model.Parent = parent
|
||||
return model
|
||||
end
|
||||
|
||||
-- лавка: cf стоит на полу, сторона -Z смотрит на покупателей
|
||||
local function stall(cf, opt)
|
||||
local function at(x, y, z)
|
||||
@@ -1017,6 +1136,12 @@ function Builder.build()
|
||||
lobbyTrees()
|
||||
lobbyRockPlants()
|
||||
lobbyHills()
|
||||
-- доски лидеров у подножия скал напротив точки появления
|
||||
for i, b in ipairs(Config.Leaderboards.boards) do
|
||||
local a = math.rad(({ 220, 270, 320 })[i] or 270)
|
||||
local p = V(math.cos(a) * 71, FLOOR, math.sin(a) * 71)
|
||||
Builder.leaderboard(CFrame.lookAt(p, V(0, FLOOR, 0)), b, Config.Leaderboards.size, map)
|
||||
end
|
||||
|
||||
-- магазин (запад) и скупка (восток)
|
||||
stall(CFrame.lookAt(V(-62, FLOOR, 0), V(0, FLOOR, 0)), {
|
||||
@@ -1153,12 +1278,31 @@ function Builder.build()
|
||||
-- сундук с ежедневной наградой
|
||||
do
|
||||
local cf = CFrame.lookAt(V(14, FLOOR, 34), V(0, FLOOR, 50))
|
||||
local base = P({ Size = V(5, 3, 3.2), CFrame = cf * CFrame.new(0, 1.5, 0), Material = Enum.Material.WoodPlanks, Color = Color3.fromRGB(140, 90, 50) })
|
||||
P({ Shape = Enum.PartType.Cylinder, Size = V(5, 3.2, 3.2), CFrame = cf * CFrame.new(0, 3, 0), Material = Enum.Material.WoodPlanks, Color = Color3.fromRGB(160, 105, 60) })
|
||||
for _, x in ipairs({ -1.8, 1.8 }) do
|
||||
P({ Size = V(0.4, 4.9, 3.4), CFrame = cf * CFrame.new(x, 2.3, 0), Material = Enum.Material.Metal, Color = Color3.fromRGB(255, 200, 60) })
|
||||
local template = ServerStorage:FindFirstChild("DailyChestTemplate")
|
||||
local base
|
||||
if template and template:IsA("Model") then
|
||||
-- low poly сундук (Base, Lid, Coins, Lock; замок по +Z модели, опора — низ по центру);
|
||||
-- его анимирует ChestAnimation.client.lua, подсказка и подпись — на невидимой детали
|
||||
local chest = template:Clone()
|
||||
chest.Name = "DailyChest"
|
||||
chest:SetAttribute("DailyChest", true)
|
||||
chest:PivotTo(cf * CFrame.Angles(0, math.pi, 0))
|
||||
for _, p in ipairs(chest:GetDescendants()) do
|
||||
if p:IsA("BasePart") then
|
||||
p.Anchored = true
|
||||
p.CanCollide = p.Name == "Base"
|
||||
end
|
||||
end
|
||||
chest.Parent = map
|
||||
base = P({ Name = "DailyChestPrompt", Size = V(5, 3, 3.2), CFrame = cf * CFrame.new(0, 1.5, 0), Transparency = 1, CanCollide = false })
|
||||
else
|
||||
base = P({ Size = V(5, 3, 3.2), CFrame = cf * CFrame.new(0, 1.5, 0), Material = Enum.Material.WoodPlanks, Color = Color3.fromRGB(140, 90, 50) })
|
||||
P({ Shape = Enum.PartType.Cylinder, Size = V(5, 3.2, 3.2), CFrame = cf * CFrame.new(0, 3, 0), Material = Enum.Material.WoodPlanks, Color = Color3.fromRGB(160, 105, 60) })
|
||||
for _, x in ipairs({ -1.8, 1.8 }) do
|
||||
P({ Size = V(0.4, 4.9, 3.4), CFrame = cf * CFrame.new(x, 2.3, 0), Material = Enum.Material.Metal, Color = Color3.fromRGB(255, 200, 60) })
|
||||
end
|
||||
P({ Size = V(0.9, 1.1, 0.3), CFrame = cf * CFrame.new(0, 2.8, -1.7), Material = Enum.Material.Metal, Color = Color3.fromRGB(255, 220, 90) })
|
||||
end
|
||||
P({ Size = V(0.9, 1.1, 0.3), CFrame = cf * CFrame.new(0, 2.8, -1.7), Material = Enum.Material.Metal, Color = Color3.fromRGB(255, 220, 90) })
|
||||
local sp = Instance.new("ParticleEmitter")
|
||||
sp.Texture = "rbxasset://textures/particles/sparkles_main.dds"
|
||||
sp.Rate = 8
|
||||
@@ -1795,6 +1939,7 @@ local function spawnNpc(spot, parent)
|
||||
return nil
|
||||
end
|
||||
rig.Name = name
|
||||
rig:SetAttribute("Npc", true) -- по нему клиент находит NPC (взгляд на игрока, приветствие), сервер — включает idle
|
||||
local hum = rig:FindFirstChildOfClass("Humanoid")
|
||||
hum.DisplayName = name
|
||||
hum.HealthDisplayType = Enum.HumanoidHealthDisplayType.AlwaysOff
|
||||
@@ -1828,9 +1973,29 @@ local function spawnNpc(spot, parent)
|
||||
w.C0 = head.CFrame:Inverse() * p.CFrame
|
||||
w.Parent = p
|
||||
p.Parent = rig
|
||||
return p
|
||||
end
|
||||
if spot:GetAttribute("Look") == "Elder" then
|
||||
-- Старейшина Ворон: седые волосы и борода (цвет HatColor), чёрная повязка на глазу
|
||||
local function elderPart(size, offset, color, shape)
|
||||
local p = hatPart(size, offset, shape or Enum.PartType.Block)
|
||||
p.Color = color
|
||||
p.Material = Enum.Material.SmoothPlastic
|
||||
end
|
||||
elderPart(V(1.25, 0.35, 1.25), CFrame.new(0, 0.55, 0.05), colors.hat)
|
||||
elderPart(V(1.0, 0.75, 0.35), CFrame.new(0, -0.55, -0.5), colors.hat)
|
||||
elderPart(V(0.32, 0.3, 0.08), CFrame.new(0.22, 0.12, -0.6), Color3.fromRGB(20, 20, 22))
|
||||
elderPart(V(1.24, 0.08, 1.24), CFrame.new(0, 0.18, 0) * CFrame.Angles(0, 0, math.rad(-12)), Color3.fromRGB(20, 20, 22))
|
||||
elseif spot:GetAttribute("Look") == "Scarf" then
|
||||
-- платок (цвет HatColor): макушка и узелок сзади
|
||||
local s = hatPart(V(1.3, 0.5, 1.3), CFrame.new(0, 0.42, 0.05), Enum.PartType.Block)
|
||||
s.Material = Enum.Material.SmoothPlastic
|
||||
local k = hatPart(V(0.4, 0.4, 0.3), CFrame.new(0, 0.05, 0.62), Enum.PartType.Block)
|
||||
k.Material = Enum.Material.SmoothPlastic
|
||||
else
|
||||
hatPart(V(0.15, 2.0, 2.0), CFrame.new(0, 0.55, 0) * CFrame.Angles(0, 0, math.rad(90)), Enum.PartType.Cylinder)
|
||||
hatPart(V(0.6, 1.35, 1.35), CFrame.new(0, 0.85, 0) * CFrame.Angles(0, 0, math.rad(90)), Enum.PartType.Cylinder)
|
||||
end
|
||||
hatPart(V(0.15, 2.0, 2.0), CFrame.new(0, 0.55, 0) * CFrame.Angles(0, 0, math.rad(90)), Enum.PartType.Cylinder)
|
||||
hatPart(V(0.6, 1.35, 1.35), CFrame.new(0, 0.85, 0) * CFrame.Angles(0, 0, math.rad(90)), Enum.PartType.Cylinder)
|
||||
end
|
||||
local action = spot:GetAttribute("NpcAction")
|
||||
if action then
|
||||
@@ -1838,6 +2003,7 @@ local function spawnNpc(spot, parent)
|
||||
end
|
||||
return rig
|
||||
end
|
||||
Builder.spawnNpc = spawnNpc -- жители лобби (LobbyLife.server.lua) создаются так же
|
||||
|
||||
-- NPC встают на свои детали-места, доски «кто водится» получают актуальный список рыб
|
||||
function Builder.prepareRuntime(root)
|
||||
@@ -1855,6 +2021,23 @@ function Builder.prepareRuntime(root)
|
||||
spot.Transparency = 1
|
||||
spawnNpc(spot, root)
|
||||
end
|
||||
-- порталы лобби двигают в Studio за модель (PortalModel_WorldN); невидимый якорь с подсказкой и подписью
|
||||
-- (Portal_WorldN) и маркер стрелки обучения (GuidePortal, перед порталом в мир 1) встают к модели
|
||||
for _, model in ipairs(root:GetChildren()) do
|
||||
local id = model.Name:match("^PortalModel_(World%d)$")
|
||||
local anchor = id and root:FindFirstChild("Portal_" .. id)
|
||||
if model:IsA("Model") and anchor then
|
||||
local cf, size = model:GetBoundingBox()
|
||||
anchor.CFrame = CFrame.new(cf.Position.X, cf.Position.Y - size.Y / 2 + 10, cf.Position.Z) * (anchor.CFrame - anchor.Position)
|
||||
local marker = id == "World1" and root:FindFirstChild("GuidePortal", true)
|
||||
if marker then
|
||||
local flat = V(cf.Position.X, 0, cf.Position.Z)
|
||||
local outward = flat.Magnitude > 0.1 and flat.Unit or V(0, 0, 1)
|
||||
local p = flat + outward * 5.7
|
||||
marker.CFrame = CFrame.new(p.X, marker.Position.Y, p.Z) * (marker.CFrame - marker.Position)
|
||||
end
|
||||
end
|
||||
end
|
||||
for _, board in ipairs(boards) do
|
||||
writeBestiary(board)
|
||||
end
|
||||
|
||||
@@ -43,13 +43,18 @@ 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 })
|
||||
-- фон: заставка «Рыболовная лихорадка»; пока картинка грузится, виден голубой градиент.
|
||||
-- Градиент — на отдельной подложке: UIGradient на самой CanvasGroup тонирует всё содержимое и затемнял картинку.
|
||||
-- Свет и цветокоррекция сцены на экранный интерфейс не действуют, их не трогаем.
|
||||
local BG_IMAGE = "rbxassetid://82266337853896" -- осветлённая и более насыщенная версия заставки
|
||||
-- обычный 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,
|
||||
Color = ColorSequence.new(Color3.fromRGB(120, 200, 255), Color3.fromRGB(255, 170, 110)),
|
||||
Parent = root,
|
||||
Color = ColorSequence.new(Color3.fromRGB(70, 140, 230), Color3.fromRGB(40, 70, 150)),
|
||||
Parent = backdrop,
|
||||
})
|
||||
local bg = new("ImageLabel", {
|
||||
Size = UDim2.fromScale(1, 1), BackgroundTransparency = 1, Image = BG_IMAGE,
|
||||
@@ -62,13 +67,14 @@ 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,
|
||||
BackgroundColor3 = Color3.new(1, 1, 1), BackgroundTransparency = 0.12, 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)),
|
||||
Color = ColorSequence.new(Color3.fromRGB(40, 66, 140), Color3.fromRGB(20, 32, 78)),
|
||||
Parent = panel,
|
||||
})
|
||||
local float = new("TextLabel", {
|
||||
@@ -80,10 +86,10 @@ local title = new("TextLabel", {
|
||||
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 })
|
||||
new("UIStroke", { Color = Color3.fromRGB(15, 22, 55), 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,
|
||||
BackgroundColor3 = Color3.fromRGB(10, 16, 40), 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 })
|
||||
@@ -91,7 +97,7 @@ 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,
|
||||
Text = "", TextColor3 = Color3.fromRGB(205, 222, 255), TextScaled = true,
|
||||
Font = Enum.Font.GothamMedium, Parent = panel,
|
||||
})
|
||||
|
||||
@@ -100,6 +106,78 @@ 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
|
||||
-- рюкзак и список игроков 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)
|
||||
end
|
||||
end
|
||||
|
||||
-- при входе: экран виден сразу, минимум — из FishConfig, когда он загрузится
|
||||
local now = os.clock()
|
||||
gui:SetAttribute("Visible", true)
|
||||
@@ -108,6 +186,7 @@ gui:SetAttribute("StartAt", now)
|
||||
gui:SetAttribute("MinUntil", now + 3)
|
||||
gui:SetAttribute("Title", "Загрузка…")
|
||||
showTip()
|
||||
setCoreHidden(true)
|
||||
|
||||
task.spawn(function()
|
||||
if not game:IsLoaded() then
|
||||
@@ -122,11 +201,12 @@ end)
|
||||
local hiding = false
|
||||
gui:GetAttributeChangedSignal("Visible"):Connect(function()
|
||||
-- новый телепорт мог прийти, пока экран ещё уходил: тогда возвращаем его
|
||||
if gui:GetAttribute("Visible") and (hiding or not gui.Enabled) then
|
||||
if gui:GetAttribute("Visible") then
|
||||
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()
|
||||
@@ -151,14 +231,13 @@ 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)
|
||||
]]></ProtectedString></Properties></Item>
|
||||
|
||||
+1351
-261
File diff suppressed because it is too large.
Load diff
+372
-144
File diff suppressed because it is too large.
Load diff
Reference in new issue
Block a user