#Gamepass Pad Help Script

86 messages · Page 1 of 1 (latest)

kind templeBOT
#

studio** You are now Level 2! **studio

sharp drift
vagrant lake
#

ChatGPT is bad at scripts

#

It forgets Marketplace stuff

sharp drift
#

can u fix it ?

#

@vagrant lake

#

pls

vagrant lake
# sharp drift

Replace plr:HasGamepassAsync to return game:GetService("MarketplaceService"):UserOwnsGamePassAsync(plr.UserId, gamePassId)

sharp drift
#

local pad = script.Parent
local characterName = "Morph"
local character = pad.Parent:WaitForChild(characterName)

local RS = game:GetService("ReplicatedStorage")
local GuiVisibleEvent = RS.Events:WaitForChild("Enabled")

local debounce = true
local gamePassId = 1072181629 -- GamePass ID (Buradaki ID'nin doğru olduğundan emin olun)

pad.Touched:Connect(function(obj)
local plr = game.Players:GetPlayerFromCharacter(obj.Parent)
if plr and debounce == true then
-- GamePass'a sahip olup olmadığını kontrol etmek için PlayerHasGamePassAsync kullanıyoruz
local success, hasGamePass = pcall(function()
return plr:HasGamePassAsync(gamePassId) -- PlayerHasGamePassAsync ile değiştirilebilir
end)

    if success then
        if hasGamePass then
            print("Player has the GamePass!")
            debounce = false

            pad.BrickColor = BrickColor.new("Really red")
#

the half of script

#

can u fix

#

i don't know where to replace lol ?

vagrant lake
#

I said replace this

sharp drift
#

to where

vagrant lake
#

Replace that with return game:GetService("MarketplaceService"):UserOwnsGamePassAsync(plr.UserId, gamePassId)

sharp drift
#

oh

#

here ?

vagrant lake
#

Yes

sharp drift
#

this right ?

vagrant lake
#

Now replace this

#

to: if plr and debounce then
debounce = false

vagrant lake
sharp drift
#

this. ?

vagrant lake
#

Yeah now

sharp drift
#

lemme test

vagrant lake
#

No wait

#

Wait

sharp drift
#

?

vagrant lake
# sharp drift

Add a debounce = true under print("Player does not have the Gamepass")

#

When you're done that, finally remove this

#

And when you're done tha, you can test it

sharp drift
#

this ?

vagrant lake
#

Bottom end

sharp drift
#

ok

#

i changed it

#

can i ask 1 more question ?

vagrant lake
#

It's debounce = true btw

vagrant lake
sharp drift
#

If the player does not have the gamepass, how can I make it appear on the gamepass purchase screen?

vagrant lake
#

Try it now

#

Should look like this at the bottom:

#

else
print("Player does not have the GamePass!")
end

    debounce = true
end
sharp drift
#

i test it

#

tested it

#

the script

#

is working now

vagrant lake
#

nice

sharp drift
vagrant lake
#

Add a local MarketplaceService = game:GetService("MarketplaceService")

#

on top of the script

sharp drift
#

alr

#

@vagrant lake

vagrant lake
#

Replace this

#

With

#

else
print("Player does not have the GamePass! Prompting purchase")

        MarketplaceService:PromptGamePassPurchase(plr, gamePassId)
    end

    debounce = true
end
sharp drift
kind templeBOT
#

studio** You are now Level 3! **studio

sharp drift
#

this ?

vagrant lake
#

No gang

#

remove the
else
print("Player does not have the GamePass!")
end

sharp drift
#

ok

vagrant lake
#

And also you don't neeed a debounce = true on top of that

#

You already have one

sharp drift
#

tihs ?

vagrant lake
#

yes

sharp drift
#

i didn't get the gamepass thing

#

i fixed it its work now !

vagrant lake
#

noice

sharp drift
#

can u help me while making game ?

#

fix the errors ?

vagrant lake
#

Later on

sharp drift
#

add me friend

#

and thanks for ur help