Advertisement
Guest User

Untitled

a guest
Mar 24th, 2018
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 32.87 KB | None | 0 0
  1. -------------------------
  2. --skarp laser raser--
  3. -------------------------
  4. --By --
  5. --CKbackup-
  6. -----------
  7.  
  8. player = game.Players.LocalPlayer
  9. chara = player.Character
  10. debby = game.Debris
  11. Mouse = player:GetMouse()
  12. chara.Humanoid.WalkSpeed = 45
  13. rs = game:GetService("RunService").RenderStepped
  14. attacking = false
  15.  
  16. --Outfit--
  17. New = function(Object, Parent, Name, Data)
  18. local Object = Instance.new(Object)
  19. for Index, Value in pairs(Data or {}) do
  20. Object[Index] = Value
  21. end
  22. Object.Parent = Parent
  23. Object.Name = Name
  24. return Object
  25. end
  26.  
  27. BladeM = New("Model",chara,"BladeM",{})
  28. Blade = New("Part",BladeM,"Blade",{Size = Vector3.new(0.25, 0.400000036, 4.25),CFrame = CFrame.new(-10.6186581, 3.17678142, -22.8749371, -3.39850521e-05, -0.866028011, 0.499995649, 4.42377857e-10, 0.499995828, 0.866028011, -1, 2.94322326e-05, -1.69919949e-05),CanCollide = false,BottomSurface = Enum.SurfaceType.Smooth,TopSurface = Enum.SurfaceType.Smooth,})
  29. Mesh = New("SpecialMesh",Blade,"Mesh",{Scale = Vector3.new(0.75, 0.75, 0.75),MeshId = "rbxassetid://567385525",TextureId = "rbxassetid://567385661",MeshType = Enum.MeshType.FileMesh,})
  30. SWeld = New("ManualWeld",Blade,"SWeld",{Part0 = Blade,Part1 = chara["Right Arm"],C0 = CFrame.new(0, 0, 0, 1, -3.96366568e-06, -3.34970755e-05, 3.96365976e-06, 1, -1.78812002e-07, 3.34970755e-05, 1.7867923e-07, 1),C1 = CFrame.new(0.0812721252, -1.02322996, -1.5749836, 1, 0, 0, 0, 1, 0, 0, 0, 1),})
  31. STrail = New("Part",BladeM,"STrail",{Transparency = 1,Transparency = 1,Size = Vector3.new(0.200000003, 3.00000024, 0.200000003),CFrame = CFrame.new(-10.9177656, 2.85871983, -22.8999252, -7.84831172e-06, -0.499996543, 0.866027772, 2.41521539e-05, -0.866027653, -0.49999696, 1, 1.69922841e-05, 1.88728209e-05),BottomSurface = Enum.SurfaceType.Smooth,TopSurface = Enum.SurfaceType.Smooth,})
  32. Weld = New("ManualWeld",STrail,"Weld",{Part0 = STrail,Part1 = Blade,C0 = CFrame.new(0, 0, 0, -7.84829808e-06, 2.41521357e-05, 1, -0.499996603, -0.866027415, 1.69922878e-05, 0.866027534, -0.499996662, 1.88728318e-05),C1 = CFrame.new(0.0249977112, 0.10000515, -0.425002098, -3.39850521e-05, 4.42377857e-10, -1, -0.866028011, 0.499995828, 2.94322326e-05, 0.499995649, 0.866028011, -1.69919949e-05),})
  33. LauncherM = New("Model",chara,"LauncherM",{})
  34. Launcher = New("Part",LauncherM,"Launcher",{Size = Vector3.new(0.600000024, 1, 1),CFrame = CFrame.new(-11.0414219, 1.85505056, -22.7000008, 0, -0.258818984, 0.965925872, 0, 0.965925872, 0.258818984, -1, 0, 0),CanCollide = false,})
  35. Mesh = New("SpecialMesh",Launcher,"Mesh",{MeshId = "rbxassetid://936687645",TextureId = "rbxassetid://936688160",MeshType = Enum.MeshType.FileMesh,})
  36. LWeld = New("ManualWeld",Launcher,"LWeld",{Part0 = Launcher,Part1 = chara.Torso,C0 = CFrame.new(0, 0, 0, 0, 0, -1, -0.258818984, 0.965925872, 0, 0.965925872, 0.258818984, 0),C1 = CFrame.new(-0.0414218903, -1.14494944, 0.799999237, 1, 0, 0, 0, 1, 0, 0, 0, 1),})
  37. LBarrel = New("Part",LauncherM,"LBarrel",{Transparency = 1,Transparency = 1,Size = Vector3.new(0.200000003, 0.200000003, 0.200000003),CFrame = CFrame.new(-13.7908401, 0.911291361, -22.7000027, 0, -0.258818865, 0.965925932, 0, 0.965925932, 0.258818865, -1, 0, 0),BottomSurface = Enum.SurfaceType.Smooth,TopSurface = Enum.SurfaceType.Smooth,})
  38. Weld = New("ManualWeld",LBarrel,"Weld",{Part0 = LBarrel,Part1 = Launcher,C0 = CFrame.new(0, 0, 0, 0, 0, -1, -0.258818865, 0.965925872, 0, 0.965925872, 0.258818865, 0),C1 = CFrame.new(1.90734863e-06, -0.199999809, -2.89999676, 0, 0, -1, -0.258818984, 0.965925872, 0, 0.965925872, 0.258818984, 0),})
  39. RifleM = New("Model",chara,"RifleM",{})
  40. LaserRifle = New("Part",RifleM,"LaserRifle",{Size = Vector3.new(0.400000036, 1, 1),CFrame = CFrame.new(-12.1999998, 1.51739705, -23.4623299, 1, 0, 0, 0, 0.866025507, 0.499999911, 0, -0.499999911, 0.866025507),CanCollide = false,})
  41. Mesh = New("SpecialMesh",LaserRifle,"Mesh",{MeshId = "rbxassetid://936683797",TextureId = "rbxassetid://936683315",MeshType = Enum.MeshType.FileMesh,})
  42. RWeld = New("ManualWeld",LaserRifle,"RWeld",{Part0 = LaserRifle,Part1 = chara.Torso,C0 = CFrame.new(0, 0, 0, 1, 0, 0, 0, 0.866025507, -0.499999911, 0, 0.499999911, 0.866025507),C1 = CFrame.new(-1.19999981, -1.48260295, 0.0376701355, 1, 0, 0, 0, 1, 0, 0, 0, 1),})
  43. RBarrel = New("Part",RifleM,"RBarrel",{Transparency = 1,Transparency = 1,Size = Vector3.new(0.200000003, 0.200000003, 0.200000003),CFrame = CFrame.new(-12.1999989, 0.804000676, -24.8979721, 1, 0, 0, 0, 0.866025567, 0.499999821, 0, -0.499999821, 0.866025567),BottomSurface = Enum.SurfaceType.Smooth,TopSurface = Enum.SurfaceType.Smooth,})
  44. Weld = New("ManualWeld",RBarrel,"Weld",{Part0 = RBarrel,Part1 = LaserRifle,C0 = CFrame.new(0, 0, 0, 1, 0, 0, 0, 0.866025507, -0.499999791, 0, 0.499999791, 0.866025507),C1 = CFrame.new(9.53674316e-07, 0.100001335, -1.60000038, 1, 0, 0, 0, 0.866025507, -0.499999911, 0, 0.499999911, 0.866025507),})
  45.  
  46. function CreateTrailObj(parent,color1,color2,ofsx,ofsz)
  47. local Att1 = New("Attachment",parent,"Att1",{Position = Vector3.new(ofsx,parent.Size.Y/2,ofsz)})
  48. local Att2 = New("Attachment",parent,"Att2",{Position = Vector3.new(ofsx,-(parent.Size.Y/2),ofsz)})
  49. local TEff = New("Trail",parent,"TrailEff",{Color = ColorSequence.new({ColorSequenceKeypoint.new(0,BrickColor.new(color1).Color),ColorSequenceKeypoint.new(1,BrickColor.new(color2).Color)}),Transparency = NumberSequence.new({NumberSequenceKeypoint.new(0,.5),NumberSequenceKeypoint.new(1,1)}),Attachment0 = Att1,Attachment1 = Att2,Enabled = false,Lifetime = .5,MinLength = .001})
  50. return TEff
  51. end
  52.  
  53. SlashT = CreateTrailObj(STrail,"White","Royal purple",0,0)
  54. SlashT.LightEmission = 1
  55. SlashT.Texture = "http://www.roblox.com/asset/?id=849899387"
  56.  
  57. --Sounds--
  58. function LoadSnd(id,loop,vol,pit)
  59. local snd = New("Sound",chara,"Sound",{SoundId = "rbxassetid://"..id,Looped = loop,Volume = vol,Pitch = pit})
  60. return snd
  61. end
  62. SwingSnd = LoadSnd(158037267,false,1,1)
  63. Swing2Snd = LoadSnd(12222208,false,1,1)
  64. HitSnd = LoadSnd(153092274,false,1,1)
  65. ExpSnd = LoadSnd(142070127,false,1,1)
  66. FlySnd = LoadSnd(169445602,false,1,1)
  67. BExpSnd = LoadSnd(168586621,false,1,.5)
  68. GunFlameSnd = LoadSnd(169380505,false,1,1.5)
  69. ChargeSnd = LoadSnd(136007472,false,1,1)
  70.  
  71. --Play Sound in Part--
  72. function PlaySnd(snd,part)
  73. local sound = snd:Clone()
  74. sound.PlayOnRemove = true
  75. sound.Parent = part
  76. sound:Destroy()
  77. end
  78.  
  79. --Damage Function--
  80. function dealdmg(dude,damage,env,toim,kby,kbx)
  81. hurt = coroutine.wrap(function()
  82. if dude ~= chara and dude:FindFirstChild("IsHit") == nil then
  83. finaldmg = damage + math.random(-env,env)
  84. dude.Humanoid.Health = dude.Humanoid.Health - finaldmg
  85. local vall = Instance.new("ObjectValue",dude)
  86. vall.Name = "IsHit"
  87. debby:AddItem(vall,toim)
  88. local bfos = Instance.new("BodyVelocity",dude.Head)
  89. bfos.P = 20000
  90. bfos.MaxForce = Vector3.new(bfos.P,bfos.P,bfos.P)
  91. bfos.Velocity = Vector3.new(0,kby,0) + chara.HumanoidRootPart.CFrame.lookVector * kbx
  92. debby:AddItem(bfos,.1)
  93. local naeeym2 = Instance.new("BillboardGui",dude)
  94. naeeym2.Size = UDim2.new(0,100,0,40)
  95. naeeym2.StudsOffset = Vector3.new(0,3,0)
  96. naeeym2.Adornee = dude.Head
  97. naeeym2.Name = "TalkingBillBoard"
  98. local tecks2 = Instance.new("TextLabel",naeeym2)
  99. tecks2.BackgroundTransparency = 1
  100. tecks2.BorderSizePixel = 0
  101. tecks2.Text = "-"..finaldmg
  102. tecks2.Font = "Fantasy"
  103. tecks2.FontSize = "Size24"
  104. tecks2.TextStrokeTransparency = 0
  105. tecks2.TextColor3 = Color3.new(1,0.6,0)
  106. tecks2.TextStrokeColor3 = Color3.new(0,0,0)
  107. tecks2.Size = UDim2.new(1,0,0.5,0)
  108. for i = 1, 5 do
  109. wait(.1)
  110. tecks2.Position = tecks2.Position - UDim2.new(0,0,.05,0)
  111. tecks2.TextStrokeTransparency = tecks2.TextStrokeTransparency +.2
  112. tecks2.TextTransparency = tecks2.TextTransparency + .2
  113. end
  114. naeeym2:Destroy()
  115. end
  116. end)
  117. hurt(dude,damage,env,toim)
  118. end
  119.  
  120. --Explode Hitbox--
  121. function ExHitbox(rad,pos,damage,env,toim,kby,kbx)
  122. local E = Instance.new("Explosion")
  123. E.Position = pos
  124. E.Parent = game.Workspace
  125. E.BlastRadius = rad
  126. E.BlastPressure = 0
  127. E.Visible = false
  128. E.Hit:connect(function(hit)
  129. if hit.Parent:FindFirstChild("Humanoid")~=nil then
  130. dealdmg(hit.Parent,damage,env,toim,kby,kbx)
  131. end
  132. end)
  133. end
  134.  
  135. --Blade Hit Effect--
  136. function SlashEff(pos)
  137. local p = Instance.new("Part",game.Workspace)
  138. p.Size = Vector3.new(1,1,1)
  139. p.BrickColor = BrickColor.new("Alder")
  140. p.Material = "Neon"
  141. p.Anchored = true
  142. p.CanCollide = false
  143. p.CFrame = pos * CFrame.fromEulerAnglesXYZ(math.random(0,math.rad(359)),math.random(0,math.rad(359)),math.random(0,math.rad(359)))
  144. local pm = Instance.new("SpecialMesh",p)
  145. pm.MeshType = "Sphere"
  146. pm.Scale = Vector3.new(.5,0,.5)
  147. local disp = coroutine.wrap(function()
  148. for i = 1, 4 do
  149. wait(.01)
  150. p.Transparency = p.Transparency + .2
  151. pm.Scale = pm.Scale + Vector3.new(0,5,0)
  152. end
  153. wait(.01)
  154. p:Destroy()
  155. end)
  156. disp()
  157. end
  158.  
  159. --Blade Touch--
  160. dela = .5
  161. bladedmg = math.huge
  162. bladeactive = false
  163. function bladehit(hit)
  164. if bladeactive == true then
  165. if hit.Parent:FindFirstChild("Humanoid") ~= nil and hit.Parent ~= chara and hit.Parent:FindFirstChild("IsHit")==nil then
  166. dealdmg(hit.Parent,bladedmg,1,dela,0,10)
  167. PlaySnd(HitSnd,hit.Parent.Head)
  168. SlashEff(hit.CFrame)
  169. end
  170. end
  171. end
  172. Blade.Touched:connect(bladehit)
  173.  
  174. --Grab Touch--
  175. weldd = nil
  176. exeact = false
  177. exed = false
  178. function grabhit(hit)
  179. if exeact == true and exed == false then
  180. if hit.Parent:FindFirstChild("Humanoid") ~= nil and hit.Parent ~= chara and hit.Parent:FindFirstChild("IsHit")==nil then
  181. weldd = Instance.new("Weld",hit.Parent)
  182. weldd.Part0 = hit.Parent.Head
  183. weldd.Part1 = RBarrel
  184. exed = true
  185. end
  186. end
  187. end
  188. RBarrel.Touched:connect(grabhit)
  189.  
  190. --Material Return--
  191. gprop = {}
  192. function materialhit()
  193. local part = workspace:FindPartOnRay(Ray.new(chara.HumanoidRootPart.Position-Vector3.new(0,2.4,0),Vector3.new(0,-1000,0)))
  194. if part then
  195. gprop = {part.BrickColor,part.Material}
  196. end
  197. end
  198.  
  199. --Clerp Animations--
  200. TC = chara.HumanoidRootPart.RootJoint
  201. HC = chara.Torso.Neck
  202. RAC = chara.Torso["Right Shoulder"]
  203. LAC = chara.Torso["Left Shoulder"]
  204. RLC = chara.Torso["Right Hip"]
  205. LLC = chara.Torso["Left Hip"]
  206. TCF = CFrame.new(0, 0, 0, -1, 0, 0, 0, 0, 1, 0, 1, -0)
  207. HCF = CFrame.new(0, 1, 0, -1, 0, 0, 0, 0, 1, 0, 1, -0)
  208. RACF = CFrame.new(1, 0.5, 0, 0, 0, 1, 0, 1, -0, -1, 0, 0)
  209. LACF = CFrame.new(-1, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  210. RLCF = CFrame.new(1, -1, 0, 0, 0, 1, 0, 1, -0, -1, 0, 0)
  211. LLCF = CFrame.new(-1, -1, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  212. RWF = CFrame.new(-1.5, 0, 0) * CFrame.fromEulerAnglesXYZ(0,0,0)
  213. LWF = CFrame.new(1.5, 0, 0) * CFrame.fromEulerAnglesXYZ(0,0,0)
  214. RLWF = CFrame.new(-.5, 2, 0) * CFrame.fromEulerAnglesXYZ(0,0,0)
  215. LLWF = CFrame.new(.5, 2, 0) * CFrame.fromEulerAnglesXYZ(0,0,0)
  216. RW = Instance.new("Weld",HC.Parent)
  217. RW.Part1 = HC.Parent
  218. RW.Part0 = chara["Right Arm"]
  219. RW.C0 = RWF
  220. LW = Instance.new("Weld",HC.Parent)
  221. LW.Part1 = HC.Parent
  222. LW.Part0 = chara["Left Arm"]
  223. LW.C0 = LWF
  224. RLW = nil
  225. LLW = nil
  226.  
  227. function AddLegWelds()
  228. RLW = Instance.new("Weld",chara["Right Leg"])
  229. RLW.Part1 = HC.Parent
  230. RLW.Part0 = chara["Right Leg"]
  231. RLW.C0 = RLWF
  232. LLW = Instance.new("Weld",chara["Left Leg"])
  233. LLW.Part1 = HC.Parent
  234. LLW.Part0 = chara["Left Leg"]
  235. LLW.C0 = LLWF
  236. end
  237.  
  238. function DestroyLegWelds()
  239. RLC = New("Motor6D",chara.Torso,"Right Hip",{Part0 = chara.Torso,Part1 = chara["Right Leg"],C0 = CFrame.new(1, -1, 0, 0, 0, 1, 0, 1, -0, -1, 0, 0),C1 = CFrame.new(0.5, 1, 0, 0, 0, 1, 0, 1, -0, -1, 0, 0),})
  240. LLC = New("Motor6D",chara.Torso,"Left Hip",{Part0 = chara.Torso,Part1 = chara["Left Leg"],C0 = CFrame.new(-1, -1, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0),C1 = CFrame.new(-0.5, 1, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0),})
  241. RLW:Destroy()
  242. LLW:Destroy()
  243. end
  244.  
  245. function clerp(a,b,c)
  246. return a:lerp(b,c)
  247. end
  248.  
  249. --TC.C0 = TCF * CFrame.fromEulerAnglesXYZ(0,0,math.rad(90))
  250. --HC.C0 = HCF * CFrame.fromEulerAnglesXYZ(0,0,math.rad(-50))
  251. --RW.C0 = (RWF + Vector3.new(1,2,0)) * CFrame.fromEulerAnglesXYZ(0,0,math.rad(-90))
  252. --LW.C0 = LWF * CFrame.fromEulerAnglesXYZ(0,0,math.rad(2))
  253.  
  254. TC.C0 = TCF
  255. HC.C0 = HCF
  256. RW.C0 = RWF
  257. LW.C0 = LWF
  258.  
  259. --Idle Clerp--
  260. ITCF = TCF * CFrame.fromEulerAnglesXYZ(0,0,math.rad(-50))
  261. IHCF = HCF * CFrame.fromEulerAnglesXYZ(0,0,math.rad(50))
  262. IRWF = RWF * CFrame.fromEulerAnglesXYZ(0,0,math.rad(-5))
  263. ILWF = LWF * CFrame.fromEulerAnglesXYZ(0,0,math.rad(5))
  264.  
  265. function res()
  266. TC.C0 = ITCF
  267. HC.C0 = IHCF
  268. RW.C0 = IRWF
  269. LW.C0 = ILWF
  270. end
  271. res()
  272.  
  273. --Laser Slashes--
  274. function LasSlash()
  275. del = true
  276. bladeactive = true
  277. SlashT.Enabled = true
  278. for i = 0,.6,.2 do
  279. rs:wait()
  280. TC.C0 = clerp(ITCF,(TCF + Vector3.new(0,1,0)) * CFrame.fromEulerAnglesXYZ(0,math.rad(90),0),.4+i)
  281. HC.C0 = clerp(IHCF,HCF * CFrame.fromEulerAnglesXYZ(0,0,math.rad(90)),.4+i)
  282. RW.C0 = clerp(IRWF,(RWF + Vector3.new(.5,1.4,0)) * CFrame.fromEulerAnglesXYZ(0,0,math.rad(-90)),.4+i)
  283. LW.C0 = clerp(ILWF,(LWF - Vector3.new(.5,-1.4,.5)) * CFrame.fromEulerAnglesXYZ(0,0,math.rad(90)),.4+i)
  284. end
  285. for i = 1,5 do
  286. for i = 0,1,.2 do
  287. rs:wait()
  288. TC.C0 = clerp((TCF + Vector3.new(0,1,0)) * CFrame.fromEulerAnglesXYZ(0,math.rad(90),0),(TCF + Vector3.new(0,1,0)) * CFrame.fromEulerAnglesXYZ(0,math.rad(90),math.rad(180)),i)
  289. end
  290. SwingSnd:Play()
  291. for i = 0,1,.2 do
  292. rs:wait()
  293. TC.C0 = clerp((TCF + Vector3.new(0,1,0)) * CFrame.fromEulerAnglesXYZ(0,math.rad(90),math.rad(180)),(TCF + Vector3.new(0,1,0)) * CFrame.fromEulerAnglesXYZ(0,math.rad(90),math.rad(360)),i)
  294. end
  295. SwingSnd:Play()
  296. end
  297. for i = 0,.6,.2 do
  298. rs:wait()
  299. TC.C0 = clerp(ITCF,(TCF + Vector3.new(0,1,0)) * CFrame.fromEulerAnglesXYZ(0,math.rad(90),0),.6-i)
  300. HC.C0 = clerp(IHCF,HCF * CFrame.fromEulerAnglesXYZ(0,0,math.rad(90)),.6-i)
  301. RW.C0 = clerp(IRWF,(RWF + Vector3.new(.5,1.4,0)) * CFrame.fromEulerAnglesXYZ(0,0,math.rad(-90)),.6-i)
  302. LW.C0 = clerp(ILWF,(LWF - Vector3.new(.5,-1.4,.5)) * CFrame.fromEulerAnglesXYZ(0,0,math.rad(90)),.6-i)
  303. end
  304. del = false
  305. bladeactive = false
  306. SlashT.Enabled = false
  307. res()
  308. end
  309.  
  310. --Grab Move--
  311. function GrabMove()
  312. del = true
  313. chara.Humanoid.WalkSpeed = 45
  314. exeact = true
  315. wait(.01)
  316. SwingSnd:Play()
  317. local bfos = Instance.new("BodyVelocity",chara.Torso)
  318. bfos.P = 10000
  319. bfos.MaxForce = Vector3.new(bfos.P,0,bfos.P)
  320. bfos.Velocity = chara.HumanoidRootPart.CFrame.lookVector * 500
  321. debby:AddItem(bfos,.1)
  322. RWeld:Destroy()
  323. RWeld = New("ManualWeld",LaserRifle,"RWeld",{Part0 = LaserRifle,Part1 = chara["Left Arm"],C0 = CFrame.new(0, 0, 0, 1, 0, 0, 0, 4.17232513e-07, -1.00000525, 0, 1.00000525, 4.17232513e-07),C1 = CFrame.new(-0.0999946594, -0.982600927, -0.481945038, 1, 0, 0, 0, 1, 0, 0, 0, 1),})
  324. for i = 0,.6,.1 do
  325. rs:wait()
  326. TC.C0 = clerp(ITCF,TCF * CFrame.fromEulerAnglesXYZ(0,0,math.rad(-90)),.4+i)
  327. HC.C0 = clerp(IHCF,HCF * CFrame.fromEulerAnglesXYZ(0,0,math.rad(90)),.4+i)
  328. RW.C0 = clerp(IRWF,(RWF + Vector3.new(.5,1.4,0)) * CFrame.fromEulerAnglesXYZ(0,0,math.rad(-90)),.4+i)
  329. LW.C0 = clerp(ILWF,(LWF - Vector3.new(.5,-1.4,.5)) * CFrame.fromEulerAnglesXYZ(0,0,math.rad(90)),.4+i)
  330. end
  331. LW.C0 = (LWF - Vector3.new(.5,-1.4,.5)) * CFrame.fromEulerAnglesXYZ(0,0,math.rad(90))
  332. wait(.5)
  333. if exed == true then
  334. exeact = false
  335. for i = 0,.6,.1 do
  336. rs:wait()
  337. HC.C0 = clerp(HCF * CFrame.fromEulerAnglesXYZ(0,0,math.rad(90)),HCF * CFrame.fromEulerAnglesXYZ(0,math.rad(-10),math.rad(90)),.4+i)
  338. LW.C0 = clerp((LWF - Vector3.new(.5,-1.4,.5)) * CFrame.fromEulerAnglesXYZ(0,0,math.rad(90)),(LWF - Vector3.new(.5,-1.4,.5)) * CFrame.fromEulerAnglesXYZ(0,0,math.rad(100)),.4+i)
  339. end
  340. wait(.5)
  341. PlaySnd(GunFlameSnd,chara)
  342. PlaySnd(ExpSnd,chara)
  343. local hitpt = Instance.new("Part",game.Workspace)
  344. hitpt.Size = Vector3.new(1,1,1)
  345. hitpt.Anchored = true
  346. hitpt.CanCollide = false
  347. hitpt.BrickColor = BrickColor.new("New Yeller")
  348. hitpt.CFrame = RBarrel.CFrame * CFrame.fromEulerAnglesXYZ(math.random(0,math.rad(359)),math.random(0,math.rad(359)),math.random(0,math.rad(359)))
  349. local hitb = Instance.new("Part",game.Workspace)
  350. hitb.Size = Vector3.new(1,1,1)
  351. hitb.Anchored = true
  352. hitb.CanCollide = false
  353. hitb.BrickColor = BrickColor.new("Toothpaste")
  354. hitb.Material = "Neon"
  355. hitb.CFrame = CFrame.new(hitpt.Position.x,hitpt.Position.y,hitpt.Position.z) * CFrame.fromEulerAnglesXYZ(math.random(math.rad(-30),math.rad(30)),math.random(math.rad(-30),math.rad(30)),math.random(math.rad(-30),math.rad(30)))
  356. local hitbm = Instance.new("SpecialMesh",hitb)
  357. hitbm.MeshType = "Sphere"
  358. hitbm.Scale = Vector3.new(1,1,1)
  359. local hitm = Instance.new("SpecialMesh",hitpt)
  360. hitm.MeshId = "http://www.roblox.com/asset/?id=3270017"
  361. local hpt = coroutine.wrap(function()
  362. for i = 1, 9 do
  363. wait(.05)
  364. hitpt.Transparency = hitpt.Transparency + .1
  365. hitm.Scale = hitm.Scale + Vector3.new(.5,.5,.5)
  366. hitb.Transparency = hitb.Transparency + .1
  367. hitbm.Scale = hitbm.Scale + Vector3.new(.5,.5,.5)
  368. end
  369. hitpt:Destroy()
  370. hitb:Destroy()
  371. end)
  372. hpt()
  373. exed = false
  374. weldd:Destroy()
  375. ExHitbox(5,RBarrel.Position,24,2,.1,50,50)
  376. wait(1)
  377. for i = 0,.6,.1 do
  378. rs:wait()
  379. TC.C0 = clerp(ITCF,TCF * CFrame.fromEulerAnglesXYZ(0,0,math.rad(-90)),.6-i)
  380. HC.C0 = clerp(IHCF,HCF * CFrame.fromEulerAnglesXYZ(0,math.rad(-10),math.rad(90)),.6-i)
  381. RW.C0 = clerp(IRWF,(RWF + Vector3.new(.5,1.4,0)) * CFrame.fromEulerAnglesXYZ(0,0,math.rad(-150)),.6-i)
  382. LW.C0 = clerp(ILWF,(LWF - Vector3.new(.5,-1.4,.5)) * CFrame.fromEulerAnglesXYZ(0,0,math.rad(90)),.6-i)
  383. end
  384. elseif exed == false then
  385. exeact = false
  386. for i = 0,.6,.1 do
  387. rs:wait()
  388. TC.C0 = clerp(ITCF,TCF * CFrame.fromEulerAnglesXYZ(0,0,math.rad(-90)),.6-i)
  389. HC.C0 = clerp(IHCF,HCF * CFrame.fromEulerAnglesXYZ(0,0,math.rad(90)),.6-i)
  390. RW.C0 = clerp(IRWF,(RWF + Vector3.new(.5,1.4,0)) * CFrame.fromEulerAnglesXYZ(0,0,math.rad(-90)),.6-i)
  391. LW.C0 = clerp(ILWF,(LWF - Vector3.new(.5,-1.4,.5)) * CFrame.fromEulerAnglesXYZ(0,0,math.rad(90)),.6-i)
  392. end
  393. end
  394. RWeld:Destroy()
  395. RWeld = New("ManualWeld",LaserRifle,"RWeld",{Part0 = LaserRifle,Part1 = chara.Torso,C0 = CFrame.new(0, 0, 0, 1, 0, 0, 0, 0.866025507, -0.499999911, 0, 0.499999911, 0.866025507),C1 = CFrame.new(-1.19999981, -1.48260295, 0.0376701355, 1, 0, 0, 0, 1, 0, 0, 0, 1),})
  396. chara.Humanoid.WalkSpeed = 45
  397. del = false
  398. res()
  399. end
  400.  
  401. --Shoot--
  402. function Shoot()
  403. del = true
  404. RWeld:Destroy()
  405. RWeld = New("ManualWeld",LaserRifle,"RWeld",{Part0 = LaserRifle,Part1 = chara["Left Arm"],C0 = CFrame.new(0, 0, 0, 1, 0, 0, 0, 4.17232513e-07, -1.00000525, 0, 1.00000525, 4.17232513e-07),C1 = CFrame.new(-0.0999946594, -0.982600927, -0.481945038, 1, 0, 0, 0, 1, 0, 0, 0, 1),})
  406. for i = 0,.6,.1 do
  407. rs:wait()
  408. TC.C0 = clerp(ITCF,TCF * CFrame.fromEulerAnglesXYZ(0,0,math.rad(-90)),.4+i)
  409. HC.C0 = clerp(IHCF,HCF * CFrame.fromEulerAnglesXYZ(0,0,math.rad(90)),.4+i)
  410. RW.C0 = clerp(IRWF,(RWF + Vector3.new(.5,1.4,0)) * CFrame.fromEulerAnglesXYZ(0,0,math.rad(-90)),.4+i)
  411. LW.C0 = clerp(ILWF,(LWF - Vector3.new(.5,-1.4,.5)) * CFrame.fromEulerAnglesXYZ(0,0,math.rad(90)),.4+i)
  412. end
  413. LW.C0 = (LWF - Vector3.new(.5,-1.4,.5)) * CFrame.fromEulerAnglesXYZ(0,0,math.rad(90))
  414. for i = 1, 5 do
  415. GunFlameSnd:Play()
  416. local missile = Instance.new("Part",game.Workspace)
  417. missile.Size = Vector3.new(.4,.4,.4)
  418. missile.Name = "Blast"
  419. missile.Transparency = 1
  420. missile.Position = RBarrel.Position
  421. missile.CFrame = RBarrel.CFrame
  422. missile.Velocity = ((Mouse.Hit.p - Vector3.new(0,2,0)) - RBarrel.Position).unit*200
  423. local force = Instance.new("BodyForce")
  424. force.force = Vector3.new(0,missile:GetMass()*game.Workspace.Gravity,0)
  425. force.Parent = missile
  426. local p1mit = CreateTrailObj(missile,"Toothpaste","Toothpaste",0,0)
  427. p1mit.Enabled = true
  428. missile.Touched:connect(function(hit)
  429. if (hit.Parent.Parent ~= chara and hit.Parent ~= chara and hit.Name ~= "Blast" and force ~= nil) then
  430. force:Destroy()
  431. force = nil
  432. missile.Anchored = true
  433. ExHitbox(3,missile.Position,12,1,.1,0,5)
  434. wait(2)
  435. missile:Destroy()
  436. end
  437. end)
  438. wait(.1)
  439. end
  440. wait(.5)
  441. for i = 0,.6,.1 do
  442. rs:wait()
  443. TC.C0 = clerp(ITCF,TCF * CFrame.fromEulerAnglesXYZ(0,0,math.rad(-90)),.6-i)
  444. HC.C0 = clerp(IHCF,HCF * CFrame.fromEulerAnglesXYZ(0,0,math.rad(90)),.6-i)
  445. RW.C0 = clerp(IRWF,(RWF + Vector3.new(.5,1.4,0)) * CFrame.fromEulerAnglesXYZ(0,0,math.rad(-90)),.6-i)
  446. LW.C0 = clerp(ILWF,(LWF - Vector3.new(.5,-1.4,.5)) * CFrame.fromEulerAnglesXYZ(0,0,math.rad(90)),.6-i)
  447. end
  448. RWeld:Destroy()
  449. RWeld = New("ManualWeld",LaserRifle,"RWeld",{Part0 = LaserRifle,Part1 = chara.Torso,C0 = CFrame.new(0, 0, 0, 1, 0, 0, 0, 0.866025507, -0.499999911, 0, 0.499999911, 0.866025507),C1 = CFrame.new(-1.19999981, -1.48260295, 0.0376701355, 1, 0, 0, 0, 1, 0, 0, 0, 1),})
  450. del = false
  451. res()
  452. end
  453.  
  454. --Cannon--
  455. function Cannon()
  456. del = true
  457. SwingSnd:Play()
  458. chara.Humanoid.WalkSpeed = 45
  459. for i = 0,.6,.2 do
  460. rs:wait()
  461. TC.C0 = clerp(ITCF,TCF,.4+i)
  462. HC.C0 = clerp(IHCF,HCF,.4+i)
  463. RW.C0 = clerp(IRWF,(RWF + Vector3.new(0,1,0)) * CFrame.fromEulerAnglesXYZ(math.rad(180),0,0),.4+i)
  464. end
  465. SWeld:Destroy()
  466. SWeld = New("ManualWeld",Blade,"SWeld",{Part0 = Blade,Part1 = chara.Torso,C0 = CFrame.new(0, 0, 0, -3.39850521e-05, 4.42377857e-10, -1, -0.866028011, 0.499995828, 2.94322326e-05, 0.499995649, 0.866028011, -1.69919949e-05),C1 = CFrame.new(0.381341934, 0.176781416, 0.625062943, 1, 0, 0, 0, 1, 0, 0, 0, 1),})
  467. for i = 0,.6,.2 do
  468. rs:wait()
  469. TC.C0 = clerp(ITCF,TCF,.6-i)
  470. HC.C0 = clerp(IHCF,HCF,.6-i)
  471. RW.C0 = clerp(RWF,(RWF + Vector3.new(0,1,0)) * CFrame.fromEulerAnglesXYZ(math.rad(180),0,0),.6-i)
  472. end
  473. LWeld:Destroy()
  474. LWeld = New("ManualWeld",Launcher,"LWeld",{Part0 = Launcher,Part1 = chara["Right Arm"],C0 = CFrame.new(0, 0, 0, 4.28015164e-06, -0.707107425, -0.707106471, 6.74945295e-06, 0.707106054, -0.707107604, 1, -1.74605191e-06, 7.79910715e-06),C1 = CFrame.new(-2.09882545, -1.07468522, 0.0127067566, 1, 0, 0, 0, 1, 0, 0, 0, 1),})
  475. for i = 0,.6,.1 do
  476. rs:wait()
  477. TC.C0 = clerp(TCF,TCF * CFrame.fromEulerAnglesXYZ(0,0,math.rad(-90)),.4+i)
  478. HC.C0 = clerp(HCF,HCF * CFrame.fromEulerAnglesXYZ(0,0,math.rad(90)),.4+i)
  479. RW.C0 = clerp(RWF,RWF * CFrame.fromEulerAnglesXYZ(math.rad(-55),0,0),.4+i)
  480. LW.C0 = clerp(ILWF,LWF * CFrame.fromEulerAnglesXYZ(math.rad(-55),0,0),.4+i)
  481. end
  482. ChargeSnd:Play()
  483. local hitpt = Instance.new("Part",game.Workspace)
  484. hitpt.Size = Vector3.new(1,1,1)
  485. hitpt.CanCollide = false
  486. hitpt.BrickColor = BrickColor.new("Toothpaste")
  487. hitpt.Material = "Neon"
  488. hitpt.Transparency = 1
  489. hitpt.Position = LBarrel.Position
  490. local wee = Instance.new("Weld",hitpt)
  491. wee.Part0 = LBarrel
  492. wee.Part1 = hitpt
  493. local hitbm = Instance.new("SpecialMesh",hitpt)
  494. hitbm.MeshType = "Sphere"
  495. hitbm.Scale = Vector3.new(0,0,0)
  496. for i = 0, 1, .05 do
  497. wait(.05)
  498. hitpt.Transparency = 1-i
  499. hitbm.Scale = Vector3.new(i*2,i*2,i*2)
  500. local tr = coroutine.resume(coroutine.create(function()
  501. local hitp = Instance.new("Part",game.Workspace)
  502. hitp.Size = Vector3.new(1,1,1)
  503. hitp.Anchored = true
  504. hitp.CanCollide = false
  505. hitp.BrickColor = BrickColor.new("Toothpaste")
  506. hitp.Transparency = 1
  507. hitp.CFrame = LBarrel.CFrame * CFrame.fromEulerAnglesXYZ(math.random(0,math.rad(359)),math.random(0,math.rad(359)),math.random(0,math.rad(359)))
  508. local hitm = Instance.new("SpecialMesh",hitp)
  509. hitm.MeshId = "http://www.roblox.com/asset/?id=3270017"
  510. hitm.Scale = Vector3.new(4,4,1)
  511. for i = 0,1,.1 do
  512. hitp.Transparency = i
  513. hitm.Scale = Vector3.new(10-(i*10),10-(i*10),1-i)
  514. end
  515. hitp:Destroy()
  516. end))
  517. end
  518. wait(1)
  519. hitpt:Destroy()
  520. local bfos = Instance.new("BodyVelocity",chara.Torso)
  521. bfos.P = 10000
  522. bfos.MaxForce = Vector3.new(bfos.P,0,bfos.P)
  523. bfos.Velocity = chara.HumanoidRootPart.CFrame.lookVector * -500
  524. debby:AddItem(bfos,.1)
  525. FlySnd:Play()
  526. local missile = Instance.new("Part",game.Workspace)
  527. missile.Size = Vector3.new(1,1,1)
  528. missile.Name = "Blast"
  529. missile.Position = LBarrel.Position
  530. missile.CFrame = LBarrel.CFrame
  531. missile.Velocity = ((Mouse.Hit.p - Vector3.new(0,2,0)) - RBarrel.Position).unit*200
  532. missile.BrickColor = BrickColor.new("Toothpaste")
  533. missile.Material = "Neon"
  534. local force = Instance.new("BodyForce")
  535. force.force = Vector3.new(0,missile:GetMass()*game.Workspace.Gravity,0)
  536. force.Parent = missile
  537. local meh = Instance.new("SpecialMesh",missile)
  538. meh.MeshType = "Sphere"
  539. meh.Scale = Vector3.new(2,2,2)
  540. missile.Touched:connect(function(hit)
  541. if (hit.Parent.Parent ~= chara and hit.Parent ~= chara and hit.Name ~= "Blast" and force ~= nil) then
  542. force:Destroy()
  543. force = nil
  544. missile.Anchored = true
  545. ExHitbox(50,missile.Position,60,1,.1,100,100)
  546. BExpSnd:Play()
  547. for i = 0, 1, .1 do
  548. local tr = coroutine.resume(coroutine.create(function()
  549. local hitp = Instance.new("Part",game.Workspace)
  550. hitp.Size = Vector3.new(1,1,1)
  551. hitp.Anchored = true
  552. hitp.CanCollide = false
  553. hitp.BrickColor = BrickColor.new("Toothpaste")
  554. hitp.Transparency = 1
  555. hitp.CFrame = missile.CFrame * CFrame.fromEulerAnglesXYZ(math.random(0,math.rad(359)),math.random(0,math.rad(359)),math.random(0,math.rad(359)))
  556. local hitm = Instance.new("SpecialMesh",hitp)
  557. hitm.MeshId = "http://www.roblox.com/asset/?id=3270017"
  558. hitm.Scale = Vector3.new(4,4,1)
  559. for i = 0,1,.01 do
  560. wait(.0001)
  561. hitp.Transparency = i
  562. hitm.Scale = Vector3.new(i*150,i*150,i)
  563. end
  564. hitp:Destroy()
  565. end))
  566. end
  567. for i = 0,1,.01 do
  568. wait(.0001)
  569. missile.Transparency = i
  570. meh.Scale = Vector3.new(2+i*90,2+i*90,2+i*90)
  571. end
  572. missile:Destroy()
  573. end
  574. end)
  575. wait(.1)
  576. for i = 0,.6,.1 do
  577. rs:wait()
  578. TC.C0 = clerp(ITCF,TCF * CFrame.fromEulerAnglesXYZ(0,0,math.rad(-90)),.6-i)
  579. HC.C0 = clerp(IHCF,HCF * CFrame.fromEulerAnglesXYZ(0,0,math.rad(90)),.6-i)
  580. RW.C0 = clerp(IRWF,RWF * CFrame.fromEulerAnglesXYZ(math.rad(-55),0,0),.6-i)
  581. LW.C0 = clerp(ILWF,LWF * CFrame.fromEulerAnglesXYZ(math.rad(-55),0,0),.6-i)
  582. end
  583. LWeld:Destroy()
  584. LWeld = New("ManualWeld",Launcher,"LWeld",{Part0 = Launcher,Part1 = chara.Torso,C0 = CFrame.new(0, 0, 0, 0, 0, -1, -0.258818984, 0.965925872, 0, 0.965925872, 0.258818984, 0),C1 = CFrame.new(-0.0414218903, -1.14494944, 0.799999237, 1, 0, 0, 0, 1, 0, 0, 0, 1),})
  585. for i = 0,.6,.2 do
  586. rs:wait()
  587. TC.C0 = clerp(ITCF,TCF,.4+i)
  588. HC.C0 = clerp(IHCF,HCF,.4+i)
  589. RW.C0 = clerp(IRWF,(RWF + Vector3.new(0,1,0)) * CFrame.fromEulerAnglesXYZ(math.rad(180),0,0),.4+i)
  590. end
  591. SWeld:Destroy()
  592. SWeld = New("ManualWeld",Blade,"SWeld",{Part0 = Blade,Part1 = chara["Right Arm"],C0 = CFrame.new(0, 0, 0, 1, -3.96366568e-06, -3.34970755e-05, 3.96365976e-06, 1, -1.78812002e-07, 3.34970755e-05, 1.7867923e-07, 1),C1 = CFrame.new(0.0812721252, -1.02322996, -1.5749836, 1, 0, 0, 0, 1, 0, 0, 0, 1),})
  593. for i = 0,.6,.2 do
  594. rs:wait()
  595. TC.C0 = clerp(ITCF,TCF,.6-i)
  596. HC.C0 = clerp(IHCF,HCF,.6-i)
  597. RW.C0 = clerp(RWF,(RWF + Vector3.new(0,1,0)) * CFrame.fromEulerAnglesXYZ(math.rad(180),0,0),.6-i)
  598. end
  599. chara.Humanoid.WalkSpeed = 45
  600. del = false
  601. res()
  602. end
  603.  
  604. --Block--
  605. blockval = false
  606. healthlock = 0
  607. effeff = nil
  608. function ToggleBlock()
  609. if blockval == false then
  610. blockval = true
  611. SwingSnd:Play()
  612. healthlock = chara.Humanoid.Health
  613. effeff = Instance.new("ForceField",chara)
  614. effeff.Name = "FawsFeeld"
  615. --effeff.Visible = false
  616. for i = 0,.6,.1 do
  617. rs:wait()
  618. TC.C0 = clerp(ITCF,TCF * CFrame.fromEulerAnglesXYZ(0,0,math.rad(-90)),.4+i)
  619. HC.C0 = clerp(IHCF,HCF * CFrame.fromEulerAnglesXYZ(0,0,math.rad(90)),.4+i)
  620. LW.C0 = clerp(ILWF,(LWF + Vector3.new(0,1,0)) * CFrame.fromEulerAnglesXYZ(math.rad(180),0,math.rad(0)),.4+i)
  621. --RW.C0 = clerp(IRWF,(RWF + Vector3.new(1,.5,-1)) * CFrame.fromEulerAnglesXYZ(math.rad(180),0,math.rad(-45)),.4+i)
  622. end
  623. elseif blockval == true then
  624. SwingSnd:Play()
  625. effeff:Destroy()
  626. blockval = false
  627. for i = 0,.6,.1 do
  628. rs:wait()
  629. TC.C0 = clerp(ITCF,TCF * CFrame.fromEulerAnglesXYZ(0,0,math.rad(-90)),.6-i)
  630. HC.C0 = clerp(IHCF,HCF * CFrame.fromEulerAnglesXYZ(0,0,math.rad(90)),.6-i)
  631. LW.C0 = clerp(ILWF,(LWF + Vector3.new(0,1,0)) * CFrame.fromEulerAnglesXYZ(math.rad(180),0,math.rad(0)),.6-i)
  632. --RW.C0 = clerp(IRWF,(RWF + Vector3.new(1,.5,-1)) * CFrame.fromEulerAnglesXYZ(math.rad(180),0,math.rad(-45)),.6-i)
  633. end
  634. res()
  635. end
  636. end
  637.  
  638. --Mouse Functions--
  639. del = false
  640. combo = 0
  641. function onKeyDown(key)
  642. if key == "q" and attacking == false then
  643. ToggleBlock()
  644. elseif del == false and blockval == false then
  645. if key == "z" then
  646. LasSlash()
  647. elseif key == "x" then
  648. GrabMove()
  649. elseif key == "c" then
  650. Shoot()
  651. elseif key == "v" then
  652. Cannon()
  653. end
  654. end
  655. end
  656. function onButton1Down()
  657. if del == false then
  658. del = true
  659. bladeactive = true
  660. SlashT.Enabled = true
  661. --Combo 1
  662. if combo == 0 then
  663. wait(.001)
  664. for i = 0,.6,.2 do
  665. rs:wait()
  666. TC.C0 = clerp(ITCF,TCF * CFrame.fromEulerAnglesXYZ(0,0,math.rad(90)),.4+i)
  667. HC.C0 = clerp(IHCF,HCF * CFrame.fromEulerAnglesXYZ(0,0,math.rad(-90)),.4+i)
  668. RW.C0 = clerp(IRWF,(RWF + Vector3.new(.5,1.4,0)) * CFrame.fromEulerAnglesXYZ(0,0,math.rad(-90)),.4+i)
  669. LW.C0 = clerp(ILWF,(LWF + Vector3.new(0,1,0)) * CFrame.fromEulerAnglesXYZ(0,0,math.rad(50)),.4+i)
  670. end
  671. SwingSnd:Play()
  672. for i = 0,.6,.2 do
  673. rs:wait()
  674. TC.C0 = clerp(TCF * CFrame.fromEulerAnglesXYZ(0,0,math.rad(80)),TCF * CFrame.fromEulerAnglesXYZ(0,0,math.rad(-90)),.4+i)
  675. HC.C0 = clerp(HCF * CFrame.fromEulerAnglesXYZ(0,0,math.rad(-80)),HCF * CFrame.fromEulerAnglesXYZ(0,0,math.rad(90)),.4+i)
  676. end
  677. wait(.1)
  678. for i = 0,.6,.2 do
  679. rs:wait()
  680. TC.C0 = clerp(ITCF,TCF * CFrame.fromEulerAnglesXYZ(0,0,math.rad(-90)),.6-i)
  681. HC.C0 = clerp(IHCF,HCF * CFrame.fromEulerAnglesXYZ(0,0,math.rad(90)),.6-i)
  682. RW.C0 = clerp(IRWF,(RWF + Vector3.new(.5,1.4,0)) * CFrame.fromEulerAnglesXYZ(0,0,math.rad(-90)),.6-i)
  683. LW.C0 = clerp(ILWF,(LWF + Vector3.new(0,1,0)) * CFrame.fromEulerAnglesXYZ(0,0,math.rad(50)),.6-i)
  684. end
  685. combo = 1
  686. --Combo 2
  687. elseif combo == 1 then
  688. for i = 0,.6,.2 do
  689. rs:wait()
  690. TC.C0 = clerp(ITCF,TCF,.4+i)
  691. HC.C0 = clerp(IHCF,HCF * CFrame.fromEulerAnglesXYZ(0,0,math.rad(90)),.4+i)
  692. RW.C0 = clerp(IRWF,(RWF + Vector3.new(.5,1.4,0)) * CFrame.fromEulerAnglesXYZ(0,0,math.rad(-90)),.4+i)
  693. LW.C0 = clerp(ILWF,(LWF - Vector3.new(.5,-1.4,.5)) * CFrame.fromEulerAnglesXYZ(0,0,math.rad(90)),.4+i)
  694. end
  695. for i = 0,1,.2 do
  696. rs:wait()
  697. TC.C0 = clerp(TCF,TCF * CFrame.fromEulerAnglesXYZ(0,0,math.rad(180)),i)
  698. end
  699. SwingSnd:Play()
  700. for i = 0,1,.2 do
  701. rs:wait()
  702. TC.C0 = clerp(TCF * CFrame.fromEulerAnglesXYZ(0,0,math.rad(180)),TCF * CFrame.fromEulerAnglesXYZ(0,0,math.rad(360)),i)
  703. end
  704. SwingSnd:Play()
  705. for i = 0,.6,.2 do
  706. rs:wait()
  707. TC.C0 = clerp(ITCF,TCF,.6-i)
  708. HC.C0 = clerp(IHCF,HCF * CFrame.fromEulerAnglesXYZ(0,0,math.rad(90)),.6-i)
  709. RW.C0 = clerp(IRWF,(RWF + Vector3.new(.5,1.4,0)) * CFrame.fromEulerAnglesXYZ(0,0,math.rad(-90)),.6-i)
  710. LW.C0 = clerp(ILWF,(LWF - Vector3.new(.5,-1.4,.5)) * CFrame.fromEulerAnglesXYZ(0,0,math.rad(90)),.6-i)
  711. end
  712. combo = 2
  713. --Combo 3
  714. elseif combo == 2 then
  715. for i = 0,.6,.2 do
  716. rs:wait()
  717. TC.C0 = clerp(ITCF,TCF * CFrame.fromEulerAnglesXYZ(0,0,math.rad(90)),.4+i)
  718. HC.C0 = clerp(IHCF,HCF * CFrame.fromEulerAnglesXYZ(0,0,math.rad(-90)),.4+i)
  719. RW.C0 = clerp(IRWF,(RWF + Vector3.new(.5,1.4,0)) * CFrame.fromEulerAnglesXYZ(0,0,math.rad(-90)),.4+i)
  720. LW.C0 = clerp(ILWF,(LWF - Vector3.new(.5,-1.4,.5)) * CFrame.fromEulerAnglesXYZ(0,0,math.rad(90)),.4+i)
  721. end
  722. SWeld:Destroy()
  723. SWeld = New("ManualWeld",Blade,"SWeld",{Part0 = Blade,Part1 = chara["Right Arm"],C0 = CFrame.new(0, 0, 0, 1, -3.96366568e-06, -3.34970755e-05, -3.34970828e-05, -1.78813934e-07, -1.00000024, 3.96366158e-06, 1.00000024, -1.78813934e-07),C1 = CFrame.new(0.0813121796, -2.22322369, -0.174974442, 1, 0, 0, 0, 1, 0, 0, 0, 1),})
  724. TC.C0 = TCF * CFrame.fromEulerAnglesXYZ(0,0,math.rad(90))
  725. RW.C0 = (RWF + Vector3.new(.5,1.4,0)) * CFrame.fromEulerAnglesXYZ(0,0,math.rad(-90))
  726. Swing2Snd:Play()
  727. local bfos = Instance.new("BodyVelocity",chara.Head)
  728. bfos.P = 20000
  729. bfos.MaxForce = Vector3.new(bfos.P,bfos.P,bfos.P)
  730. bfos.Velocity = chara.HumanoidRootPart.CFrame.lookVector * 150
  731. debby:AddItem(bfos,.1)
  732. wait(.2)
  733. SWeld:Destroy()
  734. SWeld = New("ManualWeld",Blade,"SWeld",{Part0 = Blade,Part1 = chara["Right Arm"],C0 = CFrame.new(0, 0, 0, 1, -3.96366568e-06, -3.34970755e-05, 3.96365976e-06, 1, -1.78812002e-07, 3.34970755e-05, 1.7867923e-07, 1),C1 = CFrame.new(0.0812721252, -1.02322996, -1.5749836, 1, 0, 0, 0, 1, 0, 0, 0, 1),})
  735. for i = 0,.6,.2 do
  736. rs:wait()
  737. TC.C0 = clerp(ITCF,TCF * CFrame.fromEulerAnglesXYZ(0,0,math.rad(90)),.6-i)
  738. HC.C0 = clerp(IHCF,HCF * CFrame.fromEulerAnglesXYZ(0,0,math.rad(-90)),.6-i)
  739. RW.C0 = clerp(IRWF,(RWF + Vector3.new(.5,1.4,0)) * CFrame.fromEulerAnglesXYZ(0,0,math.rad(-90)),.6-i)
  740. LW.C0 = clerp(ILWF,(LWF - Vector3.new(.5,-1.4,.5)) * CFrame.fromEulerAnglesXYZ(0,0,math.rad(90)),.6-i)
  741. end
  742. combo = 0
  743. end
  744. del = false
  745. bladeactive = false
  746. SlashT.Enabled = false
  747. res()
  748. end
  749. end
  750.  
  751. --Mouse Activation--
  752. if Mouse then
  753. Mouse.KeyDown:connect(onKeyDown)
  754. Mouse.Button1Down:connect(onButton1Down)
  755. end
  756.  
  757. --Loop Function--
  758. walking = false
  759. while true do
  760. wait()
  761. materialhit()
  762. if del == false then attacking = false elseif del == true then attacking = true end
  763. if blockval == true and chara:FindFirstChild("HitByUlt")==nil then
  764. chara.Humanoid.Health = healthlock
  765. end
  766. torvel = (chara.HumanoidRootPart.Velocity*Vector3.new(1,0,1)).magnitude
  767. if torvel < 1 and walking == true and del == false and attacking == false and blockval == false then
  768. for i = 0,1,.5 do
  769. rs:wait()
  770. if del == false and attacking == false and blockval == false then
  771. TC.C0 = clerp(TCF * CFrame.fromEulerAnglesXYZ(math.rad(30),0,0),ITCF,i)
  772. HC.C0 = clerp(HCF * CFrame.fromEulerAnglesXYZ(math.rad(-30),0,0),IHCF,i)
  773. RW.C0 = IRWF
  774. LW.C0 = clerp((LWF + Vector3.new(0,.2,0)) * CFrame.fromEulerAnglesXYZ(0,0,math.rad(20)),ILWF,i)
  775. end
  776. end
  777. walking = false
  778. elseif torvel > 1 and walking == false and del == false and attacking == false and blockval == false then
  779. for i = 0,1,.5 do
  780. rs:wait()
  781. if del == false and attacking == false and blockval == false then
  782. TC.C0 = clerp(ITCF,TCF * CFrame.fromEulerAnglesXYZ(math.rad(30),0,0),i)
  783. HC.C0 = clerp(IHCF,HCF * CFrame.fromEulerAnglesXYZ(math.rad(-30),0,0),i)
  784. RW.C0 = IRWF
  785. LW.C0 = clerp(ILWF,(LWF + Vector3.new(0,.2,0)) * CFrame.fromEulerAnglesXYZ(0,0,math.rad(20)),i)
  786. end
  787. end
  788. walking = true
  789. else
  790. end
  791. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement