I don’t think there is something in the API that allows checking if the leaderboard is hidden. But I think a way to do it is finding the leaderboard in the CoreGui service and checking if its Transparency == 1 maybe.
Sorry I’m unable to test this in the moment
If you’re getting into the point where you want to know what’s happening with some Core UI, so you can do special things, I’d recommend just making the UI yourself. A custom playerlist wouldn’t be all that hard to implement. You’d just have to be checking when players enter the server & leave the server and put them into a table to iterate into the playerlist you make.
From there you can do all sorts of stuff of figuring out if it’s on or off, as well as adding extra features on top of it. If you’re worried about still having things like friend requests and what not, that’ll all still be covered in the CoreUI menu. I also believe it’s a feature you could put in, if I re-call correctly.
I don’t think this wold be very efficient but considering there’s no word on that from anyone else…
Couldn’t you just count how many times they’ve pressed tab and go from there, if the count was even they have it closed, if it’s odd (or 0) they have it open.
UserInputService does detect tab. If the player list is enabled, then GameProcessedEvent will be true because the PlayerList is using it. If this isn’t the case, you’ve found unexpected behaviour.
You can simply ignore GameProcessedEvent and proceed with your desired actions. Alternatively, you can run GetCoreGuiEnabled after detecting input and set the visibility to the negated result of the call.
A) Create a custom leaderboard and check if transparency or positioning is set to what you would like it as.
B) Use USERINPUTSERVICE as a way to detect if TAB is pressed on your keyboard.
Although CoreGUI Isn’t directly editable or accessible to users it is best to create a custom leaderboard using the Leaderboard CoreGUI template in which you can find online.