My script is inside of ServerScriptService and I'm trying to make it if you have the gamepass then it'll insert a gear into your backpack.
Note: I made it able so if you have the gamepass, it gives you a little title above your head, but can't figure out how to insert physical tools/models.
Here is the script:
local MS = game:GetService("MarketplaceService")
local VIPID = 7139894
local RS = game:GetService("ReplicatedStorage")
game.Players.PlayerAdded:Connect(function(Player)
Player.CharacterAdded:Connect(function(Character)
if MS:UserOwnsGamePassAsync(Player.UserId,VIPID)then
local Head = Character:WaitForChild("Head")
local VIP = RS:WaitForChild("VIP"):Clone()
VIP.Adornee = Head
VIP.Parent = Head
-- The rest is my sad attempt of trying to insert the gear from ReplicatedStorage to Backpack.
local BP = Character:WaitForChild("Backpack")
local VIP2 = RS:WaitForChild("FirstAid"):Clone()
VIP2.Parent = Backpack
end
end)
end)
