Garry's Mod

Garry's Mod

Not enough ratings
How to get achievements in 3 minutes: Popper, War Zone, Bad Friend, Innocent Bystander, Procreator, etc
By Darth Vader
Obtaining achievements by using a Lua script.
   
Award
Favorite
Favorited
Unfavorite
0. About
For those who don't want to click endlessly to unlock achievements.
1. Adding a script to the mod.
Find the autorun folder; for me, it’s located at E:\Steam\steamapps\common\GarrysMod\garrysmod\lua\autorun. Create a file there with any name and a .lua extension. I named my file "test.lua".

2. Copy the script.
Now, let's add the content to the file using any text editor:

if SERVER then util.AddNetworkString("CreateCopies") util.AddNetworkString("ExplodeCopies") util.AddNetworkString("DestroyCopies") util.AddNetworkString("ToggleScript") util.AddNetworkString("SpamQ") util.AddNetworkString("CreateFakeError") local copiedEntities = {} local isScriptActive = false net.Receive("ToggleScript", function(len, ply) isScriptActive = not isScriptActive if isScriptActive then ply:ChatPrint("Script activated.") else ply:ChatPrint("Script deactivated.") end end) net.Receive("CreateCopies", function(len, ply) if not isScriptActive then return end local trace = ply:GetEyeTrace() local original = trace.Entity if not IsValid(original) then ply:ChatPrint("You must point at a valid object!") return end for i = 1, 10 do local offset = Vector(math.random(-50, 50), math.random(-50, 50), 0) local copy = ents.Create(original:GetClass()) if IsValid(copy) then copy:SetModel(original:GetModel()) copy:SetPos(original:GetPos() + offset) copy:SetAngles(original:GetAngles()) copy:Spawn() local phys = copy:GetPhysicsObject() if IsValid(phys) then phys:Wake() end table.insert(copiedEntities, copy) end end end) net.Receive("ExplodeCopies", function(len, ply) if not isScriptActive then return end for _, ent in ipairs(copiedEntities) do if IsValid(ent) then local explosion = ents.Create("env_explosion") explosion:SetPos(ent:GetPos()) explosion:SetOwner(ply) explosion:Spawn() explosion:SetKeyValue("iMagnitude", "100") -- Set the explosion magnitude explosion:Fire("Explode", 0, 0) ent:Remove() end end copiedEntities = {} end) net.Receive("DestroyCopies", function(len, ply) if not isScriptActive then return end for _, ent in ipairs(copiedEntities) do if IsValid(ent) then ent:Remove() end end copiedEntities = {} end) net.Receive("SpamQ", function(len, ply) if not isScriptActive then return end -- Spam Q 10 times per second timer.Create("SpamQTimer", 0.1, 0, function() if not IsValid(ply) then timer.Remove("SpamQTimer") return end ply:ConCommand("+menu") timer.Simple(0.05, function() ply:ConCommand("-menu") end) end) end) net.Receive("CreateFakeError", function(len, ply) if not isScriptActive then return end -- Create fake errors 500 times for i = 1, 500 do timer.Simple(i * 0.01, function() pcall(function() local fakeEnt = ents.Create("nonexistent_entity") -- Nonexistent entity class fakeEnt:Spawn() end) end) end end) end if CLIENT then local isSpammingQ = false hook.Add("Think", "CheckForActions", function() -- Toggle script on/off with Alt + P if input.IsKeyDown(KEY_LALT) and input.IsKeyDown(KEY_P) then net.Start("ToggleScript") net.SendToServer() -- Delay to avoid multiple triggers timer.Simple(0.5, function() if input.IsKeyDown(KEY_LALT) and input.IsKeyDown(KEY_P) then return end end) end -- Start spamming Q with Alt + Q if input.IsKeyDown(KEY_LALT) and input.IsKeyDown(KEY_Q) and not isSpammingQ then isSpammingQ = true net.Start("SpamQ") net.SendToServer() -- Delay to avoid multiple triggers timer.Simple(0.5, function() if input.IsKeyDown(KEY_LALT) and input.IsKeyDown(KEY_Q) then return end end) end -- Stop spamming Q when Alt + Q is pressed again if input.IsKeyDown(KEY_LALT) and input.IsKeyDown(KEY_Q) and isSpammingQ then isSpammingQ = false timer.Remove("SpamQTimer") -- Delay to avoid multiple triggers timer.Simple(0.5, function() if input.IsKeyDown(KEY_LALT) and input.IsKeyDown(KEY_Q) then return end end) end -- Create fake errors with Alt + Y if input.IsKeyDown(KEY_LALT) and input.IsKeyDown(KEY_Y) then net.Start("CreateFakeError") net.SendToServer() -- Delay to avoid multiple triggers timer.Simple(0.5, function() if input.IsKeyDown(KEY_LALT) and input.IsKeyDown(KEY_Y) then return end end) end -- Create object copies when LMB is pressed if input.IsMouseDown(MOUSE_LEFT) then net.Start("CreateCopies") net.SendToServer() -- Delay to avoid multiple triggers timer.Simple(0.5, function() if input.IsMouseDown(MOUSE_LEFT) then return end end) end -- Explode copies with Alt + K if input.IsKeyDown(KEY_LALT) and input.IsKeyDown(KEY_K) then net.Start("ExplodeCopies") net.SendToServer() -- Delay to avoid multiple triggers timer.Simple(0.5, function() if input.IsKeyDown(KEY_LALT) and input.IsKeyDown(KEY_K) then return end end) end -- Destroy copies with Alt + L if input.IsKeyDown(KEY_LALT) and input.IsKeyDown(KEY_L) then net.Start("DestroyCopies") net.SendToServer() -- Delay to avoid multiple triggers timer.Simple(0.5, function() if input.IsKeyDown(KEY_LALT) and input.IsKeyDown(KEY_L) then return end end) end end) end
3. Launch the game.
Join a local game and start creating objects. Just be extremely careful, or the game might crash!
  • Activate/Deactivate the script: Press Alt + P.
  • Create copies: Left-click (LMB) while pointing at an object.
  • Explode copies: Alt + K.
  • Delete copies: Alt + L.
4. Profit
Now you can create hundreds of balloons in seconds and explode them. The same goes for NPCs and other objects. Have a great day!

P.S. If you have any questions, encounter errors, or don't understand something, feel free to reach out, and I'll fix it or explain everything to you.
2 Comments
WolfETPlayer 28 Aug @ 11:39am 
based
mazy 28 Aug @ 11:10am 
Thanks for the script