Is this safe? Can't exploiters just change the devproductID in th elocal script?
LocalScript:
local SkipReviveTimerId = 3289068770
local SkipTimerButton = RevivingCountDownFrame:FindFirstChild("SkipTimer")
SkipTimerButton.MouseButton1Click:Connect(function()
local data = CheckRevivingStatus:InvokeServer()
if not data then return end
if data.TimeLeft > 0 then
MarketplaceService:PromptProductPurchase(LocalPlayer, SkipReviveTimerId)
end
end)```
ServerScript:
```lua
CheckRevivingStatus.OnServerInvoke = function(player) --Only for UI
local gameModel = PlayerDataManager:Get(player)
if not gameModel then return end
local reviveData = gameModel.CurrentlyRevivingPet
if not reviveData then return nil end
local durationMap = {
Common = 10,
Uncommon = 60,
Rare = 20,
Legendary = 25,
Ancient = 1800
}
local duration = durationMap[reviveData.Rarity] or -1
if duration == -1 then return end
local timeLeft = duration - (os.time() - reviveData.StartedAt)
timeLeft = math.max(timeLeft, 0)
print(timeLeft)
return {
PetName = reviveData.PetName,
Rarity = reviveData.Rarity,
TimeLeft = timeLeft,
IsReady = timeLeft <= 0
}
end```