Fishing lobby1
This commit is contained in:
1 parent
7835f6cfd4
commit
83cd5355b8
14 files changed
+14637
-1
No files matched your search
@@ -0,0 +1,313 @@
|
||||
<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="ModuleScript" referent="RBX0">
|
||||
<Properties>
|
||||
<string name="Name">FishConfig</string>
|
||||
<ProtectedString name="Source"><![CDATA[-- FishConfig (ModuleScript) -> ReplicatedStorage
|
||||
-- Все настройки игры. Меняй цифры здесь, чтобы настроить баланс.
|
||||
|
||||
local Config = {}
|
||||
|
||||
Config.GameName = "Клёвое место"
|
||||
|
||||
---------------------------------------------------------------- миры
|
||||
-- center = центр мира на карте; mult = множитель наград коллекции
|
||||
Config.Worlds = {
|
||||
{
|
||||
id = "World1", name = "Тихое озеро", icon = "🌊", level = 1, mult = 1,
|
||||
center = Vector3.new(0, 0, 1500), color = Color3.fromRGB(60, 200, 255),
|
||||
desc = "Спокойное лесное озеро. Отличное место, чтобы начать.",
|
||||
clock = 14.5, water = Color3.fromRGB(20, 95, 115),
|
||||
waterY = 0,
|
||||
lakes = { { 0, 0, 55 }, { -45, 15, 40 }, { 45, -10, 42 }, { 10, -42, 34 }, { -22, 40, 28 } }, -- { x, z, радиус } от центра
|
||||
},
|
||||
{
|
||||
id = "World2", name = "Тропический остров", icon = "🏝", level = 8, mult = 4,
|
||||
center = Vector3.new(1500, 0, 0), color = Color3.fromRGB(255, 190, 70),
|
||||
desc = "Бирюзовое море, пальмы и яркая рифовая рыба.",
|
||||
clock = 13, water = Color3.fromRGB(35, 175, 185),
|
||||
waterY = 0,
|
||||
sea = 119, -- всё дальше этого радиуса от центра — море
|
||||
},
|
||||
{
|
||||
id = "World3", name = "Ледяной фьорд", icon = "❄", level = 18, mult = 12,
|
||||
center = Vector3.new(-1500, 0, 0), color = Color3.fromRGB(150, 220, 255),
|
||||
desc = "Рыбалка в лунках среди льдов и северного сияния.",
|
||||
clock = 18.3, water = Color3.fromRGB(25, 70, 100),
|
||||
waterY = 1,
|
||||
lakes = { { 0, 0, 70 }, { -55, 30, 45 }, { 55, -25, 50 }, { 5, -70, 40 } }, -- подо льдом
|
||||
holes = {
|
||||
{ 0, 40 }, { -22, 18 }, { 22, 12 }, { 0, -12 }, { -30, -30 }, { 30, 40 }, { -60, 35 },
|
||||
{ -45, 15 }, { 55, -25 }, { 75, -5 }, { 40, -50 }, { 5, -75 }, { -15, -60 }, { 25, -80 },
|
||||
},
|
||||
holeRadius = 6,
|
||||
},
|
||||
{
|
||||
id = "World4", name = "Вулкан", icon = "🌋", level = 30, mult = 30, soon = true,
|
||||
center = Vector3.new(0, 0, -1500), color = Color3.fromRGB(255, 90, 40),
|
||||
desc = "Рыбалка в лаве. Скоро!",
|
||||
},
|
||||
}
|
||||
Config.WorldRadius = 260
|
||||
|
||||
function Config.WorldAt(pos)
|
||||
for _, w in ipairs(Config.Worlds) do
|
||||
if not w.soon then
|
||||
local d = Vector3.new(pos.X - w.center.X, 0, pos.Z - w.center.Z).Magnitude
|
||||
if d < Config.WorldRadius then
|
||||
return w
|
||||
end
|
||||
end
|
||||
end
|
||||
return nil
|
||||
end
|
||||
|
||||
-- есть ли вода в этой точке мира (озеро, море или лунка)
|
||||
function Config.IsWater(world, pos)
|
||||
if not world then
|
||||
return false
|
||||
end
|
||||
local x, z = pos.X - world.center.X, pos.Z - world.center.Z
|
||||
if world.holes then
|
||||
local r = world.holeRadius or 6
|
||||
for _, h in ipairs(world.holes) do
|
||||
if (x - h[1]) ^ 2 + (z - h[2]) ^ 2 <= r * r then
|
||||
return true
|
||||
end
|
||||
end
|
||||
return false
|
||||
end
|
||||
if world.sea and math.sqrt(x * x + z * z) >= world.sea then
|
||||
return true
|
||||
end
|
||||
for _, l in ipairs(world.lakes or {}) do
|
||||
if (x - l[1]) ^ 2 + (z - l[2]) ^ 2 <= (l[3] - 1) ^ 2 then
|
||||
return true
|
||||
end
|
||||
end
|
||||
return false
|
||||
end
|
||||
|
||||
---------------------------------------------------------------- редкости
|
||||
Config.Rarities = {
|
||||
Common = { name = "Обычная", rank = 1, weight = 55, color = Color3.fromRGB(215, 220, 225) },
|
||||
Uncommon = { name = "Необычная", rank = 2, weight = 27, color = Color3.fromRGB(95, 225, 115) },
|
||||
Rare = { name = "Редкая", rank = 3, weight = 11, color = Color3.fromRGB(70, 160, 255) },
|
||||
Epic = { name = "Эпическая", rank = 4, weight = 4.5, color = Color3.fromRGB(185, 90, 255) },
|
||||
Legendary = { name = "Легендарная", rank = 5, weight = 1.2, color = Color3.fromRGB(255, 185, 35) },
|
||||
Mythic = { name = "Мифическая", rank = 6, weight = 0.25, color = Color3.fromRGB(255, 80, 150) },
|
||||
}
|
||||
Config.RarityOrder = { "Common", "Uncommon", "Rare", "Epic", "Legendary", "Mythic" }
|
||||
|
||||
---------------------------------------------------------------- мутации
|
||||
Config.Mutations = {
|
||||
{ id = "Rainbow", name = "Радужная", chance = 0.002, mult = 10, color = Color3.fromRGB(255, 120, 230) },
|
||||
{ id = "Golden", name = "Золотая", chance = 0.010, mult = 5, color = Color3.fromRGB(255, 205, 60) },
|
||||
{ id = "Shiny", name = "Блестящая", chance = 0.040, mult = 2, color = Color3.fromRGB(170, 240, 255) },
|
||||
}
|
||||
|
||||
---------------------------------------------------------------- рыба
|
||||
-- shape: classic, long, tall, flat, ray, puffer, shark, eel, sword, angler, jelly, sturgeon
|
||||
-- color2 = второй цвет (плавники/узор); stripes/spots/whiskers/spikes/glow — украшения модели
|
||||
local function F(t)
|
||||
return t
|
||||
end
|
||||
|
||||
Config.Zones = {
|
||||
World1 = {
|
||||
fish = {
|
||||
F({ id = "Karas", name = "Карась", rarity = "Common", price = 5, xp = 8, minW = 0.2, maxW = 1.2, size = 1.0, shape = "tall", color = Color3.fromRGB(205, 170, 75), color2 = Color3.fromRGB(170, 120, 50) }),
|
||||
F({ id = "Plotva", name = "Плотва", rarity = "Common", price = 6, xp = 8, minW = 0.1, maxW = 0.8, size = 0.9, shape = "classic", color = Color3.fromRGB(195, 200, 210), color2 = Color3.fromRGB(220, 80, 60) }),
|
||||
F({ id = "Ersh", name = "Ёрш", rarity = "Common", price = 7, xp = 9, minW = 0.1, maxW = 0.4, size = 0.8, shape = "classic", color = Color3.fromRGB(135, 125, 75), color2 = Color3.fromRGB(95, 85, 50), spikes = true, spots = 6 }),
|
||||
F({ id = "Okun", name = "Окунь", rarity = "Uncommon", price = 15, xp = 18, minW = 0.3, maxW = 1.5, size = 1.0, shape = "classic", color = Color3.fromRGB(150, 180, 70), color2 = Color3.fromRGB(230, 90, 40), stripes = 5, spikes = true }),
|
||||
F({ id = "Lesh", name = "Лещ", rarity = "Uncommon", price = 18, xp = 20, minW = 0.5, maxW = 3.0, size = 1.2, shape = "tall", color = Color3.fromRGB(175, 145, 95), color2 = Color3.fromRGB(120, 95, 60) }),
|
||||
F({ id = "Lin", name = "Линь", rarity = "Uncommon", price = 20, xp = 22, minW = 0.4, maxW = 2.5, size = 1.1, shape = "classic", color = Color3.fromRGB(95, 125, 55), color2 = Color3.fromRGB(60, 85, 35) }),
|
||||
F({ id = "Shuka", name = "Щука", rarity = "Rare", price = 45, xp = 45, minW = 1.0, maxW = 8.0, size = 1.5, shape = "long", color = Color3.fromRGB(110, 140, 85), color2 = Color3.fromRGB(200, 210, 150), spots = 12 }),
|
||||
F({ id = "Sudak", name = "Судак", rarity = "Rare", price = 50, xp = 48, minW = 1.0, maxW = 6.0, size = 1.4, shape = "long", color = Color3.fromRGB(165, 165, 135), color2 = Color3.fromRGB(80, 80, 70), stripes = 6, spikes = true }),
|
||||
F({ id = "Som", name = "Сом", rarity = "Epic", price = 130, xp = 110, minW = 5.0, maxW = 40, size = 2.0, shape = "long", color = Color3.fromRGB(75, 75, 90), color2 = Color3.fromRGB(180, 175, 160), whiskers = true }),
|
||||
F({ id = "Koi", name = "Карп кои", rarity = "Epic", price = 150, xp = 120, minW = 2.0, maxW = 9.0, size = 1.4, shape = "classic", color = Color3.fromRGB(250, 245, 240), color2 = Color3.fromRGB(240, 110, 40), spots = 7, whiskers = true }),
|
||||
F({ id = "Gold", name = "Золотая рыбка", rarity = "Legendary", price = 500, xp = 350, minW = 0.1, maxW = 0.5, size = 0.9, shape = "classic", color = Color3.fromRGB(255, 195, 40), color2 = Color3.fromRGB(255, 120, 30), glow = true, bigTail = true }),
|
||||
F({ id = "Crystal", name = "Хрустальный осётр", rarity = "Mythic", price = 2000, xp = 900, minW = 10, maxW = 60, size = 2.0, shape = "sturgeon", color = Color3.fromRGB(150, 230, 255), color2 = Color3.fromRGB(230, 250, 255), glow = true, glass = true }),
|
||||
},
|
||||
},
|
||||
World2 = {
|
||||
fish = {
|
||||
F({ id = "Clown", name = "Рыба-клоун", rarity = "Common", price = 18, xp = 18, minW = 0.1, maxW = 0.4, size = 0.8, shape = "classic", color = Color3.fromRGB(255, 120, 30), color2 = Color3.fromRGB(255, 255, 255), stripes = 3 }),
|
||||
F({ id = "Sergeant", name = "Рыба-сержант", rarity = "Common", price = 20, xp = 18, minW = 0.2, maxW = 0.9, size = 0.9, shape = "tall", color = Color3.fromRGB(240, 230, 110), color2 = Color3.fromRGB(40, 40, 45), stripes = 5 }),
|
||||
F({ id = "Mullet", name = "Барабулька", rarity = "Common", price = 22, xp = 20, minW = 0.1, maxW = 0.6, size = 0.9, shape = "classic", color = Color3.fromRGB(235, 110, 100), color2 = Color3.fromRGB(255, 220, 120), whiskers = true }),
|
||||
F({ id = "Angel", name = "Рыба-ангел", rarity = "Uncommon", price = 45, xp = 40, minW = 0.3, maxW = 1.5, size = 1.0, shape = "tall", color = Color3.fromRGB(60, 120, 230), color2 = Color3.fromRGB(255, 220, 40), stripes = 4, bigFins = true }),
|
||||
F({ id = "Puffer", name = "Иглобрюх", rarity = "Uncommon", price = 50, xp = 42, minW = 0.3, maxW = 2.0, size = 1.0, shape = "puffer", color = Color3.fromRGB(230, 205, 140), color2 = Color3.fromRGB(110, 90, 60), spots = 10 }),
|
||||
F({ id = "Parrot", name = "Рыба-попугай", rarity = "Uncommon", price = 55, xp = 45, minW = 1.0, maxW = 5.0, size = 1.2, shape = "classic", color = Color3.fromRGB(60, 210, 190), color2 = Color3.fromRGB(240, 90, 180), spots = 5 }),
|
||||
F({ id = "Ray", name = "Скат", rarity = "Rare", price = 120, xp = 90, minW = 3.0, maxW = 25, size = 1.6, shape = "ray", color = Color3.fromRGB(110, 115, 140), color2 = Color3.fromRGB(230, 230, 240), spots = 14 }),
|
||||
F({ id = "Barracuda", name = "Барракуда", rarity = "Rare", price = 130, xp = 95, minW = 2.0, maxW = 20, size = 1.7, shape = "long", color = Color3.fromRGB(175, 185, 200), color2 = Color3.fromRGB(60, 70, 85), stripes = 8 }),
|
||||
F({ id = "Swordfish", name = "Рыба-меч", rarity = "Epic", price = 350, xp = 220, minW = 30, maxW = 200, size = 2.0, shape = "sword", color = Color3.fromRGB(55, 75, 130), color2 = Color3.fromRGB(200, 210, 230) }),
|
||||
F({ id = "Moray", name = "Мурена", rarity = "Epic", price = 320, xp = 210, minW = 2.0, maxW = 15, size = 1.8, shape = "eel", color = Color3.fromRGB(80, 140, 60), color2 = Color3.fromRGB(230, 220, 90), spots = 12 }),
|
||||
F({ id = "Shark", name = "Рифовая акула", rarity = "Legendary", price = 1200, xp = 700, minW = 40, maxW = 180, size = 2.4, shape = "shark", color = Color3.fromRGB(110, 125, 145), color2 = Color3.fromRGB(235, 235, 240) }),
|
||||
F({ id = "SunJelly", name = "Солнечная медуза", rarity = "Mythic", price = 5000, xp = 2000, minW = 1.0, maxW = 8.0, size = 1.8, shape = "jelly", color = Color3.fromRGB(255, 200, 80), color2 = Color3.fromRGB(255, 120, 200), glow = true, glass = true }),
|
||||
},
|
||||
},
|
||||
World3 = {
|
||||
fish = {
|
||||
F({ id = "Cod", name = "Треска", rarity = "Common", price = 55, xp = 40, minW = 1.0, maxW = 10, size = 1.2, shape = "classic", color = Color3.fromRGB(150, 150, 110), color2 = Color3.fromRGB(230, 225, 200), spots = 14, whiskers = true }),
|
||||
F({ id = "Herring", name = "Сельдь", rarity = "Common", price = 50, xp = 38, minW = 0.2, maxW = 0.8, size = 0.9, shape = "long", color = Color3.fromRGB(150, 175, 205), color2 = Color3.fromRGB(70, 100, 140) }),
|
||||
F({ id = "Capelin", name = "Мойва", rarity = "Common", price = 48, xp = 36, minW = 0.05, maxW = 0.2, size = 0.7, shape = "classic", color = Color3.fromRGB(170, 200, 190), color2 = Color3.fromRGB(80, 120, 110) }),
|
||||
F({ id = "Flounder", name = "Камбала", rarity = "Uncommon", price = 140, xp = 90, minW = 0.5, maxW = 4.0, size = 1.2, shape = "flat", color = Color3.fromRGB(150, 125, 90), color2 = Color3.fromRGB(230, 120, 60), spots = 10 }),
|
||||
F({ id = "Redfish", name = "Морской окунь", rarity = "Uncommon", price = 150, xp = 92, minW = 0.5, maxW = 5.0, size = 1.1, shape = "classic", color = Color3.fromRGB(225, 70, 60), color2 = Color3.fromRGB(255, 160, 120), spikes = true }),
|
||||
F({ id = "Char", name = "Арктический голец", rarity = "Uncommon", price = 160, xp = 95, minW = 0.5, maxW = 6.0, size = 1.2, shape = "long", color = Color3.fromRGB(120, 130, 150), color2 = Color3.fromRGB(255, 130, 150), spots = 12 }),
|
||||
F({ id = "Halibut", name = "Палтус", rarity = "Rare", price = 380, xp = 200, minW = 5.0, maxW = 90, size = 1.9, shape = "flat", color = Color3.fromRGB(90, 95, 80), color2 = Color3.fromRGB(150, 150, 130), spots = 16 }),
|
||||
F({ id = "Wolffish", name = "Морской волк", rarity = "Rare", price = 400, xp = 210, minW = 3.0, maxW = 20, size = 1.7, shape = "long", color = Color3.fromRGB(110, 120, 140), color2 = Color3.fromRGB(60, 65, 80), stripes = 7, teeth = true }),
|
||||
F({ id = "Angler", name = "Удильщик", rarity = "Epic", price = 1100, xp = 500, minW = 5.0, maxW = 50, size = 1.6, shape = "angler", color = Color3.fromRGB(60, 50, 70), color2 = Color3.fromRGB(120, 255, 230), glow = true }),
|
||||
F({ id = "IceEel", name = "Ледяная мурена", rarity = "Epic", price = 1000, xp = 480, minW = 3.0, maxW = 25, size = 1.9, shape = "eel", color = Color3.fromRGB(150, 210, 245), color2 = Color3.fromRGB(240, 250, 255), glass = true }),
|
||||
F({ id = "Greenland", name = "Полярная акула", rarity = "Legendary", price = 3500, xp = 1500, minW = 200, maxW = 900, size = 2.6, shape = "shark", color = Color3.fromRGB(80, 90, 100), color2 = Color3.fromRGB(160, 170, 180) }),
|
||||
F({ id = "Leviathan", name = "Ледяной левиафан", rarity = "Mythic", price = 15000, xp = 4000, minW = 500, maxW = 3000, size = 2.4, shape = "eel", color = Color3.fromRGB(110, 230, 255), color2 = Color3.fromRGB(200, 120, 255), glow = true, spikes = true }),
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
---------------------------------------------------------------- удочки
|
||||
-- luck = бонус удачи, speed = множитель ожидания клёва (меньше = быстрее), zone = ширина зелёной зоны
|
||||
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" },
|
||||
}
|
||||
|
||||
Config.RodUpgrade = { maxLevel = 5, luckPerLevel = 0.08, zonePerLevel = 0.012, speedPerLevel = 0.96 }
|
||||
function Config.UpgradeCost(rod, currentLevel)
|
||||
return math.floor(rod.upgradeCost * (currentLevel + 1) ^ 1.5)
|
||||
end
|
||||
|
||||
---------------------------------------------------------------- сумки
|
||||
Config.Bags = {
|
||||
{ id = "Pouch", name = "Холщовая сумка", price = 0, level = 1, capacity = 12, color = Color3.fromRGB(170, 140, 95) },
|
||||
{ id = "Satchel", name = "Сумка рыбака", price = 150, level = 2, capacity = 25, color = Color3.fromRGB(110, 140, 80) },
|
||||
{ id = "Backpack", name = "Туристический рюкзак", price = 700, level = 4, capacity = 45, color = Color3.fromRGB(60, 110, 180) },
|
||||
{ id = "BigNet", name = "Огромный садок", price = 2500, level = 7, capacity = 80, color = Color3.fromRGB(200, 80, 50) },
|
||||
{ id = "Chest", name = "Сундук за спиной", price = 9000, level = 12, capacity = 140, color = Color3.fromRGB(140, 90, 50) },
|
||||
{ id = "Magic", name = "Магический мешок", price = 30000, level = 20, capacity = 250, color = Color3.fromRGB(120, 60, 200) },
|
||||
}
|
||||
|
||||
---------------------------------------------------------------- удача
|
||||
Config.LuckPerPlayerLevel = 0.02 -- +2% за уровень игрока
|
||||
Config.MasteryLuck = 0.10 -- +10% навсегда за полностью собранный мир
|
||||
Config.Potions = {
|
||||
{ id = "Luck1", name = "Зелье удачи", price = 120, bonus = 0.5, duration = 300, color = Color3.fromRGB(90, 230, 120) },
|
||||
{ id = "Luck2", name = "Большое зелье удачи", price = 450, bonus = 1.0, duration = 600, color = Color3.fromRGB(255, 200, 60), level = 5 },
|
||||
{ id = "Luck3", name = "Эликсир фортуны", price = 2500, bonus = 2.0, duration = 600, color = Color3.fromRGB(200, 120, 255), level = 12 },
|
||||
}
|
||||
|
||||
---------------------------------------------------------------- коллекция
|
||||
-- награда за то, что поймал ВСЕ виды одной редкости в мире (умножается на mult мира)
|
||||
Config.CollectionRewards = {
|
||||
Common = { coins = 50, xp = 40 },
|
||||
Uncommon = { coins = 120, xp = 100 },
|
||||
Rare = { coins = 300, xp = 250 },
|
||||
Epic = { coins = 800, xp = 600 },
|
||||
Legendary = { coins = 2000, xp = 1500 },
|
||||
Mythic = { coins = 6000, xp = 4000 },
|
||||
}
|
||||
Config.MasteryCoins = 5000 -- за весь мир (тоже умножается на mult)
|
||||
|
||||
---------------------------------------------------------------- задания
|
||||
-- coins/xp = награда за 1 единицу цели (умножается на цель и уровень игрока)
|
||||
Config.Quests = {
|
||||
{ kind = "catch", text = "Поймай %d рыб", goals = { 10, 20, 35 }, coins = 6, xp = 5 },
|
||||
{ kind = "rare", text = "Поймай %d рыб редкости «Редкая» и выше", goals = { 1, 2, 3 }, coins = 60, xp = 50 },
|
||||
{ kind = "epic", text = "Поймай эпическую рыбу или реже", goals = { 1 }, coins = 250, xp = 200 },
|
||||
{ kind = "mutation", text = "Поймай рыбу с мутацией", goals = { 1 }, coins = 200, xp = 150 },
|
||||
{ kind = "earn", text = "Заработай %d монет на продаже", goals = { 200, 600, 1500 }, coins = 0.25, xp = 0.2 },
|
||||
{ kind = "perfect", text = "Сделай %d идеальных подсечек (без промаха)", goals = { 5, 10, 15 }, coins = 15, xp = 12 },
|
||||
}
|
||||
Config.QuestSlots = 3
|
||||
|
||||
-- ежедневная награда (7 дней по кругу), монеты растут с уровнем
|
||||
Config.DailyRewards = {
|
||||
{ coins = 100 },
|
||||
{ coins = 200 },
|
||||
{ coins = 300, potion = "Luck1" },
|
||||
{ coins = 450 },
|
||||
{ coins = 600, potion = "Luck1" },
|
||||
{ coins = 800 },
|
||||
{ coins = 1500, potion = "Luck2" },
|
||||
}
|
||||
|
||||
---------------------------------------------------------------- события на сервере
|
||||
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 },
|
||||
}
|
||||
Config.EventFirstDelay = 120
|
||||
Config.EventGapMin = 420
|
||||
Config.EventGapMax = 720
|
||||
|
||||
---------------------------------------------------------------- донат (Robux)
|
||||
-- ВАЖНО: впиши сюда ID своих пропусков и товаров с create.roblox.com.
|
||||
-- Пока 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 мест в любой сумке" },
|
||||
}
|
||||
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 },
|
||||
}
|
||||
|
||||
---------------------------------------------------------------- рыбалка
|
||||
Config.BiteTimeMin = 3
|
||||
Config.BiteTimeMax = 7
|
||||
Config.BiteTimeout = 12
|
||||
Config.MaxMisses = 2
|
||||
function Config.HitsNeeded(rank)
|
||||
return math.ceil(rank / 2)
|
||||
end
|
||||
function Config.XPForLevel(level)
|
||||
return 60 + level * 60
|
||||
end
|
||||
|
||||
---------------------------------------------------------------- помощники
|
||||
function Config.Find(list, id)
|
||||
for _, item in ipairs(list) do
|
||||
if item.id == id or item.key == id then
|
||||
return item
|
||||
end
|
||||
end
|
||||
return nil
|
||||
end
|
||||
|
||||
function Config.FindFish(fishId)
|
||||
for zoneId, zone in pairs(Config.Zones) do
|
||||
for _, f in ipairs(zone.fish) do
|
||||
if f.id == fishId then
|
||||
return f, zoneId
|
||||
end
|
||||
end
|
||||
end
|
||||
return nil
|
||||
end
|
||||
|
||||
function Config.RodStats(rodId, upgradeLevel)
|
||||
local rod = Config.Find(Config.Rods, rodId) or Config.Rods[1]
|
||||
local u = Config.RodUpgrade
|
||||
upgradeLevel = upgradeLevel or 0
|
||||
return {
|
||||
luck = rod.luck + u.luckPerLevel * upgradeLevel,
|
||||
speed = rod.speed * (u.speedPerLevel ^ upgradeLevel),
|
||||
zone = rod.zone + u.zonePerLevel * upgradeLevel,
|
||||
}
|
||||
end
|
||||
|
||||
return Config
|
||||
]]></ProtectedString>
|
||||
</Properties>
|
||||
</Item>
|
||||
</roblox>
|
||||
@@ -0,0 +1,567 @@
|
||||
<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="ModuleScript" referent="RBX0">
|
||||
<Properties>
|
||||
<string name="Name">GameModels</string>
|
||||
<ProtectedString name="Source"><![CDATA[-- GameModels (ModuleScript) -> ReplicatedStorage
|
||||
-- Строит 3D-модели из деталей: удочки, сумки, рыбу, поплавок.
|
||||
-- Используется сервером (инструмент, витрины, рыба в руках) и клиентом (иконки).
|
||||
|
||||
local Config = require(script.Parent:WaitForChild("FishConfig"))
|
||||
|
||||
local M = {}
|
||||
local V = Vector3.new
|
||||
local SP, NEON, METAL, GLASS = Enum.Material.SmoothPlastic, Enum.Material.Neon, Enum.Material.Metal, Enum.Material.Glass
|
||||
|
||||
---------------------------------------------------------------- помощники
|
||||
|
||||
local function newPart(parent, props, class)
|
||||
local p = Instance.new(class or "Part")
|
||||
if props.Shape then
|
||||
p.Shape = props.Shape
|
||||
end
|
||||
p.Anchored = false
|
||||
p.CanCollide = false
|
||||
p.CanQuery = false
|
||||
p.CanTouch = false
|
||||
p.Massless = true
|
||||
p.TopSurface = Enum.SurfaceType.Smooth
|
||||
p.BottomSurface = Enum.SurfaceType.Smooth
|
||||
p.Material = SP
|
||||
for k, v in pairs(props) do
|
||||
if k ~= "Shape" then
|
||||
p[k] = v
|
||||
end
|
||||
end
|
||||
p.Parent = parent
|
||||
return p
|
||||
end
|
||||
|
||||
local function cyl(parent, a, b, dia, props)
|
||||
props = props or {}
|
||||
props.Shape = Enum.PartType.Cylinder
|
||||
props.Size = V(math.max(0.02, (b - a).Magnitude), dia, dia)
|
||||
props.CFrame = CFrame.lookAt((a + b) / 2, b) * CFrame.Angles(0, math.rad(90), 0)
|
||||
return newPart(parent, props)
|
||||
end
|
||||
|
||||
local function ball(parent, pos, dia, props)
|
||||
props = props or {}
|
||||
props.Shape = Enum.PartType.Ball
|
||||
props.Size = V(dia, dia, dia)
|
||||
props.CFrame = CFrame.new(pos)
|
||||
return newPart(parent, props)
|
||||
end
|
||||
|
||||
local function oval(parent, size, cf, props)
|
||||
props = props or {}
|
||||
props.Size = size
|
||||
props.CFrame = cf
|
||||
local p = newPart(parent, props)
|
||||
local mesh = Instance.new("SpecialMesh")
|
||||
mesh.MeshType = Enum.MeshType.Sphere
|
||||
mesh.Parent = p
|
||||
return p
|
||||
end
|
||||
|
||||
local function block(parent, size, cf, props)
|
||||
props = props or {}
|
||||
props.Size = size
|
||||
props.CFrame = cf
|
||||
return newPart(parent, props)
|
||||
end
|
||||
|
||||
local function wedge(parent, size, cf, props)
|
||||
props = props or {}
|
||||
props.Size = size
|
||||
props.CFrame = cf
|
||||
return newPart(parent, props, "WedgePart")
|
||||
end
|
||||
|
||||
local function finish(model, root, anchored)
|
||||
for _, p in ipairs(model:GetDescendants()) do
|
||||
if p:IsA("BasePart") and p ~= root then
|
||||
local w = Instance.new("Weld")
|
||||
w.Part0 = root
|
||||
w.Part1 = p
|
||||
w.C0 = root.CFrame:Inverse() * p.CFrame
|
||||
w.Parent = p
|
||||
p.Anchored = anchored and true or false
|
||||
end
|
||||
end
|
||||
root.Anchored = anchored and true or false
|
||||
model.PrimaryPart = root
|
||||
return model
|
||||
end
|
||||
|
||||
local function lighten(c, t)
|
||||
return c:Lerp(Color3.new(1, 1, 1), t)
|
||||
end
|
||||
local function darken(c, t)
|
||||
return c:Lerp(Color3.new(0, 0, 0), t)
|
||||
end
|
||||
local function C(r, g, b)
|
||||
return Color3.fromRGB(r, g, b)
|
||||
end
|
||||
|
||||
local function sparkles(parent, color, rate)
|
||||
local att = Instance.new("Attachment")
|
||||
att.Parent = parent
|
||||
local pe = Instance.new("ParticleEmitter")
|
||||
pe.Texture = "rbxasset://textures/particles/sparkles_main.dds"
|
||||
pe.Rate = rate or 6
|
||||
pe.Lifetime = NumberRange.new(0.6, 1.0)
|
||||
pe.Speed = NumberRange.new(0.5, 1)
|
||||
pe.Size = NumberSequence.new(0.25, 0)
|
||||
pe.LightEmission = 1
|
||||
pe.Color = ColorSequence.new(color)
|
||||
pe.Parent = att
|
||||
return pe
|
||||
end
|
||||
|
||||
---------------------------------------------------------------- удочки
|
||||
-- Рука в (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) },
|
||||
bamboo = { blank = C(215, 190, 105), mat = Enum.Material.Wood, grip = C(120, 90, 50), gripMat = Enum.Material.Fabric, wrap = C(70, 120, 60), reel = C(85, 85, 90), nodes = C(150, 120, 60) },
|
||||
glass = { blank = C(60, 130, 215), mat = SP, grip = C(35, 35, 40), gripMat = Enum.Material.Fabric, wrap = C(240, 240, 245), reel = C(60, 60, 70) },
|
||||
carbon = { blank = C(30, 30, 35), mat = SP, grip = C(195, 155, 105), gripMat = Enum.Material.Sand, wrap = C(220, 50, 50), reel = C(45, 45, 50) },
|
||||
coral = { blank = C(255, 130, 110), blank2 = C(255, 225, 210), mat = SP, grip = C(40, 170, 170), gripMat = Enum.Material.Fabric, wrap = C(40, 200, 200), reel = C(240, 240, 235), gem = C(255, 120, 160) },
|
||||
gold = { blank = C(255, 200, 50), mat = METAL, grip = C(120, 30, 30), gripMat = Enum.Material.Fabric, wrap = C(255, 255, 255), reel = C(230, 180, 50), gem = C(255, 40, 60), sparkle = C(255, 220, 90) },
|
||||
frost = { blank = C(170, 225, 255), mat = GLASS, grip = C(230, 240, 250), gripMat = Enum.Material.Fabric, wrap = C(90, 170, 255), reel = C(200, 230, 250), gem = C(120, 240, 255), sparkle = C(170, 240, 255) },
|
||||
legend = { blank = C(60, 25, 90), blank2 = C(110, 50, 170), mat = SP, grip = C(25, 20, 35), gripMat = Enum.Material.Fabric, wrap = C(255, 200, 60), wrapNeon = true, reel = C(40, 30, 60), gem = C(255, 90, 220), sparkle = C(255, 150, 240) },
|
||||
}
|
||||
|
||||
function M.buildRod(rodId, upgradeLevel, anchored)
|
||||
local rod = Config.Find(Config.Rods, rodId) or Config.Rods[1]
|
||||
local st = STYLES[rod.style] or STYLES.wood
|
||||
upgradeLevel = upgradeLevel or 0
|
||||
local model = Instance.new("Model")
|
||||
model.Name = rod.name
|
||||
|
||||
local handle = newPart(model, { Name = "Handle", Size = V(0.3, 0.3, 1.8), CFrame = CFrame.new(), Transparency = 1 })
|
||||
local wrapMat = (st.wrapNeon or upgradeLevel >= 5) and NEON or METAL
|
||||
local back = V(0, 0, 1)
|
||||
|
||||
-- торец и камень
|
||||
ball(model, V(0, 0, 1.05), 0.42, { Color = st.reel, Material = METAL })
|
||||
if st.gem then
|
||||
ball(model, V(0, 0, 1.25), 0.26, { Color = st.gem, Material = NEON })
|
||||
end
|
||||
-- задняя рукоять: кольца (пробка/обмотка)
|
||||
for i = 0, 6 do
|
||||
local z0 = 1.0 - i * 0.185
|
||||
cyl(model, V(0, 0, z0), V(0, 0, z0 - 0.185), i % 2 == 0 and 0.34 or 0.33, {
|
||||
Color = i % 2 == 0 and st.grip or darken(st.grip, 0.12), Material = st.gripMat,
|
||||
})
|
||||
end
|
||||
-- катушкодержатель
|
||||
cyl(model, V(0, 0, -0.3), V(0, 0, -0.95), 0.27, { Color = st.reel, Material = METAL })
|
||||
cyl(model, V(0, 0, -0.3), V(0, 0, -0.42), 0.32, { Color = st.wrap, Material = wrapMat })
|
||||
cyl(model, V(0, 0, -0.83), V(0, 0, -0.95), 0.32, { Color = st.wrap, Material = wrapMat })
|
||||
-- передняя рукоять
|
||||
cyl(model, V(0, 0, -0.95), V(0, 0, -1.45), 0.29, { Color = st.grip, Material = st.gripMat })
|
||||
cyl(model, V(0, 0, -1.45), V(0, 0, -1.55), 0.25, { Color = st.wrap, Material = wrapMat })
|
||||
|
||||
-- катушка (безынерционная): ножка, корпус, шпуля, дужка, ручка
|
||||
block(model, V(0.1, 0.42, 0.22), CFrame.new(0, -0.3, -0.62), { Color = st.reel, Material = METAL })
|
||||
oval(model, V(0.46, 0.5, 0.7), CFrame.new(0, -0.68, -0.58), { Color = st.reel, Material = METAL })
|
||||
local spoolCF = CFrame.new(0, -0.68, -1.02) * CFrame.Angles(0, math.rad(90), 0)
|
||||
newPart(model, { Shape = Enum.PartType.Cylinder, Size = V(0.34, 0.44, 0.44), CFrame = spoolCF, Color = C(235, 235, 230), Material = SP })
|
||||
newPart(model, { Shape = Enum.PartType.Cylinder, Size = V(0.06, 0.5, 0.5), CFrame = spoolCF * CFrame.new(0.18, 0, 0), Color = st.wrap, Material = wrapMat })
|
||||
local bail = {}
|
||||
for i = 0, 6 do
|
||||
local a = math.rad(200 + i * 23)
|
||||
table.insert(bail, V(math.cos(a) * 0.3, -0.68 + math.sin(a) * 0.3, -1.2))
|
||||
end
|
||||
for i = 1, #bail - 1 do
|
||||
cyl(model, bail[i], bail[i + 1], 0.04, { Color = C(200, 200, 205), Material = METAL })
|
||||
end
|
||||
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 }
|
||||
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
|
||||
for i = 1, #angles do
|
||||
local a = math.rad(angles[i])
|
||||
local d = V(0, math.sin(a), -math.cos(a))
|
||||
local q = p + d * lengths[i]
|
||||
local dia = 0.2 - (i - 1) * 0.019
|
||||
local color = (st.blank2 and i % 2 == 0) and st.blank2 or st.blank
|
||||
lastSeg = cyl(model, p, q, dia, { Color = color, Material = st.mat })
|
||||
ball(model, q, dia * 0.97, { Color = color, Material = st.mat })
|
||||
if st.nodes then
|
||||
cyl(model, q - d * 0.04, q + d * 0.04, dia + 0.05, { Color = st.nodes, Material = Enum.Material.Wood })
|
||||
end
|
||||
-- полоски улучшений на первых коленах
|
||||
if i <= 2 then
|
||||
for s = 1, upgradeLevel do
|
||||
if (s <= 3 and i == 1) or (s > 3 and i == 2) then
|
||||
local t = 0.25 + ((s - 1) % 3) * 0.22
|
||||
local c = p:Lerp(q, t)
|
||||
cyl(model, c - d * 0.035, c + d * 0.035, dia + 0.045, { Color = C(255, 215, 80), Material = NEON })
|
||||
end
|
||||
end
|
||||
end
|
||||
-- пропускные кольца на чётных стыках
|
||||
if i % 2 == 0 then
|
||||
local n = V(0, d.Z, -d.Y) -- вниз, перпендикулярно бланку
|
||||
local ringD = 0.24 - i * 0.017
|
||||
cyl(model, q - d * 0.06, q + d * 0.06, dia + 0.05, { Color = st.wrap, Material = wrapMat })
|
||||
cyl(model, q, q + n * 0.12, 0.035, { Color = C(200, 200, 205), Material = METAL })
|
||||
local c = q + n * (0.12 + ringD / 2)
|
||||
newPart(model, {
|
||||
Shape = Enum.PartType.Cylinder, Size = V(0.03, ringD, ringD),
|
||||
CFrame = CFrame.lookAt(c, c + d) * CFrame.Angles(0, math.rad(90), 0),
|
||||
Color = C(205, 205, 210), Material = METAL,
|
||||
})
|
||||
end
|
||||
p = q
|
||||
end
|
||||
ball(model, p, 0.09, { Color = st.wrap, Material = wrapMat })
|
||||
|
||||
local tip = Instance.new("Attachment")
|
||||
tip.Name = "Tip"
|
||||
tip.Position = p
|
||||
tip.Parent = handle
|
||||
local lineStart = Instance.new("Attachment")
|
||||
lineStart.Name = "LineStart"
|
||||
lineStart.Position = V(0, -0.68, -1.2)
|
||||
lineStart.Parent = handle
|
||||
local line = Instance.new("Beam")
|
||||
line.Attachment0 = lineStart
|
||||
line.Attachment1 = tip
|
||||
line.Width0 = 0.025
|
||||
line.Width1 = 0.02
|
||||
line.FaceCamera = true
|
||||
line.Color = ColorSequence.new(C(245, 245, 245))
|
||||
line.Parent = handle
|
||||
|
||||
if upgradeLevel >= 3 or st.sparkle then
|
||||
sparkles(lastSeg, st.sparkle or st.wrap, 6)
|
||||
end
|
||||
return finish(model, handle, anchored)
|
||||
end
|
||||
|
||||
---------------------------------------------------------------- сумки на спину
|
||||
-- Корень "Root" у спины; +Z = от спины назад.
|
||||
|
||||
local BAG_SIZES = {
|
||||
Pouch = V(1.3, 1.3, 0.6),
|
||||
Satchel = V(1.5, 1.5, 0.7),
|
||||
Backpack = V(1.7, 2.0, 0.9),
|
||||
BigNet = V(1.9, 2.2, 1.0),
|
||||
Chest = V(2.0, 1.6, 1.2),
|
||||
Magic = V(1.8, 2.2, 1.1),
|
||||
}
|
||||
|
||||
function M.buildBag(bagId, anchored)
|
||||
local bag = Config.Find(Config.Bags, bagId) or Config.Bags[1]
|
||||
local s = BAG_SIZES[bag.id] or BAG_SIZES.Pouch
|
||||
local model = Instance.new("Model")
|
||||
model.Name = "BackBag"
|
||||
local root = newPart(model, { Name = "Root", Size = V(0.2, 0.2, 0.2), CFrame = CFrame.new(), Transparency = 1 })
|
||||
|
||||
if bag.id == "Chest" then
|
||||
block(model, V(s.X, s.Y * 0.7, s.Z), CFrame.new(0, -s.Y * 0.15, s.Z / 2), { Color = bag.color, Material = Enum.Material.WoodPlanks })
|
||||
oval(model, V(s.X, s.Y * 0.6, s.Z), CFrame.new(0, s.Y * 0.2, s.Z / 2), { Color = darken(bag.color, 0.15), Material = Enum.Material.WoodPlanks })
|
||||
for _, x in ipairs({ -s.X * 0.35, s.X * 0.35 }) do
|
||||
block(model, V(0.15, s.Y * 1.02, s.Z + 0.06), CFrame.new(x, 0, s.Z / 2), { Color = C(200, 170, 70), Material = METAL })
|
||||
end
|
||||
block(model, V(0.35, 0.4, 0.1), CFrame.new(0, 0, s.Z + 0.05), { Color = C(230, 190, 70), Material = METAL })
|
||||
sparkles(root, C(255, 220, 90), 3)
|
||||
return finish(model, root, anchored)
|
||||
end
|
||||
|
||||
oval(model, V(s.X, s.Y, s.Z * 1.1), CFrame.new(0, 0, s.Z / 2), { Color = bag.color, Material = Enum.Material.Fabric })
|
||||
block(model, V(s.X * 0.95, s.Y * 0.3, s.Z * 0.9), CFrame.new(0, s.Y * 0.33, s.Z / 2), { Color = darken(bag.color, 0.25), Material = Enum.Material.Fabric })
|
||||
block(model, V(s.X * 0.6, s.Y * 0.32, 0.16), CFrame.new(0, -s.Y * 0.15, s.Z + 0.04), { Color = darken(bag.color, 0.12), Material = Enum.Material.Fabric })
|
||||
block(model, V(0.26, 0.2, 0.06), CFrame.new(0, s.Y * 0.2, s.Z * 0.98), { Color = C(230, 190, 70), Material = METAL })
|
||||
for _, x in ipairs({ -1, 1 }) do
|
||||
block(model, V(0.16, s.Y * 0.9, 0.06), CFrame.new(x * s.X * 0.3, 0, s.Z * 0.95), { Color = darken(bag.color, 0.35), Material = Enum.Material.Fabric })
|
||||
end
|
||||
if bag.id == "Backpack" or bag.id == "BigNet" then
|
||||
newPart(model, { Shape = Enum.PartType.Cylinder, Size = V(s.X + 0.1, 0.55, 0.55), CFrame = CFrame.new(0, s.Y / 2 + 0.15, s.Z / 2), Color = C(70, 120, 70), Material = Enum.Material.Fabric })
|
||||
end
|
||||
if bag.id == "BigNet" then
|
||||
oval(model, V(0.15, 0.7, 0.5), CFrame.new(0.4, s.Y / 2 + 0.5, s.Z * 0.6) * CFrame.Angles(0, 0, math.rad(15)), { Color = C(255, 190, 50) })
|
||||
end
|
||||
if bag.id == "Magic" then
|
||||
newPart(model, { Shape = Enum.PartType.Cylinder, Size = V(0.05, 0.7, 0.7), CFrame = CFrame.new(0, -0.1, s.Z + 0.06) * CFrame.Angles(0, math.rad(90), 0), Color = C(255, 150, 255), Material = NEON })
|
||||
sparkles(root, C(220, 150, 255), 5)
|
||||
end
|
||||
return finish(model, root, anchored)
|
||||
end
|
||||
|
||||
---------------------------------------------------------------- рыба
|
||||
-- Голова смотрит в +X, спина в +Y, бок к зрителю в +Z.
|
||||
|
||||
local function seededRng(id)
|
||||
local n = 0
|
||||
for i = 1, #id do
|
||||
n += string.byte(id, i) * i
|
||||
end
|
||||
return Random.new(n)
|
||||
end
|
||||
|
||||
-- полуширина эллипсоида (L,H,W) в точке x,y
|
||||
local function halfWidth(L, H, W, x, y)
|
||||
local k = 1 - (2 * x / L) ^ 2 - (2 * y / H) ^ 2
|
||||
return k > 0 and (W / 2) * math.sqrt(k) or 0
|
||||
end
|
||||
|
||||
local function addEyes(model, x, y, zHalf, size)
|
||||
for _, sgn in ipairs({ -1, 1 }) do
|
||||
ball(model, V(x, y, sgn * zHalf), size, { Color = C(250, 250, 250) })
|
||||
ball(model, V(x + size * 0.12, y, sgn * (zHalf + size * 0.3)), size * 0.55, { Color = C(15, 15, 20) })
|
||||
end
|
||||
end
|
||||
|
||||
function M.buildFish(fishId, mutationId, scale, anchored)
|
||||
local fish = Config.FindFish(fishId) or Config.Zones.World1.fish[1]
|
||||
local s = (scale or 1) * fish.size
|
||||
local c1, c2 = fish.color, fish.color2 or darken(fish.color, 0.3)
|
||||
local mat = SP
|
||||
local glow = fish.glow
|
||||
if mutationId == "Golden" then
|
||||
c1, c2, mat = C(255, 205, 60), C(230, 150, 30), METAL
|
||||
elseif mutationId == "Shiny" then
|
||||
c1, c2, glow = lighten(c1, 0.35), lighten(c2, 0.35), true
|
||||
elseif mutationId == "Rainbow" then
|
||||
c1, c2, glow = C(255, 120, 220), C(90, 230, 255), true
|
||||
end
|
||||
if fish.glass and not mutationId then
|
||||
mat = GLASS
|
||||
end
|
||||
local finMat = glow and NEON or mat
|
||||
local rng = seededRng(fish.id)
|
||||
local model = Instance.new("Model")
|
||||
model.Name = fish.name
|
||||
local shape = fish.shape or "classic"
|
||||
local root
|
||||
|
||||
if shape == "flat" then
|
||||
-- камбала: плоская, «верх» смотрит на зрителя (+Z)
|
||||
root = oval(model, V(2 * s, 1.3 * s, 0.22 * s), CFrame.new(), { Name = "Body", Color = c1, Material = mat })
|
||||
oval(model, V(2.2 * s, 1.5 * s, 0.08 * s), CFrame.new(0, 0, -0.02 * s), { Color = darken(c1, 0.2), Material = finMat })
|
||||
oval(model, V(0.45 * s, 0.6 * s, 0.06 * s), CFrame.new(-1.15 * s, 0, 0), { Color = darken(c1, 0.2), Material = finMat })
|
||||
for i = 1, fish.spots or 0 do
|
||||
local x, y = rng:NextNumber(-0.7, 0.7) * s, rng:NextNumber(-0.45, 0.45) * s
|
||||
oval(model, V(0.14 * s, 0.14 * s, 0.05 * s), CFrame.new(x, y, 0.1 * s), { Color = c2 })
|
||||
end
|
||||
ball(model, V(0.62 * s, 0.14 * s, 0.11 * s), 0.16 * s, { Color = C(250, 250, 250) })
|
||||
ball(model, V(0.5 * s, -0.05 * s, 0.11 * s), 0.16 * s, { Color = C(250, 250, 250) })
|
||||
ball(model, V(0.62 * s, 0.14 * s, 0.17 * s), 0.08 * s, { Color = C(15, 15, 20) })
|
||||
ball(model, V(0.5 * s, -0.05 * s, 0.17 * s), 0.08 * s, { Color = C(15, 15, 20) })
|
||||
return finish(model, root, anchored)
|
||||
end
|
||||
|
||||
if shape == "ray" then
|
||||
root = block(model, V(1.5 * s, 1.5 * s, 0.14 * s), CFrame.Angles(0, 0, math.rad(45)), { Name = "Body", Color = c1, Material = mat })
|
||||
oval(model, V(1.4 * s, 0.9 * s, 0.32 * s), CFrame.new(0.1 * s, 0, 0.02 * s), { Color = c1, Material = mat })
|
||||
cyl(model, V(-0.9 * s, 0, 0), V(-2.4 * s, 0.1 * s, 0), 0.08 * s, { Color = darken(c1, 0.2), Material = mat })
|
||||
for i = 1, fish.spots or 0 do
|
||||
ball(model, V(rng:NextNumber(-0.6, 0.6) * s, rng:NextNumber(-0.6, 0.6) * s, 0.12 * s), 0.1 * s, { Color = c2 })
|
||||
end
|
||||
ball(model, V(0.45 * s, 0.22 * s, 0.14 * s), 0.14 * s, { Color = C(20, 20, 25) })
|
||||
ball(model, V(0.45 * s, -0.22 * s, 0.14 * s), 0.14 * s, { Color = C(20, 20, 25) })
|
||||
return finish(model, root, anchored)
|
||||
end
|
||||
|
||||
if shape == "eel" then
|
||||
local n, L = 10, 3.4 * s
|
||||
local seg = L / n
|
||||
local prev
|
||||
for i = 0, n - 1 do
|
||||
local x = L / 2 - i * seg
|
||||
local y = math.sin(i * 0.8) * 0.22 * s
|
||||
local d = (0.5 - i * 0.035) * s
|
||||
local part = oval(model, V(seg * 1.7, d, d * 0.85), CFrame.new(x, y, 0), { Color = c1, Material = mat, Name = i == 0 and "Body" or "Seg" })
|
||||
if i == 0 then
|
||||
root = part
|
||||
end
|
||||
if i > 0 then
|
||||
oval(model, V(seg * 1.4, d * 0.5, d * 0.2), CFrame.new(x, y + d * 0.45, 0), { Color = c2, Material = finMat })
|
||||
if fish.spikes and i % 2 == 0 then
|
||||
block(model, V(0.06 * s, d * 0.6, 0.06 * s), CFrame.new(x, y + d * 0.75, 0), { Color = c2, Material = NEON })
|
||||
end
|
||||
end
|
||||
if fish.spots and i > 0 and i % 2 == 1 then
|
||||
ball(model, V(x, y + d * 0.1, d * 0.4), d * 0.25, { Color = c2 })
|
||||
end
|
||||
prev = part
|
||||
end
|
||||
addEyes(model, L / 2 + seg * 0.3, 0.12 * s, 0.17 * s, 0.13 * s)
|
||||
oval(model, V(0.1 * s, 0.08 * s, 0.3 * s), CFrame.new(L / 2 + seg * 0.75, -0.08 * s, 0), { Color = C(30, 20, 20) })
|
||||
return finish(model, root, anchored)
|
||||
end
|
||||
|
||||
if shape == "jelly" then
|
||||
root = oval(model, V(1.6 * s, 1.1 * s, 1.6 * s), CFrame.new(0, 0.35 * s, 0), { Name = "Body", Color = c1, Material = GLASS, Transparency = 0.2 })
|
||||
oval(model, V(0.8 * s, 0.5 * s, 0.8 * s), CFrame.new(0, 0.3 * s, 0), { Color = c2, Material = NEON })
|
||||
oval(model, V(1.75 * s, 0.14 * s, 1.75 * s), CFrame.new(0, -0.15 * s, 0), { Color = c2, Material = finMat })
|
||||
for i = 0, 7 do
|
||||
local a = i / 8 * math.pi * 2
|
||||
local base = V(math.cos(a) * 0.6 * s, -0.15 * s, math.sin(a) * 0.6 * s)
|
||||
local p1 = base + V(math.sin(i) * 0.15 * s, -0.7 * s, 0)
|
||||
local p2 = p1 + V(-math.sin(i) * 0.2 * s, -0.7 * s, math.cos(i) * 0.1 * s)
|
||||
cyl(model, base, p1, 0.07 * s, { Color = c2, Material = NEON })
|
||||
cyl(model, p1, p2, 0.05 * s, { Color = c1, Material = NEON })
|
||||
end
|
||||
return finish(model, root, anchored)
|
||||
end
|
||||
|
||||
-- тело-эллипсоид для остальных форм
|
||||
local L, H, W = 2 * s, 0.9 * s, 0.45 * s
|
||||
if shape == "long" or shape == "sturgeon" then
|
||||
L, H, W = 2.6 * s, 0.6 * s, 0.5 * s
|
||||
elseif shape == "tall" then
|
||||
L, H, W = 1.7 * s, 1.25 * s, 0.38 * s
|
||||
elseif shape == "shark" then
|
||||
L, H, W = 3 * s, 0.75 * s, 0.7 * s
|
||||
elseif shape == "sword" then
|
||||
L, H, W = 2.4 * s, 0.75 * s, 0.5 * s
|
||||
elseif shape == "puffer" then
|
||||
L, H, W = 1.4 * s, 1.3 * s, 1.3 * s
|
||||
elseif shape == "angler" then
|
||||
L, H, W = 1.6 * s, 1.3 * s, 1.1 * s
|
||||
end
|
||||
|
||||
root = oval(model, V(L, H, W), CFrame.new(), { Name = "Body", Color = c1, Material = mat })
|
||||
if shape ~= "puffer" and shape ~= "angler" then
|
||||
oval(model, V(L * 0.82, H * 0.55, W * 1.03), CFrame.new(L * 0.03, -H * 0.2, 0), { Color = lighten(c1, 0.45), Material = mat })
|
||||
end
|
||||
|
||||
-- хвост
|
||||
if shape == "shark" then
|
||||
oval(model, V(L * 0.25, H * 1.0, W * 0.12), CFrame.new(-L * 0.56, H * 0.32, 0) * CFrame.Angles(0, 0, math.rad(-35)), { Color = c1, Material = mat })
|
||||
oval(model, V(L * 0.17, H * 0.6, W * 0.12), CFrame.new(-L * 0.54, -H * 0.22, 0) * CFrame.Angles(0, 0, math.rad(35)), { Color = c1, Material = mat })
|
||||
else
|
||||
local th = fish.bigTail and 0.95 or 0.62
|
||||
oval(model, V(L * 0.22, H * 0.36, W * 0.5), CFrame.new(-L * 0.44, 0, 0), { Color = c1, Material = mat })
|
||||
for _, sgn in ipairs({ 1, -1 }) do
|
||||
oval(model, V(L * 0.28, H * th, W * 0.14), CFrame.new(-L * 0.58, sgn * H * 0.22, 0) * CFrame.Angles(0, 0, math.rad(-sgn * 32)), { Color = c2, Material = finMat })
|
||||
end
|
||||
end
|
||||
|
||||
-- спинной плавник
|
||||
if shape == "shark" then
|
||||
wedge(model, V(W * 0.14, H * 0.95, L * 0.2), CFrame.new(-L * 0.02, H * 0.78, 0) * CFrame.Angles(0, math.rad(-90), 0), { Color = c1, Material = mat })
|
||||
elseif shape == "sword" then
|
||||
oval(model, V(L * 0.5, H * 1.2, W * 0.1), CFrame.new(L * 0.05, H * 0.65, 0), { Color = c2, Material = finMat })
|
||||
elseif shape ~= "puffer" then
|
||||
local big = fish.bigFins and 1.8 or 1
|
||||
oval(model, V(L * 0.42, H * 0.45 * big, W * 0.12), CFrame.new(-L * 0.06, H * 0.4 * (fish.bigFins and 1.3 or 1), 0), { Color = c2, Material = finMat })
|
||||
oval(model, V(L * 0.22, H * 0.3 * big, W * 0.1), CFrame.new(-L * 0.2, -H * 0.42 * (fish.bigFins and 1.3 or 1), 0), { Color = c2, Material = finMat })
|
||||
end
|
||||
if fish.spikes and shape ~= "puffer" then
|
||||
for i = 0, 4 do
|
||||
local x = -L * 0.2 + i * L * 0.08
|
||||
block(model, V(0.05 * s, H * 0.3, 0.05 * s), CFrame.new(x, H * 0.55, 0) * CFrame.Angles(0, 0, math.rad(-15)), { Color = darken(c2, 0.3) })
|
||||
end
|
||||
end
|
||||
-- грудные плавники
|
||||
for _, sgn in ipairs({ -1, 1 }) do
|
||||
oval(model, V(L * 0.2, H * 0.14, W * 0.06), CFrame.new(L * 0.12, -H * 0.15, sgn * W * 0.48) * CFrame.Angles(0, math.rad(sgn * 25), math.rad(-20)), { Color = c2, Material = finMat })
|
||||
end
|
||||
|
||||
-- узоры
|
||||
if fish.stripes then
|
||||
for i = 1, fish.stripes do
|
||||
local x = -L * 0.3 + (i - 0.5) * (L * 0.6 / fish.stripes)
|
||||
local hh = (H / 2) * math.sqrt(math.max(0, 1 - (2 * x / L) ^ 2))
|
||||
local hw = (W / 2) * math.sqrt(math.max(0, 1 - (2 * x / L) ^ 2))
|
||||
oval(model, V(L * 0.06, hh * 2.04, hw * 2.08), CFrame.new(x, 0, 0), { Color = c2, Material = mat })
|
||||
end
|
||||
end
|
||||
if fish.spots then
|
||||
for i = 1, fish.spots do
|
||||
local x = rng:NextNumber(-0.35, 0.3) * L
|
||||
local y = rng:NextNumber(-0.1, 0.35) * H
|
||||
local z = halfWidth(L, H, W, x, y)
|
||||
if z > 0 then
|
||||
local sgn = (i % 2 == 0) and 1 or -1
|
||||
ball(model, V(x, y, sgn * z * 0.96), 0.13 * s, { Color = c2 })
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
-- глаза и рот
|
||||
local ex, ey = L * 0.32, H * 0.12
|
||||
local ez = halfWidth(L, H, W, ex, ey)
|
||||
local eyeSize = (shape == "puffer") and H * 0.3 or ((shape == "angler") and H * 0.14 or math.max(0.12 * s, H * 0.22))
|
||||
addEyes(model, ex, ey, ez * 0.92, eyeSize)
|
||||
if shape == "angler" then
|
||||
oval(model, V(L * 0.12, H * 0.5, W * 0.85), CFrame.new(L * 0.46, -H * 0.12, 0), { Color = C(25, 15, 20) })
|
||||
for i = -2, 2 do
|
||||
wedge(model, V(0.05 * s, 0.16 * s, 0.06 * s), CFrame.new(L * 0.5, H * 0.08, i * W * 0.12) * CFrame.Angles(math.rad(180), 0, 0), { Color = C(250, 250, 240) })
|
||||
end
|
||||
local a, b, c = V(L * 0.3, H * 0.48, 0), V(L * 0.55, H * 0.95, 0), V(L * 0.78, H * 0.85, 0)
|
||||
cyl(model, a, b, 0.05 * s, { Color = c1 })
|
||||
cyl(model, b, c, 0.045 * s, { Color = c1 })
|
||||
local lure = ball(model, c, 0.26 * s, { Color = c2, Material = NEON })
|
||||
local light = Instance.new("PointLight")
|
||||
light.Color = c2
|
||||
light.Range = 8
|
||||
light.Brightness = 2
|
||||
light.Parent = lure
|
||||
else
|
||||
oval(model, V(L * 0.05, H * 0.12, W * 0.35), CFrame.new(L * 0.49, -H * 0.08, 0), { Color = C(40, 25, 25) })
|
||||
end
|
||||
if fish.teeth then
|
||||
for i = -1, 1 do
|
||||
wedge(model, V(0.05 * s, 0.12 * s, 0.05 * s), CFrame.new(L * 0.5, -H * 0.02, i * W * 0.12) * CFrame.Angles(math.rad(180), 0, 0), { Color = C(250, 250, 240) })
|
||||
end
|
||||
end
|
||||
if fish.whiskers then
|
||||
for _, sgn in ipairs({ -1, 1 }) do
|
||||
cyl(model, V(L * 0.46, -H * 0.12, sgn * W * 0.15), V(L * 0.62, -H * 0.42, sgn * W * 0.45), 0.04 * s, { Color = c2 })
|
||||
end
|
||||
end
|
||||
if shape == "sword" then
|
||||
cyl(model, V(L * 0.45, 0, 0), V(L * 0.45 + L * 0.7, H * 0.03, 0), H * 0.08, { Color = c2, Material = mat })
|
||||
elseif shape == "sturgeon" then
|
||||
oval(model, V(L * 0.22, H * 0.45, W * 0.45), CFrame.new(L * 0.52, -H * 0.08, 0), { Color = c1, Material = mat })
|
||||
for i = 0, 6 do
|
||||
block(model, V(0.16 * s, 0.16 * s, 0.1 * s), CFrame.new(L * 0.3 - i * L * 0.11, H * 0.47, 0) * CFrame.Angles(0, 0, math.rad(45)), { Color = c2, Material = finMat })
|
||||
end
|
||||
for _, sgn in ipairs({ -1, 1 }) do
|
||||
cyl(model, V(L * 0.55, -H * 0.25, sgn * W * 0.1), V(L * 0.6, -H * 0.55, sgn * W * 0.15), 0.035 * s, { Color = c2 })
|
||||
end
|
||||
elseif shape == "puffer" then
|
||||
for i = 1, 30 do
|
||||
local y = 1 - (i - 0.5) / 30 * 2
|
||||
local r = math.sqrt(1 - y * y)
|
||||
local th = i * 2.4
|
||||
local dir = V(math.cos(th) * r, y, math.sin(th) * r)
|
||||
local base = V(dir.X * L / 2, dir.Y * H / 2, dir.Z * W / 2)
|
||||
cyl(model, base, base + dir * 0.28 * s, 0.05 * s, { Color = darken(c2, 0.1) })
|
||||
end
|
||||
end
|
||||
if glow then
|
||||
sparkles(root, c2, 4)
|
||||
end
|
||||
return finish(model, root, anchored)
|
||||
end
|
||||
|
||||
---------------------------------------------------------------- поплавок
|
||||
|
||||
function M.buildBobber()
|
||||
local model = Instance.new("Model")
|
||||
model.Name = "Bobber"
|
||||
local root = newPart(model, { Name = "Root", Shape = Enum.PartType.Ball, Size = V(0.7, 0.7, 0.7), CFrame = CFrame.new(), Color = C(255, 255, 255) })
|
||||
newPart(model, { Shape = Enum.PartType.Ball, Size = V(0.72, 0.72, 0.72), CFrame = CFrame.new(0, 0.2, 0), Color = C(230, 40, 40) })
|
||||
newPart(model, { Size = V(0.07, 0.6, 0.07), CFrame = CFrame.new(0, 0.75, 0), Color = C(230, 40, 40) })
|
||||
finish(model, root, false)
|
||||
root.Anchored = true
|
||||
return model
|
||||
end
|
||||
|
||||
return M
|
||||
]]></ProtectedString>
|
||||
</Properties>
|
||||
</Item>
|
||||
</roblox>
|
||||
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
+4850
File diff suppressed because it is too large.
Load diff
Reference in new issue
Block a user