Private Sub Button1_Click
Dim x As Int = 25
Dim y As Double 'ignore
Main.scriptEngine.RunMethod("put",Array("x", x)) ' pass b4x variable to lua (lua name , b4x variable)
Main.scriptEngine.RunMethod("eval",Array("y = math.sqrt(x)")) ' run the lua
y = Main.scriptEngine.RunMethod("get",Array("y")) ' get result back from lua using the lua name
xui.MsgboxAsync($"y= ${y}"$, "B4X") 'display
End Sub