Darxiuss

Untitled

Oct 1st, 2017
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 60.59 KB | None | 0 0
  1. --[[gunbladeX by w8x(aka waitex), no name needed]]--
  2. plr = game.Players.LocalPlayer
  3. char = plr.Character
  4. follow = false
  5. down = false
  6. damagewin = false
  7. combo = 0
  8. swordequipped = false
  9. mode = 'gun'
  10. db = false
  11. equiped = false
  12. mouse = plr:GetMouse()
  13. getPos=function(Pos,TorsoPos)
  14. return Vector3.new(Pos.x,TorsoPos.y,Pos.z)
  15. end
  16.  
  17.  
  18. Turn=function(mse,Torso,Gyro)
  19. g.cframe=CFrame.new(Torso.Position,getPos(mse.Hit.p,Torso.Position))* CFrame.Angles(0,-7.9,0)
  20. offset=(Torso.Position.y-mse.Hit.p.y)/100
  21. mag=(Torso.Position-mse.Hit.p).magnitude/80
  22. offset=offset/mag
  23. arm=Torso:FindFirstChild("Right Shoulder")
  24. end
  25.  
  26.  
  27. --
  28. Surfaces = {"FrontSurface", "BackSurface", "TopSurface", "BottomSurface", "LeftSurface", "RightSurface"}
  29. --
  30.  
  31. effectOn = false
  32. function startEff(part) --Starts a traill effect for a specified part
  33. effectOn = true
  34. damagewin = true
  35. local lastPoint = part.Position
  36. coroutine.resume(coroutine.create(function()
  37. while effectOn do
  38. wait()
  39. local mag = (lastPoint - part.Position).magnitude
  40. local p = cp(Mo, true, false, 0.2, 0.05, "Institutional white", 0.1, 0.1, mag+0.2, true)
  41. p.Parent = char
  42. p.CFrame = CFrame.new(lastPoint, part.Position) * CFrame.new(0, 0, -mag/2)
  43. local msh = Instance.new("BlockMesh",p)
  44. lastPoint = part.Position
  45. coroutine.resume(coroutine.create(function()
  46. for i=1, 10 do
  47. msh.Scale = msh.Scale + Vector3.new(-0.1, -0.1, 0)
  48. wait()
  49. end
  50. p:remove()
  51. end))
  52. end
  53. end))
  54. end
  55.  
  56. function endEff() --Ends all trail effects
  57. effectOn = false
  58. damagewin = false
  59. end
  60.  
  61.  
  62. function turnOnFollow()
  63. follow = true
  64. coroutine.resume(coroutine.create(function()
  65. g=Instance.new("BodyGyro")
  66. g.P=18000
  67. g.Name = 'Gyroz'
  68. g.D=600
  69. g.maxTorque=Vector3.new(1/0,1/0,1/0)
  70. g.cframe=char.Torso.CFrame
  71. g.Parent=char.Torso
  72. while wait() do
  73. if follow == true then
  74. Turn(mouse,char.Torso,g)
  75. else
  76. g:Destroy()
  77. break
  78.  
  79. end
  80. end
  81. end))
  82. end
  83. --[[CREATEPART]]--
  84. function cp(Parent, Anchor, Collide, Tran, Ref, Color, X, Y, Z, Break)--Creates a part, You can change it's properties using the arguments
  85. local p = Instance.new("Part")
  86. p.formFactor = "Custom"
  87. p.Anchored = Anchor
  88. p.CanCollide = Collide
  89. p.Transparency = Tran
  90. p.Reflectance = Ref
  91. p.BrickColor = BrickColor.new(Color)
  92. for _, Surf in pairs(Surfaces) do
  93. p[Surf] = "Smooth"
  94. end
  95. p.Size = Vector3.new(X, Y, Z)
  96. if Break then
  97. p:BreakJoints()
  98. else p:MakeJoints() end
  99. p.Parent = Parent
  100. return p
  101. end
  102. ------------------------
  103. local mouse = plr:GetMouse()
  104. local human = char.Humanoid
  105. running = false
  106. human.Running:connect(function(speed)
  107. if speed <= 0 then
  108. running = false
  109. else
  110. running = true
  111. end
  112. end)
  113. local function weldBetween(a, b)
  114. local weld = Instance.new("ManualWeld")
  115. weld.Part0 = a
  116. weld.Part1 = b
  117. weld.C0 = CFrame.new()
  118. weld.C1 = b.CFrame:inverse() * a.CFrame
  119. weld.Parent = a
  120. return weld;
  121. end
  122.  
  123. function takehats(char)
  124. for i,v in pairs(char:GetChildren()) do
  125. if v.ClassName == "Hat" then
  126. v.Parent = char
  127. end
  128. end
  129. end
  130.  
  131.  
  132.  
  133. --------------------------ARM 1-----------------------------------------
  134. local rawc = char["Right Arm"]:clone()
  135. char["Right Arm"]:Destroy()
  136. rawc.Parent = char
  137. local RS = weldBetween(char.Torso, char["Right Arm"])
  138. RS.C1 = CFrame.new(-1.5, 0, 0, 1, 0, 0, 0, 0.999999881, 0, 0, 0, 1)
  139. --------------------------LEG 1-----------------------------------------
  140. --[[local rlwc = char["Right Leg"]:clone()
  141. char["Right Leg"]:Destroy()
  142. rlwc.Parent = char
  143. local RLW = weldBetween(char.Torso, char["Right Leg"])
  144. RLW.C1 = CFrame.new(-1.5, 0, 0, 1, 0, 0, 0, 0.999999881, 0, 0, 0, 1)
  145. --------------------------LEG 2-----------------------------------------
  146. local llwc = char["Left Leg"]:clone()
  147. char["Left Leg"]:Destroy()
  148. llwc.Parent = char
  149. local LLW = weldBetween(char.Torso, char["Left Leg"])
  150. LLW.C1 = CFrame.new(-1.5, 0, 0, 1, 0, 0, 0, 0.999999881, 0, 0, 0, 1)
  151. --]]
  152. ----------------------------ARM 2---------------------------------------
  153.  
  154. local lawc = char["Left Arm"]:clone()
  155. char["Left Arm"]:Destroy()
  156. lawc.Parent = char
  157. local LS = weldBetween(char.Torso, char["Left Arm"])
  158. LS.C1 = CFrame.new(1.5, 0, 0, 1, 0, 0, 0, 0.999999881, 0, 0, 0, 1)
  159.  
  160. -----------------------------HEAD----------------------------------
  161. local head = weldBetween(char.Torso, char.Head)
  162. -----------------------------------------------------------------------
  163.  
  164. --[[BUILDING]]--
  165. local GunHandle = Instance.new("Part", char)
  166. GunHandle:BreakJoints()
  167. GunHandle.TopSurface = "Smooth"
  168. GunHandle.Name = 'GunHandle'
  169. GunHandle.BottomSurface = "Smooth"
  170. GunHandle.FormFactor = "Custom" GunHandle.CanCollide = false
  171. GunHandle.BrickColor = BrickColor.new("Really black")
  172. GunHandle.Size = Vector3.new(0.859998584, 0.280000061, 0.200000003)
  173. local GunHandleweld = Instance.new("ManualWeld")
  174. GunHandleweld.Part0 = char["Right Arm"]
  175. GunHandleweld.Part1 = GunHandle GunHandleweld.C0 = CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  176. GunHandleweld.C1 = CFrame.new(-0.679916859, 1.07505083, -0.670414925, 0.602217019, -0.796591759, -0.0526877679, 0.793560565, 0.604517281, -0.069427371, 0.0871559307, -5.90475224e-007, 0.996194601)
  177. GunHandleweld.Parent = char["Right Arm"]
  178.  
  179. local Extra = Instance.new("Part", char)
  180. Extra:BreakJoints()
  181. Extra.TopSurface = "Smooth"
  182. Extra.Name = 'Extra'
  183. Extra.BottomSurface = "Smooth"
  184. Extra.FormFactor = "Custom" Extra.CanCollide = false Extra.Transparency = 1
  185. Extra.BrickColor = BrickColor.new("Really black")
  186. Extra.Size = Vector3.new(0.200000003, 0.589999855, 0.229999989)
  187. local Extraweld = Instance.new("ManualWeld")
  188. Extraweld.Part0 = GunHandle Extraweld.Part1 = Extra Extraweld.C0 = CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  189. Extraweld.C1 = CFrame.new(0.362795383, 0.0779781342, -0.00500059128, 0.991097569, 0.133137852, -1.37835741e-007, -0.133137792, 0.991097331, 1.11758709e-008, 1.2293458e-007, -7.4505806e-009, 0.999999881)
  190. Extraweld.Parent = Extra
  191. local Extra = Instance.new("Part", char)
  192. Extra:BreakJoints()
  193. Extra.TopSurface = "Smooth"
  194. Extra.Name = 'Extra'
  195. Extra.BottomSurface = "Smooth"
  196. Extra.FormFactor = "Custom" Extra.CanCollide = false Extra.Transparency = 1
  197. Extra.BrickColor = BrickColor.new("Really black")
  198. Extra.Size = Vector3.new(0.200000003, 0.28000012, 0.200000003)
  199. local Extraweld = Instance.new("ManualWeld")
  200. Extraweld.Part0 = GunHandle Extraweld.Part1 = Extra Extraweld.C0 = CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  201. Extraweld.C1 = CFrame.new(0.423298717, 0.409011126, -0.00999975204, 0.944951534, 0.327210307, -4.47034836e-008, -0.327210277, 0.944951355, 1.86264515e-008, 3.7252903e-008, -2.23517418e-008, 0.999999821)
  202. Extraweld.Parent = Extra
  203. local Extra = Instance.new("Part", char)
  204. Extra:BreakJoints()
  205. Extra.TopSurface = "Smooth"
  206. Extra.Name = 'Extra'
  207. Extra.BottomSurface = "Smooth"
  208. Extra.FormFactor = "Custom" Extra.CanCollide = false Extra.Transparency = 1
  209. Extra.BrickColor = BrickColor.new("Really black")
  210. Extra.Size = Vector3.new(0.359999925, 0.289999992, 0.210000008)
  211. local Extraweld = Instance.new("ManualWeld")
  212. Extraweld.Part0 = GunHandle Extraweld.Part1 = Extra Extraweld.C0 = CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  213. Extraweld.C1 = CFrame.new(-0.501077235, -0.094645977, -0.00617027283, 0.96674186, -0.255753845, -3.33040953e-006, 0.255732179, 0.966659665, -0.0130320415, 0.0033361949, 0.0125977471, 0.999914825)
  214. Extraweld.Parent = Extra
  215. local Extra = Instance.new("Part", char)
  216. Extra:BreakJoints()
  217. Extra.TopSurface = "Smooth"
  218. Extra.Name = 'Extra'
  219. Extra.BottomSurface = "Smooth"
  220. Extra.FormFactor = "Custom" Extra.CanCollide = false Extra.Transparency = 1
  221. Extra.BrickColor = BrickColor.new("Really black")
  222. Extra.Size = Vector3.new(0.200000003, 0.28000012, 0.200000003)
  223. local Extraweld = Instance.new("ManualWeld")
  224. Extraweld.Part0 = GunHandle Extraweld.Part1 = Extra Extraweld.C0 = CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  225. Extraweld.C1 = CFrame.new(0.267832756, 0.0112096071, -0.0100011826, 0.618837774, 0.785518527, -1.49011612e-007, -0.785518587, 0.618837774, 9.86037776e-008, 1.49011612e-007, 2.98023224e-008, 0.99999994)
  226. Extraweld.Parent = Extra
  227. local Extra = Instance.new("Part", char)
  228. Extra:BreakJoints()
  229. Extra.TopSurface = "Smooth"
  230. Extra.Name = 'Extra'
  231. Extra.BottomSurface = "Smooth"
  232. Extra.FormFactor = "Custom" Extra.CanCollide = false Extra.Transparency = 1
  233. Extra.BrickColor = BrickColor.new("Really red")
  234. Extra.Size = Vector3.new(0.200000003, 3.37999749, 0.220000014)
  235. local Extraweld = Instance.new("ManualWeld")
  236. Extraweld.Part0 = GunHandle Extraweld.Part1 = Extra Extraweld.C0 = CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  237. Extraweld.C1 = CFrame.new(-0.0280203819, -2.03903341, -0.00899982452, -0.13582252, 0.990733147, 0, -0.990733147, -0.13582252, 1.08033419e-007, 8.56816769e-008, -1.49011612e-008, 0.999999821)
  238. Extraweld.Parent = Extra
  239. local Extra = Instance.new("Part", char)
  240. Extra:BreakJoints()
  241. Extra.TopSurface = "Smooth"
  242. Extra.Name = 'Extra'
  243. Extra.BottomSurface = "Smooth"
  244. Extra.FormFactor = "Custom" Extra.CanCollide = false Extra.Transparency = 1
  245. Extra.BrickColor = BrickColor.new("Medium stone grey")
  246. Extra.Size = Vector3.new(0.49800095, 3.37999773, 0.200000003)
  247. local Extraweld = Instance.new("ManualWeld")
  248. Extraweld.Part0 = GunHandle Extraweld.Part1 = Extra Extraweld.C0 = CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  249. Extraweld.C1 = CFrame.new(0.112977028, -2.02903414, -0.00900173187, -0.13582252, 0.990733147, 0, -0.990733147, -0.13582252, 1.08033419e-007, 8.56816769e-008, -1.49011612e-008, 0.999999821)
  250. Extraweld.Parent = Extra
  251. local Extra = Instance.new("Part", char)
  252. Extra:BreakJoints()
  253. Extra.TopSurface = "Smooth"
  254. Extra.Name = 'Extra'
  255. Extra.BottomSurface = "Smooth"
  256. Extra.FormFactor = "Custom" Extra.CanCollide = false Extra.Transparency = 1
  257. Extra.BrickColor = BrickColor.new("Really black")
  258. Extra.Size = Vector3.new(0.859998584, 0.280000061, 0.200000003)
  259. local Extraweld = Instance.new("ManualWeld")
  260. Extraweld.Part0 = GunHandle Extraweld.Part1 = Extra Extraweld.C0 = CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  261. Extraweld.C1 = CFrame.new(-0.230973721, -0.537735522, 1.43051147e-006, 0.191975921, -0.981399357, 2.23517418e-008, 0.981399715, 0.191975981, -1.2665987e-007, 1.08033419e-007, 2.98023224e-008, 0.99999994)
  262. Extraweld.Parent = Extra
  263. local Extra = Instance.new("Part", char)
  264. Extra:BreakJoints()
  265. Extra.TopSurface = "Smooth"
  266. Extra.Name = 'Extra'
  267. Extra.BottomSurface = "Smooth"
  268. Extra.FormFactor = "Custom" Extra.CanCollide = false Extra.Transparency = 1
  269. Extra.BrickColor = BrickColor.new("Really red")
  270. Extra.Size = Vector3.new(0.200000003, 0.25999999, 0.200000003)
  271. local Extraweld = Instance.new("ManualWeld")
  272. Extraweld.Part0 = GunHandle Extraweld.Part1 = Extra Extraweld.C0 = CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  273. Extraweld.C1 = CFrame.new(-0.64415735, -0.0841519833, -0.0109682083, 0.96674186, -0.255753845, -3.33040953e-006, 0.255732179, 0.966659665, -0.0130320415, 0.0033361949, 0.0125977471, 0.999914825)
  274. Extraweld.Parent = Extra
  275. local Damage1 = Instance.new("WedgePart", char)
  276. Damage1:BreakJoints()
  277. Damage1.TopSurface = "Smooth"
  278. Damage1.Name = 'Damage1'
  279. Damage1.BottomSurface = "Smooth"
  280. Damage1.FormFactor = "Custom" Damage1.CanCollide = false
  281. Damage1.BrickColor = BrickColor.new("Dark stone grey")
  282. Damage1.Size = Vector3.new(3.29400015, 0.200000003, 0.200000003)
  283. local Damage1weld = Instance.new("ManualWeld")
  284. Damage1weld.Part0 = GunHandle Damage1weld.Part1 = Damage1 Damage1weld.C0 = CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  285. Damage1weld.C1 = CFrame.new(2.09203911, -0.0608067513, 0.238359928, 0.990734696, 0.135811761, 7.4505806e-008, -1.3038516e-007, 2.38418579e-007, 0.99999994, 0.135811746, -0.990734458, 2.83122063e-007)
  286. Damage1weld.Parent = Damage1
  287. local Damage1Mesh = Instance.new("SpecialMesh",Damage1)
  288. Damage1Mesh.MeshId = ""
  289. Damage1Mesh.MeshType = Enum.MeshType.Wedge Damage1Mesh.Name = "Mesh"
  290. Damage1Mesh.Offset = Vector3.new(0, 0, 0)
  291. Damage1Mesh.Scale = Vector3.new(1, 0.600000024, 1)
  292.  
  293. local Damage2 = Instance.new("WedgePart", char)
  294. Damage2:BreakJoints()
  295. Damage2.TopSurface = "Smooth"
  296. Damage2.Name = 'Damage2'
  297. Damage2.BottomSurface = "Smooth"
  298. Damage2.FormFactor = "Custom" Damage2.CanCollide = false
  299. Damage2.BrickColor = BrickColor.new("Dark stone grey")
  300. Damage2.Size = Vector3.new(3.29400015, 0.200000003, 0.200000003)
  301. local Damage2weld = Instance.new("ManualWeld")
  302. Damage2weld.Part0 = GunHandle Damage2weld.Part1 = Damage2 Damage2weld.C0 = CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  303. Damage2weld.C1 = CFrame.new(-2.09204006, -0.0511956215, 0.23835969, -0.990734637, -0.13581188, -1.2665987e-007, 1.78813934e-007, -1.86264515e-007, -0.999999821, 0.135811895, -0.990734458, 2.42143869e-007)
  304. Damage2weld.Parent = Damage2
  305. local Damage2Mesh = Instance.new("SpecialMesh",Damage2)
  306. Damage2Mesh.MeshId = ""
  307. Damage2Mesh.MeshType = Enum.MeshType.Wedge Damage2Mesh.Name = "Mesh"
  308. Damage2Mesh.Offset = Vector3.new(0, 0, 0)
  309. Damage2Mesh.Scale = Vector3.new(1, 0.600000024, 1)
  310.  
  311. local GunBlast = Instance.new("Part", char)
  312. GunBlast:BreakJoints()
  313. GunBlast.TopSurface = "Smooth"
  314. GunBlast.Name = 'GunBlast'
  315. GunBlast.BottomSurface = "Smooth"
  316. GunBlast.FormFactor = "Custom" GunBlast.CanCollide = false
  317. GunBlast.BrickColor = BrickColor.new("Really black")
  318. GunBlast.Size = Vector3.new(0.200000003, 0.24000001, 0.200000003)
  319. local GunBlastweld = Instance.new("ManualWeld")
  320. GunBlastweld.Part0 = GunHandle GunBlastweld.Part1 = GunBlast GunBlastweld.C0 = CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  321. GunBlastweld.C1 = CFrame.new(-0.02805233, -3.63905263, -0.00900173187, -0.13582252, 0.990733147, 0, -0.990733147, -0.13582252, 1.08033419e-007, 8.56816769e-008, -1.49011612e-008, 0.999999821)
  322. GunBlastweld.Parent = GunBlast
  323. local GunBlastMesh = Instance.new("CylinderMesh",GunBlast)
  324. GunBlastMesh.Name = "Mesh"
  325. GunBlastMesh.Offset = Vector3.new(0, 0, 0)
  326. GunBlastMesh.Scale = Vector3.new(1, 1, 1)
  327.  
  328. local Trail = Instance.new("Part", char)
  329. Trail:BreakJoints()
  330. Trail.TopSurface = "Smooth"
  331. Trail.Name = 'Trail'
  332. Trail.BottomSurface = "Smooth"
  333. Trail.FormFactor = "Custom" Trail.CanCollide = false
  334. Trail.BrickColor = BrickColor.new("Medium stone grey")
  335. Trail.Size = Vector3.new(0.49800095, 0.902997732, 0.200000003)
  336. local Trailweld = Instance.new("ManualWeld")
  337. Trailweld.Part0 = GunHandle Trailweld.Part1 = Trail Trailweld.C0 = CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  338. Trailweld.C1 = CFrame.new(4.00006199, 0.0189990997, -0.0090007782, 0.990734518, 0.135812134, -7.4505806e-008, -0.13581191, 0.990734458, -3.7252903e-008, 4.84287739e-008, 0, 0.999999821)
  339. Trailweld.Parent = Trail
  340. local MainBackHandle = Instance.new("Part", char)
  341. MainBackHandle:BreakJoints()
  342. MainBackHandle.TopSurface = "Smooth"
  343. MainBackHandle.Name = 'MainBackHandle'
  344. MainBackHandle.BottomSurface = "Smooth"
  345. MainBackHandle.FormFactor = "Custom" MainBackHandle.CanCollide = false
  346. MainBackHandle.BrickColor = BrickColor.new("Really black")
  347. MainBackHandle.Size = Vector3.new(0.859998584, 0.280000061, 0.200000003)
  348. local MainBackHandleweld = Instance.new("ManualWeld")
  349. MainBackHandleweld.Part0 = char["Torso"]
  350. MainBackHandleweld.Part1 = MainBackHandle MainBackHandleweld.C0 = CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  351. MainBackHandleweld.C1 = CFrame.new(-1.56847382, -0.116961241, -0.801148415, 0.602220416, -0.796595454, -0.052687373, 0.793558061, 0.604516923, -0.0694272742, 0.0871557966, 2.59697934e-008, 0.99619472)
  352. MainBackHandleweld.Parent = char["Torso"]
  353.  
  354. local InTheBack = Instance.new("Part", char)
  355. InTheBack:BreakJoints()
  356. InTheBack.TopSurface = "Smooth"
  357. InTheBack.Name = 'InTheBack'
  358. InTheBack.BottomSurface = "Smooth"
  359. InTheBack.FormFactor = "Custom" InTheBack.CanCollide = false
  360. InTheBack.BrickColor = BrickColor.new("Really black")
  361. InTheBack.Size = Vector3.new(0.200000003, 0.589999855, 0.229999989)
  362. local InTheBackweld = Instance.new("ManualWeld")
  363. InTheBackweld.Part0 = MainBackHandle InTheBackweld.Part1 = InTheBack InTheBackweld.C0 = CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  364. InTheBackweld.C1 = CFrame.new(0.362790138, 0.0779769421, -0.00500106812, 0.99110657, 0.133140996, 1.00582838e-007, -0.133144215, 0.991092086, 9.68575478e-008, 9.68575478e-008, 1.34110451e-007, 1)
  365. InTheBackweld.Parent = InTheBack
  366. local InTheBack = Instance.new("Part", char)
  367. InTheBack:BreakJoints()
  368. InTheBack.TopSurface = "Smooth"
  369. InTheBack.Name = 'InTheBack'
  370. InTheBack.BottomSurface = "Smooth"
  371. InTheBack.FormFactor = "Custom" InTheBack.CanCollide = false
  372. InTheBack.BrickColor = BrickColor.new("Really black")
  373. InTheBack.Size = Vector3.new(0.200000003, 0.28000012, 0.200000003)
  374. local InTheBackweld = Instance.new("ManualWeld")
  375. InTheBackweld.Part0 = MainBackHandle InTheBackweld.Part1 = InTheBack InTheBackweld.C0 = CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  376. InTheBackweld.C1 = CFrame.new(0.423299283, 0.409009933, -0.0100007057, 0.944957137, 0.327217668, 1.04308128e-007, -0.327223659, 0.944943845, 9.68575478e-008, 1.2293458e-007, 1.11758709e-007, 1)
  377. InTheBackweld.Parent = InTheBack
  378. local InTheBack = Instance.new("Part", char)
  379. InTheBack:BreakJoints()
  380. InTheBack.TopSurface = "Smooth"
  381. InTheBack.Name = 'InTheBack'
  382. InTheBack.BottomSurface = "Smooth"
  383. InTheBack.FormFactor = "Custom" InTheBack.CanCollide = false
  384. InTheBack.BrickColor = BrickColor.new("Really black")
  385. InTheBack.Size = Vector3.new(0.359999925, 0.289999992, 0.210000008)
  386. local InTheBackweld = Instance.new("ManualWeld")
  387. InTheBackweld.Part0 = MainBackHandle InTheBackweld.Part1 = InTheBack InTheBackweld.C0 = CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  388. InTheBackweld.C1 = CFrame.new(-0.501068175, -0.0946481228, -0.00617218018, 0.96674937, -0.255761236, -3.21492553e-006, 0.255741835, 0.966652691, -0.0130318254, 0.00333636999, 0.0125977471, 0.999915063)
  389. InTheBackweld.Parent = InTheBack
  390. local InTheBack = Instance.new("Part", char)
  391. InTheBack:BreakJoints()
  392. InTheBack.TopSurface = "Smooth"
  393. InTheBack.Name = 'InTheBack'
  394. InTheBack.BottomSurface = "Smooth"
  395. InTheBack.FormFactor = "Custom" InTheBack.CanCollide = false
  396. InTheBack.BrickColor = BrickColor.new("Really black")
  397. InTheBack.Size = Vector3.new(0.200000003, 0.28000012, 0.200000003)
  398. local InTheBackweld = Instance.new("ManualWeld")
  399. InTheBackweld.Part0 = MainBackHandle InTheBackweld.Part1 = InTheBack InTheBackweld.C0 = CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  400. InTheBackweld.C1 = CFrame.new(0.267831683, 0.0112081766, -0.0100002289, 0.618831515, 0.78552413, 1.2665987e-007, -0.785536408, 0.618823469, 1.49011612e-008, 1.04308128e-007, 1.1920929e-007, 1)
  401. InTheBackweld.Parent = InTheBack
  402. local InTheBack = Instance.new("Part", char)
  403. InTheBack:BreakJoints()
  404. InTheBack.TopSurface = "Smooth"
  405. InTheBack.Name = 'InTheBack'
  406. InTheBack.BottomSurface = "Smooth"
  407. InTheBack.FormFactor = "Custom" InTheBack.CanCollide = false
  408. InTheBack.BrickColor = BrickColor.new("Really red")
  409. InTheBack.Size = Vector3.new(0.200000003, 3.37999749, 0.220000014)
  410. local InTheBackweld = Instance.new("ManualWeld")
  411. InTheBackweld.Part0 = MainBackHandle InTheBackweld.Part1 = InTheBack InTheBackweld.C0 = CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  412. InTheBackweld.C1 = CFrame.new(-0.0280046463, -2.03900051, -0.0090007782, -0.135818273, 0.990729451, 9.68575478e-008, -0.990743697, -0.135815069, -9.31322575e-008, 9.31322575e-008, 9.68575478e-008, 1)
  413. InTheBackweld.Parent = InTheBack
  414. local InTheBack = Instance.new("Part", char)
  415. InTheBack:BreakJoints()
  416. InTheBack.TopSurface = "Smooth"
  417. InTheBack.Name = 'InTheBack'
  418. InTheBack.BottomSurface = "Smooth"
  419. InTheBack.FormFactor = "Custom" InTheBack.CanCollide = false
  420. InTheBack.BrickColor = BrickColor.new("Medium stone grey")
  421. InTheBack.Size = Vector3.new(0.49800095, 3.37999773, 0.200000003)
  422. local InTheBackweld = Instance.new("ManualWeld")
  423. InTheBackweld.Part0 = MainBackHandle InTheBackweld.Part1 = InTheBack InTheBackweld.C0 = CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  424. InTheBackweld.C1 = CFrame.new(0.112993479, -2.029001, -0.00900173187, -0.135818273, 0.990729451, 9.68575478e-008, -0.990743697, -0.135815069, -9.31322575e-008, 9.31322575e-008, 9.68575478e-008, 1)
  425. InTheBackweld.Parent = InTheBack
  426. local InTheBack = Instance.new("Part", char)
  427. InTheBack:BreakJoints()
  428. InTheBack.TopSurface = "Smooth"
  429. InTheBack.Name = 'InTheBack'
  430. InTheBack.BottomSurface = "Smooth"
  431. InTheBack.FormFactor = "Custom" InTheBack.CanCollide = false
  432. InTheBack.BrickColor = BrickColor.new("Really black")
  433. InTheBack.Size = Vector3.new(0.859998584, 0.280000061, 0.200000003)
  434. local InTheBackweld = Instance.new("ManualWeld")
  435. InTheBackweld.Part0 = MainBackHandle InTheBackweld.Part1 = InTheBack InTheBackweld.C0 = CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  436. InTheBackweld.C1 = CFrame.new(-0.230968237, -0.537727952, 9.53674316e-007, 0.191970393, -0.981396496, -9.68575478e-008, 0.981410742, 0.191966474, 9.68575478e-008, 1.15483999e-007, 1.34110451e-007, 1)
  437. InTheBackweld.Parent = InTheBack
  438. local InTheBack = Instance.new("Part", char)
  439. InTheBack:BreakJoints()
  440. InTheBack.TopSurface = "Smooth"
  441. InTheBack.Name = 'InTheBack'
  442. InTheBack.BottomSurface = "Smooth"
  443. InTheBack.FormFactor = "Custom" InTheBack.CanCollide = false
  444. InTheBack.BrickColor = BrickColor.new("Really red")
  445. InTheBack.Size = Vector3.new(0.200000003, 0.25999999, 0.200000003)
  446. local InTheBackweld = Instance.new("ManualWeld")
  447. InTheBackweld.Part0 = MainBackHandle InTheBackweld.Part1 = InTheBack InTheBackweld.C0 = CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  448. InTheBackweld.C1 = CFrame.new(-0.644146442, -0.084154129, -0.0109686852, 0.96674937, -0.255761236, -3.21492553e-006, 0.255741835, 0.966652691, -0.0130318254, 0.00333636999, 0.0125977471, 0.999915063)
  449. InTheBackweld.Parent = InTheBack
  450. local InTheBack = Instance.new("WedgePart", char)
  451. InTheBack:BreakJoints()
  452. InTheBack.TopSurface = "Smooth"
  453. InTheBack.Name = 'InTheBack'
  454. InTheBack.BottomSurface = "Smooth"
  455. InTheBack.FormFactor = "Custom" InTheBack.CanCollide = false
  456. InTheBack.BrickColor = BrickColor.new("Dark stone grey")
  457. InTheBack.Size = Vector3.new(3.29400015, 0.200000003, 0.200000003)
  458. local InTheBackweld = Instance.new("ManualWeld")
  459. InTheBackweld.Part0 = MainBackHandle InTheBackweld.Part1 = InTheBack InTheBackweld.C0 = CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  460. InTheBackweld.C1 = CFrame.new(2.09200335, -0.0608072281, 0.238366365, 0.990743518, 0.135815084, 2.57045031e-007, -2.23517418e-008, -1.86264515e-007, 1, 0.135818407, -0.990729213, -3.94880772e-007)
  461. InTheBackweld.Parent = InTheBack
  462. local InTheBackMesh = Instance.new("SpecialMesh",InTheBack)
  463. InTheBackMesh.MeshId = ""
  464. InTheBackMesh.MeshType = Enum.MeshType.Wedge InTheBackMesh.Name = "Mesh"
  465. InTheBackMesh.Offset = Vector3.new(0, 0, 0)
  466. InTheBackMesh.Scale = Vector3.new(1, 0.600000024, 1)
  467.  
  468. local InTheBack = Instance.new("WedgePart", char)
  469. InTheBack:BreakJoints()
  470. InTheBack.TopSurface = "Smooth"
  471. InTheBack.Name = 'InTheBack'
  472. InTheBack.BottomSurface = "Smooth"
  473. InTheBack.FormFactor = "Custom" InTheBack.CanCollide = false
  474. InTheBack.BrickColor = BrickColor.new("Dark stone grey")
  475. InTheBack.Size = Vector3.new(3.29400015, 0.200000003, 0.200000003)
  476. local InTheBackweld = Instance.new("ManualWeld")
  477. InTheBackweld.Part0 = MainBackHandle InTheBackweld.Part1 = InTheBack InTheBackweld.C0 = CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  478. InTheBackweld.C1 = CFrame.new(-2.09200335, -0.051194191, 0.238366127, -0.990743518, -0.135815084, -3.39001417e-007, 1.1920929e-007, 2.30967999e-007, -1.0000006, 0.135818407, -0.990729213, -4.09781933e-007)
  479. InTheBackweld.Parent = InTheBack
  480. local InTheBackMesh = Instance.new("SpecialMesh",InTheBack)
  481. InTheBackMesh.MeshId = ""
  482. InTheBackMesh.MeshType = Enum.MeshType.Wedge InTheBackMesh.Name = "Mesh"
  483. InTheBackMesh.Offset = Vector3.new(0, 0, 0)
  484. InTheBackMesh.Scale = Vector3.new(1, 0.600000024, 1)
  485.  
  486. local InTheBack = Instance.new("Part", char)
  487. InTheBack:BreakJoints()
  488. InTheBack.TopSurface = "Smooth"
  489. InTheBack.Name = 'InTheBack'
  490. InTheBack.BottomSurface = "Smooth"
  491. InTheBack.FormFactor = "Custom" InTheBack.CanCollide = false
  492. InTheBack.BrickColor = BrickColor.new("Really black")
  493. InTheBack.Size = Vector3.new(0.200000003, 0.24000001, 0.200000003)
  494. local InTheBackweld = Instance.new("ManualWeld")
  495. InTheBackweld.Part0 = MainBackHandle InTheBackweld.Part1 = InTheBack InTheBackweld.C0 = CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  496. InTheBackweld.C1 = CFrame.new(-0.0280225277, -3.63899231, -0.0090007782, -0.135818273, 0.990729451, 9.68575478e-008, -0.990743697, -0.135815069, -9.31322575e-008, 9.31322575e-008, 9.68575478e-008, 1)
  497. InTheBackweld.Parent = InTheBack
  498. local InTheBackMesh = Instance.new("CylinderMesh",InTheBack)
  499. InTheBackMesh.Name = "Mesh"
  500. InTheBackMesh.Offset = Vector3.new(0, 0, 0)
  501. InTheBackMesh.Scale = Vector3.new(1, 1, 1)
  502.  
  503. local InTheBack = Instance.new("Part", char)
  504. InTheBack:BreakJoints()
  505. InTheBack.TopSurface = "Smooth"
  506. InTheBack.Name = 'InTheBack'
  507. InTheBack.Transparency = 1
  508. InTheBack.BottomSurface = "Smooth"
  509. InTheBack.FormFactor = "Custom" InTheBack.CanCollide = false
  510. InTheBack.BrickColor = BrickColor.new("Medium stone grey")
  511. InTheBack.Size = Vector3.new(0.49800095, 0.902997732, 0.200000003)
  512. local InTheBackweld = Instance.new("ManualWeld")
  513. InTheBackweld.Part0 = MainBackHandle InTheBackweld.Part1 = InTheBack InTheBackweld.C0 = CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  514. InTheBackweld.C1 = CFrame.new(3.99999452, 0.0189905167, -0.0090007782, 0.990743458, 0.135815248, 9.31322575e-008, -0.135818422, 0.990729451, 8.94069672e-008, 9.68575478e-008, 1.34110451e-007, 1)
  515. InTheBackweld.Parent = InTheBack
  516.  
  517. Damage1.Transparency = 1
  518. Damage2.Transparency = 1
  519. Trail.Transparency = 1
  520. GunBlast.Transparency = 1
  521. GunHandle.Transparency = 1
  522. --------------------------------------------
  523.  
  524.  
  525. --[[ANIMATION FUNCTIONS]]--
  526.  
  527.  
  528. do
  529. local function QuaternionFromCFrame(cf)
  530. local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components()
  531. local trace = m00 + m11 + m22
  532. if trace > 0 then
  533. local s = math.sqrt(1 + trace)
  534. local recip = 0.5/s
  535. return (m21-m12)*recip, (m02-m20)*recip, (m10-m01)*recip, s*0.5
  536.  
  537. else
  538. local i = 0
  539. if m11 > m00 then
  540. i = 1
  541. end
  542. if m22 > (i == 0 and m00 or m11) then
  543. i = 2
  544. end
  545. if i == 0 then
  546. local s = math.sqrt(m00-m11-m22+1)
  547. local recip = 0.5/s
  548. return 0.5*s, (m10+m01)*recip, (m20+m02)*recip, (m21-m12)*recip
  549. elseif i == 1 then
  550. local s = math.sqrt(m11-m22-m00+1)
  551. local recip = 0.5/s
  552. return (m01+m10)*recip, 0.5*s, (m21+m12)*recip, (m02-m20)*recip
  553. elseif i == 2 then
  554. local s = math.sqrt(m22-m00-m11+1)
  555. local recip = 0.5/s return (m02+m20)*recip, (m12+m21)*recip, 0.5*s, (m10-m01)*recip
  556. end
  557. end
  558. end
  559.  
  560.  
  561.  
  562. local function QuaternionToCFrame(px, py, pz, x, y, z, w)
  563. local xs, ys, zs = x + x, y + y, z + z
  564. local wx, wy, wz = w*xs, w*ys, w*zs
  565. local xx = x*xs
  566. local xy = x*ys
  567. local xz = x*zs
  568. local yy = y*ys
  569. local yz = y*zs
  570. local zz = z*zs
  571. return CFrame.new(px, py, pz,1-(yy+zz), xy - wz, xz + wy,xy + wz, 1-(xx+zz), yz - wx, xz - wy, yz + wx, 1-(xx+yy))
  572. end
  573.  
  574. local function QuaternionSlerp(a, b, t)
  575. local cosTheta = a[1]*b[1] + a[2]*b[2] + a[3]*b[3] + a[4]*b[4]
  576. local startInterp, finishInterp;
  577. if cosTheta >= 0.0001 then
  578. if (1 - cosTheta) > 0.0001 then
  579. local theta = math.acos(cosTheta)
  580. local invSinTheta = 1/math.sin(theta)
  581. startInterp = math.sin((1-t)*theta)*invSinTheta
  582. finishInterp = math.sin(t*theta)*invSinTheta
  583. else
  584. startInterp = 1-t
  585. finishInterp = t
  586. end
  587. else
  588. if (1+cosTheta) > 0.0001 then
  589. local theta = math.acos(-cosTheta)
  590. local invSinTheta = 1/math.sin(theta)
  591. startInterp = math.sin((t-1)*theta)*invSinTheta
  592. finishInterp = math.sin(t*theta)*invSinTheta
  593. else
  594. startInterp = t-1
  595. finishInterp = t
  596. end
  597. end
  598. return a[1]*startInterp + b[1]*finishInterp, a[2]*startInterp + b[2]*finishInterp, a[3]*startInterp + b[3]*finishInterp, a[4]*startInterp + b[4]*finishInterp
  599. end
  600.  
  601. function clerp(a,b,t)
  602. local qa = {QuaternionFromCFrame(a)}
  603. local qb = {QuaternionFromCFrame(b)}
  604. local ax, ay, az = a.x, a.y, a.z
  605. local bx, by, bz = b.x, b.y, b.z
  606. local _t = 1-t
  607. return QuaternionToCFrame(_t*ax + t*bx, _t*ay + t*by, _t*az + t*bz,QuaternionSlerp(qa, qb, t))
  608. end
  609. end
  610.  
  611.  
  612. function showDamage(Damage, Parent)
  613. local char = Instance.new("Model", char)
  614. char.Name = Damage
  615. local h = Instance.new("Humanoid", char)
  616. h.Health = 0
  617. h.MaxHealth = 0
  618. local p = Instance.new("Part", char)
  619. p.Anchored = true
  620. p.Name = 'Head'
  621. p.FormFactor = 'Custom'
  622. p.CanCollide = false
  623. p.BrickColor = BrickColor.new("Really red")
  624. Instance.new("BlockMesh", p)
  625. p.Size = Vector3.new(0.5, 0.5, 0.5)
  626. p.CFrame = Parent.CFrame * CFrame.new(0, 1, 0)
  627. coroutine.resume(coroutine.create(function()
  628. for i=1, math.random(6, 15) do
  629. p.CFrame = p.CFrame * CFrame.new(0, 0.5, 0)
  630. wait()
  631. end
  632. wait(1)
  633. p:Destroy()
  634. end))
  635. end
  636.  
  637.  
  638. Damage1.Touched:connect(function(part)
  639. if damagewin == true then
  640. if part.Parent:findFirstChild("Humanoid") and part.Parent:findFirstChild("Head") and part.Parent ~= char then
  641. if part.Parent.Head:findFirstChild(char.Name.."didDamageWithGunBlade") then
  642. else
  643. local dmg = math.random(10, 25)
  644. part.Parent:findFirstChild("Humanoid"):TakeDamage(dmg)
  645. showDamage(tostring(dmg), part.Parent.Head)
  646. local m = Instance.new("Model", part.Parent:findFirstChild("Head"))
  647. m.Name = (char.Name.."didDamageWithGunBlade")
  648. coroutine.resume(coroutine.create(function()
  649. wait(0.07)
  650. m:Destroy()
  651. end))
  652. end
  653. end
  654. end
  655. end)
  656.  
  657. Damage2.Touched:connect(function(part)
  658. if damagewin == true then
  659. if part.Parent:findFirstChild("Humanoid") and part.Parent:findFirstChild("Head") and part.Parent ~= char then
  660. if part.Parent.Head:findFirstChild(char.Name.."didDamageWithGunBlade") then
  661. else
  662. local dmg = math.random(10, 25)
  663. part.Parent:findFirstChild("Humanoid"):TakeDamage(dmg)
  664. showDamage(tostring(dmg), part.Parent.Head)
  665. local m = Instance.new("Model", part.Parent:findFirstChild("Head"))
  666. m.Name = (char.Name.."didDamageWithGunBlade")
  667. coroutine.resume(coroutine.create(function()
  668. wait(0.07)
  669. m:Destroy()
  670. end))
  671. end
  672. end
  673. end
  674. end)
  675.  
  676. local run = game:GetService("RunService")
  677.  
  678. local doing = {}
  679.  
  680.  
  681.  
  682. function ctween(weld,prop,cfr,time,skipwait,stopafter)
  683. local function doit()
  684. local timeused = 0
  685. local bgn = weld[prop]
  686. doing[weld] = doing[weld] or {}
  687. local now = tick()
  688. doing[weld][prop] = now
  689. stopafter = math.min(stopafter or time,time)
  690. repeat
  691. local i = (tick()-now)/time
  692. weld[prop] = clerp(bgn,cfr,i)
  693. until ((tick()-now) >= stopafter or doing[weld][prop] ~= now or not run.Stepped:wait())
  694. weld[prop] = cfr
  695. return doing[weld][prop] == now
  696. end
  697. if not skipwait then return doit()
  698. else coroutine.wrap(doit)() end
  699. end
  700.  
  701.  
  702. function fire()
  703.  
  704.  
  705.  
  706.  
  707. pcall(function()
  708.  
  709.  
  710. local ray = Ray.new(GunBlast.CFrame.p, (mouse.Hit.p - GunBlast.CFrame.p).unit*400)
  711. local hit, position = game.Workspace:FindPartOnRay(ray, char)
  712.  
  713. local humanoid = hit and hit.Parent and hit.Parent:FindFirstChild("Humanoid") or hit.Parent.Parent:FindFirstChild("Humanoid")
  714.  
  715.  
  716. if humanoid and humanoid.Health ~= 0 then
  717. if hit.Name == 'Head' or hit.Name == 'Handle' then
  718. humanoid:TakeDamage(5000)
  719. showDamage('HEADSHOT!', humanoid.Parent.Head)
  720. else
  721. local dmg = math.random(21, 40)
  722. humanoid:TakeDamage(dmg)
  723. showDamage(tostring(dmg), humanoid.Parent.Head)
  724. end
  725. end
  726. local distance = (position - GunBlast.CFrame.p).magnitude
  727. local rayPart = Instance.new("Part", char)
  728. rayPart.Name = "RayPart"
  729. rayPart.BrickColor = BrickColor.new("Really red")
  730.  
  731.  
  732.  
  733.  
  734. rayPart.Transparency = 0
  735. rayPart.Anchored = true
  736. rayPart.CanCollide = false
  737. rayPart.TopSurface = Enum.SurfaceType.Smooth
  738. rayPart.BottomSurface = Enum.SurfaceType.Smooth
  739. rayPart.formFactor = Enum.FormFactor.Custom
  740. rayPart.Size = Vector3.new(0.4, 0.4, distance)
  741. rayPart.CFrame = CFrame.new(position, GunBlast.CFrame.p) * CFrame.new(0, 0, -distance/2)
  742.  
  743. local rp2 = Instance.new("Part", char)
  744. rp2.Name = "RayPart"
  745. rp2.BrickColor = BrickColor.new("White")
  746. rp2.Transparency = 0
  747. rp2.Anchored = true
  748. rp2.CanCollide = false
  749. rp2.TopSurface = Enum.SurfaceType.Smooth
  750. rp2.BottomSurface = Enum.SurfaceType.Smooth
  751. rp2.formFactor = Enum.FormFactor.Custom
  752. rp2.Size = Vector3.new(0.1, 0.1, distance)
  753. rp2.CFrame = CFrame.new(position, GunBlast.CFrame.p) * CFrame.new(0, 0, -distance/2)
  754. coroutine.resume(coroutine.create(function()
  755. for i=1, 10 do
  756. rayPart.Transparency = rayPart.Transparency + 0.1
  757. rp2.Transparency = rp2.Transparency + 0.1
  758. wait()
  759. if i == 10 then
  760. rayPart:Destroy()
  761. rp2:Destroy()
  762. end
  763. end
  764. end))
  765.  
  766.  
  767.  
  768. ctween(LS, 'C0', CFrame.new(-1.92999864, -0.769999623, -1.04999936, -0.0389333256, 0.867639124, -0.495677263, -0.894238949, -0.251610965, -0.370185107, -0.445902109, 0.428838819, 0.785667896) ,.1, true)
  769. ctween(RS, 'C0', CFrame.new(-0.199999824, -0.959999442, -0.69999963, 0.260044307, 0.953789711, 0.150614113, 0.957044125, -0.275305927, 0.0910525396, 0.128308654, 0.12046577, -0.984400272), .1)
  770.  
  771. ctween(GunHandleweld, 'C0', CFrame.new(1.23999918, -1.549999, 0.889999449, 0.563136995, 0.826374352, -0.000966853462, 0.825970173, -0.562892675, -0.030742839, -0.0259466805, 0.0165129434, -0.999536097), .6, true)
  772. ctween(RS, 'C0', CFrame.new(0.470000029, -0.959999442, -0.959999382, -0.189942151, 0.979077756, -0.0731910095, 0.981406569, 0.191463917, 0.0142595293, 0.0279740151, -0.0691197589, -0.997228205) , .6, true)
  773. ctween(LS, 'C0', CFrame.new(-0.819999695, -0.859999537, -0.250000119, 0.488873035, 0.814477682, -0.31247437, -0.866392732, 0.411486, -0.282935917, -0.101865083, 0.409042627, 0.906815469), .6, true)
  774.  
  775. db = true
  776. end)
  777. end
  778.  
  779.  
  780.  
  781. function unequip()
  782. if equiped == false then
  783. equiped = true
  784. swordequipped = false
  785. for i,v in pairs(char:GetChildren()) do
  786. if v.Name == 'InTheBack' then v.Transparency = 1 elseif v.Name == 'Extra' then v.Transparency = 0 end
  787. end
  788. Damage1.Transparency = 0
  789. Damage2.Transparency = 0
  790. Trail.Transparency = 1
  791. GunBlast.Transparency = 0
  792. GunHandle.Transparency = 0
  793. MainBackHandle.Transparency = 1
  794.  
  795. ctween(GunHandleweld, 'C0', CFrame.new(1.23999918, -1.549999, 0.889999449, 0.563136995, 0.826374352, -0.000966853462, 0.825970173, -0.562892675, -0.030742839, -0.0259466805, 0.0165129434, -0.999536097), .3, true)
  796. ctween(RS, 'C0', CFrame.new(0.470000029, -0.959999442, -0.959999382, -0.189942151, 0.979077756, -0.0731910095, 0.981406569, 0.191463917, 0.0142595293, 0.0279740151, -0.0691197589, -0.997228205) , .3, true)
  797. ctween(LS, 'C0', CFrame.new(-0.819999695, -0.859999537, -0.250000119, 0.488873035, 0.814477682, -0.31247437, -0.866392732, 0.411486, -0.282935917, -0.101865083, 0.409042627, 0.906815469), .3, true)
  798. ctween(head, 'C0', CFrame.new(0, 0, 0, -0.104528487, 0, 0.994523168, 0, 1, 0, -0.994523168, 0, -0.104528487) , .3)
  799. turnOnFollow()
  800. end
  801. end
  802.  
  803.  
  804. function unequipz()
  805. if swordequipped == false then
  806. swordequipped = true
  807. combo = 0
  808. follow = false
  809. equiped = false
  810. for i,v in pairs(char:GetChildren()) do
  811. if v.Name == 'InTheBack' then v.Transparency = 1 elseif v.Name == 'Extra' then v.Transparency = 0 end
  812. end
  813. Damage1.Transparency = 0
  814. Damage2.Transparency = 0
  815. Trail.Transparency = 1
  816. GunBlast.Transparency = 0
  817. GunHandle.Transparency = 0
  818. MainBackHandle.Transparency = 1
  819.  
  820. ctween(RS, 'C0', CFrame.new(0.0899999887, -0.26000002, -0.329999954, 0.965926528, -0.258819163, -1.11758709e-008, 0.250000119, 0.933013082, -0.258819133, 0.0669873208, 0.250000119, 0.96592629), .3, true)
  821. ctween(LS, 'C0', CFrame.new(-0.180000007, -0.429999858, 0, 0.951057196, 0.309017152, 0, -0.309017152, 0.951057196, 0, 0, 0, 1), .3, true)
  822. ctween(head, 'C0', CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1) , .3, true)
  823. ctween(GunHandleweld, 'C0', CFrame.new(-0.519999802, -2.24999833, -0.879999459, 0.03886896, 0.103041813, 0.993919194, -0.754423738, -0.649217367, 0.0968083292, 0.655241787, -0.753597081, 0.0525024459) , .3)
  824. end
  825. end
  826.  
  827. mouse.KeyDown:connect(function(key)
  828. if key == 'e' then
  829. unequip()
  830. elseif key == 'q' then
  831.  
  832. unequipz()
  833. end
  834. end)
  835.  
  836.  
  837.  
  838. mouse.Button1Down:connect(function()
  839. if equiped == true then
  840. if db == false then
  841. db = true
  842. fire()
  843. wait(3)
  844. db = false
  845.  
  846. end
  847. elseif swordequipped == true then
  848. if combo == 0 then
  849. combo = 0.2
  850. ctween(head, 'C0', CFrame.new(-0.00999999978, -0.0399999991, -0.309999973, 1, 0, 0, 0, 0.965927422, -0.258819342, 0, 0.258819342, 0.965927422), .4, true)
  851. ctween(RS, 'C0', CFrame.new(-0.0500000119, 1.42999899, -0.289999992, 0.886918664, 0.152922362, -0.435886472, -0.318381906, -0.481315404, -0.816691339, -0.334685653, 0.863113403, -0.378199339) , .4, false)
  852.  
  853. combo = 0.5
  854. coroutine.resume(coroutine.create(function()
  855. wait(1)
  856. if combo == 0.5 then
  857. combo = 20
  858. ctween(RS, 'C0', CFrame.new(0.0899999887, -0.26000002, -0.329999954, 0.965926528, -0.258819163, -1.11758709e-008, 0.250000119, 0.933013082, -0.258819133, 0.0669873208, 0.250000119, 0.96592629), .3, true)
  859. ctween(LS, 'C0', CFrame.new(-0.180000007, -0.429999858, 0, 0.951057196, 0.309017152, 0, -0.309017152, 0.951057196, 0, 0, 0, 1), .3, true)
  860. ctween(head, 'C0', CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1) , .3, true)
  861. ctween(GunHandleweld, 'C0', CFrame.new(-0.519999802, -2.24999833, -0.879999459, 0.03886896, 0.103041813, 0.993919194, -0.754423738, -0.649217367, 0.0968083292, 0.655241787, -0.753597081, 0.0525024459) , .3)
  862. combo = 0
  863. end
  864. end))
  865. elseif combo == 0.5 then
  866. combo = 0.6
  867. startEff(Trail)
  868. ctween(head, 'C0', CFrame.new(-0.0799999908, -0.049999997, 0.26000005, 1, 0, 0, 0, 0.951058865, 0.309017807, 0, -0.309017807, 0.951058865), .14, true)
  869. ctween(RS, 'C0', CFrame.new(-0.349999964, 0.449999928, -0.220000014, 0.886918664, 0.330420405, 0.32280916, -0.318381906, 0.943588853, -0.0910717472, -0.334685653, -0.0220026802, 0.942082405) , .14, false)
  870. combo = 1
  871. endEff()
  872. coroutine.resume(coroutine.create(function()
  873. wait(1)
  874. if combo == 1 then
  875. combo = 20
  876. ctween(RS, 'C0', CFrame.new(0.0899999887, -0.26000002, -0.329999954, 0.965926528, -0.258819163, -1.11758709e-008, 0.250000119, 0.933013082, -0.258819133, 0.0669873208, 0.250000119, 0.96592629), .3, true)
  877. ctween(LS, 'C0', CFrame.new(-0.180000007, -0.429999858, 0, 0.951057196, 0.309017152, 0, -0.309017152, 0.951057196, 0, 0, 0, 1), .3, true)
  878. ctween(head, 'C0', CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1) , .3, true)
  879. ctween(GunHandleweld, 'C0', CFrame.new(-0.519999802, -2.24999833, -0.879999459, 0.03886896, 0.103041813, 0.993919194, -0.754423738, -0.649217367, 0.0968083292, 0.655241787, -0.753597081, 0.0525024459) , .3)
  880. combo = 0
  881. end
  882. end))
  883. elseif combo == 1 then
  884. combo = 1.1
  885. ctween(head, 'C0', CFrame.new(-0.049999997, -0.0399999991, -0.210000023, 0.898794591, 0, 0.438371301, 0.076122351, 0.984808207, -0.156073987, -0.431711763, 0.173648134, 0.885140181), .4, true)
  886. ctween(RS, 'C0', CFrame.new(-0.129999965, -0.859999478, -0.0399999991, 0.422618717, 0.714181364, 0.557979882, 0.742404938, 0.0803284869, -0.665120661, -0.519837856, 0.695338428, -0.496262223) , .4, false)
  887. combo = 1.5
  888. coroutine.resume(coroutine.create(function()
  889. wait(1)
  890. if combo == 1.5 then
  891. combo = 20
  892. ctween(RS, 'C0', CFrame.new(0.0899999887, -0.26000002, -0.329999954, 0.965926528, -0.258819163, -1.11758709e-008, 0.250000119, 0.933013082, -0.258819133, 0.0669873208, 0.250000119, 0.96592629), .3, true)
  893. ctween(LS, 'C0', CFrame.new(-0.180000007, -0.429999858, 0, 0.951057196, 0.309017152, 0, -0.309017152, 0.951057196, 0, 0, 0, 1), .3, true)
  894. ctween(head, 'C0', CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1) , .3, true)
  895. ctween(GunHandleweld, 'C0', CFrame.new(-0.519999802, -2.24999833, -0.879999459, 0.03886896, 0.103041813, 0.993919194, -0.754423738, -0.649217367, 0.0968083292, 0.655241787, -0.753597081, 0.0525024459) , .3)
  896. combo = 0
  897. end
  898. end))
  899. elseif combo == 1.5 then
  900. combo = 1.7
  901. startEff(Trail)
  902. ctween(head, 'C0', CFrame.new(0, 0, 0, 0.754710495, 0, -0.656059802, 0, 1, 0, 0.656059802, 0, 0.754710495), .14, true)
  903. ctween(RS, 'C0', CFrame.new(1.00999939, -1.09999931, 0.869999468, 0.422618717, -0.883083105, 0.203875676, 0.742404938, 0.466344744, 0.481002092, -0.519837856, -0.0519225299, 0.852688849), .14, false)
  904. combo = 2
  905. endEff()
  906. coroutine.resume(coroutine.create(function()
  907. wait(1)
  908. if combo == 2 then
  909. combo = 20
  910. ctween(RS, 'C0', CFrame.new(0.0899999887, -0.26000002, -0.329999954, 0.965926528, -0.258819163, -1.11758709e-008, 0.250000119, 0.933013082, -0.258819133, 0.0669873208, 0.250000119, 0.96592629), .3, true)
  911. ctween(LS, 'C0', CFrame.new(-0.180000007, -0.429999858, 0, 0.951057196, 0.309017152, 0, -0.309017152, 0.951057196, 0, 0, 0, 1), .3, true)
  912. ctween(head, 'C0', CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1) , .3, true)
  913. ctween(GunHandleweld, 'C0', CFrame.new(-0.519999802, -2.24999833, -0.879999459, 0.03886896, 0.103041813, 0.993919194, -0.754423738, -0.649217367, 0.0968083292, 0.655241787, -0.753597081, 0.0525024459) , .3)
  914. combo = 0
  915. end
  916. end))
  917. elseif combo == 2 then
  918. combo = 2.1
  919. ctween(head, 'C0' ,CFrame.new(0, -0.0199999996, -0.45999983, 1, 0, 0, 0, 0.927184403, -0.374606699, 0, 0.374606699, 0.927184403), .4, true)
  920. ctween(LS, 'C0', CFrame.new(0.230000049, 0.749999642, -0.399999976, 0.798636436, -0.590758502, 0.11483182, -0.300908089, -0.557228029, -0.773922741, 0.521188438, 0.583528578, -0.622785985), .4, true)
  921. ctween(RS, 'C0', CFrame.new(-0.599999726, 1.02999938, -0.46999982, 0.798514605, 0.560709178, -0.219047308, 0.20911099, -0.599588096, -0.772509813, -0.564490736, 0.571055591, -0.596029818) , .4, true)
  922. ctween(GunHandleweld, 'C0', CFrame.new(-0.220000044, -2.44999814, -0.629999697, 0.532018542, 0.178678751, 0.827670097, -0.662049472, -0.5216133, 0.538165331, 0.527878523, -0.834269166, -0.159212619) , .4, false)
  923. combo = 2.5
  924. coroutine.resume(coroutine.create(function()
  925. wait(1)
  926. if combo == 2.5 then
  927. combo = 20
  928. ctween(RS, 'C0', CFrame.new(0.0899999887, -0.26000002, -0.329999954, 0.965926528, -0.258819163, -1.11758709e-008, 0.250000119, 0.933013082, -0.258819133, 0.0669873208, 0.250000119, 0.96592629), .3, true)
  929. ctween(LS, 'C0', CFrame.new(-0.180000007, -0.429999858, 0, 0.951057196, 0.309017152, 0, -0.309017152, 0.951057196, 0, 0, 0, 1), .3, true)
  930. ctween(head, 'C0', CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1) , .3, true)
  931. ctween(GunHandleweld, 'C0', CFrame.new(-0.519999802, -2.24999833, -0.879999459, 0.03886896, 0.103041813, 0.993919194, -0.754423738, -0.649217367, 0.0968083292, 0.655241787, -0.753597081, 0.0525024459) , .3)
  932. combo = 0
  933. end
  934. end))
  935. elseif combo == 2.5 then
  936. startEff(Trail)
  937. combo = 2.6
  938. ctween(head, 'C0', CFrame.new(-0.0299999993, -0.0399999991, 0.230000049, 1, 0, 0, 0, 0.987689316, 0.156434685, 0, -0.156434685, 0.987689316), .14, true)
  939. ctween(LS, 'C0', CFrame.new(0.240000054, -0.0699999034, -7.4505806e-008, 0.475038588, -0.693489909, -0.541678011, -0.0898275226, 0.574136555, -0.813823342, 0.875372171, 0.435254782, 0.210441858) , .14, true)
  940. ctween(RS, 'C0', CFrame.new(-0.310000002, -0.23999995, -0.140000001, 0.798514605, 0.16934514, 0.577667773, 0.20911099, 0.821828723, -0.529978752, -0.564490736, 0.543992221, 0.620831072), .14, true)
  941. ctween(GunHandleweld, 'C0', CFrame.new(-0.979999363, -2.6999979, -0.599999726, -0.593809426, -0.128110632, 0.794353604, 0.237391844, -0.971200168, 0.0208286364, 0.768801928, 0.200938046, 0.607112229), .14, false)
  942. endEff()
  943.  
  944. wait(0.1)
  945. ctween(RS, 'C0', CFrame.new(0.0899999887, -0.26000002, -0.329999954, 0.965926528, -0.258819163, -1.11758709e-008, 0.250000119, 0.933013082, -0.258819133, 0.0669873208, 0.250000119, 0.96592629), .3, true)
  946. ctween(LS, 'C0', CFrame.new(-0.180000007, -0.429999858, 0, 0.951057196, 0.309017152, 0, -0.309017152, 0.951057196, 0, 0, 0, 1), .3, true)
  947. ctween(head, 'C0', CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1) , .3, true)
  948. ctween(GunHandleweld, 'C0', CFrame.new(-0.519999802, -2.24999833, -0.879999459, 0.03886896, 0.103041813, 0.993919194, -0.754423738, -0.649217367, 0.0968083292, 0.655241787, -0.753597081, 0.0525024459) , .3)
  949. combo = 0
  950. end
  951. end
  952. end)
Add Comment
Please, Sign In to add comment