Code Monkey home page Code Monkey logo

studioservice's Introduction

StudioService

A simple module to write rbxlx files like instances.

Documentation

new

Instance.new but for StudioService.

<Object> StudioService.new(<string> ClassName, <Instance> Parent)

Build

writes the rbxlx file to workspace.

<void> StudioService:Build(<string> FileName)

Example

local Part = StudioService.new("Part", Workspace)
Part.Anchored = true
Part.Color = Color3.new(1, 0, 0)
Part.Size = Vector3.new(1, 1, 1)
Part.Transparency = 0.5
Part.Name = "XML Part"

local Script = StudioService.new("Script", Part)
Script.Source = "print('Hello, World!');"

local StarterPlayerScripts = StudioService.new("StarterPlayerScripts", game.StarterPlayer)

local LocalScript = StudioService.new("LocalScript", StarterPlayerScripts)
LocalScript.Source = "print('Hello, World!');"

StudioService:Build("Place")

Output

Place.rbxlx

<roblox xmlns:xmime="http://www.w3.org/2005/05/xmlmime" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://www.roblox.com/roblox.xsd" version="4">
    <Item class="Workspace" referent="RBX6BA637DD8B9C44D385DF70A48988C0D5">
        <Item class="Part" referent="RBX620AF4060A8D4746BB58908C5E089749">
            <Properties>
                <number name="Transparency">0.5</number>
                <string name="Name">XML Part</string>
                <Color3 name="Color"><R>1</R><G>0</G><B>0</B></Color3>
                <boolean name="Anchored">true</boolean>
                <Vector3 name="Size"><X>1</X><Y>1</Y><Z>1</Z></Vector3>
            </Properties>
            <Item class="Script" referent="RBX620AF4060A8D4746BB58908C5E089749">
                <Properties>
                    <ProtectedString name="Source"><![CDATA[print('Hello, World!');]]></ProtectedString>
                </Properties>
            </Item>
        </Item>
    </Item>
    <Item class="StarterPlayer" referent="RBX6BA637DD8B9C44D385DF70A48988C0D5">
        <Item class="StarterPlayerScripts" referent="RBX620AF4060A8D4746BB58908C5E089749">
            <Properties>
            </Properties>
            <Item class="LocalScript" referent="RBX620AF4060A8D4746BB58908C5E089749">
                <Properties>
                    <ProtectedString name="Source"><![CDATA[print('Hello, World!');]]></ProtectedString>
                </Properties>
            </Item>
        </Item>
    </Item>
</roblox>

studioservice's People

Contributors

0zbug avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

Forkers

gohamza

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.