Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do I do this devproduct where the amount of damage done is doubled?

Asked by 7 years ago
Edited 7 years ago
    local events = game.ReplicatedStorage.Events
    local MarketplaceService = game:GetService("MarketplaceService")
    local data = game:GetService("DataStoreService")
    local productId = 134836943
    timer = data:GetDataStore("PurchaseHistory1")

    events.punchEvent.OnServerEvent:connect(function()
    MarketplaceService.ProcessReceipt = function(receiptinfo)
        local player = game.Players:GetPlayerByUserId(receiptinfo.PlayerId)
        if receiptinfo.ProductId == productId then
            local currentTime = os.time()
            local lastTime = timer:GetAsync(player.UserId)
        if lastTime then
            local timePass = currentTime - lastTime
        if timePass <= 15 then
game.StarterPack.Fight.Main.Fighting.Damage.Damageamt.Value =
 game.StarterPack.Fight.Main.Fighting.
    Damage.Damageamt.Value*4
else
    game.StarterPack.Fight.Main.Fighting.Damage.Damageamt.Value = 10
                end
            end
        end
    end
end)

Answer this question