Advertisement
ExodiaForce

BulletHit

Nov 17th, 2024
15
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.00 KB | None | 0 0
  1. -- Decompiled with Konstant V2.1, a fast Luau decompiler made in Luau by plusgiant5 (https://discord.gg/wyButjTMhM)
  2. -- Decompiled on 2024-11-17 00:27:39
  3. -- Luau version 6, Types version 3
  4. -- Time taken: 0.007033 seconds
  5.  
  6. local module = {}
  7. local _ = {"rbxassetid://9274070376", "rbxassetid://9274070596", "rbxassetid://9274071155", "rbxassetid://9274071502", "rbxassetid://9203167631"}
  8. local _ = {
  9. DiamondPlate = "Metal";
  10. CorrodedMetal = "Metal";
  11. WoodPlanks = "Wood";
  12. }
  13. local tbl_upvr = {
  14. Helmet = {7375382580};
  15. Concrete = {6962155378, 6962154691, 6962154691, 6962155018, 6962154328};
  16. Metal = {142082170, 7360897532, 7360897214, 7360897366};
  17. Wood = {7361061550, 7361061385, 7361061679, 7361061795};
  18. Flesh = {6978732312, 6978732312, 6978732129, 6978731806, 6978731977};
  19. Screen = {6737582452};
  20. Glass = {142082167};
  21. }
  22. local CurrentCamera_upvr = workspace.CurrentCamera
  23. local Particles_upvr = script:WaitForChild("Particles")
  24. local Debris_upvr = game:GetService("Debris")
  25. local GeneralSoundGroup_upvr = game:GetService("SoundService"):WaitForChild("GeneralSoundGroup")
  26. local ExtraParticles_upvr = script:WaitForChild("ExtraParticles")
  27. local ReplicatedStorage_upvr = game:GetService("ReplicatedStorage")
  28. function module.HitEffect(arg1, arg2, arg3, arg4, arg5, arg6) -- Line 39
  29. --[[ Upvalues[7]:
  30. [1]: CurrentCamera_upvr (readonly)
  31. [2]: Particles_upvr (readonly)
  32. [3]: Debris_upvr (readonly)
  33. [4]: tbl_upvr (readonly)
  34. [5]: GeneralSoundGroup_upvr (readonly)
  35. [6]: ExtraParticles_upvr (readonly)
  36. [7]: ReplicatedStorage_upvr (readonly)
  37. ]]
  38. -- KONSTANTWARNING: Variable analysis failed. Output will have some incorrect variable assignments
  39. if not arg1 or not arg1.Parent then
  40. else
  41. if _G.Settings and _G.Settings.Video.Bullet_impact_FX <= 0 then return end
  42. if 100 < (arg2 - CurrentCamera_upvr.CFrame.Position).Magnitude then return end
  43. local cframe = CFrame.new(arg2, arg2 + arg3)
  44. local var35 = arg5.Magnitude * 0.0005 / 2
  45. if arg1.Name == "Glass" then
  46. end
  47. if arg1.Parent:FindFirstChild("Humanoid") then
  48. end
  49. local var36
  50. if arg1.Name == "Head" and arg1:GetAttribute("Protected") then
  51. var36 = "Helmet"
  52. end
  53. local SOME = Particles_upvr:FindFirstChild(var36)
  54. if not SOME then
  55. SOME = Particles_upvr.Concrete
  56. end
  57. local clone = SOME:Clone()
  58. clone.Parent = workspace.Terrain
  59. clone.WorldCFrame = cframe
  60. Debris_upvr:AddItem(clone, 10)
  61. local var39 = tbl_upvr[var36]
  62. if not var39 then
  63. var39 = tbl_upvr.Concrete
  64. end
  65. if var39 then
  66. local Sound = Instance.new("Sound")
  67. Sound.SoundId = "rbxassetid://"..var39[math.random(#var39)]
  68. Sound.SoundGroup = GeneralSoundGroup_upvr
  69. Sound.Volume = 0.3
  70. Sound.RollOffMode = "InverseTapered"
  71. Sound.RollOffMinDistance = 10
  72. Sound.RollOffMaxDistance = 100
  73. Sound.Parent = clone
  74. end
  75. local SOME_2 = ExtraParticles_upvr:FindFirstChild(arg6 or "")
  76. if SOME_2 then
  77. for _, v in pairs(SOME_2:GetChildren()) do
  78. v:Clone().Parent = clone
  79. local var45
  80. end
  81. end
  82. for _, v_2_upvr in pairs(var45:GetChildren()) do
  83. local var49
  84. if v_2_upvr:IsA("ParticleEmitter") then
  85. if v_2_upvr.Name == "MaterialColor" then
  86. v_2_upvr.Color = ColorSequence.new(arg1.Color)
  87. end
  88. var49 = v_2_upvr:GetAttribute("EmitCount")
  89. local function INLINED() -- Internal function, doesn't exist in bytecode
  90. var49 = _G.Settings.Video.Bullet_impact_FX
  91. return var49
  92. end
  93. if not _G.Settings or not INLINED() then
  94. var49 = 1
  95. end
  96. v_2_upvr:Emit((var49 or 5) * var49)
  97. elseif v_2_upvr:IsA("PointLight") then
  98. v_2_upvr.Enabled = true
  99. task.delay(0.05, function() -- Line 95
  100. --[[ Upvalues[1]:
  101. [1]: v_2_upvr (readonly)
  102. ]]
  103. v_2_upvr.Enabled = false
  104. end)
  105. elseif v_2_upvr:IsA("Sound") then
  106. var49 = v_2_upvr.PlaybackSpeed
  107. var49 = v_2_upvr.PlaybackSpeed + 0.1
  108. v_2_upvr.PlaybackSpeed = math.random((var49 - 0.1) * 100, var49 * 100) / 100
  109. v_2_upvr:Play()
  110. end
  111. end
  112. local var51
  113. local function INLINED_2() -- Internal function, doesn't exist in bytecode
  114. var51 = _G.Settings.Video
  115. return var51.Bullet_holes
  116. end
  117. if not _G.Settings or INLINED_2() or arg1.Anchored and not arg1:IsDescendantOf(workspace.Chars) and not arg1:GetAttribute("Breakable") then
  118. var51 = script
  119. local clone_2 = var51.BulletHole:Clone()
  120. local function INLINED_3() -- Internal function, doesn't exist in bytecode
  121. var51 = Vector3.new(var35, var35, 0.005)
  122. return var51
  123. end
  124. if not var35 or not INLINED_3() then
  125. var51 = clone_2.Size
  126. end
  127. clone_2.Size = var51
  128. var51 = cframe * CFrame.Angles(0, 0, math.random(360) / 180)
  129. clone_2.CFrame = var51
  130. clone_2.Material = arg4
  131. var51 = true
  132. clone_2.Anchored = var51
  133. var51 = workspace.Debris.Guns
  134. clone_2.Parent = var51
  135. var51 = Debris_upvr:AddItem
  136. var51(clone_2, 5)
  137. end
  138. if var36 == "Flesh" then
  139. var51 = ReplicatedStorage_upvr
  140. var51.Blood:Fire(cframe * CFrame.Angles(math.pi, 0, 0), nil, 1, 1.25)
  141. end
  142. end
  143. end
  144. return module
  145.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement