Advertisement
memberhero

EAR RAPE GUN

Aug 9th, 2017
217
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 32.89 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 = 20
  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(273642373,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 = 13
  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 = 0
  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 = 20
  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 = 5
  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. wait(.2)
  468. for i = 0,.6,.2 do
  469. rs:wait()
  470. TC.C0 = clerp(ITCF,TCF,.6-i)
  471. HC.C0 = clerp(IHCF,HCF,.6-i)
  472. RW.C0 = clerp(RWF,(RWF + Vector3.new(0,1,0)) * CFrame.fromEulerAnglesXYZ(math.rad(180),0,0),.6-i)
  473. end
  474. LWeld:Destroy()
  475. 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),})
  476. for i = 0,.6,.1 do
  477. rs:wait()
  478. TC.C0 = clerp(TCF,TCF * CFrame.fromEulerAnglesXYZ(0,0,math.rad(-90)),.4+i)
  479. HC.C0 = clerp(HCF,HCF * CFrame.fromEulerAnglesXYZ(0,0,math.rad(90)),.4+i)
  480. RW.C0 = clerp(RWF,RWF * CFrame.fromEulerAnglesXYZ(math.rad(-55),0,0),.4+i)
  481. LW.C0 = clerp(ILWF,LWF * CFrame.fromEulerAnglesXYZ(math.rad(-55),0,0),.4+i)
  482. end
  483. wait(.5)
  484. ChargeSnd:Play()
  485. local hitpt = Instance.new("Part",game.Workspace)
  486. hitpt.Size = Vector3.new(1,1,1)
  487. hitpt.CanCollide = false
  488. hitpt.BrickColor = BrickColor.new("Toothpaste")
  489. hitpt.Material = "Neon"
  490. hitpt.Transparency = 1
  491. hitpt.Position = LBarrel.Position
  492. local wee = Instance.new("Weld",hitpt)
  493. wee.Part0 = LBarrel
  494. wee.Part1 = hitpt
  495. local hitbm = Instance.new("SpecialMesh",hitpt)
  496. hitbm.MeshType = "Sphere"
  497. hitbm.Scale = Vector3.new(0,0,0)
  498. for i = 0, 1, .05 do
  499. wait(.05)
  500. hitpt.Transparency = 1-i
  501. hitbm.Scale = Vector3.new(i*2,i*2,i*2)
  502. local tr = coroutine.resume(coroutine.create(function()
  503. local hitp = Instance.new("Part",game.Workspace)
  504. hitp.Size = Vector3.new(1,1,1)
  505. hitp.Anchored = true
  506. hitp.CanCollide = false
  507. hitp.BrickColor = BrickColor.new("Toothpaste")
  508. hitp.Transparency = 1
  509. hitp.CFrame = LBarrel.CFrame * CFrame.fromEulerAnglesXYZ(math.random(0,math.rad(359)),math.random(0,math.rad(359)),math.random(0,math.rad(359)))
  510. local hitm = Instance.new("SpecialMesh",hitp)
  511. hitm.MeshId = "http://www.roblox.com/asset/?id=3270017"
  512. hitm.Scale = Vector3.new(4,4,1)
  513. for i = 0,1,.1 do
  514. wait(.05)
  515. hitp.Transparency = i
  516. hitm.Scale = Vector3.new(10-(i*10),10-(i*10),1-i)
  517. end
  518. hitp:Destroy()
  519. end))
  520. end
  521. wait(1)
  522. hitpt:Destroy()
  523. local bfos = Instance.new("BodyVelocity",chara.Torso)
  524. bfos.P = 10000
  525. bfos.MaxForce = Vector3.new(bfos.P,0,bfos.P)
  526. bfos.Velocity = chara.HumanoidRootPart.CFrame.lookVector * -500
  527. debby:AddItem(bfos,.1)
  528. FlySnd:Play()
  529. local missile = Instance.new("Part",game.Workspace)
  530. missile.Size = Vector3.new(1,1,1)
  531. missile.Name = "Blast"
  532. missile.Position = LBarrel.Position
  533. missile.CFrame = LBarrel.CFrame
  534. missile.Velocity = ((Mouse.Hit.p - Vector3.new(0,2,0)) - RBarrel.Position).unit*200
  535. missile.BrickColor = BrickColor.new("Toothpaste")
  536. missile.Material = "Neon"
  537. local force = Instance.new("BodyForce")
  538. force.force = Vector3.new(0,missile:GetMass()*game.Workspace.Gravity,0)
  539. force.Parent = missile
  540. local meh = Instance.new("SpecialMesh",missile)
  541. meh.MeshType = "Sphere"
  542. meh.Scale = Vector3.new(2,2,2)
  543. missile.Touched:connect(function(hit)
  544. if (hit.Parent.Parent ~= chara and hit.Parent ~= chara and hit.Name ~= "Blast" and force ~= nil) then
  545. force:Destroy()
  546. force = nil
  547. missile.Anchored = true
  548. ExHitbox(50,missile.Position,60,1,.1,100,100)
  549. BExpSnd:Play()
  550. for i = 0, 1, .1 do
  551. local tr = coroutine.resume(coroutine.create(function()
  552. local hitp = Instance.new("Part",game.Workspace)
  553. hitp.Size = Vector3.new(1,1,1)
  554. hitp.Anchored = true
  555. hitp.CanCollide = false
  556. hitp.BrickColor = BrickColor.new("Toothpaste")
  557. hitp.Transparency = 1
  558. hitp.CFrame = missile.CFrame * CFrame.fromEulerAnglesXYZ(math.random(0,math.rad(359)),math.random(0,math.rad(359)),math.random(0,math.rad(359)))
  559. local hitm = Instance.new("SpecialMesh",hitp)
  560. hitm.MeshId = "http://www.roblox.com/asset/?id=3270017"
  561. hitm.Scale = Vector3.new(4,4,1)
  562. for i = 0,1,.01 do
  563. wait(.0001)
  564. hitp.Transparency = i
  565. hitm.Scale = Vector3.new(i*150,i*150,i)
  566. end
  567. hitp:Destroy()
  568. end))
  569. end
  570. for i = 0,1,.01 do
  571. wait(.0001)
  572. missile.Transparency = i
  573. meh.Scale = Vector3.new(2+i*90,2+i*90,2+i*90)
  574. end
  575. missile:Destroy()
  576. end
  577. end)
  578. wait(.1)
  579. for i = 0,.6,.1 do
  580. rs:wait()
  581. TC.C0 = clerp(ITCF,TCF * CFrame.fromEulerAnglesXYZ(0,0,math.rad(-90)),.6-i)
  582. HC.C0 = clerp(IHCF,HCF * CFrame.fromEulerAnglesXYZ(0,0,math.rad(90)),.6-i)
  583. RW.C0 = clerp(IRWF,RWF * CFrame.fromEulerAnglesXYZ(math.rad(-55),0,0),.6-i)
  584. LW.C0 = clerp(ILWF,LWF * CFrame.fromEulerAnglesXYZ(math.rad(-55),0,0),.6-i)
  585. end
  586. LWeld:Destroy()
  587. 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),})
  588. for i = 0,.6,.2 do
  589. rs:wait()
  590. TC.C0 = clerp(ITCF,TCF,.4+i)
  591. HC.C0 = clerp(IHCF,HCF,.4+i)
  592. RW.C0 = clerp(IRWF,(RWF + Vector3.new(0,1,0)) * CFrame.fromEulerAnglesXYZ(math.rad(180),0,0),.4+i)
  593. end
  594. SWeld:Destroy()
  595. 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),})
  596. for i = 0,.6,.2 do
  597. rs:wait()
  598. TC.C0 = clerp(ITCF,TCF,.6-i)
  599. HC.C0 = clerp(IHCF,HCF,.6-i)
  600. RW.C0 = clerp(RWF,(RWF + Vector3.new(0,1,0)) * CFrame.fromEulerAnglesXYZ(math.rad(180),0,0),.6-i)
  601. end
  602. chara.Humanoid.WalkSpeed = 20
  603. del = false
  604. res()
  605. end
  606.  
  607. --Block--
  608. blockval = false
  609. healthlock = 0
  610. effeff = nil
  611. function ToggleBlock()
  612. if blockval == false then
  613. blockval = true
  614. SwingSnd:Play()
  615. healthlock = chara.Humanoid.Health
  616. effeff = Instance.new("ForceField",chara)
  617. effeff.Name = "FawsFeeld"
  618. --effeff.Visible = false
  619. for i = 0,.6,.1 do
  620. rs:wait()
  621. TC.C0 = clerp(ITCF,TCF * CFrame.fromEulerAnglesXYZ(0,0,math.rad(-90)),.4+i)
  622. HC.C0 = clerp(IHCF,HCF * CFrame.fromEulerAnglesXYZ(0,0,math.rad(90)),.4+i)
  623. LW.C0 = clerp(ILWF,(LWF + Vector3.new(0,1,0)) * CFrame.fromEulerAnglesXYZ(math.rad(180),0,math.rad(0)),.4+i)
  624. --RW.C0 = clerp(IRWF,(RWF + Vector3.new(1,.5,-1)) * CFrame.fromEulerAnglesXYZ(math.rad(180),0,math.rad(-45)),.4+i)
  625. end
  626. elseif blockval == true then
  627. SwingSnd:Play()
  628. effeff:Destroy()
  629. blockval = false
  630. for i = 0,.6,.1 do
  631. rs:wait()
  632. TC.C0 = clerp(ITCF,TCF * CFrame.fromEulerAnglesXYZ(0,0,math.rad(-90)),.6-i)
  633. HC.C0 = clerp(IHCF,HCF * CFrame.fromEulerAnglesXYZ(0,0,math.rad(90)),.6-i)
  634. LW.C0 = clerp(ILWF,(LWF + Vector3.new(0,1,0)) * CFrame.fromEulerAnglesXYZ(math.rad(180),0,math.rad(0)),.6-i)
  635. --RW.C0 = clerp(IRWF,(RWF + Vector3.new(1,.5,-1)) * CFrame.fromEulerAnglesXYZ(math.rad(180),0,math.rad(-45)),.6-i)
  636. end
  637. res()
  638. end
  639. end
  640.  
  641. --Mouse Functions--
  642. del = false
  643. combo = 0
  644. function onKeyDown(key)
  645. if key == "q" and attacking == false then
  646. ToggleBlock()
  647. elseif del == false and blockval == false then
  648. if key == "z" then
  649. LasSlash()
  650. elseif key == "x" then
  651. GrabMove()
  652. elseif key == "c" then
  653. Shoot()
  654. elseif key == "v" then
  655. Cannon()
  656. end
  657. end
  658. end
  659. function onButton1Down()
  660. if del == false then
  661. del = true
  662. bladeactive = true
  663. SlashT.Enabled = true
  664. --Combo 1
  665. if combo == 0 then
  666. wait(.001)
  667. for i = 0,.6,.2 do
  668. rs:wait()
  669. TC.C0 = clerp(ITCF,TCF * CFrame.fromEulerAnglesXYZ(0,0,math.rad(90)),.4+i)
  670. HC.C0 = clerp(IHCF,HCF * CFrame.fromEulerAnglesXYZ(0,0,math.rad(-90)),.4+i)
  671. RW.C0 = clerp(IRWF,(RWF + Vector3.new(.5,1.4,0)) * CFrame.fromEulerAnglesXYZ(0,0,math.rad(-90)),.4+i)
  672. LW.C0 = clerp(ILWF,(LWF + Vector3.new(0,1,0)) * CFrame.fromEulerAnglesXYZ(0,0,math.rad(50)),.4+i)
  673. end
  674. SwingSnd:Play()
  675. for i = 0,.6,.2 do
  676. rs:wait()
  677. TC.C0 = clerp(TCF * CFrame.fromEulerAnglesXYZ(0,0,math.rad(80)),TCF * CFrame.fromEulerAnglesXYZ(0,0,math.rad(-90)),.4+i)
  678. HC.C0 = clerp(HCF * CFrame.fromEulerAnglesXYZ(0,0,math.rad(-80)),HCF * CFrame.fromEulerAnglesXYZ(0,0,math.rad(90)),.4+i)
  679. end
  680. wait(.1)
  681. for i = 0,.6,.2 do
  682. rs:wait()
  683. TC.C0 = clerp(ITCF,TCF * CFrame.fromEulerAnglesXYZ(0,0,math.rad(-90)),.6-i)
  684. HC.C0 = clerp(IHCF,HCF * CFrame.fromEulerAnglesXYZ(0,0,math.rad(90)),.6-i)
  685. RW.C0 = clerp(IRWF,(RWF + Vector3.new(.5,1.4,0)) * CFrame.fromEulerAnglesXYZ(0,0,math.rad(-90)),.6-i)
  686. LW.C0 = clerp(ILWF,(LWF + Vector3.new(0,1,0)) * CFrame.fromEulerAnglesXYZ(0,0,math.rad(50)),.6-i)
  687. end
  688. combo = 1
  689. --Combo 2
  690. elseif combo == 1 then
  691. for i = 0,.6,.2 do
  692. rs:wait()
  693. TC.C0 = clerp(ITCF,TCF,.4+i)
  694. HC.C0 = clerp(IHCF,HCF * CFrame.fromEulerAnglesXYZ(0,0,math.rad(90)),.4+i)
  695. RW.C0 = clerp(IRWF,(RWF + Vector3.new(.5,1.4,0)) * CFrame.fromEulerAnglesXYZ(0,0,math.rad(-90)),.4+i)
  696. LW.C0 = clerp(ILWF,(LWF - Vector3.new(.5,-1.4,.5)) * CFrame.fromEulerAnglesXYZ(0,0,math.rad(90)),.4+i)
  697. end
  698. for i = 0,1,.2 do
  699. rs:wait()
  700. TC.C0 = clerp(TCF,TCF * CFrame.fromEulerAnglesXYZ(0,0,math.rad(180)),i)
  701. end
  702. SwingSnd:Play()
  703. for i = 0,1,.2 do
  704. rs:wait()
  705. TC.C0 = clerp(TCF * CFrame.fromEulerAnglesXYZ(0,0,math.rad(180)),TCF * CFrame.fromEulerAnglesXYZ(0,0,math.rad(360)),i)
  706. end
  707. SwingSnd:Play()
  708. for i = 0,.6,.2 do
  709. rs:wait()
  710. TC.C0 = clerp(ITCF,TCF,.6-i)
  711. HC.C0 = clerp(IHCF,HCF * CFrame.fromEulerAnglesXYZ(0,0,math.rad(90)),.6-i)
  712. RW.C0 = clerp(IRWF,(RWF + Vector3.new(.5,1.4,0)) * CFrame.fromEulerAnglesXYZ(0,0,math.rad(-90)),.6-i)
  713. LW.C0 = clerp(ILWF,(LWF - Vector3.new(.5,-1.4,.5)) * CFrame.fromEulerAnglesXYZ(0,0,math.rad(90)),.6-i)
  714. end
  715. combo = 2
  716. --Combo 3
  717. elseif combo == 2 then
  718. for i = 0,.6,.2 do
  719. rs:wait()
  720. TC.C0 = clerp(ITCF,TCF * CFrame.fromEulerAnglesXYZ(0,0,math.rad(90)),.4+i)
  721. HC.C0 = clerp(IHCF,HCF * CFrame.fromEulerAnglesXYZ(0,0,math.rad(-90)),.4+i)
  722. RW.C0 = clerp(IRWF,(RWF + Vector3.new(.5,1.4,0)) * CFrame.fromEulerAnglesXYZ(0,0,math.rad(-90)),.4+i)
  723. LW.C0 = clerp(ILWF,(LWF - Vector3.new(.5,-1.4,.5)) * CFrame.fromEulerAnglesXYZ(0,0,math.rad(90)),.4+i)
  724. end
  725. SWeld:Destroy()
  726. 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),})
  727. TC.C0 = TCF * CFrame.fromEulerAnglesXYZ(0,0,math.rad(90))
  728. RW.C0 = (RWF + Vector3.new(.5,1.4,0)) * CFrame.fromEulerAnglesXYZ(0,0,math.rad(-90))
  729. Swing2Snd:Play()
  730. local bfos = Instance.new("BodyVelocity",chara.Head)
  731. bfos.P = 20000
  732. bfos.MaxForce = Vector3.new(bfos.P,bfos.P,bfos.P)
  733. bfos.Velocity = chara.HumanoidRootPart.CFrame.lookVector * 150
  734. debby:AddItem(bfos,.1)
  735. wait(.2)
  736. SWeld:Destroy()
  737. 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),})
  738. for i = 0,.6,.2 do
  739. rs:wait()
  740. TC.C0 = clerp(ITCF,TCF * CFrame.fromEulerAnglesXYZ(0,0,math.rad(90)),.6-i)
  741. HC.C0 = clerp(IHCF,HCF * CFrame.fromEulerAnglesXYZ(0,0,math.rad(-90)),.6-i)
  742. RW.C0 = clerp(IRWF,(RWF + Vector3.new(.5,1.4,0)) * CFrame.fromEulerAnglesXYZ(0,0,math.rad(-90)),.6-i)
  743. LW.C0 = clerp(ILWF,(LWF - Vector3.new(.5,-1.4,.5)) * CFrame.fromEulerAnglesXYZ(0,0,math.rad(90)),.6-i)
  744. end
  745. combo = 0
  746. end
  747. del = false
  748. bladeactive = false
  749. SlashT.Enabled = false
  750. res()
  751. end
  752. end
  753.  
  754. --Mouse Activation--
  755. if Mouse then
  756. Mouse.KeyDown:connect(onKeyDown)
  757. Mouse.Button1Down:connect(onButton1Down)
  758. end
  759.  
  760. --Loop Function--
  761. walking = false
  762. while true do
  763. wait()
  764. materialhit()
  765. if del == false then attacking = false elseif del == true then attacking = true end
  766. if blockval == true and chara:FindFirstChild("HitByUlt")==nil then
  767. chara.Humanoid.Health = healthlock
  768. end
  769. torvel = (chara.HumanoidRootPart.Velocity*Vector3.new(1,0,1)).magnitude
  770. if torvel < 1 and walking == true and del == false and attacking == false and blockval == false then
  771. for i = 0,1,.5 do
  772. rs:wait()
  773. if del == false and attacking == false and blockval == false then
  774. TC.C0 = clerp(TCF * CFrame.fromEulerAnglesXYZ(math.rad(30),0,0),ITCF,i)
  775. HC.C0 = clerp(HCF * CFrame.fromEulerAnglesXYZ(math.rad(-30),0,0),IHCF,i)
  776. RW.C0 = IRWF
  777. LW.C0 = clerp((LWF + Vector3.new(0,.2,0)) * CFrame.fromEulerAnglesXYZ(0,0,math.rad(20)),ILWF,i)
  778. end
  779. end
  780. walking = false
  781. elseif torvel > 1 and walking == false and del == false and attacking == false and blockval == false then
  782. for i = 0,1,.5 do
  783. rs:wait()
  784. if del == false and attacking == false and blockval == false then
  785. TC.C0 = clerp(ITCF,TCF * CFrame.fromEulerAnglesXYZ(math.rad(30),0,0),i)
  786. HC.C0 = clerp(IHCF,HCF * CFrame.fromEulerAnglesXYZ(math.rad(-30),0,0),i)
  787. RW.C0 = IRWF
  788. LW.C0 = clerp(ILWF,(LWF + Vector3.new(0,.2,0)) * CFrame.fromEulerAnglesXYZ(0,0,math.rad(20)),i)
  789. end
  790. end
  791. walking = true
  792. else
  793. end
  794. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement