while wait(1)do for r,i in pairs(playerListFrame.PlayerHolder:GetChildren())do if i:IsA("\070\114\097\109\101")then i:Destroy()end end for r,i in pairs(game.Players:GetPlayers())do local j=(script:WaitForChild("\084\101\109\112\108\097\116\101")):Clone()j.Name=i.Name j.PlayerPicture.Image=game.Players:GetUserThumbnailAsync(i.UserId,Enum.ThumbnailType.HeadShot,Enum.ThumbnailSize.Size420x420)j.PlayerPicture.PlayerName.Text=i.Name j.Parent=playerListFrame.PlayerHolder j.Position=UDim2.new(.5,0,.5,0)end if#game.Players:GetPlayers()>=7 then playerListFrame.PlayerHolder.CanvasSize=UDim2.new(0,0,1.05+(#game.Players:GetPlayers()-7)*.15,0)else playerListFrame.PlayerHolder.CanvasSize=UDim2.new(0,0,0,0)end end
-- Updating the leaderboard
while wait(1) do
	-- Deletes everything until we make a frame
	for _, plrFrame in pairs(playerListFrame.PlayerHolder:GetChildren()) do
		if plrFrame:IsA("Frame") then
			plrFrame:Destroy()
		end
	end

	-- Making a frame for the player
	for i, plr in pairs(game.Players:GetPlayers()) do
		local template = script:WaitForChild("Template"):Clone()
		template.Name = plr.Name
		template.PlayerPicture.Image =
			game.Players:GetUserThumbnailAsync(plr.UserId, Enum.ThumbnailType.HeadShot, Enum.ThumbnailSize.Size420x420)
		template.PlayerPicture.PlayerName.Text = plr.Name
		template.Parent = playerListFrame.PlayerHolder
		template.Position = UDim2.new(0.5, 0, 0.5, 0)
	end

	if #game.Players:GetPlayers() >= 7 then
		playerListFrame.PlayerHolder.CanvasSize = UDim2.new(0, 0, 1.05 + ((#game.Players:GetPlayers() - 7) * 0.15), 0)
	else
		playerListFrame.PlayerHolder.CanvasSize = UDim2.new(0, 0, 0, 0)
	end
end
