Universal Script 📌
581 Views
63 Executions

Rbxmx loader the model goes to workspace

Universal Script 📌
sjjsksjsnnnsns
sjjsksjsnnnsnsPublished 100
7 months ago
Get an executor
Please login to perform these actions:

Does it work?

No reports yet

No reports yet. Tried it? Be the first to say.

Also noticed:

Description

Rbxmx loader The model parents to workspace!

View Raw
local function clean(value)
    return value:match('<!%[CDATA%[(.-)%]%]>') or value
end

local function parseProperties(obj, block)
    for propName, value in block:gmatch('<string name="(.-)">(.-)</string>') do
        local val = clean(value)
        if val and val:find("rbxassetid://") then
            pcall(function() obj[propName] = val end)
        end
    end

    for propName, value in block:gmatch('<Content name="(.-)">(.-)</Content>') do
        local val = clean(value)
        if val and val:find("rbxassetid://") then
            pcall(function() obj[propName] = val end)
        end
    end

    local cframeMatch = block:match('<CoordinateFrame name="Grip">(.-)</CoordinateFrame>')
    if cframeMatch and obj:IsA("Tool") then
        local x = tonumber(cframeMatch:match('<X>(.-)</X>'))
        local y = tonumber(cframeMatch:match('<Y>(.-)</Y>'))
        local z = tonumber(cframeMatch:match('<Z>(.-)</Z>'))
        local rx = tonumber(cframeMatch:match('<R00>(.-)</R00>'))
        local ry = tonumber(cframeMatch:match('<R01>(.-)</R01>'))
        local rz = tonumber(cframeMatch:match('<R02>(.-)</R02>'))
        local r10 = tonumber(cframeMatch:match('<R10>(.-)</R10>'))
        local r11 = tonumber(cframeMatch:match('<R11>(.-)</R11>'))
        local r12 = tonumber(cframeMatch:match('<R12>(.-)</R12>'))
        local r20 = tonumber(cframeMatch:match('<R20>(.-)</R20>'))
        local r21 = tonumber(cframeMatch:match('<R21>(.-)</R21>'))
        local r22 = tonumber(cframeMatch:match('<R22>(.-)</R22>'))

        if x and y and z then
            local cf = CFrame.new(x, y, z,
                r00, r01, r02,
                r10, r11, r12,
                r20, r21, r22
            )


Comments

0
Log in to join the conversation. Login
No comments yet. Be the first!

More universal scripts

See all
Script hub
1.6M
2.1M
Bumped 6 hours ago
Key System

Script hub

#12 this week

Verified script badgeSnowy Hub 500+ Games & 25600+ Features

Script hub
269.2k
120.2k
Bumped 6 hours ago
Key System
Script hub
171.3k
1.4M
Bumped 9 hours ago
Key System
Script hub
16.7k
3.2k
Bumped 11 hours ago
Key System
Paid
Script hub
17.4k
88.6k
Bumped 11 hours ago
Universal Script 📌
2.0M
4.5k
Bumped 12 hours ago