Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- rproxy.tk is a mirror site which allows you to send GetAsync requests to Roblox (bas
- So
- http://www.rproxy.tk/User.aspx?ID=2032622
- is the same as
- http://www.roblox.com/User.aspx?ID=2032622
- The GetAsync function takes a webpage url input, and returns the source of the webpage as a string. Roblox doesn't allow you to use GetAsync on their own website due to DDOS risks (apparently).
- Using the HttpService, I use a certain web API provided by roblox to get the URL for some information regarding the 3D Model.
- http://www.rproxy.tk/avatar-thumbnail-3d/json?userId=2032622
- That gives me a JSON string which tells me the URL for the object information.
- {"Url":"http://t0.rbxcdn.com/4261d8d28ef71ad4c55ab34eacf3732c","Final":true}
- Using HttpService:JSONDecode(str), I can convert this text into a table. The "Url" becomes a key in the table, and its value is the url.
- From there, I call HttpService:GetAsync() on the rbxcdn link. Because rbxcdn isn't a direct roblox domain, we are allowed to use GetAsync on it.
- That will give us another JSON string.
- {"camera":{"position":{"x":2.22807,"y":107.204,"z":30.7928},"direction":{"x":0.40558,"y":0.40558,"z":0.819152}},"aabb":{"min":{"x":-2.35911,"y":101.93,"z":24.5063},"max":{"x":1.8829,"y":107.66,"z":27.857}},"mtl":"8c74670330a6b89a4b8f3d82a032f645","obj":"d531c240bf1fb70860ed7ea91cda813b","textures":["7b0ca188c454b117eea009bd8782146b","d24ddb624f57cac6a9d7aabb463fe182","282a48d21df5c5c916953ba6446a05fd","870e8e9d8fc4440e7b518cfe53cf7731"]}
- What we're concerned about in this, is the "obj" key, as it contains a hash for a rbxcdn link ( that link being the raw obj file )
- Once again, I convert this string into a table, and extract the obj hash d531c240bf1fb70860ed7ea91cda813b
- Now, using another website API from roblox, we can get the URL associated with this hash by calling GetAsync on this url:
- http://www.rproxy.tk/thumbnail/resolve-hash/d531c240bf1fb70860ed7ea91cda813b
- That will give us the rbxcdn url to our raw obj file! :D
- {"Url":"http://t5.rbxcdn.com/d531c240bf1fb70860ed7ea91cda813b"}
- On the http://t5.rbxcdn.com/d531c240bf1fb70860ed7ea91cda813b page, a raw .obj file (being my character) is put on the page. Using a .obj loader script, I can draw this into the workspace with polygons.
- That's basically it.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement