Please provide explanation with your answers. Simply posting code does not spread knowledge of integral scripting processes which helps people understand the logic and reasoning behind your answer.
01 | local gear = game.Lighting.flag |
03 | local GamePassId = 163409880 |
05 | game.Players.PlayerAdded:connect( function (Player) |
06 | Player.CharacterAdded:connect( function () |
07 | if game:GetService( "MarketplaceService" ):PlayerOwnsAsset(Player ,GamePassId) then |
08 | local gearClone = gear:clone() |
09 | gearClone.Parent = Player.Backpack |
11 | local gearClone 2 = gear:clone() |
12 | gearClone 2. Parent = Player.Backpack |
The script will only work in online mode, if you experience errors there, then press F9 and tell us the output (red part with some blue lines explaining the problem).
I don't see why a admin has noted this answer, I did give explanation why the code was not working as intended, and that was because Starterpack is not in Player.