So i made this gamepass thats supposed to give the player a weapon when the buy it and if the already have it and they have the weapon its suppoesd to not give them one but even if they dont have the weapon and have the gamepass it still doesnt give them a weapon can some body pls help me
local MPS = game:GetService("MarketplaceService")
local Players = game:GetService("Players")
local GamePassID = 9869510
function PSpawn(player)
local plrhaspass = false
plrhaspass = MPS:UserOwnsGamePassAsync(player.userId, GamePassID)
if plrhaspass == true then
local back = player.Backpack
if back["Water Scythe"] ~= nil then return
else
game.Lighting.VipGui:Clone().Parent = player.Character.Head
game.Lighting["Water Scythe"]:Clone().Parent = player.Backpack
game.Lighting["Water Scythe"]:Clone().Parent = player.StarterGear
player.leaderstats.Exp.Value = player.leaderstats.Exp.Value + 0
end
end
end
game.Players.PlayerAdded:Connect(function(player)
player.CharacterAdded:Connect(function()
PSpawn(player)
end)
end)

1 comment
What kind of script is this in?