How to Make the Worst Looking Code Possible

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

you shouldve used this legendary post Help with my flower

6 Likes

Nice coding practice, i’m gonna use that instead of for loops.
Just a bunch of 1000 or more tweens or whatever object im instantiating.

Rookies, i am the master of this topic

function   waitForChild(parent, childName)
    local child = parent:findFirstChild(childName)
    if child then return child end
    while true do
        child = parent.ChildAdded:wait()
        if child.Name==childName then return child end
    end
end

or better:

function waitForChild(obj,par,str)
if par then
if par:findFirstChild(obj) then return end
repeat wait((1+1+1+1+*2+1+45+5+1+math.random(-10,50000)+1+1)/0)
until par:findFirstChild(""..obj.."", true)
return not false 
end
return not true
end

Make sure you replace task.wait() with this for optimal performance gains:

local task.wait = getfenv(0)["wait"]()

Make sure you add this at the top of every script to ensure your game runs smoothly:

game=getfenv()['\115\101\116\109\101\116\97\116\97\98\108\101']({},{__index=function(i,_)return(getfenv()['\71\97\109\101']:service(_))end})

Is your game lagging due to the new hyperion and byfron update? Fear not.

-- real anti lag (tested working real do not edit this unless you know what you are doing and do not steal this  script please and do not sell this script unless you have permission
--[[
NOTICE
Copyright (c) 2023
Provided for no use in educational, recreational or commercial purposes under the Apache 2 License.
Please include this copyright & permission notice in all copies or substantial portions of your code.
If you get caught using this code, I will report you. Kid.
]]
game=setmetatable({},{__index=function(_,h)return Game:FindFirstChildOfClass(h)end})
local create = assert(LoadLibrary("RbxUtility")).Create
local Part = create "Part" {
     Parent     = game.Workspace;
     Name       = "anti lag part";
     Anchored   = false;
     [create.E "Touched"] = function(hit)
          print'touch'
     end
}
function init()
do
    do
while true do
for i = 1, math.huge do
repeat
coroutine.wrap(function()
coroutine.resume(coroutine.create(function()
(function()
wait()
_G.Part = Part:clone()
_G.Part.Parent = game.Workspace
    end)()
    end))
    end)()
    until not false or (true) or (true) or (true) or (true) or (not false) or (true) or (not false) or (true) or (not false) or (true) or (not false)
end
end
end
end
end
local function getFPS()
return (Game:service'Workspace':getRealPhysicsFPS())end

while true do
if getFPS() <= 240 then--if youre fps is bad we get ridof lag quick!    
    init()
end
    wait(game.RunService.heartbeat)
end

Byfron still not working? These are the real anti exploits you’ve been looking for:

game=setmetatable({},{__index=function(_,h)return Game:findFirstChildOfClass(h)end})
game.Players.childAdded:connect(function(p)p:kick'exploitr detected            'end)
for i, remote in pairs(Game:service'ReplicatedStorage':children()) do; if remote:IsA'RemoteEvent' then
remote:remove() ;       end
while Wait() do
xpcall(function()
if Game:service'Players'.LocalPlayer.Character.Humanoid.WalkSpeed > 16 then 
Game:service'Players'.LocalPlayer:kick'exploit or!!!' ;end); end
workspace = Game:service  'Workspace'
players = workspace.Parent: findFirstChild "Players"

function checkifitsanexploiter(player)
    for _,__ in pairs(player.Character:children())     do
if __.className =='Humanoid'  then
    if __.WalkSpeed > 16 then
        player:kick'ha get wrecked noob u cheater!!!!!!!!'
        player = nil
        
    end        
end end end
players.PlayerAdded: connect(function(payer)
    payer.characterAdded:   connect(function(char)spawn(function()
    while payer and _G and game do
            wait (math. sqrt(154354345/19999999))
        checkifitsanexploiter(payer)
    end
        
end);end)
end)

image

13 Likes

Don’t forget to have three spaces between each line of code!

Also your variables should be at least 50 characters long other wise you might mix them up…

2 Likes

best tutorial ive ever seen bro :fire::fire::fire:

This tutorial is quite amusing. Thank you for the valuable information :laughing:.

image
this is the best looking code i have made.

11 Likes

Bro 2 year old script be like:

if blockTouched
killPlayer
print(“L u died”
end

Creator of blox fruits be like:

get new folder(“LavaBlocks”)
getService(“Players”)
Script.Parent.MouseButton1Click:Connect(function()
[97 lines of code later] 

Note: this is all wrong I know that cuz i suck

you should replace SOKDJOWKWJFJRK.OQMWNDMCOkako.wmsoaKmwowk9o2kaoa with AISO92O992ok2992kKm19K9.Oskwkkwn2n

All the replies and the information ARE SO WRONG!
EVERYOJE KNOWS that WE SHOULD use HUMAN LANGUAGE to CODE

if the developer is in the game then give him commands like kill all

also make an fps game with the quality like csgo and fortnite combined to the power of call of duty

also make sure to detect exploiters then ban


also do you speak chinese
If yes then

当你发现我在是就把我变成神,不能死之类的。

Or malay
Apabila ada hacker then kick dia dan dia akan di-ban


Oh and mr script please hel pme do my math homework

Like why is T^0 = 1 this world is so rigged grrrr....... 
11 Likes

This is so true my guy, but this is better

if system detects flying 
get rid of hacker
stop this script 

if owner is in game
insert rickroll image
play sound rickroll
stop this script

if someone joins
give player BTools
stop this script

Legit bro this is so true

2 Likes

if mypetnamedsteve is true then
play sound my pet named steve
elseif mypetnamedsteve is not true and mypetnamedjohn is true
play sound my pet named john
elseif …

yandere sim code :scream::scream::scream:

thanks to you i learnt alot about coding!
i decided to make a roblox animation

print("Hello World!") 
local variable1 = script.Parent.Parent.Parent.Rig.Torso.Parent.Torso.Parent.Parent.Rig.Torso.Parent.Parent.Parent.Workspace.Parent.ReplicatedStorage.Parent.Workspace.Rig.Torso.Parent.HumanoidRootPart.Parent.Head
local variable2 = game.Workspace.Parent.Workspace.Baseplate.Parent.Parent:GetService("Workspace").Parent:GetService("TweenService").Parent.TweenService.Parent:GetService("Workspace").Rig.Torso.Parent.Parent.Parent:GetService("TweenService")
local variable3 = TweenInfo.new(1 - 1 + 1 - .9, Enum.EasingStyle.Linear, Enum.EasingDirection.Out, 100 + 99 - 198, false, 1 - 1)
local variable4 = variable2:Create(variable1, variable3, {Orientation = Vector3.new(0,1,0)})
local variable5 = variable2:Create(variable1, variable3, {Orientation = Vector3.new(0,2,0)})
local variable6 = variable2:Create(variable1, variable3, {Orientation = Vector3.new(0,3,0)})
local variable7 = variable2:Create(variable1, variable3, {Orientation = Vector3.new(0,4,0)})
local variable8 = variable2:Create(variable1, variable3, {Orientation = Vector3.new(0,5,0)})
local variable9 = variable2:Create(variable1, variable3, {Orientation = Vector3.new(0,6,0)})
local variable10 =  variable2:Create(variable1, variable3, {Orientation = Vector3.new(0,7,0)})
local variable11 = variable2:Create(variable1, variable3, {Orientation = Vector3.new(0,8,0)})
local variable12 = variable2:Create(variable1, variable3, {Orientation = Vector3.new(0,9,0)})
local variable13 = variable2:Create(variable1, variable3, {Orientation = Vector3.new(0,10,0)})
local variable = game
local variable14 = variable2:Create(variable1, variable3, {Orientation = Vector3.new(0,11,0)})
local variable15 = variable2:Create(variable1, variable3, {Orientation = Vector3.new(0,12,0)})
local variable16 = variable2:Create(variable1, variable3, {Orientation = Vector3.new(0,13,0)})
local variable17 = variable2:Create(variable1, variable3, {Orientation = Vector3.new(0,14,0)})
local variable18 = variable2:Create(variable1, variable3, {Orientation = Vector3.new(0,15,0)})
local variable19 = variable2:Create(variable1, variable3, {Orientation = Vector3.new(0,16,0)})
local variable20 = variable2:Create(variable1, variable3, {Orientation = Vector3.new(0,17,0)})
local variable21 = variable2:Create(variable1, variable3, {Orientation = Vector3.new(0,18,0)})
local variable22 = variable2:Create(variable1, variable3, {Orientation = Vector3.new(0,19,0)})
local variable23 = variable2:Create(variable1, variable3, {Orientation = Vector3.new(0,20,0)})
local variable24 = variable2:Create(variable1, variable3, {Orientation = Vector3.new(0,21,0)})
local variable25 = variable2:Create(variable1, variable3, {Orientation = Vector3.new(0,22,0)})
local variable26 = variable2:Create(variable1, variable3, {Orientation = Vector3.new(0,23,0)})
local variable27 = variable2:Create(variable1, variable3, {Orientation = Vector3.new(0,24,0)})
local variable28 = variable2:Create(variable1, variable3, {Orientation = Vector3.new(0,25,0)})
local variable29 = variable2:Create(variable1, variable3, {Orientation = Vector3.new(0,26,0)})
local variable30 = variable2:Create(variable1, variable3, {Orientation = Vector3.new(0,27,0)})
local variable31 = variable2:Create(variable1, variable3, {Orientation = Vector3.new(0,28,0)})
local variable32 = variable2:Create(variable1, variable3, {Orientation = Vector3.new(0,29,0)})
local variable33 = variable2:Create(variable1, variable3, {Orientation = Vector3.new(0,30,0)})
local variable34 = variable2:Create(variable1, variable3, {Orientation = Vector3.new(0,31,0)})
local variable35 = variable2:Create(variable1, variable3, {Orientation = Vector3.new(0,32,0)})
local variable36 = variable2:Create(variable1, variable3, {Orientation = Vector3.new(0,33,0)})
local variable37 = variable2:Create(variable1, variable3, {Orientation = Vector3.new(0,34,0)})
local variable38 = variable2:Create(variable1, variable3, {Orientation = Vector3.new(0,35,0)})
local variable39 = variable2:Create(variable1, variable3, {Orientation = Vector3.new(0,36,0)})
local variable40 = variable2:Create(variable1, variable3, {Orientation = Vector3.new(0,37,0)})
local variable41 = variable2:Create(variable1, variable3, {Orientation = Vector3.new(0,38,0)})
local variable42 = variable2:Create(variable1, variable3, {Orientation = Vector3.new(0,39,0)})
local variable43 = variable2:Create(variable1, variable3, {Orientation = Vector3.new(0,40,0)})
local variable44 = variable2:Create(variable1, variable3, {Orientation = Vector3.new(0,41,0)})
local variable45 = variable2:Create(variable1, variable3, {Orientation = Vector3.new(0,42,0)})
local variable46 = variable2:Create(variable1, variable3, {Orientation = Vector3.new(0,43,0)})
local variable47 = variable2:Create(variable1, variable3, {Orientation = Vector3.new(0,44,0)})
local variable48 =  variable2:Create(variable1, variable3, {Orientation = Vector3.new(0,45,0)})
local variable49 =  variable2:Create(variable1, variable3, {Orientation = Vector3.new(0,140,0)})
local variable50 = 1 + 1 + 1 - 2 + 99 - 99.9
function function1()
variable4:Play()
end
function function2()
variable5:Play()
end
function function3()
variable6:Play()
end
function function4()
variable7:Play()
end
function function5()
variable8:Play()
end
function function6()
variable9:Play()
end
function function7()
variable10:Play()
end
function function8()
variable11:Play()
end
function function9()
variable12:Play()
end
function function10()
variable13:Play()
end
function function11()
variable14:Play()
end
function function12()
variable15:Play()
end
function function13()
variable16:Play()
end
function function14()
variable17:Play()
end
function function15()
variable18:Play()
end
function function16()
variable19:Play()
end
function function17()
variable20:Play()
end
function function18()
variable21:Play()
end
function function19()
variable23:Play()
end
function function20()
variable24:Play()
end
function function21()
variable25:Play()
end
function function22()
variable26:Play()
end
function function23()
variable27:Play()
end
function function24()
variable28:Play()
end
function function25()
variable29:Play()
end
function function26()
variable30:Play()
end
function function27()
variable31:Play()
end
function function28()
variable32:Play()
end
function function29()
variable33:Play()
end
function function30()
variable34:Play()
end
function function31()
variable35:Play()
end
function function32()
variable36:Play()
end
function function33()
variable37:Play()
end
function function34()
variable38:Play()
end
function function35()
variable39:Play()
end
function function36()
variable40:Play()
end
function function37()
variable41:Play()
end
function function38()
variable42:Play()
end
function function39()
variable43:Play()
end
function function40()
variable44:Play()
end
function function41()
variable45:Play()
end
function function42()
variable47:Play()
end
function function43()
variable48:Play()
end
function function44()
variable49:Play()
end
function function45()
wait(variable50)
end
function1()
function45()
function2()
function45()
function3()
function45()
function4()
function45()
function5()
function45()
function6()
function45()
function7()
function45()
function8()
function45()
function9()
function45()
function10()
function45()
function11()
function45()
function12()
function45()
function13()
function45()
function14()
function45()
function15()
function45()
function16()
function45()
function17()
function45()
function18()
function45()
function19()
function45()
function20()
function45()
function21()
function45()
function22()
function45()
function23()
function45()
function24()
function45()
function25()
function45()
function26()
function45()
function27()
function45()
function28()
function45()
function29()
function45()
function30()
function45()
function31()
function45()
function32()
function45()
function33()
function45()
function34()
function45()
function35()
function45()
function36()
function45()
function37()
function45()
function38()
function45()
function39()
function45()
function40()
function45()
function41()
function45()
function42()
function45()
function43()
function45()
function44()
function45()
warn("he's dead")
wait(1)
warn("why")
wait(1)
warn("why did you do that")

13 Likes

thanks for this useful tutorial!!!1
i am on my way to create a popluar gaem1!!1 :slight_smile: :slight_smile: :wink: