function Autobuy(id, price){
$.ajax({
type: "GET",
url: "http://m.roblox.com/Catalog/VerifyPurchase?assetid=" + id + "&type=robux&expectedPrice=" + price,
success: function(Data){
var Regex = /__RequestVerificationToken" type="hidden" value="(.+)" \/>/
var Verify = Data.match(Regex)[1]
$.ajax({
type: "POST",
url: "http://m.roblox.com/Catalog/ProcessPurchase",
__RequestVerificationToken: Verify,
CurrencyType: 1,
AssetID: id,
ExpectedPrice: price
});
}
});
};
When I try to use that code for example:
Autobuy(163500995, 85),
I get this error
POST http://m.roblox.com/Catalog/ProcessPurchase 500 (Internal Server Error)
I'm basically trying to turn this code into $.ajax
function AutoBuy(ID, Price){
$.get("http://m.roblox.com/Catalog/VerifyPurchase?assetid=" + ID + "&type=robux&expectedPrice=" + Price, function(Data){
var Regex = /__RequestVerificationToken" type="hidden" value="(.+)" \/>/
var Verify = Data.match(Regex)[1]
var post = $.post("http://m.roblox.com/Catalog/ProcessPurchase", {
__RequestVerificationToken: Verify,
CurrencyType: 1,
AssetID: ID,
ExpectedPrice: Price
});
});
};