Insert Character plugin

It became a bit tedious to insert someone’s character into Studio by going into Play Solo, changing your CharacterAppearance, respawning and setting the archivable property of the contents of the new character to true, and then copying and pasting the model back into edit mode, so now this plugin allows you to insert the model of any user’s character into Studio though a simplified process.

After exploring the seemingly simple task of inserting a character into Studio, Maelstronomer and I found it surprisingly difficult to accomplish. There was no method of inserting characters made available, so we had to resort to HttpService. That was a downer, but we trekked on. We then ended up finding out that BodyColors couldn’t be retrieved through HttpService (in other words, it is impossible to fully insert characters through a plugin) – Mael called it a night, but I ended up persisting and finishing a plugin because BodyColors aren’t vital and can be quite easily set manually. The result is what you see pictured above. The help and configuration buttons don’t work as of yet – they will be part of the larger plugin that this current plugin will be fused into. However, anything that could improve the plugin will definitely be added into the larger plugin. If you have suggestions (e.g. allowing typing of names instead of userIds since I’m already having to use HttpService anyway), those would be appreciated.

1 Like

I thought you were banned from this forum? or like… did I miss something? not sure why you were banned in the first place, didn’t see anything offensive in your posts here…

This is bait.

Anyways OP, I think I found out how to fetch the body colors a while ago, it was a hassle though. I don’t know if that’s what you’re asking for because it’s hard to read on mobile. Once I get off my flight I’ll try to remember to post my solution here

The ban was supposed to be lifted Sunday, but Urist lifted it recently. Apparently I have super powers and just coincidentally attempted to log in after he lifted it recently, so here I am. It looks like the post chain that led to my ban was deleted, but summarized it was me exploding at someone for not reading the OP of a thread, which I shouldn’t have done.

Yep this is exactly what we’re looking for

it was returning some fileless xml type file and was borking roproxy.tk so I couldn’t parse through and grab the colors that way.

Echo can you make the inserted torso’s rotation 0,0,0? Using the plugin in edit mode is making it face the camera and it’s annoying to set back normally xD

Asset/BodyColors.ashx gives you the XML file of the BodyColors object. You can insert it like you would insert any ROBLOX model, add the .rbxm file extension.

This is a ROBLOX Studio plugin – not a browser plugin. I can only retrieve strings through HttpService, and accessing the bodycolors through HttpService results in an error:

game.HttpService:GetAsync("http://www.roproxy.tk/Asset/BodyColors.ashx?userId=261")

16:01:17.862 - HTTP 500 (Internal Server Error)

Now, this is a lot of hoops to jump through, but I’m pretty sure you could get something out of this.

Since plugins can read .Source because of their permission elevation, you could always have the plugin create a script, set its LinkedSource to a CharacterAppearance URL, and then read the source of the script.

My character appearance: http://www.roblox.com/Asset/CharacterFetch.ashx?userId=1754575

The first part you get from the Source of the script will give you another URL you can set to another Script the plugin can create:
http://www.roblox.com/Asset/BodyColors.ashx?avatarHash=b43b7e145e69dfc9b7386e37d7a38a75

Inside the source of the script with that LinkedSource will have all the information you need for setting BodyColors.

Ding ding ding we have a winner. Not only did you provide a method of retrieving body colors, but you also removed my dependency on HttpService. I had a 100 Robux bounty on that if you want to collect btw.

I don’t need the money :stuck_out_tongue:

Glad I could help, though!

So…how do you find the BodyColors of a user in-game? I need this for my project :frowning:

[quote] Now, this is a lot of hoops to jump through, but I’m pretty sure you could get something out of this.

Since plugins can read .Source because of their permission elevation, you could always have the plugin create a script, set its LinkedSource to a CharacterAppearance URL, and then read the source of the script.

… [/quote]
This is a very clever approach, but the .Source property does not get updated by the script when it’s fetched for the LinkedSource. Have you tested it? Last time I checked this as an exploit vector, it wasn’t possible.

When I put that in as the linked source and cut and paste the script, the source was the result of the Http request.

[quote] Now, this is a lot of hoops to jump through, but I’m pretty sure you could get something out of this.

Since plugins can read .Source because of their permission elevation, you could always have the plugin create a script, set its LinkedSource to a CharacterAppearance URL, and then read the source of the script.

My character appearance: http://www.roblox.com/Asset/CharacterFetch.ashx?userId=1754575

The first part you get from the Source of the script will give you another URL you can set to another Script the plugin can create:
http://www.roblox.com/Asset/BodyColors.ashx?avatarHash=b43b7e145e69dfc9b7386e37d7a38a75

Inside the source of the script with that LinkedSource will have all the information you need for setting BodyColors. [/quote]

Wait what?
I thought plugins couldn’t even queue the LinkedSource property.

@NathanLua That won’t work. Setting LinkedSource and then opening the script doesn’t modify the Source property. Test this yourself by setting LinkedSource and then print(game.Selection:Get()[1].Source).

When I put that in as the linked source and cut and paste the script, the source was the result of the Http request.[/quote]
Yes, when you view it in the script editor. Try printing the .Source of that script using the command bar.

Oh, now today is a sad day :frowning: Back to no body colors.

The reason you’re getting a server error when sending requests to /Asset/BodyColors.ashx is that you’re not sending [tt]Accept-Encoding: gzip[/tt] in the request headers.

I don’t think I can do much about that though considering I’m using someone else’s proxy. But, I’m not complaining – glad he has it up in the first place.

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