This will only return true on the client. To make it secure, check on the server. If it’s a local item, you can’t really prevent it (as anything local on the client can be modified by an exploiter).
im pretty sure it does because the invoke server is returning Marketplace:UserOwnsGamePass from the server side to the client meaning exploiters cant bypass it by changing the client version.
Sorry to bring this thread back, but I believe the players character in an exception, sorta. All items are automatically synced among server and client within a players character (instances, atleast) so you can shove some things in there. I did it for a few anti cheats and I would just have it check characters for it since if they destroy it locally itll be synced and show on the server.
Replication on Roblox has a lot of exceptions when it comes to working with characters, humanoids, and guis. There’s a lot of rough edges because these things have existed for quite a while.
The main point of this post is to never trust the client and always validate their requests on the server.
okay what ever u say pall when the injected script is changing “game:GetService(“MarketplaceService”).UserOwnsGamePassAsync”
vs what ur recieving from a remote function🤷‍♂️
that would also be hooked by a namecall hook on the games metatable.
local namecall;
namecall = hookmetamethod(game, "__namecall", function(self, ...)
if self == game.ReplicatedStorage.CheckOwned and getnamecallmethod() == "InvokeServer" then
return true
end
return namecall(self, ...)
end)