function module.CreateCredits(r)cf:ClearPage(creditsFrame)local i=0 for r,j in pairs(credits)do local t=6 for r,j in pairs(j)do local x if r==1 then x=template1:Clone()t=j[1]x.BackgroundColor3=Color3.fromRGB(95,95,95)x.TextLabel.TextColor3=Color3.fromRGB(255,255,255)x.TextLabel.Text=j[2]x.Parent=creditsFrame else x=template2:Clone()x.Parent=creditsFrame x.UIAspectRatioConstraint.AspectRatio=t x.BackgroundColor3=cf:GetLabelBackgroundColor(r)x.PlrName.Text=j[1]x.PlayerImage.Image=cf:GetUserImage(cf:GetUserId(j[1]))local i=x.PlayerImage.AbsoluteSize.Y x.PlayerImage.Size=UDim2.new(0,i,1,0)for r=1,3,1 do local E=x:FindFirstChild("\068\101\115\099"..r)if E then local H=j[2][r]if H then E.Text=H else E.Text=""end local O=i*1.15 local n local C local R if t<=5 then n=.33+(r-1)*.25 C=.255 R=.31 else n=.36+(r-1)*.25 C=.26 R=.32 end E.Position=UDim2.new(0,O,n,0)E.Size=UDim2.new(.75,0,C,0)x.PlrName.Position=UDim2.new(0,O,x.PlrName.Position.Y.Scale,x.PlrName.Position.Y.Offset)x.PlrName.Size=UDim2.new(.75,0,R,0)end end end x.Name="\076\097\098\101\108"x.Visible=true i=i+x.AbsoluteSize.Y end end creditsFrame.CanvasSize=UDim2.new(0,0,0,i)end return module
--MainFunction
function module:CreateCredits()
	cf:ClearPage(creditsFrame)
	local totalY = 0
	for _, updateGroup in pairs(credits) do
		local aspectRatio = 6
		for i, v in pairs(updateGroup) do
			local label
			if i == 1 then
				label = template1:Clone()
				aspectRatio = v[1]
				label.BackgroundColor3 = Color3.fromRGB(95, 95, 95)
				label.TextLabel.TextColor3 = Color3.fromRGB(255, 255, 255)
				label.TextLabel.Text = v[2]
				label.Parent = creditsFrame
			else
				label = template2:Clone()
				label.Parent = creditsFrame
				label.UIAspectRatioConstraint.AspectRatio = aspectRatio
				label.BackgroundColor3 = cf:GetLabelBackgroundColor(i)
				label.PlrName.Text = v[1]
				label.PlayerImage.Image = cf:GetUserImage(cf:GetUserId(v[1]))
				local labelSizeX = label.PlayerImage.AbsoluteSize.Y
				label.PlayerImage.Size = UDim2.new(0, labelSizeX, 1, 0)
				for i = 1, 3 do
					local descLabel = label:FindFirstChild("Desc" .. i)
					if descLabel then
						local desc = v[2][i]
						if desc then
							descLabel.Text = desc
						else
							descLabel.Text = ""
						end
						local xOffset = labelSizeX * 1.15
						local yScalePos
						local yScaleSize
						local yScaleSize2
						if aspectRatio <= 5 then
							yScalePos = 0.33 + ((i - 1) * 0.25)
							yScaleSize = 0.255
							yScaleSize2 = 0.31
						else
							yScalePos = 0.36 + ((i - 1) * 0.25)
							yScaleSize = 0.26 -- Size
							yScaleSize2 = 0.32 -- Pos
						end
						descLabel.Position = UDim2.new(0, xOffset, yScalePos, 0)
						descLabel.Size = UDim2.new(0.75, 0, yScaleSize, 0)
						label.PlrName.Position =
							UDim2.new(0, xOffset, label.PlrName.Position.Y.Scale, label.PlrName.Position.Y.Offset)
						label.PlrName.Size = UDim2.new(0.75, 0, yScaleSize2, 0)
					end
				end
			end
			label.Name = "Label"
			label.Visible = true
			totalY = totalY + label.AbsoluteSize.Y
		end
	end
	creditsFrame.CanvasSize = UDim2.new(0, 0, 0, totalY)
end

return module
