Skip to content
This repository has been archived by the owner on Oct 19, 2024. It is now read-only.

Commit

Permalink
Make triple hatch use cached pass ownership
Browse files Browse the repository at this point in the history
  • Loading branch information
Pluviolithic committed Dec 16, 2023
1 parent 5f4f4a0 commit a7e9974
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions src/server/Random/EggHatcher/init.lua
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
local ReplicatedStorage = game:GetService "ReplicatedStorage"
local MarketplaceService = game:GetService "MarketplaceService"
local ServerScriptService = game:GetService "ServerScriptService"

local rarities = require(script.Rarities)
Expand Down Expand Up @@ -124,13 +123,7 @@ Remotes.Server:Get("HatchEggs"):SetCallback(function(player: Player, count: numb
return results
end

local success, message =
pcall(MarketplaceService.UserOwnsGamePassAsync, MarketplaceService, player.UserId, tripleHatchGamepassID)

if not success then
warn("Failed to verify 3x gamepass ownership: " .. message)
return nil
elseif not message then
if not selectors.hasGamepass(store:getState(), player.Name, tripleHatchGamepassID) then
return nil
end

Expand Down

0 comments on commit a7e9974

Please sign in to comment.