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

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

Asked by 10 years ago

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

0
Studio>Edit>Game Stuff>Game Pass hop that helps PlayableReviews 0 — 7y

5 answers

Log in to vote
2
Answered by 10 years ago

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. ;)

Ad
Log in to vote
1
Answered by 10 years ago

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

0
Why Accept his answer, I said the same exact thing. Grenaderade 525 — 10y
Log in to vote
0
Answered by 10 years ago

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.

Log in to vote
0
Answered by
KAAK82 16
10 years ago

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.

Log in to vote
0
Answered by 3 years ago

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

Answer this question