#script wont work😡😡

7 messages · Page 1 of 1 (latest)

plain stump
#

so i have a script that dosnt work for some reason can yall spot why

#

local MarketplaceService = game:GetService("MarketplaceService")
local Players = game:GetService("Players")
local passID = 1681891408 -- Change this to your Pass ID

local function onPromptPurchaseFinished(player, purchasedPassID, wasPurchased)
if wasPurchased then
local ownsPass = MarketplaceService:UserOwnsGamePassAsync(player.UserId, passID)
if ownsPass then
print(player.Name .. " purchased the Pass with ID " .. passID)
-- Kill all players
for _, player in ipairs(Players:GetPlayers()) do
local character = player.Character
if character then
local humanoid = character:FindFirstChildWhichIsA("Humanoid")
if humanoid then
humanoid.Health = 0
end
end
end
end
end
end

-- Connect "PromptGamePassPurchaseFinished" events to the function
MarketplaceService.PromptGamePassPurchaseFinished:Connect(onPromptPurchaseFinished)

rugged wigeon
#

is it gamepass or dev product?

fallen nymph
rugged wigeon
fallen nymph
#

And i just guessed it was a dev product cuz u can buy it multiple times