View difference between Paste ID: j9u61qng and VnMzvQQ9
SHOW: | | - or go back to the newest paste.
1-
local Id = owner.Chatted:Wait():match("[%w]+$")
1+
2-
local Container = Instance.new("Model",script)
2+
3-
script.DescendantRemoving:Connect(function(x)
3+
function Import(Id)
4-
	local Parent = x.Parent
4+
    local ContainerScript = NS([[
5-
    wait()
5+
        script.DescendantRemoving:Connect(function(x)
6-
    x:Clone().Parent = Parent
6+
            local Parent = x.Parent
7-
end)
7+
            wait()
8
            x:Clone().Parent = Parent
9
        end)
10-
local Parts = SerializationV3.InflateBuildData(HTTPService:JSONDecode(HTTPService:GetAsync(("http://www.f3xteam.com/bt/export/%s"):format(Id))))
10+
    ]],workspace)
11-
for _,Part in next,Parts do
11+
    ContainerScript.Name = Id
12-
	Part.Parent = Container
12+
    local Container = Instance.new("Model",ContainerScript)
13
    local Parts = SerializationV3.InflateBuildData(HTTPService:JSONDecode(HTTPService:GetAsync(("http://www.f3xteam.com/bt/export/%s"):format(Id))))
14-
Container:MakeJoints()
14+
    for Index,Part in next,Parts do
15
        Part.Parent = Container
16
        if Index%100 == 0 then
17
            wait()
18
        end
19
    end
20
    Container:MakeJoints()
21
end
22
owner.Chatted:Connect(function(Message)
23
    local Ids = Message:lower():gsub("^/e ",""):match("^im/(.+)")
24
    if Ids then
25
        for Id in Ids:gmatch("(%w%w%w%w)") do
26
            Import(Id)
27
            print("Imported "..Id)
28
            wait()
29
        end
30
    end
31
end)