#Gamepass Pad Help Script
86 messages · Page 1 of 1 (latest)
Replace plr:HasGamepassAsync to return game:GetService("MarketplaceService"):UserOwnsGamePassAsync(plr.UserId, gamePassId)
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 ?
to where
Replace that with return game:GetService("MarketplaceService"):UserOwnsGamePassAsync(plr.UserId, gamePassId)
Yes
Ye
Yeah now
lemme test
?
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
It's debounce = true btw
?
If the player does not have the gamepass, how can I make it appear on the gamepass purchase screen?
Try it now
Should look like this at the bottom:
else
print("Player does not have the GamePass!")
end
debounce = true
end
nice
how can i add it ?
Right
Add a local MarketplaceService = game:GetService("MarketplaceService")
on top of the script
Replace this
With
else
print("Player does not have the GamePass! Prompting purchase")
MarketplaceService:PromptGamePassPurchase(plr, gamePassId)
end
debounce = true
end
** You are now Level 3! **
this ?
ok
yes
noice
Later on