Hey everyone! I need some help with this script, where if you own a gamepass, you unlock the knife. I tried changing the local PackName to the gamepass name, but I don’t think that’s quite right, since im new to scripting.
local shopData = {
Texture = 'rbxassetid://881557754';
Mesh = "rbxassetid://79401392",
MeshSize = Vector3.new(1, 1, 1);
ShopHandleOffset = CFrame.new() * CFrame.Angles(math.rad(-90),math.rad(0),math.rad(0));
ItemDescription = "lol this is sample";
ItemName = "Tix Bullets";
Price = 3000;
TierName = "CUSTOM",
OwnerData = {"Coding_Abudiak", "https://www.roblox.com/Thumbs/Avatar.ashx?x=420&y=420&username=Nettimato", "Coding_Abudiak"}
}
local importance = 999
local PackName = "Tix Pack"
local function CanDisplay(PlayerData, name)
if _G.CLIENT_DATA ~= nil and _G.CLIENT_DATA.PlayerSession ~= nil then
return _G.CLIENT_DATA.PlayerSession["Owned_Passes"][PackName] -- Name of the pack
end
return false
end
return {shopData, importance, CanDisplay}