You can write your topic however you want, but you need to answer these questions:
-
What is the issue? Include enough details if possible!
Currently I have three gamepasses (x2, Pair Of Wings, Shield) and they work. However, when I / someone who owns these gamepasses, people who don’t own it can equip the hammers. -
What solutions have you thought of so far?
I have asked ChatGPT for help, using local scripts for the gamepass handler, used remote events to fire an event to the client to enable proximity prompts
game.Players.PlayerAdded:Connect(function(plr)
local hamgp = workspace:WaitForChild("GPHAMMER")
local gpservice = game:GetService("MarketplaceService")
local x2 = 911281044
local shield = 911747545
local wings = 911355175
if gpservice:UserOwnsGamePassAsync(plr.UserId, wings) then
hamgp:WaitForChild("PAW").Wings.Handle.Purchase.Enabled = false
hamgp:WaitForChild("PAW").Wings.Handle.ProximityPrompt.Enabled = true
else
hamgp:WaitForChild("PAW").Wings.Handle.Purchase.Enabled = true
hamgp:WaitForChild("PAW").Wings.Handle.Purchase.Triggered:Connect(function(plya)
gpservice:PromptGamePassPurchase(plya, wings)
end)
end
if gpservice:UserOwnsGamePassAsync(plr.UserId, shield) then
hamgp:WaitForChild("Shield").Hammer.Handle.Purchase.Enabled = false
hamgp:WaitForChild("Shield").Hammer.Handle.ProximityPrompt.Enabled = true
else
hamgp:WaitForChild("Shield").Hammer.Handle.Purchase.Enabled = true
hamgp:WaitForChild("Shield").Hammer.Handle.Purchase.Triggered:Connect(function(plya)
gpservice:PromptGamePassPurchase(plya, shield)
end)
end
if gpservice:UserOwnsGamePassAsync(plr.UserId, x2) then
local equip = workspace:WaitForChild("GPHAMMER"):WaitForChild("x2 gamepass").Union.ProximityPrompt
local owned = true
hamgp:WaitForChild("x2 gamepass").Union.ProximityPrompt.Enabled = false
script.Parent:WaitForChild("Script"):SetAttribute("X2", true)
else
hamgp:WaitForChild("x2 gamepass").Union.ProximityPrompt.Enabled = true
hamgp:WaitForChild("x2 gamepass").Union.ProximityPrompt.Triggered:Connect(function(plya)
gpservice:PromptGamePassPurchase(plya, x2)
end)
end
end)
Yes, I know i am using a server script so basically if its enabled or disabled for one its actually like that for all. I just don’t know where to start to fix this issue