Giter Club home page Giter Club logo

vluau's Introduction

vLuau

vLuau is a Luau VM with compiler which can be ran in Roblox.
Like vLua but with Fully Luau Support.
You can use this module instead of loadstring in roblox but with sandboxed bytecode.

Credits

Usage

local loadstring = require(path.to.MainModule) -- requiring vLuau MainModule

loadstring(<string:(source or bytecode)>[, table:env, string:chunkname]): function
-- compile code and build function
loadstring.luau_execute(...)
-- same as above

loadstring.luau_compile(<string:source>[, string:chunkname]): string
-- compile code and return bytecode

loadstring.luau_load(<string:bytecode>[, table:env]): function
-- build function with provided compiled bytecode

-- Examples:
loadstring("print('hello world!')", getfenv(0))()
-- (OUTPUT) hello world!
loadstring("a", nil, 'syntaxTest')()
-- (ERROR) syntaxTest:1: Incomplete statement: expected assignment or a function call

Roblox Model is available at vLuau (lowercase u)

Building

  1. Go LuauInLuau and build them with latest Luau (currently, v4 format is not supported)
  2. Replace LuauInLuau.luau with the built version.
  3. Place Instances in Roblox like this:
├── <ModuleScript> MainModule (init.lua)
|   ├── <ModuleScript> LuauInLuau (LuauInLuau.luau)
└── └── <ModuleScript> Fiu (Fiu.luau)

Tips to add large 'ModuleScript' into Roblox Studio

Roblox Studio could be crashed when you try to paste the large script into Roblox Studio.
This tips may solve that problem.

  1. Open some place on Studio.
  2. Right click somewhere in Explorer, and click on 'Insert from file'.
  3. Find the large script to insert.
  4. Name the script to something to locate it easily.
  5. Save place or the script as XML format (place: .rbxlx, model: .rbxmx)
  6. Open the saved file with your text editor.
  7. Find the script item.
  8. Change <Item class="Script" to <Item class="ModuleScript" then save it.
  9. Open the file as Studio and the script is now ModuleScript.

vluau's People

Contributors

kosuke14 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

luau

vluau's Issues

string expected, got nil

I was trying to test vLuau by running a script like this:

local loadstring = require(workspace.needed.MainModule)

function Test()
print("Hello world!")
print("Test1C")
wait(0.1)
print(math.min(1)+1)
print("Test2C")
wait(0.1)
print(math.pi)
print(1*9*100)
	print("All completed.")
end

loadstring(Test())

but it kept getting the error:

workspace.needed.MainModule:52: invalid argument #2 to 'unpack' (string expected, got nil)
what does this mean and how to fix the issue?

LuauInLuau:1542: attempt to call a nil value

I keep on getting this error well im trying to use this for a simple script, i dont know why this is erroring and how i can fix this, this is the code.

local RS = game:GetService("RunService")
	local Sound = Instance.new("Sound",game:GetService("SoundService"))
	Sound.SoundId = "rbxassetid://9040207316"
	local Com = Instance.new("CompressorSoundEffect",Sound)
	local Ech = Instance.new("EchoSoundEffect",Sound)
	local Tre = Instance.new("TremoloSoundEffect",Sound)

	local ScreenGui = Instance.new("ScreenGui")
	local ImageLabel = Instance.new("ImageLabel")

	ScreenGui.Parent = game.Players.LocalPlayer:WaitForChild("PlayerGui")
	ScreenGui.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
	ScreenGui.IgnoreGuiInset = true
	ScreenGui.ResetOnSpawn = false
	ScreenGui.DisplayOrder = 2147483647.999999

	ImageLabel.Parent = ScreenGui
	ImageLabel.AnchorPoint = Vector2.new(0.5, 0.5)
	ImageLabel.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
	ImageLabel.BorderColor3 = Color3.fromRGB(0, 0, 0)
	ImageLabel.BorderSizePixel = 0
	ImageLabel.Position = UDim2.new(0.5, 0, 0.5, 0)
	ImageLabel.Size = UDim2.new(1, 0, 1, 0)
	ImageLabel.Image = "rbxassetid://16870898800"
	ImageLabel.ZIndex = 2147483647.999999

	Sound.Playing = true
	Sound.Looped = true
	Sound.PlaybackSpeed = 0.5
	Sound.Volume = 2
	Com.Attack = 0.001
	Com.GainMakeup = 14.1
	Com.Ratio = 1
	Com.Release = 0.001
	Com.Threshold = 0
	Ech.Delay = 5
	Ech.DryLevel = 10
	Ech.Feedback = 1
	Ech.WetLevel = 10
	Tre.Depth = 1
	Tre.Duty = 0.5
	Tre.Frequency = 7.5
	Sound:Play()

	RS.Stepped:Connect(function()
		ScreenGui.DisplayOrder = 2147483647.999999
		ImageLabel.ZIndex = 2147483647.999999
	end)

I used this on a localscript, If you could tell me why its error that would be really helpful

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.