Dark_EccentricYT

Untitled

Mar 25th, 2018
171
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 170.11 KB | None | 0 0
  1.  
  2. -- Made by 1ndrew Galil V3
  3. --Controls
  4. --T for Stand by
  5. --R for Reload
  6. --Right Click to Aim
  7. --Q for Inspect
  8. --C to Crouch
  9. --X to get back up
  10. --Left Shift to Sprint
  11. function sandbox(var,func)
  12. local env = getfenv(func)
  13. local newenv = setmetatable({},{
  14. __index = function(self,k)
  15. if k=="script" then
  16. return var
  17. else
  18. return env[k]
  19. end
  20. end,
  21. })
  22. setfenv(func,newenv)
  23. return func
  24. end
  25. cors = {}
  26. mas = Instance.new("Model",game:GetService("Lighting"))
  27. Tool0 = Instance.new("Tool")
  28. Part1 = Instance.new("Part")
  29. SpecialMesh2 = Instance.new("SpecialMesh")
  30. Part3 = Instance.new("Part")
  31. Part4 = Instance.new("Part")
  32. SpecialMesh5 = Instance.new("SpecialMesh")
  33. Part6 = Instance.new("Part")
  34. SpecialMesh7 = Instance.new("SpecialMesh")
  35. Part8 = Instance.new("Part")
  36. SpecialMesh9 = Instance.new("SpecialMesh")
  37. Part10 = Instance.new("Part")
  38. SpecialMesh11 = Instance.new("SpecialMesh")
  39. Part12 = Instance.new("Part")
  40. SpecialMesh13 = Instance.new("SpecialMesh")
  41. Part14 = Instance.new("Part")
  42. SpecialMesh15 = Instance.new("SpecialMesh")
  43. Part16 = Instance.new("Part")
  44. SpecialMesh17 = Instance.new("SpecialMesh")
  45. Part18 = Instance.new("Part")
  46. SpecialMesh19 = Instance.new("SpecialMesh")
  47. Sound20 = Instance.new("Sound")
  48. Sound21 = Instance.new("Sound")
  49. Part22 = Instance.new("Part")
  50. SpecialMesh23 = Instance.new("SpecialMesh")
  51. Part24 = Instance.new("Part")
  52. Sound25 = Instance.new("Sound")
  53. Sound26 = Instance.new("Sound")
  54. Sound27 = Instance.new("Sound")
  55. ParticleEmitter28 = Instance.new("ParticleEmitter")
  56. SpotLight29 = Instance.new("SpotLight")
  57. BlockMesh30 = Instance.new("BlockMesh")
  58. ParticleEmitter31 = Instance.new("ParticleEmitter")
  59. Part32 = Instance.new("Part")
  60. Sound33 = Instance.new("Sound")
  61. Sound34 = Instance.new("Sound")
  62. Sound35 = Instance.new("Sound")
  63. Sound36 = Instance.new("Sound")
  64. Part37 = Instance.new("Part")
  65. CylinderMesh38 = Instance.new("CylinderMesh")
  66. Part39 = Instance.new("Part")
  67. LocalScript40 = Instance.new("LocalScript")
  68. NumberValue41 = Instance.new("NumberValue")
  69. StringValue42 = Instance.new("StringValue")
  70. NumberValue43 = Instance.new("NumberValue")
  71. NumberValue44 = Instance.new("NumberValue")
  72. NumberValue45 = Instance.new("NumberValue")
  73. ScreenGui46 = Instance.new("ScreenGui")
  74. Frame47 = Instance.new("Frame")
  75. Frame48 = Instance.new("Frame")
  76. TextLabel49 = Instance.new("TextLabel")
  77. Frame50 = Instance.new("Frame")
  78. TextLabel51 = Instance.new("TextLabel")
  79. TextLabel52 = Instance.new("TextLabel")
  80. TextLabel53 = Instance.new("TextLabel")
  81. Frame54 = Instance.new("Frame")
  82. ImageLabel55 = Instance.new("ImageLabel")
  83. ImageLabel56 = Instance.new("ImageLabel")
  84. ImageLabel57 = Instance.new("ImageLabel")
  85. ImageLabel58 = Instance.new("ImageLabel")
  86. Frame59 = Instance.new("Frame")
  87. TextLabel60 = Instance.new("TextLabel")
  88. ImageLabel61 = Instance.new("ImageLabel")
  89. Frame62 = Instance.new("Frame")
  90. TextLabel63 = Instance.new("TextLabel")
  91. Part64 = Instance.new("Part")
  92. CylinderMesh65 = Instance.new("CylinderMesh")
  93. Part66 = Instance.new("Part")
  94. SpecialMesh67 = Instance.new("SpecialMesh")
  95. Model68 = Instance.new("Model")
  96. Part69 = Instance.new("Part")
  97. SpecialMesh70 = Instance.new("SpecialMesh")
  98. Part71 = Instance.new("Part")
  99. Part72 = Instance.new("Part")
  100. Sound73 = Instance.new("Sound")
  101. Sound74 = Instance.new("Sound")
  102. Sound75 = Instance.new("Sound")
  103. Sound76 = Instance.new("Sound")
  104. Sound77 = Instance.new("Sound")
  105. Sound78 = Instance.new("Sound")
  106. Sound79 = Instance.new("Sound")
  107. Sound80 = Instance.new("Sound")
  108. Sound81 = Instance.new("Sound")
  109. Sound82 = Instance.new("Sound")
  110. Sound83 = Instance.new("Sound")
  111. Sound84 = Instance.new("Sound")
  112. Sound85 = Instance.new("Sound")
  113. SpecialMesh86 = Instance.new("SpecialMesh")
  114. Part87 = Instance.new("Part")
  115. SpecialMesh88 = Instance.new("SpecialMesh")
  116. Script89 = Instance.new("Script")
  117. Script90 = Instance.new("Script")
  118. Script91 = Instance.new("Script")
  119. Script92 = Instance.new("Script")
  120. Script93 = Instance.new("Script")
  121. NumberValue94 = Instance.new("NumberValue")
  122. NumberValue95 = Instance.new("NumberValue")
  123. StringValue96 = Instance.new("StringValue")
  124. NumberValue97 = Instance.new("NumberValue")
  125. StringValue98 = Instance.new("StringValue")
  126. NumberValue99 = Instance.new("NumberValue")
  127. NumberValue100 = Instance.new("NumberValue")
  128. NumberValue101 = Instance.new("NumberValue")
  129. StringValue102 = Instance.new("StringValue")
  130. Script103 = Instance.new("Script")
  131. LocalScript104 = Instance.new("LocalScript")
  132. LocalScript105 = Instance.new("LocalScript")
  133. LocalScript106 = Instance.new("LocalScript")
  134. Tool0.Name = "Galil"
  135. Tool0.Parent = mas
  136. Tool0.ToolTip = "Made in Germany"
  137. Part1.Name = "Stock"
  138. Part1.Parent = Tool0
  139. Part1.Material = Enum.Material.Concrete
  140. Part1.Rotation = Vector3.new(90, 0, 0)
  141. Part1.Anchored = true
  142. Part1.CanCollide = false
  143. Part1.Size = Vector3.new(1.37353814, 0.225373551, 0.677169979)
  144. Part1.CFrame = CFrame.new(38.0703812, 0.827715993, -67.2808838, 1, 0, 0, 0, 0, -1, 0, 1, 0)
  145. Part1.Position = Vector3.new(38.0703812, 0.827715993, -67.2808838)
  146. Part1.Orientation = Vector3.new(90, 0, 0)
  147. SpecialMesh2.Parent = Part1
  148. SpecialMesh2.MeshId = "rbxassetid://777168070"
  149. SpecialMesh2.Scale = Vector3.new(0.00456133951, 0.00456133857, 0.00456129387)
  150. SpecialMesh2.TextureId = "rbxassetid://777335465"
  151. SpecialMesh2.MeshType = Enum.MeshType.FileMesh
  152. SpecialMesh2.Scale = Vector3.new(0.00456133951, 0.00456133857, 0.00456129387)
  153. Part3.Name = "SightMark"
  154. Part3.Parent = Tool0
  155. Part3.Material = Enum.Material.SmoothPlastic
  156. Part3.BrickColor = BrickColor.new("New Yeller")
  157. Part3.Transparency = 1
  158. Part3.Rotation = Vector3.new(0, 90, 0)
  159. Part3.Anchored = true
  160. Part3.CanCollide = false
  161. Part3.FormFactor = Enum.FormFactor.Custom
  162. Part3.Size = Vector3.new(0.200000003, 0.200000003, 0.200000003)
  163. Part3.CFrame = CFrame.new(34.9918442, 1.39999795, -67.282486, 0, 0, 1, 0, 1, -0, -1, 0, 0)
  164. Part3.BottomSurface = Enum.SurfaceType.Smooth
  165. Part3.TopSurface = Enum.SurfaceType.Smooth
  166. Part3.Color = Color3.new(1, 1, 0)
  167. Part3.Position = Vector3.new(34.9918442, 1.39999795, -67.282486)
  168. Part3.Orientation = Vector3.new(0, 90, 0)
  169. Part3.Color = Color3.new(1, 1, 0)
  170. Part4.Name = "Mag"
  171. Part4.Parent = Tool0
  172. Part4.Material = Enum.Material.Concrete
  173. Part4.Rotation = Vector3.new(90, 0, 0)
  174. Part4.Anchored = true
  175. Part4.CanCollide = false
  176. Part4.Size = Vector3.new(0.611639202, 0.225373551, 1.02088165)
  177. Part4.CFrame = CFrame.new(36.3986664, 0.510468006, -67.2739868, 1, 0, 0, 0, 0, -1, 0, 1, 0)
  178. Part4.Position = Vector3.new(36.3986664, 0.510468006, -67.2739868)
  179. Part4.Orientation = Vector3.new(90, 0, 0)
  180. SpecialMesh5.Parent = Part4
  181. SpecialMesh5.MeshId = "rbxassetid://777172237"
  182. SpecialMesh5.Scale = Vector3.new(0.00456133951, 0.00456133857, 0.00456129387)
  183. SpecialMesh5.TextureId = "rbxassetid://777384640"
  184. SpecialMesh5.MeshType = Enum.MeshType.FileMesh
  185. SpecialMesh5.Scale = Vector3.new(0.00456133951, 0.00456133857, 0.00456129387)
  186. Part6.Name = "Carry Handle and Bipod"
  187. Part6.Parent = Tool0
  188. Part6.Material = Enum.Material.Fabric
  189. Part6.Rotation = Vector3.new(90, 0, 0)
  190. Part6.Anchored = true
  191. Part6.CanCollide = false
  192. Part6.Size = Vector3.new(1.56262827, 0.330295652, 0.420204818)
  193. Part6.CFrame = CFrame.new(35.4157333, 0.999992013, -67.2069931, 1, 0, 0, 0, 0, -1, 0, 1, 0)
  194. Part6.Position = Vector3.new(35.4157333, 0.999992013, -67.2069931)
  195. Part6.Orientation = Vector3.new(90, 0, 0)
  196. SpecialMesh7.Parent = Part6
  197. SpecialMesh7.MeshId = "rbxassetid://777123880"
  198. SpecialMesh7.Scale = Vector3.new(0.00456133951, 0.00456133857, 0.00456129387)
  199. SpecialMesh7.TextureId = "rbxassetid://777364176"
  200. SpecialMesh7.MeshType = Enum.MeshType.FileMesh
  201. SpecialMesh7.Scale = Vector3.new(0.00456133951, 0.00456133857, 0.00456129387)
  202. Part8.Name = "Sights"
  203. Part8.Parent = Tool0
  204. Part8.Material = Enum.Material.Concrete
  205. Part8.Rotation = Vector3.new(90, 0, 0)
  206. Part8.Anchored = true
  207. Part8.CanCollide = false
  208. Part8.Size = Vector3.new(2.59750986, 0.225373551, 0.46276167)
  209. Part8.CFrame = CFrame.new(35.9409561, 1.20389795, -67.2585602, 1, 0, 0, 0, 0, -1, 0, 1, 0)
  210. Part8.Position = Vector3.new(35.9409561, 1.20389795, -67.2585602)
  211. Part8.Orientation = Vector3.new(90, 0, 0)
  212. SpecialMesh9.Parent = Part8
  213. SpecialMesh9.MeshId = "rbxassetid://777163506"
  214. SpecialMesh9.Scale = Vector3.new(0.00456133951, 0.00456133857, 0.00456129387)
  215. SpecialMesh9.TextureId = "rbxassetid://777369857"
  216. SpecialMesh9.MeshType = Enum.MeshType.FileMesh
  217. SpecialMesh9.Scale = Vector3.new(0.00456133951, 0.00456133857, 0.00456129387)
  218. Part10.Name = "Lower receiver"
  219. Part10.Parent = Tool0
  220. Part10.Material = Enum.Material.Concrete
  221. Part10.Rotation = Vector3.new(90, 0, 0)
  222. Part10.Anchored = true
  223. Part10.CanCollide = false
  224. Part10.Size = Vector3.new(2.53263402, 0.225373551, 0.633969903)
  225. Part10.CFrame = CFrame.new(36.136528, 0.955763996, -67.283287, 1, 0, 0, 0, 0, -1, 0, 1, 0)
  226. Part10.Position = Vector3.new(36.136528, 0.955763996, -67.283287)
  227. Part10.Orientation = Vector3.new(90, 0, 0)
  228. SpecialMesh11.Parent = Part10
  229. SpecialMesh11.MeshId = "rbxassetid://777158802"
  230. SpecialMesh11.Scale = Vector3.new(0.00456133951, 0.00456133857, 0.00456129387)
  231. SpecialMesh11.TextureId = "rbxassetid://777342509"
  232. SpecialMesh11.MeshType = Enum.MeshType.FileMesh
  233. SpecialMesh11.Scale = Vector3.new(0.00456133951, 0.00456133857, 0.00456129387)
  234. Part12.Name = "Handguard"
  235. Part12.Parent = Tool0
  236. Part12.Material = Enum.Material.Concrete
  237. Part12.Rotation = Vector3.new(90, 0, 0)
  238. Part12.Anchored = true
  239. Part12.CanCollide = false
  240. Part12.Size = Vector3.new(0.91803354, 0.263795912, 0.339953363)
  241. Part12.CFrame = CFrame.new(35.626503, 1.040447, -67.2594986, 1, 0, 0, 0, 0, -1, 0, 1, 0)
  242. Part12.Position = Vector3.new(35.626503, 1.040447, -67.2594986)
  243. Part12.Orientation = Vector3.new(90, 0, 0)
  244. SpecialMesh13.Parent = Part12
  245. SpecialMesh13.MeshId = "rbxassetid://777126216"
  246. SpecialMesh13.Scale = Vector3.new(0.00456133951, 0.00456133857, 0.00456129387)
  247. SpecialMesh13.TextureId = "rbxassetid://777479988"
  248. SpecialMesh13.MeshType = Enum.MeshType.FileMesh
  249. SpecialMesh13.Scale = Vector3.new(0.00456133951, 0.00456133857, 0.00456129387)
  250. Part14.Name = "FakeGrip"
  251. Part14.Parent = Tool0
  252. Part14.Material = Enum.Material.Concrete
  253. Part14.Rotation = Vector3.new(90, 0, 0)
  254. Part14.Anchored = true
  255. Part14.CanCollide = false
  256. Part14.Size = Vector3.new(0.639974177, 0.225373551, 0.605908811)
  257. Part14.CFrame = CFrame.new(37.1062241, 0.618148029, -67.2739868, 1, 0, 0, 0, 0, -1, 0, 1, 0)
  258. Part14.Position = Vector3.new(37.1062241, 0.618148029, -67.2739868)
  259. Part14.Orientation = Vector3.new(90, 0, 0)
  260. SpecialMesh15.Parent = Part14
  261. SpecialMesh15.MeshId = "rbxassetid://777114867"
  262. SpecialMesh15.Scale = Vector3.new(0.00456133951, 0.00456133857, 0.00456129387)
  263. SpecialMesh15.TextureId = "rbxassetid://777375519"
  264. SpecialMesh15.MeshType = Enum.MeshType.FileMesh
  265. SpecialMesh15.Scale = Vector3.new(0.00456133951, 0.00456133857, 0.00456129387)
  266. Part16.Name = "Barrel"
  267. Part16.Parent = Tool0
  268. Part16.Material = Enum.Material.Concrete
  269. Part16.Rotation = Vector3.new(90, 0, 0)
  270. Part16.Anchored = true
  271. Part16.CanCollide = false
  272. Part16.Size = Vector3.new(2.24157023, 0.225373551, 0.225373551)
  273. Part16.CFrame = CFrame.new(34.8835526, 1.06779397, -67.2739868, 1, 0, 0, 0, 0, -1, 0, 1, 0)
  274. Part16.Position = Vector3.new(34.8835526, 1.06779397, -67.2739868)
  275. Part16.Orientation = Vector3.new(90, 0, 0)
  276. SpecialMesh17.Parent = Part16
  277. SpecialMesh17.MeshId = "rbxassetid://777120329"
  278. SpecialMesh17.Scale = Vector3.new(0.00456133951, 0.00456133857, 0.00456129387)
  279. SpecialMesh17.TextureId = "rbxassetid://777358188"
  280. SpecialMesh17.MeshType = Enum.MeshType.FileMesh
  281. SpecialMesh17.Scale = Vector3.new(0.00456133951, 0.00456133857, 0.00456129387)
  282. Part18.Name = "Barrier"
  283. Part18.Parent = Tool0
  284. Part18.Material = Enum.Material.Concrete
  285. Part18.Rotation = Vector3.new(90, 0, 0)
  286. Part18.Anchored = true
  287. Part18.CanCollide = false
  288. Part18.Size = Vector3.new(0.426093042, 0.225373551, 0.225373551)
  289. Part18.CFrame = CFrame.new(36.3743973, 1.17568004, -67.3239899, 1, 0, 0, 0, 0, -1, 0, 1, 0)
  290. Part18.Position = Vector3.new(36.3743973, 1.17568004, -67.3239899)
  291. Part18.Orientation = Vector3.new(90, 0, 0)
  292. SpecialMesh19.Parent = Part18
  293. SpecialMesh19.MeshId = "rbxassetid://777196460"
  294. SpecialMesh19.Scale = Vector3.new(0.00456133951, 0.00456133857, 0.00456129387)
  295. SpecialMesh19.TextureId = "rbxassetid://777328045"
  296. SpecialMesh19.MeshType = Enum.MeshType.FileMesh
  297. SpecialMesh19.Scale = Vector3.new(0.00456133951, 0.00456133857, 0.00456129387)
  298. Sound20.Name = "BoltForward"
  299. Sound20.Parent = Part18
  300. Sound20.SoundId = "rbxassetid://393678926"
  301. Sound20.Volume = 1
  302. Sound21.Name = "BoltBack"
  303. Sound21.Parent = Part18
  304. Sound21.SoundId = "rbxassetid://393678915"
  305. Sound21.Volume = 1
  306. Part22.Name = "AimPart"
  307. Part22.Parent = Tool0
  308. Part22.BrickColor = BrickColor.new("Black")
  309. Part22.Transparency = 1
  310. Part22.Rotation = Vector3.new(0, 90, 0)
  311. Part22.Anchored = true
  312. Part22.CanCollide = false
  313. Part22.Size = Vector3.new(0.200000003, 0.200000003, 0.200000003)
  314. Part22.CFrame = CFrame.new(37.4960022, 1.38299894, -67.276001, 0, -2.70000019e-05, 1.00000024, 0, 1.00000024, 2.70000019e-05, -1, 0, 0)
  315. Part22.Color = Color3.new(0.105882, 0.164706, 0.207843)
  316. Part22.Position = Vector3.new(37.4960022, 1.38299894, -67.276001)
  317. Part22.Orientation = Vector3.new(0, 90, 0)
  318. Part22.Color = Color3.new(0.105882, 0.164706, 0.207843)
  319. SpecialMesh23.Parent = Part22
  320. SpecialMesh23.Scale = Vector3.new(0.731707275, 0.731707275, 0.731707275)
  321. SpecialMesh23.MeshType = Enum.MeshType.Brick
  322. SpecialMesh23.Scale = Vector3.new(0.731707275, 0.731707275, 0.731707275)
  323. Part24.Name = "FirePart"
  324. Part24.Parent = Tool0
  325. Part24.Material = Enum.Material.Metal
  326. Part24.BrickColor = BrickColor.new("New Yeller")
  327. Part24.Transparency = 1
  328. Part24.Rotation = Vector3.new(0, 90, 0)
  329. Part24.Anchored = true
  330. Part24.CanCollide = false
  331. Part24.FormFactor = Enum.FormFactor.Custom
  332. Part24.Size = Vector3.new(0.200000003, 0.200000003, 0.200000003)
  333. Part24.CFrame = CFrame.new(33.7980003, 1.06799996, -67.2730026, 0, -2.7e-05, 1, 0, 1, 2.7e-05, -1, 0, 0)
  334. Part24.BottomSurface = Enum.SurfaceType.Smooth
  335. Part24.TopSurface = Enum.SurfaceType.Smooth
  336. Part24.Color = Color3.new(1, 1, 0)
  337. Part24.Position = Vector3.new(33.7980003, 1.06799996, -67.2730026)
  338. Part24.Orientation = Vector3.new(0, 90, 0)
  339. Part24.Color = Color3.new(1, 1, 0)
  340. Sound25.Name = "Whizz"
  341. Sound25.Parent = Part24
  342. Sound25.Pitch = 0.99500000476837
  343. Sound25.SoundId = "rbxassetid://294837636"
  344. Sound25.Volume = 1
  345. Sound26.Name = "Whiz"
  346. Sound26.Parent = Part24
  347. Sound26.SoundId = "rbxassetid://269514843"
  348. Sound26.Volume = 1
  349. Sound26.Looped = true
  350. Sound27.Name = "Fire"
  351. Sound27.Parent = Part24
  352. Sound27.SoundId = "rbxassetid://284938795"
  353. Sound27.Volume = 0.80000001192093
  354. ParticleEmitter28.Name = "1FlashFX2"
  355. ParticleEmitter28.Parent = Part24
  356. ParticleEmitter28.Transparency = NumberSequence.new(0.625,1)
  357. ParticleEmitter28.Rotation = NumberRange.new(-90, 90)
  358. ParticleEmitter28.Size = NumberSequence.new(1,0)
  359. ParticleEmitter28.Color = ColorSequence.new(Color3.new(1, 1, 0.498039),Color3.new(1, 1, 0.498039))
  360. ParticleEmitter28.Enabled = false
  361. ParticleEmitter28.LightEmission = 1
  362. ParticleEmitter28.Texture = "http://www.roblox.com/asset/?id=257430870"
  363. ParticleEmitter28.Lifetime = NumberRange.new(0.050000000745058, 0.075000002980232)
  364. ParticleEmitter28.Rate = 1000
  365. ParticleEmitter28.Speed = NumberRange.new(100, 100)
  366. ParticleEmitter28.Color = ColorSequence.new(Color3.new(1, 1, 0.498039),Color3.new(1, 1, 0.498039))
  367. SpotLight29.Name = "FlashFX"
  368. SpotLight29.Parent = Part24
  369. SpotLight29.Color = Color3.new(1, 0.956863, 0.835294)
  370. SpotLight29.Enabled = false
  371. SpotLight29.Brightness = 100
  372. SpotLight29.Range = 15
  373. SpotLight29.Angle = 180
  374. SpotLight29.Color = Color3.new(1, 0.956863, 0.835294)
  375. BlockMesh30.Parent = Part24
  376. BlockMesh30.Scale = Vector3.new(0.65365845, 0.65365845, 0.65365845)
  377. BlockMesh30.Scale = Vector3.new(0.65365845, 0.65365845, 0.65365845)
  378. ParticleEmitter31.Name = "Smoke"
  379. ParticleEmitter31.Parent = Part24
  380. ParticleEmitter31.Transparency = NumberSequence.new(0.99000000953674,0.99000000953674)
  381. ParticleEmitter31.Rotation = NumberRange.new(0, 100)
  382. ParticleEmitter31.Size = NumberSequence.new(0.20000000298023,0.20000000298023)
  383. ParticleEmitter31.Enabled = false
  384. ParticleEmitter31.LightEmission = 0.0099999997764826
  385. ParticleEmitter31.Texture = "http://www.roblox.com/asset/?id=117472237"
  386. ParticleEmitter31.Lifetime = NumberRange.new(1, 1)
  387. ParticleEmitter31.Rate = 998
  388. ParticleEmitter31.RotSpeed = NumberRange.new(200, 200)
  389. ParticleEmitter31.Speed = NumberRange.new(7, 7)
  390. ParticleEmitter31.VelocitySpread = 40
  391. Part32.Name = "Grip"
  392. Part32.Parent = Tool0
  393. Part32.Material = Enum.Material.SmoothPlastic
  394. Part32.BrickColor = BrickColor.new("Electric blue")
  395. Part32.Transparency = 1
  396. Part32.Rotation = Vector3.new(0, 90, 0)
  397. Part32.Anchored = true
  398. Part32.CanCollide = false
  399. Part32.Size = Vector3.new(0.0500000007, 0.0500000007, 0.0500000007)
  400. Part32.CFrame = CFrame.new(36.8268509, 1.04155803, -67.3024826, 0, 0, 1, 0, 1, -0, -1, 0, 0)
  401. Part32.BottomSurface = Enum.SurfaceType.Smooth
  402. Part32.TopSurface = Enum.SurfaceType.Smooth
  403. Part32.Color = Color3.new(0.0352941, 0.537255, 0.811765)
  404. Part32.Position = Vector3.new(36.8268509, 1.04155803, -67.3024826)
  405. Part32.Orientation = Vector3.new(0, 90, 0)
  406. Part32.Color = Color3.new(0.0352941, 0.537255, 0.811765)
  407. Sound33.Name = "Click"
  408. Sound33.Parent = Part32
  409. Sound33.SoundId = "http://www.roblox.com/asset/?id=265275510"
  410. Sound33.Volume = 1
  411. Sound34.Name = "M3"
  412. Sound34.Parent = Part32
  413. Sound34.SoundId = "http://www.roblox.com/asset/?id=166238161"
  414. Sound35.Name = "MagIn"
  415. Sound35.Parent = Part32
  416. Sound35.SoundId = "http://roblox.com/asset/?id=166238223"
  417. Sound35.Volume = 0.20000000298023
  418. Sound36.Name = "MagOut"
  419. Sound36.Parent = Part32
  420. Sound36.SoundId = "http://roblox.com/asset/?id=166238177"
  421. Sound36.Volume = 0.20000000298023
  422. Part37.Name = "LaserLight"
  423. Part37.Parent = Tool0
  424. Part37.Material = Enum.Material.Neon
  425. Part37.BrickColor = BrickColor.new("Really red")
  426. Part37.Transparency = 1
  427. Part37.Rotation = Vector3.new(0, 0, 90)
  428. Part37.CanCollide = false
  429. Part37.FormFactor = Enum.FormFactor.Custom
  430. Part37.Size = Vector3.new(0.200000003, 0.200000003, 0.200000003)
  431. Part37.CFrame = CFrame.new(35.2833481, 0.979876995, -67.262619, 0, -1, 0, 1, 0, -0, 0, 0, 1)
  432. Part37.Color = Color3.new(1, 0, 0)
  433. Part37.Position = Vector3.new(35.2833481, 0.979876995, -67.262619)
  434. Part37.Orientation = Vector3.new(0, 0, 90)
  435. Part37.Color = Color3.new(1, 0, 0)
  436. CylinderMesh38.Parent = Part37
  437. CylinderMesh38.Offset = Vector3.new(0, 100, 0)
  438. CylinderMesh38.Scale = Vector3.new(0.0500000007, 1000, 0.0500000007)
  439. CylinderMesh38.Scale = Vector3.new(0.0500000007, 1000, 0.0500000007)
  440. Part39.Name = "LaserThing"
  441. Part39.Parent = Tool0
  442. Part39.Material = Enum.Material.Neon
  443. Part39.BrickColor = BrickColor.new("Really black")
  444. Part39.Transparency = 0.5
  445. Part39.Rotation = Vector3.new(0, 90, 0)
  446. Part39.Anchored = true
  447. Part39.CanCollide = false
  448. Part39.Size = Vector3.new(0.0500000007, 0.0500000007, 0.0500000007)
  449. Part39.CFrame = CFrame.new(35.2928848, 0.977980018, -67.2691498, 0, 0, 1, 0, 1, -0, -1, 0, 0)
  450. Part39.BottomSurface = Enum.SurfaceType.Smooth
  451. Part39.TopSurface = Enum.SurfaceType.Smooth
  452. Part39.Color = Color3.new(0.0666667, 0.0666667, 0.0666667)
  453. Part39.Position = Vector3.new(35.2928848, 0.977980018, -67.2691498)
  454. Part39.Orientation = Vector3.new(0, 90, 0)
  455. Part39.Color = Color3.new(0.0666667, 0.0666667, 0.0666667)
  456. LocalScript40.Name = "GunScript"
  457. LocalScript40.Parent = Tool0
  458. table.insert(cors,sandbox(LocalScript40,function()
  459.  
  460. wait(1)
  461.  
  462.  
  463. local Tool = script.Parent
  464.  
  465.  
  466. local Player = game.Players.LocalPlayer
  467. local Character = Player.Character
  468. local Torso = Character.Torso
  469. local Neck = Torso:WaitForChild("Neck")
  470. local Humanoid = Character.Humanoid
  471. local Mouse = Player:GetMouse()
  472.  
  473. local Camera = game.Workspace.CurrentCamera
  474.  
  475.  
  476. local GunSetup = {
  477.  
  478. Name = "M4A1";
  479. Ammo = script.Ammo.Value;
  480. RPM = 666;
  481. BurstRPM = 666;
  482. FireMode = "Automatic";
  483. BkFM = "Automatic";
  484. BurstFire = 3;
  485. SwitchableModes = {
  486. Burst = false;
  487. Single = true;
  488. Automatic = true;
  489.  
  490. };
  491.  
  492.  
  493. GrenadeLauncher = false;
  494. M203Ammo = 1; -- 1 For HEGrenade, 2 For SmokeGrenade
  495. GLFirerate = 2;
  496.  
  497. AnimSpeed = 1;
  498.  
  499. Chamber = true;
  500. CanBreak = false;
  501. CanSeeMag = true;
  502. FastReload = true;
  503.  
  504. BType = "5.56x45mm";
  505. BSpeed = 884;
  506. ATK = true;
  507. BDrop = 90;
  508. BSpread = 0;
  509.  
  510. LimbsDamage = {10,20};
  511. TorsoDamage = {30,40};
  512. HeadDamage = {85,100};
  513.  
  514. HelmetDamage = 64;
  515. VestDamage = 34;
  516.  
  517. Recoil = {32,42};
  518. Aimpart = Tool.AimPart;
  519. FOV1 = 40;
  520. FOV2 = 35;
  521.  
  522. RightPos = CFrame.new(-0.575, -0.465, -1.185) * CFrame.Angles(math.rad(-90), math.rad(0), math.rad(0));
  523. LeftPos = CFrame.new(1.123,0.25,-1.795) * CFrame.Angles(math.rad(-120),math.rad(46.5),math.rad(15));
  524. ----------------------
  525.  
  526. LeftAimPosition = CFrame.new(1,-0.25,-1.1) * CFrame.Angles(math.rad(-110),math.rad(48.5),math.rad(2));
  527. LeftAim2Position = CFrame.new(1,0.25,-1.5) * CFrame.Angles(math.rad(-120),math.rad(25),math.rad(-15))
  528.  
  529. }
  530.  
  531. local Recoilup = 0
  532.  
  533. local Recoil = math.random(GunSetup.Recoil[1],GunSetup.Recoil[2])/60
  534. local RecoilG
  535. local Firerate = 1/(GunSetup.RPM/60)
  536. local BURSTFirerate = 1/(GunSetup.BurstRPM/60)
  537. local GLFirerate = GunSetup.GLFirerate
  538. local Ammo = GunSetup.Ammo
  539. local GLAmmo = script.GLAmmo
  540. local MaxAmmo = script.MaxAmmo
  541. local StoredAmmo = script.StoredAmmo
  542. local EnableCycleSight = true
  543. local EnableFireMode = true
  544. local AimPartMode = 1
  545.  
  546. local slideback = false
  547. local Checando = false
  548. local Emperrado = false
  549. local Chambered = false
  550. local MagOut = false
  551. local GLChambered = false
  552.  
  553. local Animando = false
  554.  
  555. _G.Sprinting = false
  556.  
  557. local Safemode = false
  558.  
  559. local MouseHeld
  560.  
  561. local Equipped = false
  562. local Sprinting = false
  563. local Shooting = false
  564. local Aiming = false
  565. local Reloading = false
  566. local GLReloading = false
  567.  
  568. pos = 0.0006
  569. neg = -0.0006
  570.  
  571. local shell
  572. local AmmoGui
  573.  
  574. local RAW
  575. local LAW
  576.  
  577.  
  578.  
  579. local arms
  580.  
  581. local Shell = Tool:WaitForChild("Shells"):WaitForChild("Shell")
  582.  
  583. local function GetAmmo()
  584. AmmoGui.Frame.AText.Text = Ammo
  585. return Ammo
  586. end
  587.  
  588. local uis = game:GetService("UserInputService")
  589.  
  590. local RG = Character["Right Arm"]:FindFirstChild("RightGrip")
  591.  
  592.  
  593. ---------------------------------------------------------------------------------------
  594. ---------------- [ Tween Module ] --------------------------------------------------------
  595. ---------------------------------------------------------------------------------------
  596.  
  597. function tweenFoV(goal, frames)
  598. coroutine.resume(coroutine.create(function()
  599. SFn = SFn and SFn + 1 or 0
  600. local SFn_S = SFn
  601. for i = 1, frames do
  602. if SFn ~= SFn_S then break end
  603. Camera.FieldOfView = Camera.FieldOfView + (goal - Camera.FieldOfView) * (i / frames)
  604. game:GetService("RunService").RenderStepped:wait()
  605. end
  606. end))
  607. end
  608.  
  609.  
  610. --[[
  611.  
  612. tweenJoint Function Parameters:
  613.  
  614. Object Joint - This has to be a weld with a C0 and C1 property
  615.  
  616. CFrame newC0 - This is what the new C0 of the weld will be. You can put nil if you don't want to effect the C0
  617.  
  618. CFrame newC1 - This is what the new C1 of the weld will be. You can put nil if you don't want to effect the C1
  619.  
  620. function Alpha - This is an alpha function that takes an input parameter of a number between 0 and 90 and returns a number between 0 and 1.
  621. For example, function(X) return math.sin(math.rad(X)) end
  622.  
  623. float Duration - This is how long the tweening takes to complete
  624.  
  625. --]]
  626. local RS = game:GetService("RunService")
  627.  
  628. function tweenJoint(Joint, newC0, newC1, Alpha, Duration)
  629. spawn(function()
  630. local newCode = math.random(-1e9, 1e9) --This creates a random code between -1000000000 and 1000000000
  631. local tweenIndicator = nil
  632. if (not Joint:findFirstChild("tweenCode")) then --If the joint isn't being tweened, then
  633. tweenIndicator = Instance.new("IntValue")
  634. tweenIndicator.Name = "tweenCode"
  635. tweenIndicator.Value = newCode
  636. tweenIndicator.Parent = Joint
  637. else
  638. tweenIndicator = Joint.tweenCode
  639. tweenIndicator.Value = newCode --If the joint is already being tweened, this will change the code, and the tween loop will stop
  640. end
  641. --local tweenIndicator = createTweenIndicator:InvokeServer(Joint, newCode)
  642. if Duration <= 0 then --If the duration is less than or equal to 0 then there's no need for a tweening loop
  643. if newC0 then Joint.C0 = newC0 end
  644. if newC1 then Joint.C1 = newC1 end
  645. else
  646. local Increment = 1.5 / Duration
  647. local startC0 = Joint.C0
  648. local startC1 = Joint.C1
  649. local X = 0
  650. while true do
  651. RS.RenderStepped:wait() --This makes the for loop step every 1/60th of a second
  652. local newX = X + Increment
  653. X = (newX > 90 and 90 or newX)
  654. if tweenIndicator.Value ~= newCode then break end --This makes sure that another tween wasn't called on the same joint
  655. if (not Equipped) then break end --This stops the tween if the tool is deselected
  656. if newC0 then Joint.C0 = startC0:lerp(newC0, Alpha(X)) end
  657. if newC1 then Joint.C1 = startC1:lerp(newC1, Alpha(X)) end
  658. --if newC0 then lerpCF:InvokeServer(Joint, "C0", startC0, newC0, Alpha(X)) end
  659. --if newC1 then lerpCF:InvokeServer(Joint, "C1", startC1, newC1, Alpha(X)) end
  660. if X == 90 then break end
  661. end
  662. end
  663. if tweenIndicator.Value == newCode then --If this tween functions was the last one called on a joint then it will remove the code
  664. tweenIndicator:Destroy()
  665. end
  666. --deleteTweenIndicator:InvokeServer(tweenIndicator, newCode)
  667. end)
  668. end
  669.  
  670.  
  671. -------------Motor6Ding Section------------------------
  672. Tool.Equipped:connect(function()
  673. if Humanoid.Health > 0 then
  674. RAW = Instance.new("Motor6D")
  675. RAW.Name= "RightWeld"
  676. RAW.Part0 =Player.Character["Right Arm"]
  677. RAW.Part1 = Character["Head"]
  678. RAW.Parent=Player.Character["Right Arm"]
  679. -- Player.CameraMode="LockFirstPerson"
  680. Torso:WaitForChild("Right Shoulder").Part1 = nil
  681. if Reloading then
  682. Reloading = false
  683. end
  684. if GLReloading then
  685. GLReloading = false
  686. end
  687. LAW = Instance.new("Motor6D")
  688. LAW.Name= "LeftWeld"
  689. LAW.Part0 = Player.Character["Left Arm"]
  690. LAW.Part1 = Character["Head"]
  691. LAW.Parent = Player.Character["Left Arm"]
  692. LAW.C0 = GunSetup.LeftPos
  693. RAW.C0 = GunSetup.RightPos
  694. Torso:WaitForChild("Left Shoulder").Part1 = nil
  695. LAW.C1 = CFrame.new()
  696. RAW.C1 = CFrame.new()
  697.  
  698.  
  699.  
  700. uis.MouseIconEnabled = false
  701. AmmoGui = script.AmmoGui:Clone()
  702. AmmoGui.Parent = Player.PlayerGui
  703. AmmoGui.Frame.Visible = false
  704.  
  705.  
  706.  
  707. Equipped = true
  708. game:GetService('RunService').RenderStepped:connect(function()
  709. RAW.C1 = CFrame.new() * CFrame.new((Recoilup/4),0,(Recoilup*2))
  710. LAW.C1 = CFrame.new() * CFrame.new((Recoilup/4),0,(Recoilup*2))
  711. if not Equipped then
  712. IdleOrSteadyAnim()
  713. Reloading = false
  714. GLReloading = false
  715. end
  716. if AmmoGui:FindFirstChild("Frame") then
  717. AmmoGui.Frame.FText.Text = GunSetup.FireMode
  718. AmmoGui.Frame.SAText.Text = ""..math.ceil(StoredAmmo.Value/math.ceil(GunSetup.Ammo)).." MAGS"
  719. AmmoGui.Frame.Btext.Text = GunSetup.BType
  720.  
  721. if Safemode then
  722. AmmoGui.Frame.A.Visible = true
  723. else
  724. AmmoGui.Frame.A.Visible = false
  725. end
  726.  
  727. if Chambered then
  728. AmmoGui.Frame.B.Visible = false
  729. else
  730. AmmoGui.Frame.B.Visible = true
  731. end
  732.  
  733. if GunSetup.GrenadeLauncher and GLChambered then
  734. AmmoGui.Frame.E.Visible = false
  735. elseif GunSetup.GrenadeLauncher and not GLChambered then
  736. AmmoGui.Frame.E.Visible = true
  737. else
  738. AmmoGui.Frame.E.Visible = false
  739. end
  740.  
  741. if Emperrado then
  742. AmmoGui.Frame.C.Visible = true
  743. else
  744. AmmoGui.Frame.C.Visible = false
  745. end
  746.  
  747.  
  748. if slideback then
  749. AmmoGui.Frame.D.Visible = true
  750. else
  751. AmmoGui.Frame.D.Visible = false
  752. end
  753.  
  754.  
  755. if GunSetup.FireMode == "M203" then
  756. AmmoGui.Frame.NText.Text = "M203"
  757. AmmoGui.Frame.SAText.Text = GLAmmo.Value
  758. AmmoGui.Frame.AText.Text = Ammo .." Bullets"
  759. end
  760.  
  761.  
  762. if StoredAmmo.Value > MaxAmmo.Value then
  763. StoredAmmo.Value = MaxAmmo.Value
  764. end
  765.  
  766. if GunSetup.FireMode ~= "M203" then
  767. AmmoGui.Frame.NText.Text = GunSetup.Name
  768. AmmoGui.Frame.AText.Text = Ammo .." Bullets"
  769. end
  770. end
  771. end)
  772. end
  773. end)
  774.  
  775.  
  776.  
  777.  
  778.  
  779.  
  780.  
  781.  
  782. ---------- Animations ------------------
  783.  
  784. function SprintAnim()
  785. Humanoid.WalkSpeed = 24
  786. tweenJoint(RAW, CFrame.new(-0.75, 0.125, -1.3) * CFrame.Angles(math.rad(-80), math.rad(-55), math.rad(0)) , nil, function(X) return math.sin(math.rad(X)) end, 0.25 * GunSetup.AnimSpeed)
  787. tweenJoint(LAW, CFrame.new(1.25,0.85,-1.125) * CFrame.Angles(math.rad(-85),math.rad(-10.5),math.rad(-10)) , nil, function(X) return math.sin(math.rad(X)) end, 0.25 * GunSetup.AnimSpeed)
  788. _G.Sprinting = true
  789. end
  790.  
  791. function SafetyAnim()
  792. tweenJoint(RAW, CFrame.new(-0.75, 0.125, -1.3) * CFrame.Angles(math.rad(-80), math.rad(-55), math.rad(0)) , nil, function(X) return math.sin(math.rad(X)) end, 0.25 * GunSetup.AnimSpeed)
  793. tweenJoint(LAW, CFrame.new(1.25,0.85,-1.125) * CFrame.Angles(math.rad(-85),math.rad(-10.5),math.rad(-10)) , nil, function(X) return math.sin(math.rad(X)) end, 0.25 * GunSetup.AnimSpeed)
  794. end
  795.  
  796.  
  797.  
  798.  
  799.  
  800. function IdleOrSteadyAnim()
  801. tweenJoint(RAW, GunSetup.RightPos , nil, function(X) return math.sin(math.rad(X)) end, 0.225 * GunSetup.AnimSpeed)
  802. tweenJoint(LAW, GunSetup.LeftPos , nil, function(X) return math.sin(math.rad(X)) end, 0.215 * GunSetup.AnimSpeed)
  803. end
  804.  
  805.  
  806.  
  807.  
  808.  
  809.  
  810.  
  811. function ReloadAnim()
  812. if Equipped then
  813.  
  814. tweenJoint(RAW, CFrame.new(-0.875, -0.465, -1.15) * CFrame.Angles(math.rad(-95), math.rad(-2), math.rad(7.5)) , nil, function(X) return math.sin(math.rad(X)) end, 0.425 * GunSetup.AnimSpeed)
  815. tweenJoint(LAW, CFrame.new(1.195,-0.35,-1.48) * CFrame.Angles(math.rad(-100),math.rad(75),math.rad(0)) , nil, function(X) return math.sin(math.rad(X)) end, 0.375 * GunSetup.AnimSpeed)
  816.  
  817. wait(0.55 * GunSetup.AnimSpeed)
  818. tweenJoint(RAW, CFrame.new(-0.975, -0.365, -1.2) * CFrame.Angles(math.rad(-85), math.rad(-2), math.rad(9)) , nil, function(X) return math.sin(math.rad(X)) end, 0.525 * GunSetup.AnimSpeed)
  819. tweenJoint(LAW, CFrame.new(1.195,1.4,-0.5) * CFrame.Angles(math.rad(0),math.rad(25),math.rad(0)) , nil, function(X) return math.sin(math.rad(X)) end, 0.375 * GunSetup.AnimSpeed)
  820. Tool.Handle.MagOut:Play()
  821.  
  822. local MagC = Tool:WaitForChild("Mag"):clone()
  823. Tool.Mag.Transparency = 1
  824. MagC.Parent = Tool
  825. MagC.Name = "MagC"
  826. MagC.Transparency = 0
  827.  
  828.  
  829. local MagCW = Instance.new("Motor6D")
  830. MagCW.Part0 = MagC
  831. MagCW.Part1 = Player.Character["Left Arm"]
  832. MagCW.Parent = MagC
  833. MagCW.C1 = MagC.CFrame:toObjectSpace(Tool.Mag.CFrame)
  834.  
  835. wait(0.75 * (GunSetup.AnimSpeed/1))
  836.  
  837. if (StoredAmmo.Value - (GunSetup.Ammo - Ammo)) < 0 then
  838. Ammo = Ammo + StoredAmmo.Value
  839. StoredAmmo.Value = 0
  840. elseif Ammo <= 0 then
  841. StoredAmmo.Value = StoredAmmo.Value - (GunSetup.Ammo - Ammo)
  842. Ammo = GunSetup.Ammo
  843. Chambered = false
  844. elseif Ammo > 0 and Chambered and GunSetup.Chamber then
  845. StoredAmmo.Value = StoredAmmo.Value - (GunSetup.Ammo - Ammo)
  846. Ammo = GunSetup.Ammo + 1
  847. elseif Ammo > 0 and Chambered and not GunSetup.Chamber then
  848. StoredAmmo.Value = StoredAmmo.Value - (GunSetup.Ammo - Ammo)
  849. Ammo = GunSetup.Ammo
  850. end
  851.  
  852. Tool.Handle.MagIn:Play()
  853.  
  854. tweenJoint(RAW, CFrame.new(-0.875, -0.465, -1.15) * CFrame.Angles(math.rad(-95), math.rad(-2), math.rad(7.5)) , nil, function(X) return math.sin(math.rad(X)) end, 0.325 * GunSetup.AnimSpeed)
  855. tweenJoint(LAW, CFrame.new(1.195,-0.35,-1.48) * CFrame.Angles(math.rad(-100),math.rad(75),math.rad(0)) , nil, function(X) return math.sin(math.rad(X)) end, 0.275 * GunSetup.AnimSpeed)
  856.  
  857. wait(0.15 * GunSetup.AnimSpeed)
  858. MagC:Destroy()
  859. Tool.Mag.Transparency = 0
  860. wait(0.35 * GunSetup.AnimSpeed)
  861.  
  862. end
  863. end
  864.  
  865.  
  866. function SeeMag()
  867. if Equipped then
  868. Animando = true
  869. tweenJoint(RAW, CFrame.new(0.213, -0.265, -1.25) * CFrame.Angles(math.rad(-90), math.rad(7.5), math.rad(-50.5)) , nil, function(X) return math.sin(math.rad(X)) end, 0.325 * GunSetup.AnimSpeed)
  870. tweenJoint(LAW, CFrame.new(2.195,-0.825,-1.08) * CFrame.Angles(math.rad(-100),math.rad(75),math.rad(-41)) , nil, function(X) return math.sin(math.rad(X)) end, 0.375 * GunSetup.AnimSpeed)
  871.  
  872. wait(1.125 * (GunSetup.AnimSpeed/2))
  873. tweenJoint(RAW, CFrame.new(-0.875, -0.465, -1.15) * CFrame.Angles(math.rad(-95), math.rad(-2), math.rad(7.5)) , nil, function(X) return math.sin(math.rad(X)) end, 0.425 * GunSetup.AnimSpeed)
  874. tweenJoint(LAW, CFrame.new(1.195,-0.35,-1.48) * CFrame.Angles(math.rad(-100),math.rad(75),math.rad(0)) , nil, function(X) return math.sin(math.rad(X)) end, 0.375 * GunSetup.AnimSpeed)
  875.  
  876. wait(0.55 * GunSetup.AnimSpeed)
  877. tweenJoint(RAW, CFrame.new(-0.975, -0.365, -1.2) * CFrame.Angles(math.rad(-85), math.rad(-2), math.rad(9)) , nil, function(X) return math.sin(math.rad(X)) end, 0.525 * GunSetup.AnimSpeed)
  878. tweenJoint(LAW, CFrame.new(1.195,1.4,-0.5) * CFrame.Angles(math.rad(0),math.rad(25),math.rad(0)) , nil, function(X) return math.sin(math.rad(X)) end, 0.375 * GunSetup.AnimSpeed)
  879. Tool.Handle.MagOut:Play()
  880.  
  881. local MagC = Tool:WaitForChild("Mag"):clone()
  882. Tool.Mag.Transparency = 1
  883. MagC.Parent = Tool
  884. MagC.Name = "MagC"
  885. MagC.Transparency = 0
  886.  
  887. local MagCW = Instance.new("Motor6D")
  888. MagCW.Part0 = MagC
  889. MagCW.Part1 = Player.Character["Left Arm"]
  890. MagCW.Parent = MagC
  891. MagCW.C1 = MagC.CFrame:toObjectSpace(Tool.Mag.CFrame)
  892.  
  893. wait(0.75 * (GunSetup.AnimSpeed/1))
  894.  
  895.  
  896. tweenJoint(RAW, CFrame.new(-0.875, -0.465, -1.15) * CFrame.Angles(math.rad(-95), math.rad(-2), math.rad(7.5)) , nil, function(X) return math.sin(math.rad(X)) end, 0.325 * GunSetup.AnimSpeed)
  897. tweenJoint(LAW, CFrame.new(1.195,-0.35,-1.48) * CFrame.Angles(math.rad(-100),math.rad(45),math.rad(0)) , nil, function(X) return math.sin(math.rad(X)) end, 0.275 * GunSetup.AnimSpeed)
  898. wait(0.12 * (GunSetup.AnimSpeed/1))
  899. Animando = false
  900.  
  901. --[[wait(0.15 * GunSetup.AnimSpeed)
  902. MagC:Destroy()
  903. Tool.Mag.Transparency = 0
  904. wait(0.35 * GunSetup.AnimSpeed)]]
  905.  
  906. end
  907. end
  908.  
  909. function UNSeeMag()
  910. if Equipped then
  911. Animando = true
  912. local MagC = Tool:WaitForChild("MagC")
  913.  
  914. local MagCW = script.Parent.MagC.Motor6D
  915.  
  916. wait(0.75 * (GunSetup.AnimSpeed/1))
  917.  
  918. tweenJoint(RAW, CFrame.new(-0.875, -0.465, -1.15) * CFrame.Angles(math.rad(-95), math.rad(-2), math.rad(7.5)) , nil, function(X) return math.sin(math.rad(X)) end, 0.325 * GunSetup.AnimSpeed)
  919. tweenJoint(LAW, CFrame.new(1.195,-0.35,-1.48) * CFrame.Angles(math.rad(-100),math.rad(75),math.rad(0)) , nil, function(X) return math.sin(math.rad(X)) end, 0.275 * GunSetup.AnimSpeed)
  920.  
  921. wait(0.15 * GunSetup.AnimSpeed)
  922. Tool.Handle.MagIn:Play()
  923. MagC:Destroy()
  924. Tool.Mag.Transparency = 0
  925. wait(0.35 * GunSetup.AnimSpeed)
  926. tweenJoint(RAW, CFrame.new(0.213, -0.265, -1.25) * CFrame.Angles(math.rad(-90), math.rad(7.5), math.rad(-50.5)) , nil, function(X) return math.sin(math.rad(X)) end, 0.325 * GunSetup.AnimSpeed)
  927. tweenJoint(LAW, CFrame.new(1.25,0.55,-1.08) * CFrame.Angles(math.rad(-100),math.rad(25),math.rad(-41)) , nil, function(X) return math.sin(math.rad(X)) end, 0.375 * GunSetup.AnimSpeed)
  928. wait(0.12 * (GunSetup.AnimSpeed/1))
  929. Animando = false
  930. end
  931. end
  932.  
  933.  
  934. function CheckAnim()
  935. if Equipped then
  936. Animando = true
  937. tweenJoint(RAW, CFrame.new(0.213, -0.265, -1.25) * CFrame.Angles(math.rad(-90), math.rad(7.5), math.rad(-50.5)) , nil, function(X) return math.sin(math.rad(X)) end, 0.325 * GunSetup.AnimSpeed)
  938. tweenJoint(LAW, CFrame.new(1.25,0.55,-1.08) * CFrame.Angles(math.rad(-100),math.rad(25),math.rad(-41)) , nil, function(X) return math.sin(math.rad(X)) end, 0.375 * GunSetup.AnimSpeed)
  939. wait(0.20 * (GunSetup.AnimSpeed/1))
  940. Animando = false
  941.  
  942. end
  943. end
  944.  
  945.  
  946.  
  947. function ChamberAnim()
  948. if Equipped then
  949. Animando = true
  950. tweenJoint(RAW, CFrame.new(0.213, -0.265, -1.25) * CFrame.Angles(math.rad(-90), math.rad(7.5), math.rad(-50.5)) , nil, function(X) return math.sin(math.rad(X)) end, 0.325 * GunSetup.AnimSpeed)
  951. tweenJoint(LAW, CFrame.new(0.75,-0.6,-0.85) * CFrame.Angles(math.rad(-140),math.rad(70),math.rad(40)) , nil, function(X) return math.sin(math.rad(X)) end, 0.375 * GunSetup.AnimSpeed)
  952. wait(0.15 * (GunSetup.AnimSpeed/2))
  953. Tool.Handle.MagIn:Play()
  954. tweenJoint(RAW, CFrame.new(0.213, -0.265, -1.25) * CFrame.Angles(math.rad(-90), math.rad(7.5), math.rad(-50.5)) , nil, function(X) return math.sin(math.rad(X)) end, 0.325 * GunSetup.AnimSpeed)
  955. tweenJoint(LAW, CFrame.new(0.195,-0.8,-0.85) * CFrame.Angles(math.rad(-140),math.rad(70),math.rad(40)) , nil, function(X) return math.sin(math.rad(X)) end, 0.375 * GunSetup.AnimSpeed)
  956. wait(0.12 * (GunSetup.AnimSpeed/1))
  957. Animando = false
  958. end
  959. end
  960.  
  961.  
  962. function ChamberBKAnim()
  963. if Equipped then
  964. Animando = true
  965. tweenJoint(RAW, CFrame.new(0.213, -0.265, -1.25) * CFrame.Angles(math.rad(-90), math.rad(7.5), math.rad(-50.5)) , nil, function(X) return math.sin(math.rad(X)) end, 0.325 * GunSetup.AnimSpeed)
  966. tweenJoint(LAW, CFrame.new(0.195,-0.8,-0.85) * CFrame.Angles(math.rad(-140),math.rad(70),math.rad(40)) , nil, function(X) return math.sin(math.rad(X)) end, 0.375 * GunSetup.AnimSpeed)
  967. wait(0.15 * (GunSetup.AnimSpeed/2))
  968. Tool.Handle.MagIn:Play()
  969. tweenJoint(RAW, CFrame.new(0.213, -0.265, -1.25) * CFrame.Angles(math.rad(-90), math.rad(7.5), math.rad(-50.5)) , nil, function(X) return math.sin(math.rad(X)) end, 0.325 * GunSetup.AnimSpeed)
  970. tweenJoint(LAW, CFrame.new(0.75,-0.6,-0.85) * CFrame.Angles(math.rad(-140),math.rad(70),math.rad(40)) , nil, function(X) return math.sin(math.rad(X)) end, 0.375 * GunSetup.AnimSpeed)
  971. wait(0.12 * (GunSetup.AnimSpeed/1))
  972. Animando = false
  973.  
  974. end
  975. end
  976.  
  977.  
  978.  
  979.  
  980. function FastReloadAnim()
  981. if Equipped then
  982. tweenJoint(RAW, CFrame.new(0.213, -0.265, -1.25) * CFrame.Angles(math.rad(-90), math.rad(7.5), math.rad(-50.5)) , nil, function(X) return math.sin(math.rad(X)) end, 0.325 * GunSetup.AnimSpeed)
  983. tweenJoint(LAW, CFrame.new(1.25,0.55,-1.08) * CFrame.Angles(math.rad(-100),math.rad(25),math.rad(-41)) , nil, function(X) return math.sin(math.rad(X)) end, 0.375 * GunSetup.AnimSpeed)
  984.  
  985. wait(1.125 * (GunSetup.AnimSpeed/2))
  986. tweenJoint(RAW, CFrame.new(-0.875, -0.465, -1.15) * CFrame.Angles(math.rad(-95), math.rad(-2), math.rad(7.5)) , nil, function(X) return math.sin(math.rad(X)) end, 0.425 * GunSetup.AnimSpeed)
  987. tweenJoint(LAW, CFrame.new(1.195,-0.35,-1.48) * CFrame.Angles(math.rad(-100),math.rad(75),math.rad(0)) , nil, function(X) return math.sin(math.rad(X)) end, 0.375 * GunSetup.AnimSpeed)
  988.  
  989. wait(0.55 * GunSetup.AnimSpeed)
  990. tweenJoint(RAW, CFrame.new(-0.975, -0.365, -1.2) * CFrame.Angles(math.rad(-85), math.rad(-2), math.rad(9)) , nil, function(X) return math.sin(math.rad(X)) end, 0.525 * GunSetup.AnimSpeed)
  991. tweenJoint(LAW, CFrame.new(1.195,1.4,-0.5) * CFrame.Angles(math.rad(0),math.rad(25),math.rad(0)) , nil, function(X) return math.sin(math.rad(X)) end, 0.375 * GunSetup.AnimSpeed)
  992. Tool.Handle.MagOut:Play()
  993.  
  994. local MagC = Tool:WaitForChild("Mag"):clone()
  995. Tool.Mag.Transparency = 1
  996. MagC.Parent = Tool
  997. MagC.Name = "MagC"
  998. MagC.Transparency = 0
  999.  
  1000. local MagCW = Instance.new("Motor6D")
  1001. MagCW.Part0 = MagC
  1002. MagCW.Part1 = Player.Character["Left Arm"]
  1003. MagCW.Parent = MagC
  1004. MagCW.C1 = MagC.CFrame:toObjectSpace(Tool.Mag.CFrame)
  1005.  
  1006. wait(0.75 * (GunSetup.AnimSpeed/1))
  1007.  
  1008. if (StoredAmmo.Value - (GunSetup.Ammo - Ammo)) < 0 then
  1009. Ammo = Ammo + StoredAmmo.Value
  1010. StoredAmmo.Value = 0
  1011. elseif Ammo <= 0 then
  1012. StoredAmmo.Value = StoredAmmo.Value - (GunSetup.Ammo - Ammo)
  1013. Ammo = GunSetup.Ammo
  1014. Chambered = false
  1015. elseif Ammo > 0 and Chambered and GunSetup.Chamber then
  1016. StoredAmmo.Value = StoredAmmo.Value - (GunSetup.Ammo - Ammo)
  1017. Ammo = GunSetup.Ammo + 1
  1018. elseif Ammo > 0 and Chambered and not GunSetup.Chamber then
  1019. StoredAmmo.Value = StoredAmmo.Value - (GunSetup.Ammo - Ammo)
  1020. Ammo = GunSetup.Ammo
  1021. end
  1022.  
  1023. Tool.Handle.MagIn:Play()
  1024.  
  1025. tweenJoint(RAW, CFrame.new(-0.875, -0.465, -1.15) * CFrame.Angles(math.rad(-95), math.rad(-2), math.rad(7.5)) , nil, function(X) return math.sin(math.rad(X)) end, 0.325 * GunSetup.AnimSpeed)
  1026. tweenJoint(LAW, CFrame.new(1.195,-0.35,-1.48) * CFrame.Angles(math.rad(-100),math.rad(75),math.rad(0)) , nil, function(X) return math.sin(math.rad(X)) end, 0.275 * GunSetup.AnimSpeed)
  1027.  
  1028. wait(0.15 * GunSetup.AnimSpeed)
  1029. MagC:Destroy()
  1030. Tool.Mag.Transparency = 0
  1031. wait(0.35 * GunSetup.AnimSpeed)
  1032.  
  1033. end
  1034. end
  1035.  
  1036. function FastBolt()
  1037.  
  1038. tweenJoint(RAW, CFrame.new(0.213, -0.265, -1.25) * CFrame.Angles(math.rad(-90), math.rad(7.5), math.rad(-50.5)) , nil, function(X) return math.sin(math.rad(X)) end, 0.325 * GunSetup.AnimSpeed)
  1039. tweenJoint(LAW, CFrame.new(0.75,-0.6,-0.85) * CFrame.Angles(math.rad(-140),math.rad(70),math.rad(40)) , nil, function(X) return math.sin(math.rad(X)) end, 0.375 * GunSetup.AnimSpeed)
  1040. wait(0.55 * (GunSetup.AnimSpeed/2))
  1041. tweenJoint(RAW, CFrame.new(0.213, -0.265, -1.25) * CFrame.Angles(math.rad(-90), math.rad(7.5), math.rad(-50.5)) , nil, function(X) return math.sin(math.rad(X)) end, 0.325 * GunSetup.AnimSpeed)
  1042. tweenJoint(LAW, CFrame.new(0.75,-0.6,-0.85) * CFrame.Angles(math.rad(-140),math.rad(70),math.rad(40)) , nil, function(X) return math.sin(math.rad(X)) end, 0.375 * GunSetup.AnimSpeed)
  1043. wait(0.3 * (GunSetup.AnimSpeed/2))
  1044. Tool.Handle.MagIn:Play()
  1045. tweenJoint(RAW, CFrame.new(0.213, -0.265, -1.25) * CFrame.Angles(math.rad(-90), math.rad(7.5), math.rad(-50.5)) , nil, function(X) return math.sin(math.rad(X)) end, 0.325 * GunSetup.AnimSpeed)
  1046. tweenJoint(LAW, CFrame.new(0.195,-0.8,-0.85) * CFrame.Angles(math.rad(-140),math.rad(70),math.rad(40)) , nil, function(X) return math.sin(math.rad(X)) end, 0.375 * GunSetup.AnimSpeed)
  1047.  
  1048. slideback = true
  1049. Emperrado = false
  1050. if Ammo > 0 and Chambered then
  1051. EjectShells()
  1052. Ammo = Ammo - 1
  1053. print(Ammo)
  1054. end
  1055.  
  1056. wait(0.75 * (GunSetup.AnimSpeed/2))
  1057. Tool.Handle.MagIn:Play()
  1058. tweenJoint(RAW, CFrame.new(0.213, -0.265, -1.25) * CFrame.Angles(math.rad(-90), math.rad(7.5), math.rad(-50.5)) , nil, function(X) return math.sin(math.rad(X)) end, 0.325 * GunSetup.AnimSpeed)
  1059. tweenJoint(LAW, CFrame.new(0.75,-0.6,-0.85) * CFrame.Angles(math.rad(-140),math.rad(70),math.rad(40)) , nil, function(X) return math.sin(math.rad(X)) end, 0.375 * GunSetup.AnimSpeed)
  1060.  
  1061. slideback = false
  1062. Chambered = true
  1063.  
  1064. wait(0.25 * (GunSetup.AnimSpeed/2))
  1065. tweenJoint(RAW, GunSetup.RightPos , nil, function(X) return math.sin(math.rad(X)) end, 0.225 * GunSetup.AnimSpeed)
  1066. tweenJoint(LAW, GunSetup.LeftPos , nil, function(X) return math.sin(math.rad(X)) end, 0.215 * GunSetup.AnimSpeed)
  1067.  
  1068. end
  1069.  
  1070.  
  1071. function GLReloadAnim()
  1072. if Equipped then
  1073.  
  1074.  
  1075. tweenJoint(RAW, CFrame.new(-0.975, -0.365, -1.2) * CFrame.Angles(math.rad(-85), math.rad(-2), math.rad(9)) , nil, function(X) return math.sin(math.rad(X)) end, 0.525 * GunSetup.AnimSpeed)
  1076. tweenJoint(LAW, CFrame.new(1,0,-1.795) * CFrame.Angles(math.rad(-120),math.rad(45),math.rad(5)) , nil, function(X) return math.sin(math.rad(X)) end, 0.375 * GunSetup.AnimSpeed)
  1077.  
  1078. wait(0.25 * (GunSetup.AnimSpeed/1))
  1079.  
  1080. tweenJoint(RAW, CFrame.new(-0.875, -0.465, -1.15) * CFrame.Angles(math.rad(-95), math.rad(-2), math.rad(7.5)) , nil, function(X) return math.sin(math.rad(X)) end, 0.425 * GunSetup.AnimSpeed)
  1081. tweenJoint(LAW, CFrame.new(1.195,1.4,-0.5) * CFrame.Angles(math.rad(0),math.rad(25),math.rad(0)) , nil, function(X) return math.sin(math.rad(X)) end, 0.375 * GunSetup.AnimSpeed)
  1082.  
  1083.  
  1084. wait(0.75 * (GunSetup.AnimSpeed/1))
  1085.  
  1086.  
  1087. Tool.Handle.MagOut:Play()
  1088.  
  1089. tweenJoint(RAW, CFrame.new(-0.975, -0.365, -1.2) * CFrame.Angles(math.rad(-85), math.rad(-2), math.rad(9)) , nil, function(X) return math.sin(math.rad(X)) end, 0.525 * GunSetup.AnimSpeed)
  1090. tweenJoint(LAW, CFrame.new(1,0,-1.795) * CFrame.Angles(math.rad(-120),math.rad(45),math.rad(5)) , nil, function(X) return math.sin(math.rad(X)) end, 0.375 * GunSetup.AnimSpeed)
  1091.  
  1092. if (StoredAmmo.Value - (GunSetup.Ammo - Ammo)) < 0 then
  1093. Ammo = Ammo + StoredAmmo.Value
  1094. StoredAmmo.Value = 0
  1095. elseif Ammo <= 0 then
  1096. StoredAmmo.Value = StoredAmmo.Value - (GunSetup.Ammo - Ammo)
  1097. Ammo = GunSetup.Ammo
  1098. Chambered = false
  1099. elseif Ammo > 0 and Chambered and GunSetup.Chamber then
  1100. StoredAmmo.Value = StoredAmmo.Value - (GunSetup.Ammo - Ammo)
  1101. Ammo = GunSetup.Ammo + 1
  1102. elseif Ammo > 0 and Chambered and not GunSetup.Chamber then
  1103. StoredAmmo.Value = StoredAmmo.Value - (GunSetup.Ammo - Ammo)
  1104. Ammo = GunSetup.Ammo
  1105. end
  1106.  
  1107. wait(0.75 * GunSetup.AnimSpeed)
  1108.  
  1109. tweenJoint(RAW, CFrame.new(0.213, -0.265, -1.25) * CFrame.Angles(math.rad(-90), math.rad(7.5), math.rad(-50.5)) , nil, function(X) return math.sin(math.rad(X)) end, 0.325 * GunSetup.AnimSpeed)
  1110. tweenJoint(LAW, CFrame.new(1.25,0.55,-1.08) * CFrame.Angles(math.rad(-100),math.rad(25),math.rad(-41)) , nil, function(X) return math.sin(math.rad(X)) end, 0.375 * GunSetup.AnimSpeed)
  1111.  
  1112. end
  1113. end
  1114.  
  1115. -----------------------ADS Function------------------------------
  1116.  
  1117.  
  1118.  
  1119.  
  1120.  
  1121.  
  1122.  
  1123.  
  1124.  
  1125.  
  1126. Mouse.Button2Down:connect(function()
  1127. if Equipped then
  1128. if not Aiming and not Reloading and not GLReloading and not Sprinting and not Safemode and not Checando then
  1129. Aiming = true
  1130. -- Mouse.Icon = GunSetup.Cursor.Aiming
  1131. if AimPartMode == 1 then
  1132. tweenJoint(RAW, RAW.C0 * CFrame.new(-Tool.AimPart.CFrame:toObjectSpace(Character.Head.CFrame).p), nil, function(X) return math.sin(math.rad(X)) end, 0.25 * GunSetup.AnimSpeed)
  1133. tweenJoint(LAW, GunSetup.LeftAimPosition , nil, function(X) return math.sin(math.rad(X)) end, 0.25 * GunSetup.AnimSpeed)
  1134. tweenFoV(GunSetup.FOV1, 40)
  1135. end
  1136. if AimPartMode == 2 then
  1137. tweenJoint(RAW, RAW.C0 * CFrame.new(-Tool.AimPart2.CFrame:toObjectSpace(Character.Head.CFrame).p), nil, function(X) return math.sin(math.rad(X)) end, 0.25 * GunSetup.AnimSpeed)
  1138. tweenJoint(LAW, GunSetup.LeftAim2Position , nil, function(X) return math.sin(math.rad(X)) end, 0.25 * GunSetup.AnimSpeed)
  1139. tweenFoV(GunSetup.FOV2, 40)
  1140. end
  1141.  
  1142. game.Workspace.CurrentCamera.CameraSubject = game.Players.LocalPlayer.Character.Humanoid
  1143. end
  1144. end
  1145. end)
  1146.  
  1147. Mouse.Button2Up:connect(function()
  1148. if Equipped then
  1149. if Aiming then
  1150. Aiming = false
  1151. -- Mouse.Icon = GunSetup.Cursor.Aiming
  1152. if not Safemode then
  1153. IdleOrSteadyAnim()
  1154. tweenFoV(70, 40)
  1155. end
  1156. end
  1157. end
  1158. end)
  1159.  
  1160.  
  1161. -----------------------shooting function-----------------
  1162.  
  1163. function Rand(Min, Max, Accuracy)
  1164. local Inverse = 1 / (Accuracy or 1)
  1165. return (math.random(Min * Inverse, Max * Inverse) / Inverse)
  1166. end
  1167.  
  1168. function GetHitSurfaceCFrame(HitPos,Obj)
  1169. local SurfaceCF = {
  1170. {"Back",Obj.CFrame * CFrame.new(0,0,Obj.Size.z)};
  1171. {"Bottom",Obj.CFrame * CFrame.new(0,-Obj.Size.y,0)};
  1172. {"Front",Obj.CFrame * CFrame.new(0,0,-Obj.Size.z)};
  1173. {"Left",Obj.CFrame * CFrame.new(-Obj.Size.x,0,0)};
  1174. {"Right",Obj.CFrame * CFrame.new(Obj.Size.x,0,0)};
  1175. {"Top",Obj.CFrame * CFrame.new(0,Obj.Size.y,0)}
  1176. }
  1177. local ClosestDist = math.huge
  1178. local ClosestSurface = nil
  1179. for _,v in pairs(SurfaceCF) do
  1180. local SurfaceDist = (HitPos - v[2].p).magnitude
  1181. if SurfaceDist < ClosestDist then
  1182. ClosestDist = SurfaceDist
  1183. ClosestSurface = v
  1184. end
  1185. end
  1186. return ClosestSurface[2]
  1187. end
  1188.  
  1189.  
  1190.  
  1191. local Bullet
  1192. local HitMark
  1193. local BulletModel = workspace:FindFirstChild("Ray_Ignore") or Instance.new("Model", workspace)
  1194. BulletModel.Name = "Ray_Ignore"
  1195. spawn(function()
  1196. while true do
  1197. BulletModel.Parent = game.Workspace
  1198. wait(1 / 20)
  1199. end
  1200. end)
  1201.  
  1202. local Ray_Ignore = {Character, BulletModel, Camera}
  1203.  
  1204. function CreateBullet()
  1205.  
  1206. local Origin = Tool.FirePart.Position
  1207. local Direction = Tool.FirePart.CFrame.lookVector
  1208. local BulletCF = CFrame.new(Origin, Origin + Direction)
  1209.  
  1210. Bullet = Instance.new("Part")
  1211. game.Debris:AddItem(Bullet, 3)
  1212. Bullet.Name = "Bullet"
  1213. Bullet.Shape = Enum.PartType.Ball
  1214. Bullet.Size = Vector3.new(0.2, 0.2, 0.2)
  1215. Bullet.TopSurface = "Smooth"
  1216. Bullet.BottomSurface = "Smooth"
  1217. Bullet.BrickColor = BrickColor.new("Bright yellow")
  1218. Bullet.Material = "Neon"
  1219. Bullet.Transparency = 0
  1220. Bullet.CanCollide = false
  1221. Bullet.CFrame = Tool.FirePart.CFrame + (Tool.FirePart.CFrame.p - Tool.FirePart.CFrame.p)
  1222. Bullet.CFrame = CFrame.new(Tool.FirePart.CFrame.p, Tool.FirePart.CFrame.p + Tool.FirePart.CFrame.lookVector)
  1223. local BM = Instance.new("SpecialMesh", Bullet)
  1224. BM.MeshType = "Brick"
  1225. BM.Scale = Vector3.new(0.2,0.2,25)
  1226. local BulletMass = Bullet.Size.X * Bullet.Size.Y * Bullet.Size.Z
  1227. local BF = Instance.new("BodyForce")
  1228. BF.force = Vector3.new(0, BulletMass * (65 - GunSetup.BDrop), 0)
  1229. BF.Parent = Bullet
  1230. Bullet.Velocity = Direction * 1000
  1231. Bullet.CFrame = BulletCF + Direction
  1232.  
  1233. if GunSetup.BSpeed >= 343 then
  1234. local BulletWhizz = Instance.new("Sound")
  1235. BulletWhizz.Parent = Bullet
  1236. BulletWhizz.Pitch = 1
  1237. BulletWhizz.Looped = true
  1238. BulletWhizz.EmitterSize = 25
  1239. BulletWhizz.MaxDistance = 500
  1240. BulletWhizz.SoundId = "rbxassetid://151284431"
  1241. BulletWhizz:Play()
  1242. end
  1243.  
  1244. return Bullet
  1245.  
  1246. end
  1247.  
  1248. function CreateBulletImpact(HitPos, HitObj, HumanoidFound)
  1249. local SurfaceCF = GetHitSurfaceCFrame(HitPos, HitObj)
  1250. local SurfaceDir = CFrame.new(HitObj.CFrame.p, SurfaceCF.p)
  1251. local SurfaceDist = SurfaceDir.lookVector * (HitObj.CFrame.p - SurfaceCF.p).magnitude / 2
  1252. local SurfaceOffset = HitPos - SurfaceCF.p + SurfaceDist
  1253. local SurfaceCFrame = SurfaceDir + SurfaceDist + SurfaceOffset
  1254.  
  1255. HitMark = Instance.new("Part")
  1256. HitMark.BrickColor = BrickColor.new("Black")
  1257. HitMark.Transparency = 1
  1258. HitMark.Anchored = true
  1259. HitMark.CanCollide = false
  1260. HitMark.FormFactor = "Custom"
  1261. HitMark.Size = Vector3.new(math.random(1,1.5), math.random(1,1.5), 0.2)
  1262. HitMark.TopSurface = 0
  1263. HitMark.BottomSurface = 0
  1264. local Mesh = Instance.new("BlockMesh")
  1265. Mesh.Offset = Vector3.new(0, 0, -0.05)
  1266. Mesh.Scale = Vector3.new(-0.25, -0.25, 0)
  1267. Mesh.Parent = HitMark
  1268.  
  1269. local mat = HitObj.Material
  1270.  
  1271. if mat == Enum.Material.Wood or mat == Enum.Material.WoodPlanks then
  1272. local BulletWhizz = Instance.new("Sound")
  1273. BulletWhizz.Parent = HitMark
  1274. BulletWhizz.Pitch = BulletWhizz.Pitch * math.random(34, 46)/40
  1275. BulletWhizz.SoundId = "rbxassetid://142082171"
  1276. BulletWhizz:Play()
  1277.  
  1278. if game.ReplicatedStorage:FindFirstChild("Dust" or "Smoke") then
  1279. local D1 = game.ReplicatedStorage.Dust:clone()
  1280. D1.Parent = HitMark
  1281. D1.Enabled = true
  1282. end
  1283.  
  1284.  
  1285. local Decal = Instance.new("Decal")
  1286. Decal.Face = Enum.NormalId.Front
  1287. Decal.Texture = "http://www.roblox.com/asset/?id=64291961"
  1288. Decal.Parent = HitMark
  1289. HitMark.Parent = BulletModel
  1290. HitMark.CFrame = SurfaceCFrame
  1291. local Particles = Instance.new("ParticleEmitter")
  1292. Particles.Color = ColorSequence.new(Color3.new(255, 255, 255))
  1293. Particles.LightEmission = 0
  1294. Particles.Size = NumberSequence.new(0.25)
  1295. Particles.Texture = "http://www.roblox.com/asset/?id=434255560"
  1296. Particles.Transparency = NumberSequence.new(
  1297. {
  1298. NumberSequenceKeypoint.new(0, 0.25, 0.25);
  1299. NumberSequenceKeypoint.new(1, 1);
  1300. }
  1301. )
  1302. Particles.Acceleration = Vector3.new(0, -196.2, 0)
  1303. Particles.Lifetime = NumberRange.new(0.25 - 0.05, 0.25 + 0.15)
  1304. Particles.Rate = 500
  1305. Particles.RotSpeed = NumberRange.new(360)
  1306. Particles.Speed = NumberRange.new(25 - 0, 25 + 0)
  1307. Particles.VelocitySpread = 45
  1308. Particles.Parent = HitMark
  1309. Particles.EmissionDirection = "Top"
  1310. game.Debris:AddItem(Particles, 0.2)
  1311. game.Debris:AddItem(HitMark, 0.95)
  1312.  
  1313. elseif mat == Enum.Material.Plastic and HitObj.Name == "Head" or HitObj.Name == "Torso" or HitObj.Name == "Right Arm" or HitObj.Name == "Left Arm" or HitObj.Name == "Right Leg" or HitObj.Name == "Left Leg" then
  1314.  
  1315. local BulletWhizz = Instance.new("Sound")
  1316. BulletWhizz.Parent = HitMark
  1317. BulletWhizz.Pitch = BulletWhizz.Pitch * math.random(34, 46)/40
  1318. BulletWhizz.SoundId = "rbxassetid://330595293"
  1319. BulletWhizz:Play()
  1320.  
  1321. local Decal = Instance.new("Decal")
  1322. Decal.Face = Enum.NormalId.Front
  1323. Decal.Texture = "http://www.roblox.com/asset/?id=112969718"
  1324. Decal.Parent = HitMark
  1325. HitMark.Parent = BulletModel
  1326. HitMark.CFrame = SurfaceCFrame
  1327. local Particles = Instance.new("ParticleEmitter")
  1328. Particles.Color = ColorSequence.new(Color3.new(25, 0, 0))
  1329. Particles.LightEmission = 0
  1330. Particles.Size = NumberSequence.new(.5)
  1331. Particles.Texture = "http://www.roblox.com/asset/?id=176677966"
  1332. Particles.Transparency = NumberSequence.new(
  1333. {
  1334. NumberSequenceKeypoint.new(0, 0, 0);
  1335. NumberSequenceKeypoint.new(1, 1);
  1336. }
  1337. )
  1338. Particles.Acceleration = Vector3.new(0, 0, 0)
  1339. Particles.Lifetime = NumberRange.new(0.1 - 0.05, 0.1 + 0.05)
  1340. Particles.Rate = 500
  1341. Particles.RotSpeed = NumberRange.new(1000)
  1342. Particles.Speed = NumberRange.new(0 - 0, 0 + 0)
  1343. Particles.VelocitySpread = 0
  1344. Particles.Parent = HitMark
  1345. Particles.EmissionDirection = "Top"
  1346. game.Debris:AddItem(Particles, 0.2)
  1347. game.Debris:AddItem(HitMark, 0.95)
  1348.  
  1349.  
  1350. elseif mat == Enum.Material.Concrete or mat == Enum.Material.Slate or mat == Enum.Material.Cobblestone or mat == Enum.Material.Brick or mat == Enum.Material.Granite or mat == Enum.Material.Granite or mat == Enum.Material.Plastic or mat == Enum.Material.SmoothPlastic then
  1351. local BulletWhizz = Instance.new("Sound")
  1352. BulletWhizz.Parent = HitMark
  1353. BulletWhizz.Pitch = BulletWhizz.Pitch * math.random(34, 46)/40
  1354. BulletWhizz.SoundId = "rbxassetid://142082166"
  1355. BulletWhizz:Play()
  1356.  
  1357. if game.ReplicatedStorage:FindFirstChild("Dust" or "Smoke") then
  1358. local D1 = game.ReplicatedStorage.Dust:clone()
  1359. D1.Parent = HitMark
  1360. D1.Enabled = true
  1361. local D2 = game.ReplicatedStorage.Smoke:clone()
  1362. D2.Parent = HitMark
  1363. D2.Enabled = true
  1364. end
  1365.  
  1366. local Decal = Instance.new("Decal")
  1367. Decal.Face = Enum.NormalId.Front
  1368. Decal.Texture = "http://www.roblox.com/asset/?id=64291961"
  1369. Decal.Parent = HitMark
  1370. HitMark.Parent = BulletModel
  1371. HitMark.CFrame = SurfaceCFrame
  1372. local Particles = Instance.new("ParticleEmitter")
  1373. Particles.Color = ColorSequence.new(Color3.new(50, 50, 50))
  1374. Particles.LightEmission = 0
  1375. Particles.Size = NumberSequence.new(0.25)
  1376. Particles.Texture = "rbxasset://textures/particles/smoke_main.dds"
  1377. Particles.Transparency = NumberSequence.new(
  1378. {
  1379. NumberSequenceKeypoint.new(0, 0.25, 0.25);
  1380. NumberSequenceKeypoint.new(1, 1);
  1381. }
  1382. )
  1383. Particles.Acceleration = Vector3.new(0, -196.2, 0)
  1384. Particles.Lifetime = NumberRange.new(0.1 - 0.05, 0.1 + 0.05)
  1385. Particles.Rate = 500
  1386. Particles.RotSpeed = NumberRange.new(360)
  1387. Particles.Speed = NumberRange.new(25 - 5, 25 + 5)
  1388. Particles.VelocitySpread = 45
  1389. Particles.Parent = HitMark
  1390. Particles.EmissionDirection = "Top"
  1391. game.Debris:AddItem(Particles, 0.2)
  1392. game.Debris:AddItem(HitMark, 0.95)
  1393.  
  1394. elseif mat == Enum.Material.Grass or mat == Enum.Material.Sand then
  1395. local BulletWhizz = Instance.new("Sound")
  1396. BulletWhizz.Parent = HitMark
  1397. BulletWhizz.Pitch = BulletWhizz.Pitch * math.random(34, 46)/40
  1398. BulletWhizz.SoundId = "rbxassetid://133758545"
  1399. BulletWhizz:Play()
  1400.  
  1401. if game.ReplicatedStorage:FindFirstChild("Dust" or "Smoke") then
  1402. local D1 = game.ReplicatedStorage.Dust:clone()
  1403. D1.Parent = HitMark
  1404. D1.Enabled = true
  1405. local D2 = game.ReplicatedStorage.Smoke:clone()
  1406. D2.Parent = HitMark
  1407. D2.Enabled = true
  1408. end
  1409.  
  1410. if game.ReplicatedStorage:FindFirstChild("Dust" or "Smoke") then
  1411. local D1 = game.ReplicatedStorage.Dust:clone()
  1412. D1.Parent = HitMark
  1413. D1.Enabled = true
  1414. local D2 = game.ReplicatedStorage.Smoke:clone()
  1415. D2.Parent = HitMark
  1416. D2.Enabled = true
  1417. end
  1418.  
  1419. local Decal = Instance.new("Decal")
  1420. Decal.Face = Enum.NormalId.Front
  1421. Decal.Texture = "http://www.roblox.com/asset/?id=64291961"
  1422. Decal.Parent = HitMark
  1423. HitMark.Parent = BulletModel
  1424. HitMark.CFrame = SurfaceCFrame
  1425. local Particles = Instance.new("ParticleEmitter")
  1426. Particles.Color = ColorSequence.new(Color3.new(50, 50, 50))
  1427. Particles.LightEmission = 0
  1428. Particles.Size = NumberSequence.new(0.25)
  1429. Particles.Texture = "rbxasset://textures/particles/smoke_main.dds"
  1430. Particles.Transparency = NumberSequence.new(
  1431. {
  1432. NumberSequenceKeypoint.new(0, 0.25, 0.25);
  1433. NumberSequenceKeypoint.new(1, 1);
  1434. }
  1435. )
  1436. Particles.Acceleration = Vector3.new(0, -196.2, 0)
  1437. Particles.Lifetime = NumberRange.new(0.1 - 0.05, 0.1 + 0.05)
  1438. Particles.Rate = 500
  1439. Particles.RotSpeed = NumberRange.new(360)
  1440. Particles.Speed = NumberRange.new(25 - 5, 25 + 5)
  1441. Particles.VelocitySpread = 45
  1442. Particles.Parent = HitMark
  1443. Particles.EmissionDirection = "Top"
  1444. game.Debris:AddItem(Particles, 0.2)
  1445. game.Debris:AddItem(HitMark, 0.95)
  1446.  
  1447. elseif mat == Enum.Material.CorrodedMetal or mat == Enum.Material.Metal or mat == Enum.Material.DiamondPlate then
  1448. local BulletWhizz = Instance.new("Sound")
  1449. BulletWhizz.Parent = HitMark
  1450. BulletWhizz.Pitch = BulletWhizz.Pitch * math.random(34, 46)/40
  1451. BulletWhizz.SoundId = "rbxassetid://142082170"
  1452. BulletWhizz:Play()
  1453.  
  1454. local Decal = Instance.new("Decal")
  1455. Decal.Face = Enum.NormalId.Front
  1456. Decal.Texture = "http://www.roblox.com/asset/?id=64291961"
  1457. Decal.Parent = HitMark
  1458. HitMark.Parent = BulletModel
  1459. HitMark.CFrame = SurfaceCFrame
  1460. local Particles = Instance.new("ParticleEmitter")
  1461. Particles.Color = ColorSequence.new(Color3.new(255, 200, 0))
  1462. Particles.LightEmission = 1
  1463. Particles.Size = NumberSequence.new(0.075)
  1464. Particles.Texture = "http://www.roblox.com/asset/?id=416917683"
  1465. Particles.Transparency = NumberSequence.new(
  1466. {
  1467. NumberSequenceKeypoint.new(0, 0.25, 0.25);
  1468. NumberSequenceKeypoint.new(1, 1);
  1469. }
  1470. )
  1471. Particles.Acceleration = Vector3.new(0, -196.2, 0)
  1472. Particles.Lifetime = NumberRange.new(0.1 - 0.05, 0.1 + 0.05)
  1473. Particles.Rate = 500
  1474. Particles.RotSpeed = NumberRange.new(360)
  1475. Particles.Speed = NumberRange.new(25 - 5, 25 + 5)
  1476. Particles.VelocitySpread = 45
  1477. Particles.Parent = HitMark
  1478. Particles.EmissionDirection = "Top"
  1479. game.Debris:AddItem(Particles, 0.2)
  1480. game.Debris:AddItem(HitMark, 0.95)
  1481.  
  1482.  
  1483. else
  1484. local BulletWhizz = Instance.new("Sound")
  1485. BulletWhizz.Parent = HitMark
  1486. BulletWhizz.Pitch = BulletWhizz.Pitch * math.random(34, 46)/40
  1487. BulletWhizz.SoundId = "rbxassetid://142082166"
  1488. BulletWhizz:Play()
  1489. end
  1490.  
  1491.  
  1492.  
  1493. end
  1494.  
  1495.  
  1496.  
  1497.  
  1498. --rocket.Touched:connect(function(hit)
  1499.  
  1500. function EjectShells()
  1501. shell = Shell:clone()
  1502. shell.CFrame = Tool.Chamber.CFrame * CFrame.fromEulerAnglesXYZ(2.5,1,1.25)
  1503. shell.Velocity = Tool.Chamber.CFrame.lookVector * 20 + Vector3.new(0,10,0)
  1504. shell.RotVelocity = Vector3.new(-10,40,30)
  1505. shell.Parent = BulletModel
  1506. game:GetService("Debris"):addItem(shell,0.125)
  1507. print("Ejecting Shell")
  1508.  
  1509. end
  1510. local connection
  1511.  
  1512. function M203()
  1513. if GunSetup.GrenadeLauncher == true then
  1514. Tool.Handle.M203:Play()
  1515. local M203 = game.ReplicatedStorage.M203["M203"]:clone()
  1516. M203.Parent = game.Workspace
  1517. M203.CFrame = Tool.FirePart2.CFrame*CFrame.new(.15,-0.7,-5.5)
  1518.  
  1519. if GunSetup.M203Ammo == 1 then
  1520. M203.Velocity = Tool.FirePart2.CFrame.lookVector*(500-196.2)
  1521. end
  1522. if GunSetup.M203Ammo == 2 then
  1523. M203.Velocity = Tool.FirePart2.CFrame.lookVector*(575-196.2)
  1524. end
  1525.  
  1526. if GunSetup.M203Ammo == 1 then
  1527. local Explosion =Instance.new("Explosion")
  1528. Explosion.BlastRadius=15
  1529. Explosion.BlastPressure=0
  1530. damage = math.random(80,120)
  1531. M203.Touched:connect(function(Hit)
  1532. Explosion.Hit:connect(Damage)
  1533. Explosion.Position= M203.Position
  1534.  
  1535. Explosion.Parent=game.Workspace
  1536. M203:remove()
  1537. end)
  1538. end
  1539. if GunSetup.M203Ammo == 2 then
  1540. local Smoke = M203.Smoke
  1541. M203.Touched:connect(function(Hit)
  1542.  
  1543. Smoke.Enabled = true
  1544. M203.Velocity = Camera.CoordinateFrame.lookVector*0
  1545. wait(9.5)
  1546. Smoke.Enabled = false
  1547. wait(1.5)
  1548. M203:remove()
  1549. end)
  1550. end
  1551. end
  1552. end
  1553.  
  1554. function Raycasting()
  1555. local Hit,Pos
  1556. local Position0 = Bullet.Position;
  1557. local Position1 = Bullet.Position;
  1558. local Distance = 0
  1559. while true do
  1560. RS.RenderStepped:wait()
  1561. if Distance > 1500 then
  1562. Bullet:Destroy()
  1563. break
  1564. end
  1565. Position1 = Bullet.Position;
  1566. Distance = Distance + (Position1 - Position0).magnitude
  1567. Hit, Pos = workspace:FindPartOnRayWithIgnoreList(Ray.new(Position0,(Position1 - Position0)), Ray_Ignore);
  1568.  
  1569. if Hit then
  1570. Bullet:Destroy()
  1571.  
  1572. local hitHumanoid = ( Hit.Parent:IsA( "Accessory" ) and Hit.Parent.Parent:FindFirstChild( "Humanoid" ) or Hit.Parent:FindFirstChild( "Humanoid" ) );
  1573. local c = Instance.new("ObjectValue");
  1574. c.Name = "creator";
  1575. c.Value = Player;
  1576. game.Debris:AddItem(c, 3);
  1577. c.Parent = hitHumanoid;
  1578. local hitPlyr = ( hitHumanoid and game.Players:GetPlayerFromCharacter( hitHumanoid.Parent ) );
  1579. if not hitHumanoid then
  1580. CreateBulletImpact(Pos,Hit,false)
  1581. if game.ReplicatedStorage:FindFirstChild("Smoke") then
  1582. local D2 = game.ReplicatedStorage.Smoke:clone()
  1583. D2.Parent = HitMark
  1584. D2.Enabled = true
  1585. end
  1586. elseif hitHumanoid then
  1587. if game.ReplicatedStorage:FindFirstChild("Blood") then
  1588. local D2 = game.ReplicatedStorage.Blood:clone()
  1589. D2.Parent = HitMark
  1590. D2.Enabled = true
  1591. end
  1592. CreateBulletImpact(Pos,Hit,true)
  1593. end
  1594.  
  1595. if hitPlyr then
  1596. local isEnemy;
  1597. if GunSetup.ATK then
  1598. isEnemy = ( hitPlyr.TeamColor ~= Player.TeamColor or hitPlyr.Neutral );
  1599. elseif not GunSetup.ATK then
  1600. isEnemy = (hitPlyr.TeamColor == Player.TeamColor or hitPlyr.TeamColor ~= Player.TeamColor or hitPlyr.Neutral );
  1601. end
  1602. if isEnemy and Hit.Name == "Head" then
  1603. hitHumanoid:TakeDamage( GunSetup.HeadDamage );
  1604. elseif isEnemy and Hit.Name ~= "Head" then
  1605. hitHumanoid:TakeDamage( GunSetup.Damage);
  1606. elseif isEnemy and Hit.Name == "Chest" then
  1607. hitHumanoid:TakeDamage( GunSetup.Damage);
  1608. elseif isEnemy and Hit:IsA("Accessory") or Hit:IsA("Hat") and Hit.Parent.Parent:FindFirstChild("Humanoid") then
  1609. Hit.Parent.Parent:FindFirstChild("Humanoid"):TakeDamage(GunSetup.HeadDamage);
  1610. end
  1611.  
  1612. elseif hitHumanoid and Hit.Name == "Head" then
  1613. hitHumanoid:TakeDamage( GunSetup.HeadDamage );
  1614. elseif hitHumanoid and Hit.Name ~= "Head" then
  1615. hitHumanoid:TakeDamage( GunSetup.Damage );
  1616. elseif hitHumanoid and Hit.Name == "Chest" then
  1617. hitHumanoid:TakeDamage( GunSetup.VestDamage );
  1618. elseif hitHumanoid and Hit:IsA("Accessory") or Hit:IsA("Hat") or Hit.Name == "Face" and Hit.Parent.Parent:FindFirstChild("Humanoid") then
  1619. Hit.Parent.Parent:FindFirstChild("Humanoid"):TakeDamage( GunSetup.HeadDamage);
  1620. end
  1621. print(Hit.Name)
  1622. return Hit, Pos;
  1623. end
  1624. Position0 = Position1;
  1625. end
  1626. end
  1627.  
  1628.  
  1629. function Damage(Targ)
  1630. local humanoid=Targ.Parent:FindFirstChild("Humanoid")
  1631. if Targ.Parent:FindFirstChild("Humanoid") then
  1632. -- for i,v in ipairs(humanoids) do
  1633. -- if v==targ.Parent.Humanoid then
  1634. -- return
  1635. -- end
  1636. -- end
  1637. -- table.insert(humanoids,targ.Parent.Humanoid)
  1638. Targ.Parent.Humanoid:TakeDamage(damage)
  1639. end
  1640. end
  1641.  
  1642.  
  1643.  
  1644.  
  1645. function shoot()
  1646.  
  1647. local move = (Tool.FirePart.CFrame * CFrame.Angles(math.rad(math.random(-GunSetup.BSpread, GunSetup.BSpread)/10), math.rad(math.random(-GunSetup.BSpread, GunSetup.BSpread)/10), math.rad(math.random(-GunSetup.BSpread, GunSetup.BSpread)/10))).lookVector * 450
  1648. local from = Tool.FirePart.Position
  1649. local ray = Ray.new(from,move-Vector3.new(0, GunSetup.BDrop*0.05, 0))
  1650. local Hit,Pos = workspace:FindPartOnRayWithIgnoreList(ray, Ray_Ignore)
  1651. local HumanoidFound = false
  1652.  
  1653.  
  1654. CreateBullet()
  1655.  
  1656.  
  1657. local humanoid
  1658. if Hit then
  1659. CreateBulletImpact(Pos, Hit, HumanoidFound)
  1660.  
  1661. if Hit.Parent.Name == "Chest" then
  1662. if Hit.Parent.Parent:FindFirstChild("Humanoid") then
  1663. humanoid = Hit.Parent.Parent:FindFirstChild("Humanoid")
  1664. local c = Instance.new("ObjectValue")
  1665. c.Name = "creator"
  1666. c.Value = Player
  1667. game.Debris:AddItem(c, 3)
  1668. c.Parent = humanoid
  1669. humanoid:TakeDamage(GunSetup.VestDamage)
  1670. HumanoidFound = true
  1671.  
  1672. end
  1673.  
  1674. elseif Hit.Parent:IsA("Hat") or Hit.Parent:IsA("Accessory") then
  1675. if Hit.Parent.Parent:FindFirstChild("Humanoid") then
  1676. humanoid = Hit.Parent.Parent:FindFirstChild("Humanoid")
  1677. local c = Instance.new("ObjectValue")
  1678. c.Name = "creator"
  1679. c.Value = Player
  1680. game.Debris:AddItem(c, 3)
  1681. c.Parent = humanoid
  1682. local d = math.random(GunSetup.HeadDamage[1], GunSetup.HeadDamage[2])
  1683. humanoid:TakeDamage(d)
  1684. HumanoidFound = true
  1685.  
  1686. end
  1687. elseif Hit.Parent.Name=="Face" then
  1688. if Hit.Parent.Parent:FindFirstChild("Humanoid") then
  1689. humanoid = Hit.Parent.Parent:FindFirstChild("Humanoid")
  1690. local c = Instance.new("ObjectValue")
  1691. c.Name = "creator"
  1692. c.Value = Player
  1693. game.Debris:AddItem(c, 3)
  1694. c.Parent = humanoid
  1695. humanoid:TakeDamage(GunSetup.HelmetDamage)
  1696. HumanoidFound = true
  1697.  
  1698. end
  1699. end
  1700. if Hit.Parent:FindFirstChild("Humanoid") and Hit.Name == "Head" then
  1701. humanoid = Hit.Parent:FindFirstChild("Humanoid")
  1702. local c = Instance.new("ObjectValue")
  1703. c.Name = "creator"
  1704. c.Value = Player
  1705. game.Debris:AddItem(c, 3)
  1706. c.Parent = humanoid
  1707. local d = math.random(GunSetup.HeadDamage[1], GunSetup.HeadDamage[2])
  1708. humanoid:TakeDamage(d)
  1709. HumanoidFound = true
  1710.  
  1711. elseif Hit.Parent:FindFirstChild("Humanoid") and Hit.Name == "Torso" then
  1712. humanoid = Hit.Parent:FindFirstChild("Humanoid")
  1713. local c = Instance.new("ObjectValue")
  1714. c.Name = "creator"
  1715. c.Value = Player
  1716. game.Debris:AddItem(c, 3)
  1717. c.Parent = humanoid
  1718. local d = math.random(GunSetup.TorsoDamage[1], GunSetup.TorsoDamage[2])
  1719. humanoid:TakeDamage(d)
  1720. HumanoidFound = true
  1721.  
  1722. elseif Hit.Parent:FindFirstChild("Humanoid") and Hit.Name == "Right Arm" or Hit.Name == "Left Arm" or Hit.Name == "Right Leg" or Hit.Name == "Left Leg" then
  1723. humanoid = Hit.Parent:FindFirstChild("Humanoid")
  1724. local c = Instance.new("ObjectValue")
  1725. c.Name = "creator"
  1726. c.Value = Player
  1727. game.Debris:AddItem(c, 3)
  1728. c.Parent = humanoid
  1729. local d = math.random(GunSetup.LimbsDamage[1], GunSetup.LimbsDamage[2])
  1730. humanoid:TakeDamage(d)
  1731. HumanoidFound = true
  1732.  
  1733. end
  1734. end
  1735.  
  1736. Tool.FirePart.Fire:Play()
  1737. RecoilG = math.rad(math.random(GunSetup.Recoil[1],GunSetup.Recoil[1])/10 * Rand(1, 1.5, 0.1))--(GunSettings.Recoil*math.random(1,4))
  1738. Recoilup = RecoilG/2
  1739. print(RecoilG)
  1740. for i = Recoil, Recoil*Recoil do
  1741. Recoilup = Recoilup * math.abs(Recoil) * math.random(-i,i)
  1742. end
  1743.  
  1744. for _, v in pairs(Tool.FirePart:GetChildren()) do
  1745. if v.Name:sub(1, 7) == "FlashFX" or v.Name:sub(1, 7) == "Smoke" then
  1746. v.Enabled = true
  1747. end
  1748. end
  1749.  
  1750. delay(1 / 30, function()
  1751. for _, v in pairs(Tool.FirePart:GetChildren()) do
  1752. if v.Name:sub(1, 7) == "FlashFX" or v.Name:sub(1, 7) == "Smoke" then
  1753. v.Enabled = false
  1754. Recoilup = 0
  1755. end
  1756. end
  1757. end)
  1758.  
  1759.  
  1760. coroutine.resume(coroutine.create(function()
  1761. local r = math.abs(Recoilup)/3
  1762. local r2 = math.abs(Recoilup)/12
  1763. local r3 = math.abs(Recoilup)/14
  1764. if _G.Crouched then
  1765. r = r2
  1766. elseif _G.Proned then
  1767. r = r3
  1768. end
  1769. local ran = math.random(-1, 1)
  1770. Camera.CoordinateFrame = CFrame.new(Camera.Focus.p) * (Camera.CoordinateFrame - Camera.CoordinateFrame.p) * CFrame.Angles(r, 0, 0) * CFrame.new(0, 0, (Camera.Focus.p - Camera.CoordinateFrame.p).magnitude)
  1771. local c = -r/20
  1772. local cx = -(r*ran)/20
  1773. for i = 1, math.random(15, 25) do
  1774. if EquipId == curId then
  1775. Camera.CoordinateFrame = CFrame.new(Camera.Focus.p) * (Camera.CoordinateFrame - Camera.CoordinateFrame.p) * CFrame.Angles(c, 0, 0) * CFrame.new(0, 0, (Camera.Focus.p - Camera.CoordinateFrame.p).magnitude)
  1776. wait()
  1777.  
  1778. else
  1779. break
  1780. end
  1781.  
  1782. end
  1783. end))
  1784.  
  1785.  
  1786. -- Bullet Creation
  1787.  
  1788. EjectShells()
  1789. AmmoGui.Frame.AText.Text = Ammo
  1790. print(Ammo)
  1791.  
  1792. end
  1793.  
  1794.  
  1795.  
  1796.  
  1797. ------------Some Random Functions----------------
  1798.  
  1799. local Btype = script.BType
  1800. Btype.Value = GunSetup.BType
  1801.  
  1802. function Checar()
  1803. CheckAnim()
  1804. end
  1805.  
  1806. function Emperrar()
  1807. if GunSetup.CanBreak == true then
  1808. local Jam = math.random(200)
  1809. print("Chance de emperrar: "..Jam)
  1810. if Jam <= 2 then
  1811. Emperrado = true
  1812. end
  1813. end
  1814. end
  1815.  
  1816. ------------Shooting Function--------------------
  1817.  
  1818.  
  1819. Mouse.Button1Down:connect(function()
  1820. if Equipped then
  1821. if Safemode or slideback then return end
  1822. MouseHeld = true
  1823. if GetAmmo() == 0 or MagOut and GunSetup.FireMode ~= "M203" then
  1824. Tool.Handle.Click:Play()
  1825. Chambered = false
  1826. end
  1827.  
  1828. if Emperrado or not Chambered and GunSetup.FireMode ~= "M203" then
  1829. Tool.Handle.Click:Play()
  1830. return
  1831. end
  1832.  
  1833. if not Shooting and not Reloading and not GLReloading or Sprinting and not Emperrado and not Checando then
  1834. Shooting = true
  1835. if GunSetup.FireMode == "Single" and GetAmmo() > 0 and not Checando then
  1836. shoot()
  1837. Emperrar()
  1838. Ammo = Ammo - 1
  1839. GetAmmo()
  1840. wait(Firerate)
  1841. elseif GunSetup.FireMode == "Automatic" then
  1842. while MouseHeld and Equipped and Shooting and not Emperrado and GetAmmo() > 0 and not Checando do
  1843. shoot()
  1844. Emperrar()
  1845. Ammo = Ammo - 1
  1846. GetAmmo()
  1847. wait(Firerate)
  1848. end
  1849. elseif GunSetup.FireMode == "Burst" and GetAmmo() > 0 and not Checando then
  1850. for i = 1, GunSetup.BurstFire do
  1851. if GetAmmo() < 1 then
  1852. break
  1853. end
  1854. shoot()
  1855. Emperrar()
  1856. Ammo = Ammo - 1
  1857. GetAmmo()
  1858. wait(BURSTFirerate)
  1859. end
  1860. elseif GunSetup.FireMode == "M203" and GLAmmo.Value > 0 and GLChambered and not Checando then
  1861. M203()
  1862. GLChambered = false
  1863. GLAmmo.Value = GLAmmo.Value - 1
  1864. wait(GLFirerate)
  1865. end
  1866. Shooting = false
  1867. end
  1868. end
  1869. end)
  1870.  
  1871.  
  1872. Mouse.Button1Up:connect(function()
  1873. if Equipped then
  1874. MouseHeld = false
  1875. end
  1876. end)
  1877.  
  1878.  
  1879.  
  1880. ----------------Mouse Function---------------------------
  1881.  
  1882. Mouse.KeyDown:connect(function(Key)
  1883. if Equipped then
  1884. if Key == "t" then
  1885. if not Reloading and not GLReloading and not Aiming and not Checando then
  1886. if Safemode then
  1887. Safemode = false
  1888. IdleOrSteadyAnim()
  1889. elseif not Safemode then
  1890. if MouseHeld then
  1891. MouseHeld = false
  1892. end
  1893. Safemode = true
  1894. SafetyAnim()
  1895. end
  1896. end
  1897. end
  1898. if Key:byte() == 48 then
  1899. if MouseHeld then
  1900. MouseHeld = false
  1901. end
  1902. if not Sprinting and not Reloading and not GLReloading and not Checando and not Aiming and not _G.Crouched and not _G.Proned then
  1903. Sprinting = true
  1904. SprintAnim()
  1905. end
  1906. end
  1907. if Key == "y" then
  1908. if Tool:FindFirstChild('AimPart2') ~= nil then
  1909. if EnableCycleSight then
  1910. if AimPartMode == 1 then
  1911. AimPartMode = 2
  1912. if Aiming then
  1913. tweenJoint(RAW, RAW.C0 * CFrame.new(-Tool.AimPart2.CFrame:toObjectSpace(Character.Head.CFrame).p), nil, function(X) return math.sin(math.rad(X)) end, 0.25)
  1914. tweenJoint(LAW, GunSetup.LeftAim2Position , nil, function(X) return math.sin(math.rad(X)) end, 0.25)
  1915. tweenFoV(GunSetup.FOV2, 60)
  1916. end
  1917. elseif AimPartMode == 2 then
  1918. AimPartMode = 1
  1919. if Aiming then
  1920. tweenJoint(RAW, RAW.C0 * CFrame.new(-Tool.AimPart.CFrame:toObjectSpace(Character.Head.CFrame).p), nil, function(X) return math.sin(math.rad(X)) end, 0.25)
  1921. tweenJoint(LAW, GunSetup.LeftAimPosition , nil, function(X) return math.sin(math.rad(X)) end, 0.25)
  1922. tweenFoV(GunSetup.FOV1, 60)
  1923. end
  1924. end
  1925. end
  1926. end
  1927. end
  1928. if Key == "f" then
  1929. if EnableFireMode then
  1930. if MouseHeld then
  1931. MouseHeld = false
  1932. end
  1933. if GunSetup.FireMode == "Automatic" then
  1934. if GunSetup.SwitchableModes.Burst then
  1935. GunSetup.FireMode = "Burst"
  1936. Tool.Handle.SafetyClick:Play()
  1937. elseif GunSetup.SwitchableModes.Single then
  1938. GunSetup.FireMode = "Single"
  1939. Tool.Handle.SafetyClick:Play()
  1940. end
  1941. elseif GunSetup.FireMode == "Burst" then
  1942. if GunSetup.SwitchableModes.Single then
  1943. GunSetup.FireMode = "Single"
  1944. Tool.Handle.SafetyClick:Play()
  1945. elseif GunSetup.SwitchableModes.Automatic then
  1946. GunSetup.FireMode = "Automatic"
  1947. Tool.Handle.SafetyClick:Play()
  1948. end
  1949. elseif GunSetup.FireMode == "Single" then
  1950. if GunSetup.SwitchableModes.Automatic then
  1951. GunSetup.FireMode = "Automatic"
  1952. Tool.Handle.SafetyClick:Play()
  1953. elseif GunSetup.SwitchableModes.Burst then
  1954. GunSetup.FireMode = "Burst"
  1955. Tool.Handle.SafetyClick:Play()
  1956. end
  1957. end
  1958. -- if GunSetup.FireMode == "Automatic" then
  1959. -- GunSetup.FireMode = "Single"
  1960. -- Tool.Handle.SafetyClick:Play()
  1961. -- elseif GunSetup.FireMode == "Single" then
  1962. -- GunSetup.FireMode = "Burst"
  1963. -- Tool.Handle.SafetyClick:Play()
  1964. -- elseif GunSetup.FireMode == "Burst" then
  1965. -- GunSetup.FireMode = "Automatic"
  1966. -- Tool.Handle.SafetyClick:Play()
  1967. -- end
  1968. end
  1969.  
  1970. end
  1971. if Key == "r" then
  1972. if not Reloading and not Animando and not GLReloading and StoredAmmo.Value > 0 and not Sprinting and not Aiming and Checando and not MagOut then
  1973. if MouseHeld then
  1974. MouseHeld = false
  1975. end
  1976. Reloading = true
  1977. ReloadAnim()
  1978. Reloading = false
  1979. if Checando then
  1980. CheckAnim()
  1981. elseif Safemode then
  1982. SafetyAnim()
  1983. end
  1984. end
  1985.  
  1986. end
  1987.  
  1988.  
  1989. if Key == "r" then
  1990. if GunSetup.FastReload and not Animando and not Reloading and not GLReloading and StoredAmmo.Value > 0 and not Sprinting and not Aiming and not Checando and not MagOut then
  1991. if MouseHeld then
  1992. MouseHeld = false
  1993. end
  1994. Reloading = true
  1995. FastReloadAnim()
  1996. FastBolt()
  1997. Reloading = false
  1998. if Safemode then
  1999. SafetyAnim()
  2000. end
  2001. end
  2002.  
  2003. end
  2004.  
  2005.  
  2006. if Key == "q" then
  2007. if not Reloading and not GLReloading and not Sprinting and not Aiming and not Checando then
  2008. if MouseHeld then
  2009. MouseHeld = false
  2010. end
  2011. Checando = true
  2012. CheckAnim()
  2013. AmmoGui.Frame.Some.Visible = true
  2014. AmmoGui.Frame.Btext.Visible = true
  2015. AmmoGui.Frame.FText.Visible = true
  2016. AmmoGui.Frame.SAText.Visible = true
  2017. elseif not Reloading and not GLReloading and not Sprinting and not Aiming and Checando then
  2018. if Safemode then
  2019. SafetyAnim()
  2020. Checando = false
  2021. AmmoGui.Frame.Some.Visible = false
  2022. AmmoGui.Frame.Btext.Visible = false
  2023. AmmoGui.Frame.FText.Visible = false
  2024. AmmoGui.Frame.SAText.Visible = false
  2025. else
  2026. IdleOrSteadyAnim()
  2027. Checando = false
  2028. AmmoGui.Frame.Some.Visible = false
  2029. AmmoGui.Frame.Btext.Visible = false
  2030. AmmoGui.Frame.FText.Visible = false
  2031. AmmoGui.Frame.SAText.Visible = false
  2032. end
  2033.  
  2034. end
  2035. end
  2036. end
  2037.  
  2038. if Key == "e" then
  2039. if not Animando and not Reloading and not GLReloading and not Sprinting and not Aiming and Checando and not MagOut then
  2040. if MouseHeld then
  2041. MouseHeld = false
  2042. end
  2043. if not slideback then
  2044. ChamberAnim()
  2045. slideback = true
  2046. Emperrado = false
  2047. if Ammo > 0 and Chambered and not MagOut then
  2048. EjectShells()
  2049. Ammo = Ammo - 1
  2050. print(Ammo)
  2051. end
  2052. elseif slideback then
  2053. ChamberBKAnim()
  2054. slideback = false
  2055. Chambered = true
  2056. end
  2057. end
  2058. end
  2059.  
  2060.  
  2061. if Key == "g" then
  2062. if GunSetup.GrenadeLauncher and not Checando then
  2063. if MouseHeld then
  2064. MouseHeld = false
  2065. end
  2066. if GunSetup.FireMode ~= "M203" then
  2067. Tool.Handle.SafetyClick:Play()
  2068. GunSetup.FireMode = "M203"
  2069. else
  2070. Tool.Handle.SafetyClick:Play()
  2071. GunSetup.FireMode = GunSetup.BkFM
  2072. end
  2073. end
  2074. end
  2075.  
  2076.  
  2077. if Key == "g" then
  2078. if GunSetup.GrenadeLauncher and not Animando and GLAmmo.Value > 0 and not Reloading and not GLReloading and not Sprinting and Checando and not MagOut then
  2079. if MouseHeld then
  2080. MouseHeld = false
  2081. end
  2082. GLReloading = true
  2083. GLReloadAnim()
  2084. GLReloading = false
  2085. GLChambered = true
  2086. end
  2087. end
  2088.  
  2089. if Key == "b" then
  2090. if GunSetup.CanSeeMag and not Animando and not Reloading and not GLReloading and not Sprinting and not Aiming and Checando then
  2091. if MouseHeld then
  2092. MouseHeld = false
  2093. end
  2094.  
  2095.  
  2096. if not MagOut then
  2097. MagOut = true
  2098. SeeMag()
  2099. AmmoGui.Frame.Some2.Visible = true
  2100. AmmoGui.Frame.AText.Visible = true
  2101. else
  2102. AmmoGui.Frame.Some2.Visible = false
  2103. AmmoGui.Frame.AText.Visible = false
  2104. UNSeeMag()
  2105. MagOut = false
  2106. end
  2107.  
  2108.  
  2109.  
  2110. end
  2111. end
  2112.  
  2113. end)
  2114.  
  2115.  
  2116. Mouse.KeyUp:connect(function(Key)
  2117. if Equipped then
  2118. if Key:byte() == 48 then
  2119. if MouseHeld then
  2120. MouseHeld = false
  2121. end
  2122. if Sprinting and not Aiming and not Reloading and not GLReloading and not _G.Crouched and not _G.Proned then
  2123. if not Safemode then
  2124. IdleOrSteadyAnim()
  2125. end
  2126. wait(0.25 * GunSetup.AnimSpeed)
  2127. _G.Sprinting = false
  2128. Humanoid.WalkSpeed = 16
  2129. Sprinting = false
  2130. end
  2131. end
  2132. end
  2133. end)
  2134.  
  2135. -----------------Unequiping------------
  2136.  
  2137. Character.Humanoid.Died:connect(function()
  2138. Tool.Parent = Player.Backpack
  2139. Equipped = false
  2140. Torso:WaitForChild("Right Shoulder").Part1 = Character["Right Arm"]
  2141. Torso:WaitForChild("Left Shoulder").Part1 = Character["Left Arm"]
  2142. RAW:Destroy()
  2143. LAW:Destroy()
  2144. if Aiming then
  2145. Aiming = false
  2146. end
  2147. if Reloading then
  2148. Reloading = false
  2149. end
  2150. if GLReloading then
  2151. GLReloading = false
  2152. end
  2153. if Sprinting then
  2154. Sprinting = false
  2155. end
  2156. end)
  2157.  
  2158. Tool.Unequipped:connect(function()
  2159. Equipped = false
  2160. uis.MouseIconEnabled = true
  2161. if MouseHeld then
  2162. MouseHeld = false
  2163. end
  2164. if GunSetup.FireMode == "M203" then
  2165. AmmoGui.Frame.AText.Text = GLAmmo.Value
  2166. end
  2167. if GunSetup.FireMode ~= "M203" then
  2168. AmmoGui.Frame.AText.Text = Ammo
  2169. end
  2170. Player.PlayerGui:WaitForChild("AmmoGui"):Destroy()
  2171. if Aiming then
  2172. Aiming = false
  2173. end
  2174. if Reloading then
  2175. Reloading = false
  2176. IdleOrSteadyAnim()
  2177. end
  2178. tweenFoV(70, 10)
  2179. _G.Sprinting = false
  2180. Player.CameraMode="Classic"
  2181. Torso:WaitForChild("Right Shoulder").Part1 = Character["Right Arm"]
  2182. Torso:WaitForChild("Left Shoulder").Part1 = Character["Left Arm"]
  2183. RAW:Destroy()
  2184. LAW:Destroy()
  2185.  
  2186.  
  2187. end)
  2188.  
  2189. end))
  2190. NumberValue41.Name = "Ammo"
  2191. NumberValue41.Parent = LocalScript40
  2192. NumberValue41.Value = 50
  2193. StringValue42.Name = "BType"
  2194. StringValue42.Parent = LocalScript40
  2195. NumberValue43.Name = "StoredAmmo"
  2196. NumberValue43.Parent = LocalScript40
  2197. NumberValue43.Value = 10000000000
  2198. NumberValue44.Name = "MaxAmmo"
  2199. NumberValue44.Parent = LocalScript40
  2200. NumberValue44.Value = 1e+18
  2201. NumberValue45.Name = "GLAmmo"
  2202. NumberValue45.Parent = LocalScript40
  2203. NumberValue45.Value = 10
  2204. ScreenGui46.Name = "AmmoGui"
  2205. ScreenGui46.Parent = LocalScript40
  2206. Frame47.Parent = ScreenGui46
  2207. Frame47.Transparency = 1
  2208. Frame47.Size = UDim2.new(0.0812182724, 0, 0.300000012, 0)
  2209. Frame47.Position = UDim2.new(0.899999976, 0, 0.649999976, 0)
  2210. Frame47.BackgroundColor3 = Color3.new(0, 0, 0)
  2211. Frame47.BackgroundTransparency = 1
  2212. Frame48.Name = "nao"
  2213. Frame48.Parent = Frame47
  2214. Frame48.Size = UDim2.new(1, 0, 0.100000001, 0)
  2215. Frame48.Style = Enum.FrameStyle.RobloxRound
  2216. Frame48.BackgroundColor3 = Color3.new(0, 0, 0)
  2217. TextLabel49.Name = "NText"
  2218. TextLabel49.Parent = Frame47
  2219. TextLabel49.Transparency = 1
  2220. TextLabel49.Size = UDim2.new(1, 0, 0.100000001, 0)
  2221. TextLabel49.Text = "M16A4"
  2222. TextLabel49.BackgroundColor3 = Color3.new(0, 0, 0)
  2223. TextLabel49.BackgroundTransparency = 1
  2224. TextLabel49.BorderSizePixel = 0
  2225. TextLabel49.Font = Enum.Font.SourceSansBold
  2226. TextLabel49.FontSize = Enum.FontSize.Size18
  2227. TextLabel49.TextColor3 = Color3.new(1, 1, 1)
  2228. TextLabel49.TextStrokeTransparency = 0.85000002384186
  2229. TextLabel49.TextWrapped = true
  2230. Frame50.Name = "Some"
  2231. Frame50.Parent = Frame47
  2232. Frame50.Size = UDim2.new(1, 0, 0.600000024, 0)
  2233. Frame50.Style = Enum.FrameStyle.RobloxRound
  2234. Frame50.Position = UDim2.new(0, 0, 0.400000006, 0)
  2235. Frame50.Visible = false
  2236. Frame50.BackgroundColor3 = Color3.new(0, 0, 0)
  2237. TextLabel51.Name = "FText"
  2238. TextLabel51.Parent = Frame47
  2239. TextLabel51.Transparency = 1
  2240. TextLabel51.Size = UDim2.new(1, 0, 0.100000001, 0)
  2241. TextLabel51.Text = "Automatic"
  2242. TextLabel51.Position = UDim2.new(0, 0, 0.400000006, 0)
  2243. TextLabel51.Visible = false
  2244. TextLabel51.BackgroundColor3 = Color3.new(0, 0, 0)
  2245. TextLabel51.BackgroundTransparency = 1
  2246. TextLabel51.BorderSizePixel = 0
  2247. TextLabel51.Font = Enum.Font.SourceSansBold
  2248. TextLabel51.FontSize = Enum.FontSize.Size18
  2249. TextLabel51.TextColor3 = Color3.new(1, 1, 1)
  2250. TextLabel51.TextStrokeTransparency = 0.85000002384186
  2251. TextLabel51.TextWrapped = true
  2252. TextLabel52.Name = "SAText"
  2253. TextLabel52.Parent = Frame47
  2254. TextLabel52.Transparency = 1
  2255. TextLabel52.Size = UDim2.new(1, 0, 0.25, 0)
  2256. TextLabel52.Text = "30"
  2257. TextLabel52.Position = UDim2.new(0, 0, 0.550000012, 0)
  2258. TextLabel52.Visible = false
  2259. TextLabel52.BackgroundColor3 = Color3.new(0, 0, 0)
  2260. TextLabel52.BackgroundTransparency = 1
  2261. TextLabel52.BorderSizePixel = 0
  2262. TextLabel52.Font = Enum.Font.SourceSansBold
  2263. TextLabel52.FontSize = Enum.FontSize.Size24
  2264. TextLabel52.TextColor3 = Color3.new(1, 1, 1)
  2265. TextLabel52.TextScaled = true
  2266. TextLabel52.TextStrokeTransparency = 0.85000002384186
  2267. TextLabel52.TextWrapped = true
  2268. TextLabel53.Name = "Btext"
  2269. TextLabel53.Parent = Frame47
  2270. TextLabel53.Transparency = 1
  2271. TextLabel53.Size = UDim2.new(1, 0, 0.100000001, 0)
  2272. TextLabel53.Text = "5.56x45mm"
  2273. TextLabel53.Position = UDim2.new(0, 0, 0.850000024, 0)
  2274. TextLabel53.Visible = false
  2275. TextLabel53.BackgroundColor3 = Color3.new(0, 0, 0)
  2276. TextLabel53.BackgroundTransparency = 1
  2277. TextLabel53.BorderSizePixel = 0
  2278. TextLabel53.Font = Enum.Font.SourceSansBold
  2279. TextLabel53.FontSize = Enum.FontSize.Size18
  2280. TextLabel53.TextColor3 = Color3.new(1, 1, 1)
  2281. TextLabel53.TextStrokeTransparency = 0.85000002384186
  2282. TextLabel53.TextWrapped = true
  2283. Frame54.Name = "nao"
  2284. Frame54.Parent = Frame47
  2285. Frame54.Size = UDim2.new(1, 0, 0.100000001, 0)
  2286. Frame54.Style = Enum.FrameStyle.RobloxRound
  2287. Frame54.Position = UDim2.new(0, 0, 0.150000006, 0)
  2288. Frame54.BackgroundColor3 = Color3.new(0, 0, 0)
  2289. ImageLabel55.Name = "A"
  2290. ImageLabel55.Parent = Frame47
  2291. ImageLabel55.Size = UDim2.new(0.100000001, 0, 0.0500000007, 0)
  2292. ImageLabel55.Position = UDim2.new(0.100000001, 0, 0.180000007, 0)
  2293. ImageLabel55.BackgroundColor3 = Color3.new(0, 1, 0)
  2294. ImageLabel55.Image = "rbxassetid://133293265"
  2295. ImageLabel55.ImageTransparency = 1
  2296. ImageLabel56.Name = "B"
  2297. ImageLabel56.Parent = Frame47
  2298. ImageLabel56.Size = UDim2.new(0.100000001, 0, 0.0500000007, 0)
  2299. ImageLabel56.Position = UDim2.new(0.280000001, 0, 0.180000007, 0)
  2300. ImageLabel56.BackgroundColor3 = Color3.new(1, 1, 0)
  2301. ImageLabel56.Image = "rbxassetid://133293265"
  2302. ImageLabel56.ImageTransparency = 1
  2303. ImageLabel57.Name = "C"
  2304. ImageLabel57.Parent = Frame47
  2305. ImageLabel57.Size = UDim2.new(0.100000001, 0, 0.0500000007, 0)
  2306. ImageLabel57.Position = UDim2.new(0.460000008, 0, 0.180000007, 0)
  2307. ImageLabel57.BackgroundColor3 = Color3.new(1, 0, 0)
  2308. ImageLabel57.Image = "rbxassetid://133293265"
  2309. ImageLabel57.ImageTransparency = 1
  2310. ImageLabel58.Name = "D"
  2311. ImageLabel58.Parent = Frame47
  2312. ImageLabel58.Size = UDim2.new(0.100000001, 0, 0.0500000007, 0)
  2313. ImageLabel58.Position = UDim2.new(0.819999993, 0, 0.180000007, 0)
  2314. ImageLabel58.BackgroundColor3 = Color3.new(0, 1, 1)
  2315. ImageLabel58.Image = "rbxassetid://133293265"
  2316. ImageLabel58.ImageTransparency = 1
  2317. Frame59.Name = "Some2"
  2318. Frame59.Parent = Frame47
  2319. Frame59.Size = UDim2.new(1, 0, 0.100000001, 0)
  2320. Frame59.Style = Enum.FrameStyle.RobloxRound
  2321. Frame59.Position = UDim2.new(0, 0, 0.289999992, 0)
  2322. Frame59.Visible = false
  2323. Frame59.BackgroundColor3 = Color3.new(0, 0, 0)
  2324. TextLabel60.Name = "AText"
  2325. TextLabel60.Parent = Frame47
  2326. TextLabel60.Transparency = 1
  2327. TextLabel60.Size = UDim2.new(1, 0, 0.100000001, 0)
  2328. TextLabel60.Text = "30 Bullets"
  2329. TextLabel60.Position = UDim2.new(0, 0, 0.280000001, 0)
  2330. TextLabel60.Visible = false
  2331. TextLabel60.BackgroundColor3 = Color3.new(0, 0, 0)
  2332. TextLabel60.BackgroundTransparency = 1
  2333. TextLabel60.BorderSizePixel = 0
  2334. TextLabel60.Font = Enum.Font.SourceSansBold
  2335. TextLabel60.FontSize = Enum.FontSize.Size48
  2336. TextLabel60.TextColor3 = Color3.new(1, 1, 1)
  2337. TextLabel60.TextScaled = true
  2338. TextLabel60.TextStrokeTransparency = 0.85000002384186
  2339. TextLabel60.TextWrapped = true
  2340. ImageLabel61.Name = "E"
  2341. ImageLabel61.Parent = Frame47
  2342. ImageLabel61.Size = UDim2.new(0.100000001, 0, 0.0500000007, 0)
  2343. ImageLabel61.Position = UDim2.new(0.639999986, 0, 0.180000007, 0)
  2344. ImageLabel61.BackgroundColor3 = Color3.new(1, 1, 1)
  2345. ImageLabel61.Image = "rbxassetid://133293265"
  2346. ImageLabel61.ImageTransparency = 1
  2347. Frame62.Parent = ScreenGui46
  2348. Frame62.Transparency = 0.5
  2349. Frame62.Size = UDim2.new(0, 126, 0, 10)
  2350. Frame62.Position = UDim2.new(1, -153, 1, -62)
  2351. Frame62.BackgroundColor3 = Color3.new(0.380392, 0.380392, 0.380392)
  2352. Frame62.BackgroundTransparency = 0.5
  2353. Frame62.BorderSizePixel = 3
  2354. TextLabel63.Name = "Caliber"
  2355. TextLabel63.Parent = Frame62
  2356. TextLabel63.Transparency = 1
  2357. TextLabel63.Size = UDim2.new(1, 0, 1, 0)
  2358. TextLabel63.Text = "Made by 1ndrew"
  2359. TextLabel63.BackgroundColor3 = Color3.new(0.380392, 0.380392, 0.380392)
  2360. TextLabel63.BackgroundTransparency = 1
  2361. TextLabel63.Font = Enum.Font.SourceSansBold
  2362. TextLabel63.FontSize = Enum.FontSize.Size12
  2363. TextLabel63.TextColor3 = Color3.new(0, 0, 0)
  2364. TextLabel63.TextStrokeColor3 = Color3.new(0.380392, 0.380392, 0.380392)
  2365. TextLabel63.TextStrokeTransparency = 0.5
  2366. TextLabel63.TextXAlignment = Enum.TextXAlignment.Right
  2367. Part64.Name = "Bolt"
  2368. Part64.Parent = Tool0
  2369. Part64.Material = Enum.Material.SmoothPlastic
  2370. Part64.BrickColor = BrickColor.new("Dark stone grey")
  2371. Part64.Rotation = Vector3.new(90, 0, -90)
  2372. Part64.Anchored = true
  2373. Part64.CanCollide = false
  2374. Part64.FormFactor = Enum.FormFactor.Custom
  2375. Part64.Size = Vector3.new(0.200000003, 0.402905315, 0.200000003)
  2376. Part64.CFrame = CFrame.new(36.3748398, 1.176, -67.2724762, 5.89999981e-05, 1, 0, 0, 0, -1, -1, 5.89999981e-05, 0)
  2377. Part64.BackSurface = Enum.SurfaceType.SmoothNoOutlines
  2378. Part64.BottomSurface = Enum.SurfaceType.SmoothNoOutlines
  2379. Part64.FrontSurface = Enum.SurfaceType.SmoothNoOutlines
  2380. Part64.LeftSurface = Enum.SurfaceType.SmoothNoOutlines
  2381. Part64.RightSurface = Enum.SurfaceType.SmoothNoOutlines
  2382. Part64.TopSurface = Enum.SurfaceType.SmoothNoOutlines
  2383. Part64.Color = Color3.new(0.388235, 0.372549, 0.384314)
  2384. Part64.Position = Vector3.new(36.3748398, 1.176, -67.2724762)
  2385. Part64.Orientation = Vector3.new(90, 90, 0)
  2386. Part64.Color = Color3.new(0.388235, 0.372549, 0.384314)
  2387. CylinderMesh65.Parent = Part64
  2388. CylinderMesh65.Scale = Vector3.new(0.496383131, 1, 0.979876816)
  2389. CylinderMesh65.Scale = Vector3.new(0.496383131, 1, 0.979876816)
  2390. Part66.Name = "Chamber"
  2391. Part66.Parent = Tool0
  2392. Part66.Material = Enum.Material.Metal
  2393. Part66.BrickColor = BrickColor.new("Really red")
  2394. Part66.Reflectance = 0.30000001192093
  2395. Part66.Transparency = 1
  2396. Part66.Rotation = Vector3.new(17.1999989, 0, 0)
  2397. Part66.Anchored = true
  2398. Part66.CanCollide = false
  2399. Part66.FormFactor = Enum.FormFactor.Custom
  2400. Part66.Size = Vector3.new(0.200000003, 0.200000003, 0.200000003)
  2401. Part66.CFrame = CFrame.new(36.3460007, 1.17399895, -67.4499969, 1, 6.41626975e-05, -5.65001392e-05, -7.8000623e-05, 0.955279768, -0.295703858, 3.50002811e-05, 0.295703888, 0.955279648)
  2402. Part66.BottomSurface = Enum.SurfaceType.Smooth
  2403. Part66.TopSurface = Enum.SurfaceType.Smooth
  2404. Part66.Color = Color3.new(1, 0, 0)
  2405. Part66.Position = Vector3.new(36.3460007, 1.17399895, -67.4499969)
  2406. Part66.Orientation = Vector3.new(17.1999989, 0, 0)
  2407. Part66.Color = Color3.new(1, 0, 0)
  2408. SpecialMesh67.Parent = Part66
  2409. SpecialMesh67.Scale = Vector3.new(0.800000072, 0.800000072, 0.800000072)
  2410. SpecialMesh67.MeshType = Enum.MeshType.Brick
  2411. SpecialMesh67.Scale = Vector3.new(0.800000072, 0.800000072, 0.800000072)
  2412. Model68.Name = "Shells"
  2413. Model68.Parent = Tool0
  2414. Part69.Name = "Shell"
  2415. Part69.Parent = Model68
  2416. Part69.BrickColor = BrickColor.new("Cool yellow")
  2417. Part69.Rotation = Vector3.new(-90, 0, -90)
  2418. Part69.Anchored = true
  2419. Part69.Size = Vector3.new(0.0520000011, 0.0520000011, 0.236000001)
  2420. Part69.CFrame = CFrame.new(36.375, 1.176, -67.2740021, 0, 1, 0, 0, 0, 1, 1, 0, 0)
  2421. Part69.BottomSurface = Enum.SurfaceType.Smooth
  2422. Part69.TopSurface = Enum.SurfaceType.Smooth
  2423. Part69.Color = Color3.new(0.992157, 0.917647, 0.552941)
  2424. Part69.Position = Vector3.new(36.375, 1.176, -67.2740021)
  2425. Part69.Orientation = Vector3.new(-90, -90, 0)
  2426. Part69.Color = Color3.new(0.992157, 0.917647, 0.552941)
  2427. SpecialMesh70.Parent = Part69
  2428. SpecialMesh70.MeshId = "http://www.roblox.com/Asset/?id=10207677"
  2429. SpecialMesh70.Scale = Vector3.new(0.0199999996, 0.0199999996, 0.0199999996)
  2430. SpecialMesh70.MeshType = Enum.MeshType.FileMesh
  2431. SpecialMesh70.Scale = Vector3.new(0.0199999996, 0.0199999996, 0.0199999996)
  2432. Part71.Name = "Trigger"
  2433. Part71.Parent = Tool0
  2434. Part71.Material = Enum.Material.SmoothPlastic
  2435. Part71.BrickColor = BrickColor.new("New Yeller")
  2436. Part71.Transparency = 1
  2437. Part71.Rotation = Vector3.new(0, 90, 0)
  2438. Part71.Anchored = true
  2439. Part71.CanCollide = false
  2440. Part71.FormFactor = Enum.FormFactor.Custom
  2441. Part71.Size = Vector3.new(0.200000003, 0.200000003, 0.200000003)
  2442. Part71.CFrame = CFrame.new(36.8918419, 0.830000997, -67.282486, 0, 0, 1, 0, 1, -0, -1, 0, 0)
  2443. Part71.BottomSurface = Enum.SurfaceType.Smooth
  2444. Part71.TopSurface = Enum.SurfaceType.Smooth
  2445. Part71.Color = Color3.new(1, 1, 0)
  2446. Part71.Position = Vector3.new(36.8918419, 0.830000997, -67.282486)
  2447. Part71.Orientation = Vector3.new(0, 90, 0)
  2448. Part71.Color = Color3.new(1, 1, 0)
  2449. Part72.Name = "Handle"
  2450. Part72.Parent = Tool0
  2451. Part72.Material = Enum.Material.SmoothPlastic
  2452. Part72.BrickColor = BrickColor.new("New Yeller")
  2453. Part72.Reflectance = 0.30000001192093
  2454. Part72.Transparency = 1
  2455. Part72.Rotation = Vector3.new(0, 90, 0)
  2456. Part72.Anchored = true
  2457. Part72.CanCollide = false
  2458. Part72.FormFactor = Enum.FormFactor.Custom
  2459. Part72.Size = Vector3.new(0.200000003, 0.200000003, 0.200000003)
  2460. Part72.CFrame = CFrame.new(37.1920013, 0.580000997, -67.4820023, 0, -2.70000019e-05, 1.00000024, 0, 1.00000024, 2.70000019e-05, -1, 0, 0)
  2461. Part72.BottomSurface = Enum.SurfaceType.Smooth
  2462. Part72.TopSurface = Enum.SurfaceType.Smooth
  2463. Part72.Color = Color3.new(1, 1, 0)
  2464. Part72.Position = Vector3.new(37.1920013, 0.580000997, -67.4820023)
  2465. Part72.Orientation = Vector3.new(0, 90, 0)
  2466. Part72.Color = Color3.new(1, 1, 0)
  2467. Sound73.Name = "Click"
  2468. Sound73.Parent = Part72
  2469. Sound73.SoundId = "rbxassetid://132464034"
  2470. Sound74.Name = "FireSound"
  2471. Sound74.Parent = Part72
  2472. Sound74.Pitch = 0.94999998807907
  2473. Sound74.SoundId = "rbxassetid://258085548"
  2474. Sound74.Volume = 1
  2475. Sound75.Name = "MagIn"
  2476. Sound75.Parent = Part72
  2477. Sound75.Pitch = 0.92500001192093
  2478. Sound75.SoundId = "rbxassetid://269079412"
  2479. Sound75.Volume = 1
  2480. Sound76.Name = "MagOut"
  2481. Sound76.Parent = Part72
  2482. Sound76.Pitch = 0.89999997615814
  2483. Sound76.SoundId = "rbxassetid://268870109"
  2484. Sound76.Volume = 1
  2485. Sound77.Name = "ReloadSound"
  2486. Sound77.Parent = Part72
  2487. Sound77.SoundId = "rbxassetid://147323220"
  2488. Sound77.Volume = 0.80000001192093
  2489. Sound78.Name = "Running"
  2490. Sound78.Parent = Part72
  2491. Sound78.Pitch = 0.97500002384186
  2492. Sound78.SoundId = "http://www.roblox.com/asset/?id=246376673"
  2493. Sound78.Volume = 1
  2494. Sound78.Looped = true
  2495. Sound79.Name = "SafetyClick"
  2496. Sound79.Parent = Part72
  2497. Sound79.Pitch = 1.5
  2498. Sound79.SoundId = "rbxassetid://132464034"
  2499. Sound79.Volume = 0.30000001192093
  2500. Sound80.Name = "WindowBreak"
  2501. Sound80.Parent = Part72
  2502. Sound80.Pitch = 0.97500002384186
  2503. Sound80.SoundId = "http://www.roblox.com/asset/?id=142082167"
  2504. Sound80.Volume = 1
  2505. Sound81.Name = "M203"
  2506. Sound81.Parent = Part72
  2507. Sound81.SoundId = "http://roblox.com/asset/?id=135039581"
  2508. Sound81.Volume = 1
  2509. Sound82.Name = "BoltForward"
  2510. Sound82.Parent = Part72
  2511. Sound82.Pitch = 0.92500001192093
  2512. Sound82.SoundId = "rbxassetid://393678926"
  2513. Sound82.Volume = 1
  2514. Sound83.Name = "BoltBack"
  2515. Sound83.Parent = Part72
  2516. Sound83.Pitch = 0.92500001192093
  2517. Sound83.SoundId = "rbxassetid://393678915"
  2518. Sound83.Volume = 1
  2519. Sound84.Name = "M203ReloadIn"
  2520. Sound84.Parent = Part72
  2521. Sound84.Pitch = 0.94999998807907
  2522. Sound84.SoundId = "http://roblox.com/asset/?id=158810321"
  2523. Sound84.Volume = 1
  2524. Sound85.Name = "M203ReloadOut"
  2525. Sound85.Parent = Part72
  2526. Sound85.Pitch = 0.99000000953674
  2527. Sound85.SoundId = "http://roblox.com/asset/?id=166188835"
  2528. Sound85.Volume = 1
  2529. SpecialMesh86.Parent = Part72
  2530. SpecialMesh86.Scale = Vector3.new(0.800000072, 0.800000072, 0.800000072)
  2531. SpecialMesh86.MeshType = Enum.MeshType.Brick
  2532. SpecialMesh86.Scale = Vector3.new(0.800000072, 0.800000072, 0.800000072)
  2533. Part87.Name = "Upper receiver"
  2534. Part87.Parent = Tool0
  2535. Part87.Material = Enum.Material.Concrete
  2536. Part87.Rotation = Vector3.new(90, 0, 0)
  2537. Part87.Anchored = true
  2538. Part87.CanCollide = false
  2539. Part87.Size = Vector3.new(1.22473347, 0.225373551, 0.225373551)
  2540. Part87.CFrame = CFrame.new(36.7707443, 1.18544996, -67.2739868, 1, 0, 0, 0, 0, -1, 0, 1, 0)
  2541. Part87.Position = Vector3.new(36.7707443, 1.18544996, -67.2739868)
  2542. Part87.Orientation = Vector3.new(90, 0, 0)
  2543. SpecialMesh88.Parent = Part87
  2544. SpecialMesh88.MeshId = "rbxassetid://777155048"
  2545. SpecialMesh88.Scale = Vector3.new(0.00456133951, 0.00456133857, 0.00456129387)
  2546. SpecialMesh88.TextureId = "rbxassetid://777328045"
  2547. SpecialMesh88.MeshType = Enum.MeshType.FileMesh
  2548. SpecialMesh88.Scale = Vector3.new(0.00456133951, 0.00456133857, 0.00456129387)
  2549. Script89.Name = "Gore + Ragdoll"
  2550. Script89.Parent = Tool0
  2551. table.insert(cors,sandbox(Script89,function()
  2552. ----------------------------------Gore + Ragdoll----------------------------------------------------------------------------
  2553. script.Parent = nil
  2554.  
  2555. script.Name = "RobloxAdvanced"
  2556.  
  2557. if _G.RobloxAdvanced ~= nil then
  2558.  
  2559. pcall(function() _G.RobloxAdvanced.Disable() end)
  2560.  
  2561. wait(0.5)
  2562.  
  2563. _G.RobloxAdvanced = nil
  2564.  
  2565. wait(0.5)
  2566.  
  2567. end
  2568.  
  2569. _G.RobloxAdvanced = {}
  2570.  
  2571. _G.RobloxAdvanced.Instance = script
  2572.  
  2573. _G.RobloxAdvanced.Connections = {}
  2574.  
  2575. _G.RobloxAdvanced.RagdollOnHit = true
  2576.  
  2577. _G.RobloxAdvanced.DamageOnHit = true
  2578.  
  2579. _G.RobloxAdvanced.CriticalHitsEnabled = false
  2580.  
  2581. _G.RobloxAdvanced.RagdollOnDeath = true
  2582.  
  2583. _G.RobloxAdvanced.KeepCorpses = true
  2584.  
  2585. _G.RobloxAdvanced.KeepCorpsesTime = 15
  2586.  
  2587. _G.RobloxAdvanced.ShowDamage = false
  2588.  
  2589. _G.RobloxAdvanced.BloodEnabled = true
  2590.  
  2591. _G.RobloxAdvanced.BloodGuiEnabled = true
  2592.  
  2593. _G.RobloxAdvanced.DeathGuiEnabled = false
  2594.  
  2595. _G.RobloxAdvanced.SpawnGuiEnabled = false
  2596.  
  2597. _G.RobloxAdvanced.HUDEnabled = false
  2598.  
  2599. _G.RobloxAdvanced.HUDTimeReset = function() _G.RobloxAdvanced.HUDTimeOffset = tick() end
  2600.  
  2601. _G.RobloxAdvanced.HUDTimeReset()
  2602.  
  2603. _G.RobloxAdvanced.HUDRemove = function()
  2604.  
  2605. for _, PlayerList in pairs(game:GetService("Players"):GetChildren()) do
  2606.  
  2607. pcall(function() while true do PlayerList.PlayerGui.RobloxAdvancedHUD:Remove() end end)
  2608.  
  2609. end
  2610.  
  2611. end
  2612.  
  2613. _G.RobloxAdvanced.HUDShow = function()
  2614.  
  2615. _G.RobloxAdvanced.HUDRemove()
  2616.  
  2617. for _, PlayerList in pairs(game:GetService("Players"):GetChildren()) do
  2618.  
  2619. _G.RobloxAdvanced.HUD(PlayerList)
  2620.  
  2621. end
  2622.  
  2623. end
  2624.  
  2625. _G.RobloxAdvanced.Disable = function()
  2626.  
  2627. _G.RobloxAdvanced.RagdollOnHit = false
  2628.  
  2629. _G.RobloxAdvanced.DamageOnHit = false
  2630.  
  2631. _G.RobloxAdvanced.CriticalHitsEnabled = false
  2632.  
  2633. _G.RobloxAdvanced.RagdollOnDeath = false
  2634.  
  2635. _G.RobloxAdvanced.KeepCorpses = false
  2636.  
  2637. _G.RobloxAdvanced.ShowDamage = false
  2638.  
  2639. _G.RobloxAdvanced.BloodEnabled = false
  2640.  
  2641. _G.RobloxAdvanced.BloodGuiEnabled = false
  2642.  
  2643. _G.RobloxAdvanced.DeathGuiEnabled = false
  2644.  
  2645. _G.RobloxAdvanced.SpawnGuiEnabled = false
  2646.  
  2647. _G.RobloxAdvanced.HUDEnabled = false
  2648.  
  2649. _G.RobloxAdvanced.HUDRemove()
  2650.  
  2651. pcall(function() _G.RobloxAdvanced.Instance.Disabled = true end)
  2652.  
  2653. for _, Connection in pairs(_G.RobloxAdvanced.Connections) do
  2654.  
  2655. pcall(function() Connection:disconnect() end)
  2656.  
  2657. end
  2658.  
  2659. end
  2660.  
  2661. _G.RobloxAdvanced.MakeBlood = function()
  2662.  
  2663. local Size = math.random(10, 75) / 100
  2664.  
  2665. local Blood = Instance.new("Part")
  2666.  
  2667. Blood.Name = "Blood"
  2668.  
  2669. Blood.BrickColor = BrickColor.new("Really red")
  2670.  
  2671. Blood.TopSurface = 0
  2672.  
  2673. Blood.BottomSurface = 0
  2674.  
  2675. Blood.FormFactor = "Custom"
  2676.  
  2677. Blood.Size = Vector3.new(Size, Size, Size)
  2678.  
  2679. Blood.CanCollide = false
  2680.  
  2681. Instance.new("SpecialMesh", Blood).MeshType = "Sphere"
  2682.  
  2683. local HasTouched = true
  2684.  
  2685. coroutine.wrap(function()
  2686.  
  2687. wait(0.09)
  2688.  
  2689. HasTouched = false
  2690.  
  2691. end)()
  2692.  
  2693. table.insert(_G.RobloxAdvanced.Connections, Blood.Touched:connect(function(Hit)
  2694.  
  2695. if Hit.Name ~= "Blood" and Hit.Name ~= "Blood Pool" then
  2696.  
  2697. if Hit:GetMass() < 100 and math.random(1, 30) == 1 then
  2698.  
  2699. Hit.BrickColor = BrickColor.new((function()
  2700.  
  2701. local Color = math.random(1, 2)
  2702.  
  2703. if Color == 1 then
  2704.  
  2705. return "Bright red"
  2706.  
  2707. elseif Color == 2 then
  2708.  
  2709. return "Really red"
  2710.  
  2711. end
  2712.  
  2713. end)())
  2714.  
  2715. end
  2716.  
  2717. end
  2718.  
  2719. if Blood.Name == "Blood" and Hit.Name == "Blood Pool" then
  2720.  
  2721. Blood:Remove()
  2722.  
  2723. elseif Blood.Name == "Blood Pool" and Hit.Name == "Blood" then
  2724.  
  2725. if Blood.Size.x > math.random(5, 20) or Blood.Size.z > math.random(5, 20) then return end
  2726.  
  2727. local _, C0, C1, Part1 = pcall(function() return Blood.Weld.C0, Blood.Weld.C1, Blood.Weld.Part1 end)
  2728.  
  2729. Blood.Size = Blood.Size + Vector3.new(Hit.Size.x / 5, 0, Hit.Size.z / 5)
  2730.  
  2731. Blood.CFrame = Part1.CFrame * C0 * C1
  2732.  
  2733. if C0 ~= nil and C1 ~= nil and Part1 ~= nil then
  2734.  
  2735. local Weld = Instance.new("Weld", Blood)
  2736.  
  2737. Weld.Part0 = Blood
  2738.  
  2739. Weld.Part1 = Part1
  2740.  
  2741. Weld.C0 = C0
  2742.  
  2743. Weld.C1 = C1
  2744.  
  2745. end
  2746.  
  2747. elseif HasTouched == false and Hit.Name ~= "Blood" then
  2748.  
  2749. HasTouched = true
  2750.  
  2751. local NewHit, Position = Workspace:FindPartOnRay(Ray.new(Blood.Position + Vector3.new(0, 1, 0), Vector3.new(0, -3, 0)), Blood)
  2752.  
  2753. if NewHit ~= nil and NewHit.Anchored == true then
  2754.  
  2755. Blood.Size = Vector3.new(Size * 2, 0.3, Size * 2)
  2756.  
  2757. Blood.Name = "Blood Pool"
  2758.  
  2759. Blood.CFrame = CFrame.new(Position)
  2760.  
  2761. local Weld = Instance.new("Weld", Blood)
  2762.  
  2763. Weld.Part0 = Blood
  2764.  
  2765. Weld.Part1 = NewHit
  2766.  
  2767. Weld.C0 = Blood.CFrame:inverse() * CFrame.new(Position)
  2768.  
  2769. Weld.C1 = NewHit.CFrame:inverse() * CFrame.new(Position)
  2770.  
  2771. else
  2772.  
  2773. local Weld = Instance.new("Weld", Blood)
  2774.  
  2775. Weld.Part0 = Blood
  2776.  
  2777. Weld.Part1 = Hit
  2778.  
  2779. Weld.C0 = Blood.CFrame:inverse() * CFrame.new(Blood.Position)
  2780.  
  2781. Weld.C1 = Hit.CFrame:inverse() * CFrame.new(Blood.Position)
  2782.  
  2783. end
  2784.  
  2785. end
  2786.  
  2787. end))
  2788.  
  2789. coroutine.wrap(function()
  2790.  
  2791. local Size = Blood.Size
  2792.  
  2793. local Step = math.random(40, 100) / 1000
  2794.  
  2795. while Blood.Transparency < 1 do
  2796.  
  2797. if Blood.Name == "Blood Pool" and Size ~= Blood.Size then
  2798.  
  2799. Step = 0.003
  2800.  
  2801. Size = Blood.Size
  2802.  
  2803. Blood.Transparency = 0
  2804.  
  2805. end
  2806.  
  2807. Blood.Transparency = Blood.Transparency + Step
  2808.  
  2809. wait()
  2810.  
  2811. end
  2812.  
  2813. Blood:Remove()
  2814.  
  2815. end)()
  2816.  
  2817. return Blood
  2818.  
  2819. end
  2820.  
  2821. _G.RobloxAdvanced.HUD = function(Player)
  2822.  
  2823. if _G.RobloxAdvanced.HUDEnabled == false then return end
  2824.  
  2825. local PlayerGui = Player:FindFirstChild("PlayerGui")
  2826.  
  2827. if PlayerGui == nil then return end
  2828.  
  2829. coroutine.wrap(function()
  2830.  
  2831. while _G.RobloxAdvanced.HUDEnabled == true do
  2832.  
  2833. pcall(function()
  2834.  
  2835. PlayerGui.HealthGUI:Remove()
  2836.  
  2837. end)
  2838.  
  2839. wait()
  2840.  
  2841. end
  2842.  
  2843. end)()
  2844.  
  2845. local Gui = Instance.new("ScreenGui")
  2846.  
  2847. Gui.Name = "RobloxAdvancedHUD"
  2848.  
  2849. local Frame = Instance.new("Frame")
  2850.  
  2851. Frame.Name = "Background"
  2852.  
  2853. Frame.Size = UDim2.new(0, 500, 0, 15)
  2854.  
  2855. Frame.Position = UDim2.new(0.5, (-500 / 2), 1, -15)
  2856.  
  2857. Frame.BackgroundTransparency = 1
  2858.  
  2859. Frame.BorderSizePixel = 0
  2860.  
  2861. Frame.Parent = Gui
  2862.  
  2863. local Kills = Instance.new("TextLabel")
  2864.  
  2865. Kills.Name = "Kills"
  2866.  
  2867. Kills.Size = UDim2.new(1 / 5, 0, 1, 0)
  2868.  
  2869. Kills.Position = UDim2.new(0, 0, 0, 0)
  2870.  
  2871. Kills.BackgroundColor3 = Color3.new(0.1, 0.1, 0.1)
  2872.  
  2873. Kills.BorderSizePixel = 1
  2874.  
  2875. Kills.BorderColor3 = Color3.new(1, 1, 1)
  2876.  
  2877. Kills.TextColor3 = Color3.new(1, 1, 1)
  2878.  
  2879. Kills.Parent = Frame
  2880.  
  2881. coroutine.wrap(function()
  2882.  
  2883. while true do
  2884.  
  2885. Kills.Text = "Kills: " ..(Player:FindFirstChild("RobloxAdvancedKills") ~= nil and Player.RobloxAdvancedKills.Value or 0)
  2886.  
  2887. wait(0.5)
  2888.  
  2889. end
  2890.  
  2891. end)()
  2892.  
  2893. Frame.Parent = Gui
  2894.  
  2895. local Killstreak = Instance.new("TextLabel")
  2896.  
  2897. Killstreak.Name = "Killstreak"
  2898.  
  2899. Killstreak.Size = UDim2.new(1 / 5, 0, 1, 0)
  2900.  
  2901. Killstreak.Position = UDim2.new(1 / 5, 0, 0, 0)
  2902.  
  2903. Killstreak.BackgroundColor3 = Color3.new(0.1, 0.1, 0.1)
  2904.  
  2905. Killstreak.BorderSizePixel = 1
  2906.  
  2907. Killstreak.BorderColor3 = Color3.new(1, 1, 1)
  2908.  
  2909. Killstreak.TextColor3 = Color3.new(1, 1, 1)
  2910.  
  2911. Killstreak.Parent = Frame
  2912.  
  2913. coroutine.wrap(function()
  2914.  
  2915. while true do
  2916.  
  2917. Killstreak.Text = "Streak: " ..(Player:FindFirstChild("RobloxAdvancedKillstreak") ~= nil and Player.RobloxAdvancedKillstreak.Value or 0)
  2918.  
  2919. wait(0.5)
  2920.  
  2921. end
  2922.  
  2923. end)()
  2924.  
  2925. local Deaths = Instance.new("TextLabel")
  2926.  
  2927. Deaths.Name = "Deaths"
  2928.  
  2929. Deaths.Size = UDim2.new(1 / 5, 0, 1, 0)
  2930.  
  2931. Deaths.Position = UDim2.new(1 / 5 * 2, 0, 0, 0)
  2932.  
  2933. Deaths.BackgroundColor3 = Color3.new(0.1, 0.1, 0.1)
  2934.  
  2935. Deaths.BorderSizePixel = 1
  2936.  
  2937. Deaths.BorderColor3 = Color3.new(1, 1, 1)
  2938.  
  2939. Deaths.TextColor3 = Color3.new(1, 1, 1)
  2940.  
  2941. Deaths.Parent = Frame
  2942.  
  2943. coroutine.wrap(function()
  2944.  
  2945. while true do
  2946.  
  2947. Deaths.Text = "Deaths: " ..(Player:FindFirstChild("RobloxAdvancedDeaths") ~= nil and Player.RobloxAdvancedDeaths.Value or 0)
  2948.  
  2949. wait(0.5)
  2950.  
  2951. end
  2952.  
  2953. end)()
  2954.  
  2955. local Health = Instance.new("TextLabel")
  2956.  
  2957. Health.Name = "Health"
  2958.  
  2959. Health.Size = UDim2.new(1 / 5, 0, 1, 0)
  2960.  
  2961. Health.Position = UDim2.new(1 / 5 * 3, 0, 0, 0)
  2962.  
  2963. Health.BackgroundColor3 = Color3.new(0.1, 0.1, 0.1)
  2964.  
  2965. Health.BorderSizePixel = 1
  2966.  
  2967. Health.BorderColor3 = Color3.new(1, 1, 1)
  2968.  
  2969. Health.TextColor3 = Color3.new(1, 1, 1)
  2970.  
  2971. Health.Parent = Frame
  2972.  
  2973. coroutine.wrap(function()
  2974.  
  2975. for i = 0, math.huge, 0.5 do
  2976.  
  2977. if pcall(function() local _ = Player.Character.Humanoid end) == true then
  2978.  
  2979. if Player.Character.Humanoid.Health == math.huge or Player.Character.Humanoid.MaxHealth == math.huge then
  2980.  
  2981. Health.Text = "Invincible"
  2982.  
  2983. Health.BackgroundColor3 = Color3.new(0, 0, 0.5)
  2984.  
  2985. else
  2986.  
  2987. Health.Text = "Health: " ..math.floor(Player.Character.Humanoid.Health).. "/" ..math.floor(Player.Character.Humanoid.MaxHealth)
  2988.  
  2989. Health.BackgroundColor3 = Color3.new((1 - (Player.Character.Humanoid.Health / Player.Character.Humanoid.MaxHealth)) * 0.9, (Player.Character.Humanoid.Health / Player.Character.Humanoid.MaxHealth) * 0.5, 0)
  2990.  
  2991. end
  2992.  
  2993. if Player.Character:FindFirstChild("ForceField") ~= nil then
  2994.  
  2995. Health.BackgroundColor3 = Color3.new(((math.sin(i) + 1) / 2), 0, 1 - ((math.sin(i) + 1) / 2))
  2996.  
  2997. end
  2998.  
  2999. else
  3000.  
  3001. Health.Text = "Health: Nil"
  3002.  
  3003. Health.BackgroundColor3 = Color3.new(0, 0, 0)
  3004.  
  3005. end
  3006.  
  3007. wait(0.05)
  3008.  
  3009. end
  3010.  
  3011. end)()
  3012.  
  3013. local Time = Instance.new("TextLabel")
  3014.  
  3015. Time.Name = "Time"
  3016.  
  3017. Time.Size = UDim2.new(1 / 5, 0, 1, 0)
  3018.  
  3019. Time.Position = UDim2.new(1 / 5 * 4, 0, 0, 0)
  3020.  
  3021. Time.BackgroundColor3 = Color3.new(0.1, 0.1, 0.1)
  3022.  
  3023. Time.BorderSizePixel = 1
  3024.  
  3025. Time.BorderColor3 = Color3.new(1, 1, 1)
  3026.  
  3027. Time.TextColor3 = Color3.new(1, 1, 1)
  3028.  
  3029. Time.Parent = Frame
  3030.  
  3031. coroutine.wrap(function()
  3032.  
  3033. while true do
  3034.  
  3035. local Total = tick() - _G.RobloxAdvanced.HUDTimeOffset
  3036.  
  3037. local Minutes = math.floor(Total / 60)
  3038.  
  3039. local Seconds = math.floor(Total % 60)
  3040.  
  3041. if string.len(Minutes) == 1 then Minutes = "0" ..Minutes end
  3042.  
  3043. if string.len(Seconds) == 1 then Seconds = "0" ..Seconds end
  3044.  
  3045. Time.Text = "Time: " ..Minutes.. ":" ..Seconds
  3046.  
  3047. wait(0.05)
  3048.  
  3049. end
  3050.  
  3051. end)()
  3052.  
  3053. Gui.Parent = PlayerGui
  3054.  
  3055. end
  3056.  
  3057. _G.RobloxAdvanced.HookPlayerDeath = function(Player)
  3058.  
  3059. table.insert(_G.RobloxAdvanced.Connections, Player.Changed:connect(function(Property)
  3060.  
  3061. if Property == "Character" then
  3062.  
  3063. if Player.Character ~= nil then
  3064.  
  3065. if _G.RobloxAdvanced.SpawnGuiEnabled == true then
  3066.  
  3067. local PlayerGui = Player:FindFirstChild("PlayerGui")
  3068.  
  3069. if PlayerGui == nil then return end
  3070.  
  3071. local Gui = Instance.new("ScreenGui")
  3072.  
  3073. Gui.Name = "Life"
  3074.  
  3075. local Frame = Instance.new("Frame")
  3076.  
  3077. Frame.Name = "White"
  3078.  
  3079. Frame.Size = UDim2.new(2, 0, 2, 0)
  3080.  
  3081. Frame.Position = UDim2.new(-0.5, 0, -0.5, 0)
  3082.  
  3083. Frame.BackgroundColor3 = Color3.new(0, 0, 0)
  3084.  
  3085. Frame.BackgroundTransparency = 0
  3086.  
  3087. Frame.Parent = Gui
  3088.  
  3089. Gui.Parent = PlayerGui
  3090.  
  3091. coroutine.wrap(function()
  3092.  
  3093. wait(0.1)
  3094.  
  3095. for i = 0, 1, 0.1 do
  3096.  
  3097. Frame.BackgroundColor3 = Color3.new(i, i, i)
  3098.  
  3099. wait()
  3100.  
  3101. end
  3102.  
  3103. Frame.BackgroundColor3 = Color3.new(1, 1, 1)
  3104.  
  3105. wait(0.3)
  3106.  
  3107. for i = 0, 1, 0.05 do
  3108.  
  3109. Frame.BackgroundTransparency = i
  3110.  
  3111. wait()
  3112.  
  3113. end
  3114.  
  3115. Gui:Remove()
  3116.  
  3117. end)()
  3118.  
  3119. end
  3120.  
  3121. _G.RobloxAdvanced.HUD(Player)
  3122.  
  3123. end
  3124.  
  3125. end
  3126.  
  3127. end))
  3128.  
  3129. _G.RobloxAdvanced.HUD(Player)
  3130.  
  3131. table.insert(_G.RobloxAdvanced.Connections, Player.Chatted:connect(function(Message)
  3132.  
  3133. if string.sub(Message, 0, 5) == "lego " then Message = string.sub(Message, 6) end
  3134.  
  3135. Message = Message:lower()
  3136.  
  3137. if Message == "throw me" or Message == "ragdoll" then
  3138.  
  3139. if Player.Character == nil then return end
  3140.  
  3141. if Player.Character:FindFirstChild("Humanoid") == nil then return end
  3142.  
  3143. if Player.Character:FindFirstChild("Torso") == nil then return end
  3144.  
  3145. Player.Character.Humanoid.Sit = true
  3146.  
  3147. _G.RobloxAdvanced.Ragdoll(true, Player.Character)
  3148.  
  3149. if Message == "throw me" then
  3150.  
  3151. Player.Character.Torso.Velocity = Player.Character.Torso.Velocity + (Player.Character.Torso.CFrame.lookVector * 150) + Vector3.new(0, 50, 0)
  3152.  
  3153. end
  3154.  
  3155. end
  3156.  
  3157. end))
  3158.  
  3159. end
  3160.  
  3161. _G.RobloxAdvanced.HookModelDeath = function(Character)
  3162.  
  3163. wait()
  3164.  
  3165. if Character == nil then return end
  3166.  
  3167. if Character:FindFirstChild("Humanoid") == nil then return end
  3168.  
  3169. local RagdollStatus = false
  3170.  
  3171. local ConnectTouched = function(Part)
  3172.  
  3173. if Part.Parent ~= Character then return end
  3174.  
  3175. pcall(function()
  3176.  
  3177. table.insert(_G.RobloxAdvanced.Connections, Part.Touched:connect(function(Hit)
  3178.  
  3179. if Hit == nil then return end
  3180.  
  3181. if Hit.Parent == nil then return end
  3182.  
  3183. if Hit.Parent ~= Character and Hit.Parent.Parent ~= Character and Hit:GetMass() > 3 then
  3184.  
  3185. local Velocity1 = {
  3186.  
  3187. math.abs(Part.Velocity.x),
  3188.  
  3189. math.abs(Part.Velocity.y),
  3190.  
  3191. math.abs(Part.Velocity.z)
  3192.  
  3193. }
  3194.  
  3195. local RotVelocity1 = {
  3196.  
  3197. math.abs(Part.RotVelocity.x),
  3198.  
  3199. math.abs(Part.RotVelocity.y),
  3200.  
  3201. math.abs(Part.RotVelocity.z)
  3202.  
  3203. }
  3204.  
  3205. local Velocity2 = {
  3206.  
  3207. math.abs(Hit.Velocity.x),
  3208.  
  3209. math.abs(Hit.Velocity.y),
  3210.  
  3211. math.abs(Hit.Velocity.z)
  3212.  
  3213. }
  3214.  
  3215. local RotVelocity2 = {
  3216.  
  3217. math.abs(Hit.RotVelocity.x),
  3218.  
  3219. math.abs(Hit.RotVelocity.y),
  3220.  
  3221. math.abs(Hit.RotVelocity.z)
  3222.  
  3223. }
  3224.  
  3225. if RagdollStatus == false and _G.RobloxAdvanced.RagdollOnHit == true then
  3226.  
  3227. for i = 1, 3 do
  3228.  
  3229. local Total = math.abs(Velocity1[i] - Velocity2[i])
  3230.  
  3231. if Total > math.random(85, 150) then
  3232.  
  3233. RagdollStatus = true
  3234.  
  3235. end
  3236.  
  3237. end
  3238.  
  3239. for i = 1, 3 do
  3240.  
  3241. local Total = math.abs(RotVelocity1[i] - RotVelocity2[i])
  3242.  
  3243. if Total > math.random(75, 100) then
  3244.  
  3245. RagdollStatus = true
  3246.  
  3247. end
  3248.  
  3249. end
  3250.  
  3251. if RagdollStatus == true then
  3252.  
  3253. _G.RobloxAdvanced.Ragdoll(true, Character)
  3254.  
  3255. if Character.Humanoid.PlatformStand == true or Character.Humanoid.Sit == true then
  3256.  
  3257. coroutine.wrap(function()
  3258.  
  3259. wait(5)
  3260.  
  3261. RagdollStatus = false
  3262.  
  3263. end)()
  3264.  
  3265. else
  3266.  
  3267. coroutine.wrap(function()
  3268.  
  3269. Character.Humanoid.PlatformStand = true
  3270.  
  3271. wait(1)
  3272.  
  3273. Character.Humanoid.PlatformStand = false
  3274.  
  3275. wait(5)
  3276.  
  3277. RagdollStatus = false
  3278.  
  3279. end)()
  3280.  
  3281. end
  3282.  
  3283. end
  3284.  
  3285. end
  3286.  
  3287. local Damage = 0
  3288.  
  3289. for i = 1, #Velocity1 do Damage = Damage + Velocity1[i] end
  3290.  
  3291. for i = 1, #RotVelocity1 do Damage = Damage + RotVelocity1[i] end
  3292.  
  3293. for i = 1, #Velocity2 do Damage = Damage + Velocity2[i] end
  3294.  
  3295. for i = 1, #RotVelocity2 do Damage = Damage + RotVelocity2[i] end
  3296.  
  3297. Damage = Damage / 60
  3298.  
  3299. if Damage >= 4 and _G.RobloxAdvanced.DamageOnHit == true then
  3300.  
  3301. pcall(function() Character.Humanoid:TakeDamage(math.floor(Damage)) end)
  3302.  
  3303. end
  3304.  
  3305. end
  3306.  
  3307. end))
  3308.  
  3309. end)
  3310.  
  3311. end
  3312.  
  3313. for _, Part in pairs(Character:GetChildren()) do ConnectTouched(Part) end
  3314.  
  3315. table.insert(_G.RobloxAdvanced.Connections, Character.ChildAdded:connect(function(Part) ConnectTouched(Part) end))
  3316.  
  3317. local OldHealth = Character.Humanoid.Health
  3318.  
  3319. table.insert(_G.RobloxAdvanced.Connections, Character.Humanoid.Changed:connect(function(Property)
  3320.  
  3321. if Property == "Health" then
  3322.  
  3323. local Source = nil
  3324.  
  3325. for _, Part in pairs(Character:GetChildren()) do
  3326.  
  3327. if Part:IsA("BasePart") then
  3328.  
  3329. if Source == nil then
  3330.  
  3331. Source = Part
  3332.  
  3333. else
  3334.  
  3335. if math.abs(Part.Velocity.x) + math.abs(Part.Velocity.y) + math.abs(Part.Velocity.z) > math.abs(Source.Velocity.x) + math.abs(Source.Velocity.y) + math.abs(Source.Velocity.z) then
  3336.  
  3337. Source = Part
  3338.  
  3339. end
  3340.  
  3341. end
  3342.  
  3343. end
  3344.  
  3345. end
  3346.  
  3347. if Source == nil then return end
  3348.  
  3349. if math.abs(Character.Humanoid.Health - OldHealth) > math.abs((Character.Humanoid.Health + 0.01 * 1.05 * Character.Humanoid.MaxHealth) - Character.Humanoid.Health) and _G.RobloxAdvanced.ShowDamage == true then
  3350.  
  3351. local Model = Instance.new("Model", Workspace)
  3352.  
  3353. Model.Name = tostring(math.floor(Character.Humanoid.Health - OldHealth))
  3354.  
  3355. Model.Name = Model.Name:sub(0, 1) ~= "-" and Model.Name.. "+" or Model.Name
  3356.  
  3357. local Damage = Instance.new("Part", Model)
  3358.  
  3359. Damage.Name = "Head"
  3360.  
  3361. Damage.BrickColor = BrickColor.new(Model.Name:match("-") and "Really red" or "Lime green")
  3362.  
  3363. if (OldHealth - Character.Humanoid.Health) / Character.Humanoid.MaxHealth > 0.25 then
  3364.  
  3365. coroutine.wrap(function()
  3366.  
  3367. while Damage.Parent ~= nil do
  3368.  
  3369. Damage.BrickColor = BrickColor.new("New Yeller")
  3370.  
  3371. wait()
  3372.  
  3373. Damage.BrickColor = BrickColor.new("Really blue")
  3374.  
  3375. wait()
  3376.  
  3377. end
  3378.  
  3379. end)()
  3380.  
  3381. end
  3382.  
  3383. Damage.TopSurface = 0
  3384.  
  3385. Damage.BottomSurface = 0
  3386.  
  3387. Damage.CanCollide = false
  3388.  
  3389. Damage.FormFactor = "Custom"
  3390.  
  3391. Damage.Size = (OldHealth - Character.Humanoid.Health) / Character.Humanoid.MaxHealth > 0.25 and Vector3.new(1, 1, 1) or Vector3.new(0.5, 0.5, 0.5)
  3392.  
  3393. Damage.CFrame = CFrame.new(Source.Position)
  3394.  
  3395. coroutine.wrap(function()
  3396.  
  3397. while Damage.Parent ~= nil do
  3398.  
  3399. Damage.CanCollide = false
  3400.  
  3401. wait()
  3402.  
  3403. end
  3404.  
  3405. end)()
  3406.  
  3407. local Humanoid = Instance.new("Humanoid", Model)
  3408.  
  3409. Humanoid.Name = "Corpse"
  3410.  
  3411. Humanoid.MaxHealth = 100
  3412.  
  3413. Humanoid.Health = 0
  3414.  
  3415. Humanoid.WalkSpeed = 0
  3416.  
  3417. Humanoid.PlatformStand = true
  3418.  
  3419. local BodyVelocity = Instance.new("BodyVelocity", Damage)
  3420.  
  3421. BodyVelocity.maxForce = Vector3.new(math.huge, math.huge, math.huge)
  3422.  
  3423. BodyVelocity.velocity = Vector3.new(0, 7, 0)
  3424.  
  3425. coroutine.wrap(function()
  3426.  
  3427. wait(1)
  3428.  
  3429. for i = 0, 1, 0.05 do
  3430.  
  3431. Damage.Transparency = i
  3432.  
  3433. BodyVelocity.velocity = Vector3.new(0, 7 * (1 - i), 0)
  3434.  
  3435. wait()
  3436.  
  3437. end
  3438.  
  3439. Model:Remove()
  3440.  
  3441. end)()
  3442.  
  3443. end
  3444.  
  3445. if OldHealth - Character.Humanoid.Health >= 3 then
  3446.  
  3447. if _G.RobloxAdvanced.BloodEnabled == true then
  3448.  
  3449. local Max = math.ceil((OldHealth - Character.Humanoid.Health) * 2)
  3450.  
  3451. for i = 1, (Max > 20 and 20 or Max + 1) do
  3452.  
  3453. local Blood = _G.RobloxAdvanced.MakeBlood()
  3454.  
  3455. Blood.CFrame = Source.CFrame * CFrame.new(math.random(-2, 2), math.random(-2, 2), math.random(-2, 2))
  3456.  
  3457. Blood.Velocity = (Blood.Position - Source.Position).unit * math.random(5, 25)
  3458.  
  3459. Blood.Parent = Workspace
  3460.  
  3461. end
  3462.  
  3463. end
  3464.  
  3465. local Player = game:GetService("Players"):GetPlayerFromCharacter(Character)
  3466.  
  3467. if Player ~= nil and _G.RobloxAdvanced.BloodGuiEnabled == true then
  3468.  
  3469. local PlayerGui = Player:FindFirstChild("PlayerGui")
  3470.  
  3471. if PlayerGui == nil then PlayerGui = Instance.new("PlayerGui", Player) end
  3472.  
  3473. if PlayerGui:FindFirstChild("Pain") ~= nil then PlayerGui.Pain:Remove() end
  3474.  
  3475. local Gui = Instance.new("ScreenGui")
  3476.  
  3477. Gui.Name = "Pain"
  3478.  
  3479. local Frame = Instance.new("Frame")
  3480.  
  3481. Frame.Name = "Red"
  3482.  
  3483. Frame.Size = UDim2.new(2, 0, 2, 0)
  3484.  
  3485. Frame.Position = UDim2.new(-0.5, 0, -0.5, 0)
  3486.  
  3487. Frame.BackgroundColor3 = Color3.new(1, 0, 0)
  3488.  
  3489. Frame.BackgroundTransparency = (math.abs(OldHealth - Character.Humanoid.Health) / Character.Humanoid.MaxHealth) * 1.2
  3490.  
  3491. Frame.Parent = Gui
  3492.  
  3493. Gui.Parent = PlayerGui
  3494.  
  3495. coroutine.wrap(function()
  3496.  
  3497. for i = Frame.BackgroundTransparency, 1, 0.05 do
  3498.  
  3499. Frame.BackgroundTransparency = i
  3500.  
  3501. wait()
  3502.  
  3503. end
  3504.  
  3505. Gui:Remove()
  3506.  
  3507. end)()
  3508.  
  3509. end
  3510.  
  3511. end
  3512.  
  3513. if (OldHealth - Character.Humanoid.Health) / Character.Humanoid.MaxHealth > 0.25 and _G.RobloxAdvanced.CriticalHitsEnabled == true and Character.Humanoid.Health > 0 and RagdollStatus == false then
  3514.  
  3515. RagdollStatus = true
  3516.  
  3517. _G.RobloxAdvanced.Ragdoll(true, Character)
  3518.  
  3519. Character.Humanoid.PlatformStand = true
  3520.  
  3521. local Sound = Instance.new("Sound", Character.Torso)
  3522.  
  3523. Sound.SoundId = "http://www.roblox.com/Asset/?id=2801263"
  3524.  
  3525. Sound.Volume = 1
  3526.  
  3527. Sound.Pitch = math.random(500, 700) / 1000
  3528.  
  3529. Sound:Play()
  3530.  
  3531. local Player = game:GetService("Players"):GetPlayerFromCharacter(Character)
  3532.  
  3533. if Player ~= nil then
  3534.  
  3535. local PlayerGui = Player:FindFirstChild("PlayerGui")
  3536.  
  3537. if PlayerGui == nil then return end
  3538.  
  3539. if PlayerGui:FindFirstChild("Pain") ~= nil then PlayerGui.Pain:Remove() end
  3540.  
  3541. if PlayerGui:FindFirstChild("Critical Hit") ~= nil then PlayerGui.Pain:Remove() end
  3542.  
  3543. local Gui = Instance.new("ScreenGui", PlayerGui)
  3544.  
  3545. Gui.Name = "Critical Hit"
  3546.  
  3547. local Frame = Instance.new("Frame", Gui)
  3548.  
  3549. Frame.Name = "Yellow"
  3550.  
  3551. Frame.Size = UDim2.new(2, 0, 2, 0)
  3552.  
  3553. Frame.Position = UDim2.new(-0.5, 0, -0.5, 0)
  3554.  
  3555. Frame.BackgroundColor3 = Color3.new(0.9, 0.9, 0)
  3556.  
  3557. Frame.BackgroundTransparency = 0
  3558.  
  3559. coroutine.wrap(function()
  3560.  
  3561. for i = 0, 1, 0.01 do
  3562.  
  3563. Frame.BackgroundTransparency = i
  3564.  
  3565. wait()
  3566.  
  3567. end
  3568.  
  3569. Gui:Remove()
  3570.  
  3571. end)()
  3572.  
  3573. for i = 1, 5 do
  3574.  
  3575. local Label = Instance.new("TextLabel", Frame)
  3576.  
  3577. Label.Name = "Notification"
  3578.  
  3579. Label.Position = UDim2.new(0.5, 0, 0.5, 0)
  3580.  
  3581. Label.Text = "CRITICAL HIT"
  3582.  
  3583. Label.FontSize = "Size18"
  3584.  
  3585. Label.TextColor3 = Color3.new(1, 0.5, 0)
  3586.  
  3587. Label.TextTransparency = 0
  3588.  
  3589. coroutine.wrap(function()
  3590.  
  3591. while Label.Parent ~= nil do
  3592.  
  3593. Label.Position = UDim2.new(0.5, math.random(-25, 25), 0.5, math.random(-25, 25))
  3594.  
  3595. Label.FontSize = "Size" ..tostring((function()
  3596.  
  3597. local Size = math.random(1, 5)
  3598.  
  3599. if Size == 1 then
  3600.  
  3601. return 14
  3602.  
  3603. elseif Size == 2 then
  3604.  
  3605. return 18
  3606.  
  3607. elseif Size == 3 then
  3608.  
  3609. return 24
  3610.  
  3611. elseif Size == 4 then
  3612.  
  3613. return 36
  3614.  
  3615. elseif Size == 5 then
  3616.  
  3617. return 48
  3618.  
  3619. end
  3620.  
  3621. end)())
  3622.  
  3623. wait()
  3624.  
  3625. end
  3626.  
  3627. end)()
  3628.  
  3629. coroutine.wrap(function()
  3630.  
  3631. for i = 0.01, 1, 0.05 do
  3632.  
  3633. Label.TextTransparency = i
  3634.  
  3635. wait()
  3636.  
  3637. end
  3638.  
  3639. end)()
  3640.  
  3641. end
  3642.  
  3643. end
  3644.  
  3645. coroutine.wrap(function()
  3646.  
  3647. wait(3)
  3648.  
  3649. Character.Humanoid.PlatformStand = false
  3650.  
  3651. wait(5)
  3652.  
  3653. RagdollStatus = false
  3654.  
  3655. end)()
  3656.  
  3657. end
  3658.  
  3659. OldHealth = Character.Humanoid.Health
  3660.  
  3661. end
  3662.  
  3663. end))
  3664.  
  3665. table.insert(_G.RobloxAdvanced.Connections, Character.Humanoid.Died:connect(function()
  3666.  
  3667. local Humanoid = Character:FindFirstChild("Humanoid")
  3668.  
  3669. if Humanoid == nil then return end
  3670.  
  3671. local Player = game:GetService("Players"):GetPlayerFromCharacter(Character)
  3672.  
  3673. local Killer = nil
  3674.  
  3675. if Humanoid:FindFirstChild("creator") ~= nil then
  3676.  
  3677. Killer = Humanoid.creator.Value
  3678.  
  3679. end
  3680.  
  3681. if Killer ~= nil then
  3682.  
  3683. if Killer:FindFirstChild("RobloxAdvancedKills") == nil then
  3684.  
  3685. Instance.new("IntValue", Killer).Name = "RobloxAdvancedKills"
  3686.  
  3687. end
  3688.  
  3689. if Killer:FindFirstChild("RobloxAdvancedKillstreak") == nil then
  3690.  
  3691. Instance.new("IntValue", Killer).Name = "RobloxAdvancedKillstreak"
  3692.  
  3693. end
  3694.  
  3695. if Player ~= nil and Player.Neutral == false and Killer.Neutral == false and Player.TeamColor == Killer.TeamColor then
  3696.  
  3697. Killer.RobloxAdvancedKills.Value = Killer.RobloxAdvancedKills.Value - 2
  3698.  
  3699. Killer.RobloxAdvancedKillstreak.Value = 0
  3700.  
  3701. else
  3702.  
  3703. Killer.RobloxAdvancedKills.Value = Killer.RobloxAdvancedKills.Value + 1
  3704.  
  3705. Killer.RobloxAdvancedKillstreak.Value = Killer.RobloxAdvancedKillstreak.Value + 1
  3706.  
  3707. end
  3708.  
  3709. end
  3710.  
  3711. if Player ~= nil then
  3712.  
  3713. if Player:FindFirstChild("RobloxAdvancedDeaths") == nil then
  3714.  
  3715. Instance.new("IntValue", Player).Name = "RobloxAdvancedDeaths"
  3716.  
  3717. end
  3718.  
  3719. if Player:FindFirstChild("RobloxAdvancedKillstreak") == nil then
  3720.  
  3721. Instance.new("IntValue", Player).Name = "RobloxAdvancedKillstreak"
  3722.  
  3723. end
  3724.  
  3725. Player.RobloxAdvancedDeaths.Value = Player.RobloxAdvancedDeaths.Value + 1
  3726.  
  3727. Player.RobloxAdvancedKillstreak.Value = 0
  3728.  
  3729. end
  3730.  
  3731. if _G.RobloxAdvanced.RagdollOnDeath == true then
  3732.  
  3733. _G.RobloxAdvanced.Ragdoll(true, Character, true)
  3734.  
  3735. end
  3736.  
  3737. coroutine.wrap(function()
  3738.  
  3739. if _G.RobloxAdvanced.DeathGuiEnabled == false then return end
  3740.  
  3741. if Player == nil then return end
  3742.  
  3743. local PlayerGui = Player:FindFirstChild("PlayerGui")
  3744.  
  3745. if PlayerGui == nil then return end
  3746.  
  3747. local Gui = Instance.new("ScreenGui")
  3748.  
  3749. Gui.Name = "Death"
  3750.  
  3751. local Frame = Instance.new("Frame")
  3752.  
  3753. Frame.Name = "Black"
  3754.  
  3755. Frame.Size = UDim2.new(2, 0, 2, 0)
  3756.  
  3757. Frame.Position = UDim2.new(-0.5, 0, -0.5, 0)
  3758.  
  3759. Frame.BackgroundColor3 = Color3.new(0, 0, 0)
  3760.  
  3761. Frame.BackgroundTransparency = 1
  3762.  
  3763. Frame.Parent = Gui
  3764.  
  3765. local Label = Instance.new("TextLabel")
  3766.  
  3767. Label.Name = "Notification"
  3768.  
  3769. Label.Position = UDim2.new(0.5, 0, 0.5, 0)
  3770.  
  3771. if Killer ~= nil then
  3772.  
  3773. if Killer == Player then
  3774.  
  3775. Label.Text = "You have killed yourself."
  3776.  
  3777. else
  3778.  
  3779. Label.Text = "You have been killed by " ..Killer.Name.. "."
  3780.  
  3781. end
  3782.  
  3783. else
  3784.  
  3785. Label.Text = "You have died."
  3786.  
  3787. end
  3788.  
  3789. Label.FontSize = "Size24"
  3790.  
  3791. Label.TextColor3 = Color3.new(1, 0.5, 0)
  3792.  
  3793. Label.TextTransparency = 1
  3794.  
  3795. Label.Parent = Frame
  3796.  
  3797. Gui.Parent = PlayerGui
  3798.  
  3799. wait(0.5)
  3800.  
  3801. for i = 1, 0, -0.05 do
  3802.  
  3803. Label.TextTransparency = i
  3804.  
  3805. wait()
  3806.  
  3807. end
  3808.  
  3809. Label.BackgroundTransparency = 0
  3810.  
  3811. wait(0.5)
  3812.  
  3813. for i = 1, 0, -0.025 do
  3814.  
  3815. Frame.BackgroundTransparency = i
  3816.  
  3817. wait()
  3818.  
  3819. end
  3820.  
  3821. Frame.BackgroundTransparency = 0
  3822.  
  3823. wait(0.5)
  3824.  
  3825. for i = 0, 1, 0.05 do
  3826.  
  3827. Label.TextTransparency = i
  3828.  
  3829. wait()
  3830.  
  3831. end
  3832.  
  3833. Label.BackgroundTransparency = 1
  3834.  
  3835. end)()
  3836.  
  3837. wait(4.5)
  3838.  
  3839. if Character == nil or _G.RobloxAdvanced.KeepCorpses == false then return end
  3840.  
  3841. if Character.Parent == nil then return end
  3842.  
  3843. local ReweldNeck = false
  3844.  
  3845. if Character:FindFirstChild("Torso") ~= nil then
  3846.  
  3847. if Character.Torso:FindFirstChild("Neck") ~= nil then
  3848.  
  3849. ReweldNeck = true
  3850.  
  3851. end
  3852.  
  3853. end
  3854.  
  3855. local Model = Instance.new("Model", Workspace)
  3856.  
  3857. Model.Name = Character.Name.. "'s Corpse"
  3858.  
  3859. for _, Part in pairs(Character:GetChildren()) do
  3860.  
  3861. if Part.ClassName == "CharacterMesh" or Part:IsA("Clothing") or Part.ClassName == "ShirtGraphic" then
  3862.  
  3863. Part:Clone().Parent = Model
  3864.  
  3865. end
  3866.  
  3867. for _, Part2 in pairs(Part:GetChildren()) do
  3868.  
  3869. if Part2.ClassName == "Sound" then
  3870.  
  3871. Part2.SoundId = ""
  3872.  
  3873. Part2.Looped = false
  3874.  
  3875. Part2.PlayOnRemove = false
  3876.  
  3877. Part2.Volume = 0
  3878.  
  3879. Part2.Pitch = 0
  3880.  
  3881. Part2:Stop()
  3882.  
  3883. end
  3884.  
  3885. end
  3886.  
  3887. if Part.ClassName == "Part" then
  3888.  
  3889. pcall(function()
  3890.  
  3891. Part.Parent = Model
  3892.  
  3893. Part.CanCollide = true
  3894.  
  3895. end)
  3896.  
  3897. end
  3898.  
  3899. end
  3900.  
  3901. local Humanoid = Instance.new("Humanoid")
  3902.  
  3903. Humanoid.Name = "Corpse"
  3904.  
  3905. Humanoid.Health = 0
  3906.  
  3907. Humanoid.WalkSpeed = 0
  3908.  
  3909. Humanoid.PlatformStand = true
  3910.  
  3911. Humanoid.Parent = Model
  3912.  
  3913. if ReweldNeck == true then
  3914.  
  3915. local Neck = Instance.new("Weld")
  3916.  
  3917. Neck.Part0 = Torso
  3918.  
  3919. Neck.Part1 = Head
  3920.  
  3921. Neck.C0 = CFrame.new(0, 1.5, 0)
  3922.  
  3923. Neck.Parent = Torso
  3924.  
  3925. end
  3926.  
  3927. game:GetService("Debris"):AddItem(Model, _G.RobloxAdvanced.KeepCorpsesTime)
  3928.  
  3929. end))
  3930.  
  3931. table.insert(_G.RobloxAdvanced.Connections, Character.Humanoid.FallingDown:connect(function() _G.RobloxAdvanced.Ragdoll(true, Character) end))
  3932.  
  3933. table.insert(_G.RobloxAdvanced.Connections, Character.Humanoid.GettingUp:connect(function() _G.RobloxAdvanced.Ragdoll(false, Character) end))
  3934.  
  3935. coroutine.wrap(function()
  3936.  
  3937. local function RemoveLimb(Name)
  3938.  
  3939. if Character:FindFirstChild(Name) == nil then return false end
  3940.  
  3941. local Model = Instance.new("Model")
  3942.  
  3943. Model.Name = "Decapitated Limb"
  3944.  
  3945. for _, Part in pairs(Character:GetChildren()) do
  3946.  
  3947. if Part.ClassName == "CharacterMesh" or Part:IsA("Clothing") then
  3948.  
  3949. Part:Clone().Parent = Model
  3950.  
  3951. end
  3952.  
  3953. if Part.Name == Name then
  3954.  
  3955. pcall(function()
  3956.  
  3957. Part.Parent = Model
  3958.  
  3959. Part.CanCollide = true
  3960.  
  3961. Part:BreakJoints()
  3962.  
  3963. end)
  3964.  
  3965. end
  3966.  
  3967. end
  3968.  
  3969. local Humanoid = Instance.new("Humanoid")
  3970.  
  3971. Humanoid.Name = "Corpse"
  3972.  
  3973. Humanoid.Health = 0
  3974.  
  3975. Humanoid.MaxHealth = 0
  3976.  
  3977. Humanoid.WalkSpeed = 0
  3978.  
  3979. Humanoid.PlatformStand = true
  3980.  
  3981. Humanoid.Parent = Model
  3982.  
  3983. Model.Parent = Workspace
  3984.  
  3985. game:GetService("Debris"):AddItem(Model, _G.RobloxAdvanced.KeepCorpsesTime)
  3986.  
  3987. return true, Model
  3988.  
  3989. end
  3990.  
  3991. while true do
  3992.  
  3993. if Character.Parent == nil then break end
  3994.  
  3995. if Character:FindFirstChild("Torso") == nil then break end
  3996.  
  3997. if Character:FindFirstChild("Humanoid") == nil then break end
  3998.  
  3999. if Character.Torso:FindFirstChild("Left Shoulder") == nil and Character.Torso:FindFirstChild("LeftShoulder") == nil and Character.Torso:FindFirstChild("Left Shoulder 2") == nil then
  4000.  
  4001. local Blood = _G.RobloxAdvanced.MakeBlood()
  4002.  
  4003. Blood.CFrame = Character.Torso.CFrame * CFrame.new(-1.2, 0.5, 0)
  4004.  
  4005. Blood.Velocity = (Blood.Position - (Character.Torso.CFrame * CFrame.new(0, 0.5, 0)).p).unit * math.random(10, 25)
  4006.  
  4007. Blood.Parent = _G.RobloxAdvanced.BloodEnabled == true and Workspace
  4008.  
  4009. if Character:FindFirstChild("Humanoid") ~= nil then Character.Humanoid:TakeDamage(0.25) end
  4010.  
  4011. if Character:FindFirstChild("Left Arm") ~= nil then RemoveLimb("Left Arm") end
  4012.  
  4013. end
  4014.  
  4015. if Character.Torso:FindFirstChild("Right Shoulder") == nil and Character.Torso:FindFirstChild("RightShoulder") == nil and Character.Torso:FindFirstChild("Right Shoulder 2") == nil then
  4016.  
  4017. local Blood = _G.RobloxAdvanced.MakeBlood()
  4018.  
  4019. Blood.CFrame = Character.Torso.CFrame * CFrame.new(1.2, 0.5, 0)
  4020.  
  4021. Blood.Velocity = (Blood.Position - (Character.Torso.CFrame * CFrame.new(0, 0.5, 0)).p).unit * math.random(10, 25)
  4022.  
  4023. Blood.Parent = _G.RobloxAdvanced.BloodEnabled == true and Workspace
  4024.  
  4025. if Character:FindFirstChild("Humanoid") ~= nil then Character.Humanoid:TakeDamage(0.25) end
  4026.  
  4027. if Character:FindFirstChild("Right Arm") ~= nil then RemoveLimb("Right Arm") end
  4028.  
  4029. end
  4030.  
  4031. if Character.Torso:FindFirstChild("Left Hip") == nil and Character.Torso:FindFirstChild("LeftHip") == nil and Character.Torso:FindFirstChild("Left Hip 2") == nil then
  4032.  
  4033. local Blood = _G.RobloxAdvanced.MakeBlood()
  4034.  
  4035. Blood.CFrame = Character.Torso.CFrame * CFrame.new(-0.5, -1.2, 0)
  4036.  
  4037. Blood.Velocity = (Blood.Position - (Character.Torso.CFrame * CFrame.new(-0.5, 0, 0)).p).unit * math.random(4, 8)
  4038.  
  4039. Blood.Parent = _G.RobloxAdvanced.BloodEnabled == true and Workspace
  4040.  
  4041. if Character:FindFirstChild("Humanoid") ~= nil then Character.Humanoid:TakeDamage(0.25) end
  4042.  
  4043. if Character:FindFirstChild("Left Leg") ~= nil then RemoveLimb("Left Leg") end
  4044.  
  4045. end
  4046.  
  4047. if Character.Torso:FindFirstChild("Right Hip") == nil and Character.Torso:FindFirstChild("RightHip") == nil and Character.Torso:FindFirstChild("Right Hip 2") == nil then
  4048.  
  4049. local Blood = _G.RobloxAdvanced.MakeBlood()
  4050.  
  4051. Blood.CFrame = Character.Torso.CFrame * CFrame.new(0.5, -1.2, 0)
  4052.  
  4053. Blood.Velocity = (Blood.Position - (Character.Torso.CFrame * CFrame.new(0.5, 0, 0)).p).unit * math.random(4, 80)
  4054.  
  4055. Blood.Parent = _G.RobloxAdvanced.BloodEnabled == true and Workspace
  4056.  
  4057. if Character:FindFirstChild("Humanoid") ~= nil then Character.Humanoid:TakeDamage(0.25) end
  4058.  
  4059. if Character:FindFirstChild("Right Leg") ~= nil then RemoveLimb("Right Leg") end
  4060.  
  4061. end
  4062.  
  4063. if Character.Torso:FindFirstChild("Neck") == nil then
  4064.  
  4065. local Blood = _G.RobloxAdvanced.MakeBlood()
  4066.  
  4067. Blood.CFrame = Character.Torso.CFrame * CFrame.new(0, 1, 0)
  4068.  
  4069. Blood.Velocity = (Blood.Position - Character.Torso.Position).unit * math.random(25, 75)
  4070.  
  4071. Blood.Parent = _G.RobloxAdvanced.BloodEnabled == true and Workspace
  4072.  
  4073. if Character:FindFirstChild("Head") ~= nil then
  4074.  
  4075. local Blood = _G.RobloxAdvanced.MakeBlood()
  4076.  
  4077. Blood.CFrame = Character.Head.CFrame * CFrame.new(0, -0.5, 0)
  4078.  
  4079. Blood.Velocity = (Blood.Position - Character.Head.Position).unit * math.random(5, 25)
  4080.  
  4081. Blood.Parent = Workspace
  4082.  
  4083. end
  4084.  
  4085. end
  4086.  
  4087. wait(0.11)
  4088.  
  4089. end
  4090.  
  4091. end)()
  4092.  
  4093. end
  4094.  
  4095. _G.RobloxAdvanced.Ragdoll = function(Format, Character, Force)
  4096.  
  4097. if Force ~= true then
  4098.  
  4099. if Character:FindFirstChild("Ragdoll") ~= nil and Format == true then return false end
  4100.  
  4101. if Character:FindFirstChild("Ragdoll") == nil and Format == false then return false end
  4102.  
  4103. end
  4104.  
  4105. local Head = nil
  4106.  
  4107. local Torso = nil
  4108.  
  4109. local Humanoid = nil
  4110.  
  4111. local Dead = false
  4112.  
  4113. for _, Children in pairs(Character:GetChildren()) do
  4114.  
  4115. if Children.ClassName == "ForceField" then Children:Remove() end
  4116.  
  4117. if Children.Name == "" then Children:Remove() end
  4118.  
  4119. if Children.Name == "Head" then Head = Children end
  4120.  
  4121. if Children.Name == "Torso" then Torso = Children end
  4122.  
  4123. if Children.ClassName == "Humanoid" then Humanoid = Children end
  4124.  
  4125. if Children:IsA("Accoutrement") then
  4126.  
  4127. if Children:FindFirstChild("Handle") ~= nil then
  4128.  
  4129. if math.random(1, 3) == 1 then
  4130.  
  4131. coroutine.wrap(function()
  4132.  
  4133. Children.Parent = Workspace
  4134.  
  4135. wait()
  4136.  
  4137. Children.Parent = Character
  4138.  
  4139. Children.Handle.CanCollide = true
  4140.  
  4141. end)()
  4142.  
  4143. else
  4144.  
  4145. Children.Parent = Workspace
  4146.  
  4147. Children.Handle.CanCollide = true
  4148.  
  4149. end
  4150.  
  4151. else
  4152.  
  4153. Children:Remove()
  4154.  
  4155. end
  4156.  
  4157. end
  4158.  
  4159. end
  4160.  
  4161. if Humanoid ~= nil then
  4162.  
  4163. if Humanoid.Health <= 0 then
  4164.  
  4165. Dead = true
  4166.  
  4167. end
  4168.  
  4169. end
  4170.  
  4171. if Torso ~= nil then
  4172.  
  4173. for _, Children2 in pairs(Torso:GetChildren()) do
  4174.  
  4175. if Children2:IsA("JointInstance") then
  4176.  
  4177. Children2:Remove()
  4178.  
  4179. end
  4180.  
  4181. end
  4182.  
  4183. end
  4184.  
  4185. if Head ~= nil and (function()
  4186.  
  4187. if Dead == true and math.random(1, 2) == 1 then
  4188.  
  4189. return true
  4190.  
  4191. else
  4192.  
  4193. return false
  4194.  
  4195. end
  4196.  
  4197. end)() == false then
  4198.  
  4199. local Neck = Instance.new("Motor6D")
  4200.  
  4201. Neck.Name = "Neck"
  4202.  
  4203. Neck.Part0 = Torso
  4204.  
  4205. Neck.Part1 = Head
  4206.  
  4207. Neck.C0 = CFrame.new(0, 1, 0) * CFrame.fromEulerAnglesXYZ(math.rad(-90), 0, math.rad(180))
  4208.  
  4209. Neck.C1 = CFrame.new(0, -0.5, 0) * CFrame.fromEulerAnglesXYZ(math.rad(-90), 0, math.rad(180))
  4210.  
  4211. Neck.MaxVelocity = 0.1
  4212.  
  4213. Neck.Parent = Torso
  4214.  
  4215. end
  4216.  
  4217. if Format == true then
  4218.  
  4219. local Ragdoll = Instance.new("IntValue")
  4220.  
  4221. Ragdoll.Name = "Ragdoll"
  4222.  
  4223. Ragdoll.Parent = Character
  4224.  
  4225. if Torso ~= nil then
  4226.  
  4227. Torso.Velocity = Torso.Velocity / 1.25
  4228.  
  4229. Torso.RotVelocity = (Torso.RotVelocity / 1.25) + Vector3.new(math.random(-25, 25), math.random(-25, 25), math.random(-25, 25))
  4230.  
  4231. if Dead == true then
  4232.  
  4233. if Humanoid ~= nil then
  4234.  
  4235. local Humanoid2 = Humanoid:Clone()
  4236.  
  4237. wait()
  4238.  
  4239. Humanoid:Remove()
  4240.  
  4241. Humanoid2.Parent = Character
  4242.  
  4243. Humanoid = Humanoid2
  4244.  
  4245. end
  4246.  
  4247. end
  4248.  
  4249. local Limb = Character:FindFirstChild("Right Arm")
  4250.  
  4251. if Limb ~= nil then
  4252.  
  4253. Limb.Velocity = Torso.Velocity
  4254.  
  4255. Limb.CFrame = Torso.CFrame * CFrame.new(1.5, 0, 0)
  4256.  
  4257. local Joint = Instance.new("Glue")
  4258.  
  4259. Joint.Name = "RightShoulder"
  4260.  
  4261. Joint.Part0 = Torso
  4262.  
  4263. Joint.Part1 = Limb
  4264.  
  4265. Joint.C0 = CFrame.new(1.5, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  4266.  
  4267. Joint.C1 = CFrame.new(-0, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  4268.  
  4269. Joint.Parent = Torso
  4270.  
  4271. local Weight = Instance.new("Part")
  4272.  
  4273. Weight.Name = ""
  4274.  
  4275. Weight.TopSurface = 0
  4276.  
  4277. Weight.BottomSurface = 0
  4278.  
  4279. Weight.Shape = "Block"
  4280.  
  4281. Weight.FormFactor = "Custom"
  4282.  
  4283. Weight.Size = Vector3.new(1, 1, 1)
  4284.  
  4285. Weight.Transparency = 1
  4286.  
  4287. Weight.CFrame = Limb.CFrame * CFrame.new(0, -0.5, 0)
  4288.  
  4289. Weight.Parent = Character
  4290.  
  4291. local Weld = Instance.new("Weld")
  4292.  
  4293. Weld.Part0 = Limb
  4294.  
  4295. Weld.Part1 = Weight
  4296.  
  4297. Weld.C0 = CFrame.new(0, -0.5, 0)
  4298.  
  4299. Weld.Parent = Limb
  4300.  
  4301. end
  4302.  
  4303. local Limb = Character:FindFirstChild("Left Arm")
  4304.  
  4305. if Limb then
  4306.  
  4307. Limb.Velocity = Torso.Velocity
  4308.  
  4309. Limb.CFrame = Torso.CFrame * CFrame.new(-1.5, 0, 0)
  4310.  
  4311. local Joint = Instance.new("Glue")
  4312.  
  4313. Joint.Name = "LeftShoulder"
  4314.  
  4315. Joint.Part0 = Torso
  4316.  
  4317. Joint.Part1 = Limb
  4318.  
  4319. Joint.C0 = CFrame.new(-1.5, 0.5, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
  4320.  
  4321. Joint.C1 = CFrame.new(0, 0.5, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
  4322.  
  4323. Joint.Parent = Torso
  4324.  
  4325. local Weight = Instance.new("Part")
  4326.  
  4327. Weight.Name = ""
  4328.  
  4329. Weight.TopSurface = 0
  4330.  
  4331. Weight.BottomSurface = 0
  4332.  
  4333. Weight.Shape = "Block"
  4334.  
  4335. Weight.FormFactor = "Custom"
  4336.  
  4337. Weight.Size = Vector3.new(1, 1, 1)
  4338.  
  4339. Weight.Transparency = 1
  4340.  
  4341. Weight.CFrame = Limb.CFrame * CFrame.new(0, -0.5, 0)
  4342.  
  4343. Weight.Parent = Character
  4344.  
  4345. local Weld = Instance.new("Weld")
  4346.  
  4347. Weld.Part0 = Limb
  4348.  
  4349. Weld.Part1 = Weight
  4350.  
  4351. Weld.C0 = CFrame.new(0, -0.5, 0)
  4352.  
  4353. Weld.Parent = Limb
  4354.  
  4355. end
  4356.  
  4357. local Limb = Character:FindFirstChild("Right Leg")
  4358.  
  4359. if Limb then
  4360.  
  4361. Limb.Velocity = Torso.Velocity
  4362.  
  4363. Limb.CFrame = Torso.CFrame * CFrame.new(0.5, -2, 0)
  4364.  
  4365. local Joint = Instance.new("Glue")
  4366.  
  4367. Joint.Name = "RightHip"
  4368.  
  4369. Joint.Part0 = Torso
  4370.  
  4371. Joint.Part1 = Limb
  4372.  
  4373. Joint.C0 = CFrame.new(0.5, -1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  4374.  
  4375. Joint.C1 = CFrame.new(0, 1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  4376.  
  4377. Joint.Parent = Torso
  4378.  
  4379. local Weight = Instance.new("Part")
  4380.  
  4381. Weight.Name = ""
  4382.  
  4383. Weight.TopSurface = 0
  4384.  
  4385. Weight.BottomSurface = 0
  4386.  
  4387. Weight.Shape = "Block"
  4388.  
  4389. Weight.FormFactor = "Custom"
  4390.  
  4391. Weight.Size = Vector3.new(1, 1, 1)
  4392.  
  4393. Weight.Transparency = 1
  4394.  
  4395. Weight.CFrame = Limb.CFrame * CFrame.new(0, -0.5, 0)
  4396.  
  4397. Weight.Parent = Character
  4398.  
  4399. local Weld = Instance.new("Weld")
  4400.  
  4401. Weld.Part0 = Limb
  4402.  
  4403. Weld.Part1 = Weight
  4404.  
  4405. Weld.C0 = CFrame.new(0, -0.5, 0)
  4406.  
  4407. Weld.Parent = Limb
  4408.  
  4409. end
  4410.  
  4411. local Limb = Character:FindFirstChild("Left Leg")
  4412.  
  4413. if Limb then
  4414.  
  4415. Limb.Velocity = Torso.Velocity
  4416.  
  4417. Limb.CFrame = Torso.CFrame * CFrame.new(-0.5, -2, 0)
  4418.  
  4419. local Joint = Instance.new("Glue")
  4420.  
  4421. Joint.Name = "LeftHip"
  4422.  
  4423. Joint.Part0 = Torso
  4424.  
  4425. Joint.Part1 = Limb
  4426.  
  4427. Joint.C0 = CFrame.new(-0.5, -1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
  4428.  
  4429. Joint.C1 = CFrame.new(-0, 1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
  4430.  
  4431. Joint.Parent = Torso
  4432.  
  4433. local Weight = Instance.new("Part")
  4434.  
  4435. Weight.Name = ""
  4436.  
  4437. Weight.TopSurface = 0
  4438.  
  4439. Weight.BottomSurface = 0
  4440.  
  4441. Weight.Shape = "Block"
  4442.  
  4443. Weight.FormFactor = "Custom"
  4444.  
  4445. Weight.Size = Vector3.new(1, 1, 1)
  4446.  
  4447. Weight.Transparency = 1
  4448.  
  4449. Weight.CFrame = Limb.CFrame * CFrame.new(0, -0.5, 0)
  4450.  
  4451. Weight.Parent = Character
  4452.  
  4453. local Weld = Instance.new("Weld")
  4454.  
  4455. Weld.Part0 = Limb
  4456.  
  4457. Weld.Part1 = Weight
  4458.  
  4459. Weld.C0 = CFrame.new(0, -0.5, 0)
  4460.  
  4461. Weld.Parent = Limb
  4462.  
  4463. end
  4464.  
  4465. local Weight = Instance.new("Part")
  4466.  
  4467. Weight.Name = ""
  4468.  
  4469. Weight.TopSurface = 0
  4470.  
  4471. Weight.BottomSurface = 0
  4472.  
  4473. Weight.Shape = "Block"
  4474.  
  4475. Weight.FormFactor = "Custom"
  4476.  
  4477. Weight.Size = Vector3.new(1.75, 1.5, 1.1)
  4478.  
  4479. Weight.Transparency = 1
  4480.  
  4481. Weight.CFrame = Torso.CFrame * CFrame.new(0, 0.5, 0)
  4482.  
  4483. Weight.Parent = Character
  4484.  
  4485. local Weld = Instance.new("Weld")
  4486.  
  4487. Weld.Part0 = Torso
  4488.  
  4489. Weld.Part1 = Weight
  4490.  
  4491. Weld.C0 = CFrame.new(0, 0.5, 0)
  4492.  
  4493. Weld.Parent = Torso
  4494.  
  4495. end
  4496.  
  4497. elseif Format == false then
  4498.  
  4499. if Character:FindFirstChild("Ragdoll") ~= nil then Character.Ragdoll:Remove() end
  4500.  
  4501. if Torso ~= nil then
  4502.  
  4503. local Limb = Character:FindFirstChild("Right Arm")
  4504.  
  4505. if Limb ~= nil then
  4506.  
  4507. local Joint = Instance.new("Motor6D")
  4508.  
  4509. Joint.Name = "Right Shoulder"
  4510.  
  4511. Joint.Part0 = Torso
  4512.  
  4513. Joint.Part1 = Limb
  4514.  
  4515. Joint.C0 = CFrame.new(1.5, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(90), 0)
  4516.  
  4517. Joint.C1 = CFrame.new(0, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(90), 0)
  4518.  
  4519. Joint.MaxVelocity = 0.15
  4520.  
  4521. Joint.Parent = Torso
  4522.  
  4523. end
  4524.  
  4525. local Limb = Character:FindFirstChild("Left Arm")
  4526.  
  4527. if Limb ~= nil then
  4528.  
  4529. local Joint = Instance.new("Motor6D")
  4530.  
  4531. Joint.Name = "Left Shoulder"
  4532.  
  4533. Joint.Part0 = Torso
  4534.  
  4535. Joint.Part1 = Limb
  4536.  
  4537. Joint.C0 = CFrame.new(-1.5, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(-90), 0)
  4538.  
  4539. Joint.C1 = CFrame.new(0, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(-90), 0)
  4540.  
  4541. Joint.MaxVelocity = 0.15
  4542.  
  4543. Joint.Parent = Torso
  4544.  
  4545. end
  4546.  
  4547. local Limb = Character:FindFirstChild("Right Leg")
  4548.  
  4549. if Limb ~= nil then
  4550.  
  4551. local Joint = Instance.new("Motor6D")
  4552.  
  4553. Joint.Name = "Right Hip"
  4554.  
  4555. Joint.Part0 = Torso
  4556.  
  4557. Joint.Part1 = Limb
  4558.  
  4559. Joint.C0 = CFrame.new(0.5, -1, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(90), 0)
  4560.  
  4561. Joint.C1 = CFrame.new(0, 1, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(90), 0)
  4562.  
  4563. Joint.MaxVelocity = 0.1
  4564.  
  4565. Joint.Parent = Torso
  4566.  
  4567. end
  4568.  
  4569. local Limb = Character:FindFirstChild("Left Leg")
  4570.  
  4571. if Limb ~= nil then
  4572.  
  4573. local Joint = Instance.new("Motor6D")
  4574.  
  4575. Joint.Name = "Left Hip"
  4576.  
  4577. Joint.Part0 = Torso
  4578.  
  4579. Joint.Part1 = Limb
  4580.  
  4581. Joint.C0 = CFrame.new(-0.5, -1, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(-90), 0)
  4582.  
  4583. Joint.C1 = CFrame.new(0, 1, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(-90), 0)
  4584.  
  4585. Joint.MaxVelocity = 0.1
  4586.  
  4587. Joint.Parent = Torso
  4588.  
  4589. end
  4590.  
  4591. local Animate = Character:FindFirstChild("Animate")
  4592.  
  4593. if Animate ~= nil then
  4594.  
  4595. local Animate2 = Animate:Clone()
  4596.  
  4597. Animate:Remove()
  4598.  
  4599. Animate2.Parent = Character
  4600.  
  4601. end
  4602.  
  4603. end
  4604.  
  4605. else
  4606.  
  4607. return false
  4608.  
  4609. end
  4610.  
  4611. return true, Format
  4612.  
  4613. end
  4614.  
  4615. table.insert(_G.RobloxAdvanced.Connections, Workspace.DescendantAdded:connect(_G.RobloxAdvanced.HookModelDeath))
  4616.  
  4617. table.insert(_G.RobloxAdvanced.Connections, game:GetService("Players").PlayerAdded:connect(_G.RobloxAdvanced.HookPlayerDeath))
  4618.  
  4619. for _, Players in pairs(game:GetService("Players"):GetPlayers()) do
  4620.  
  4621. _G.RobloxAdvanced.HookPlayerDeath(Players)
  4622.  
  4623. end
  4624.  
  4625. for _, Children in pairs(Workspace:GetChildren()) do
  4626.  
  4627. _G.RobloxAdvanced.HookModelDeath(Children)
  4628.  
  4629. end
  4630.  
  4631. end))
  4632. Script90.Name = "BloodScript"
  4633. Script90.Parent = Tool0
  4634. table.insert(cors,sandbox(Script90,function()
  4635. function onPlayerDied(dead)
  4636. local h = script.Parent.Humanoid
  4637. if (h.Health==0) then
  4638. local head = script.Parent.Head
  4639. local blood1 = Instance.new("Part")
  4640. blood1.BrickColor = BrickColor.new(21)
  4641. blood1.formFactor = 2
  4642. blood1.Size = Vector3.new(1, 0.4, 1)
  4643. blood1.Position = head.Position
  4644. blood1.Name = "Blood"
  4645. blood1.Parent = script.Parent
  4646. local blood2 = Instance.new("Part")
  4647. blood2.BrickColor = BrickColor.new(21)
  4648. blood2.formFactor = 2
  4649. blood2.Size = Vector3.new(1, 0.4, 1)
  4650. blood2.Position = head.Position
  4651. blood2.Name = "Blood"
  4652. blood2.Parent = script.Parent
  4653. local blood3 = Instance.new("Part")
  4654. blood3.BrickColor = BrickColor.new(21)
  4655. blood3.formFactor = 2
  4656. blood3.Size = Vector3.new(1, 0.4, 1)
  4657. blood3.Position = head.Position
  4658. blood3.Name = "Blood"
  4659. blood3.Parent = script.Parent
  4660. local blood4 = Instance.new("Part")
  4661. blood4.BrickColor = BrickColor.new(21)
  4662. blood4.formFactor = 2
  4663. blood4.Size = Vector3.new(1, 0.4, 1)
  4664. blood4.Position = head.Position
  4665. blood4.Name = "Blood"
  4666. blood4.Parent = script.Parent
  4667.  
  4668. end
  4669. end
  4670.  
  4671. script.Parent.Humanoid.Died:connect(onPlayerDied)
  4672.  
  4673. end))
  4674. Script91.Name = "Ragdoll"
  4675. Script91.Parent = Tool0
  4676. table.insert(cors,sandbox(Script91,function()
  4677. print("Hello world!")
  4678.  
  4679. Character = script.Parent
  4680. Humanoid = Character.Humanoid
  4681. Torso = Character.Torso
  4682.  
  4683. function OnDeath()
  4684. print("Death")
  4685. Humanoid.Parent = nil
  4686. if Torso then
  4687. local Head = Character:FindFirstChild("Head")
  4688. if Head then
  4689. local Neck = Instance.new("Weld")
  4690. Neck.Name = "Neck"
  4691. Neck.Part0 = Torso
  4692. Neck.Part1 = Head
  4693. Neck.C0 = CFrame.new(0, 1.5, 0)
  4694. Neck.C1 = CFrame.new()
  4695. Neck.Parent = Torso
  4696. end
  4697. local Limb = Character:FindFirstChild("Right Arm")
  4698. if Limb then
  4699.  
  4700. Limb.CFrame = Torso.CFrame * CFrame.new(1.5, 0, 0)
  4701. local Joint = Instance.new("Glue")
  4702. Joint.Name = "RightShoulder"
  4703. Joint.Part0 = Torso
  4704. Joint.Part1 = Limb
  4705. Joint.C0 = CFrame.new(1.5, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  4706. Joint.C1 = CFrame.new(-0, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  4707. Joint.Parent = Torso
  4708.  
  4709. local B = Instance.new("Part")
  4710. B.TopSurface = 0
  4711. B.BottomSurface = 0
  4712. B.formFactor = "Symmetric"
  4713. B.Size = Vector3.new(1, 1, 1)
  4714. B.Transparency = 1
  4715. B.CFrame = Limb.CFrame * CFrame.new(0, -0.5, 0)
  4716. B.Parent = Character
  4717. local W = Instance.new("Weld")
  4718. W.Part0 = Limb
  4719. W.Part1 = B
  4720. W.C0 = CFrame.new(0, -0.5, 0)
  4721. W.Parent = Limb
  4722.  
  4723. end
  4724. local Limb = Character:FindFirstChild("Left Arm")
  4725. if Limb then
  4726.  
  4727. Limb.CFrame = Torso.CFrame * CFrame.new(-1.5, 0, 0)
  4728. local Joint = Instance.new("Glue")
  4729. Joint.Name = "LeftShoulder"
  4730. Joint.Part0 = Torso
  4731. Joint.Part1 = Limb
  4732. Joint.C0 = CFrame.new(-1.5, 0.5, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
  4733. Joint.C1 = CFrame.new(0, 0.5, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
  4734. Joint.Parent = Torso
  4735.  
  4736. local B = Instance.new("Part")
  4737. B.TopSurface = 0
  4738. B.BottomSurface = 0
  4739. B.formFactor = "Symmetric"
  4740. B.Size = Vector3.new(1, 1, 1)
  4741. B.Transparency = 1
  4742. B.CFrame = Limb.CFrame * CFrame.new(0, -0.5, 0)
  4743. B.Parent = Character
  4744. local W = Instance.new("Weld")
  4745. W.Part0 = Limb
  4746. W.Part1 = B
  4747. W.C0 = CFrame.new(0, -0.5, 0)
  4748. W.Parent = Limb
  4749.  
  4750. end
  4751. local Limb = Character:FindFirstChild("Right Leg")
  4752. if Limb then
  4753.  
  4754. Limb.CFrame = Torso.CFrame * CFrame.new(0.5, -2, 0)
  4755. local Joint = Instance.new("Glue")
  4756. Joint.Name = "RightHip"
  4757. Joint.Part0 = Torso
  4758. Joint.Part1 = Limb
  4759. Joint.C0 = CFrame.new(0.5, -1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  4760. Joint.C1 = CFrame.new(0, 1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  4761. Joint.Parent = Torso
  4762.  
  4763. local B = Instance.new("Part")
  4764. B.TopSurface = 0
  4765. B.BottomSurface = 0
  4766. B.formFactor = "Symmetric"
  4767. B.Size = Vector3.new(1, 1, 1)
  4768. B.Transparency = 1
  4769. B.CFrame = Limb.CFrame * CFrame.new(0, -0.5, 0)
  4770. B.Parent = Character
  4771. local W = Instance.new("Weld")
  4772. W.Part0 = Limb
  4773. W.Part1 = B
  4774. W.C0 = CFrame.new(0, -0.5, 0)
  4775. W.Parent = Limb
  4776.  
  4777. end
  4778. local Limb = Character:FindFirstChild("Left Leg")
  4779. if Limb then
  4780.  
  4781. Limb.CFrame = Torso.CFrame * CFrame.new(-0.5, -2, 0)
  4782. local Joint = Instance.new("Glue")
  4783. Joint.Name = "LeftHip"
  4784. Joint.Part0 = Torso
  4785. Joint.Part1 = Limb
  4786. Joint.C0 = CFrame.new(-0.5, -1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
  4787. Joint.C1 = CFrame.new(-0, 1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
  4788. Joint.Parent = Torso
  4789.  
  4790. local B = Instance.new("Part")
  4791. B.TopSurface = 0
  4792. B.BottomSurface = 0
  4793. B.formFactor = "Symmetric"
  4794. B.Size = Vector3.new(1, 1, 1)
  4795. B.Transparency = 1
  4796. B.CFrame = Limb.CFrame * CFrame.new(0, -0.5, 0)
  4797. B.Parent = Character
  4798. local W = Instance.new("Weld")
  4799. W.Part0 = Limb
  4800. W.Part1 = B
  4801. W.C0 = CFrame.new(0, -0.5, 0)
  4802. W.Parent = Limb
  4803.  
  4804. end
  4805. --[
  4806. local Bar = Instance.new("Part")
  4807. Bar.TopSurface = 0
  4808. Bar.BottomSurface = 0
  4809. Bar.formFactor = "Symmetric"
  4810. Bar.Size = Vector3.new(1, 1, 1)
  4811. Bar.Transparency = 1
  4812. Bar.CFrame = Torso.CFrame * CFrame.new(0, 0.5, 0)
  4813. Bar.Parent = Character
  4814. local Weld = Instance.new("Weld")
  4815. Weld.Part0 = Torso
  4816. Weld.Part1 = Bar
  4817. Weld.C0 = CFrame.new(0, 0.5, 0)
  4818. Weld.Parent = Torso
  4819. --]]
  4820. end
  4821. end
  4822.  
  4823. Humanoid.Died:connect(OnDeath)
  4824.  
  4825. end))
  4826. Script92.Name = "RagdollInitializer"
  4827. Script92.Parent = Tool0
  4828. table.insert(cors,sandbox(Script92,function()
  4829. print("Bouyer's Ragdoll Physics Loaded")
  4830. function OnEntered(Player)
  4831. while Player.Character == nil do -- Notice it does not use break.
  4832. wait()
  4833. end
  4834. wait(1)
  4835. Player.Changed:connect(function(Property)
  4836. if Property == "Character" then
  4837. if Player.Character then
  4838. local Mods = script:GetChildren()
  4839. for X = 1, # Mods do
  4840. if Mods[X].className == "Script" or Mods[X].className == "LocalScript" then
  4841. local S = Mods[X]:Clone()
  4842. S.Disabled = false
  4843. S.Parent = Player.Character
  4844. end
  4845. end
  4846. end
  4847. end
  4848. end)
  4849. local Mods = script:GetChildren()
  4850. for X = 1, # Mods do
  4851. if Mods[X].className == "Script" or Mods[X].className == "LocalScript" then
  4852. local S = Mods[X]:Clone()
  4853. S.Disabled = false
  4854. S.Parent = Player.Character
  4855. end
  4856. end
  4857. end
  4858. game.Players.ChildAdded:connect(OnEntered)
  4859. end))
  4860. Script93.Name = "Ragdoll"
  4861. Script93.Parent = Script92
  4862. table.insert(cors,sandbox(Script93,function()
  4863. print("Hello world!")
  4864.  
  4865. Character = script.Parent
  4866. Humanoid = Character.Humanoid
  4867. Torso = Character.Torso
  4868.  
  4869. function OnDeath()
  4870. print("Death")
  4871. Humanoid.Parent = nil
  4872. if Torso then
  4873. local Head = Character:FindFirstChild("Head")
  4874. if Head then
  4875. local Neck = Instance.new("Weld")
  4876. Neck.Name = "Neck"
  4877. Neck.Part0 = Torso
  4878. Neck.Part1 = Head
  4879. Neck.C0 = CFrame.new(0, 1.5, 0)
  4880. Neck.C1 = CFrame.new()
  4881. Neck.Parent = Torso
  4882. end
  4883. local Limb = Character:FindFirstChild("Right Arm")
  4884. if Limb then
  4885.  
  4886. Limb.CFrame = Torso.CFrame * CFrame.new(1.5, 0, 0)
  4887. local Joint = Instance.new("Glue")
  4888. Joint.Name = "RightShoulder"
  4889. Joint.Part0 = Torso
  4890. Joint.Part1 = Limb
  4891. Joint.C0 = CFrame.new(1.5, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  4892. Joint.C1 = CFrame.new(-0, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  4893. Joint.Parent = Torso
  4894.  
  4895. local B = Instance.new("Part")
  4896. B.TopSurface = 0
  4897. B.BottomSurface = 0
  4898. B.formFactor = "Symmetric"
  4899. B.Size = Vector3.new(1, 1, 1)
  4900. B.Transparency = 1
  4901. B.CFrame = Limb.CFrame * CFrame.new(0, -0.5, 0)
  4902. B.Parent = Character
  4903. local W = Instance.new("Weld")
  4904. W.Part0 = Limb
  4905. W.Part1 = B
  4906. W.C0 = CFrame.new(0, -0.5, 0)
  4907. W.Parent = Limb
  4908.  
  4909. end
  4910. local Limb = Character:FindFirstChild("Left Arm")
  4911. if Limb then
  4912.  
  4913. Limb.CFrame = Torso.CFrame * CFrame.new(-1.5, 0, 0)
  4914. local Joint = Instance.new("Glue")
  4915. Joint.Name = "LeftShoulder"
  4916. Joint.Part0 = Torso
  4917. Joint.Part1 = Limb
  4918. Joint.C0 = CFrame.new(-1.5, 0.5, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
  4919. Joint.C1 = CFrame.new(0, 0.5, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
  4920. Joint.Parent = Torso
  4921.  
  4922. local B = Instance.new("Part")
  4923. B.TopSurface = 0
  4924. B.BottomSurface = 0
  4925. B.formFactor = "Symmetric"
  4926. B.Size = Vector3.new(1, 1, 1)
  4927. B.Transparency = 1
  4928. B.CFrame = Limb.CFrame * CFrame.new(0, -0.5, 0)
  4929. B.Parent = Character
  4930. local W = Instance.new("Weld")
  4931. W.Part0 = Limb
  4932. W.Part1 = B
  4933. W.C0 = CFrame.new(0, -0.5, 0)
  4934. W.Parent = Limb
  4935.  
  4936. end
  4937. local Limb = Character:FindFirstChild("Right Leg")
  4938. if Limb then
  4939.  
  4940. Limb.CFrame = Torso.CFrame * CFrame.new(0.5, -2, 0)
  4941. local Joint = Instance.new("Glue")
  4942. Joint.Name = "RightHip"
  4943. Joint.Part0 = Torso
  4944. Joint.Part1 = Limb
  4945. Joint.C0 = CFrame.new(0.5, -1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  4946. Joint.C1 = CFrame.new(0, 1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  4947. Joint.Parent = Torso
  4948.  
  4949. local B = Instance.new("Part")
  4950. B.TopSurface = 0
  4951. B.BottomSurface = 0
  4952. B.formFactor = "Symmetric"
  4953. B.Size = Vector3.new(1, 1, 1)
  4954. B.Transparency = 1
  4955. B.CFrame = Limb.CFrame * CFrame.new(0, -0.5, 0)
  4956. B.Parent = Character
  4957. local W = Instance.new("Weld")
  4958. W.Part0 = Limb
  4959. W.Part1 = B
  4960. W.C0 = CFrame.new(0, -0.5, 0)
  4961. W.Parent = Limb
  4962.  
  4963. end
  4964. local Limb = Character:FindFirstChild("Left Leg")
  4965. if Limb then
  4966.  
  4967. Limb.CFrame = Torso.CFrame * CFrame.new(-0.5, -2, 0)
  4968. local Joint = Instance.new("Glue")
  4969. Joint.Name = "LeftHip"
  4970. Joint.Part0 = Torso
  4971. Joint.Part1 = Limb
  4972. Joint.C0 = CFrame.new(-0.5, -1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
  4973. Joint.C1 = CFrame.new(-0, 1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
  4974. Joint.Parent = Torso
  4975.  
  4976. local B = Instance.new("Part")
  4977. B.TopSurface = 0
  4978. B.BottomSurface = 0
  4979. B.formFactor = "Symmetric"
  4980. B.Size = Vector3.new(1, 1, 1)
  4981. B.Transparency = 1
  4982. B.CFrame = Limb.CFrame * CFrame.new(0, -0.5, 0)
  4983. B.Parent = Character
  4984. local W = Instance.new("Weld")
  4985. W.Part0 = Limb
  4986. W.Part1 = B
  4987. W.C0 = CFrame.new(0, -0.5, 0)
  4988. W.Parent = Limb
  4989.  
  4990. end
  4991. --[
  4992. local Bar = Instance.new("Part")
  4993. Bar.TopSurface = 0
  4994. Bar.BottomSurface = 0
  4995. Bar.formFactor = "Symmetric"
  4996. Bar.Size = Vector3.new(1, 1, 1)
  4997. Bar.Transparency = 1
  4998. Bar.CFrame = Torso.CFrame * CFrame.new(0, 0.5, 0)
  4999. Bar.Parent = Character
  5000. local Weld = Instance.new("Weld")
  5001. Weld.Part0 = Torso
  5002. Weld.Part1 = Bar
  5003. Weld.C0 = CFrame.new(0, 0.5, 0)
  5004. Weld.Parent = Torso
  5005. --]]
  5006. end
  5007. end
  5008.  
  5009. Humanoid.Died:connect(OnDeath)
  5010.  
  5011. end))
  5012. NumberValue94.Name = "Ammo"
  5013. NumberValue94.Parent = Tool0
  5014. NumberValue94.Value = 10000
  5015. NumberValue95.Name = "BulletSpeed"
  5016. NumberValue95.Parent = Tool0
  5017. NumberValue95.Value = 800
  5018. StringValue96.Name = "BulletType"
  5019. StringValue96.Parent = Tool0
  5020. StringValue96.Value = "5.45x39mm"
  5021. NumberValue97.Name = "GLAmmo"
  5022. NumberValue97.Parent = Tool0
  5023. NumberValue97.Value = 10000
  5024. StringValue98.Name = "GName"
  5025. StringValue98.Parent = Tool0
  5026. StringValue98.Value = "AK74m"
  5027. NumberValue99.Name = "MagSize"
  5028. NumberValue99.Parent = Tool0
  5029. NumberValue99.Value = 30
  5030. NumberValue100.Name = "Mags"
  5031. NumberValue100.Parent = Tool0
  5032. NumberValue100.Value = 90
  5033. NumberValue101.Name = "RPM"
  5034. NumberValue101.Parent = Tool0
  5035. NumberValue101.Value = 545
  5036. StringValue102.Name = "Type"
  5037. StringValue102.Parent = Tool0
  5038. StringValue102.Value = "Primary"
  5039. Script103.Name = "Weld"
  5040. Script103.Parent = Tool0
  5041. table.insert(cors,sandbox(Script103,function()
  5042. function Weld(x,y,Name)
  5043. local W = Instance.new("Weld")
  5044. W.Name = Name
  5045. W.Part0 = x
  5046. W.Part1 = y
  5047. local CJ = CFrame.new(x.Position)
  5048. local C0 = x.CFrame:inverse()*CJ
  5049. local C1 = y.CFrame:inverse()*CJ
  5050. W.C0 = C0
  5051. W.C1 = C1
  5052. W.Parent = x
  5053. end
  5054.  
  5055.  
  5056.  
  5057. function Get(A)
  5058. if A.Name == "Slide" then
  5059. Weld(script.Parent.Handle, A,"Slide")
  5060. A.Anchored = false
  5061. elseif A.className == "Part" or A.className == "UnionOperation" or A.className == "MeshPart" and not A.Name == "Bolt" then
  5062. Weld(script.Parent.Handle, A,"Weld")
  5063. A.Anchored = false
  5064. else
  5065. local C = A:GetChildren()
  5066. for i=1, #C do
  5067. Get(C[i])
  5068. end
  5069. end
  5070. end
  5071.  
  5072. function Finale()
  5073. Get(script.Parent)
  5074. end
  5075.  
  5076.  
  5077.  
  5078. Finale()
  5079. end))
  5080. LocalScript104.Parent = Tool0
  5081. table.insert(cors,sandbox(LocalScript104,function()
  5082.  
  5083. wait(1)
  5084. --Warning if You removed this,You're head wont follow to the Camera, I made it seperately cuz to prevent lag(Hope so)
  5085. local Player = game.Players.LocalPlayer
  5086. local Character = Player.Character
  5087. local Humanoid = Character.Humanoid
  5088. local Mouse = Player:GetMouse()
  5089. local Tool = script.Parent
  5090. local Camera = game.Workspace.CurrentCamera
  5091.  
  5092. local Equipped = false
  5093.  
  5094. local RA = Character:WaitForChild("Right Arm")
  5095. local LA = Character:WaitForChild("Left Arm")
  5096. local HumanoidRootPart = Character:WaitForChild("HumanoidRootPart")
  5097.  
  5098. local Torso = Character:WaitForChild("Torso")
  5099. local Neck = Torso["Neck"]
  5100. local FRA
  5101. local FLA
  5102. local FRW
  5103. local FLW
  5104.  
  5105. function MakeArmModel()
  5106. arms = Instance.new("Model", Camera)
  5107. arms.Name = "Arms"
  5108. end
  5109.  
  5110. function RemoveArmModel()
  5111. arms:Destroy()
  5112. end
  5113.  
  5114.  
  5115. -- Making the FakeArms
  5116. function MakeFakeArms()
  5117. FRA = RA:clone()
  5118. FRA.Parent = arms
  5119. FRA.Name = "Right Arm"
  5120. FRA.FormFactor = "Custom"
  5121. FRA.Size = Vector3.new(0.6,1.9,0.6)
  5122. FRA.Transparency = 0
  5123. FRA.Anchored = false
  5124.  
  5125. FRW = Instance.new("Motor6D")
  5126. FRW.Part0 = FRA
  5127. FRW.Part1 = RA
  5128. FRW.Parent = FRA
  5129. FRW.C0 = CFrame.new(0.2,0,0.2)
  5130. FRW.C1 = CFrame.new()
  5131.  
  5132. FLA = LA:clone()
  5133. FLA.Parent = arms
  5134. FLA.Name = "Left Arm"
  5135. FLA.FormFactor = "Custom"
  5136. FLA.Size = Vector3.new(0.6,1.9,0.6)
  5137. FLA.Transparency = 0
  5138. FLA.Anchored = false
  5139.  
  5140. FLW = Instance.new("Motor6D")
  5141. FLW.Part0 = FLA
  5142. FLW.Part1 = LA
  5143. FLW.Parent = FLA
  5144. FLW.C0 = CFrame.new(-0.2,0,0.2)
  5145. FLW.C1 = CFrame.new()
  5146. end
  5147.  
  5148. function RemoveFakeArms()
  5149. FRA:Destroy()
  5150. FLA:Destroy()
  5151. end
  5152.  
  5153.  
  5154. -- Making Arm Model Stuff
  5155. function MakeArmStuff()
  5156. local Human = Instance.new("Humanoid")
  5157. Human.MaxHealth = 0
  5158. Human.Health = 0
  5159. Human.Name = ""
  5160. Human.Parent = arms
  5161.  
  5162. local newShirt = Character:WaitForChild("Shirt"):clone()
  5163. newShirt.Parent = arms
  5164. end
  5165.  
  5166. Tool.Equipped:connect(function()
  5167. Equipped = true
  5168. MakeArmModel()
  5169. MakeFakeArms()
  5170. MakeArmStuff()
  5171. game:GetService("RunService").RenderStepped:connect(function()
  5172. if Equipped then
  5173. local HRPCF = HumanoidRootPart.CFrame * CFrame.new(0, 1.5, 0)* CFrame.new(Humanoid.CameraOffset)
  5174. Neck.C0 = Torso.CFrame:toObjectSpace(HRPCF)
  5175. Neck.C1 = CFrame.Angles(-math.asin(Camera.CoordinateFrame.lookVector.y), 0, 0)
  5176. end
  5177. end)
  5178. end)
  5179.  
  5180. Tool.Unequipped:connect(function()
  5181. Equipped = false
  5182. RemoveArmModel()
  5183. RemoveFakeArms()
  5184. Character.Torso.Neck.C0 = CFrame.new(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
  5185. Character.Torso.Neck.C1 = CFrame.new(0, -0.5, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
  5186. end)
  5187.  
  5188.  
  5189. end))
  5190. LocalScript105.Parent = Tool0
  5191. table.insert(cors,sandbox(LocalScript105,function()
  5192. repeat wait() until game.Players.LocalPlayer.Character
  5193. repeat wait(1) until game.Players.LocalPlayer.Character:IsDescendantOf(game.Workspace)
  5194. wait(4 / 20)
  5195.  
  5196. local Player = game.Players.LocalPlayer
  5197. local player = game.Players.LocalPlayer
  5198. local Character = Player.Character
  5199. local char = Player.Character
  5200. local Humanoid = Character.Humanoid
  5201. local Mouse = Player:GetMouse()
  5202. local mouse = Player:GetMouse()
  5203.  
  5204. local Camera = game.Workspace.CurrentCamera
  5205.  
  5206. local HumanoidRootPart = Character.HumanoidRootPart
  5207.  
  5208. local Torso = Character.Torso
  5209. local Neck = Torso:WaitForChild("Neck")
  5210.  
  5211. game.Players.LocalPlayer.CameraMaxZoomDistance = 15
  5212. game.Players.LocalPlayer.CameraMinZoomDistance = 0
  5213.  
  5214. local NightVision = false
  5215.  
  5216.  
  5217. local AltPressed = false
  5218.  
  5219. local Stances = 0
  5220. _G.SteadyStance = false
  5221. _G.LeanR = 0
  5222. _G.LeanL = 0
  5223.  
  5224. local RAW
  5225. local LAW
  5226. ----------------
  5227. local RootPart = char:WaitForChild("HumanoidRootPart")
  5228. local RootJoint = RootPart.RootJoint
  5229. RootJoint.C0 = CFrame.new()
  5230. RootJoint.C1 = CFrame.new()
  5231.  
  5232. local Aiming = false
  5233.  
  5234. local ZoomDistance = 40
  5235.  
  5236. local NV
  5237.  
  5238. ----------------
  5239.  
  5240. ---------------------------------------------------------------------------------------
  5241. ---------------- [ Tween Module ] --------------------------------------------------------
  5242. ---------------------------------------------------------------------------------------
  5243.  
  5244.  
  5245. --[[
  5246.  
  5247. tweenJoint Function Parameters:
  5248.  
  5249. Object Joint - This has to be a weld with a C0 and C1 property
  5250.  
  5251. CFrame newC0 - This is what the new C0 of the weld will be. You can put nil if you don't want to effect the C0
  5252.  
  5253. CFrame newC1 - This is what the new C1 of the weld will be. You can put nil if you don't want to effect the C1
  5254.  
  5255. function Alpha - This is an alpha function that takes an input parameter of a number between 0 and 90 and returns a number between 0 and 1.
  5256. For example, function(X) return math.sin(math.rad(X)) end
  5257.  
  5258. float Duration - This is how long the tweening takes to complete
  5259.  
  5260. --]]
  5261. local RS = game:GetService("RunService")
  5262.  
  5263.  
  5264.  
  5265. function tweenJoint(Joint, newC0, newC1, Alpha, Duration)
  5266. spawn(function()
  5267. local newCode = math.random(-1e9, 1e9) --This creates a random code between -1000000000 and 1000000000
  5268. local tweenIndicator = nil
  5269. if (not Joint:findFirstChild("tweenCode")) then --If the joint isn't being tweened, then
  5270. tweenIndicator = Instance.new("IntValue")
  5271. tweenIndicator.Name = "tweenCode"
  5272. tweenIndicator.Value = newCode
  5273. tweenIndicator.Parent = Joint
  5274. else
  5275. tweenIndicator = Joint.tweenCode
  5276. tweenIndicator.Value = newCode --If the joint is already being tweened, this will change the code, and the tween loop will stop
  5277. end
  5278. if Duration <= 0 then --If the duration is less than or equal to 0 then there's no need for a tweening loop
  5279. if newC0 then Joint.C0 = newC0 end
  5280. if newC1 then Joint.C1 = newC1 end
  5281. else
  5282. local Increment = 1.5 / Duration --Calculate the increment here so it doesn't need to be calculated in the loop
  5283. local startC0 = Joint.C0
  5284. local startC1 = Joint.C1
  5285. local X = 0
  5286. while true do
  5287. RS.RenderStepped:wait() --This makes the for loop step every 1/60th of a second
  5288. local newX = X + Increment
  5289. X = (newX > 90 and 90 or newX) --Makes sure the X never goes above 90
  5290. if tweenIndicator.Value ~= newCode then break end --This makes sure that another tween wasn't called on the same joint
  5291. if newC0 then Joint.C0 = startC0:lerp(newC0, Alpha(X)) end
  5292. if newC1 then Joint.C1 = startC1:lerp(newC1, Alpha(X)) end
  5293. if X == 90 then break end --If the tweening is done...
  5294. end
  5295. end
  5296. if tweenIndicator.Value == newCode then --If this tween functions was the last one called on a joint then it will remove the code
  5297. tweenIndicator:Destroy()
  5298. end
  5299. end)
  5300. end
  5301.  
  5302. function CreateWeld(Part, CF)
  5303. local w = Instance.new("Weld")
  5304. w.Name = "LegWeld"
  5305. w.Parent = Torso
  5306. w.Part0 = Torso
  5307. w.Part1 = Part
  5308.  
  5309. tweenJoint(w, nil, CF, function(X) return math.sin(math.rad(X)) end, 0.25)
  5310. end
  5311.  
  5312. ----------------------------------------------
  5313. local RS = Torso["Right Shoulder"]
  5314. local LS = Torso["Left Shoulder"]
  5315. local RH = char["Torso"]:WaitForChild("Right Hip")
  5316. local LH = char["Torso"]:WaitForChild("Left Hip")
  5317. local LeftLeg = char["Left Leg"]
  5318. local RightLeg = char["Right Leg"]
  5319. local Proned2
  5320.  
  5321.  
  5322.  
  5323. function TweenCOffset(CO, t)
  5324. coroutine.resume(coroutine.create(function()
  5325. COn = COn and COn + 1 or 0 local COn_S = COn
  5326. for i = 1, t do
  5327. if COn ~= COn_S then break end
  5328. char.Humanoid.CameraOffset = char.Humanoid.CameraOffset + (CO - char.Humanoid.CameraOffset) * (i / t)
  5329. game:GetService("RunService").RenderStepped:wait()
  5330. end
  5331. end))
  5332. end
  5333.  
  5334. function TweenTransparency(Part,Trans, t)
  5335. coroutine.resume(coroutine.create(function()
  5336. COn = COn and COn + 1 or 0 local COn_S = COn
  5337. for i = 1, t do
  5338. if COn ~= COn_S then break end
  5339. Part.Transparency = Part.Transparency + (Trans - Part.Transparency) * (i / t)
  5340. game:GetService("RunService").RenderStepped:wait()
  5341. end
  5342. end))
  5343. end
  5344.  
  5345. function TweenColor(Part,Color, t)
  5346. coroutine.resume(coroutine.create(function()
  5347. COn = COn and COn + 1 or 0 local COn_S = COn
  5348. for i = 1, t do
  5349. if COn ~= COn_S then break end
  5350. Part.BrickColor = Part.BrickColor + (Color - Part.BrickColor) * (i / t)
  5351. game:GetService("RunService").RenderStepped:wait()
  5352. end
  5353. end))
  5354. end
  5355.  
  5356. function Stand()
  5357.  
  5358. TweenCOffset(Vector3.new(0,0,0), 20)
  5359. Humanoid.WalkSpeed = 16
  5360. Humanoid.JumpPower = 30
  5361.  
  5362. IsStanced = false
  5363.  
  5364. LH.Part1 = LeftLeg
  5365. RH.Part1 = RightLeg
  5366.  
  5367. Proned2 = Vector3.new(0,0,0)
  5368. tweenJoint(RootJoint, CFrame.new()* CFrame.Angles(math.rad(-0),0,math.rad(0)), CFrame.new(0,0,0), function(X) return math.sin(math.rad(X)) end, 0.25)
  5369. tweenJoint(RH, CFrame.new(1,-1,0)* CFrame.Angles(math.rad(-0),math.rad(90),math.rad(0)), nil, function(X) return math.sin(math.rad(X)) end, 0.25)
  5370. tweenJoint(LH, CFrame.new(-1,-1,0)* CFrame.Angles(math.rad(-0),math.rad(-90),math.rad(0)), nil, function(X) return math.sin(math.rad(X)) end, 0.25)
  5371. tweenJoint(RS, CFrame.new(1,0.5,0)* CFrame.Angles(math.rad(0),math.rad(90),math.rad(0)), nil, function(X) return math.sin(math.rad(X)) end, 0.25)
  5372. tweenJoint(LS, CFrame.new(-1,0.5,0)* CFrame.Angles(math.rad(0),math.rad(-90),math.rad(0)), nil, function(X) return math.sin(math.rad(X)) end, 0.25)
  5373. for i, s in pairs(Torso:GetChildren()) do
  5374. if (s.Name == "LegWeld") and (s.ClassName == "Weld") then
  5375. s:Destroy()
  5376. end
  5377. end
  5378. end
  5379.  
  5380. function StandEquip()
  5381.  
  5382. TweenCOffset(Vector3.new(0,0,0), 20)
  5383. Humanoid.WalkSpeed = 12
  5384. Humanoid.JumpPower = 25
  5385. IsStanced = false
  5386.  
  5387. LH.Part1 = LeftLeg
  5388. RH.Part1 = RightLeg
  5389.  
  5390. Proned2 = Vector3.new(0,0,0)
  5391. tweenJoint(RootJoint, CFrame.new(0,0,0.275)* CFrame.Angles(math.rad(-10),0,math.rad(0)), CFrame.new(0,0,0), function(X) return math.sin(math.rad(X)) end, 0.25)
  5392. tweenJoint(RH, CFrame.new(1,-1,-0.15)* CFrame.Angles(math.rad(20),math.rad(90),math.rad(0)), nil, function(X) return math.sin(math.rad(X)) end, 0.25)
  5393. tweenJoint(LH, CFrame.new(-1,-1,-0.2)* CFrame.Angles(math.rad(-10),math.rad(-90),math.rad(0)), nil, function(X) return math.sin(math.rad(X)) end, 0.25)
  5394. tweenJoint(RS, CFrame.new(1,0.5,0)* CFrame.Angles(math.rad(0),math.rad(90),math.rad(0)), nil, function(X) return math.sin(math.rad(X)) end, 0.25)
  5395. tweenJoint(LS, CFrame.new(-1,0.5,0)* CFrame.Angles(math.rad(0),math.rad(-90),math.rad(0)), nil, function(X) return math.sin(math.rad(X)) end, 0.25)
  5396. for i, s in pairs(Torso:GetChildren()) do
  5397. if (s.Name == "LegWeld") and (s.ClassName == "Weld") then
  5398. s:Destroy()
  5399. end
  5400. end
  5401.  
  5402. end
  5403.  
  5404.  
  5405.  
  5406. function Crouch()
  5407.  
  5408. TweenCOffset(Vector3.new(0, -1,0), 20)
  5409. Humanoid.WalkSpeed = 8
  5410. Humanoid.JumpPower = 10
  5411. for i, s in pairs(Torso:GetChildren()) do
  5412. if (s.Name == "LegWeld") and (s.ClassName == "Weld") then
  5413. s:Destroy()
  5414. end
  5415. end
  5416. IsStanced = true
  5417. RH.Part1 = RightLeg
  5418. LH.Part1 = LeftLeg
  5419. Proned2 = Vector3.new(0,0,0)
  5420. tweenJoint(RootJoint, CFrame.new(0,-1,0.25)* CFrame.Angles(math.rad(-10),0,math.rad(0)), CFrame.new(0,0,0), function(X) return math.sin(math.rad(X)) end, 0.25)
  5421. tweenJoint(RH, CFrame.new(1,-0.35,-0.65)* CFrame.Angles(math.rad(-20),math.rad(90),math.rad(0)), nil, function(X) return math.sin(math.rad(X)) end, 0.25)
  5422. tweenJoint(LH, CFrame.new(-1,-1.25,-0.625)* CFrame.Angles(math.rad(-60),math.rad(-90),math.rad(0)), nil, function(X) return math.sin(math.rad(X)) end, 0.25)
  5423. tweenJoint(RS, CFrame.new(1,0.5,0)* CFrame.Angles(math.rad(0),math.rad(90),math.rad(0)), nil, function(X) return math.sin(math.rad(X)) end, 0.25)
  5424. tweenJoint(LS, CFrame.new(-1,0.5,0)* CFrame.Angles(math.rad(0),math.rad(-90),math.rad(0)), nil, function(X) return math.sin(math.rad(X)) end, 0.25)
  5425.  
  5426. end
  5427.  
  5428. function Prone()
  5429.  
  5430. TweenCOffset(Vector3.new(0, -3.25, 0), 20)
  5431. Humanoid.WalkSpeed = 4
  5432. Humanoid.JumpPower = 0
  5433. IsStanced = true
  5434. RH.Part1 = nil
  5435. LH.Part1 = nil
  5436. Proned2 = Vector3.new(0,0.5,0.5)
  5437. tweenJoint(RootJoint, CFrame.new(0,-2.5,1.35)* CFrame.Angles(math.rad(-90),0,math.rad(0)), nil, function(X) return math.sin(math.rad(X)) end, 0.25)
  5438. tweenJoint(RS, CFrame.new(0.9,1.1,0)* CFrame.Angles(math.rad(-180),math.rad(90),math.rad(0)), nil, function(X) return math.sin(math.rad(X)) end, 0.25)
  5439. tweenJoint(LS, CFrame.new(-0.9,1.1,0)* CFrame.Angles(math.rad(-180),math.rad(-90),math.rad(0)), nil, function(X) return math.sin(math.rad(X)) end, 0.25)
  5440.  
  5441. CreateWeld(RightLeg, CFrame.new(-0.2,1.85,0)* CFrame.Angles(math.rad(-0),0,math.rad(-20)))
  5442. CreateWeld(LeftLeg, CFrame.new(0.2,1.85,0)* CFrame.Angles(math.rad(-0),0,math.rad(20)))
  5443. end
  5444.  
  5445. local AlreadyProned = false
  5446.  
  5447. mouse.KeyDown:connect(function(Key)
  5448. if Key == "c" and Stances == 0 and not _G.Sprinting and not _G.Lean then
  5449. Stances = 1
  5450. Crouch()
  5451.  
  5452. _G.Crouched = true
  5453. elseif Key == "c" and Stances == 1 and not _G.Sprinting and not _G.Lean then
  5454. Stances = 2
  5455. Prone()
  5456.  
  5457. _G.Crouched = false
  5458. _G.Proned = true
  5459.  
  5460. elseif Key == "x" and Stances == 2 and not _G.Sprinting and not _G.Lean then
  5461. _G.Crouched = true
  5462. _G.Proned = false
  5463. Stances = 1
  5464. Crouch()
  5465.  
  5466.  
  5467. elseif Key == "x" and Stances == 1 and not _G.Sprinting and not _G.Lean then
  5468. _G.Crouched = false
  5469.  
  5470.  
  5471. Stances = 0
  5472. if not _G.SteadyStance then
  5473. Stand()
  5474. elseif _G.SteadyStance then
  5475. StandEquip()
  5476. end
  5477.  
  5478. end
  5479.  
  5480. if Key == "z" and not _G.SteadyStance and Stances == 0 then
  5481. if not _G.Lean and Stances == 0 then
  5482. StandEquip()
  5483. end
  5484. _G.SteadyStance = true
  5485. elseif Key == "z" and _G.SteadyStance and Stances == 0 then
  5486. if not _G.Lean and Stances == 0 then
  5487. Stand()
  5488.  
  5489. end
  5490. _G.SteadyStance = false
  5491. end
  5492.  
  5493. if Key:byte() == 308 or Key:byte() == 307 then
  5494. AltPressed = true
  5495. print("Alt pressed")
  5496. end
  5497.  
  5498.  
  5499. end)
  5500.  
  5501. mouse.KeyUp:connect(function(Key)
  5502. if Key:byte() == 308 then
  5503. AltPressed = false
  5504. end
  5505. end)
  5506.  
  5507. Stand()
  5508.  
  5509. -------------Motor6Ding Section------------------------
  5510.  
  5511. Character.Humanoid.Died:connect(function()
  5512. Stand()
  5513. _G.Proned = false
  5514. _G.Crouched = false
  5515. _G.Sprinting = false
  5516. Player.TeamColor = BrickColor.new("Deep blue")
  5517. end)
  5518.  
  5519.  
  5520.  
  5521. game:GetService("RunService").RenderStepped:connect(function()
  5522. Mouse.TargetFilter = game.Workspace
  5523.  
  5524.  
  5525. if Aiming then
  5526. game:GetService('UserInputService').MouseDeltaSensitivity = Player.PlayerGui:WaitForChild("ScreenGui").Frame.Sensitivity.Text
  5527. else
  5528. game:GetService('UserInputService').MouseDeltaSensitivity = 1
  5529. end
  5530.  
  5531. Mouse.Button2Down:connect(function()
  5532. if not Aiming then
  5533. Aiming = true
  5534. end
  5535. end)
  5536. Mouse.Button2Up:connect(function()
  5537. if Aiming then
  5538. Aiming = false
  5539. end
  5540. end)
  5541.  
  5542. end)
  5543.  
  5544.  
  5545. end))
  5546. LocalScript106.Parent = Tool0
  5547. table.insert(cors,sandbox(LocalScript106,function()
  5548. repeat wait() until game.Players.LocalPlayer.Character
  5549. repeat wait(1) until game.Players.LocalPlayer.Character:IsDescendantOf(game.Workspace)
  5550. wait(4 / 20)
  5551.  
  5552. local Player = game.Players.LocalPlayer
  5553. local player = game.Players.LocalPlayer
  5554. local Character = Player.Character
  5555. local char = Player.Character
  5556. local Humanoid = Character.Humanoid
  5557. local Mouse = Player:GetMouse()
  5558. local mouse = Player:GetMouse()
  5559.  
  5560. local Camera = game.Workspace.CurrentCamera
  5561.  
  5562. local HumanoidRootPart = Character.HumanoidRootPart
  5563.  
  5564. local Torso = Character.Torso
  5565. local Neck = Torso:WaitForChild("Neck")
  5566.  
  5567. game.Players.LocalPlayer.CameraMaxZoomDistance = 15
  5568. game.Players.LocalPlayer.CameraMinZoomDistance = 0
  5569.  
  5570. local NightVision = false
  5571.  
  5572.  
  5573. local AltPressed = false
  5574.  
  5575. local Stances = 0
  5576. _G.SteadyStance = false
  5577. _G.LeanR = 0
  5578. _G.LeanL = 0
  5579.  
  5580. local RAW
  5581. local LAW
  5582. ----------------
  5583. local RootPart = char:WaitForChild("HumanoidRootPart")
  5584. local RootJoint = RootPart.RootJoint
  5585. RootJoint.C0 = CFrame.new()
  5586. RootJoint.C1 = CFrame.new()
  5587.  
  5588. local Aiming = false
  5589.  
  5590. local ZoomDistance = 40
  5591.  
  5592. local NV
  5593.  
  5594. ----------------
  5595.  
  5596. ---------------------------------------------------------------------------------------
  5597. ---------------- [ Tween Module ] --------------------------------------------------------
  5598. ---------------------------------------------------------------------------------------
  5599.  
  5600.  
  5601. --[[
  5602.  
  5603. tweenJoint Function Parameters:
  5604.  
  5605. Object Joint - This has to be a weld with a C0 and C1 property
  5606.  
  5607. CFrame newC0 - This is what the new C0 of the weld will be. You can put nil if you don't want to effect the C0
  5608.  
  5609. CFrame newC1 - This is what the new C1 of the weld will be. You can put nil if you don't want to effect the C1
  5610.  
  5611. function Alpha - This is an alpha function that takes an input parameter of a number between 0 and 90 and returns a number between 0 and 1.
  5612. For example, function(X) return math.sin(math.rad(X)) end
  5613.  
  5614. float Duration - This is how long the tweening takes to complete
  5615.  
  5616. --]]
  5617. local RS = game:GetService("RunService")
  5618.  
  5619.  
  5620.  
  5621. function tweenJoint(Joint, newC0, newC1, Alpha, Duration)
  5622. spawn(function()
  5623. local newCode = math.random(-1e9, 1e9) --This creates a random code between -1000000000 and 1000000000
  5624. local tweenIndicator = nil
  5625. if (not Joint:findFirstChild("tweenCode")) then --If the joint isn't being tweened, then
  5626. tweenIndicator = Instance.new("IntValue")
  5627. tweenIndicator.Name = "tweenCode"
  5628. tweenIndicator.Value = newCode
  5629. tweenIndicator.Parent = Joint
  5630. else
  5631. tweenIndicator = Joint.tweenCode
  5632. tweenIndicator.Value = newCode --If the joint is already being tweened, this will change the code, and the tween loop will stop
  5633. end
  5634. if Duration <= 0 then --If the duration is less than or equal to 0 then there's no need for a tweening loop
  5635. if newC0 then Joint.C0 = newC0 end
  5636. if newC1 then Joint.C1 = newC1 end
  5637. else
  5638. local Increment = 1.5 / Duration --Calculate the increment here so it doesn't need to be calculated in the loop
  5639. local startC0 = Joint.C0
  5640. local startC1 = Joint.C1
  5641. local X = 0
  5642. while true do
  5643. RS.RenderStepped:wait() --This makes the for loop step every 1/60th of a second
  5644. local newX = X + Increment
  5645. X = (newX > 90 and 90 or newX) --Makes sure the X never goes above 90
  5646. if tweenIndicator.Value ~= newCode then break end --This makes sure that another tween wasn't called on the same joint
  5647. if newC0 then Joint.C0 = startC0:lerp(newC0, Alpha(X)) end
  5648. if newC1 then Joint.C1 = startC1:lerp(newC1, Alpha(X)) end
  5649. if X == 90 then break end --If the tweening is done...
  5650. end
  5651. end
  5652. if tweenIndicator.Value == newCode then --If this tween functions was the last one called on a joint then it will remove the code
  5653. tweenIndicator:Destroy()
  5654. end
  5655. end)
  5656. end
  5657.  
  5658. function CreateWeld(Part, CF)
  5659. local w = Instance.new("Weld")
  5660. w.Name = "LegWeld"
  5661. w.Parent = Torso
  5662. w.Part0 = Torso
  5663. w.Part1 = Part
  5664.  
  5665. tweenJoint(w, nil, CF, function(X) return math.sin(math.rad(X)) end, 0.25)
  5666. end
  5667.  
  5668. ----------------------------------------------
  5669. local RS = Torso["Right Shoulder"]
  5670. local LS = Torso["Left Shoulder"]
  5671. local RH = char["Torso"]:WaitForChild("Right Hip")
  5672. local LH = char["Torso"]:WaitForChild("Left Hip")
  5673. local LeftLeg = char["Left Leg"]
  5674. local RightLeg = char["Right Leg"]
  5675. local Proned2
  5676.  
  5677.  
  5678.  
  5679. function TweenCOffset(CO, t)
  5680. coroutine.resume(coroutine.create(function()
  5681. COn = COn and COn + 1 or 0 local COn_S = COn
  5682. for i = 1, t do
  5683. if COn ~= COn_S then break end
  5684. char.Humanoid.CameraOffset = char.Humanoid.CameraOffset + (CO - char.Humanoid.CameraOffset) * (i / t)
  5685. game:GetService("RunService").RenderStepped:wait()
  5686. end
  5687. end))
  5688. end
  5689.  
  5690. function TweenTransparency(Part,Trans, t)
  5691. coroutine.resume(coroutine.create(function()
  5692. COn = COn and COn + 1 or 0 local COn_S = COn
  5693. for i = 1, t do
  5694. if COn ~= COn_S then break end
  5695. Part.Transparency = Part.Transparency + (Trans - Part.Transparency) * (i / t)
  5696. game:GetService("RunService").RenderStepped:wait()
  5697. end
  5698. end))
  5699. end
  5700.  
  5701. function TweenColor(Part,Color, t)
  5702. coroutine.resume(coroutine.create(function()
  5703. COn = COn and COn + 1 or 0 local COn_S = COn
  5704. for i = 1, t do
  5705. if COn ~= COn_S then break end
  5706. Part.BrickColor = Part.BrickColor + (Color - Part.BrickColor) * (i / t)
  5707. game:GetService("RunService").RenderStepped:wait()
  5708. end
  5709. end))
  5710. end
  5711.  
  5712. function Stand()
  5713.  
  5714. TweenCOffset(Vector3.new(0,0,0), 20)
  5715. Humanoid.WalkSpeed = 16
  5716. Humanoid.JumpPower = 30
  5717.  
  5718. IsStanced = false
  5719.  
  5720. LH.Part1 = LeftLeg
  5721. RH.Part1 = RightLeg
  5722.  
  5723. Proned2 = Vector3.new(0,0,0)
  5724. tweenJoint(RootJoint, CFrame.new()* CFrame.Angles(math.rad(-0),0,math.rad(0)), CFrame.new(0,0,0), function(X) return math.sin(math.rad(X)) end, 0.25)
  5725. tweenJoint(RH, CFrame.new(1,-1,0)* CFrame.Angles(math.rad(-0),math.rad(90),math.rad(0)), nil, function(X) return math.sin(math.rad(X)) end, 0.25)
  5726. tweenJoint(LH, CFrame.new(-1,-1,0)* CFrame.Angles(math.rad(-0),math.rad(-90),math.rad(0)), nil, function(X) return math.sin(math.rad(X)) end, 0.25)
  5727. tweenJoint(RS, CFrame.new(1,0.5,0)* CFrame.Angles(math.rad(0),math.rad(90),math.rad(0)), nil, function(X) return math.sin(math.rad(X)) end, 0.25)
  5728. tweenJoint(LS, CFrame.new(-1,0.5,0)* CFrame.Angles(math.rad(0),math.rad(-90),math.rad(0)), nil, function(X) return math.sin(math.rad(X)) end, 0.25)
  5729. for i, s in pairs(Torso:GetChildren()) do
  5730. if (s.Name == "LegWeld") and (s.ClassName == "Weld") then
  5731. s:Destroy()
  5732. end
  5733. end
  5734. end
  5735.  
  5736. function StandEquip()
  5737.  
  5738. TweenCOffset(Vector3.new(0,0,0), 20)
  5739. Humanoid.WalkSpeed = 12
  5740. Humanoid.JumpPower = 25
  5741. IsStanced = false
  5742.  
  5743. LH.Part1 = LeftLeg
  5744. RH.Part1 = RightLeg
  5745.  
  5746. Proned2 = Vector3.new(0,0,0)
  5747. tweenJoint(RootJoint, CFrame.new(0,0,0.275)* CFrame.Angles(math.rad(-10),0,math.rad(0)), CFrame.new(0,0,0), function(X) return math.sin(math.rad(X)) end, 0.25)
  5748. tweenJoint(RH, CFrame.new(1,-1,-0.15)* CFrame.Angles(math.rad(20),math.rad(90),math.rad(0)), nil, function(X) return math.sin(math.rad(X)) end, 0.25)
  5749. tweenJoint(LH, CFrame.new(-1,-1,-0.2)* CFrame.Angles(math.rad(-10),math.rad(-90),math.rad(0)), nil, function(X) return math.sin(math.rad(X)) end, 0.25)
  5750. tweenJoint(RS, CFrame.new(1,0.5,0)* CFrame.Angles(math.rad(0),math.rad(90),math.rad(0)), nil, function(X) return math.sin(math.rad(X)) end, 0.25)
  5751. tweenJoint(LS, CFrame.new(-1,0.5,0)* CFrame.Angles(math.rad(0),math.rad(-90),math.rad(0)), nil, function(X) return math.sin(math.rad(X)) end, 0.25)
  5752. for i, s in pairs(Torso:GetChildren()) do
  5753. if (s.Name == "LegWeld") and (s.ClassName == "Weld") then
  5754. s:Destroy()
  5755. end
  5756. end
  5757.  
  5758. end
  5759.  
  5760.  
  5761.  
  5762. function Crouch()
  5763.  
  5764. TweenCOffset(Vector3.new(0, -1,0), 20)
  5765. Humanoid.WalkSpeed = 8
  5766. Humanoid.JumpPower = 10
  5767. for i, s in pairs(Torso:GetChildren()) do
  5768. if (s.Name == "LegWeld") and (s.ClassName == "Weld") then
  5769. s:Destroy()
  5770. end
  5771. end
  5772. IsStanced = true
  5773. RH.Part1 = RightLeg
  5774. LH.Part1 = LeftLeg
  5775. Proned2 = Vector3.new(0,0,0)
  5776. tweenJoint(RootJoint, CFrame.new(0,-1,0.25)* CFrame.Angles(math.rad(-10),0,math.rad(0)), CFrame.new(0,0,0), function(X) return math.sin(math.rad(X)) end, 0.25)
  5777. tweenJoint(RH, CFrame.new(1,-0.35,-0.65)* CFrame.Angles(math.rad(-20),math.rad(90),math.rad(0)), nil, function(X) return math.sin(math.rad(X)) end, 0.25)
  5778. tweenJoint(LH, CFrame.new(-1,-1.25,-0.625)* CFrame.Angles(math.rad(-60),math.rad(-90),math.rad(0)), nil, function(X) return math.sin(math.rad(X)) end, 0.25)
  5779. tweenJoint(RS, CFrame.new(1,0.5,0)* CFrame.Angles(math.rad(0),math.rad(90),math.rad(0)), nil, function(X) return math.sin(math.rad(X)) end, 0.25)
  5780. tweenJoint(LS, CFrame.new(-1,0.5,0)* CFrame.Angles(math.rad(0),math.rad(-90),math.rad(0)), nil, function(X) return math.sin(math.rad(X)) end, 0.25)
  5781.  
  5782. end
  5783.  
  5784. function Prone()
  5785.  
  5786. TweenCOffset(Vector3.new(0, -3.25, 0), 20)
  5787. Humanoid.WalkSpeed = 4
  5788. Humanoid.JumpPower = 0
  5789. IsStanced = true
  5790. RH.Part1 = nil
  5791. LH.Part1 = nil
  5792. Proned2 = Vector3.new(0,0.5,0.5)
  5793. tweenJoint(RootJoint, CFrame.new(0,-2.5,1.35)* CFrame.Angles(math.rad(-90),0,math.rad(0)), nil, function(X) return math.sin(math.rad(X)) end, 0.25)
  5794. tweenJoint(RS, CFrame.new(0.9,1.1,0)* CFrame.Angles(math.rad(-180),math.rad(90),math.rad(0)), nil, function(X) return math.sin(math.rad(X)) end, 0.25)
  5795. tweenJoint(LS, CFrame.new(-0.9,1.1,0)* CFrame.Angles(math.rad(-180),math.rad(-90),math.rad(0)), nil, function(X) return math.sin(math.rad(X)) end, 0.25)
  5796.  
  5797. CreateWeld(RightLeg, CFrame.new(-0.2,1.85,0)* CFrame.Angles(math.rad(-0),0,math.rad(-20)))
  5798. CreateWeld(LeftLeg, CFrame.new(0.2,1.85,0)* CFrame.Angles(math.rad(-0),0,math.rad(20)))
  5799. end
  5800.  
  5801. local AlreadyProned = false
  5802.  
  5803. mouse.KeyDown:connect(function(Key)
  5804. if Key == "c" and Stances == 0 and not _G.Sprinting and not _G.Lean then
  5805. Stances = 1
  5806. Crouch()
  5807.  
  5808. _G.Crouched = true
  5809. elseif Key == "c" and Stances == 1 and not _G.Sprinting and not _G.Lean then
  5810. Stances = 2
  5811. Prone()
  5812.  
  5813. _G.Crouched = false
  5814. _G.Proned = true
  5815.  
  5816. elseif Key == "x" and Stances == 2 and not _G.Sprinting and not _G.Lean then
  5817. _G.Crouched = true
  5818. _G.Proned = false
  5819. Stances = 1
  5820. Crouch()
  5821.  
  5822.  
  5823. elseif Key == "x" and Stances == 1 and not _G.Sprinting and not _G.Lean then
  5824. _G.Crouched = false
  5825.  
  5826.  
  5827. Stances = 0
  5828. if not _G.SteadyStance then
  5829. Stand()
  5830. elseif _G.SteadyStance then
  5831. StandEquip()
  5832. end
  5833.  
  5834. end
  5835.  
  5836. if Key == "z" and not _G.SteadyStance and Stances == 0 then
  5837. if not _G.Lean and Stances == 0 then
  5838. StandEquip()
  5839. end
  5840. _G.SteadyStance = true
  5841. elseif Key == "z" and _G.SteadyStance and Stances == 0 then
  5842. if not _G.Lean and Stances == 0 then
  5843. Stand()
  5844.  
  5845. end
  5846. _G.SteadyStance = false
  5847. end
  5848.  
  5849. if Key:byte() == 308 or Key:byte() == 307 then
  5850. AltPressed = true
  5851. print("Alt pressed")
  5852. end
  5853.  
  5854.  
  5855. end)
  5856.  
  5857. mouse.KeyUp:connect(function(Key)
  5858. if Key:byte() == 308 then
  5859. AltPressed = false
  5860. end
  5861. end)
  5862.  
  5863. Stand()
  5864.  
  5865. -------------Motor6Ding Section------------------------
  5866.  
  5867. Character.Humanoid.Died:connect(function()
  5868. Stand()
  5869. _G.Proned = false
  5870. _G.Crouched = false
  5871. _G.Sprinting = false
  5872. Player.TeamColor = BrickColor.new("Deep blue")
  5873. end)
  5874.  
  5875.  
  5876.  
  5877. game:GetService("RunService").RenderStepped:connect(function()
  5878. Mouse.TargetFilter = game.Workspace
  5879.  
  5880.  
  5881. if Aiming then
  5882. game:GetService('UserInputService').MouseDeltaSensitivity = Player.PlayerGui:WaitForChild("ScreenGui").Frame.Sensitivity.Text
  5883. else
  5884. game:GetService('UserInputService').MouseDeltaSensitivity = 1
  5885. end
  5886.  
  5887. Mouse.Button2Down:connect(function()
  5888. if not Aiming then
  5889. Aiming = true
  5890. end
  5891. end)
  5892. Mouse.Button2Up:connect(function()
  5893. if Aiming then
  5894. Aiming = false
  5895. end
  5896. end)
  5897.  
  5898. end)
  5899.  
  5900.  
  5901. end))
  5902. for i,v in pairs(mas:GetChildren()) do
  5903. v.Parent = game:GetService("Players").LocalPlayer.Backpack
  5904. pcall(function() v:MakeJoints() end)
  5905. end
  5906. mas:Destroy()
  5907. for i,v in pairs(cors) do
  5908. spawn(function()
  5909. pcall(v)
  5910. end)
  5911. end
Add Comment
Please, Sign In to add comment