-
Make an account at pushover.net
This is your user key, you will need it for setting this up
local NotiHandler = require(ReplicatedStorage.PushOverHandler)
NotiHandler:Init("user key or group key", "api token")
NotiHandler:SendMessage(`Sent from a roblox game!`)This is using the processReceipt function from the roblox docs
local NotiHandler = require(ReplicatedStorage.PushOverHandler)
NotiHandler:Init("user key or group key", "api token")
local randomGamePassId = 3243599842 -- change with your gamepass
-- Random Game Pass
productFunctions[randomGamePassId] = function(receipt, player)
local character = player.Character
local humanoid = character and character:FindFirstChildWhichIsA("Humanoid")
if humanoid then
print(`{player.DisplayName} bought a dev product`)
end
end
local function processReceipt(receiptInfo)
local userId = receiptInfo.PlayerId
local productId = receiptInfo.ProductId
local player = Players:GetPlayerByUserId(userId)
if player then
local handler = productFunctions[productId]
local success, result = pcall(handler, receiptInfo, player)
if success then
local devProductInfo = MarketplaceService:GetProductInfo(productId, Enum.InfoType.Product)
NotiHandler:SendMessage(`{player.Name} just bought {devProductInfo.Name} for {devProductInfo.PriceInRobux} Robux`)
return Enum.ProductPurchaseDecision.PurchaseGranted
else
warn("Failed to process receipt:", receiptInfo, result)
end
end
return Enum.ProductPurchaseDecision.NotProcessedYet
end
