I just tried to create my own "scripting-language", what should I add?

Hello! I’ve made my own “scripting-language” (if you can even call it).

Expect it to be bad, as it is decompiled into Roblox Lua.

The code (Can give you brain cancer)
local m = {}

local Names = {
	["Workspace"] = game.Workspace;
	["ReplicatedStorage"] = game.ReplicatedStorage;
	["Workspace"] = game.Workspace;
}

local function GetInstance(String)
	local Table = string.split(String, ".")
	local Service = Table[1]
	if Names[Service] then
		Service = Names[Service]
	end
	local ObjectSoFar =  typeof(Service) == "Instance" and Service or Names.Workspace
	for Index, Value in pairs(Table) do
		if Index ~= 1 then
			local Object = ObjectSoFar:FindFirstChild(Value)
			if Object then
				ObjectSoFar = Object
			else
				break
			end
		end
	end
	return ObjectSoFar or nil
end

local function get(object,index)
	return object[index]
end

local function assign(object, index, value)
	object[index] = value
end

function CorrectByteCode(ByteCode)
	local SemiByteCode = {}
	for _,Line in pairs(ByteCode) do
		for Word in string.gmatch(Line,"%a+") do
			local Result 
			for Name,FakeResult in pairs(Names) do
				if Name == Word then
					Result = FakeResult
					break
				end
			end
			if Result then
				if typeof(Result) == "Instance" then
					Result = "game."..Result:GetFullName()
				end
				Line = string.gsub(Line,Word,Result)
			end
		end
		table.insert(SemiByteCode,Line)
	end
	return SemiByteCode
end

function m.GetByteCode(LuaCode)
	local FinalText = [[]]
	local ByteTable = string.split(LuaCode,";")
	ByteTable = CorrectByteCode(ByteTable)
	for _,Text in ipairs(ByteTable) do
		if #FinalText < 1 then
			FinalText = FinalText..Text..";"
		else
			FinalText = FinalText.."\n"..Text..";"
		end
	end
	return FinalText
end

local function shallowCopy(original)
	local copy = {}
	for key, value in pairs(original) do
		copy[key] = value
	end
	return copy
end

local ArgsTransform = {
	["true"] = true;
	["false"] = false;
	["null"] = "nil";
}

