Hey, I’m not really a scripter and the scripter who worked in my development team left, which pretty much means that I’m having ridiculous problems with the scripting department of my group. So I got my friend to make this script. It’s basically a gamepass script as in: If you buy the gamepass with this ID you’ll get this tool (in this case the shortblade). I’ve tried several times in different games even. I’ve put the Script itself in workspace and the Shortblade in lightning as it says in the script but it just can’t seem to work. Would truly appreciate if anyone could help me out and see whats wrong because I’m going to be launching advertisements tomorrow and I really need this script to be prepared.
wait(2)
id = 3730293 --Put that id here
tools = {"Bow"}
MPS = game:GetService("MarketplaceService")
function respawned(char)
local player = game.Players:FindFirstChild(char.Name)
print("Character Respawned")
if char:FindFirstChild("Head") ~= nil then
print("Real Player")
if MPS:PlayerOwnsAsset(player, id) then
print("Player Owns")
for i = 1,#tools do
game.Lighting:FindFirstChild(tools[i]):Clone().Parent = player.Backpack
end
else
print("Play doesn't own.")
end
end
end
game.Workspace.ChildAdded:connect(respawned)