local Humanoid = script.Parent.Humanoid function PwntX_X() local tag = Humanoid:findFirstChild("creator") if tag ~= nil then if tag.Value ~= nil then local Leaderstats = tag.Value:findFirstChild("leaderstats") if Leaderstats ~= nil then Leaderstats.Points.Value = Leaderstats.Points.Value + 50 wait(0.1) script:remove() end end end end Humanoid.Died:connect(PwntX_X)
How can I turn my script so it works only when I own a game pass?
This script goes in the StarterCharacterScripts folder...
local MPS = game:GetService('MarketplaceService') local Player = game.Players.LocalPlayer if MPS:UserOwnsGamepassAsync(Player.UserId, 0) then -- change 0 to GamepassId. -- code here end