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

Commit

Permalink
Closes #98
Browse files Browse the repository at this point in the history
  • Loading branch information
Pluviolithic committed Dec 2, 2023
1 parent b116a55 commit 0017979
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/client/UI/Combat/FearMeter.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ local RunService = game:GetService "RunService"
local StarterPlayer = game:GetService "StarterPlayer"
local CollectionService = game:GetService "CollectionService"
local ReplicatedStorage = game:GetService "ReplicatedStorage"
local MarketplaceService = game:GetService "MarketplaceService"

local doubleFearMeterID = ReplicatedStorage.Config.GamepassData.IDs["2xFearMeter"].Value
local Client = StarterPlayer.StarterPlayerScripts.Client
local player = Players.LocalPlayer

Expand Down Expand Up @@ -62,6 +64,10 @@ playerStatePromise:andThen(function()
fearMeter.Background.Visible = true
end

fearMeter.Background.Activated:Connect(function()
MarketplaceService:PromptGamePassPurchase(player, doubleFearMeterID)
end)

updateBarSize(store:getState(), bar)
updateBarText(store:getState(), fearMeter.Fear)
store.changed:connect(function(newState, oldState)
Expand Down

0 comments on commit 0017979

Please sign in to comment.