I want to give players who own my gamepass a special weapon to use in the game. How do I do this?
✓ ANSWER ACCEPTED
How do you make a gamepass that gives you a weapon?
1 answer
✓ Accepted answer
Server script
local gamepassId = 123 --replace with the id of your gamepass
local specialWeapon = game:GetService("ServerStorage").SpecialWeapon --replace with the path to the weapon
game:GetService("Players").PlayerAdded:Connect(function(plr)
if game:GetService("MarketplaceService"):UserOwnsGamePassAsync(plr.UserId, gamepassId) then
plr.CharacterAdded:Wait()
specialWeapon:Clone().Parent = plr:WaitForChild("StarterGear")
specialWeapon:Clone().Parent = plr:WaitForChild("Backpack")
end
end)
This discussion is preserved as it was. New answers, comments, and votes are closed.

1 comment
Ty so much :)