local mps = game:GetService("MarketplaceService") local gamepass_id = 7142544 game.Players.PlayerAdded:Connect(function(player) if mps:UserOwnsGamePassAsync(player.UserId, gamepass_id) then game.ServerStorage.Gun:Clone().Parent = player:WaitForChild("Backpack") game.ServerStorage.Gun:Clone().Parent = player:WaitForChild("PlayerGear") end end) game.ReplicatedStorage.Give.OnServerEvent:connect(function(player) game.ServerStorage.Gun:Clone().Parent = player:WaitForChild("Backpack") game.ServerStorage.Gun:Clone().Parent = player:WaitForChild("PlayerGear") end) --------------------------------------------- And here's The second one! --------------------------------------------- local mps = game:GetService("MarketplaceService") local gamepass_id = 7142544 script.Parent.MouseButton1Click:connect(function() local player = game.Players.LocalPlayer mps:PromptGamePassPurchase(player, gamepass_id) end) mps.PromptGamePassPurchaseFinished:connect(function(player, id, purchased) if id == gamepass_id and purchased then game.ReplicatedStorage.Give:FireServer() end end)
Do you have your process receipt function set up? According to this page,
"For developer product purchase prompts, connect to >MarketplaceService.PromptProductPurchaseFinished. In order to process such purchases you >need to set the ProcessReceipt callback in a single script."
Also, check if the gamepass was purchased on the server instead of firing an event from the player. Hackers can just fire that event and it acts like they bought the gamepass.