How to Make the Worst Looking Code Possible

Another fun thing you can do is to use semicolons to put multiple statements onto one line. Now you can format your code into cool and fun shapes!
This also prevents your code from erroring as often, as the Luau VM will think that your code is fun and will be entertained while reading it.

local var1 = 0
print(0);var1 =var1+1;print(1);var1= var1+1;print(2);var1= var1+1;print(3);var1= var1+1
print(4);var1=var1+1;print(5) ;var1 =var1+1;print(6);var1= var1+1;print(7);var1 =var1+1
print(8);var1 =var1+1;print(9);var1= var1+1;print(10);var1=var1+1;print(11);var1=var1+1
print(12);var1=var1+1;print(13);var1=var1+1;print(14);var1=var1+1;print(15);var1=var1+1
print(16);var1=var1+1;print(17);var1=var1+1;print(18);var1=var1+1;print(19);var1=var1+1
print(20);var1=var1+1
print(21);var1=var1+1
print(22);var1=var1+1
print(23);var1=var1+1
print(24);var1=var1+1
print(25);var1=var1+1
print(26);var1=var1+1
print(27);var1=var1+1;print(28);var1=var1+1;print(29);var1=var1+1;print(30);var1=var1+1
print(31);var1=var1+1;print(32);var1=var1+1;print(33);var1=var1+1;print(34);var1=var1+1
print(35);var1=var1+1;print(36);var1=var1+1;print(37);var1=var1+1;print(38);var1=var1+1
print(39);var1=var1+1;print(40);var1=var1+1;print(41);var1=var1+1;print(42);var1=var1+1
print(43);var1=var1+1;print(44);var1=var1+1;print(45);var1=var1+1;print(46);var1=var1+1
print(47);var1=var1+1
print(48);var1=var1+1
print(49);var1=var1+1
print(50);var1=var1+1
print(51);var1=var1+1
print(52);var1=var1+1
print(53);var1=var1+1
print(54);var1=var1+1;print(55);var1=var1+1;print(56);var1=var1+1;print(57);var1=var1+1
print(58);var1=var1+1;print(59);var1=var1+1;print(60);var1=var1+1;print(61);var1=var1+1
print(62);var1=var1+1;print(63);var1=var1+1;print(64);var1=var1+1;print(65);var1=var1+1
print(66);var1=var1+1;print(67);var1=var1+1;print(68);var1=var1+1;print(69);var1=var1+1
print(70);var1=var1+1;print(71);var1=var1+1;print(72);var1=var1+1;print(73);var1=var1+1
9 Likes

There seems to be an area that could be optimised in this part of your script. Instead of using local variables, it’s best to write them into a modulescript, like this:

--game.Workspace.Script.parent
			return  function(   )
	env      =getfenv(0  )
--[==[Write your variables here!]==]
	env["var1" ]=    'Hello world!'
	  env.var2   = 123
	env[  'False']   = true
env['Pi'      ]=4

	setfenv(    0,env)end

and then load them into another script like this:

		--game.Workspace.Script
				require   (script.parent   )()
--[[prints Hello World!]]print(var1   )

This even allows you to import your variables into multiple scripts!
The script editor might complain that “THe varIabLE iS NOt defINEd!!”?!?!?!“?!$!!%^”, but this is simply because the editor is unable to comprehend the extreme performance and unthinkable power your code now holds.

5 Likes

Thanks this tutorial will help me so much in the future

Help i got an error after this how do i fix it

18 Likes

Im not that great at enchanting table but,╎ ℸ ̣⍑iリꖌ ||𝙹⚍ nᒷe↸ to ∷eᒲo⍊e the ꖎoo!¡╎ ℸ ̣⍑iリꖌ ||𝙹⚍ nᒷe↸ to ∷eᒲo⍊e the ꖎoo!¡.

4 Likes

I didn’t know this was in lua! Really cool!

2 Likes

char.leaderstats would not work since its in the plr

1 Like

you can always count on trashy jojo ABA clones to have code that looks like this

3 Likes

Did you mean c.leaderstats and p?

1 Like

Thanks for noticing! Surprised no one else noticed

1 Like

also, make sure not to separate out your code into different modules and scripts!

Put your hunger system, your health system, your weapons system, your enemy AI, your animations player, and your round system logic all in the same master script.

3 Likes

this is so useful! thanks for the codes!

1 Like

Hello @zavaled you should do a research in google ! Try asking ChatGpt

Lemme know if it solve you problem!!!1!!

this is actually good at preventing error thanks!

this was really helpful, now my code looks like this

local workspace =script.Parent.Parent.Parent.Parent.Parent.Parent.Parent.Parent.Parent.Workspace --[[goes to workspace]]                        
local part  = workspace.Part --[[ goes to part]]          
local scriptt=  part.Script --[[goes to this scirpt]]                          
                                                                                                                                       
if workspace then                                                                            --[[finds worskpace]]
 if part then     --  [[fins prat]]
  if scriptt then   --[[[finds scripttt]]]]]
print("it worked yaaayydfsdf hasomekweter") --[[prints that iwt worked]]
end               
end  
end-----[[ends s]]                                        

i liked and subscribed to your channel now thanks!!11

1 Like

All jokes aside bro the moment I saw this image I felt tears developing :sob:

4 Likes

did a bit of “optimilization”
better code

1 Like

instead of using x += 1, I recommend to use x=x+1.
make sure to remove the spaces for even worse code! :smile:

1 Like

make it one if you dont use the enter key

1 Like

Ty! I made this:

_=tonumber;__=tostring;___=string.sub
print(_(___(__(function()end), 10)))

Helped my workflow

3 Likes

Also i think if you use OOP, make sure to over-complicate things and have 1000 classes (yes even for something as basic object that prob is only used once in a single level, make an entire class for it)

make sure to do else-if statements alot, and make sure to call intensive calls every frame, yes EVERY FRAME!

Now to Networking:
make sure to NOT secure any remote events, TRUST THE CLIENT!

Here is an example remote event:

game.ReplicatedStorage.RemoteEvent.OnServerEvent:Connect(function(player, instance, property, value)
instance[property] = value
end)

Alright, thanks for reading! Bye!! ~w~

3 Likes