Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local MarketplaceService = game:GetService("MarketplaceService")
- local Players = game:GetService("Players")
- local gamePassID =
- function onPlayerSpawned(player)
- local hasPass = false
- local success, message = pcall(function()
- hasPass = MarketplaceService:UserOwnsGamePassAsync(player.userId, gamePassID)
- end)
- if not success then
- warn("Error while checking if player has pass: " .. tostring(message))
- return
- end
- if hasPass == true then
- game.ServerStorage.NombreExacto:clone().Parent = player.Backpack
- end
- end
- game.Players.PlayerAdded:connect(function(player)
- player.CharacterAdded:connect(function()
- onPlayerSpawned(player)
- end)
- end)
- Players.PlayerSpawned:Connect(onPlayerSpawned)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement