Advertisement
Guest User

Program_Server

a guest
Jul 23rd, 2019
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.87 KB | None | 0 0
  1. --// Variables
  2. local L_1_ = script.Parent
  3. local L_2_ = L_1_.Parent.Parent
  4. local L_3_ = L_2_.Character
  5.  
  6. --// Declarables
  7. local L_4_ = L_1_:WaitForChild('Resource')
  8. local L_5_ = L_4_:WaitForChild('FX')
  9. local L_6_ = L_4_:WaitForChild('Events')
  10. local L_7_ = L_4_:WaitForChild('HUD')
  11. local L_8_ = L_4_:WaitForChild('Modules')
  12. local L_9_ = L_4_:WaitForChild('Vars')
  13. local L_10_ = L_4_:WaitForChild('SettingsModule')
  14. local L_11_ = require(L_10_:WaitForChild('ServerConfig'))
  15. local L_12_ = L_11_.ArtyStorage
  16.  
  17. local L_13_
  18. local L_14_ = L_1_:WaitForChild('Grip')
  19.  
  20. local L_15_
  21. local L_16_
  22. local L_17_
  23.  
  24. local L_18_
  25. local L_19_
  26. local L_20_
  27. local L_21_
  28. local L_22_
  29. local L_23_
  30.  
  31. local L_24_ = {}
  32.  
  33. --// Events
  34. local L_25_ = L_6_:WaitForChild('EquipEvent')
  35. local L_26_ = L_6_:WaitForChild('FireEvent')
  36.  
  37. --// Functions
  38. function Weld(L_27_arg1, L_28_arg2, L_29_arg3)
  39. local L_30_ = Instance.new("Motor6D", L_27_arg1)
  40. L_30_.Part0 = L_27_arg1
  41. L_30_.Part1 = L_28_arg2
  42. L_30_.Name = L_27_arg1.Name
  43. L_30_.C0 = L_29_arg3 or L_27_arg1.CFrame:inverse() * L_28_arg2.CFrame
  44. return L_30_
  45. end
  46.  
  47. --// Connections
  48. L_1_.Equipped:connect(function()
  49. local L_31_ = L_3_:FindFirstChild('Torso')
  50. local L_32_ = L_3_:FindFirstChild('Head')
  51. local L_33_ = L_3_:FindFirstChild('HumanoidRootPart')
  52.  
  53. L_15_ = Instance.new("Motor6D", L_31_)
  54. L_15_.Parent = L_31_
  55. L_15_.Name = "Clone"
  56. L_15_.Part0 = L_33_
  57. L_15_.Part1 = L_32_
  58. L_15_.C0 = L_31_:WaitForChild("Neck").C0
  59. L_15_.C1 = L_31_:WaitForChild("Neck").C1
  60.  
  61. -- Make the AnimBase
  62. L_16_ = Instance.new("Part", L_3_)
  63. L_16_.FormFactor = "Custom"
  64. L_16_.CanCollide = false
  65. L_16_.Transparency = 1
  66. L_16_.Anchored = false
  67. L_16_.Name = "AnimBase"
  68.  
  69. L_17_ = Instance.new("Motor6D")
  70. L_17_.Part0 = L_16_
  71. L_17_.Part1 = L_32_
  72. L_17_.Parent = L_16_
  73. L_17_.Name = "AnimBaseW"
  74. --AnimBaseW.C1 = gunSettings.StartPose
  75.  
  76. L_13_ = Instance.new("Motor6D")
  77. L_13_.Part0 = L_3_['Right Arm']
  78. L_13_.Part1 = L_1_:FindFirstChild('Grip')
  79. L_13_.Parent = L_3_['Right Arm']
  80. L_13_.C1 = L_11_.weapPos
  81. L_13_.Name = "Grip"
  82.  
  83. for L_34_forvar1, L_35_forvar2 in pairs(L_1_:GetChildren()) do
  84. if L_35_forvar2:IsA("Part") or L_35_forvar2:IsA("MeshPart") or L_35_forvar2:IsA("UnionOperation") then
  85. L_35_forvar2.Anchored = true
  86.  
  87. if L_35_forvar2.Name ~= "Grip" then
  88. Weld(L_35_forvar2, L_1_:WaitForChild("Grip"))
  89. end;
  90. end;
  91. end
  92.  
  93. for L_36_forvar1, L_37_forvar2 in pairs(L_1_:GetChildren()) do
  94. if L_37_forvar2:IsA("Part") or L_37_forvar2:IsA("MeshPart") or L_37_forvar2:IsA("UnionOperation") then
  95. L_37_forvar2.Anchored = false
  96. end
  97. end
  98.  
  99. L_18_ = L_3_['Right Arm']
  100. L_19_ = L_3_['Left Arm']
  101. L_22_ = L_3_.Torso:WaitForChild("Right Shoulder")
  102. L_23_ = L_3_.Torso:WaitForChild("Left Shoulder")
  103.  
  104. L_20_ = Instance.new("Motor6D")
  105. L_20_.Name = "RAW"
  106. L_20_.Part0 = L_16_
  107. L_20_.Part1 = L_18_
  108. L_20_.Parent = L_16_
  109. L_20_.C1 = L_11_.RightArmPos
  110. L_3_.Torso:WaitForChild("Right Shoulder").Part1 = nil
  111.  
  112. L_21_ = Instance.new("Motor6D")
  113. L_21_.Name = "LAW"
  114. L_21_.Part0 = L_16_
  115. L_21_.Part1 = L_19_
  116. L_21_.Parent = L_16_
  117. L_21_.C1 = L_11_.LeftArmPos
  118. L_3_.Torso:WaitForChild("Left Shoulder").Part1 = nil
  119.  
  120. if holstModel then
  121. holstModel:Destroy()
  122. end
  123.  
  124. L_25_:FireClient(L_2_, true, L_13_, L_16_, L_17_, L_20_, L_21_, L_15_)
  125. end)
  126.  
  127. L_1_.Unequipped:connect(function()
  128. local L_38_ = L_3_:FindFirstChild('Torso')
  129. local L_39_ = L_3_:FindFirstChild('Head')
  130. holstModel = Instance.new('Model', L_3_)
  131. holstModel.Name = "HolsterModel"
  132.  
  133. for L_40_forvar1, L_41_forvar2 in pairs(L_1_:GetChildren()) do
  134. for L_42_forvar1, L_43_forvar2 in pairs(L_41_forvar2:GetChildren()) do
  135. if L_43_forvar2.ClassName == "Motor6D" then
  136. L_43_forvar2:Destroy()
  137. end
  138. end
  139. end
  140.  
  141. for L_44_forvar1, L_45_forvar2 in pairs(L_1_:GetChildren()) do
  142. if L_45_forvar2:IsA("Part") or L_45_forvar2:IsA("MeshPart") or L_45_forvar2:IsA("UnionOperation") then
  143. L_45_forvar2.Anchored = true
  144. end
  145. end
  146.  
  147. if L_3_.Humanoid and L_3_.Humanoid.Health > 0 then
  148. L_3_.HumanoidRootPart.RootJoint.C0 = CFrame.new(0, 0, 0, -1, 0, 0, 0, 0, 1, 0, 1, -0)
  149. L_38_['Right Hip'].C0 = CFrame.new(1, -1, 0, 0, 0, 1, 0, 1, -0, -1, 0, 0)
  150. L_38_['Left Hip'].C0 = CFrame.new(-1, -1, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  151. L_15_.C0 = CFrame.new(0, 1, 0, -1, 0, 0, 0, 0, 1, 0, 1, -0)
  152. end
  153.  
  154. L_38_:WaitForChild("Neck").Part1 = L_39_
  155. L_38_:WaitForChild("Neck").C1 = L_38_:WaitForChild("Neck").C1
  156. L_38_:WaitForChild("Neck").C0 = L_38_:WaitForChild("Neck").C0
  157.  
  158. L_16_:Destroy()
  159. L_15_:Destroy()
  160. L_22_.Part1 = L_18_
  161. L_23_.Part1 = L_19_
  162.  
  163. L_25_:FireClient(L_2_, false)
  164.  
  165. if L_11_.HolsteringEnabled then
  166. for L_47_forvar1, L_48_forvar2 in pairs(L_1_:GetChildren()) do
  167. if L_48_forvar2:IsA("Part") or L_48_forvar2:IsA("MeshPart") or L_48_forvar2:IsA("UnionOperation") then
  168. L_48_forvar2.Anchored = true
  169. local L_49_ = L_48_forvar2:clone()
  170. L_49_.Parent = holstModel
  171. end
  172. end;
  173.  
  174. for L_50_forvar1, L_51_forvar2 in pairs(holstModel:GetChildren()) do
  175. Weld(L_51_forvar2, holstModel:WaitForChild("Grip"))
  176. end
  177.  
  178. local L_46_ = Weld(holstModel:WaitForChild("Grip"), L_3_:WaitForChild('Torso'))
  179. L_46_.Name = "TWeld"
  180. L_46_.C1 = L_11_.HolsterPos
  181.  
  182. for L_52_forvar1, L_53_forvar2 in pairs(holstModel:GetChildren()) do
  183. L_53_forvar2.Anchored = false
  184. end
  185. end
  186. end)
  187.  
  188. L_3_.Humanoid.Died:connect(function()
  189. L_25_:FireClient(L_2_, false)
  190. end)
  191.  
  192. --// Event Connections
  193. L_26_.OnServerEvent:connect(function(L_54_arg1, L_55_arg2, L_56_arg3, L_57_arg4)
  194. local L_58_
  195.  
  196. L_12_:FindFirstChild('Arty').PrimaryPart.DustUp.Enabled = true
  197. L_12_:FindFirstChild('Arty').PrimaryPart.Fire:Play()
  198. delay(0.1, function()
  199. L_12_:FindFirstChild('Arty').PrimaryPart.DustUp.Enabled = false
  200. end)
  201.  
  202. wait(L_11_.SplashTime)
  203.  
  204. local L_59_ = Instance.new('Part', workspace)
  205. L_59_.Position = L_55_arg2
  206. L_59_.Anchored = true
  207. L_59_.CanCollide = false
  208. L_59_.Transparency = 1
  209.  
  210. if L_56_arg3 == '105mm' then
  211. local L_60_ = Instance.new('Sound', L_59_)
  212. L_60_.SoundId = 'rbxassetid://906024504'
  213. L_60_.Volume = 10
  214. L_60_:Play()
  215.  
  216. L_58_ = Instance.new('Explosion', workspace)
  217. L_58_.BlastPressure = L_11_.BlastPressure
  218. L_58_.BlastRadius = L_11_.BlastRadius
  219. L_58_.DestroyJointRadiusPercent = L_11_.DJRP
  220. L_58_.ExplosionType = L_11_.ExplosionType
  221. L_58_.Position = L_55_arg2
  222. game.Debris:AddItem(L_59_, 7)
  223. elseif L_56_arg3 == 'SmokeRound' then
  224. local L_61_ = Instance.new('Sound', L_59_)
  225. L_61_.SoundId = 'rbxassetid://2112952590'
  226. L_61_.Volume = 10
  227. L_61_:Play()
  228.  
  229. wait(L_61_.TimeLength)
  230.  
  231. local L_62_ = Instance.new('Sound', L_59_)
  232. L_62_.SoundId = 'rbxassetid://2112952772'
  233. L_62_.Volume = 10
  234. L_62_.Looped = true
  235. L_62_:Play()
  236.  
  237. local L_63_ = L_5_:WaitForChild('Smoke'):clone()
  238. L_63_.Parent = L_59_
  239. L_63_.Enabled = true
  240.  
  241. game.Debris:AddItem(L_59_, 60)
  242. end
  243.  
  244. game.Debris:AddItem(L_58_, 5)
  245. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement