How would I know if a player purchased something while not in game but for example on the website?
A dev product cannot be purchased outside of the game.
I mean a gamepass, nevermind the dev products
There is no way to do this except checking ownership on the client until it is owned.
if u mean on website then check ur gamepass history or like or maybe check your robux history
They mean through a script in-game.
If you mean knowing your sales history, check the transactions tab in the robux window. If you mean in-game, you can use UserOwnsGamePassAsync to check if the player owns the pass.
This is cached on the server:
Caching Behavior
Results of this function are remembered so that repeated calls will return quicker. This function will always return true if the player owns the game pass upon first entering a server after having purchased the game pass. If the game pass is purchased in-game (through
PromptGamePassPurchase
), this function may return false due to the caching behavior. Conversely, should the player delete the game pass from their inventory, this function may return true despite the player not owning the game pass.