Advertisement
Guest User

Untitled

a guest
Oct 17th, 2017
188
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 54.65 KB | None | 0 0
  1. wait(0.5)
  2. local player = game.Players.LocalPlayer
  3. local backpack, playergui = player:WaitForChild("Backpack"), player:WaitForChild("PlayerGui")
  4. repeat wait(0.1) until player.Character
  5. local char, camera = player.Character, workspace.CurrentCamera
  6. local tool = script.Parent
  7. local handle = tool:WaitForChild("Handle")
  8. local barrel = tool:WaitForChild("Barrel")
  9. local GunGUI = tool:WaitForChild("GunGUI")
  10. local replicatedstorage = game:GetService("ReplicatedStorage")
  11.  
  12. local create = assert(LoadLibrary("RbxUtility")).Create
  13. local storage = game:GetService("ReplicatedStorage")
  14. local debris = game:GetService("Debris")
  15.  
  16. local cframe, cframeXYZ, vector = CFrame.new, CFrame.fromEulerAnglesXYZ, Vector3.new
  17.  
  18. local arms = {
  19. Left = cframe(-0.249, 1.35, 0.6) * cframeXYZ(math.rad(290), 0, math.rad(-90)),
  20. Right = cframe(-0.7, 0.4, 0.35) * cframeXYZ(math.rad(-90),math.rad(-5),math.rad(0))
  21. }
  22.  
  23. local cursor = {
  24. Standard = "http://www.roblox.com/asset/?id=205898768",
  25. }
  26.  
  27. local creator = create("ObjectValue"){Name = "creator", Value = player}
  28. local laser = create("Part"){Name = "Ray", Anchored = true, CanCollide = false, formFactor = 0, Size = vector(1, 1, 1), BrickColor = BrickColor.new("New Yeller"), Reflectance = 0.2, Transparency = 0.25, Material="Neon"}
  29. local mesh = create("BlockMesh"){Parent = laser, Name = "Mesh", Scale = Vector3.new(0.15, 0.15, 1)}
  30.  
  31. local armToggle = char:FindFirstChild("armToggle") and char.armToggle or create("BoolValue"){Parent = char, Name = "armToggle"}
  32.  
  33.  
  34. local fireMode = "Auto" -- Auto/Semi/Shotgun
  35. local clip = 30
  36. local spread = 4 -- In studs
  37. local firerate = 0.04
  38. local damage = 14
  39. local mag = clip
  40.  
  41. local teamkill = false
  42. local equipped = false
  43. local mouseDown = false
  44. local reloading = false
  45. local canFire = true
  46. local firing = false
  47.  
  48. local crouch = false
  49.  
  50. -- Remote Events --
  51. local shootevent = replicatedstorage:WaitForChild("ShootEvent")
  52. -----------------------------------------------------------------------------------------------------------
  53. if tool:FindFirstChild("used") then
  54. mag = 0
  55. else
  56. create("ObjectValue"){Name = "used", Parent = tool}
  57. end
  58.  
  59. local welding = {}
  60. welding.Weld = create("Weld"){}
  61.  
  62. local leftCrouchWeld, rightCrouchWeld = create("Weld"){}, create("Weld"){}
  63.  
  64. function welding.SetArms(bool)
  65. local torso = char:FindFirstChild("Torso")
  66. local leftS, rightS = torso:FindFirstChild("Left Shoulder"), torso:FindFirstChild("Right Shoulder")
  67. local left, right = char:FindFirstChild("Left Arm"), char:FindFirstChild("Right Arm")
  68. if bool then
  69. leftS.Part1, rightS.Part1 = nil, nil
  70. leftWeld = welding.Weld:Clone()
  71. leftWeld.Name = "Weld1"; leftWeld.Part0 = torso; leftWeld.Part1 = left; leftWeld.C1 = arms.Left; leftWeld.Parent = torso
  72. rightWeld = welding.Weld:Clone()
  73. rightWeld.Name = "Weld2"; rightWeld.Part0 = torso; rightWeld.Part1 = right; rightWeld.C1 = arms.Right; rightWeld.Parent = torso
  74. print("welded arms!")
  75. FakeLeftArm, FakeRightArm = left:Clone(), right:Clone()
  76. FakeLeftArm:ClearAllChildren()
  77. FakeLeftArm.Name = "FakeLeftArm"
  78. FakeLeftArm.FormFactor = "Custom"
  79. FakeLeftArm.Material = "SmoothPlastic"
  80. FakeLeftArm.Size = Vector3.new(0.9, 1.75, 0.9)
  81. FakeLeftArm.Transparency = 0.6
  82. FakeLeftArm.Parent = tool
  83. local flaWeld = welding.Weld:Clone()
  84. flaWeld.Parent = FakeLeftArm; flaWeld.Part0 = left; flaWeld.Part1 = FakeLeftArm
  85. FakeRightArm.Name = "FakeRightArm"
  86. FakeRightArm:ClearAllChildren()
  87. FakeRightArm.FormFactor = "Custom"
  88. FakeRightArm.Material = "SmoothPlastic"
  89. FakeRightArm.Size = Vector3.new(0.9, 1.75, 0.9)
  90. FakeRightArm.Transparency = 0.6
  91. FakeRightArm.Parent = tool
  92. local fraWeld = welding.Weld:Clone()
  93. fraWeld.Parent = FakeRightArm; fraWeld.Part0 = right; fraWeld.Part1 = FakeRightArm
  94. print("fake arms created!")
  95. else
  96. leftS.Part1, rightS.Part1 = left, right
  97. if leftWeld and rightWeld then
  98. leftWeld:Destroy()
  99. rightWeld:Destroy()
  100. end
  101. if FakeLeftArm and FakeRightArm then
  102. FakeLeftArm:Destroy()
  103. FakeRightArm:Destroy()
  104. end
  105. end
  106. end
  107.  
  108. function welding.Default(...)
  109. if char and char:FindFirstChild("Torso") and char.Torso:FindFirstChild("Weld1") and char.Torso:FindFirstChild("Weld2") then
  110. local Left = char.Torso:FindFirstChild("Weld1")
  111. local Right = char.Torso:FindFirstChild("Weld2")
  112. Left.C1 = arms.Left
  113. Right.C1 = arms.Right
  114. char.Humanoid.WalkSpeed = 16
  115. end
  116. end
  117. function welding.Default2(...)
  118. script.Parent.GripForward=Vector3.new(0, 0, -1)
  119. script.Parent.GripPos=Vector3.new(0, 0, 0)
  120. script.Parent.GripRight=Vector3.new(1, 0, 0)
  121. script.Parent.GripUp=Vector3.new(0, 1, 0)
  122. end
  123. function welding.Holster(...)
  124. local left = char.Torso:FindFirstChild("Weld1")
  125. local right = char.Torso:FindFirstChild("Weld2")
  126.  
  127. right.C1 = right.C1 * CFrame.Angles(math.pi/6, -math.pi/6, 0) * CFrame.new(-0.5, 0.1, 0)
  128. left.C1 = left.C1 * CFrame.Angles(math.pi/6, 0, 0) * CFrame.new(0.5, -0.5, -0.5)
  129. end
  130.  
  131. function welding.Crouch(bool)
  132. if bool then
  133. if char:FindFirstChild('Left Leg') and char:findFirstChild('Right Leg') and char:findFirstChild('HumanoidRootPart') and char.HumanoidRootPart:findFirstChild('RootJoint') and char.Torso and char.Torso:findFirstChild('Left Hip') and char.Torso:findFirstChild('Right Hip') then
  134. char.Torso['Right Hip'].Part1 = nil
  135. char.Torso['Left Hip'].Part1 = nil
  136. char.HumanoidRootPart.RootJoint.C1 = CFrame.new(0,1,0)*CFrame.Angles(math.rad(90),math.rad(180),0)
  137. leftCrouchWeld.Part0 = char.Torso leftCrouchWeld.Parent = char.Torso leftCrouchWeld.Part1 = char['Left Leg']
  138. rightCrouchWeld.Part0 = char.Torso rightCrouchWeld.Parent = char.Torso rightCrouchWeld.Part1 = char['Right Leg']
  139. leftCrouchWeld.C1 = CFrame.new(.5,.5,1.5)*CFrame.Angles(math.rad(90),0,0)
  140. rightCrouchWeld.C1 = CFrame.new(-.55,1.3,.5)*CFrame.Angles(math.rad(-15),0,0)
  141. end
  142. else
  143. if char:findFirstChild('Left Leg') and char:findFirstChild('Right Leg') and char:findFirstChild('HumanoidRootPart') and char.HumanoidRootPart:findFirstChild('RootJoint') and char.Torso and char.Torso:findFirstChild('Left Hip') and char.Torso:findFirstChild('Right Hip') then
  144. char.Torso['Right Hip'].Part1 = char['Right Leg']
  145. char.Torso['Left Hip'].Part1 = char['Left Leg']
  146. char.HumanoidRootPart.RootJoint.C1 = CFrame.new(0,0,0)*CFrame.Angles(math.rad(90),math.rad(180),0)
  147. leftCrouchWeld.Parent = nil rightCrouchWeld.Parent = nil
  148. end
  149. end
  150. end
  151.  
  152. local arCooldown = 0.09
  153. function welding.Animations(...)
  154. if char and char:FindFirstChild("Torso") and char.Torso:FindFirstChild("Weld1") and char.Torso:FindFirstChild("Weld2") then
  155. local weld55 = char.Torso:FindFirstChild("Weld1")
  156. local weld33 = char.Torso:FindFirstChild("Weld2")
  157. weld55.C1 = CFrame.new(-0.25, 1.15, 0.6) * CFrame.fromEulerAnglesXYZ(math.rad(300), 0, math.rad(-90))
  158. weld33.C1 = CFrame.new(-0.7, 0.4, 0.35) * CFrame.fromEulerAnglesXYZ(math.rad(-95), math.rad(-5), 0)
  159. wait(0.02)
  160. weld55.C1 = CFrame.new(-0.15, 0.95, 0.6) * CFrame.fromEulerAnglesXYZ(math.rad(310), 0, math.rad(-90))
  161. weld33.C1 = CFrame.new(-0.7, 0.4, 0.35) * CFrame.fromEulerAnglesXYZ(math.rad(-100), math.rad(-5), 0)
  162. wait(0.02)
  163. weld55.C1 = CFrame.new(-0.05, 0.75, 0.6) * CFrame.fromEulerAnglesXYZ(math.rad(320), 0, math.rad(-90))
  164. weld33.C1 = CFrame.new(-0.7, 0.4, 0.35) * CFrame.fromEulerAnglesXYZ(math.rad(-105), math.rad(-5), 0)
  165. wait(0.02)
  166. weld55.C1 = CFrame.new(0.05, 0.55, 0.6) * CFrame.fromEulerAnglesXYZ(math.rad(330), 0, math.rad(-90))
  167. weld33.C1 = CFrame.new(-0.7, 0.4, 0.35) * CFrame.fromEulerAnglesXYZ(math.rad(-110), math.rad(-5), 0)
  168. wait(0.02)
  169. weld55.C1 = CFrame.new(0.15, 0.35, 0.6) * CFrame.fromEulerAnglesXYZ(math.rad(340), 0, math.rad(-90))
  170. weld33.C1 = CFrame.new(-0.7, 0.4, 0.35) * CFrame.fromEulerAnglesXYZ(math.rad(-100), math.rad(-5), 0)
  171. wait(0.02)
  172. weld55.C1 = CFrame.new(0.2, 0.15, 0.6) * CFrame.fromEulerAnglesXYZ(math.rad(350), 0, math.rad(-90))
  173. weld33.C1 = CFrame.new(-0.7, 0.4, 0.35) * CFrame.fromEulerAnglesXYZ(math.rad(-90), math.rad(-5), 0)
  174. wait(0.02)
  175. weld55.C1 = CFrame.new(0.2, -0.2, 0.6) * CFrame.fromEulerAnglesXYZ(math.rad(360), 0, math.rad(-90))
  176. weld33.C1 = CFrame.new(-0.7, 0.4, 0.35) * CFrame.fromEulerAnglesXYZ(math.rad(-80), math.rad(-5), 0)
  177. wait(0.2)
  178. weld55.C1 = CFrame.new(0.17, 0, 0.55) * CFrame.fromEulerAnglesXYZ(math.rad(350), 0, math.rad(-90))
  179. weld33.C1 = CFrame.new(-0.7, 0.4, 0.35) * CFrame.fromEulerAnglesXYZ(math.rad(-85), math.rad(-5), 0)
  180. wait(0.02)
  181. weld55.C1 = CFrame.new(0.14, 0.2, 0.5) * CFrame.fromEulerAnglesXYZ(math.rad(340), 0, math.rad(-90))
  182. weld33.C1 = CFrame.new(-0.7, 0.4, 0.35) * CFrame.fromEulerAnglesXYZ(math.rad(-90), math.rad(-5), 0)
  183. wait(0.02)
  184. weld55.C1 = CFrame.new(0.11, 0.4, 0.45) * CFrame.fromEulerAnglesXYZ(math.rad(330), 0, math.rad(-90))
  185. weld33.C1 = CFrame.new(-0.7, 0.4, 0.35) * CFrame.fromEulerAnglesXYZ(math.rad(-90), math.rad(-5), 0)
  186. wait(0.02)
  187. weld55.C1 = CFrame.new(0.08, 0.6, 0.4) * CFrame.fromEulerAnglesXYZ(math.rad(320), 0, math.rad(-90))
  188. weld33.C1 = CFrame.new(-0.7, 0.4, 0.35) * CFrame.fromEulerAnglesXYZ(math.rad(-90), math.rad(-5), 0)
  189.  
  190. wait(0.02)
  191. weld55.C1 = CFrame.new(0.05, 0.8, 0.35) * CFrame.fromEulerAnglesXYZ(math.rad(310), 0, math.rad(-90))
  192. weld33.C1 = CFrame.new(-0.7, 0.4, 0.35) * CFrame.fromEulerAnglesXYZ(math.rad(-90), math.rad(-5), 0)
  193.  
  194. wait(0.02)
  195. weld55.C1 = CFrame.new(0, 1, 0.2) * CFrame.fromEulerAnglesXYZ(math.rad(290), math.rad(-0), math.rad(-90))
  196. weld33.C1 = CFrame.new(-0.7, 0.4, 0.35) * CFrame.fromEulerAnglesXYZ(math.rad(-90), math.rad(-5), 0)
  197.  
  198. wait(0.3)
  199. weld55.C1 = CFrame.new(-0.1, 1.15, 0.35) * CFrame.fromEulerAnglesXYZ(math.rad(290), math.rad(-0), math.rad(-90))
  200. weld33.C1 = CFrame.new(-0.7, 0.4, 0.35) * CFrame.fromEulerAnglesXYZ(math.rad(-90), math.rad(-5), 0)
  201. wait(0.02)
  202. weld55.C1 = CFrame.new(-0.2, 1.3, 0.5) * CFrame.fromEulerAnglesXYZ(math.rad(290), math.rad(-0), math.rad(-90))
  203. weld33.C1 = CFrame.new(-0.7, 0.35, 0.35) * CFrame.fromEulerAnglesXYZ(math.rad(-90), math.rad(-5), 0)
  204. wait(0.02)
  205. weld55.C1 = CFrame.new(-0.25, 1.35, 0.6) * CFrame.fromEulerAnglesXYZ(math.rad(290), math.rad(-0), math.rad(-90))
  206. weld33.C1 = CFrame.new(-0.7, 0.3, 0.35) * CFrame.fromEulerAnglesXYZ(math.rad(-90), math.rad(-5), 0)
  207. wait(0.1)
  208. welding.Default()
  209. end
  210. end
  211. function welding.Animations2(...)
  212. if char and char:FindFirstChild("Torso") and char.Torso:FindFirstChild("Weld1") and char.Torso:FindFirstChild("Weld2") then
  213. local weld1 = char.Torso:FindFirstChild("Weld1")
  214. local weld2=char.Torso:FindFirstChild("Weld2")
  215. weld1.C1 = CFrame.new(-0.25, 1.35, 0.6) * CFrame.fromEulerAnglesXYZ(math.rad(290), math.rad(0), math.rad(-90))--Left arm
  216. weld2.C1 = CFrame.new(-1, 0.2, 0.35) * CFrame.fromEulerAnglesXYZ(math.rad(-90), math.rad(0), math.rad(0))--Right arm
  217. wait(0.03)
  218. weld1.C1 = CFrame.new(0.25, 1, 0.4) * CFrame.fromEulerAnglesXYZ(math.rad(310), math.rad(5), math.rad(-60))--Left arm
  219. weld2.C1 = CFrame.new(-1, 0, 0.2) * CFrame.fromEulerAnglesXYZ(math.rad(-75), math.rad(-20), math.rad(0))--Right arm
  220. wait(0.03)
  221. weld1.C1 = CFrame.new(0.75, 0.75, 0.2) * CFrame.fromEulerAnglesXYZ(math.rad(330), math.rad(10), math.rad(-30))--Left arm
  222. weld2.C1 = CFrame.new(-1, -0.2, 0) * CFrame.fromEulerAnglesXYZ(math.rad(-60), math.rad(-40), math.rad(0))--Right arm
  223. wait(0.03)
  224. weld1.C1 = CFrame.new(1.2, 0.5, 0) * CFrame.fromEulerAnglesXYZ(math.rad(350), math.rad(10), math.rad(0))--Left arm
  225. weld2.C1 = CFrame.new(-1, -0.4, -0.2) * CFrame.fromEulerAnglesXYZ(math.rad(-45), math.rad(-60), math.rad(0))--Right arm
  226. wait(0.03)
  227. weld1.C1 = CFrame.new(1.2, 0.25, 0) * CFrame.fromEulerAnglesXYZ(math.rad(350), math.rad(10), math.rad(10))--Left arm
  228. weld2.C1 = CFrame.new(-1, -0.5, -0.4) * CFrame.fromEulerAnglesXYZ(math.rad(-45), math.rad(-80), math.rad(0))--Right arm
  229. wait(0.03)
  230. script.Parent.GripForward=Vector3.new(0, 0, -1)
  231. script.Parent.GripPos=Vector3.new(0, 0, 0)
  232. script.Parent.GripRight=Vector3.new(1.6, 0, 0.316)
  233. script.Parent.GripUp=Vector3.new(0, 1, 0)
  234. end
  235. end
  236. function welding.Animations3(...)
  237. if char and char:FindFirstChild("Torso") and char.Torso:FindFirstChild("Weld1") and char.Torso:FindFirstChild("Weld2") then
  238. local weld1= char.Torso:FindFirstChild("Weld1")
  239. local weld2 = char.Torso:FindFirstChild("Weld2")
  240. weld1.C1 = CFrame.new(1.2, 0.5, 0) * CFrame.fromEulerAnglesXYZ(math.rad(350), math.rad(10), math.rad(0))--Left arm
  241. weld2.C1 = CFrame.new(-1, -0.4, -0.2) * CFrame.fromEulerAnglesXYZ(math.rad(-45), math.rad(-60), math.rad(0))--Right arm
  242. wait(0.03)
  243. weld1.C1 = CFrame.new(0.75, 0.75, 0.2) * CFrame.fromEulerAnglesXYZ(math.rad(330), math.rad(10), math.rad(-30))--Left arm
  244. weld2.C1 = CFrame.new(-1, -0.2, 0) * CFrame.fromEulerAnglesXYZ(math.rad(-60), math.rad(-40), math.rad(0))--Right arm
  245. wait(0.03)
  246. weld1.C1 = CFrame.new(0.25, 1, 0.4) * CFrame.fromEulerAnglesXYZ(math.rad(310), math.rad(5), math.rad(-60))--Left arm
  247. weld2.C1 = CFrame.new(-1, 0, 0.2) * CFrame.fromEulerAnglesXYZ(math.rad(-75), math.rad(-20), math.rad(0))--Right arm
  248. wait(0.03)
  249. weld1.C1 = CFrame.new(-0.25, 1.35, 0.6) * CFrame.fromEulerAnglesXYZ(math.rad(290), math.rad(0), math.rad(-90))--Left arm
  250. weld2.C1 = CFrame.new(-1, 0.2, 0.35) * CFrame.fromEulerAnglesXYZ(math.rad(-90), math.rad(0), math.rad(0))--Right arm
  251. welding.Default2()
  252. welding.Default() wait(0.03)
  253. end
  254. end
  255. function welding.Animations4(...)
  256. if char and char:FindFirstChild("Torso") and char.Torso:FindFirstChild("Weld1") and char.Torso:FindFirstChild("Weld2") then
  257. local weld55 = char.Torso:FindFirstChild("Weld1")
  258. local weld33 = char.Torso:FindFirstChild("Weld2")
  259. weld55.C1 = CFrame.new(-0.25, 1.35, 0.6) * CFrame.fromEulerAnglesXYZ(math.rad(290), math.rad(0), math.rad(-90))--Left arm
  260. weld33.C1 = CFrame.new(-1, 0.2, 0.35) * CFrame.fromEulerAnglesXYZ(math.rad(-90), math.rad(0), math.rad(0))--Right arm
  261. wait(0.02)
  262. --Original
  263. weld55.C1 = CFrame.new(0.75, 0.75, 0.2) * CFrame.fromEulerAnglesXYZ(math.rad(250), math.rad(0), math.rad(-60))--Left arm
  264. weld33.C1 = CFrame.new(-1, 0, 0.2) * CFrame.fromEulerAnglesXYZ(math.rad(-75), math.rad(-20), math.rad(0))--Right arm
  265. wait(0.02)
  266. weld55.C1 = CFrame.new(1.25, 0.75, -0.2) * CFrame.fromEulerAnglesXYZ(math.rad(210), math.rad(0), math.rad(-30))--Left arm
  267. weld33.C1 = CFrame.new(-1, -0.2, 0) * CFrame.fromEulerAnglesXYZ(math.rad(-60), math.rad(-40), math.rad(0))--Right arm
  268. wait(0.02)
  269. weld55.C1 = CFrame.new(1.5, 0.75, -0.5) * CFrame.fromEulerAnglesXYZ(math.rad(180), math.rad(0), math.rad(20))--Left arm
  270. weld33.C1 = CFrame.new(-1, -0.5, -0.4) * CFrame.fromEulerAnglesXYZ(math.rad(-45), math.rad(-80), math.rad(0))--Right arm
  271. wait(0.02)
  272. weld55.C1 = CFrame.new(1.5, 0.75, -0.5) * CFrame.fromEulerAnglesXYZ(math.rad(180), math.rad(0), math.rad(20))--Left arm
  273. weld33.C1 = CFrame.new(-1, -0.5, -0.4) * CFrame.fromEulerAnglesXYZ(math.rad(-45), math.rad(-80), math.rad(0))--Right arm
  274. wait(0.02)
  275. end
  276. end
  277. function welding.Animations5(...)
  278. if char and char:FindFirstChild("Torso") and char.Torso:FindFirstChild("Weld1") and char.Torso:FindFirstChild("Weld2") then
  279. local weld55 = char.Torso:FindFirstChild("Weld1")
  280. local weld33 = char.Torso:FindFirstChild("Weld2")
  281. weld55.C1 = CFrame.new(1.5, 0.75, -0.5) * CFrame.fromEulerAnglesXYZ(math.rad(180), math.rad(0), math.rad(20))--Left arm
  282. weld33.C1 = CFrame.new(-1, -0.5, -0.4) * CFrame.fromEulerAnglesXYZ(math.rad(-45), math.rad(-80), math.rad(0))--Right arm
  283. wait(0.02)
  284. weld55.C1 = CFrame.new(1.5, 0.75, -0.5) * CFrame.fromEulerAnglesXYZ(math.rad(180), math.rad(0), math.rad(20))--Left arm
  285. weld33.C1 = CFrame.new(-1, -0.5, -0.4) * CFrame.fromEulerAnglesXYZ(math.rad(-45), math.rad(-80), math.rad(0))--Right arm
  286. wait(0.02)
  287. weld55.C1 = CFrame.new(1.25, 0.75, -0.2) * CFrame.fromEulerAnglesXYZ(math.rad(210), math.rad(0), math.rad(-30))--Left arm
  288. weld33.C1 = CFrame.new(-1, -0.2, 0) * CFrame.fromEulerAnglesXYZ(math.rad(-60), math.rad(-40), math.rad(0))--Right arm
  289. wait(0.02)
  290. weld55.C1 = CFrame.new(0.75, 0.75, 0.2) * CFrame.fromEulerAnglesXYZ(math.rad(250), math.rad(0), math.rad(-60))--Left arm
  291. weld33.C1 = CFrame.new(-1, 0, 0.2) * CFrame.fromEulerAnglesXYZ(math.rad(-75), math.rad(-20), math.rad(0))--Right arm
  292. wait(0.02)
  293. weld55.C1 = CFrame.new(-0.25, 1.35, 0.6) * CFrame.fromEulerAnglesXYZ(math.rad(290), math.rad(-0), math.rad(-90))
  294. weld33.C1 = CFrame.new(-0.7, 0.3, 0.35) * CFrame.fromEulerAnglesXYZ(math.rad(-90), math.rad(-5), 0)
  295. wait(0.03)
  296. welding.Default2()
  297. end
  298. end
  299. function welding.Animations6(...)
  300. if char and char:FindFirstChild("Torso") and char.Torso:FindFirstChild("Weld1") and char.Torso:FindFirstChild("Weld2") then
  301. local weld55 = char.Torso:FindFirstChild("Weld1")
  302. local weld33 = char.Torso:FindFirstChild("Weld2")
  303. weld55.C1 = CFrame.new(-0.25, 1.35, 0.6) * CFrame.fromEulerAnglesXYZ(math.rad(290), math.rad(0), math.rad(-90))--Left arm
  304. wait(0.01)
  305. --Original
  306. weld55.C1 = CFrame.new(-0.25, 1.35, 0.9) * CFrame.fromEulerAnglesXYZ(math.rad(290), math.rad(30), math.rad(-90))--Left arm
  307. wait(0.01)
  308. weld55.C1 = CFrame.new(-0.25, 1.35, 1.2) * CFrame.fromEulerAnglesXYZ(math.rad(290), math.rad(60), math.rad(-90))--Left arm
  309. wait(0.01)
  310. weld55.C1 = CFrame.new(-0.25, 1.35, 1.5) * CFrame.fromEulerAnglesXYZ(math.rad(290), math.rad(80), math.rad(-90))--Left arm
  311. wait(0.01)
  312.  
  313. weld55.C1 = CFrame.new(-0.25, 1.35, 1.5) * CFrame.fromEulerAnglesXYZ(math.rad(270), math.rad(80), math.rad(-90))--Left arm
  314. wait(0.01)
  315. weld55.C1 = CFrame.new(-0.25, 1.35, 1.5) * CFrame.fromEulerAnglesXYZ(math.rad(270), math.rad(60), math.rad(-90))--Left arm
  316. wait(0.01)
  317. weld55.C1 = CFrame.new(-0.25, 1.35, 1.5) * CFrame.fromEulerAnglesXYZ(math.rad(270), math.rad(40), math.rad(-90))--Left arm
  318. wait(0.01)
  319. weld55.C1 = CFrame.new(-0.25, 1.35, 1.5) * CFrame.fromEulerAnglesXYZ(math.rad(270), math.rad(20), math.rad(-90))--Left arm
  320. wait(0.01)
  321. weld55.C1 = CFrame.new(-0.25, 1.35, 1.5) * CFrame.fromEulerAnglesXYZ(math.rad(270), math.rad(0), math.rad(-90))--Left arm
  322. wait(0.01)
  323. weld55.C1 = CFrame.new(-0.25, 1.35, 1.5) * CFrame.fromEulerAnglesXYZ(math.rad(270), math.rad(20), math.rad(-90))--Left arm
  324. wait(0.01)
  325. weld55.C1 = CFrame.new(-0.25, 1.35, 1.5) * CFrame.fromEulerAnglesXYZ(math.rad(270), math.rad(40), math.rad(-90))--Left arm
  326. wait(0.01)
  327. weld55.C1 = CFrame.new(-0.25, 1.35, 1.5) * CFrame.fromEulerAnglesXYZ(math.rad(270), math.rad(60), math.rad(-90))--Left arm
  328. wait(0.01)
  329. weld55.C1 = CFrame.new(-0.25, 1.35, 1.5) * CFrame.fromEulerAnglesXYZ(math.rad(270), math.rad(80), math.rad(-90))--Left arm
  330. wait(0.01)
  331.  
  332. weld55.C1 = CFrame.new(-0.25, 1.35, 1.5) * CFrame.fromEulerAnglesXYZ(math.rad(270), math.rad(80), math.rad(-90))--Left arm
  333. wait(0.01)
  334. weld55.C1 = CFrame.new(-0.25, 1.35, 1.5) * CFrame.fromEulerAnglesXYZ(math.rad(270), math.rad(60), math.rad(-90))--Left arm
  335. wait(0.01)
  336. weld55.C1 = CFrame.new(-0.25, 1.35, 1.5) * CFrame.fromEulerAnglesXYZ(math.rad(270), math.rad(40), math.rad(-90))--Left arm
  337. wait(0.01)
  338. weld55.C1 = CFrame.new(-0.25, 1.35, 1.5) * CFrame.fromEulerAnglesXYZ(math.rad(270), math.rad(20), math.rad(-90))--Left arm
  339. wait(0.01)
  340. weld55.C1 = CFrame.new(-0.25, 1.35, 1.5) * CFrame.fromEulerAnglesXYZ(math.rad(270), math.rad(0), math.rad(-90))--Left arm
  341. wait(0.01)
  342. weld55.C1 = CFrame.new(-0.25, 1.35, 1.5) * CFrame.fromEulerAnglesXYZ(math.rad(270), math.rad(20), math.rad(-90))--Left arm
  343. wait(0.01)
  344. weld55.C1 = CFrame.new(-0.25, 1.35, 1.5) * CFrame.fromEulerAnglesXYZ(math.rad(270), math.rad(40), math.rad(-90))--Left arm
  345. wait(0.01)
  346. weld55.C1 = CFrame.new(-0.25, 1.35, 1.5) * CFrame.fromEulerAnglesXYZ(math.rad(270), math.rad(60), math.rad(-90))--Left arm
  347. wait(0.01)
  348. weld55.C1 = CFrame.new(-0.25, 1.35, 1.5) * CFrame.fromEulerAnglesXYZ(math.rad(270), math.rad(80), math.rad(-90))--Left arm
  349. wait(0.01)
  350.  
  351. weld55.C1 = CFrame.new(-0.25, 1.35, 1.5) * CFrame.fromEulerAnglesXYZ(math.rad(270), math.rad(80), math.rad(-90))--Left arm
  352. wait(0.01)
  353. weld55.C1 = CFrame.new(-0.25, 1.35, 1.5) * CFrame.fromEulerAnglesXYZ(math.rad(270), math.rad(60), math.rad(-90))--Left arm
  354. wait(0.01)
  355. weld55.C1 = CFrame.new(-0.25, 1.35, 1.5) * CFrame.fromEulerAnglesXYZ(math.rad(270), math.rad(40), math.rad(-90))--Left arm
  356. wait(0.01)
  357. weld55.C1 = CFrame.new(-0.25, 1.35, 1.5) * CFrame.fromEulerAnglesXYZ(math.rad(270), math.rad(20), math.rad(-90))--Left arm
  358. wait(0.01)
  359. weld55.C1 = CFrame.new(-0.25, 1.35, 1.5) * CFrame.fromEulerAnglesXYZ(math.rad(270), math.rad(0), math.rad(-90))--Left arm
  360. wait(0.01)
  361. weld55.C1 = CFrame.new(-0.25, 1.35, 1.5) * CFrame.fromEulerAnglesXYZ(math.rad(270), math.rad(20), math.rad(-90))--Left arm
  362. wait(0.01)
  363. weld55.C1 = CFrame.new(-0.25, 1.35, 1.5) * CFrame.fromEulerAnglesXYZ(math.rad(270), math.rad(40), math.rad(-90))--Left arm
  364. wait(0.01)
  365. weld55.C1 = CFrame.new(-0.25, 1.35, 1.5) * CFrame.fromEulerAnglesXYZ(math.rad(270), math.rad(60), math.rad(-90))--Left arm
  366. wait(0.01)
  367. weld55.C1 = CFrame.new(-0.25, 1.35, 1.5) * CFrame.fromEulerAnglesXYZ(math.rad(270), math.rad(80), math.rad(-90))--Left arm
  368. wait(0.01)
  369.  
  370. weld55.C1 = CFrame.new(-0.25, 1.35, 1.5) * CFrame.fromEulerAnglesXYZ(math.rad(290), math.rad(80), math.rad(-90))--Left arm
  371. wait(0.01)
  372. weld55.C1 = CFrame.new(-0.25, 1.35, 1.2) * CFrame.fromEulerAnglesXYZ(math.rad(290), math.rad(60), math.rad(-90))--Left arm
  373. wait(0.01)
  374. weld55.C1 = CFrame.new(-0.25, 1.35, 0.9) * CFrame.fromEulerAnglesXYZ(math.rad(290), math.rad(30), math.rad(-90))--Left arm
  375. wait(0.01)
  376. weld55.C1 = CFrame.new(-0.25, 1.35, 0.6) * CFrame.fromEulerAnglesXYZ(math.rad(290), math.rad(0), math.rad(-90))--Left arm
  377. wait(0.01)
  378. welding.Default()
  379. end
  380. end
  381. function welding.Animations7(...)
  382. if char and char:FindFirstChild("Torso") and char.Torso:FindFirstChild("Weld1") and char.Torso:FindFirstChild("Weld2") then
  383. local weld55 = char.Torso:FindFirstChild("Weld1")
  384. local weld33 = char.Torso:FindFirstChild("Weld2")
  385. weld55.C1 = CFrame.new(-0.25, 1.35, 0.6) * CFrame.fromEulerAnglesXYZ(math.rad(290), math.rad(0), math.rad(-90))--Left arm
  386. wait(0.02)
  387. --Original
  388. weld55.C1 = CFrame.new(-0.5, 1.35, 0.6) * CFrame.fromEulerAnglesXYZ(math.rad(270), math.rad(0), math.rad(-90))--Left arm
  389. wait(0.02)
  390. weld55.C1 = CFrame.new(-0.5, 1.35, 0.6) * CFrame.fromEulerAnglesXYZ(math.rad(250), math.rad(0), math.rad(-90))--Left arm
  391. wait(0.02)
  392. weld55.C1 = CFrame.new(-0.5, 1.35, 0.6) * CFrame.fromEulerAnglesXYZ(math.rad(230), math.rad(0), math.rad(-90))--Left arm
  393. wait(0.02)
  394. weld55.C1 = CFrame.new(-0.5, 1.35, 0.6) * CFrame.fromEulerAnglesXYZ(math.rad(210), math.rad(0), math.rad(-90))--Left arm
  395. wait(0.02)
  396. weld55.C1 = CFrame.new(-0.5, 1.35, 0.6) * CFrame.fromEulerAnglesXYZ(math.rad(190), math.rad(0), math.rad(-90))--Left arm
  397. wait(0.02)
  398. weld55.C1 = CFrame.new(-0.5, 1.35, 0.6) * CFrame.fromEulerAnglesXYZ(math.rad(210), math.rad(0), math.rad(-90))--Left arm
  399. wait(0.02)
  400. weld55.C1 = CFrame.new(-0.5, 1.35, 0.6) * CFrame.fromEulerAnglesXYZ(math.rad(230), math.rad(0), math.rad(-90))--Left arm
  401. wait(0.02)
  402. weld55.C1 = CFrame.new(-0.5, 1.35, 0.6) * CFrame.fromEulerAnglesXYZ(math.rad(250), math.rad(0), math.rad(-90))--Left arm
  403. wait(0.02)
  404. weld55.C1 = CFrame.new(-0.5, 1.35, 0.6) * CFrame.fromEulerAnglesXYZ(math.rad(230), math.rad(0), math.rad(-90))--Left arm
  405. wait(0.02)
  406. weld55.C1 = CFrame.new(-0.5, 1.35, 0.6) * CFrame.fromEulerAnglesXYZ(math.rad(210), math.rad(0), math.rad(-90))--Left arm
  407. wait(0.02)
  408. weld55.C1 = CFrame.new(-0.5, 1.35, 0.6) * CFrame.fromEulerAnglesXYZ(math.rad(190), math.rad(0), math.rad(-90))--Left arm
  409. wait(0.02)
  410. weld55.C1 = CFrame.new(-0.5, 1.35, 0.6) * CFrame.fromEulerAnglesXYZ(math.rad(210), math.rad(0), math.rad(-90))--Left arm
  411. wait(0.02)
  412. weld55.C1 = CFrame.new(-0.5, 1.35, 0.6) * CFrame.fromEulerAnglesXYZ(math.rad(230), math.rad(0), math.rad(-90))--Left arm
  413. wait(0.02)
  414. weld55.C1 = CFrame.new(-0.5, 1.35, 0.6) * CFrame.fromEulerAnglesXYZ(math.rad(210), math.rad(0), math.rad(-90))--Left arm
  415. wait(0.02)
  416. weld55.C1 = CFrame.new(-0.5, 1.35, 0.6) * CFrame.fromEulerAnglesXYZ(math.rad(190), math.rad(0), math.rad(-90))--Left arm
  417. wait(0.02)
  418. weld55.C1 = CFrame.new(-0.5, 1.35, 0.6) * CFrame.fromEulerAnglesXYZ(math.rad(210), math.rad(0), math.rad(-90))--Left arm
  419. wait(0.02)
  420. weld55.C1 = CFrame.new(-0.5, 1.35, 0.6) * CFrame.fromEulerAnglesXYZ(math.rad(230), math.rad(0), math.rad(-90))--Left arm
  421. wait(0.02)
  422. weld55.C1 = CFrame.new(-0.5, 1.35, 0.6) * CFrame.fromEulerAnglesXYZ(math.rad(250), math.rad(0), math.rad(-90))--Left arm
  423. wait(0.02)
  424. weld55.C1 = CFrame.new(-0.5, 1.35, 0.6) * CFrame.fromEulerAnglesXYZ(math.rad(270), math.rad(0), math.rad(-90))--Left arm
  425. wait(0.02)
  426. weld55.C1 = CFrame.new(-0.25, 1.35, 0.6) * CFrame.fromEulerAnglesXYZ(math.rad(290), math.rad(0), math.rad(-90))--Left arm
  427. wait(0.02)
  428. welding.Default()
  429. end
  430. end
  431. function welding.Animations8(...)
  432. if char and char:FindFirstChild("Torso") and char.Torso:FindFirstChild("Weld1") and char.Torso:FindFirstChild("Weld2") then
  433. local weld55 = char.Torso:FindFirstChild("Weld1")
  434. local weld33 = char.Torso:FindFirstChild("Weld2")
  435. handle.bayonet:play()
  436. script.Parent.bayonetblade.Knifekill.Disabled = false
  437. script.Parent.bayonetblade1.Knifekill.Disabled = false
  438. wait(0.2)
  439. weld33.C1 = CFrame.new(-0.75, 0.35, 0.35) * CFrame.fromEulerAnglesXYZ(math.rad(-90), math.rad(-7), math.rad(-0))
  440. weld55.C1 = CFrame.new(-0.35, 1.7, .8) * CFrame.fromEulerAnglesXYZ(math.rad(290), math.rad(0), math.rad(-90))
  441. wait(0.03)
  442.  
  443. weld33.C1 = CFrame.new(-0.75, 0.55, 0.35) * CFrame.fromEulerAnglesXYZ(math.rad(-90), math.rad(-7), math.rad(-0))
  444. weld55.C1 = CFrame.new(-0.35, 1.9, .8) * CFrame.fromEulerAnglesXYZ(math.rad(290), math.rad(0), math.rad(-90))
  445. wait(0.03)
  446.  
  447. weld33.C1 = CFrame.new(-0.75, 0.75, 0.35) * CFrame.fromEulerAnglesXYZ(math.rad(-90), math.rad(-7), math.rad(-0))
  448. weld55.C1 = CFrame.new(-0.35, 2.1, .8) * CFrame.fromEulerAnglesXYZ(math.rad(290), math.rad(0), math.rad(-90))
  449. wait(0.03)
  450.  
  451. weld33.C1 = CFrame.new(-0.75, 0.85, 0.35) * CFrame.fromEulerAnglesXYZ(math.rad(-90), math.rad(-7), math.rad(-0))
  452. weld55.C1 = CFrame.new(-0.35, 2.2, .8) * CFrame.fromEulerAnglesXYZ(math.rad(290), math.rad(0), math.rad(-90))
  453. wait(0.05)
  454.  
  455. weld33.C1 = CFrame.new(-0.75, 0.75, 0.35) * CFrame.fromEulerAnglesXYZ(math.rad(-90), math.rad(-7), math.rad(-0))
  456. weld55.C1 = CFrame.new(-0.35, 2.1, .8) * CFrame.fromEulerAnglesXYZ(math.rad(290), math.rad(0), math.rad(-90))
  457. wait(0.03)
  458.  
  459. weld33.C1 = CFrame.new(-0.75, 0.55, 0.35) * CFrame.fromEulerAnglesXYZ(math.rad(-90), math.rad(-7), math.rad(-0))
  460. weld55.C1 = CFrame.new(-0.35, 1.9, .8) * CFrame.fromEulerAnglesXYZ(math.rad(290), math.rad(0), math.rad(-90))
  461. wait(0.03)
  462.  
  463. weld33.C1 = CFrame.new(-0.75, 0.35, 0.35) * CFrame.fromEulerAnglesXYZ(math.rad(-90), math.rad(-7), math.rad(-0))
  464. weld55.C1 = CFrame.new(-0.35, 1.7, .8) * CFrame.fromEulerAnglesXYZ(math.rad(290), math.rad(0), math.rad(-90))
  465. wait(0.03)
  466.  
  467. weld33.C1 = CFrame.new(-0.75, 0.15, 0.35) * CFrame.fromEulerAnglesXYZ(math.rad(-90), math.rad(-7), math.rad(-0))
  468. weld55.C1 = CFrame.new(-0.35, 1.5, .8) * CFrame.fromEulerAnglesXYZ(math.rad(290), math.rad(0), math.rad(-90))
  469. wait(0.03)
  470. script.Parent.bayonetblade.Knifekill.Disabled = true
  471. script.Parent.bayonetblade1.Knifekill.Disabled = true
  472. welding.Default()
  473. end
  474. end
  475. function welding.Animations9(...)
  476. if char and char:FindFirstChild("Torso") and char.Torso:FindFirstChild("Weld1") and char.Torso:FindFirstChild("Weld2") then
  477. local weld55 = char.Torso:FindFirstChild("Weld1")
  478. local weld33 = char.Torso:FindFirstChild("Weld2")
  479. weld55.C1 = CFrame.new(1.15, 0.6, 0.25) * CFrame.fromEulerAnglesXYZ(math.rad(285), math.rad(45), math.rad(0))
  480. weld33.C1 = CFrame.new(-1.3, 0.1, 0.3) * CFrame.fromEulerAnglesXYZ(math.rad(-85), math.rad(-25), math.rad(-4))
  481. wait(0.02)
  482. weld55.C1 = CFrame.new(1.1, 0.45, 0.1) * CFrame.fromEulerAnglesXYZ(math.rad(295), math.rad(45), math.rad(0))
  483. weld33.C1 = CFrame.new(-1.2, 0, 0.15) * CFrame.fromEulerAnglesXYZ(math.rad(-80), math.rad(-30), math.rad(-7))
  484. wait(0.02)
  485. weld55.C1 = CFrame.new(1.05, 0.25, -0.05) * CFrame.fromEulerAnglesXYZ(math.rad(305), math.rad(45), math.rad(0))
  486. weld33.C1 = CFrame.new(-1.15, -0.05, 0) * CFrame.fromEulerAnglesXYZ(math.rad(-75), math.rad(-33), math.rad(-9))
  487. wait(0.02)
  488. weld55.C1 = CFrame.new(1.025, 0.12, -0.1) * CFrame.fromEulerAnglesXYZ(math.rad(310), math.rad(45), math.rad(0))
  489. weld33.C1 = CFrame.new(-1.1, -0.1, -0.125) * CFrame.fromEulerAnglesXYZ(math.rad(-70), math.rad(-36), math.rad(-11))
  490. wait(0.02)
  491. weld55.C1 = CFrame.new(1.01, 0.035, -0.15) * CFrame.fromEulerAnglesXYZ(math.rad(315), math.rad(45), math.rad(0))
  492. weld33.C1 = CFrame.new(-1.05, -0.15, -0.23) * CFrame.fromEulerAnglesXYZ(math.rad(-67), math.rad(-38), math.rad(-13))
  493. wait(0.02)
  494. script.Parent.GripForward=Vector3.new(0.2795, -0.5007, 0.8193)
  495. script.Parent.GripPos=Vector3.new(0.3055, 0.6054, -1.383)
  496. script.Parent.GripRight=Vector3.new(0.924, -0.09162, -0.3712)
  497. script.Parent.GripUp=Vector3.new(-0.2609, -0.8608, -0.437)
  498. weld55.C1 = CFrame.new(1, 0, -0.2) * CFrame.fromEulerAnglesXYZ(math.rad(320), math.rad(45), math.rad(0))
  499. weld33.C1 = CFrame.new(-1, -0.2, -0.3) * CFrame.fromEulerAnglesXYZ(math.rad(-65), math.rad(-40), math.rad(-15))
  500. end
  501. end
  502. function welding.Animations10(...)
  503. if char and char:FindFirstChild("Torso") and char.Torso:FindFirstChild("Weld1") and char.Torso:FindFirstChild("Weld2") then
  504. local weld55 = char.Torso:FindFirstChild("Weld1")
  505. local weld33 = char.Torso:FindFirstChild("Weld2")
  506. weld55.C1 = CFrame.new(1.01, 0.035, -0.15) * CFrame.fromEulerAnglesXYZ(math.rad(315), math.rad(45), math.rad(0))
  507. weld33.C1 = CFrame.new(-1.05, -0.15, -0.23) * CFrame.fromEulerAnglesXYZ(math.rad(-67), math.rad(-38), math.rad(-13))
  508. wait(0.02)
  509. weld55.C1 = CFrame.new(1.025, 0.12, -0.1) * CFrame.fromEulerAnglesXYZ(math.rad(310), math.rad(45), math.rad(0))
  510. weld33.C1 = CFrame.new(-1.1, -0.1, -0.125) * CFrame.fromEulerAnglesXYZ(math.rad(-70), math.rad(-36), math.rad(-11))
  511. wait(0.02)
  512. weld55.C1 = CFrame.new(1.05, 0.25, -0.05) * CFrame.fromEulerAnglesXYZ(math.rad(305), math.rad(45), math.rad(0))
  513. weld33.C1 = CFrame.new(-1.15, -0.05, 0) * CFrame.fromEulerAnglesXYZ(math.rad(-75), math.rad(-33), math.rad(-9))
  514. wait(0.02)
  515. weld55.C1 = CFrame.new(1.1, 0.45, 0.1) * CFrame.fromEulerAnglesXYZ(math.rad(295), math.rad(45), math.rad(0))
  516. weld33.C1 = CFrame.new(-1.2, 0, 0.15) * CFrame.fromEulerAnglesXYZ(math.rad(-80), math.rad(-30), math.rad(-7))
  517. wait(0.02)
  518. weld55.C1 = CFrame.new(1.15, 0.6, 0.25) * CFrame.fromEulerAnglesXYZ(math.rad(285), math.rad(45), math.rad(0))
  519. weld33.C1 = CFrame.new(-1.3, 0.1, 0.3) * CFrame.fromEulerAnglesXYZ(math.rad(-85), math.rad(-25), math.rad(-4))
  520. wait(0.02)
  521. weld33.C1 = CFrame.new(-1.4, 0.15, 0.5) * CFrame.fromEulerAnglesXYZ(math.rad(-90), math.rad(-15), 0)
  522. weld55.C1 = CFrame.new(1.2, 0.75, 0.4) * CFrame.fromEulerAnglesXYZ(math.rad(275), math.rad(45), math.rad(0))
  523. welding.Default()
  524. welding.Default2()
  525. end
  526. end
  527.  
  528. function welding.Animations11(...)
  529. if char and char:FindFirstChild("Torso") and char.Torso:FindFirstChild("Weld1") and char.Torso:FindFirstChild("Weld2") then
  530. local weld55 = char.Torso:FindFirstChild("Weld1")
  531. local weld33 = char.Torso:FindFirstChild("Weld2")
  532. script.Parent.GripForward=Vector3.new(0.259, -0.604, 0.753)
  533. script.Parent.GripPos=Vector3.new(0.5, 0.7, -1.2)
  534. script.Parent.GripRight=Vector3.new(0.9252, -0.2641, -0.15)
  535. script.Parent.GripUp=Vector3.new(-0.3364, -0.9032, -0.2665)
  536. weld55.C1 = CFrame.new(1.1, 0.55, 0.4) * CFrame.fromEulerAnglesXYZ(math.rad(285), math.rad(55), math.rad(-10))
  537. weld33.C1 = CFrame.new(-1.41, 0.16, 0.3) * CFrame.fromEulerAnglesXYZ(math.rad(-75), math.rad(-14), math.rad(-2))
  538. wait(.02)
  539. weld55.C1 = CFrame.new(1.2, 0.45, 0.3) * CFrame.fromEulerAnglesXYZ(math.rad(300), math.rad(35), math.rad(-5))
  540. weld33.C1 = CFrame.new(-1.42, 0.17, 0.2) * CFrame.fromEulerAnglesXYZ(math.rad(-55), math.rad(-13), math.rad(-4))
  541. wait(.02)
  542. weld55.C1 = CFrame.new(1.3, 0.35, 0.2) * CFrame.fromEulerAnglesXYZ(math.rad(310), math.rad(25), math.rad(0))
  543. weld33.C1 = CFrame.new(-1.43, 0.18, 0) * CFrame.fromEulerAnglesXYZ(math.rad(-45), math.rad(-12), math.rad(-6))
  544. wait(.02)
  545. weld55.C1 = CFrame.new(1.5, 0.25, 0.1) * CFrame.fromEulerAnglesXYZ(math.rad(320), math.rad(15), math.rad(2))
  546. weld33.C1 = CFrame.new(-1.44, 0.19, -0.1) * CFrame.fromEulerAnglesXYZ(math.rad(-35), math.rad(-11), math.rad(-8))
  547. wait(.02)
  548. weld55.C1 = CFrame.new(1.5, 0.17, 0) * CFrame.fromEulerAnglesXYZ(math.rad(330), math.rad(0), math.rad(5))
  549. weld33.C1 = CFrame.new(-1.45, 0.2, -0.1) * CFrame.fromEulerAnglesXYZ(math.rad(-25), math.rad(-10), math.rad(-10))
  550. wait(.02)
  551. weld55.C1 = CFrame.new(1.5, .15, 0.4) * CFrame.fromEulerAnglesXYZ(math.rad(340), math.rad(0), math.rad(5))
  552. weld33.C1 = CFrame.new(-1.45, 0.2, -0.1) * CFrame.fromEulerAnglesXYZ(math.rad(-20), math.rad(-10), math.rad(-10))
  553. weld55.C1 = CFrame.new(1.5, .13, -.1) * CFrame.fromEulerAnglesXYZ(math.rad(350), math.rad(0), math.rad(2.5))
  554. end
  555. end
  556. function welding.Animations12(...)
  557. if char and char:FindFirstChild("Torso") and char.Torso:FindFirstChild("Weld1") and char.Torso:FindFirstChild("Weld2") then
  558. local weld55 = char.Torso:FindFirstChild("Weld1")
  559. local weld33 = char.Torso:FindFirstChild("Weld2")
  560. script.Parent.GripForward=Vector3.new(-0.2431, 0.08344, -0.9664)
  561. script.Parent.GripPos=Vector3.new(0.2107, -0.07341, -1.661)
  562. script.Parent.GripRight=Vector3.new(0.9693, -0.01642, -0.2452)
  563. script.Parent.GripUp=Vector3.new(0.03633, 0.9964, 0.07689)
  564. weld55.C1 = CFrame.new(0.72, 0.15, 0.4) * CFrame.fromEulerAnglesXYZ(math.rad(320), math.rad(85), math.rad(-46))
  565. weld33.C1 = CFrame.new(-1.45, 0.2, -0.1) * CFrame.fromEulerAnglesXYZ(math.rad(-25), math.rad(-10), math.rad(-10))
  566. wait(0.02)
  567. weld55.C1 = CFrame.new(0.80, 0.15, 0.4) * CFrame.fromEulerAnglesXYZ(math.rad(315), math.rad(80), math.rad(-37))
  568. weld33.C1 = CFrame.new(-1.44, 0.19, -0.1) * CFrame.fromEulerAnglesXYZ(math.rad(-35), math.rad(-11), math.rad(-8))
  569. wait(0.02)
  570. weld55.C1 = CFrame.new(0.90, 0.25, 0.4) * CFrame.fromEulerAnglesXYZ(math.rad(305), math.rad(75), math.rad(-30))
  571. weld33.C1 = CFrame.new(-1.43, 0.18, 0) * CFrame.fromEulerAnglesXYZ(math.rad(-45), math.rad(-12), math.rad(-6))
  572. wait(0.02)
  573. weld55.C1 = CFrame.new(1, 0.35, 0.4) * CFrame.fromEulerAnglesXYZ(math.rad(295), math.rad(65), math.rad(-20))
  574. weld33.C1 = CFrame.new(-1.42, 0.17, 0.2) * CFrame.fromEulerAnglesXYZ(math.rad(-55), math.rad(-13), math.rad(-4))
  575. wait(0.02)
  576. weld55.C1 = CFrame.new(1.1, 0.55, 0.4) * CFrame.fromEulerAnglesXYZ(math.rad(285), math.rad(55), math.rad(-10))
  577. weld33.C1 = CFrame.new(-1.41, 0.16, 0.3) * CFrame.fromEulerAnglesXYZ(math.rad(-75), math.rad(-14), math.rad(-2))
  578. wait(0.02)
  579. weld55.C1 = CFrame.new(1.2, 0.75, 0.4) * CFrame.fromEulerAnglesXYZ(math.rad(275), math.rad(45), math.rad(0))
  580. weld33.C1 = CFrame.new(-1.4, 0.15, 0.5) * CFrame.fromEulerAnglesXYZ(math.rad(-90), math.rad(-15), 0)
  581. welding.Default()
  582. welding.Default2()
  583. end
  584. end
  585. function welding.Animations13(...)
  586. if char and char:FindFirstChild("Torso") and char.Torso:FindFirstChild("Weld1") and char.Torso:FindFirstChild("Weld2") then
  587. local weld55 = char.Torso:FindFirstChild("Weld1")
  588. local weld33 = char.Torso:FindFirstChild("Weld2")
  589. script.Parent.GripForward=Vector3.new(0.133, -0.326, 0.936)
  590. script.Parent.GripPos=Vector3.new(0.64, 0.6, 0.8)
  591. script.Parent.GripRight=Vector3.new(0.956, -0.208, -0.208)
  592. script.Parent.GripUp=Vector3.new(-0.262, -0.922, -0.284)
  593. weld55.C1 = CFrame.new(1.1, 0.55, 0.4) * CFrame.fromEulerAnglesXYZ(math.rad(285), math.rad(55), math.rad(-10))
  594. weld33.C1 = CFrame.new(-1.41, 0.16, 0.3) * CFrame.fromEulerAnglesXYZ(math.rad(-75), math.rad(-14), math.rad(-2))
  595. wait(0.02)
  596. weld55.C1 = CFrame.new(1, 0.35, 0.4) * CFrame.fromEulerAnglesXYZ(math.rad(295), math.rad(65), math.rad(-20))
  597. weld33.C1 = CFrame.new(-1.42, 0.17, 0.2) * CFrame.fromEulerAnglesXYZ(math.rad(-55), math.rad(-13), math.rad(-4))
  598. wait(0.02)
  599. weld55.C1 = CFrame.new(0.90, 0.25, 0.4) * CFrame.fromEulerAnglesXYZ(math.rad(305), math.rad(75), math.rad(-30))
  600. weld33.C1 = CFrame.new(-1.43, 0.18, 0) * CFrame.fromEulerAnglesXYZ(math.rad(-45), math.rad(-12), math.rad(-6))
  601. wait(0.02)
  602. weld55.C1 = CFrame.new(0.80, 0.15, 0.4) * CFrame.fromEulerAnglesXYZ(math.rad(315), math.rad(80), math.rad(-37))
  603. weld33.C1 = CFrame.new(-1.44, 0.19, -0.1) * CFrame.fromEulerAnglesXYZ(math.rad(-35), math.rad(-11), math.rad(-8))
  604. wait(0.02)
  605. weld55.C1 = CFrame.new(0.72, 0.15, 0.4) * CFrame.fromEulerAnglesXYZ(math.rad(320), math.rad(85), math.rad(-46))
  606. weld33.C1 = CFrame.new(-1.45, 0.2, -0.1) * CFrame.fromEulerAnglesXYZ(math.rad(-25), math.rad(-10), math.rad(-10))
  607. wait(0.02)
  608. weld55.C1 = CFrame.new(0.65, -0.05, 0.4) * CFrame.fromEulerAnglesXYZ(math.rad(325), math.rad(90), math.rad(-50))
  609. weld33.C1 = CFrame.new(-1.45, 0.2, -0.1) * CFrame.fromEulerAnglesXYZ(math.rad(-20), math.rad(-10), math.rad(-10))
  610. end
  611. end
  612. function welding.Animations14(...)
  613. if char and char:FindFirstChild("Torso") and char.Torso:FindFirstChild("Weld1") and char.Torso:FindFirstChild("Weld2") then
  614. local weld55 = char.Torso:FindFirstChild("Weld1")
  615. local weld33 = char.Torso:FindFirstChild("Weld2")
  616. script.Parent.GripForward=Vector3.new(0.133, -0.326, 0.936)
  617. script.Parent.GripForward=Vector3.new(-0.2431, 0.08344, -0.9664)
  618. script.Parent.GripPos=Vector3.new(0.2107, -0.07341, -1.661)
  619. script.Parent.GripRight=Vector3.new(0.9693, -0.01642, -0.2452)
  620. script.Parent.GripUp=Vector3.new(0.03633, 0.9964, 0.07689)
  621. weld55.C1 = CFrame.new(0.72, 0.15, 0.4) * CFrame.fromEulerAnglesXYZ(math.rad(320), math.rad(85), math.rad(-46))
  622. weld33.C1 = CFrame.new(-1.45, 0.2, -0.1) * CFrame.fromEulerAnglesXYZ(math.rad(-25), math.rad(-10), math.rad(-10))
  623. wait(0.02)
  624. weld55.C1 = CFrame.new(0.80, 0.15, 0.4) * CFrame.fromEulerAnglesXYZ(math.rad(315), math.rad(80), math.rad(-37))
  625. weld33.C1 = CFrame.new(-1.44, 0.19, -0.1) * CFrame.fromEulerAnglesXYZ(math.rad(-35), math.rad(-11), math.rad(-8))
  626. wait(0.02)
  627. weld55.C1 = CFrame.new(0.90, 0.25, 0.4) * CFrame.fromEulerAnglesXYZ(math.rad(305), math.rad(75), math.rad(-30))
  628. weld33.C1 = CFrame.new(-1.43, 0.18, 0) * CFrame.fromEulerAnglesXYZ(math.rad(-45), math.rad(-12), math.rad(-6))
  629. wait(0.02)
  630. weld55.C1 = CFrame.new(1, 0.35, 0.4) * CFrame.fromEulerAnglesXYZ(math.rad(295), math.rad(65), math.rad(-20))
  631. weld33.C1 = CFrame.new(-1.42, 0.17, 0.2) * CFrame.fromEulerAnglesXYZ(math.rad(-55), math.rad(-13), math.rad(-4))
  632. wait(0.02)
  633. weld55.C1 = CFrame.new(1.1, 0.55, 0.4) * CFrame.fromEulerAnglesXYZ(math.rad(285), math.rad(55), math.rad(-10))
  634. weld33.C1 = CFrame.new(-1.41, 0.16, 0.3) * CFrame.fromEulerAnglesXYZ(math.rad(-75), math.rad(-14), math.rad(-2))
  635. wait(0.02)
  636. weld55.C1 = CFrame.new(1.2, 0.75, 0.4) * CFrame.fromEulerAnglesXYZ(math.rad(275), math.rad(45), math.rad(0))
  637. weld33.C1 = CFrame.new(-1.4, 0.15, 0.5) * CFrame.fromEulerAnglesXYZ(math.rad(-90), math.rad(-15), 0)
  638. welding.Default()
  639. welding.Default2()
  640. end
  641. end
  642. function welding.Animations15(...)
  643. if char and char:FindFirstChild("Torso") and char.Torso:FindFirstChild("Weld1") and char.Torso:FindFirstChild("Weld2") then
  644. local weld55 = char.Torso:FindFirstChild("Weld1")
  645. local weld33 = char.Torso:FindFirstChild("Weld2")
  646. handle.Swing:play()
  647. script.Parent.Stock.Knifekill.Disabled = false
  648. script.Parent.GripForward=Vector3.new(0.2389, -0.3376, -0.9105)
  649. script.Parent.GripPos=Vector3.new(0.2688, -0.1414, -0.3195)
  650. script.Parent.GripRight=Vector3.new(0.8172, -0.4366, 0.3763)
  651. script.Parent.GripUp=Vector3.new(0.5246, 0.8339, -0.1715)
  652. weld55.C1 = CFrame.new(1.2, 0.75, 0.4) * CFrame.fromEulerAnglesXYZ(math.rad(275), math.rad(30), math.rad(0))
  653. weld33.C1 = CFrame.new(-1.4, 0.20, 0.5) * CFrame.fromEulerAnglesXYZ(math.rad(-90), math.rad(-18), 0)
  654. wait(0.06)
  655. script.Parent.GripForward=Vector3.new(0.3875, -0.3959, -0.8326)
  656. script.Parent.GripPos=Vector3.new(0.2751, -0.09156, -0.7735)
  657. script.Parent.GripRight=Vector3.new(0.3209, -0.7887, 0.5244)
  658. script.Parent.GripUp=Vector3.new(0.8642, 0.4704, 0.1785)
  659. weld55.C1 = CFrame.new(1.2, 0.75, 0.4) * CFrame.fromEulerAnglesXYZ(math.rad(275), math.rad(15), math.rad(0))
  660. weld33.C1 = CFrame.new(-1.4, 0.26, 0.5) * CFrame.fromEulerAnglesXYZ(math.rad(-90), math.rad(-20), 0)
  661. wait(0.06)
  662. script.Parent.GripForward=Vector3.new(0.3283, -0.7604, -0.5604)
  663. script.Parent.GripPos=Vector3.new(0.134, 0.2273, -0.7142)
  664. script.Parent.GripRight=Vector3.new(0.2382, -0.5074, 0.8281)
  665. script.Parent.GripUp=Vector3.new(0.914, 0.4053, -0.01457)
  666. weld55.C1 = CFrame.new(1.2, 0.75, 0.4) * CFrame.fromEulerAnglesXYZ(math.rad(275), math.rad(-5), math.rad(0))
  667. weld33.C1 = CFrame.new(-1.4, 0.33, 0.5) * CFrame.fromEulerAnglesXYZ(math.rad(-90), math.rad(-23), 0)
  668. wait(0.06)
  669. script.Parent.GripForward=Vector3.new(0.06785, -0.9805, -0.1846)
  670. script.Parent.GripPos=Vector3.new(-0.05761, 0.3628, -0.4614)
  671. script.Parent.GripRight=Vector3.new(-0.1389, -0.1925, 0.9714)
  672. script.Parent.GripUp=Vector3.new(0.988, 0.04026, 0.1493)
  673. weld55.C1 = CFrame.new(1.2, 0.75, 0.4) * CFrame.fromEulerAnglesXYZ(math.rad(275), math.rad(-25), math.rad(0))
  674. weld33.C1 = CFrame.new(-1.4, 0.4, 0.5) * CFrame.fromEulerAnglesXYZ(math.rad(-90), math.rad(-25), 0)
  675. wait(0.08)
  676. script.Parent.GripForward=Vector3.new(0.3283, -0.7604, -0.5604)
  677. script.Parent.GripPos=Vector3.new(0.134, 0.2273, -0.7142)
  678. script.Parent.GripRight=Vector3.new(0.2382, -0.5074, 0.8281)
  679. script.Parent.GripUp=Vector3.new(0.914, 0.4053, -0.01457)
  680. weld55.C1 = CFrame.new(1.2, 0.75, 0.4) * CFrame.fromEulerAnglesXYZ(math.rad(275), math.rad(-5), math.rad(0))
  681. weld33.C1 = CFrame.new(-1.4, 0.33, 0.5) * CFrame.fromEulerAnglesXYZ(math.rad(-90), math.rad(-23), 0)
  682. wait(0.05)
  683. script.Parent.GripForward=Vector3.new(0.3875, -0.3959, -0.8326)
  684. script.Parent.GripPos=Vector3.new(0.2751, -0.09156, -0.7735)
  685. script.Parent.GripRight=Vector3.new(0.3209, -0.7887, 0.5244)
  686. script.Parent.GripUp=Vector3.new(0.8642, 0.4704, 0.1785)
  687. weld55.C1 = CFrame.new(1.2, 0.75, 0.4) * CFrame.fromEulerAnglesXYZ(math.rad(275), math.rad(15), math.rad(0))
  688. weld33.C1 = CFrame.new(-1.4, 0.26, 0.5) * CFrame.fromEulerAnglesXYZ(math.rad(-90), math.rad(-20), 0)
  689. wait(0.05)
  690. script.Parent.GripForward=Vector3.new(0.2389, -0.3376, -0.9105)
  691. script.Parent.GripPos=Vector3.new(0.2688, -0.1414, -0.3195)
  692. script.Parent.GripRight=Vector3.new(0.8172, -0.4366, 0.3763)
  693. script.Parent.GripUp=Vector3.new(0.5246, 0.8339, -0.1715)
  694. weld55.C1 = CFrame.new(1.2, 0.75, 0.4) * CFrame.fromEulerAnglesXYZ(math.rad(275), math.rad(30), math.rad(0))
  695. weld33.C1 = CFrame.new(-1.4, 0.20, 0.5) * CFrame.fromEulerAnglesXYZ(math.rad(-90), math.rad(-18), 0)
  696. wait(0.05)
  697. script.Parent.GripForward = Vector3.new(-0.2431, 0.08344, -0.9664)
  698. script.Parent.GripPos = Vector3.new(0.2107, -0.07341, -1.661)
  699. script.Parent.GripRight = Vector3.new(0.9693, -0.01642, -0.2452)
  700. script.Parent.GripUp = Vector3.new(0.03633, 0.9964, 0.07689)
  701. weld55.C1 = CFrame.new(1.2, 0.75, 0.4) * CFrame.fromEulerAnglesXYZ(math.rad(275), math.rad(45), math.rad(0))
  702. weld33.C1 = CFrame.new(-1.4, 0.15, 0.5) * CFrame.fromEulerAnglesXYZ(math.rad(-90), math.rad(-15), 0)
  703. wait(0.01)
  704. script.Parent.Stock.Knifekill.Disabled = true
  705. welding.Default()
  706. welding.Default2()
  707. end
  708. end
  709. local call = {}
  710. --[[function call.GetPlayer(obj)
  711. if obj == nil then
  712. return nil, nil
  713. else
  714. if obj:IsA("Player") then
  715. return obj, obj.Character
  716. elseif obj:IsA("Part") and obj.Parent and obj.Parent:IsA("Model") then
  717. if game.Players:FindFirstChild(obj.Parent.Name) then
  718. return game.Players[obj.Parent.Name], game.Players[obj.Parent.Name].Character
  719. end
  720. elseif obj:IsA("Model") then
  721. if game.Players:FindFirstChild(obj.Name) then
  722. return game.Players[obj.Name], game.Players[obj.Parent.Name].Character
  723. end
  724. end
  725. end
  726. end]]
  727.  
  728. function call.UpdateGui(...)
  729. if playergui:FindFirstChild("GunGUI") then
  730. playergui.GunGUI.Main.Ammo.Text = "["..mag.."]"
  731. end
  732. end
  733.  
  734. function call.GetPlayer(hit)
  735. if hit and hit.Parent then
  736. if hit.Parent:FindFirstChild("Humanoid") then
  737. return hit.Parent.Humanoid
  738. elseif hit.Parent.Parent:FindFirstChild("Humanoid") then
  739. return hit.Parent.Parent.Humanoid
  740. end
  741. end
  742. end
  743.  
  744. local gun = {}
  745.  
  746. function gun.Raycast(init, last, ign)
  747. local dir = (last-init).unit
  748. local ray = Ray.new(init, dir*999)
  749. local hit, at = workspace:FindPartOnRayWithIgnoreList(ray, ign)
  750. if hit and at and hit.Name == "Ray" then
  751. hit, at = gun.Raycast(at, dir*999, ign)
  752. end
  753. return hit, at
  754. end
  755.  
  756. --function gun.Raycast(init, last, ign) -- initial point, last hit, ignored hit
  757. -- local directionVec = (last-init).unit
  758. -- local ray = Ray.new(init, directionVec*999)
  759. -- local hit, at = workspace:FindPartOnRayWithIgnoreList(ray, ign)
  760. --
  761. -- while hit and hit.Transparency >= 1 do
  762. -- ign[#ign+1] = hit
  763. -- hit, at = workspace:FindPartOnRayWithIgnoreList(ray, ign)
  764. -- end
  765. --
  766. -- return hit, at
  767. --end
  768.  
  769. local currentAutoShooting = nil
  770. BufferRay = function()
  771. if currentAutoShooting == nil or currentAutoShooting.Character == nil or currentAutoShooting.Character:FindFirstChild("Torso") == nil then return end
  772. focus = currentAutoShooting.Character.Torso.Position
  773. local interval = (barrel.Position-focus).magnitude
  774. local min, max = -(spread/100)*interval, (spread/100)*interval
  775. local aim = vector((focus.x)+(math.random(min, max)), (focus.y)+(math.random(min, max)), (focus.z)+(math.random(min, max)))
  776.  
  777. local hitPart, hitPos = gun.Raycast(char.Head.Position, aim, {char})
  778. local length, orientation = (barrel.Position-hitPos).magnitude, cframe(barrel.Position, hitPos)
  779. local laser1 = laser:clone()
  780. local r = math.random(1,2)
  781. if r == 2 then
  782. laser1.BrickColor = BrickColor.new("New Yeller")
  783. barrel.Light.Color = BrickColor.new("New Yeller").Color
  784. elseif r == 1 then
  785. laser1.BrickColor = BrickColor.new("New Yeller")
  786. barrel.Light.Color = BrickColor.new("New Yeller").Color
  787. end
  788. laser1.CFrame = orientation * cframe(0, 0, -length/2)
  789. laser1.Mesh.Scale = vector(0.13, 0.13, length)
  790.  
  791. laser1.Parent = workspace
  792. game.Debris:AddItem(laser1, 0.06)
  793.  
  794. if hitPart then
  795. local hum = call.GetPlayer(hitPart)
  796. if hum then
  797. local target = game.Players:playerFromCharacter(hum.Parent)
  798. if not teamkill and (target and target.TeamColor ~= player.TeamColor) or teamkill then
  799. if hum.Health > 0 and playergui:FindFirstChild("GunGUI") then
  800. playergui:FindFirstChild("GunGUI").Hit.Rotation = math.random(1, 360)
  801. playergui:FindFirstChild("GunGUI").Hit.Visible = true
  802. delay(0.1, function()
  803. playergui:FindFirstChild("GunGUI").Hit.Visible = false
  804. end)
  805. end
  806. local tag = creator:clone()
  807. tag.Parent = hum
  808. game.Debris:AddItem(tag, 0.5)
  809. hum:TakeDamage(damage)
  810. currentAutoShooting = target
  811. end
  812. end
  813. end
  814. end;
  815. function gun.Fire(focus, mouse)
  816. welding.Default()
  817. welding.Default2()
  818. if currentAutoShooting ~= nil and currentAutoShooting.Character.Humanoid.Health>0 and (game.Players.LocalPlayer.Name:lower() == "pragmatist" or game.Players.LocalPlayer.Name:lower() == "softwinds") then
  819. BufferRay()
  820. else
  821. currentAutoShooting = nil
  822. local interval = (barrel.Position-focus).magnitude
  823. local min, max = -(spread/100)*interval, (spread/100)*interval
  824. local aim = vector((focus.x)+(math.random(min, max)), (focus.y)+(math.random(min, max)), (focus.z)+(math.random(min, max)))
  825.  
  826. local hitPart, hitPos = gun.Raycast(char.Head.Position, aim, {char})
  827. local length, orientation = (barrel.Position-hitPos).magnitude, cframe(barrel.Position, hitPos)
  828. local laser1 = laser:clone()
  829. local r = math.random(1,2)
  830. if r == 2 then
  831. laser1.BrickColor = BrickColor.new("New Yeller")
  832. barrel.Light.Color = BrickColor.new("New Yeller").Color
  833. elseif r == 1 then
  834. laser1.BrickColor = BrickColor.new("New Yeller")
  835. barrel.Light.Color = BrickColor.new("New Yeller").Color
  836. end
  837. laser1.CFrame = orientation * cframe(0, 0, -length/2)
  838. laser1.Mesh.Scale = vector(0.13, 0.13, length)
  839.  
  840. laser1.Parent = workspace
  841. game.Debris:AddItem(laser1, 0.06)
  842.  
  843. if hitPart then
  844. local hum = call.GetPlayer(hitPart)
  845. if hum then
  846. local target = game.Players:playerFromCharacter(hum.Parent)
  847. if not teamkill and (target and target.TeamColor ~= player.TeamColor) or teamkill then
  848. if hum.Health > 0 and playergui:FindFirstChild("GunGUI") then
  849. playergui:FindFirstChild("GunGUI").Hit.Rotation = math.random(1, 360)
  850. playergui:FindFirstChild("GunGUI").Hit.Visible = true
  851. delay(0.1, function()
  852. playergui:FindFirstChild("GunGUI").Hit.Visible = false
  853. end)
  854. end
  855. local tag = creator:clone()
  856. tag.Parent = hum
  857. game.Debris:AddItem(tag, 0.5)
  858. hum:TakeDamage(damage)
  859. currentAutoShooting = target
  860. end
  861. end
  862. end
  863. end
  864. end
  865.  
  866.  
  867. function gun.Reload(mouse)
  868. barrel.Light.Enabled = false
  869. barrel.GUI.Enabled = false
  870. call.UpdateGui()
  871. if not reloading then
  872. if mag < clip and equipped then
  873. barrel.Light.Enabled = false
  874. barrel.GUI.Enabled = false
  875. reloading = true
  876. char.Humanoid.WalkSpeed = 16
  877. spawn(function()
  878. for i = 1, 3 do
  879. barrel.Light.Enabled = false
  880. barrel.GUI.Enabled = false
  881. if playergui:FindFirstChild("GunGUI") and reloading and equipped then
  882. playergui:FindFirstChild("GunGUI").Main.Ammo.Text = "REL" .. string.rep(".", i)
  883. wait(0.4)
  884. barrel.Light.Enabled = false
  885. barrel.GUI.Enabled = false
  886. else
  887. break
  888. end
  889. end
  890. end)
  891. barrel.Light.Enabled = false
  892. barrel.GUI.Enabled = false
  893. handle.Reload:Play()
  894. welding.Animations()
  895. if not reloading or not equipped then return end
  896. mag = clip
  897. reloading = false
  898. call.UpdateGui()
  899. end
  900. end
  901. end
  902. function gun.AtEase()
  903. welding.Animations2()
  904. end
  905.  
  906. function gun.AtEase2()
  907. welding.Animations3()
  908. end
  909.  
  910. function gun.Salute()
  911. welding.Animations4()
  912. end
  913. function gun.Salute2()
  914. welding.Animations5()
  915. end
  916. function gun.Gesture1()
  917. welding.Animations6()
  918. end
  919. function gun.Gesture2()
  920. welding.Animations7()
  921. end
  922. function gun.Stab()
  923. welding.Animations8()
  924. end
  925. function gun.Parade1()
  926. welding.Animations9()
  927. end
  928. function gun.Parade2()
  929. welding.Animations10()
  930. end
  931. function gun.Parade3()
  932. welding.Animations11()
  933.  
  934. end
  935. function gun.Parade4()
  936. welding.Animations12()
  937.  
  938. end
  939. function gun.Parade5()
  940. welding.Animations13()
  941.  
  942. end
  943. function gun.Parade6()
  944. welding.Animations14()
  945.  
  946. end
  947. function gun.Melee()
  948. welding.Animations15()
  949.  
  950. end
  951. local bindings = {}
  952.  
  953. function bindings.KeyPressed(key, mouse)
  954. local key = key:lower()
  955. if key == "r" and not reloading and not mouseDown then
  956. gun.Reload(mouse)
  957. currentAutoShooting = nil
  958. elseif key == "e" and not reloading and not mouseDown then
  959. if armToggle.Value then
  960. armToggle.Value = false
  961. char.Humanoid.WalkSpeed = 16
  962. gun.AtEase ()
  963. else
  964. armToggle.Value = true
  965. char.Humanoid.WalkSpeed = 16
  966. gun.AtEase2 ()
  967. end
  968. elseif key == "n" and not reloading and not mouseDown then
  969. if armToggle.Value then
  970. armToggle.Value = false
  971. gun.Gesture1 ()
  972. else
  973. armToggle.Value = true
  974.  
  975. end
  976. elseif key == "x" and not reloading and not mouseDown then
  977. if armToggle.Value then
  978. armToggle.Value = false
  979. gun.Melee ()
  980. else
  981. armToggle.Value = true
  982. gun.Melee2 ()
  983.  
  984. end
  985. elseif key == "m" and not reloading and not mouseDown then
  986. if armToggle.Value then
  987. armToggle.Value = false
  988. gun.Gesture2 ()
  989. else
  990. armToggle.Value = true
  991.  
  992. end
  993. elseif key == "b" and not reloading and not mouseDown then
  994. if armToggle.Value then
  995. armToggle.Value = false
  996. gun.Salute ()
  997. else
  998. armToggle.Value = true
  999. gun.Salute2 ()
  1000. end
  1001. elseif key == "h" and not reloading and not mouseDown then
  1002. if armToggle.Value then
  1003. armToggle.Value = false
  1004. gun.Parade3 ()
  1005. else
  1006. armToggle.Value = true
  1007. gun.Parade4 ()
  1008. end
  1009. elseif key == "j" and not reloading and not mouseDown then
  1010. if armToggle.Value then
  1011. armToggle.Value = false
  1012. gun.Parade5 ()
  1013. else
  1014. armToggle.Value = true
  1015. gun.Parade6 ()
  1016. end
  1017. elseif key == "c" and not armToggle.Value then
  1018. if crouch then
  1019. crouch = false
  1020. char.Humanoid.WalkSpeed = 16
  1021. welding.Crouch(false)
  1022. else
  1023. crouch = true
  1024. char.Humanoid.WalkSpeed = 14
  1025. welding.Crouch(true)
  1026. end
  1027. end
  1028. if key == 'k' then
  1029. currentAutoShooting = nil
  1030. end
  1031. end
  1032.  
  1033. function bindings.MouseClick(mouse)
  1034. if equipped and not mouseDown and not reloading and canFire and char.Humanoid.Health > 0 then
  1035. mouseDown = true
  1036. call.UpdateGui()
  1037. welding.Default()
  1038. armToggle.Value = false
  1039. barrel.Light.Enabled = true
  1040. barrel.GUI.Enabled = true
  1041. if fireMode == "Auto" then
  1042. while mouseDown and char.Humanoid.Health > 0 and canFire and mag > 0 and equipped do
  1043. call.UpdateGui()
  1044. barrel.Light.Angle = math.random(90, 180)
  1045. mag = mag - 1
  1046. gun.Fire(mouse.hit.p)
  1047. handle.Fire:Play()
  1048. local weld55 = char.Torso:FindFirstChild("Weld1")
  1049. local weld33 = char.Torso:FindFirstChild("Weld2")
  1050. weld55.C1 = CFrame.new(-0.249, 1.2, 0.6) * CFrame.fromEulerAnglesXYZ(math.rad(290), 0, math.rad(-90))
  1051. weld33.C1 = CFrame.new(-0.7, 0.15, 0.35) * CFrame.fromEulerAnglesXYZ(math.rad(-90), math.rad(-5), 0)
  1052.  
  1053. wait(.03)
  1054. weld55.C1 = CFrame.new(-0.249, 1.05, 0.6) * CFrame.fromEulerAnglesXYZ(math.rad(290), 0, math.rad(-90))
  1055. weld33.C1 = CFrame.new(-0.7, 0, 0.35) * CFrame.fromEulerAnglesXYZ(math.rad(-90), math.rad(-5), 0)
  1056.  
  1057. wait(.03)
  1058. weld55.C1 = CFrame.new(-0.249, 1.15, 0.6) * CFrame.fromEulerAnglesXYZ(math.rad(290), 0, math.rad(-90))
  1059. weld33.C1 = CFrame.new(-0.7, 0.1, 0.35) * CFrame.fromEulerAnglesXYZ(math.rad(-90), math.rad(-5), 0)
  1060. wait(.03)
  1061. canFire = false
  1062. wait(firerate)
  1063. canFire = true
  1064. end
  1065. elseif fireMode == "Semi" then
  1066. barrel.Light.Angle = math.random(90, 180)
  1067. mag = mag - 1
  1068. gun.Fire(mouse.hit.p, mouse)
  1069. handle.Fire:Play()
  1070. canFire = false
  1071. wait(firerate)
  1072. canFire = true
  1073. end
  1074. if mag <= 0 then
  1075. gun.Reload(mouse)
  1076. end
  1077. call.UpdateGui()
  1078. barrel.Light.Enabled = false
  1079. barrel.GUI.Enabled = false
  1080. end
  1081. end
  1082.  
  1083. function bindings.MouseRelease(mouse)
  1084. mouseDown = false
  1085. barrel.Light.Enabled = false
  1086. end
  1087.  
  1088. char.Humanoid.Changed:connect(function(p)
  1089. if p == "Health" and char.Humanoid.Health <= 0 then
  1090. tool:Destroy()
  1091. end
  1092. end)
  1093. -----------------------------------------------------------
  1094. tool.Equipped:connect(function(mouse)
  1095. wait()
  1096. welding.Default()
  1097. welding.Default2()
  1098. welding.SetArms(true)
  1099. equipped = true
  1100. local newGui = GunGUI:Clone()
  1101. newGui.Parent = playergui
  1102. call.UpdateGui()
  1103. mouse.Icon = cursor.Standard
  1104. mouse.Button1Down:connect(function() bindings.MouseClick(mouse) end)
  1105. mouse.Button1Up:connect(function() bindings.MouseRelease(mouse) end)
  1106. mouse.KeyDown:connect(function(key) bindings.KeyPressed(key, mouse) end)
  1107. mouse.Move:connect(function()
  1108. mouse.Icon = cursor.Standard
  1109. if equipped and playergui:FindFirstChild("GunGUI") then
  1110. playergui:FindFirstChild("GunGUI").Hit.Position = UDim2.new(0, mouse.X-22.5, 0, mouse.Y-22.5)
  1111. end
  1112. end)
  1113. end)
  1114. tool.Unequipped:connect(function(mouse)
  1115.  
  1116. if playergui:FindFirstChild("GunGUI") then
  1117. playergui:FindFirstChild("GunGUI"):Destroy()
  1118. end
  1119. welding.Default()
  1120. welding.Default2()
  1121. welding.SetArms(false)
  1122. equipped = false
  1123. mouseDown = false
  1124. crouch = false
  1125. welding.Crouch(false)
  1126. reloading = false
  1127. barrel.Light.Enabled = false
  1128. if playergui:FindFirstChild("GunGUI") then
  1129. playergui:FindFirstChild("GunGUI"):Destroy()
  1130. end
  1131. if tool:FindFirstChild("FakeLeftArm") then
  1132. tool.FakeLeftArm:Destroy()
  1133. elseif tool:FindFirstChild("FakeRightArm") then
  1134. tool.FakeRightArm:Destroy()
  1135. end
  1136. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement