Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do you make this give you a tool? ( un solved)

Asked by 10 years ago
local id = 103728213

game.Players.PlayerAdded:connect(function(player)
    local HasPass = Game:GetService("GamePassService"):PlayerHasPass(player, id)
    print(player.Name .. (HasPass and " has" or " doesn't have").. " the game pass!")
end)
0
Please place your code in a code block. M39a9am3R 3210 — 10y

1 answer

Log in to vote
1
Answered by
M39a9am3R 3210 Moderation Voter Community Moderator
10 years ago
local id = 103728213

game.Players.PlayerAdded:connect(function(player)
    local HasPass = Game:GetService("GamePassService"):PlayerHasPass(player, id)
    if player:FindFirstChild("Backpack") then
    game.ServerStorage["ToolName"]:Clone().Parent = player.Backpack --It is recommended you have Server storage as a storage unit rather than lighting.
    end
end)
Ad

Answer this question