#UGC Game
57 messages · Page 1 of 1 (latest)
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```
** You are now Level 1! **
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
i'm not totally sure but that would appear to be a no, they cannot https://create.roblox.com/docs/reference/engine/classes/MarketplaceService#PromptPurchase
i'm also rather concerned by the fact that you connect to marketplace events multiple times
show code where you increase the points?
you probably have an infinite points cheat
They are for different porpuse
you are connecting events more than once
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)
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)```
also since you're using devproducts, you should set up processreceipt properly https://create.roblox.com/docs/reference/engine/classes/MarketplaceService#ProcessReceipt
okay looks fine
as in, i dont see infinite points cheat in there
anyway i think your diagnostic is wrong, maybe people do have enough points, but you take those points away when they get enough for the ugc, so of course they're going to have zero points after they obtain it
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?
you still have event:connect( ... event:connect() ... ) inside each other.
in fact you have it repeatedly
i also already explained :Once() isn't good enough
So I do it separately?
yas, have one connection that handles all the ids and their effects
** You are now Level 36! **
Another thing my boss told me is that when you buy points with Robux, sometimes they come out duplicated or tripled.
the issue with once here isn't actually repeat connections, but it is still a problem because the once() can trigger for other player's prompts, so when the player actually makes a purchase, they don't get the reward
ye thats what i said earlier about multiple connections
And also that apparently it gives you points while you are out of the game
processreceipt can potentially do that, it's quite normal
And how do I get rid of that?
all explained in there https://create.roblox.com/docs/reference/engine/classes/MarketplaceService#ProcessReceipt
** You are now Level 2! **
look ima level with you, i normally don't help with market stuff because it's monetization feature, and i dont like helping people with monetization if they aint offering a cut
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
Does that give errors?
the rest is on you or if someone else wants to help from there 
no, negative numbers work just fine most of the time
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 
and how it would be.