Meliodas0_0

MadCity Inf Ammo, Fast Shooting

Jul 25th, 2019
26
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2. for _,v in next, debug.getregistry() do
  3. if typeof(v) == "function" then
  4. if debug.getupvalue(v, "Ammo") then
  5. a = debug.setupvalue
  6. a(v, "Ammo", math.huge)
  7. a(v, "Clip", math.huge)
  8. --a(v, "Recoil", 0.1)
  9. --a(v, "Spread", 0.1)
  10. a(v, "FireRate", 0)
  11. print("done")
  12.  
  13. end
  14. end
  15. end
  16. local Player = game.Players.LocalPlayer
  17. local UserInputService = game:service'UserInputService'
  18. repeat
  19. wait()
  20. until Player.Character ~= nil
  21. repeat
  22. wait()
  23. until Player:findFirstChild("PlayerGui") ~= nil
  24. local Humanoid = Player.Character.Humanoid
  25. local RecoilAmount = Player.PlayerScripts:WaitForChild("Client"):WaitForChild("Recoil")
  26. local WeaponHUD = Player.PlayerGui:WaitForChild("MainGUI"):WaitForChild("StatsHUD"):WaitForChild("WeaponHUD")
  27. local Crosshair = Player.PlayerGui:WaitForChild("CrosshairGUI"):WaitForChild("Center")
  28. local Modules = game.ReplicatedStorage:WaitForChild("Modules")
  29. local WC = require(Modules:WaitForChild("WeaponCore"))
  30. local MouseDown = false
  31. local Ammo = math.huge
  32. local Clip = math.huge
  33. local Char = Player.Character
  34. local Anims = {}
  35.  
  36. UserInputService.InputBegan:Connect(function(inputObject)
  37. if inputObject.UserInputType == Enum.UserInputType.MouseButton1 then
  38. MouseDown = true
  39. end
  40. end)
  41. UserInputService.InputEnded:Connect(function(inputObject)
  42. if inputObject.UserInputType == Enum.UserInputType.MouseButton1 then
  43. MouseDown = false
  44. end
  45. end)
  46.  
  47. function PlayAnimation(id, t)
  48. local animation = Instance.new("Animation", Humanoid)
  49. animation.AnimationId = "http://www.roblox.com/Asset?ID=" .. id
  50. local animTrack = Humanoid:LoadAnimation(animation)
  51. animTrack:Play()
  52. table.insert(Anims, animTrack)
  53. local finished = false
  54. animTrack.Stopped:connect(function()
  55. finished = true
  56. end)
  57. repeat
  58. wait()
  59. until finished
  60. animTrack = nil
  61. animation:Destroy()
  62. end
  63. function GetMousePoint(X, Y)
  64. local ignore = {
  65. workspace.Ignore,
  66. Char,
  67. workspace.Water
  68. }
  69. local Mag = workspace.Camera:ScreenPointToRay(X, Y)
  70. local NewRay = Ray.new(Mag.Origin, Mag.Direction * 2000)
  71. local Target, Position = workspace:FindPartOnRayWithIgnoreList(NewRay, ignore, false, true)
  72. return Position
  73. end
  74. spawn(function()
  75. while wait() do
  76. tool = game.Players.LocalPlayer.Character:FindFirstChildWhichIsA("BackpackItem")
  77. if MouseDown and tool and Player.Character.Humanoid.Health > 0 then
  78. if tool:FindFirstChild("RifleScript") or tool:FindFirstChild("PistolScript") then
  79. RecoilAmount.Value = Vector3.new(0,0,0)
  80. WeaponHUD.Ammo.Ammo1.Text = Ammo
  81. WeaponHUD.Ammo.Ammo2.Text = Clip
  82. WC.PlaySound(Char, 1772743949, Torso)
  83. WC.ShootGun(Char, Char, GetMousePoint(Crosshair.AbsolutePosition.X, Crosshair.AbsolutePosition.Y), tool.Name, 100, 0)
  84. spawn(function()
  85. PlayAnimation(1241010205, true)
  86. end)
  87. elseif tool:FindFirstChild("ShotgunScript") then
  88. RecoilAmount.Value = Vector3.new(0,0,0)
  89. WeaponHUD.Ammo.Ammo1.Text = Ammo
  90. WeaponHUD.Ammo.Ammo2.Text = Clip
  91. WC.PlaySound(Char, 255061221, Torso)
  92. WC.ShootShotgun(Char, Char, GetMousePoint(Crosshair.AbsolutePosition.X, Crosshair.AbsolutePosition.Y), tool.Name, 100, 0, 20)
  93. end
  94. end
  95. end
  96. end)
RAW Paste Data