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

Hat given as a gamepass? (I'd like it per respawn, not per join!)

Asked by 9 years ago

Hey guys,

I have a gamepass that will give the buyer a GoPo, but I don't know how to give them the hat! Does anyone know?

I have an idea for the script here!

local passid = 256633733
local tools = {"GoPro"}
local GamePassService = Game:GetService('GamePassService')
game.Players.PlayerAdded:connect(function(player)
repeat wait(0.1) until player.Hats  -- Yay non-existant variables! xD
if GamePassService:PlayerHasPass(player, passid) then
for i = 1,#tools do
game.Lighting:FindFirstChild(tools[i]):Clone().Parent = player.Hats -- Yup, no idea...
end
end
end)

Cheers in advanced,

Michael

Answer this question