How to create a tool gamepass - Roblox Studio tutorial #5

Published: 16 August 2024
on channel: fil1pex
687
18

script:
local Players = game:GetService("Players")
local MarketPlaceService = game:GetService("MarketplaceService")
local GamepassID = YOUR GAMEPASS ID

Players.PlayerAdded:Connect(function(player)
player.CharacterAdded:Connect(function(character)
if game.ReplicatedStorage:FindFirstChildOfClass("Tool") and GamepassID ~= 0 then
if MarketPlaceService:UserOwnsGamePassAsync(player.UserId, GamepassID) then
game.ReplicatedStorage:FindFirstChildOfClass("Tool"):Clone().Parent = player.Backpack
end
end
end)
end)

Please leave a like and subscribe, i'm giving my best to make these tutorials!

Song: Careful Steps