I AM NOT ASKING FOR A SCRIPT!
So you have option one which is using loadstring(), I really hate turning on loadstring so I don't want to use this method at all.
And the other option would be scanning the whole string people inserted in the calculator and using a lot of functions to calculate it. Which is possible, but a real mind teaser.
Or is there any other way to get the answer real quick?
And no, don't say something like: "Use print!" Because I want it to show up on a TextLabel.
And no, don't say something like: "Use tonumber()" Since that will just return nil if you do something like this: tonumber("4+4") -- Returns nil.
So I am basically asking: "What is the best/fastest way to calculate a string (without using loadstring() )"
Sorry for my horrible grammar/spelling, I am not English and I've got serious problems with the English tongue.
Option 1: This is kind of cheating the system, but you can use the Yueliang, which is basically a lua parser written in lua. If you want to see an implementation of it, you can look at the LoadString script in the EISS MainModule by Sceleratis.
Option 2: You can use the math.js API, if you are fine with using HttpService. Here's an example from a calculator script I created a while ago, where args[1] is the equation you want to solve:
local solution = game.HttpService:GetAsync("http://api.mathjs.org/v1/?expr=" .. game.HttpService:UrlEncode(args[1], false))
If you want to try it: http://api.mathjs.org/v1/?expr=2*(7-3)