Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How to Make It So If They Buy My Game Pass They WIll Have Special Items?

im thinking how to do the script but im completely blank please and thank you if you can help me :)

2 answers

wait(2)

gpid = 1 -- Put your gamepass ID here.
tools = {"tool1", "tool2", "tool3"} -- Put the tools in Lighting, and their names here.

GPS = Game:GetService("GamePassService")
function respawned(char)
player = game.Players:FindFirstChild(char.Name)
print("Respawned")
if char:FindFirstChild("Head") ~= nil then
print("Player")
if GPS:PlayerHasPass(player, gpid) then
print("Has GPID")
for i = 1,#tools do
game.Lighting:FindFirstChild(tools[i]):Clone().Parent = player.Backpack
end
else
print("No GPID")
end
end
end
game.Workspace.ChildAdded:connect(respawned)

1 comment

0

thanks!

Adding to c0des answer; this is 2014, the best place to store things is ServerStorage.

This discussion is preserved as it was. New answers, comments, and votes are closed.