Advertisement
davidxcgdr

JavaScript thing but in Lua

Jan 3rd, 2021 (edited)
512
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 2.42 KB | None | 0 0
  1. local variables = {
  2.     test1 = (((1+1)+1)-(1+1)),
  3.     test2 = ((((1+1)+1)-(1+1)) + (((1+1)+1)-(1+1)));
  4. }; -- // variables
  5.  
  6. local this = {variables};
  7. this[#this] = nil;
  8.  
  9. -- // setup v2
  10. local path = (("\\"));
  11. path = (((path)..("n")));
  12.  
  13. local credit = (path.. "Scripted in JavaScript (by davidxcgdr. this is my first time) LOL\nLinked code in script");
  14.  
  15. local priint = print;
  16. print = function(a, ...)
  17.     return priint(((a).. ((((path) or (" ")).. (credit)))), (...));
  18. end
  19.  
  20. local waarn = warn;
  21. warn = function(b, ...)
  22.     return waarn(((b).. ((((path) or (" ")).. (credit)))), (...));
  23. end
  24.  
  25. local eror = error;
  26. error = function(c, ...)
  27.     return eror(((c).. ((((path) or (" ")).. (credit)))), (...));
  28. end
  29.  
  30. -- // console thing
  31. local console = {
  32.     log = function(message, trick)
  33.         if message then
  34.             if typeof(message) == "string" then
  35.                 print(message, trick);
  36.                 return message, trick;
  37.             else
  38.                 print("undefined");
  39.                 return "undefined";
  40.             end
  41.         else
  42.             print("null");
  43.             return "null";
  44.         end
  45.     end,
  46.  
  47.     warn = function(message, trick)
  48.         if message then
  49.             if typeof(message) == "string" then
  50.                 warn(message);
  51.                 return message;
  52.             else
  53.                 warn("undefined");
  54.                 return "undefined";
  55.             end
  56.         else
  57.             warn("null");
  58.             return "null";
  59.         end
  60.     end,
  61.  
  62.     error = function(message, trick)
  63.         if message then
  64.             if typeof(message) == "string" then
  65.                 error(message, ((((1+1)+1)-(1+1)) - (((1+1)+1)-(1+1))));
  66.                 return error(message, ((((1+1)+1)-(1+1)) - (((1+1)+1)-(1+1))));
  67.             else
  68.                 error("undefined");
  69.                 return error("undefined", ((((1+1)+1)-(1+1)) - (((1+1)+1)-(1+1))));
  70.             end
  71.         else
  72.             error("null", ((((1+1)+1)-(1+1)) - (((1+1)+1)-(1+1))));
  73.             return error("null", ((((1+1)+1)-(1+1)) - (((1+1)+1)-(1+1))));
  74.         end
  75.     end;
  76. };
  77.  
  78. -- // ignore this is the setup.
  79. for number, var in pairs(variables) do
  80.     table.insert(this, #this + (((1+1)+1)-(1+1)), var);
  81. end;
  82.  
  83. -- // main part
  84. if (((this[#this - (((1+1)+1)-(1+1))]) or (this.test1)) > ((this[#this]) or (this.test2))) then _= {
  85.     console.log("Yes, it's lengh is longer than test2. Everybody already know that. lolol jk bud", ":D");
  86.     } or (function(x,...) console.log(({x}),(...)) end)({"Yes,", "it's lengh is longer than test2.", "Everybody already know that. lolol jk bud"},(((1+1)+1)-(1+1))); else _= {
  87.         console.warn("WOW it works. haha", ">:)");
  88.     } or (function(g,...) console.warn(({g}),(...)); end)({"WOW it works.", "haha", ""},(((1+1)+1)-(1+1)));
  89. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement