Hey, I am making a Headless gamepass and when someone runs the command “!headless” and they don’t own it, they recieve the headless anyways.
--[ SERVICES ]--
local MarketPlaceService = game:GetService("MarketplaceService")
--[ LOCALS ]--
local Command = "!headless"
local Gamepass = 116623087
--[ FUNCTIONS ]--
game.Players.PlayerAdded:Connect(function(player)
player.CharacterAdded:Connect(function(chr)
player.Chatted:Connect(function(msg)
local UserId = player.UserId
local PlayerBoughtThisGamepass = MarketPlaceService:UserOwnsGamePassAsync(UserId, Gamepass)
local Humanoid = chr:WaitForChild("Humanoid")
local Desc = Humanoid:GetAppliedDescription()
Desc.Head = 134082579
if PlayerBoughtThisGamepass then
if msg:sub(1, Command:len()):lower() == Command:lower() then
Humanoid:ApplyDescription(Desc)
end
else
print("does not own gamepass")
end
end)
end)
end)
I got rid of the if statement that checks if the player owns the gamepass, and it worked, so something may be wrong in the if statement. Can you send a video (or description) of exactly what you did?