ежедневная и крафты
This commit is contained in:
1 parent
828297cc6a
commit
ce8184576e
31 files changed
+3371
No files matched your search
@@ -0,0 +1 @@
|
||||
{"file_path": "game.StarterPlayer.StarterPlayerScripts.RewardsUI", "className": "LocalScript", "edits": [{"old_string": "", "new_string": "-- Rewards window: daily login gifts (7-day cycle) + playtime gifts (9 tiers per day). HUD button cloned from\n-- the Workshop button (same look), red badge = gifts ready to claim. Server: OrnamentRewardsServer.\nlocal Players = game:GetService(\"Players\")\nlocal RS = game:GetService(\"ReplicatedStorage\")\nlocal TweenService = game:GetService(\"TweenService\")\nlocal player = Players.LocalPlayer\nlocal folder = RS:WaitForChild(\"OrnamentMachine\")\nlocal Config = require(folder:WaitForChild(\"Config\"))\nlocal remote = folder:WaitForChild(\"RewardsRemote\")\nlocal R = Config.REWARDS\n\nlocal FONT = Enum.Font.FredokaOne\nlocal GOLD, CREAM, WHITE = Color3.fromRGB(255, 205, 70), Color3.fromRGB(255, 244, 220), Color3.new(1, 1, 1)\nlocal PANEL, PANEL2 = Color3.fromRGB(18, 108, 62), Color3.fromRGB(12, 80, 46)\nlocal RED, DRED, GREENB, GREY = Color3.fromRGB(214, 40, 48), Color3.fromRGB(150, 22, 32), Color3.fromRGB(60, 190, 90), Color3.fromRGB(95, 105, 115)\n\nlocal function new(cls, props, kids)\n\tlocal o = Instance.new(cls)\n\tfor k, v in props or {} do if k ~= \"Parent\" then o[k] = v end end\n\tfor _, k in kids or {} do k.Parent = o end\n\tif props and props.Parent then o.Parent = props.Parent end\n\treturn o\nend\nlocal function corner(r) return new(\"UICorner\", { CornerRadius = UDim.new(0, r) }) end\nlocal function stroke(c, t) return new(\"UIStroke\", { Color = c, Thickness = t, ApplyStrokeMode = Enum.ApplyStrokeMode.Border }) end\nlocal function label(props)\n\tlocal l = new(\"TextLabel\", props)\n\tl.BackgroundTransparency, l.Font = 1, FONT\n\tl.TextColor3 = props.TextColor3 or WHITE\n\tl.TextScaled = true\n\tnew(\"UIStroke\", { Color = Color3.fromRGB(40, 20, 10), Thickness = 2, Parent = l })\n\treturn l\nend\n\nlocal function rewardLines(g)\n\tlocal t = {}\n\tif g.Shards then table.insert(t, { string.format(\"+%d shards\", g.Shards), Color3.fromRGB(120, 220, 255) }) end\n\tfor _, id in { \"Luck2\", \"Luck3\" } do\n\t\tlocal n = g.Boosters and g.Boosters[id]\n\t\tif n then table.insert(t, { string.format(id == \"Luck2\" and \"+%d Luck x2\" or \"+%d Luck x3\", n), id == \"Luck2\" and Color3.fromRGB(120, 235, 130) or GOLD }) end\n\tend\n\tif g.XP then table.insert(t, { string.format(\"+%d XP\", g.XP), Color3.fromRGB(255, 170, 255) }) end\n\treturn t\nend\nlocal function timeText(m)\n\tif m < 60 then return string.format(\"%d min\", m) end\n\tif m % 60 == 0 then return string.format(\"%d h\", m // 60) end\n\treturn string.format(\"%d h %d min\", m // 60, m % 60)\nend\nlocal function icon(g)\n\tif g.Boosters and g.Boosters.Luck3 then return \"🍀\" elseif g.Boosters then return \"☘️\" elseif (g.Shards or 0) >= 100 then return \"💎\" else return \"❄️\" end\nend\n\n---------------------------------------------------------------- window\nlocal gui = new(\"ScreenGui\", { Name = \"RewardsGui\", ResetOnSpawn = false, DisplayOrder = 30, Enabled = false,\n\tZIndexBehavior = Enum.ZIndexBehavior.Sibling, Parent = player:WaitForChild(\"PlayerGui\") })\nlocal dim = new(\"TextButton\", { Text = \"\", AutoButtonColor = false, Size = UDim2.fromScale(1, 1), BackgroundColor3 = Color3.new(0, 0, 0),\n\tBackgroundTransparency = 0.45, Parent = gui })\nlocal win = new(\"Frame\", { AnchorPoint = Vector2.new(0.5, 0.5), Position = UDim2.fromScale(0.5, 0.52), Size = UDim2.fromOffset(940, 600),\n\tBackgroundColor3 = PANEL, Parent = gui }, { corner(30), stroke(GOLD, 6),\n\tnew(\"UIGradient\", { Rotation = 90, Color = ColorSequence.new(PANEL, PANEL2) }) })\nlocal scale = new(\"UIScale\", { Parent = win })\nlocal function rescale()\n\tlocal v = workspace.CurrentCamera.ViewportSize\n\tscale.Scale = math.min(v.X / 1010, v.Y / 680, 1.15)\nend\nrescale(); workspace.CurrentCamera:GetPropertyChangedSignal(\"ViewportSize\"):Connect(rescale)\n-- snowy top edge + title ribbon\nnew(\"Frame\", { Position = UDim2.fromOffset(10, -10), Size = UDim2.new(1, -20, 0, 34), BackgroundColor3 = Color3.fromRGB(245, 250, 255), Parent = win }, { corner(17) })\nlocal ribbon = new(\"Frame\", { AnchorPoint = Vector2.new(0.5, 0.5), Position = UDim2.new(0.5, 0, 0, 0), Size = UDim2.fromOffset(380, 86),\n\tBackgroundColor3 = RED, Parent = win }, { corner(26), stroke(GOLD, 5), new(\"UIGradient\", { Rotation = 90, Color = ColorSequence.new(RED, DRED) }) })\nlabel({ Text = \"🎁 Rewards\", Position = UDim2.fromOffset(20, 10), Size = UDim2.new(1, -40, 1, -20), TextColor3 = GOLD, Parent = ribbon })\nlocal close = new(\"TextButton\", { Text = \"✕\", Font = FONT, TextScaled = true, TextColor3 = WHITE, AnchorPoint = Vector2.new(0.5, 0.5),\n\tPosition = UDim2.new(1, -18, 0, 18), Size = UDim2.fromOffset(70, 70), BackgroundColor3 = RED, Parent = win }, { corner(20), stroke(WHITE, 4) })\n\nlocal tabs, pages, current = {}, {}, \"Daily\"\nlocal function tabButton(id, text, x)\n\tlocal b = new(\"TextButton\", { Text = \"\", AutoBuLine truncated
|
||||
Reference in new issue
Block a user