MaxproGlitcher

Untitled

Apr 10th, 2026 (edited)
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.94 KB | None | 0 0
  1. local HttpService = game:GetService("HttpService")
  2.  
  3.  
  4. local function httpRequest(url)
  5. local reqFunc = (syn and syn.request) or (http and http.request) or (fluxus and fluxus.request) or request
  6. local success, res
  7. if reqFunc then
  8. success, res = pcall(function() return reqFunc({Url = url, Method = "GET"}).Body end)
  9. end
  10. if not success or not res then
  11. success, res = pcall(function() return game:HttpGet(url) end)
  12. end
  13. return success and res or nil
  14. end
  15.  
  16.  
  17. local gui = Instance.new("ScreenGui")
  18. gui.Name = "RolimonsCharts"
  19. gui.Parent = game:GetService("CoreGui")
  20. gui.ResetOnSpawn = false
  21.  
  22. local frame = Instance.new("Frame")
  23. frame.Parent = gui
  24. frame.Size = UDim2.new(0, 750, 0, 500)
  25. frame.Position = UDim2.new(0.5, -375, 0.5, -250)
  26. frame.BackgroundColor3 = Color3.fromRGB(20, 20, 25)
  27. Instance.new("UICorner", frame)
  28. frame.Active = true
  29. frame.Draggable = true
  30.  
  31. local title = Instance.new("TextLabel")
  32. title.Parent = frame
  33. title.Size = UDim2.new(1, 0, 0, 50)
  34. title.BackgroundTransparency = 1
  35. title.Text = "Top 30 Roblox Games (Rolimons)"
  36. title.Font = Enum.Font.GothamBold
  37. title.TextColor3 = Color3.fromRGB(255, 255, 255)
  38. title.TextSize = 20
  39.  
  40. local loadingTxt = Instance.new("TextLabel")
  41. loadingTxt.Parent = frame
  42. loadingTxt.Size = UDim2.new(1, 0, 1, -50)
  43. loadingTxt.Position = UDim2.new(0, 0, 0, 50)
  44. loadingTxt.BackgroundTransparency = 1
  45. loadingTxt.Text = "Tri des jeux les plus populaires..."
  46. loadingTxt.TextColor3 = Color3.fromRGB(150, 150, 150)
  47. loadingTxt.Font = Enum.Font.GothamMedium
  48.  
  49. local scroll = Instance.new("ScrollingFrame")
  50. scroll.Parent = frame
  51. scroll.Size = UDim2.new(1, -20, 1, -70)
  52. scroll.Position = UDim2.new(0, 10, 0, 60)
  53. scroll.BackgroundTransparency = 1
  54. scroll.Visible = false
  55. scroll.ScrollBarThickness = 4
  56. scroll.AutomaticCanvasSize = Enum.AutomaticSize.Y
  57.  
  58. local layout = Instance.new("UIGridLayout")
  59. layout.Parent = scroll
  60. layout.CellSize = UDim2.new(0, 165, 0, 210)
  61. layout.CellPadding = UDim2.new(0, 12, 0, 12)
  62. layout.HorizontalAlignment = Enum.HorizontalAlignment.Center
  63.  
  64. local function createCard(name, uId, players)
  65. local card = Instance.new("Frame")
  66. card.BackgroundColor3 = Color3.fromRGB(30, 30, 40)
  67. card.Parent = scroll
  68. Instance.new("UICorner", card)
  69.  
  70. local img = Instance.new("ImageLabel")
  71. img.Parent = card
  72. img.Size = UDim2.new(1, 0, 0, 140)
  73. img.Image = "rbxthumb://type=GameIcon&id=" .. uId .. "&w=150&h=150"
  74. img.BackgroundTransparency = 1
  75. Instance.new("UICorner", img)
  76.  
  77. local txt = Instance.new("TextLabel")
  78. txt.Parent = card
  79. txt.Size = UDim2.new(1, -10, 0, 35)
  80. txt.Position = UDim2.new(0, 5, 0, 145)
  81. txt.Text = name
  82. txt.TextColor3 = Color3.fromRGB(255, 255, 255)
  83. txt.BackgroundTransparency = 1
  84. txt.TextWrapped = true
  85. txt.Font = Enum.Font.GothamMedium
  86. txt.TextSize = 12
  87.  
  88. local pCount = Instance.new("TextLabel")
  89. pCount.Parent = card
  90. pCount.Size = UDim2.new(1, -10, 0, 20)
  91. pCount.Position = UDim2.new(0, 5, 0, 180)
  92. pCount.Text = "👤 " .. players
  93. pCount.TextColor3 = Color3.fromRGB(0, 255, 150)
  94. pCount.BackgroundTransparency = 1
  95. pCount.Font = Enum.Font.GothamBold
  96. end
  97.  
  98.  
  99. local function fetch()
  100. local res1 = httpRequest("https://api.rolimons.com/games/v1/gamelist")
  101. if not res1 then loadingTxt.Text = "Erreur Rolimons"; return end
  102.  
  103. local data1 = HttpService:JSONDecode(res1)
  104. if not data1 or not data1.success then return end
  105.  
  106. -- On transforme le dictionnaire en liste pour pouvoir le trier
  107. local gameList = {}
  108. for id, info in pairs(data1.games) do
  109. table.insert(gameList, {
  110. id = id,
  111. playerCount = info[2] or 0
  112. })
  113. end
  114.  
  115.  
  116. table.sort(gameList, function(a, b)
  117. return a.playerCount > b.playerCount
  118. end)
  119.  
  120.  
  121. local top30Ids = {}
  122. local stats = {}
  123. for i = 1, 30 do
  124. local gameData = gameList[i]
  125. if gameData then
  126. table.insert(top30Ids, gameData.id)
  127. stats[tostring(gameData.id)] = gameData.playerCount
  128. end
  129. end
  130.  
  131.  
  132. local res2 = httpRequest("https://games.roblox.com/v1/games?universeIds=" .. table.concat(top30Ids, ","))
  133. if res2 then
  134. local data2 = HttpService:JSONDecode(res2)
  135.  
  136.  
  137. table.sort(data2.data, function(a, b)
  138. return (stats[tostring(a.universeId)] or 0) > (stats[tostring(b.universeId)] or 0)
  139. end)
  140.  
  141. if loadingTxt then loadingTxt:Destroy() end
  142. scroll.Visible = true
  143.  
  144. for _, gameInfo in ipairs(data2.data) do
  145. local uId = tostring(gameInfo.universeId)
  146. local p = stats[uId] or 0
  147.  
  148.  
  149. local formattedPlayers = p >= 1000 and string.format("%.1fk", p/1000) or tostring(p)
  150. createCard(gameInfo.name, uId, formattedPlayers)
  151. end
  152. else
  153. loadingTxt.Text = "Erreur Roblox"
  154. end
  155. end
  156.  
  157. task.defer(fetch)
Advertisement
Add Comment
Please, Sign In to add comment