local function SplitNonStrings(ByteCode)
	local WordsGot = {}
	local FirstFoundString
	local LastFoundString
	for i = 1,#ByteCode do
		local Letter = string.sub(ByteCode,i,i)
		if Letter == '"' then
			if not FirstFoundString then
				FirstFoundString = i
			elseif not LastFoundString then
				LastFoundString = i
			end
		end
	end
	
	if LastFoundString and FirstFoundString then
		local FirstSplit = string.split(string.sub(ByteCode,1,FirstFoundString)," ")
		local LastSplit = string.split(string.sub(ByteCode,LastFoundString,LastFoundString)," ")
		local Int = string.sub(ByteCode,FirstFoundString + 1,LastFoundString - 1)
		for _,String in ipairs(FirstSplit) do
			local NewString = ""
			for i = 1,#String do
				local Letter = String:sub(i,i)
				if Letter ~= '"' then
					if Letter ~= string.rep('"',#Letter) then
						if Letter ~= "" and Letter ~= " " then
							NewString = NewString..Letter
						end
					end
				end
			end
			table.insert(WordsGot,NewString)
		end
		table.insert(WordsGot,Int)
		for _,String in ipairs(LastSplit) do
			local NewString = ""
			for i = 1,#String do
				local Letter = String:sub(i,i)
				if Letter ~= '"' then
					if Letter ~= string.rep('"',#Letter) then
						if Letter ~= "" and Letter ~= " " then
							NewString = NewString..Letter
						end
					end
				end
			end
			table.insert(WordsGot,NewString)
		end
	else
		WordsGot = string.split(ByteCode," ")
	end
	for WordNum,Word in ipairs(WordsGot) do
		if #Word < 1 then
			table.remove(WordsGot,WordNum)
		end
	end
	for WordNum = #WordsGot,1,-1 do
		   local Word = WordsGot[WordNum]
		   if not string.match(Word,"%s") then
				local FunctionGot = m.VMfunctions[Word]
				if FunctionGot and not FunctionGot.IsStart and FunctionGot.Returns then
					local Result
					local PossibleArgs = {}
					for ArgNum,Arg in ipairs(WordsGot) do
					if ArgNum > WordNum then
						local CustomArg = ArgsTransform[Arg]
						if typeof(CustomArg) ~= "nil" then
							if typeof(CustomArg) ~= "nil" then
								if CustomArg ~= "nil" then

								else
									CustomArg = nil
								end
							end
						end
						if typeof(CustomArg) == "nil" and typeof(Arg) == "string" then
							if Arg:sub(1,1) == "{" and Arg:sub(#Arg,#Arg) == "}" then
								local NewTable = {}
								Arg = Arg:sub(2,#Arg - 1)
								for _,TablePart in pairs(string.split(Arg,",")) do
									table.insert(NewTable,TablePart)
								end
								Arg = NewTable
							end
						end
						if typeof(CustomArg) == "nil" and typeof(Arg) == "string" then
							if Arg:sub(1,1) == "|" and Arg:sub(#Arg,#Arg) == "|" then
								local NewColor
								Arg = Arg:sub(2,#Arg - 1)
								local SpecialArgs = string.split(Arg,",")
								if tonumber(SpecialArgs[1]) and tonumber(SpecialArgs[2]) and tonumber(SpecialArgs[3]) then
									NewColor = Color3.fromRGB(tonumber(SpecialArgs[1]),tonumber(SpecialArgs[2]),tonumber(SpecialArgs[3]))
								end
								Arg = NewColor
							end
							if typeof(Arg) == "Color3" then
								WordsGot[ArgNum] = Arg
							end
						end
						if typeof(CustomArg) == "nil" and typeof(Arg) == "string" then
							if Arg:sub(1,1) == "<" and Arg:sub(#Arg,#Arg) == ">" then
								local NewPosition
								Arg = Arg:sub(2,#Arg - 1)
								local SpecialArgs = string.split(Arg,",")
								if tonumber(SpecialArgs[1]) and tonumber(SpecialArgs[2]) and tonumber(SpecialArgs[3]) then
									NewPosition = Vector3.new(tonumber(SpecialArgs[1]),tonumber(SpecialArgs[2]),tonumber(SpecialArgs[3]))
								end
								Arg = NewPosition
							end
							if typeof(Arg) == "Vector3" then
								WordsGot[ArgNum] = Arg
							end
						end
						if tonumber(Arg) then
							Arg = tonumber(Arg)
						end
							if typeof(Arg) == "string" then
								local IsFound = false
							      for i = 1,#Arg do
								     if string.sub(Arg,i,i) == "." then
										IsFound = true
										break
									end
							end
							if IsFound or Names[Arg] then
								Arg = GetInstance(Arg)
							end
						 end

	                    --table.remove(WordsGot,WordNum)
						table.insert(PossibleArgs,Arg)
					end
				end
				local succes,err = pcall(function()
					--warn(WordNum)
					if WordNum > 1 then
						Result = FunctionGot.RawFunction(PossibleArgs)
						if Result then
							table.remove(WordsGot,WordNum)
					    end
				    end
				end)
				if not succes then
					warn(err)
				end
				if Result then
					if FirstFoundString then
						if WordNum < FirstFoundString or WordNum > FirstFoundString then
							WordsGot[WordNum] = Result
							--break
						end
					else
						WordsGot[WordNum] = Result
						--break
					end
				end
			end
			
			end
		end
	return WordsGot
end

function GetVMfunctions()
	return m.VMfunctions
end

local Globals = {}

coroutine.wrap(function()
	while wait() do
		--warn(Globals)
	end
end)()

local EveryWord = {"A","W","E","R","T","Y","U","I","O","P","A","S","D","F","G","H","J","K","L","Z","X","C","V","B","N","M"}

m.VMfunctions = {
	print = {
		InfiniteArguments = true;
		IsStart = true;
		Arguments = {
			--Type = "string"
		};
		RawFunction = function(Args)
			local FinalText = ""
			if typeof(Args) == "table" then
				FinalText = Args[1]
			else
				FinalText = tostring(Args)
			end
			print(FinalText)
		end;
	};
	wait = {
		InfiniteArguments = false;
		IsStart = true;
		Arguments = {
			"number"
		};
		RawFunction = function(Time)
			Time = Time[1]
			wait(Time)
		end;
	};
	warn = {
		InfiniteArguments = true;
		IsStart = true;
		Arguments = {
			--Type = "string"
		};
		RawFunction = function(Args)
			local FinalText = ""
			if typeof(Args) == "table" then
				FinalText = Args[1]
			else
				FinalText = tostring(Args)
			end
			warn(FinalText)
		end;
	};
	error = {
		InfiniteArguments = false;
		IsStart = true;
		Arguments = {
			Type = "string"
		};
		RawFunction = function(Args)
			local FinalText = ""
			if typeof(Args) == "table" then
				FinalText = Args[1]
			else
				FinalText = tostring(Args)
			end
			error(FinalText,0)
		end;
	};
	newfunction = {
		IsSpecial = "function";
		IsStart = true;
		InfiniteArguments = true;
		Arguments = {
			"string"
		};
		RawFunction = function(Args)

		end;
	};
	assert = {
		InfiniteArguments = true;
		IsStart = true;
		Arguments = {
			"bool","string"
		};
		RawFunction = function(Args)
			local FinalText = ""
			if typeof(Args) == "table" then
				for i,Arg in ipairs(Args) do
					if i > 1 then
						FinalText = FinalText..tostring(Arg)
					end
				end
			else
				FinalText = tostring(Args)
			end
			assert(Args[1],FinalText)
		end;
	};
	getkb = {
		InfiniteArguments = false;
		Returns = true;
		Arguments = {
          "boolean";
		};
		RawFunction = function(Args)
			warn(Args)
			if Args[1] then
				return  gcinfo()
			else
				return collectgarbage("count")
			end
		end;
	};
	loadcode = {
		InfiniteArguments = true;
		Returns = true;
		IsStart = true;
		Arguments = {
			--"string"
		};
		RawFunction = function(Args)
			local StringArgs = ""
			for _,Arg in ipairs(Args) do
				if #StringArgs < 1 then
					StringArgs = StringArgs..Arg
				else
					StringArgs = StringArgs.." "..Arg
				end
			end
			return m.LoadByteCode(StringArgs)
		end;
	};
	ipairs = {
		InfiniteArguments = false;
		Arguments = {
			"table","string"
		};
		RawFunction = function(Args)
			local Table = Args[1]
			local FunctionToDo = Args[2]
			if Table and FunctionToDo then
				if typeof(Table) == "table" then
					for _,Part in ipairs(Table) do
						GetVMfunctions()[FunctionToDo].RawFunction(Part)
					end
				end
			end
		end;
	};
	newproxy = {
		InfiniteArguments = false;
		Returns = true;
		Arguments = {
			"bool"
		};
		RawFunction = function(Args)
			return newproxy(Args[1] or true)
		end;
	};
	next = {
		InfiniteArguments = false;
		Arguments = {
			"table","string"
		};
		RawFunction = function(Args)
			local Table = Args[1]
			local FunctionToDo = Args[2]
			if Table and FunctionToDo then
				if typeof(Table) == "table" then
					for _,Part in next,Table do
						GetVMfunctions()[FunctionToDo].RawFunction(Part)
					end
				end
			end
		end;
	};
	pairs = {
		InfiniteArguments = false;
		Arguments = {
			"table","string"
		};
		RawFunction = function(Args)
			local Table = Args[1]
			local FunctionToDo = Args[2]
			if Table and FunctionToDo then
				if typeof(Table) == "table" then
					for _,Part in pairs(Table) do
						GetVMfunctions()[FunctionToDo].RawFunction(Part)
					end
				end
			end
		end;
	};
	pcall = {
		InfiniteArguments = true;
		Arguments = {
			"string"
		};
		RawFunction = function(Args)
			local Command = Args[1]
			local Args = shallowCopy(Args)
			table.remove(Args,1)
			pcall(GetVMfunctions()[Command].RawFunction,Args)
		end;
	};
	tableequal = {
		InfiniteArguments = false;
		Returns = true;
		Arguments = {
			"table","table"
		};
		RawFunction = function(Args)
			local Table = Args[1]
			local Table2 = Args[2]
			if Table and Table2 then
				if typeof(Table) == "table" and typeof(Table2) == "table" then
					return rawequal(Table,Table2)
				end
			end
		end;
	};
	tableget = {
		InfiniteArguments = false;
		Returns = true;
		Arguments = {
			"table","number"
		};
		RawFunction = function(Args)
			local Table = Args[1]
			local ArgToGet = Args[2]
			if Table then
				if typeof(Table) == "table" then
					return rawget(Table,ArgToGet)
				end
			end
		end;
	};
	tableset = {
		InfiniteArguments = false;
		Arguments = {
			"table","number","string"
		};
		RawFunction = function(Args)
			local Table = Args[1]
			local Index = Args[2]
			local NewIndex = Args[3]
			if Table then
				if typeof(Table) == "table" and Index and NewIndex then
					return rawset(Table,Index,NewIndex)
				end
			end
		end;
	};
	select = {
		InfiniteArguments = true;
		Returns = true;
		Arguments = {
	--		"number
		};
		RawFunction = function(Args)
			local mode = Args[1]
			local SelectArgs = shallowCopy(Args)
			table.remove(SelectArgs,1)
			return select(mode,unpack(SelectArgs))
		end;
	};
	tonumber = {
		InfiniteArguments = false;
		Returns = true;
		Arguments = {
			"string"
		};
		RawFunction = function(Args)
			local number = Args[1]
			return tonumber(number)
		end;
	};
	tostring = {
		InfiniteArguments = true;
		Returns = true;
		Arguments = {
			"number"
		};
		RawFunction = function(Args)
			local String = Args[1]
			return tostring(String)
		end;
	};
	type = {
		InfiniteArguments = true;
		Returns = true;
		Arguments = {
			"number"
		};
		RawFunction = function(Args)
			local Type = Args[1]
			return type(Type)
		end;
	};
	typeof = {
		InfiniteArguments = true;
		Returns = true;
		Arguments = {
			"number"
		};
		RawFunction = function(Args)
			local Type = Args[1]
			return typeof(Type)
		end;
	};	
	unpack = {
		InfiniteArguments = false;
		Returns = true;
		Arguments = {
			"table"
		};
		RawFunction = function(Args)
			local Type = Args[1]
			return unpack(Type)
		end;
	};
	ypcall = {
		InfiniteArguments = true;
		Arguments = {
			"string"
		};
		RawFunction = function(Args)
			local Command = Args[1]
			local Args = shallowCopy(Args)
			table.remove(Args,1)
			ypcall(GetVMfunctions()[Command].RawFunction,Args)
		end;
	};
	xpcall = {
		InfiniteArguments = true;
		Arguments = {
			"string";
			"string";
			"string"
		};
		RawFunction = function(Args)
			local Command = Args[1]
			local Handlerer = Args[2]
			local Args = shallowCopy(Args)
			table.remove(Args,1)
			table.remove(Args,2)
			xpcall(GetVMfunctions()[Command].RawFunction,GetVMfunctions()[Handlerer].RawFunction,Args)
		end;
	};
	delay = {
		InfiniteArguments = true;
		Arguments = {
			"number";
			"string"
		};
		RawFunction = function(Args)
			coroutine.wrap(function()
				local Time = Args[1]
				local Command = Args[2]
				local SimulatedArgs = shallowCopy(Args)
				table.remove(SimulatedArgs,1)
				table.remove(SimulatedArgs,2)
				wait(Time)
				GetVMfunctions()[Command].RawFunction(SimulatedArgs)
			end)()
		end;
	};
	startingtime = {
		InfiniteArguments = false;
		Returns = true;
		Arguments = {

		};
		RawFunction = function(Args)
			return elapsedTime()
		end;
	};
	getglobals = {
		InfiniteArguments = false;
		Returns = true;
		Arguments = {

		};
		RawFunction = function(Args)
			if Args[1] then
				return Globals[Args[1]]
			end
		end;
	};
	setglobal = {
		InfiniteArguments = true;
		Returns = true;
		Arguments = {
      
		};
		RawFunction = function(Args)
			Globals[Args[1]] = Args[2]
		end;
	};
	setproperty = {
		InfiniteArguments = true;
		Returns = true;
		Arguments = {
			"Instance";
			"string"
		};
		RawFunction = function(Args)
			local success,err = pcall(assign, Args[1], Args[2], Args[3])
			if not success then
				warn(err)
			end
		end;
	};
	getproperty = {
		InfiniteArguments = true;
		Returns = true;
		Arguments = {
			"Instance";
			"string"
		};
		RawFunction = function(Args)
			local success,err = pcall(get, Args[1],Args[2])
			if not success then
				warn(err)
			end
		    return success and err or nil
		end;
	};
	callfunction = {
		InfiniteArguments = true;
		Returns = true;
		Arguments = {
			"Instance";
			"string"
		};
		RawFunction = function(Args)
			local InstanceGot = Args[1]
			local Function = Args[2]
			local Newfunction = ""
			for Word = 1,#Newfunction do
				Word = Newfunction[Word]
				if EveryWord[Word] then
				    Newfunction = Newfunction..Word
				end
			end
			local FunctionGot = InstanceGot[Function]
			local CustomArgs = shallowCopy(Args)
			CustomArgs[1] = nil
			CustomArgs[2] = nil
			local success,err = pcall(FunctionGot,InstanceGot,table.unpack(CustomArgs))
			if not success then
				warn(err)
			end
			return success and err or nil
		end;
	};
	["repeat"] = {
		InfiniteArguments = false;
		Arguments = {
			"number";
			"boolean";
			"number";
			"string"
		};
		RawFunction = function(Args)
			local Times = Args[1]
			local Inverse = Args[2]
			local Steps = Args[3]
			local Command = Args[4]
			if Inverse then
				for i = Times,1,-1 * Steps do
					GetVMfunctions()[Command].RawFunction({i})
				end
			else
				for i = 1,Times,Steps do
					GetVMfunctions()[Command].RawFunction({i})
				end
			end
		end;
	};
	["while"] = {
		InfiniteArguments = true;
		Arguments = {
			"number";
		};
		RawFunction = function(Args)
			local Bool = Args[1]
			local Command = Args[2]
			table.remove(Args,1)
			table.remove(Args,2)
			if typeof(Bool) == "number" then
				while wait(Bool) do
					GetVMfunctions()[Command].RawFunction(Bool)
				end
			else
				while Bool do
					GetVMfunctions()[Command].RawFunction(Bool)
				end
			end
		end;
	};
	new = {
		InfiniteArguments = false;
		Returns = true;
		Arguments = {
			"string";
			"Instance"
		};
		RawFunction = function(Args)
			local NewInstance = Instance.new(Args[1])
			if Args[2] then
				NewInstance.Parent = Args[2]
			end
			return NewInstance
		end;
	};
	increment = {
		InfiniteArguments = false;
		Returns = true;
		Arguments = {
			"number";
			"number"
		};
		RawFunction = function(Args)
			return Args[1] + Args[2]
		end;
	};
	decrement = {
		InfiniteArguments = false;
		Returns = true;
		Arguments = {
			"number";
			"number"
		};
		RawFunction = function(Args)
			return Args[1] - Args[2]
		end;
	};
	multiply = {
		InfiniteArguments = false;
		Returns = true;
		Arguments = {
			"number";
			"number"
		};
		RawFunction = function(Args)
			return Args[1] * Args[2]
		end;
	};
	divide = {
		InfiniteArguments = false;
		Returns = true;
		Arguments = {
			"number";
			"number"
		};
		RawFunction = function(Args)
			return Args[1] / Args[2]
		end;
	};
	pow = {
		InfiniteArguments = false;
		Returns = true;
		Arguments = {
			"number";
			"number"
		};
		RawFunction = function(Args)
			return Args[1] ^ Args[2]
		end;
	};
}

function m.LoadByteCode(UncompiledByteCode)
	coroutine.wrap(function()
		local ByteList = string.split(UncompiledByteCode,";")
		for ByteLine,ByteCode in ipairs(ByteList) do
			if ByteCode == string.rep(ByteCode:sub(1,1),#ByteCode) then
				table.remove(ByteList,ByteLine)
			end
		end
		for ByteNumber,ByteLine in ipairs(ByteList) do
			local Args = SplitNonStrings(ByteLine)
			for ArgNum,Arg in next,Args do
				Arg = ArgsTransform[Arg]
				if typeof(Arg) ~= "nil" then
					if Arg ~= "nil" then
						Args[ArgNum] = Arg
					else
						Args[ArgNum] = nil
					end
				end
			end
			for ArgNum,Arg in next,Args do
				if tonumber(Arg) then
					Args[ArgNum] = tonumber(Arg)
				end
			end
			for ArgNum,Arg in next,Args do
				if typeof(Arg) == "string" then
					if Arg:sub(1,1) == "{" and Arg:sub(#Arg,#Arg) == "}" then
						local NewTable = {}
						Arg = Arg:sub(2,#Arg - 1)
						for _,TablePart in pairs(string.split(Arg,",")) do
							table.insert(NewTable,TablePart)
						end
						Arg = NewTable
					end
					if typeof(Arg) == "table" then
	                   Args[ArgNum] = Arg
					end
				end
			end
			for ArgNum,Arg in next,Args do
				if typeof(Arg) == "string" then
					if Arg:sub(1,1) == "*" and Arg:sub(#Arg,#Arg) == "*" then
						local NewColor
						Arg = Arg:sub(2,#Arg - 1)
                        NewColor = BrickColor.new(Arg)
						Arg = NewColor
					end
					if typeof(Arg) == "BrickColor" then
						Args[ArgNum] = Arg
					end
				end
		    end
		
			for ArgNum,Arg in next,Args do
				if typeof(Arg) == "string" then
					if Arg:sub(1,1) == "<" and Arg:sub(#Arg,#Arg) == ">" then
						local NewPosition
						Arg = Arg:sub(2,#Arg - 1)
						local SpecialArgs = string.split(Arg,",")
						if tonumber(SpecialArgs[1]) and tonumber(SpecialArgs[2]) and tonumber(SpecialArgs[3]) then
							NewPosition = Vector3.new(tonumber(SpecialArgs[1]),tonumber(SpecialArgs[2]),tonumber(SpecialArgs[3]))
						end
						Arg = NewPosition
					end
					if typeof(Arg) == "Vector3" then
						Args[ArgNum] = Arg
					end
				end
			end
			for ArgNum,Arg in next,Args do
				if typeof(Arg) == "string" then
					local IsFound = false
					for i = 1,#Arg do
						if string.sub(Arg,i,i) == "." then
							IsFound = true
							break
						end
					end
					if IsFound then
						Args[ArgNum] = GetInstance(Arg)
					end
				end
			end
			for ArgNum,Arg in next,Args do
				if typeof(Arg) == "string" then
					if Names[Arg] then
						Args[ArgNum] = Names[Arg]
					end
				end
			end
			if #Args >= 1 then
				local Command = Args[1]
				if typeof(Command) == "string" then
					local NewCommand = ""
					for i = 1,#Command do
						local Letter = string.sub(Command,i,i)
						if Letter == "" or Letter == " " then

						else

							NewCommand = NewCommand..Letter
						end
					end
					local FunctionGot
					for CommandName,CommandData in pairs(m.VMfunctions) do
						if string.find(Command:lower(),CommandName:lower()) then
							FunctionGot = m.VMfunctions[CommandName]
							break
						end
					end
					if FunctionGot and FunctionGot.IsSpecial ~= "function" then
						local Args = shallowCopy(Args)
						table.remove(Args,1)
						if FunctionGot.InfiniteArguments then
							FunctionGot.RawFunction(Args)
						else
							local GoodArgs = {}
							for ArgNum,Arg in ipairs(Args) do
								local ArgsGot = FunctionGot.Arguments[ArgNum]
								if ArgsGot then
									table.insert(GoodArgs,Arg)
								end
							end
							local Result = FunctionGot.RawFunction(GoodArgs)
							if Result then
								table.insert(Globals,Result)
								table.insert(Args,1,Command)
								for ByteInt,Byte in ipairs(Args) do
									if Byte == Command then
										Args[ByteInt] = Result
									end
								end
							end
						end
					elseif FunctionGot and FunctionGot.IsSpecial == "function" then
						local functionArgs = shallowCopy(Args)
						table.remove(Args,1)
						local NextLine = ByteList[ByteLine + 1]
						local LastLine
						if string.find(NextLine,"~") then
							NextLine = ByteLine + 1
							for LineNumber,Line in ipairs(ByteList) do
								if string.find(Line,"~") and LineNumber > ByteLine then
									LastLine = LineNumber
								end
							end
						end
						if tonumber(NextLine) and tonumber(LastLine) then
							local GoodLines = {}
							for LineNum,FunctionByteCode in ipairs(ByteList) do
								if LineNum > NextLine and LineNum < LastLine then
									table.insert(GoodLines,FunctionByteCode)
									table.remove(ByteList,LineNum)
								end
							end
							if not m.VMfunctions[Args[1]] then
								local CustomCommand = Args[1]
								local CustomArgs = shallowCopy(Args)
								table.remove(Args,1)
								local NewCommand = {
									IsSpecial = "CustomFunction";
									InfiniteArguments = true;
									Arguments = Args;
									RawFunction = function(Args)
										warn(unpack(Args))
									end;
								}
								m.VMfunctions[CustomCommand] = NewCommand
							end
						end
					end
				end
			end
		end
	end)()
end

return m

end

return m
Known bugs

Some starting functions(e.g print),xpcall prints true on error,etc.

This is how I call it
local Script = [[

]]

local MainModule = require(game.ReplicatedStorage.BytecodeChanger)
local Decompiled = MainModule.LoadByteCode(Script)

Note that this is in Game Design Support because it is in my own Sandbox game, made to limit most of the functions(getfenv, setfenv, DataStores.)

There is a quick code I made:

setglobal NewPart new Part Workspace;

setproperty getglobals NewPart Anchored true;

setproperty getglobals NewPart Size <25,5,25>;

setproperty getglobals NewPart Position <0,-7.145,0>;

setproperty getglobals NewPart Color |255,255,77|;

setproperty getglobals NewPart Name “Basepart”;

setproperty getglobals NewPart Shape Block;

setglobal NewSpawn new SpawnLocation Workspace;

setproperty getglobals NewSpawn Anchored true;

setproperty getglobals NewSpawn Size <25,5,25>;

setproperty getglobals NewSpawn Position <0,-6.145,0>;

setproperty getglobals NewSpawn Transparency 1;

setproperty getglobals NewSpawn CanCollide true;

setproperty getglobals NewSpawn TeamColor “Medium stone grey”;

Functions and everything you know

print (An normal print, works with only one Argument.)
wait (An normal wait, works with only one Number argument.)
warn (Same like print, but with an orange color.)
error (Just errors the script, Accepts one argument, An string.)
newfunction (in beta, please don’t use it)
assert (If the first argument is nil or false, the assert will error with the Error being the second Arg.)
getkb (Returns the kilobits (Or whatever it is called) Used my Lua. It expects 0 or 1 arguments. If there are no arguments, it returns collectgarbage(“count”) else if there is an argument and it is true then it returns gcinfo().)
loadcode (It is like loadstring in Lua, but the code needs to be written in my language.)
ipairs (It expects the first argument a table, and a function. (It calls the function gives with x as an argument for every index in the table))
newproxy (It expects 0 or 1 argument. if no argument is set, it will default to true, Else it will use the first argument given.)
next (The same as ipairs, but uses the next function instead. You can check developer.roblox.com to see how to use next and its problems.)
pairs (The same as ipairs, but uses the pairs function instead.)
pcall (It expects one function to call, and its arguments.)
tableequal (it excepts 2 tables, works like the Lua rawequal function.)
tableget (it excepts a table and an index to get. works like the Lua rawget function.)
tableset (it excepts a table, an index, and a variable. works like the Lua rawset function.)
select (Works the same as the Lua function, it needs the first argument (“#” or a number) and some variables.)
tonumber (The same as the Lua function.)
tostring (The same as the Lua function.)
type (The same as the Lua function.)
typeof (The same as the Lua function.)
unpack (The same as the Lua table.unpack function, It requires a table and returns a tuple.)
ypcall (the same as the pcall function.)
xpcall (It requires a function to call, an function to call if it errors, and the Arguments.)
delay (It excepts a number to wait and a function to call plus some arguments.)
startingtime (It returns the Lua elapsedTime function.)
getglobals (It excepts 1 or 0 arguments. If an argument is passed, it returns the global set with the name (Argument 1). Else if there are 0 arguments, it returns the entire Globals table.)
setglobal (it excepts 2 arguments, it sets Globals.Argument1 = Argument2. Globals can be got from getglobals function.)
setproperty( it excepts 3 Arguments. The first one must be an instance(Or table or even newproxy), the second must be a String(or number for tables/newproxy) to set and the last value (Any) Will be the value it will be set to.)
getproperty (It expects 2 arguments, an Instance(Table or newproxy) and a Name(Number for Table/newproxy).)
callfunction (It expects a minimum of 2 arguments, an Instance(Table or newproxy), and a function to be called on the Instance.)
repeat (It needs 4 arguments. A number(How many times to call), an boolean(If it is in inverse), a number (How many steps it does. E.g: 2 = 2,4,6,etc) and the command to do. Note that the function will be called with the number got(Every time).)
while (It needs 2 arguments. The first one must be an Number or anything else. (If it is an number, it is getting called every wait(N). The second argument must be the function to call.The arguments passed to the function will be the First argument.)
new (The first argument must be an Instance name(e.g “Part”) and the second one(optional) must be an Instance(The parent).)
The rest are self explanatory (increment, decrement, multiply, divide and pow)
I hope I got all of them!

Finding any bugs with combinations of code is appreciated! Just tell the code.

Syntax

This is how to call a function(With arguments)
FunctionName Argument Argument…
Every line (At the final) you must add ; or it won’t work
Note that the functions will start from the end of the line, this is an example:
setglobal NewPart new Part Workspace; – new function will start first and setglobal last
Numbers are just normal numbers. Like 5
You can create Vector3 values using <x,x,x>
You can create a table using {x,x,x…}
You can create Color3 values using |x,x,x|
Bools/nil values can be created as normal(true,false,nil)
Getting instances like normal(e.g: Workspace.Baseplate)
Strings are pretty special. You may ask, why? Because they are made like in normal Lua “This is a string” But in what I did is, they are just normal words(Everything is a string) but this string is the only one that can accept: spaces in it, Instances can’t be created in it, Colors, Vectors, and numbers can’t be created too in it)
If you need any more info, msg me.

What I'm working currently at

Repairing the table functions
Repairing xpcall
Repairing firefunction

Note that when calling the .LoadByteCode creates a new thread (I think it’s called a thread) so it won’t block other scripts using it.

Note that this is not indeed for real use because of all the bugs.

Change log

12/14/2020: Starting with * and ending with * The string will become an BrickColor. Example:

 *"Medium stone grey"*
3 Likes

my take:

the code seems pretty obscure. even for a lisp language the amount of required conversion and tokens that should be autofilled via the compiler is just too much.

secondly, why the conversions? you could just create custom classes, here’s how i did it with my own:

local vector3 = {}

local ReplicatedStorage = game:GetService("ReplicatedStorage")

---@type shobfixStructure
-- dont kill me for this its inside a self contained folder and im too lazy to use repstorage
local structure = require(script.Parent.Parent.Parent.structure)
local utility = require(ReplicatedStorage.modules.utility)


function vector3.new(x, y, z)
	local self = {}
	self.__class = "vector3"

	local function component(axis, val)
		return structure.newValue(
			function(self, data, new)
				self.value = new
			end, 
			function(self)
                       --refresh
			end, 
			"number", 
			{ true, true, true, true }, 
			val or 0, 
			string.format("%s component of the vector", axis)
		)
	end

	self.x = component("X", x)
	self.y = component("Y", y)
	self.z = component("Z", z)

	return self
end


return vector3

resulting in the following code:

def "vector" (new vector3 0 10 0)
run print vector.X
run print vector.Y
run print vector.Z

rather than using primtitives that will end up much too hard to maintain, you could create one way to do it with a lot of extensibility.

and what about logical operations? greater-lesser-than? if-statements? the only reason I haven’t gotten them to parse yet myself is laziness.

5 Likes