Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

This gamepass gui isnt working some reason?howww

Asked by
iuclds 720 Moderation Voter
4 years ago

Please provide more explanation in your question. If you explain exactly what you are trying to accomplish, it will be much easier to answer your question correctly.
wait(.5)
local Product = 6862697 
local player = game.Players.LocalPlayer

script.Parent.MouseButton1Click:connect(function()
game:GetService("MarketplaceService"):PromptPurchase(player, Product)
end)
game.Players.PlayerAdded:connect(function(player)
    if game:PlayerHasPass(player,6862697) then
    player.DoublePassValue = true
end
end)
0
First, are you using a local script? Second, I don't think game has a parameter called "PlayerHasPass" that is part of the GamePassService. Just_Moop 27 — 4y

1 answer

Log in to vote
1
Answered by 4 years ago
Edited 4 years ago

Create a local script in ReplicatedFirst

local Product = 6862697 
local player = game.Players.LocalPlayer

script.Parent.MouseButton1Click:Connect(function()
    game:GetService("MarketplaceService"):PromptPurchase(player, Product)
end)

Create a server script in ServerScriptService

local Product = 6862697

game.Players.PlayerAdded:Connect(function(player)
    if game:PlayerHasPass(player,Product) then
        player.DoublePassValue = true --// Not sure what this is doing, but if DoublePassValue is a BoolValue then you'll need to put "player.DoublePassValue.Value = true"
    end
end)

Ad

Answer this question