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

How would i give a weapon to a player if they bought a GamePass?

I have seen places with gamepasses if you buy It it will give you a Weapon how can I do this?

1 comment

0

Studio>Edit>Game Stuff>Game Pass hop that helps

5 answers

✓ Accepted answer

Ok.. If you go to Studio>Edit>Game Stuff>Game Pass: Admin Tools, then go to GamePassId, change the Value to your Gamepass Number, but the Model for the Tools is not going to be in Game Pass: Admin Tools, read the script and you'll figure it out soon enough.

I hope this helped. ;)

If you go to Toolbox, you can see the Game Stuff set by ROBLOX, go to it, and look at the scripts, one should have what you're looking for.

It only uses gears

1 comment

0

Why Accept his answer, I said the same exact thing.

Simple, use this script.

gpid = 156616083 -- Gamepass ID
tools = {"Sword"} --Sword name

GPS = game:GetService("GamePassService")
game:GetService("Players").PlayerAdded:connect(function(player)
player.CharacterAdded:connect(function(char)
if char:FindFirstChild("Humanoid") ~= nil then
print("Has humanoid")
if GPS:PlayerHasPass(player, gpid) then
print("Has pass")
for _,v in pairs(tools) do
if game:GetService("Lighting"):FindFirstChild(v) then
game:GetService("Lighting"):FindFirstChild(v):clone().Parent = player.Backpack
end
end
print("Has tools")
else
print("Doesn't own pass")
end
end
end)
end)

Hope this helped. Also, this is looped. When a player dies, they still keep the sword. Also, remember ; You need to change the Gamepass ID and Sword name for this to work.

Check for Game Passes here. just make the Script they gave u, then make sure u define the directory of the tool, then, (a Player is already defined so...) type Player.Character as the cloned() version of the Tool's Parent.

Simple, Use this script. gpid = [Insert GP ID Here] -- Gamepass ID tools = {"[Insert Tool Name Here ( Do not remove the speech marks)]"} --Tool Name

GPS = game:GetService("GamePassService") game:GetService("Players").PlayerAdded:connect(function(player) player.CharacterAdded:connect(function(char) if char:FindFirstChild("Humanoid") ~= nil then print("Has humanoid") if GPS:PlayerHasPass(player, gpid) then print("Has pass") for _,v in pairs(tools) do if game:GetService("Lighting"):FindFirstChild(v) then game:GetService("Lighting"):FindFirstChild(v):clone().Parent = player.Backpack end end

Insert this into a script added in Workspace

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