I want to make a donation board without a giving limit and that the people can give the times they want, what i mean by this is, that it doesnt use the id methood, is it possible?
I want a methood without “ID” ii cant really explain well
I want to make a donation board without a giving limit and that the people can give the times they want, what i mean by this is, that it doesnt use the id methood, is it possible?
That’s not possible since the script needs to replicate to a developer product or a gamepass though you can add more stuff to it
but, is there a way to like add an “unlimited” amount that you can give, like you write the amount you want to give, (to the creator)
No, it needs to be a pre-defined developer product.
If you create over 1M dev product for 1M numbers it would be possible, but thats too unrealistic creating all these + the functions in the script…
You Can’t Do That Since Roblox Doesn’t Allow That But You Can Make A Lot Of Developer Products
And Use A TextBox To See Which One They Wanna Purchase.
Like if they Write “3” In TextBox Then You Will Make Them Purchase The Product That Costs 3 Robux Etc. But Its Still Got A limit
thank you, i was thinking and maybe i can make a bot or something like that to create the developer product or change the price and makes it what the person typed, i am going to try this.
Hey, sorry for the late response, but I would like to say that this is indeed possible. Anyone saying that it isn’t is wrong. Also @LeftClient’s method is very inefficient and you really shouldn’t do it. Not to mention, you could be flagged as a bot and possibly get a warning/ban on your account.
First, we can use a roblox api wrapper like luablox, which allows us to easily interact with the roblox api(it’s a random module I made like today in a few hours). But is in atleast a stable state for this type of stuff
Download it here:
Luablox.rbxm (6.5 KB)
Now, move the module into server storage(dont move it into replicated storage or anywhere else, as that would be a hugee security vulnerability)
Next, create a textbox and a button. With the textbox’s name being “Input” and the button’s name being “Enter”.
After u make the UI(or whatever just it needs to be ui) and then add a local script inside of it. Make the content this;
local MPS = game:GetService("MarketplaceService")
local input = script.Parent:WaitForChild("Input")
local enter = script.Parent:WaitForChild("Enter")
local donationRemote = game.ReplicatedStorage:WaitForChild("Donate")
input.Changed:Connect(function()
input.Text = input.Text:gsub("%D+", "") -- make the textbox numbers only
end)
local function sendRequest()
local amount = input.Text
local id = donationRemote:InvokeServer(amount)
MPS:PromptProductPurchase(game.Players.LocalPlayer, id)
end
enter.Activated:Connect(sendRequest)
Next, create a remote function inside replicated storage called “Donate.”
Now we need to do a few stuff before we can script. First enable HTTP requests(i assume u know how to do it, if not just google search it.)
Then, you need to get your .ROBLOSECURITY. This is because the Roblox web api requires this in order to make a dev product(again, I assume you know how to get this, if not then just google search it).
Now we can start scripting, create a new script inside ServerScriptService called “DonationHandler.”
Next, lets add our variables:
local Luablox = require(game.ServerStorage:WaitForChild("Luablox"))
local placeId = game.PlaceId
Next, we need the Universe Id of our game(which is like place id but specifically for games.) To get this, we can use the :GetUniverseId
function.
local HttpService = game:GetService("HttpService")
local Luablox = require(game.ServerStorage:WaitForChild("Luablox"))
local placeId = game.PlaceId
local universeId = HttpService:JSONDecode(Luablox:GetUniverseId(placeId)).UniverseId
print(universeId) -- make sure it's working
You should see ur game’s universe ID now inside the output, if so then u did it correctly. Now we need to actually create the dev product. But before, we need to authenticate(this is so that luablox can communicate with the roblox api.)
So to do this we can do:
local HttpService = game:GetService("HttpService")
local Luablox = require(game.ServerStorage:WaitForChild("Luablox"))
local placeId = game.PlaceId
local universeId = HttpService:JSONDecode(Luablox:GetUniverseId(placeId)).UniverseId
Luablox:Login(".ROBLOSECURITYHERE")
next, we can create a dev product when the Remote function is fired. We can use the following code:
local HttpService = game:GetService("HttpService")
local Luablox = require(game.ServerStorage:WaitForChild("Luablox"))
local placeId = game.PlaceId
local universeId = HttpService:JSONDecode(Luablox:GetUniverseId(placeId)).UniverseId
Luablox:Login(".ROBLOSECURITY")
local function getName(name) : string
name = name:sub(1, 50)
return name
end
local function checkExsistingProduct(amount) -- we will need to check if a product with the same price already exsits
local products = Luablox:GetDevproducts(game.PlaceId)
for _, product in pairs(products) do
if product.PriceInRobux == tonumber(amount) then
return product
end
end
end
game.ReplicatedStorage:WaitForChild("Donate").OnServerInvoke = function(player, amount)
local check = checkExsistingProduct(amount)
if not check then
local product = Luablox:CreateDeveloperProduct(universeId, game.PlaceId, "donation " .. amount, "donation", amount)
task.wait(0.2)
local id = product.productId
--local int = Instance.new("IntValue")
--int.Value = check.ProductId
--int.Parent = workspace
return id
else -- thing with same price
return check.ProductId
end
end
There you go, you now have a unlimited donation board!
Here’s a video example:
Some things to note, there may be times where this’ll error. This will be no fault in your code(most of the time), but instead the roblox api.
Here are some things you may want to consider adding to prevent errors:
If you have any questions feel free to hit me up in dms
If this helped PLEASE mark it as the solution, I spent a ton of time doing this
Yes, thank you so much!!! If i could give you any time of reward for your help i would aprreciate it!!
You are the best! If you also need anything tell me pls
no problem. Glad I could help!!
That’s remarkable. I didn’t anticipate someone to write a whole bot for a donations system I’m absolutely amazed.
+1000 ego boost
jokes aside thanks! But it isn’t really a bot, it just sends requests to the roblox api. But calling it a bot makes it sound cooler.
I’m aware of it not being a bot, but it’s pretty amazing, But i believe manually setting it would be far more convenient.
The solution is neat, and well done for TheH0meLands for coming up with it, but I prefer manually setting it.
There’s a lot more that could go wrong with requests: if the proxy you’re using getting overloaded with requests, the proxy website going down, http requests failing, etc. Okay for a smaller game, but won’t scale well when your game gets more popular.
For me, it doesn’t work…
I get:
nil
Logged in!
Can't parse JSON
maybe because its a little old, have u created the api tho?
wdym API?
Is there an API endpoint to fill into?
yeah, i dont know how but there is a game that uses it called “Cube Combinations”