This non-local script in ServerScriptService checking to see if they have a gamepass …
If so on each spawn they get a “SportsDrink” … Im sure you can figure it out from here.
local Players = game:GetService("Players")
local MarketPlaceService = game:GetService("MarketplaceService")
local gamepassID = 123456789 -- BlueGmePass -- SportsDrink
function Spawned(player)
task.wait(1.1) local HasGamepass = false
local success, message = pcall(function()
HasGamepass = MarketPlaceService:UserOwnsGamePassAsync(player.userId, gamepassID)
end)
if not success then
warn("Checking Gamepass "..tostring(message))
return
end
if HasGamepass == true then
game.ServerStorage.Tools.SpeedDrink2:Clone().Parent = player.Backpack
end
end
game.Players.PlayerAdded:Connect(function(player)
player.CharacterAdded:Connect(function()
Spawned(player)
end)
end)