AllanXGaming

Project Lazarus Inf Ammo/InstaKill Script

Jun 22nd, 2021
2,371
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.84 KB | None | 0 0
  1. hookfunction(gcinfo, function()
  2. return math.random(200,350)
  3. end)
  4.  
  5. -- // Constants \\ --
  6. -- [ Services ] --
  7. local Services = setmetatable({}, {__index = function(Self, Index)
  8. local NewService = game:GetService(Index)
  9. if NewService then
  10. Self[Index] = NewService
  11. end
  12. return NewService
  13. end})
  14.  
  15. -- [ LocalPlayer ] --
  16. local LocalPlayer = Services.Players.LocalPlayer
  17.  
  18. -- // Variables \\ --
  19. local Connections = {
  20. Weapon1 = nil;
  21. Weapon2 = nil;
  22. Weapon3 = nil;
  23. Backpack = nil;
  24. }
  25.  
  26. local RoundNumber = workspace.RoundNum
  27.  
  28. -- // Event Listeners \\ --
  29. local function CharacterAdded(Character)
  30. local Backpack = LocalPlayer:WaitForChild('Backpack')
  31.  
  32. local function ChildAdded(Child)
  33. if Child.Name == "Weapon1" or Child.Name == "Weapon2" or Child.Name == "Weapon3" then
  34. local Module = require(Child)
  35.  
  36. if Connections[Child.Name] then
  37. Connections[Child.Name]:Disconnect()
  38. Connections[Child.Name] = nil
  39. end
  40.  
  41. Connections[Child.Name] = Services.RunService.RenderStepped:Connect(function()
  42. Module.Ammo = Module.MaxAmmo
  43. Module.StoredAmmo = Module.MaxAmmo
  44. Module.HeadShot = 250 + (RoundNumber.Value * 10)
  45. Module.TorsoShot = 250 + (RoundNumber.Value * 10)
  46. Module.LimbShot = 250 + (RoundNumber.Value * 10)
  47. Module.BulletPenetration = 1000
  48. end)
  49. end
  50. end
  51.  
  52. if Connections.Backpack then
  53. Connections.Backpack:Disconnect()
  54. Connections.Backpack = nil
  55. end
  56.  
  57. for i,v in ipairs(Backpack:GetChildren()) do
  58. ChildAdded(v)
  59. end
  60. Connections.Backpack = Backpack.ChildAdded:Connect(ChildAdded)
  61. end
  62.  
  63. LocalPlayer.CharacterAdded:Connect(CharacterAdded)
  64. CharacterAdded(LocalPlayer.Character)
Advertisement
Add Comment
Please, Sign In to add comment