|
| 28 Jan 2015 03:49 PM |
this is what is used when a player spends robux, could it lead to h4x???
-- user has specified they want to buy an item, now try to attempt to buy it for them function doAcceptPurchase(currencyPreferredByUser) if currentlyPurchasing then return end currentlyPurchasing = true
showPurchasing() -- shows a purchasing ui (shows spinner)
local startTime = tick()
-- http call to do the purchase local response = "none" local url = nil
-- consumables need to use a different url if purchasingConsumable then url = getSecureApiBaseUrl() .. "marketplace/submitpurchase?productId=" .. tostring(currentProductId) .. "¤cyTypeId=" .. tostring(currencyEnumToInt(currentCurrencyType)) .. "&expectedUnitPrice=" .. tostring(currentCurrencyAmount) .. "&placeId=" .. tostring(Game.PlaceId) local flagExists, flagValue = pcall(function() settings():GetFFlag("AddRequestIdToDeveloperProductPurchases") end) if flagExists and flagValue then local h = game:GetService("HttpService") url = url .. "&requestId=" .. h:UrlEncode(h:GenerateGUID()) end else url = getSecureApiBaseUrl() .. "marketplace/purchase?productId=" .. tostring(currentProductId) .. "¤cyTypeId=" .. tostring(currencyEnumToInt(currentCurrencyType)) .. "&purchasePrice=" .. tostring(currentCurrencyAmount) .. "&locationType=Game" .. "&locationId=" .. Game.PlaceId end
local success, reason = ypcall(function() response = game:HttpPostAsync(url, "RobloxPurchaseRequest") end)
-- debug output for us (found in the logs from local) print("doAcceptPurchase success from ypcall is ",success,"reason is",reason)
if (tick() - startTime) < 1 then wait(1) -- allow the purchasing waiting dialog to at least be readable (otherwise it might flash, looks bad)... end
-- check to make sure purchase actually happened on the web end if response == "none" or response == nil or response == '' then print("did not get a proper response from web on purchase of",currentAssetId,currentProductId) purchaseFailed() return end
-- parse our response, decide how to react response = getRbxUtility().DecodeJSON(response)
if response then if response["success"] == false then if response["status"] ~= "AlreadyOwned" then print("web return response of fail on purchase of",currentAssetId,currentProductId) if (response["status"] == "EconomyDisabled") then purchaseFailed("inGamePurchasesDisabled") else purchaseFailed() end return end end else print("web return response of non parsable JSON on purchase of",currentAssetId) purchaseFailed() return end
-- check to see if this item was bought, and if we want to equip it (also need to make sure the asset type was gear) if currentEquipOnPurchase and success and currentAssetId and tonumber(currentProductInfo["AssetTypeId"]) == 19 then local tool = getToolAssetID(tonumber(currentAssetId)) if tool then tool.Parent = game.Players.LocalPlayer.Backpack end end
if purchasingConsumable then if not response["receipt"] then print("tried to buy productId, but no receipt returned. productId was",currentProductId) purchaseFailed() return end Game:GetService("MarketplaceService"):SignalClientPurchaseSuccess( tostring(response["receipt"]), game.Players.LocalPlayer.userId, currentProductId ) else userPurchaseActionsEnded(success) end end |
|
|
| Report Abuse |
|
|
| |
|
| |
|
BREN140
|
  |
| Joined: 30 Jan 2010 |
| Total Posts: 7499 |
|
| |
|
| |
|
BREN140
|
  |
| Joined: 30 Jan 2010 |
| Total Posts: 7499 |
|
|
| 29 Jan 2015 05:36 AM |
no
✞Add 23.5k+ Post✞ MrPutNameHere/Vextre ✔ JoJoWorld ✔ BDK ✔ |
|
|
| Report Abuse |
|
|
Widths
|
  |
| Joined: 12 Aug 2014 |
| Total Posts: 41286 |
|
|
| 29 Jan 2015 05:44 AM |
pretty sure you can override having to press y/n on the purchase with this....
how u even find dis
-iJava |
|
|
| Report Abuse |
|
|
| |
|
BREN140
|
  |
| Joined: 30 Jan 2010 |
| Total Posts: 7499 |
|
|
| 03 Feb 2015 04:54 PM |
✞Add 23.5k+ Post✞ MrPutNameHere/Vextre ✔ Future Roblox Clothing Designer ✔ BDK ✔ |
|
|
| Report Abuse |
|
|
Voyaging
|
  |
| Joined: 24 Jan 2013 |
| Total Posts: 4857 |
|
|
| 03 Feb 2015 04:55 PM |
| or u can use inspect elemttn and get free items! |
|
|
| Report Abuse |
|
|
doings
|
  |
| Joined: 20 Aug 2014 |
| Total Posts: 19095 |
|
|
| 03 Feb 2015 04:56 PM |
Your a savior
This might lead to hax
;) |
|
|
| Report Abuse |
|
|
Acmic
|
  |
| Joined: 04 Oct 2008 |
| Total Posts: 47963 |
|
|
| 03 Feb 2015 05:12 PM |
#Spybot#Save
~Gen 1 R$, 15 Tix |
|
|
| Report Abuse |
|
|
WebGL3D
|
  |
| Joined: 04 Sep 2013 |
| Total Posts: 28311 |
|
|
| 03 Feb 2015 07:25 PM |
@doings good luck with that, I spent days to solve this and get it working outside of a place. And it's a lot harder than it looks to duplicate :P
~ 1Topcop ~ WebGL3D ~ Java3D ~ Data3D ~ Purple Squid > |
|
|
| Report Abuse |
|
|
| |
|
|
| 03 Feb 2015 07:27 PM |
| its actually not very hard to get |
|
|
| Report Abuse |
|
|
|
| 03 Feb 2015 07:29 PM |
i didnt ask how hard it was
how'd u get |
|
|
| Report Abuse |
|
|
PvN
|
  |
| Joined: 10 Apr 2010 |
| Total Posts: 22145 |
|
|
| 03 Feb 2015 07:30 PM |
no cuz da blerbityblerp and da wobblywop do da jiggyjig ye |
|
|
| Report Abuse |
|
|
| |
|