if type(QuestPetsRuletaClient) ~= "table" then return end if QuestPetsRuletaClient.__PremiumRouletteInstalled == true then return end local OriginalRenderRandomSpinOverlay = QuestPetsRuletaClient.RenderRandomSpinOverlay if type(OriginalRenderRandomSpinOverlay) ~= "function" then return end QuestPetsRuletaClient.__PremiumRouletteInstalled = true local function Clamp(value, minimum, maximum) value = tonumber(value) or minimum if value < minimum then return minimum end if value > maximum then return maximum end return value end local function GetPreviewName(spin) local rewards = QuestPetsRuletaClient.GetSpinRewards and QuestPetsRuletaClient.GetSpinRewards() or {} if #rewards <= 0 then return "PREMIO SORPRESA" end local frame = tonumber(spin.Frame) or 0 local slot = (math.floor(frame / 6) % #rewards) + 1 local reward = rewards[slot] return tostring(reward.ShortName or reward.Name or ("PREMIO " .. tostring(reward.RewardID or slot))) end function QuestPetsRuletaClient.RenderRandomSpinOverlay() OriginalRenderRandomSpinOverlay() local spin = QuestPetsRuletaClient.RandomSpin if spin == nil or spin.Active ~= true then return end local win = QuestPetsRuletaClient.GetWindow() local x = tonumber(win.X) or 105 local y = tonumber(win.Y) or 35 local w = tonumber(win.W) or 430 local frame = tonumber(spin.Frame) or 0 local maxFrame = math.max(1, tonumber(spin.MaxFrame) or 1800) local progress = Clamp(frame / maxFrame, 0, 1) local pulse = (math.sin(frame * 0.12) + 1) * 0.5 local panelW = 260 local panelX = x + math.floor((w - panelW) / 2) local panelY = y + 138 local gold = math.floor(165 + (90 * pulse)) QuestPetsRuletaClient.Box(panelX, panelY, panelW, 54, 0.02, 0.02, 0.04, 0.88) QuestPetsRuletaClient.Frame(panelX, panelY, panelW, 54) QuestPetsRuletaClient.Text( panelX + 8, panelY + 7, "SORTEANDO: " .. GetPreviewName(spin), panelW - 16, 3, 255, gold, 90, 255 ) QuestPetsRuletaClient.Text(panelX + 8, panelY + 23, "ICE DRAGON 3% | RARE 1%", panelW - 16, 3, 190, 220, 255, 255) local barX = panelX + 12 local barY = panelY + 41 local barW = panelW - 24 QuestPetsRuletaClient.Box(barX, barY, barW, 5, 0, 0, 0, 0.85) QuestPetsRuletaClient.Box(barX, barY, math.floor(barW * progress), 5, 0.95, 0.60 + (0.25 * pulse), 0.08, 0.95) local ledCount = 12 local ledW = math.floor((panelW - 22) / ledCount) local activeLed = math.floor(frame / 3) % ledCount for i = 0, ledCount - 1 do local alpha = 0.22 if i == activeLed then alpha = 0.95 end QuestPetsRuletaClient.Box(panelX + 6 + (i * ledW), panelY - 4, ledW - 2, 2, 1.0, 0.72, 0.12, alpha) end end