Before I made this project, you’d have to specify donation prices as a developer. However, I’ve been working on a project that’ll allow donators to choose how much they’re going to pay!
NOTE: This project currently only supports group games, and needs to log into an account that is allowed to create developer products in the group using their .ROBLOSECURITY cookie.
Set up your own webserver
To set up your own webserver, you’ll need to have the following installed:
- NodeJS v12 or newer
- The express dependency v4.17.1 or newer
- The noblox.js dependency v4.8.4 or newer
The code for the webserver can be found here.
I’m not going into detail on how the code for the webserver works exactly. But there’s one thing you need to know about, in the file
handler.js on line 5 it sets the cookie to the environment variable
COOKIE. This should be modified to your .ROBLOSECURITY cookie.
Because this cookie is very sensitive I don’t recommend using your main account’s .ROBLOSECURITY cookie if you don’t trust me, but instead create an alt account and use it’s .ROBLOSECURITY cookie.
After you’ve done this, and possibly port forwarded if needed, you should be able to start the webserver by running
node server.js in the terminal/command line. You’ll need to take note of your webserver’s IP address as you’ll need it when you set up your Roblox game.
Set up the Roblox game
Everything you need to set up your Roblox game for this project can be copied from the demo, which is uncopylocked.
There is one thing you need to change in order to make it function with your webserver, the hostname.
Inside of the only server-sided script in the game (the path is game.StarterGui.ScreenGui.Script) on line 6 it currently sets the hostname to
http://roblox-donation-api.glitch.me/, however in your game this should be set to your own webserver’s IP address.
UPDATE: Today I updated this system, it now also allows you to:
- Incorporate Roblox’s 30% taxes using the
- Set a minimum and maximum amount of Robux to donate.
Next time I plan to make it purely Roblox, which means no more webserver would be needed.
Thanks for reading my tutorial, remember to please rate it and give me some feedback.