Categories > Coding > Lua >

Legends Of Speed script

Posts: 205

Threads: 18

Joined: Sep, 2022

Reputation: 17

Posted

My first ever script give brutal feedback

Game: https://www.roblox.com/games/3101667897/Legends-Of-Speed

 

https://pastebin.com/bRYVUN4T

 

its open source if you want look at the code

  • 0

Posts: 1430

Threads: 71

Joined: May, 2022

Reputation: 20

Replied

1. try to convert the mess that remote spy made

local args = {
    [1] = "collectOrb",
    [2] = "Red Orb",
    [3] = "City"
}

game:GetService("ReplicatedStorage").rEvents.orbEvent:FireServer(unpack(args))

is the same thing as:

game:GetService("ReplicatedStorage").rEvents.orbEvent:FireServer("collectOrb", "Red Orb", "City")

which is much much shorter so please make sure to take the arguments in order and put them in the "unpack(args)" zone as it looks much cleaner

 

2. try to use task.wait() instead of wait()

 

3. dont use giant cframes, all it does is add a bit of exact rotation/position but when you tp we really dont need that:

game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame = CFrame.new(-564.712646, 3.20321131, 396.023041, -0.999465585, 0.0320054069, 0.00662442576, 0.0301679447, 0.981364131, -0.189774275, -0.0125747789, -0.189473093, -0.981805384)

you can just use a small, rounded up number:

game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame = CFrame.new(564, 3, 396)

4. make a variable for the local player and character so that you dont have to type most of that ^ code in when you just want to tp, instead it

would be as simple as: hrp.CFrame

other example of this ^ being useful:

game.Players.LocalPlayer.Character.Humanoid.WalkSpeed = v

 

5. make sure to always have good formatting when making scripts open source because we are wayy too lazy to format it

  • 0

i use arch btw

Posts: 662

Threads: 65

Joined: Oct, 2022

Reputation: 30

Replied

nice

 

keep the good work up and believe in your self :)

  • 0

Try the cheat launcher verve today ⬇

https://i.imgur.com/QdS8sQ5.png

Join Neuron Discord Server - https://discord.gg/harAKHv32K

Users viewing this thread:

( Members: 0, Guests: 1, Total: 1 )