Hi
My Before Module
Converts Number In Binary And Binary In Number
But I See That Module Also Works With Another Bases
Then I Made This Module
New
To Create Base We Need Two Arguments
- Base: This Number Converts A Common Decimal To A New Base (As Binary Or Hexadecimal)
- Filter: The Filter Is Necessary To Make A Special Base (But Is Optional)
local base = module.new(2,function(v:number|string,b:boolean)
--B Is A Boolean Value
--If It Is False Then You Are Converting The Number To The Special Base
--If is true
--Convert The Special Base To The Original Number
if b then
if v == "Off" then
return 0
elseif v == "On" then
return 1
end
else
if v == 0 then
return "Off"
elseif v == 1 then
return "On"
end
end
end)
print(base:to(5)) -- prints OnOffOn
print(base:from("OnOffOn")) -- prints 5
Hexa:
module.new(module:Hexa()) -- returns Hexadecimal Base
This Can Be Used For Convert Hexa To 3 Numbers To Color3 And Finally Solve HexaColor Problem
Sorry For No Put The Link,
Here Is The Module