#gamepass that gives who has it mod

25 messages · Page 1 of 1 (latest)

winged moat
#

basically, im creating a race director gamepass, that when you buy it, you get access of it, i dont know tho what should i do, the script is here:


------------------------------------------------------------------

local plr = game.Players.LocalPlayer
local ismod = false

for _,mod in pairs(mods) do
    if mod == plr.Name then
        ismod = true
    end
end

if plr:GetRankInGroup(0) >= 100 or ismod then -- groupId & groupRank
    
    script.Parent.Control.Visible = true
    
end```
polar forgeBOT
#

studio** You are now Level 1! **studio

winged moat
#

btw the race director thing is a gui

rugged flume
#

because there's no where in the script that checks if the player owns a gamepass

#

it's only checking if they're in a group or have a specific userid

#

or name i mean

winged moat
rugged flume
#

well if you want the gui to open if a player owns a gamepass you would use marketplace service to call the function userownsgamepassaync

#

I would show you an example but I'm on mobile

#

so I can't really code anything

winged moat
#

i tried this but it doenst work

local GamepassID = 1045289582 -- Change this ID to your Gamepass ID
local mods = {"16lcx_s"} -- mod list

------------------------------------------------------------------

local plr = game.Players.LocalPlayer
local ismod = false

for _,mod in pairs(mods) do
    if mod == plr.Name or MarketplaceService:UserOwnsGamePassAsync(GamepassID) then
        ismod = true
        
    end
end

if plr:GetRankInGroup(0) >= 100 or ismod then -- groupId & groupRank
    
    script.Parent.Control.Visible = true
    
end```

btw im new at scripting
rugged flume
#

I can help you later though

winged moat
rugged flume
winged moat
#

np

rugged flume
#

it defines the ID yes

#

but never actually calls a function to check if they own said gamepass

#

where did you get that script?

#

assuming you didn't make it

winged moat
#

the race director script is from a model that i use for ro-racing

winged moat
rugged flume
#

yes you did what you're supposed to but then forgot to actually make the function check if the player owns the gamepass

#

ill just help you when I get home

#

where I can code

winged moat
#

okay