Ok gamers, I’m genuinely confused about how everyone is doing this. I’m not a big scripter guy or one to stick around during tutorials; BUT I’ve looked everywhere and have no idea how to do this! I have a gamepass, and I want to make it so that when people buy it, they are given a tool. Not a gamepass, a tool. This might not even be even in the right place! Please help, I’m confused. I just want my players who bought me gamepass to be happy. pls help
1 Like
A gamepass can be a tool. You purchase a gamepass, it gives a tool.
local MPS = game:GetService("MarketPlaceService")
local players = game:GetService("Players")
local gamepassID = 0000000 - -Your gamepass ID
game.Players.PlayerAdded:Connect(function(player)
if MPS:UserOwnsGamePassAsync(player.UserId, gamepassID) then
game.ServerStorage.Your_Tool:Clone().Parent = player.Backpack --Destination to tool. Clone & Parent it to the player's Backpack
end
end)
I recommend you check out this article. All you needed to do was clone and parent the tool. If you want to save it, use DataStores. There’s plenty of resources about that.
3 Likes
Thanks for being a good comrade and sharing this script! Very helpful.