All right, here I am.
I’m not a PHP wizard, so please forgive me if this sucks ass. Works, however, to an extent.
[code]<?php
// im not the best with php code, plz spare me
$hash= $_GET[‘avatarHash’];
$id= $_GET[‘serverplaceid’];
file_get_contents(‘http://roblox.com/Asset/BodyColors.ashx?avatarHash=’ . $hash . ‘&serverplaceid=’ . $id, false, stream_context_create(array(‘http’=>array(‘method’ => ‘GET’, ‘header’=> 'Requester: Client\r\nRoblox-Place-Id: ’ . $id . ‘\r\nAccept-Encoding: gzip\r\nUser-Agent: Roblox/WinInet\r\nHost: www.roblox.com\r\nConnection: Keep-Alive\r\n’))));
echo(file_get_contents(‘http://c1.rbxcdn.com/’ . $hash, false, stream_context_create(array(‘http’ => array(‘method’ => ‘GET’, ‘header’ => 'Requester: Client\r\nRoblox-Place-Id: ’ . $id . ‘\r\nAccept-Encoding: gzip\r\nUser-Agent: Roblox/WinInet\r\nHost: c1.rbxcdn.com\r\nConnection: Keep-Alive\r\n’)))));
?>[/code]
[code]–[[
Arguments:
userid: an int. selfexplanatory
Returns:
table with BrickColors in it, their names are their respective body parts
–]]
function getBodyColors(userid)
local getHashUrl = ‘http://roproxy.tk/Asset/CharacterFetch.ashx?userId=%d&placeId=’ … game.PlaceId;
local getBCUrl = ‘http://rbot.host56.com/?avatarHash=%s&serverplaceid=’ … game.PlaceId; – You can use your own host. Mine is hosted off of 000webhost
local pickApartRegex = ‘(%d-)’;
local httpService = game:GetService('HttpService');
local returnTable = { };
for partName, colorId in httpService:GetAsync(getBCUrl:format(httpService:GetAsync(getHashUrl:format(userid)):match('avatarHash=(.-);'))):gmatch(pickApartRegex) do
partName = partName:gsub('Color', ''):gsub('Right', 'Right '):gsub('Left', 'Left ');
table.insert(returnTable, { Name = partName; Color = BrickColor.new(colorId); });
end;
return returnTable;
end;[/code]
You can use it like
bodyColors = getBodyColors(771417);
for i, v in next, bodyColors do
character:FindFirstChild(v.Name).BrickColor = v.Color;
end;
I think this still works. My host was still alive after about 7 months of being abandoned, I found that pretty funny.
Cheers m8o