#UGC Game

57 messages · Page 1 of 1 (latest)

tribal karma
#

I'm making a game to claim limited UGCs, but there's a problem with exploiters apparently claiming the UGCs from the UGC ID.

Someone please help me?

#

Code

#

I just want to know if it is possible for an exploiter to claim a limited ugc using the ugc id

#

I can't show you the code right now because I'm busy.

#

The local script

local marketplaceservice = game:GetService("MarketplaceService")

local Template = game.ReplicatedStorage.Modules.UGCLimited.Item
local List = require(game.ReplicatedStorage.Modules.UGCLimited.List)

local Script = script.Parent.CatalogRequester
local module = require(Script)

local player = game.Players.LocalPlayer

for i = 1, #List  do
    local Item = Template:Clone()
    Item.Parent = script.Parent
    
    local ID = List[i].Id
    local Name = Item.ItemName
    local Price = Item.Price
    local ImageButton = Item.ImageLabel
    local Status = Item.Status
    local PriceInPoints = List[i].PriceInPoints
    
    Price.Text = tostring(PriceInPoints).." Points"

    module.Update(ID, Name, Price, ImageButton, Status)
        
    Item.MouseButton1Click:Connect(function()
        game.ReplicatedStorage.Remotes.PromptPurchase:FireServer(i)
    end)
    
    while true do
        local ProductInfo = marketplaceservice:GetProductInfo(ID)

        Status.Text = ProductInfo.Remaining .. "/" .. ProductInfo.CollectiblesItemDetails.TotalQuantity
    end
end```
amber copperBOT
#

studio** You are now Level 1! **studio

tribal karma
#

module

local module = {}

local MarketPlaceService = game:GetService("MarketplaceService")

function module.Update(id, TextName, TextPrice, ImageButton, Status)
    local ProductInfo = (MarketPlaceService:GetProductInfo(id))
    
    local TableInfo = {}
    
    table.insert(TableInfo, ProductInfo)
    
    local typeneed1 = "Name"
    local typeneed3 = "IconImageAssetId"
    local typeneed4 = "Remainings"
    
    TextName.Text = TableInfo[1][typeneed1]
    ImageButton.Image = "https://www.roblox.com/asset-thumbnail/image?assetId="..id.."&width=820&height=820&format=png"
end

return module```
#

server side script ```lua
local List = require(game.ReplicatedStorage.Modules.UGCLimited.List)

game.ReplicatedStorage.Remotes.PromptPurchase.OnServerEvent:Connect(function(plr, i)
if plr.leaderstats["POINTS UGC"].Value >= List[i].PriceInPoints then
game.MarketplaceService:PromptPurchase(plr, List[i].Id)
game.MarketplaceService.PromptPurchaseFinished:Connect(function(player, assetId, isPurchased)
if player == plr and assetId == List[i].Id then
if isPurchased then
plr.leaderstats["POINTS UGC"].Value -= List[i].PriceInPoints
end
end
end)
end
end)

game.ReplicatedStorage.Remotes.PromptPurchaseShop.OnServerEvent:Connect(function(plr, ID)
game.MarketplaceService:PromptPurchase(plr, ID)
game.MarketplaceService.PromptPurchaseFinished:Connect(function(player, assetId, isPurchased)
if player == plr and assetId == ID then
if isPurchased then
plr.leaderstats["POINTS UGC"].Value += 4000
end
end
end)
end)

game.ReplicatedStorage.Remotes.PurchasePoints.OnServerEvent:Connect(function(plr, ID, PointsReward)
game.MarketplaceService:PromptProductPurchase(plr, ID)
game.MarketplaceService.PromptProductPurchaseFinished:Connect(function(userID, assetId, isPurchased)
if plr.UserId == userID and assetId == ID then
if isPurchased then
plr.leaderstats["POINTS UGC"].Value += PointsReward
end
end
end)
end)```

#

At the time I published the game, 7 UGC had already been claimed without having any points.

#

It's a game in which you claim points while you're afk

tight acorn
#

i'm also rather concerned by the fact that you connect to marketplace events multiple times

tawny nest
#

i can help..

#

im a causal scripter

tight acorn
#

you probably have an infinite points cheat

tribal karma
tight acorn
#

tell me what do you think happens with this code:

game.UserInputService.InputBegan:Connect(function()
  game["Run Service"].Heartbeat:Connect(function()
    print("every time you press a button, heartbeat gets a new connection")
  end)
end)```
coz that's exactly what your code is doing
#

and :Once() isn't good enough, it'll still connect multiple times. biggest effect this would have is taking away more points than it is supposed to, awarding more points than it is supposed to, and potentially allowing people to claim the UGC repeatedly if they do it fast enough (for free)

tribal karma
# tight acorn you probably have an infinite points cheat
local DataStoreService = game:GetService("DataStoreService")
local MinigameData = DataStoreService:GetDataStore("./gameData")

local Players = game:GetService("Players")

local groupID = 8510918

Players.PlayerAdded:Connect(function(player)
    local folder = Instance.new("Folder", player)
    folder.Name = "leaderstats"

    local points = Instance.new("IntValue", folder)
    points.Name = "POINTS UGC"

    local setSuccess, errorMessage = pcall(function()
        points.Value = MinigameData:GetAsync(player.UserId.." -Points")
        
        points.Changed:Connect(function()
            MinigameData:SetAsync(player.UserId.." -Points", player.leaderstats["POINTS UGC"].Value)
        end)
    end)

    if setSuccess then
        print("Loaded Points")
    else
        print(errorMessage)
    end
    
    while true do
        wait(1)
        points.Value += 1
    end
end)

Players.PlayerRemoving:Connect(function(player)

    local setSuccess, errorMessage = pcall(function()

        MinigameData:SetAsync(player.UserId.." -Points", player.leaderstats["POINTS UGC"].Value)

    end)

    if setSuccess then
        print("Saved Points")
    else
        warn(errorMessage)
    end
end)```
tight acorn
tight acorn
#

as in, i dont see infinite points cheat in there

tight acorn
tribal karma
# tight acorn and :Once() isn't good enough, it'll still connect multiple times. biggest effec...
local List = require(game.ReplicatedStorage.Modules.UGCLimited.List)

game.ReplicatedStorage.Remotes.PromptPurchase.OnServerEvent:Connect(function(plr, i)
    if plr.leaderstats["POINTS UGC"].Value >= List[i].PriceInPoints then
        game.MarketplaceService:PromptPurchase(plr, List[i].Id)
        game.MarketplaceService.PromptPurchaseFinished:Once(function(player, assetId, isPurchased)
            if player == plr and assetId == List[i].Id then
                if isPurchased then
                    plr.leaderstats["POINTS UGC"].Value -= List[i].PriceInPoints
                end
            end
        end)
    end
end)

game.ReplicatedStorage.Remotes.PromptPurchaseShop.OnServerEvent:Connect(function(plr, ID)
    game.MarketplaceService:PromptPurchase(plr, ID)
    game.MarketplaceService.PromptPurchaseFinished:Once(function(player, assetId, isPurchased)
        if player == plr and assetId == ID then
            if isPurchased then
                plr.leaderstats["POINTS UGC"].Value += 4000
            end
        end
    end)
end)

game.ReplicatedStorage.Remotes.PurchasePoints.OnServerEvent:Connect(function(plr, ID, PointsReward)
    game.MarketplaceService:PromptProductPurchase(plr, ID)
    game.MarketplaceService.PromptProductPurchaseFinished:Once(function(userID, assetId, isPurchased)
        if plr.UserId == userID and assetId == ID then
            if isPurchased then
                plr.leaderstats["POINTS UGC"].Value += PointsReward
            end
        end
    end)
end)```
#

like that?

tight acorn
#

in fact you have it repeatedly

tight acorn
tight acorn
amber copperBOT
#

studio** You are now Level 36! **studio

tribal karma
#

Another thing my boss told me is that when you buy points with Robux, sometimes they come out duplicated or tripled.

tight acorn
tight acorn
tribal karma
tight acorn
tribal karma
tight acorn
amber copperBOT
#

studio** You are now Level 2! **studio

tight acorn
#

limited ugcs is only exception

#

your ugc supply is safe only the server can prompt for originals

#

and as for the points, the multiple connections is probably why. i'm surprised you aren't seeing negative points for that

#

add to that, when you take points, players will have near 0 after buying a ugc, sooooooooo

tight acorn
#

the rest is on you or if someone else wants to help from there salute

tribal karma
#

Okay

#

Thanks

tight acorn
#

it's just funny coz you need to earn more of the currency until you get out of the negatives and can actually buy stuff again lol

#

plus you took more points than needed soo

#

anyway gl salute

hazy grail