Ok,so this is part of a script but I am trying to make it so if the person owns the game pass they get double XP and Double Gold, so I made two values name "PassXP" and "PassGold" but it seems to not give them the double,the non-owners get the original values "XP" and "Gold"
function Died()
local tag = script.Parent.Human:FindFirstChild("creator")
if tag ~= nil then
if tag.Value ~= nil then
local Leaderstats = tag.Value:FindFirstChild("leaderstats")
if script.Parent.SETTINGS:FindFirstChild("XP") ~= nil and script.Parent.SETTINGS:FindFirstChild("Gold") ~= nil then
Module.AddStats(Leaderstats, script.Parent.SETTINGS.XP.Value, script.Parent.SETTINGS.Gold.Value)
else print("Can't find XP and Gold!")
end
end
end
end
script.Parent.Human.Died:connect(Died)
local passid = 382015968
local GamePassService = game:GetService("GamePassService")
if GamePassService:PlayerHasPass(player, passid) then
function Died()
local tag = script.Parent.Human:FindFirstChild("creator")
if tag ~= nil then
if tag.Value ~= nil then
local Leaderstats = tag.Value:FindFirstChild("leaderstats")
if script.Parent.SETTINGS:FindFirstChild("PassXP") ~= nil and script.Parent.SETTINGS:FindFirstChild("PassGold") ~= nil then
Module.AddStats(Leaderstats, script.Parent.SETTINGS.XP.Value, script.Parent.SETTINGS.Gold.Value)
else print("Can't find XP and Gold!")
end
end
end
end

1 comment
no work D: gives nothing... doesnt even give the original XP and Gold