0% found this document useful (0 votes)
1K views2 pages

Project Lazarus Inf AmmoInstaKill Script

This document contains a Lua script for a game that manages weapon properties based on player actions. It sets up event listeners for when a player's character is added and when weapons are added to their backpack, updating their ammo and damage values accordingly. The script also utilizes a metatable to dynamically access game services and manage connections for weapon updates.

Uploaded by

kutaskoz1111
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
1K views2 pages

Project Lazarus Inf AmmoInstaKill Script

This document contains a Lua script for a game that manages weapon properties based on player actions. It sets up event listeners for when a player's character is added and when weapons are added to their backpack, updating their ammo and damage values accordingly. The script also utilizes a metatable to dynamically access game services and manage connections for weapon updates.

Uploaded by

kutaskoz1111
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 2

hookfunction(gcinfo, function()

return math.random(200,350)
end)

-- // Constants \\ --
-- [ Services ] --
local Services = setmetatable({}, {__index = function(Self, Index)
local NewService = game:GetService(Index)
if NewService then
Self[Index] = NewService
end
return NewService
end})

-- [ LocalPlayer ] --
local LocalPlayer = Services.Players.LocalPlayer

-- // Variables \\ --
local Connections = {
Weapon1 = nil;
Weapon2 = nil;
Weapon3 = nil;
Backpack = nil;
}

local RoundNumber = workspace.RoundNum

-- // Event Listeners \\ --
local function CharacterAdded(Character)
local Backpack = LocalPlayer:WaitForChild('Backpack')

local function ChildAdded(Child)


if Child.Name == "Weapon1" or Child.Name == "Weapon2" or Child.Name ==
"Weapon3" then
local Module = require(Child)

if Connections[Child.Name] then
Connections[Child.Name]:Disconnect()
Connections[Child.Name] = nil
end

Connections[Child.Name] =
Services.RunService.RenderStepped:Connect(function()
Module.Ammo = Module.MaxAmmo
Module.StoredAmmo = Module.MaxAmmo
Module.HeadShot = 250 + (RoundNumber.Value * 10)
Module.TorsoShot = 250 + (RoundNumber.Value * 10)
Module.LimbShot = 250 + (RoundNumber.Value * 10)
Module.BulletPenetration = 1000
end)
end
end

if Connections.Backpack then
Connections.Backpack:Disconnect()
Connections.Backpack = nil
end

for i,v in ipairs(Backpack:GetChildren()) do


ChildAdded(v)
end
Connections.Backpack = Backpack.ChildAdded:Connect(ChildAdded)
end

LocalPlayer.CharacterAdded:Connect(CharacterAdded)
CharacterAdded(LocalPlayer.Character)

You might also like