DragonSploitsYT

Arsenal OP Script

Mar 5th, 2020
137
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.54 KB | None | 0 0
  1. local Vnew = Vector3.new
  2. local Cnew = CFrame.new
  3. local CAngles = CFrame.Angles
  4. local Inaccuracy = 0
  5. local mmin = math.min
  6. local mrandom = math.random
  7. local mmax = math.max
  8. local Bnew = BrickColor.new
  9. local tinsert = table.insert
  10. local mrandom = mrandom
  11. local mmax = mmax
  12. local mrad = math.rad
  13. local mfloor = math.floor
  14. local Bnew = Bnew
  15.  
  16. function randomspread(fadg)
  17. if mrandom(1, 2) == 1 then
  18. return mrandom(-fadg, -fadg / 3)
  19. else
  20. return mrandom(fadg / 3, fadg)
  21. end
  22. end
  23.  
  24. local function shoot()
  25. local Camera = game.Workspace.CurrentCamera
  26. local Char = game.Workspace:FindFirstChild(game.Players.LocalPlayer.Name)
  27. if Char ~= nil then
  28. local Tool = game.Players.LocalPlayer.Character:FindFirstChildOfClass("Tool")
  29. if Tool ~= nil then
  30. local ToolName = Tool.Name
  31. local gunenv = getsenv(game.Players.LocalPlayer.Character[ToolName].Gun)
  32. local gupvs = debug.getupvalues(gunenv.Fire)
  33. local Settings = gupvs.Settings
  34. local gupvsz = debug.getupvalues(gunenv.firethebox)
  35. gupvsz.Firing = true
  36. local MyPlayer = game.Players.LocalPlayer
  37. local endpos = Camera.CFrame.p + Camera.CFrame.lookVector * 999
  38. local startpos = game.Players.LocalPlayer.Character.Head.Position
  39. local Spread = CAngles(mrad(randomspread(0) / 20), mrad(randomspread(0) / 20), mrad(randomspread(0) / 20))
  40. local RayCasted = Ray.new(startpos, (Cnew(startpos, endpos) * Spread).lookVector.unit * Settings.Range)
  41. local Ray_Ignore = gupvsz.Ray_Ignore
  42. local Hit, Pos, normal = workspace:FindPartOnRayWithIgnoreList(RayCasted, Ray_Ignore, false, true)
  43. local flek = Camera.Arms.Flash.Position
  44. local FakeRayCasted = Ray.new(Camera.Arms.Flash.Position, (CFrame.new(Camera.Arms.Flash.Position, endpos) * Spread).lookVector.unit * 5)
  45. local Hit12, Pos12 = game.Workspace:FindPartOnRayWithIgnoreList(FakeRayCasted, Ray_Ignore, false, true)
  46. Tool.Gun.sv_gun.Fire:FireServer(normal, Hit, Pos, Spread, MyPlayer, startpos, endpos, 10000, 10000, 0.01, Settings.MSX, 10000, 10000, 10000, 0.01, 10000, 10000, false, Tool.Handle, ToolName, false, false, Pos12, flek)
  47. end
  48. end
  49. end
  50.  
  51. local eDown = false
  52. local input = game:GetService("UserInputService")
  53. local player = game.Players.LocalPlayer
  54.  
  55. input.InputBegan:connect(function(k)
  56. local key = k.KeyCode
  57. if key == Enum.KeyCode.E then
  58. eDown = true
  59. end
  60. end)
  61.  
  62. input.InputEnded:connect(function(k)
  63. local key = k.KeyCode
  64. if key == Enum.KeyCode.E then
  65. eDown = false
  66. end
  67. end)
  68. print("Loaded!")
  69. while wait() do
  70. if eDown then
  71. local shot, failed = pcall(shoot)
  72. if not shot then
  73. print("Error: "..failed)
  74. end
  75. end
  76. end
Add Comment
Please, Sign In to add comment