Advertisement
Marcsosa

Untitled

Apr 27th, 2018
163
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ------------------
  2. --Basic Fighting--
  3. ------------------
  4. --By CKbackup--
  5. ---------------
  6.  
  7. player = game.Players.LocalPlayer
  8.  
  9.  
  10. ArtificialHB = Instance.new("BindableEvent", script)
  11. ArtificialHB.Name = "Heartbeat"
  12. script:WaitForChild("Heartbeat")
  13. frame = 0.03333333333333
  14. tf = 0
  15. allowframeloss = false
  16. tossremainder = false
  17. lastframe = tick()
  18. script.Heartbeat:Fire()
  19. game:GetService("RunService").Heartbeat:connect(function(s, p)
  20. tf = tf + s
  21. if tf >= frame then
  22. if allowframeloss then
  23. script.Heartbeat:Fire()
  24. lastframe = tick()
  25. else
  26. for i = 1, math.floor(tf / frame) do
  27. script.Heartbeat:Fire()
  28. end
  29. lastframe = tick()
  30. end
  31. if tossremainder then
  32. tf = 0
  33. else
  34. tf = tf - frame * math.floor(tf / frame)
  35. end
  36. end
  37. end)
  38. function swait(num)
  39. if num == 0 or num == nil then
  40. ArtificialHB.Event:wait()
  41. else
  42. for i = 0, num*30 do
  43. ArtificialHB.Event:wait()
  44. end
  45. end
  46. end
  47.  
  48. New = function(Object, Parent, Name, Data)
  49. local Object = Instance.new(Object)
  50. for Index, Value in pairs(Data or {}) do
  51. Object[Index] = Value
  52. end
  53. Object.Parent = Parent
  54. Object.Name = Name
  55. return Object
  56. end
  57.  
  58. RightArm = New("Model",chara,"RightArm",{})
  59. MainPart = New("Part",RightArm,"MainPart",{Transparency = 1,Transparency = 1,Size = Vector3.new(1, 2, 1),CFrame = CFrame.new(0.5, 3.00000787, -3.50019717, 1, 0, 0, 0, 1, 0, 0, 0, 1),CanCollide = false,BackSurface = Enum.SurfaceType.SmoothNoOutlines,BottomSurface = Enum.SurfaceType.SmoothNoOutlines,FrontSurface = Enum.SurfaceType.SmoothNoOutlines,LeftSurface = Enum.SurfaceType.SmoothNoOutlines,RightSurface = Enum.SurfaceType.SmoothNoOutlines,TopSurface = Enum.SurfaceType.SmoothNoOutlines,})
  60. Weld = New("ManualWeld",MainPart,"Weld",{Part0 = MainPart,Part1 = chara["Right Arm"],C1 = CFrame.new(0, -1.00135803e-005, -0.000197172165, 1, 0, 0, 0, 1, 0, 0, 0, 1),})
  61. Emit2Part = New("Part",RightArm,"Emit2Part",{BrickColor = BrickColor.new("New Yeller"),Material = Enum.Material.Neon,Transparency = 1,Transparency = 1,Size = Vector3.new(1, 1, 1),CFrame = CFrame.new(0.5, 2.10001373, -3.5001967, 1, 0, 0, 0, 1, 0, 0, 0, 1),CanCollide = false,BackSurface = Enum.SurfaceType.SmoothNoOutlines,BottomSurface = Enum.SurfaceType.SmoothNoOutlines,FrontSurface = Enum.SurfaceType.SmoothNoOutlines,LeftSurface = Enum.SurfaceType.SmoothNoOutlines,RightSurface = Enum.SurfaceType.SmoothNoOutlines,TopSurface = Enum.SurfaceType.SmoothNoOutlines,Color = Color3.new(1, 0, 0.74902),})
  62. Mesh = New("SpecialMesh",Emit2Part,"Mesh",{Scale = Vector3.new(1.29999995, 1.29999995, 1.29999995),MeshType = Enum.MeshType.Sphere,})
  63. Weld = New("ManualWeld",Emit2Part,"Weld",{Part0 = Emit2Part,Part1 = MainPart,C1 = CFrame.new(0, -0.899994135, 4.76837158e-007, 1, 0, 0, 0, 1, 0, 0, 0, 1),})
  64. LeftArm = New("Model",chara,"LeftArm",{})
  65. MainPart = New("Part",LeftArm,"MainPart",{Transparency = 1,Transparency = 1,Size = Vector3.new(1, 2, 1),CFrame = CFrame.new(-2.50000024, 3.00000787, -3.50019717, 1, 0, 0, 0, 1, 0, 0, 0, 1),CanCollide = false,BackSurface = Enum.SurfaceType.SmoothNoOutlines,BottomSurface = Enum.SurfaceType.SmoothNoOutlines,FrontSurface = Enum.SurfaceType.SmoothNoOutlines,LeftSurface = Enum.SurfaceType.SmoothNoOutlines,RightSurface = Enum.SurfaceType.SmoothNoOutlines,TopSurface = Enum.SurfaceType.SmoothNoOutlines,})
  66. Weld = New("ManualWeld",MainPart,"Weld",{Part0 = MainPart,Part1 = chara["Left Arm"],C1 = CFrame.new(-2.38418579e-007, -1.00135803e-005, -0.000197172165, 1, 0, 0, 0, 1, 0, 0, 0, 1),})
  67. EmitPart = New("Part",LeftArm,"EmitPart",{BrickColor = BrickColor.new("New Yeller"),Material = Enum.Material.Neon,Transparency = 1,Transparency = 1,Size = Vector3.new(1, 1, 1),CFrame = CFrame.new(-2.5, 2.10001373, -3.5001967, 1, 0, 0, 0, 1, 0, 0, 0, 1),CanCollide = false,BackSurface = Enum.SurfaceType.SmoothNoOutlines,BottomSurface = Enum.SurfaceType.SmoothNoOutlines,FrontSurface = Enum.SurfaceType.SmoothNoOutlines,LeftSurface = Enum.SurfaceType.SmoothNoOutlines,RightSurface = Enum.SurfaceType.SmoothNoOutlines,TopSurface = Enum.SurfaceType.SmoothNoOutlines,Color = Color3.new(1, 0, 0.74902),})
  68. Mesh = New("SpecialMesh",EmitPart,"Mesh",{Scale = Vector3.new(1.29999995, 1.29999995, 1.29999995),MeshType = Enum.MeshType.Sphere,})
  69. Weld = New("ManualWeld",EmitPart,"Weld",{Part0 = EmitPart,Part1 = MainPart,C1 = CFrame.new(2.38418579e-007, -0.899994135, 4.76837158e-007, 1, 0, 0, 0, 1, 0, 0, 0, 1),})
  70.  
  71. lach = LeftArm:GetChildren()
  72. rach = RightArm:GetChildren()
  73.  
  74. local pemit = Instance.new("ParticleEmitter")
  75. pemit.Enabled = false
  76. pemit.Color = ColorSequence.new(Color3.new(255,255,0))
  77. pemit.LightEmission = 1
  78. pemit.Size = NumberSequence.new(1.5,0)
  79. pemit.Texture = "http://www.roblox.com/asset/?id=243098098"
  80. pemit.Lifetime = NumberRange.new(.2)
  81. pemit.Rate = 100
  82. pemit.Rotation = NumberRange.new(0,360)
  83. pemit.Speed = NumberRange.new(0)
  84.  
  85. local p1 = pemit:Clone()
  86. p1.Parent = EmitPart
  87. local p2 = pemit:Clone()
  88. p2.Parent = Emit2Part
  89. local p3 = pemit:Clone()
  90. p3.Parent = chara["Right Leg"]
  91. p3.Rate = 10000
  92. local p4 = pemit:Clone()
  93. p4.Parent = chara["Left Leg"]
  94. p4.Rate = 10000
  95.  
  96. --Sounds--
  97. function LoadSnd(id,loop,vol,pit)
  98. local snd = New("Sound",chara.Head,"Sound",{SoundId = "rbxassetid://"..id,Looped = loop,Volume = vol,Pitch = pit})
  99. return snd
  100. end
  101. Swing2Snd = LoadSnd(536642316,false,1,1)
  102. HitPunchSnd = LoadSnd(153092227,false,1,1)
  103. HitHamonSnd = LoadSnd(260433624,false,1,1)
  104. HamonSnd = LoadSnd(876570589,false,1,1)
  105. SHamonSnd = LoadSnd(379557765,true,.5,1)
  106.  
  107. --Play Sound in Part--
  108. function PlaySnd(snd,part)
  109. local sound = snd:Clone()
  110. sound.PlayOnRemove = true
  111. sound.Parent = part
  112. sound:Destroy()
  113. end
  114.  
  115. maincol = "White"
  116.  
  117. function CreateTrailObj(parent,color1,color2,ofsx,ofsz)
  118. local Att1 = New("Attachment",parent,"Att1",{Position = Vector3.new(ofsx,parent.Size.Y/2,ofsz)})
  119. local Att2 = New("Attachment",parent,"Att2",{Position = Vector3.new(ofsx,-(parent.Size.Y/2),ofsz)})
  120. 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})
  121. return TEff
  122. end
  123.  
  124. RPunchT = CreateTrailObj(chara["Right Arm"],"White","White",0,0)
  125. LPunchT = CreateTrailObj(chara["Left Arm"],"White","White",0,0)
  126. RKickT = CreateTrailObj(chara["Right Leg"],"White","White",0,0)
  127. LKickT = CreateTrailObj(chara["Left Leg"],"White","White",0,0)
  128.  
  129. --Punch Hit Effect--
  130. function PunchEff(pos)
  131. local p = Instance.new("Part",game.Workspace)
  132. p.Size = Vector3.new(1,1,1)
  133. p.BrickColor = BrickColor.new(maincol)
  134. p.Material = "Neon"
  135. p.Anchored = true
  136. p.CanCollide = false
  137. p.CFrame = pos
  138. local pm = Instance.new("SpecialMesh",p)
  139. pm.MeshType = "Sphere"
  140. coroutine.resume(coroutine.create(function()
  141. for i = 0,1,.05 do
  142. swait()
  143. p.Transparency = i
  144. pm.Scale = Vector3.new(2*i,2*i,2*i)
  145. end
  146. swait()
  147. p:Destroy()
  148. end))
  149. end
  150.  
  151. --Damage Function--
  152. function dealdmg(dude,damage,env,toim,kby,kbx)
  153. coroutine.resume(coroutine.create(function()
  154. if dude ~= chara and dude:FindFirstChild("IsHit") == nil then
  155. finaldmg = damage + math.random(-env,env)
  156. dudehum = dude:FindFirstChildOfClass("Humanoid")
  157. dudehum.MaxHealth = 100
  158. dudehum.Health = dudehum.Health - finaldmg
  159. local vall = Instance.new("ObjectValue",dude)
  160. vall.Name = "IsHit"
  161. game.Debris:AddItem(vall,toim)
  162. local bfos = Instance.new("BodyVelocity",dude.Head)
  163. bfos.P = 20000
  164. bfos.MaxForce = Vector3.new(bfos.P,bfos.P,bfos.P)
  165. bfos.Velocity = Vector3.new(0,kby,0) + chara.HumanoidRootPart.CFrame.lookVector * kbx
  166. game.Debris:AddItem(bfos,.1)
  167. local naeeym2 = Instance.new("BillboardGui",dude)
  168. naeeym2.Size = UDim2.new(0,100,0,40)
  169. naeeym2.StudsOffset = Vector3.new(0,3,0)
  170. naeeym2.Adornee = dude.Head
  171. naeeym2.Name = "TalkingBillBoard"
  172. local tecks2 = Instance.new("TextLabel",naeeym2)
  173. tecks2.BackgroundTransparency = 1
  174. tecks2.BorderSizePixel = 0
  175. tecks2.Text = "-"..finaldmg
  176. tecks2.Font = "Fantasy"
  177. tecks2.FontSize = "Size24"
  178. tecks2.TextStrokeTransparency = 0
  179. tecks2.TextColor3 = Color3.new(1,0.6,0)
  180. tecks2.TextStrokeColor3 = Color3.new(0,0,0)
  181. tecks2.Size = UDim2.new(1,0,0.5,0)
  182. for i = 1, 5 do
  183. wait(.1)
  184. tecks2.Position = tecks2.Position - UDim2.new(0,0,.05,0)
  185. tecks2.TextStrokeTransparency = tecks2.TextStrokeTransparency +.2
  186. tecks2.TextTransparency = tecks2.TextTransparency + .2
  187. end
  188. naeeym2:Destroy()
  189. end
  190. end))
  191. end
  192.  
  193. --Explode Hitbox--
  194. function ExHitbox(rad,pos,damage,env,toim,kby,kbx)
  195. local E = Instance.new("Explosion")
  196. E.Position = pos
  197. E.Parent = game.Workspace
  198. E.BlastRadius = rad
  199. E.BlastPressure = 0
  200. E.Visible = false
  201. E.Hit:connect(function(hit)
  202. if hit.Parent:FindFirstChildOfClass("Humanoid")~=nil then
  203. dealdmg(hit.Parent,damage,env,toim,kby,kbx)
  204. end
  205. end)
  206. end
  207.  
  208. --Punch Touch--
  209. dela = .5
  210. punchactive = false
  211. function punchhit(hit)
  212. if punchactive == true then
  213. if hit.Parent:FindFirstChildOfClass("Humanoid") ~= nil and hit.Parent ~= chara and hit.Parent:FindFirstChild("IsHit")==nil then
  214. dealdmg(hit.Parent,15,2,dela,0,5)
  215. PlaySnd(HitPunchSnd,hit.Parent.Head)
  216. if maincol == "New Yeller" then
  217. PlaySnd(HitHamonSnd,hit.Parent.Head)
  218. end
  219. PunchEff(hit.CFrame)
  220. end
  221. end
  222. end
  223. Emit2Part.Touched:connect(punchhit)
  224. EmitPart.Touched:connect(punchhit)
  225.  
  226. --Kick Touch--
  227. kickactive = false
  228. function kickhit(hit)
  229. if kickactive == true then
  230. if hit.Parent:FindFirstChildOfClass("Humanoid") ~= nil and hit.Parent ~= chara and hit.Parent:FindFirstChild("IsHit")==nil then
  231. PlaySnd(HitPunchSnd,hit.Parent.Head)
  232. PunchEff(hit.CFrame)
  233. if maincol == "New Yeller" then
  234. PlaySnd(HitHamonSnd,hit.Parent.Head)
  235. end
  236. dealdmg(hit.Parent,20,2,dela,0,20)
  237. end
  238. end
  239. end
  240. chara["Right Leg"].Touched:connect(kickhit)
  241. chara["Left Leg"].Touched:connect(kickhit)
  242.  
  243. --Chat Function--
  244. function chatfunc(text)
  245. coroutine.resume(coroutine.create(function()
  246. if chara:FindFirstChild("TalkingBillBoard")~= nil then
  247. chara:FindFirstChild("TalkingBillBoard"):destroy()
  248. end
  249. local naeeym2 = Instance.new("BillboardGui",chara)
  250. naeeym2.Size = UDim2.new(0,100,0,40)
  251. naeeym2.StudsOffset = Vector3.new(0,3,0)
  252. naeeym2.Adornee = chara.Head
  253. naeeym2.Name = "TalkingBillBoard"
  254. local tecks2 = Instance.new("TextLabel",naeeym2)
  255. tecks2.BackgroundTransparency = 1
  256. tecks2.BorderSizePixel = 0
  257. tecks2.Text = ""
  258. tecks2.Font = "Fantasy"
  259. tecks2.FontSize = "Size24"
  260. tecks2.TextStrokeTransparency = 0
  261. tecks2.TextColor3 = Color3.new(1,1,1)
  262. tecks2.TextStrokeColor3 = Color3.new(0,0,0)
  263. tecks2.Size = UDim2.new(1,0,0.5,0)
  264. coroutine.resume(coroutine.create(function()
  265. for i = 1,string.len(text),1 do
  266. tecks2.Text = string.sub(text,1,i)
  267. swait(0.01)
  268. end
  269. swait(1)
  270. for i = 1, 5 do
  271. swait(.01)
  272. tecks2.Position = tecks2.Position - UDim2.new(0,0,.05,0)
  273. tecks2.TextStrokeTransparency = tecks2.TextStrokeTransparency +.2
  274. tecks2.TextTransparency = tecks2.TextTransparency + .2
  275. end
  276. naeeym2:Destroy()
  277. end))
  278. end))
  279. end
  280.  
  281. function onChatted(msg)
  282. --chatfunc(msg)
  283. if msg == "WA CH A" then
  284. HamonSnd:Play()
  285. maincol = "New Yeller"
  286. for i = 0,.1,.01 do
  287. swait()
  288. EmitPart.Transparency = 1-i
  289. Emit2Part.Transparency = 1-i
  290. end
  291. p1.Enabled = true
  292. p2.Enabled = true
  293. RPunchT.Color = ColorSequence.new(Color3.new(1,1,0))
  294. LPunchT.Color = ColorSequence.new(Color3.new(1,1,0))
  295. RKickT.Color = ColorSequence.new(Color3.new(1,1,0))
  296. LKickT.Color = ColorSequence.new(Color3.new(1,1,0))
  297. elseif msg == "TECHNIQUE off." then
  298. maincol = "White"
  299. p1.Enabled = false
  300. p2.Enabled = false
  301. for i = .9,1,.01 do
  302. swait()
  303. EmitPart.Transparency = i
  304. Emit2Part.Transparency = i
  305. end
  306. RPunchT.Color = ColorSequence.new(BrickColor.new("White").Color)
  307. LPunchT.Color = ColorSequence.new(BrickColor.new("White").Color)
  308. RKickT.Color = ColorSequence.new(BrickColor.new("White").Color)
  309. LKickT.Color = ColorSequence.new(BrickColor.new("White").Color)
  310. end
  311. end
  312. player.Chatted:connect(onChatted)
  313.  
  314.  
  315. --Flip--
  316. function Flip()
  317. del = true
  318. res()
  319. hum.WalkSpeed = 0
  320. AddLegWelds()
  321. Swing2Snd:Play()
  322. for i = 0,.6,.2 do
  323. swait()
  324. TC.C0 = clerp(ITCF,TCF - Vector3.new(0,1,0),.4+i)
  325. HC.C0 = clerp(IHCF,HCF * CFrame.fromEulerAnglesXYZ(math.rad(30),0,0),.4+i)
  326. RW.C0 = clerp(IRWF,RWF * CFrame.fromEulerAnglesXYZ(0,0,math.rad(-10)),.4+i)
  327. LW.C0 = clerp(ILWF,LWF,.4+i)
  328. RLW.C0 = clerp(RLWF,RLWF - Vector3.new(0,1,-.5),.4+i)
  329. LLW.C0 = clerp(LLWF,(LLWF - Vector3.new(0,1,-1))*CFrame.fromEulerAnglesXYZ(math.rad(90),0,0),.4+i)
  330. end
  331. local bf = Instance.new("BodyVelocity",chara.Torso)
  332. bf.P = 100000
  333. bf.MaxForce = Vector3.new(bf.P,bf.P,bf.P)
  334. bf.Velocity = Vector3.new(0,60,0) + chara.HumanoidRootPart.CFrame.lookVector*30
  335. debby:AddItem(bf,.5)
  336. for i = 0,1,.25 do
  337. swait()
  338. TC.C0 = clerp(TCF - Vector3.new(0,1,0),TCF * CFrame.fromEulerAnglesXYZ(math.rad(-180),0,0),i)
  339. HC.C0 = clerp(HCF * CFrame.fromEulerAnglesXYZ(math.rad(30),0,0),HCF * CFrame.fromEulerAnglesXYZ(math.rad(-20),0,0),i)
  340. RW.C0 = clerp(RWF * CFrame.fromEulerAnglesXYZ(0,0,math.rad(-10)),(RWF + Vector3.new(0,1,0)) * CFrame.fromEulerAnglesXYZ(math.rad(-180),0,0),i)
  341. LW.C0 = clerp(LWF,(LWF + Vector3.new(0,1,0)) * CFrame.fromEulerAnglesXYZ(math.rad(-180),0,0),i)
  342. LLW.C0 = clerp((LLWF - Vector3.new(0,1,-1))*CFrame.fromEulerAnglesXYZ(math.rad(90),0,0),LLWF,i)
  343. end
  344. bf.MaxForce = Vector3.new(bf.P,0,bf.P)
  345. for i = 0,1,.25 do
  346. swait()
  347. TC.C0 = clerp(TCF * CFrame.fromEulerAnglesXYZ(math.rad(-180),0,0),TCF * CFrame.fromEulerAnglesXYZ(math.rad(-360),0,0),i)
  348. end
  349. swait(.5)
  350. bf:Destroy()
  351. for i = 0,1,.25 do
  352. swait()
  353. TC.C0 = clerp(TCF,TCF - Vector3.new(0,1,0),i)
  354. HC.C0 = clerp(HCF * CFrame.fromEulerAnglesXYZ(math.rad(-20),0,0),HCF * CFrame.fromEulerAnglesXYZ(math.rad(30),0,0),i)
  355. RW.C0 = clerp((RWF + Vector3.new(0,1,0)) * CFrame.fromEulerAnglesXYZ(math.rad(-180),0,0),RWF * CFrame.fromEulerAnglesXYZ(0,0,math.rad(-10)),i)
  356. LW.C0 = clerp((LWF + Vector3.new(0,1,0)) * CFrame.fromEulerAnglesXYZ(math.rad(-180),0,0),LWF,i)
  357. LLW.C0 = clerp(LLWF,(LLWF - Vector3.new(0,1,-1))*CFrame.fromEulerAnglesXYZ(math.rad(90),0,0),i)
  358. end
  359. for i = 0,.6,.2 do
  360. swait()
  361. TC.C0 = clerp(ITCF,TCF - Vector3.new(0,1,0),.6-i)
  362. HC.C0 = clerp(IHCF,HCF * CFrame.fromEulerAnglesXYZ(math.rad(30),0,0),.6-i)
  363. RW.C0 = clerp(IRWF,RWF * CFrame.fromEulerAnglesXYZ(0,0,math.rad(-10)),.6-i)
  364. LW.C0 = clerp(ILWF,LWF,.6-i)
  365. RLW.C0 = clerp(RLWF,RLWF - Vector3.new(0,1,-.5),.6-i)
  366. LLW.C0 = clerp(LLWF,(LLWF - Vector3.new(0,1,-1))*CFrame.fromEulerAnglesXYZ(math.rad(90),0,0),.6-i)
  367. end
  368. DestroyLegWelds()
  369. res()
  370. hum.WalkSpeed = ws
  371. walking = false
  372. del = false
  373. end
  374. function BackFlip()
  375. del = true
  376. res()
  377. hum.WalkSpeed = 0
  378. AddLegWelds()
  379. Swing2Snd:Play()
  380. for i = 0,.6,.2 do
  381. swait()
  382. TC.C0 = clerp(ITCF,TCF - Vector3.new(0,1,0),.4+i)
  383. HC.C0 = clerp(IHCF,HCF * CFrame.fromEulerAnglesXYZ(math.rad(30),0,0),.4+i)
  384. RW.C0 = clerp(IRWF,RWF * CFrame.fromEulerAnglesXYZ(0,0,math.rad(-10)),.4+i)
  385. LW.C0 = clerp(ILWF,LWF,.4+i)
  386. RLW.C0 = clerp(RLWF,RLWF - Vector3.new(0,1,-.5),.4+i)
  387. LLW.C0 = clerp(LLWF,(LLWF - Vector3.new(0,1,-1))*CFrame.fromEulerAnglesXYZ(math.rad(90),0,0),.4+i)
  388. end
  389. local bf = Instance.new("BodyVelocity",chara.Torso)
  390. bf.P = 100000
  391. bf.MaxForce = Vector3.new(bf.P,bf.P,bf.P)
  392. bf.Velocity = Vector3.new(0,60,0) + chara.HumanoidRootPart.CFrame.lookVector*-30
  393. for i = 0,1,.25 do
  394. swait()
  395. TC.C0 = clerp(TCF - Vector3.new(0,1,0),TCF * CFrame.fromEulerAnglesXYZ(math.rad(180),0,0),i)
  396. HC.C0 = clerp(HCF * CFrame.fromEulerAnglesXYZ(math.rad(30),0,0),HCF * CFrame.fromEulerAnglesXYZ(math.rad(-20),0,0),i)
  397. RW.C0 = clerp(RWF * CFrame.fromEulerAnglesXYZ(0,0,math.rad(-10)),(RWF + Vector3.new(0,1,0)) * CFrame.fromEulerAnglesXYZ(math.rad(-180),0,0),i)
  398. LW.C0 = clerp(LWF,(LWF + Vector3.new(0,1,0)) * CFrame.fromEulerAnglesXYZ(math.rad(-180),0,0),i)
  399. LLW.C0 = clerp((LLWF - Vector3.new(0,1,-1))*CFrame.fromEulerAnglesXYZ(math.rad(90),0,0),LLWF,i)
  400. end
  401. bf.MaxForce = Vector3.new(bf.P,0,bf.P)
  402. for i = 0,1,.25 do
  403. swait()
  404. TC.C0 = clerp(TCF * CFrame.fromEulerAnglesXYZ(math.rad(180),0,0),TCF * CFrame.fromEulerAnglesXYZ(math.rad(360),0,0),i)
  405. end
  406. swait(.5)
  407. bf:Destroy()
  408. for i = 0,1,.25 do
  409. swait()
  410. TC.C0 = clerp(TCF,TCF - Vector3.new(0,1,0),i)
  411. HC.C0 = clerp(HCF * CFrame.fromEulerAnglesXYZ(math.rad(-20),0,0),HCF * CFrame.fromEulerAnglesXYZ(math.rad(30),0,0),i)
  412. RW.C0 = clerp((RWF + Vector3.new(0,1,0)) * CFrame.fromEulerAnglesXYZ(math.rad(-180),0,0),RWF * CFrame.fromEulerAnglesXYZ(0,0,math.rad(-10)),i)
  413. LW.C0 = clerp((LWF + Vector3.new(0,1,0)) * CFrame.fromEulerAnglesXYZ(math.rad(-180),0,0),LWF,i)
  414. LLW.C0 = clerp(LLWF,(LLWF - Vector3.new(0,1,-1))*CFrame.fromEulerAnglesXYZ(math.rad(90),0,0),i)
  415. end
  416. for i = 0,.6,.2 do
  417. swait()
  418. TC.C0 = clerp(ITCF,TCF - Vector3.new(0,1,0),.6-i)
  419. HC.C0 = clerp(IHCF,HCF * CFrame.fromEulerAnglesXYZ(math.rad(30),0,0),.6-i)
  420. RW.C0 = clerp(IRWF,RWF * CFrame.fromEulerAnglesXYZ(0,0,math.rad(-10)),.6-i)
  421. LW.C0 = clerp(ILWF,LWF,.6-i)
  422. RLW.C0 = clerp(RLWF,RLWF - Vector3.new(0,1,-.5),.6-i)
  423. LLW.C0 = clerp(LLWF,(LLWF - Vector3.new(0,1,-1))*CFrame.fromEulerAnglesXYZ(math.rad(90),0,0),.6-i)
  424. end
  425. DestroyLegWelds()
  426. res()
  427. hum.WalkSpeed = ws
  428. walking = false
  429. del = false
  430. end
  431.  
  432. --Keys--
  433. combo = 0
  434. function onKeyDown(key)
  435. if del == false then
  436. if key == "r" then
  437. BackFlip()
  438. elseif key == "t" then
  439. Flip()
  440. end
  441. end
  442. end
  443. function onButton1Down()
  444. if del == false then
  445. del = true
  446. torvel = (chara.HumanoidRootPart.Velocity*Vector3.new(0,1,0)).magnitude
  447. res()
  448. if torvel > 3 then
  449. Swing2Snd:Play()
  450. kickactive = true
  451. RKickT.Enabled = true
  452. if maincol == "New Yeller" then
  453. SHamonSnd:Play()
  454. p3.Enabled = true
  455. end
  456. AddLegWelds()
  457. for i = 0,1,.2 do
  458. swait()
  459. TC.C0 = clerp(ITCF,TCF * CFrame.fromEulerAnglesXYZ(math.rad(-180),0,0),i)
  460. HC.C0 = clerp(IHCF,HCF * CFrame.fromEulerAnglesXYZ(math.rad(-20),0,0),i)
  461. RW.C0 = clerp(IRWF,(RWF + Vector3.new(0,1,0)) * CFrame.fromEulerAnglesXYZ(math.rad(-180),0,0),i)
  462. LW.C0 = clerp(ILWF,(LWF + Vector3.new(0,1,0)) * CFrame.fromEulerAnglesXYZ(math.rad(-180),0,0),i)
  463. LLW.C0 = clerp(LLWF,(LLWF - Vector3.new(0,1,-1))*CFrame.fromEulerAnglesXYZ(math.rad(90),0,0),i)
  464. end
  465. for i = 0,1,.2 do
  466. swait()
  467. TC.C0 = clerp(TCF * CFrame.fromEulerAnglesXYZ(math.rad(-180),0,0),TCF * CFrame.fromEulerAnglesXYZ(math.rad(-360),0,0),i)
  468. end
  469. DestroyLegWelds()
  470. kickactive = false
  471. RKickT.Enabled = false
  472. p3.Enabled = false
  473. SHamonSnd:Stop()
  474. elseif torvel < 3 then
  475. if combo == 0 then
  476. for i = 0,.6,.2 do
  477. swait()
  478. TC.C0 = clerp(ITCF,TCF * CFrame.fromEulerAnglesXYZ(0,0,math.rad(90)),.4+i)
  479. HC.C0 = clerp(IHCF,HCF * CFrame.fromEulerAnglesXYZ(0,0,math.rad(-90)),.4+i)
  480. LW.C0 = clerp(ILWF,(LWF + Vector3.new(-.5,-.5,.5)) * CFrame.fromEulerAnglesXYZ(math.rad(-90),math.rad(70),0),.4+i)
  481. RW.C0 = clerp(IRWF,(RWF + Vector3.new(.5,1.4,0)) * CFrame.fromEulerAnglesXYZ(0,0,math.rad(-90)),.4+i)
  482. end
  483. swait(.1)
  484. Swing2Snd:Play()
  485. punchactive = true
  486. LPunchT.Enabled = true
  487. if maincol == "New Yeller" then
  488. SHamonSnd:Play()
  489. end
  490. for i = 0,.6,.3 do
  491. swait()
  492. TC.C0 = clerp(TCF * CFrame.fromEulerAnglesXYZ(0,0,math.rad(80)),TCF,.4+i)
  493. HC.C0 = clerp(HCF * CFrame.fromEulerAnglesXYZ(0,0,math.rad(-80)),HCF,.4+i)
  494. LW.C0 = clerp((LWF + Vector3.new(-.5,-.5,.5)) * CFrame.fromEulerAnglesXYZ(math.rad(-90),math.rad(70),0),(LWF - Vector3.new(.5,-1.4,.5)) * CFrame.fromEulerAnglesXYZ(0,0,math.rad(90)),.4+i)
  495. RW.C0 = clerp((RWF + Vector3.new(.5,1.4,0)) * CFrame.fromEulerAnglesXYZ(0,0,math.rad(-90)),(RWF - Vector3.new(-.5,.5,-.5)) * CFrame.fromEulerAnglesXYZ(math.rad(-90),math.rad(-70),0),.4+i)
  496. end
  497. LW.C0 = (LWF - Vector3.new(.5,-1.4,0)) * CFrame.fromEulerAnglesXYZ(0,0,math.rad(90))
  498. for i = 0,.6,.2 do
  499. swait()
  500. TC.C0 = clerp(TCF,TCF * CFrame.fromEulerAnglesXYZ(0,0,math.rad(-90)),.4+i)
  501. HC.C0 = clerp(HCF,HCF * CFrame.fromEulerAnglesXYZ(0,0,math.rad(90)),.4+i)
  502. end
  503. TC.C0 = TCF * CFrame.fromEulerAnglesXYZ(0,0,math.rad(-90))
  504. HC.C0 = HCF * CFrame.fromEulerAnglesXYZ(0,0,math.rad(90))
  505. swait(.1)
  506. for i = 0,.6,.2 do
  507. swait()
  508. TC.C0 = clerp(ITCF,TCF * CFrame.fromEulerAnglesXYZ(0,0,math.rad(-90)),.6-i)
  509. HC.C0 = clerp(IHCF,HCF * CFrame.fromEulerAnglesXYZ(0,0,math.rad(90)),.6-i)
  510. LW.C0 = clerp(ILWF,(LWF - Vector3.new(.5,-1.4,.5)) * CFrame.fromEulerAnglesXYZ(0,0,math.rad(90)),.6-i)
  511. RW.C0 = clerp(IRWF,(RWF - Vector3.new(-.5,.5,-.5)) * CFrame.fromEulerAnglesXYZ(math.rad(-90),math.rad(-70),0),.6-i)
  512. end
  513. punchactive = false
  514. LPunchT.Enabled = false
  515. SHamonSnd:Stop()
  516. combo = 1
  517. elseif combo == 1 then
  518. hum.WalkSpeed = 0
  519. AddLegWelds()
  520. for i = 0,.6,.2 do
  521. swait()
  522. TC.C0 = clerp(ITCF,TCF * CFrame.fromEulerAnglesXYZ(math.rad(45),0,0),.4+i)
  523. HC.C0 = clerp(IHCF,HCF,.4+i)
  524. LLW.C0 = clerp(LLWF,LLWF * CFrame.fromEulerAnglesXYZ(math.rad(-45),0,0),.4+i)
  525. RLW.C0 = clerp(RLWF,(RLWF - Vector3.new(0,1,-1))*CFrame.fromEulerAnglesXYZ(math.rad(45),0,0),.4+i)
  526. end
  527. swait(.1)
  528. Swing2Snd:Play()
  529. kickactive = true
  530. RKickT.Enabled = true
  531. if maincol == "New Yeller" then
  532. SHamonSnd:Play()
  533. p3.Enabled = true
  534. end
  535. local bfos = Instance.new("BodyVelocity",chara.HumanoidRootPart)
  536. bfos.P = 10000
  537. bfos.MaxForce = Vector3.new(bfos.P,0,bfos.P)
  538. bfos.Velocity = chara.HumanoidRootPart.CFrame.lookVector * 200
  539. debby:AddItem(bfos,.1)
  540. for i = 0,.6,.2 do
  541. swait()
  542. TC.C0 = clerp(TCF * CFrame.fromEulerAnglesXYZ(math.rad(45),0,0),TCF * CFrame.fromEulerAnglesXYZ(math.rad(-45),0,0),.4+i)
  543. LLW.C0 = clerp(LLWF * CFrame.fromEulerAnglesXYZ(math.rad(-45),0,0),LLWF * CFrame.fromEulerAnglesXYZ(math.rad(45),0,0),.4+i)
  544. RLW.C0 = clerp((RLWF - Vector3.new(0,1,-1))*CFrame.fromEulerAnglesXYZ(math.rad(45),0,0),(RLWF - Vector3.new(0,1,1))*CFrame.fromEulerAnglesXYZ(math.rad(-90),0,0),.4+i)
  545. end
  546. swait(.3)
  547. for i = 0,.6,.2 do
  548. swait()
  549. TC.C0 = clerp(TCF * CFrame.fromEulerAnglesXYZ(math.rad(-45),0,0),ITCF,.4+i)
  550. HC.C0 = clerp(HCF,IHCF,.4+i)
  551. LLW.C0 = clerp(LLWF * CFrame.fromEulerAnglesXYZ(math.rad(45),0,0),LLWF,.4+i)
  552. RLW.C0 = clerp((RLWF - Vector3.new(0,1,1))*CFrame.fromEulerAnglesXYZ(math.rad(-90),0,0),RLWF,.4+i)
  553. end
  554. DestroyLegWelds()
  555. kickactive = false
  556. RKickT.Enabled = false
  557. p3.Enabled = false
  558. SHamonSnd:Stop()
  559. combo = 2
  560. elseif combo == 2 then
  561. for i = 0,.6,.2 do
  562. swait()
  563. TC.C0 = clerp(ITCF,TCF * CFrame.fromEulerAnglesXYZ(0,0,math.rad(-90)),.4+i)
  564. HC.C0 = clerp(IHCF,HCF * CFrame.fromEulerAnglesXYZ(0,0,math.rad(90)),.4+i)
  565. LW.C0 = clerp(ILWF,(LWF - Vector3.new(.5,-1.4,0)) * CFrame.fromEulerAnglesXYZ(0,0,math.rad(90)),.4+i)
  566. RW.C0 = clerp(IRWF,(RWF - Vector3.new(-.5,.5,-.5)) * CFrame.fromEulerAnglesXYZ(math.rad(-90),math.rad(-70),0),.4+i)
  567. end
  568. swait(.1)
  569. Swing2Snd:Play()
  570. punchactive = true
  571. RPunchT.Enabled = true
  572. if maincol == "New Yeller" then
  573. SHamonSnd:Play()
  574. end
  575. for i = 0,.6,.3 do
  576. swait()
  577. TC.C0 = clerp(TCF * CFrame.fromEulerAnglesXYZ(0,0,math.rad(-80)),TCF,.4+i)
  578. HC.C0 = clerp(HCF * CFrame.fromEulerAnglesXYZ(0,0,math.rad(80)),HCF,.4+i)
  579. LW.C0 = clerp((LWF - Vector3.new(.5,-1.4,0)) * CFrame.fromEulerAnglesXYZ(0,0,math.rad(90)),(LWF + Vector3.new(-.5,-.5,.5)) * CFrame.fromEulerAnglesXYZ(math.rad(-90),math.rad(70),0),.4+i)
  580. RW.C0 = clerp((RWF - Vector3.new(-.5,.5,-.5)) * CFrame.fromEulerAnglesXYZ(math.rad(-90),math.rad(-70),0),(RWF + Vector3.new(.5,1.4,0)) * CFrame.fromEulerAnglesXYZ(0,0,math.rad(-90)),.4+i)
  581. end
  582. RW.C0 = (RWF + Vector3.new(.5,1.4,0)) * CFrame.fromEulerAnglesXYZ(0,0,math.rad(-90))
  583. for i = 0,.6,.2 do
  584. swait()
  585. TC.C0 = clerp(TCF,TCF * CFrame.fromEulerAnglesXYZ(0,0,math.rad(90)),.4+i)
  586. HC.C0 = clerp(HCF,HCF * CFrame.fromEulerAnglesXYZ(0,0,math.rad(-90)),.4+i)
  587. end
  588. TC.C0 = TCF * CFrame.fromEulerAnglesXYZ(0,0,math.rad(90))
  589. HC.C0 = HCF * CFrame.fromEulerAnglesXYZ(0,0,math.rad(-90))
  590. swait(.1)
  591. for i = 0,.6,.2 do
  592. swait()
  593. TC.C0 = clerp(ITCF,TCF * CFrame.fromEulerAnglesXYZ(0,0,math.rad(90)),.6-i)
  594. HC.C0 = clerp(IHCF,HCF * CFrame.fromEulerAnglesXYZ(0,0,math.rad(-90)),.6-i)
  595. LW.C0 = clerp(ILWF,(LWF - Vector3.new(.5,-1.4,0)) * CFrame.fromEulerAnglesXYZ(0,0,math.rad(90)),.6-i)
  596. RW.C0 = clerp(IRWF,(RWF + Vector3.new(.5,1.4,0)) * CFrame.fromEulerAnglesXYZ(0,0,math.rad(-90)),.6-i)
  597. end
  598. punchactive = false
  599. RPunchT.Enabled = false
  600. SHamonSnd:Stop()
  601. combo = 3
  602. elseif combo == 3 then
  603. hum.WalkSpeed = 0
  604. AddLegWelds()
  605. for i = 0,.6,.2 do
  606. swait()
  607. TC.C0 = clerp(ITCF,TCF * CFrame.fromEulerAnglesXYZ(0,0,math.rad(-90)),.4+i)
  608. HC.C0 = clerp(IHCF,HCF,.4+i)
  609. LLW.C0 = clerp(LLWF,LLWF * CFrame.fromEulerAnglesXYZ(0,0,math.rad(-60)),.4+i)
  610. RLW.C0 = clerp(RLWF,RLWF*CFrame.fromEulerAnglesXYZ(0,0,math.rad(60)),.4+i)
  611. LW.C0 = clerp(ILWF,(LWF - Vector3.new(.5,-1.4,0)) * CFrame.fromEulerAnglesXYZ(0,0,math.rad(90)),.4+i)
  612. RW.C0 = clerp(IRWF,(RWF - Vector3.new(-.5,.5,-.5)) * CFrame.fromEulerAnglesXYZ(math.rad(-90),math.rad(-70),0),.4+i)
  613. end
  614. Swing2Snd:Play()
  615. kickactive = true
  616. LKickT.Enabled = true
  617. if maincol == "New Yeller" then
  618. SHamonSnd:Play()
  619. p4.Enabled = true
  620. end
  621. local bfos = Instance.new("BodyVelocity",chara.HumanoidRootPart)
  622. bfos.P = 10000
  623. bfos.MaxForce = Vector3.new(bfos.P,0,bfos.P)
  624. bfos.Velocity = chara.HumanoidRootPart.CFrame.lookVector * 200
  625. debby:AddItem(bfos,.1)
  626. for i = 0,.6,.1 do
  627. swait()
  628. TC.C0 = clerp(TCF * CFrame.fromEulerAnglesXYZ(0,0,math.rad(-100)),TCF * CFrame.fromEulerAnglesXYZ(math.rad(-60),0,math.rad(90)),.4+i)
  629. end
  630. TC.C0 = TCF * CFrame.fromEulerAnglesXYZ(math.rad(-60),0,math.rad(90))
  631. swait(.2)
  632. for i = 0,.6,.1 do
  633. swait()
  634. TC.C0 = clerp(ITCF,TCF * CFrame.fromEulerAnglesXYZ(math.rad(-60),0,math.rad(90)),.6-i)
  635. HC.C0 = clerp(IHCF,HCF,.6-i)
  636. LLW.C0 = clerp(LLWF,LLWF * CFrame.fromEulerAnglesXYZ(0,0,math.rad(-60)),.6-i)
  637. RLW.C0 = clerp(RLWF,RLWF*CFrame.fromEulerAnglesXYZ(0,0,math.rad(60)),.6-i)
  638. LW.C0 = clerp(ILWF,(LWF - Vector3.new(.5,-1.4,0)) * CFrame.fromEulerAnglesXYZ(0,0,math.rad(90)),.6-i)
  639. RW.C0 = clerp(IRWF,(RWF - Vector3.new(-.5,.5,-.5)) * CFrame.fromEulerAnglesXYZ(math.rad(-90),math.rad(-70),0),.6-i)
  640. end
  641. DestroyLegWelds()
  642. kickactive = false
  643. LKickT.Enabled = false
  644. p4.Enabled = false
  645. SHamonSnd:Stop()
  646. combo = 0
  647. end
  648. end
  649. res()
  650. hum.WalkSpeed = ws
  651. walking = false
  652. del = false
  653. end
  654. end
  655. if mouse then
  656. mouse.Button1Down:connect(onButton1Down)
  657. mouse.KeyDown:connect(onKeyDown)
  658. end
  659.  
  660. --Loop Function--
  661. walking = false
  662. toim = 0
  663. while true do
  664. swait()
  665. toim = toim + .1
  666. if del == false then attacking = false elseif del == true then attacking = true end
  667. if atkd == true then
  668. TC.C0 = TCF
  669. HC.C0 = HCF
  670. RW.C0 = RWF
  671. LW.C0 = LWF
  672. atkd = false
  673. end
  674. if atkdd == true then
  675. TC.C0 = ITCF
  676. HC.C0 = IHCF
  677. RW.C0 = IRWF
  678. LW.C0 = ILWF
  679. atkdd = false
  680. end
  681. torvel = (chara.HumanoidRootPart.Velocity*Vector3.new(1,0,1)).magnitude
  682. if torvel < 1 and walking == true and del == false and atkd == false and attacking == false then
  683. for i = 0,1,.25 do
  684. swait(.001)
  685. if del == false and attacking == false then
  686. TC.C0 = clerp(TCF,ITCF,i)
  687. HC.C0 = clerp(HCF * CFrame.fromEulerAnglesXYZ(math.rad(10),0,0),IHCF,i)
  688. RW.C0 = clerp((RWF - Vector3.new(-1,0,.7)) * CFrame.fromEulerAnglesXYZ(math.rad(45),0,math.rad(45)),IRWF,i)
  689. LW.C0 = clerp((LWF - Vector3.new(1,0,.7)) * CFrame.fromEulerAnglesXYZ(math.rad(45),0,math.rad(-45)),ILWF,i)
  690. end
  691. end
  692. walking = false
  693. elseif torvel > 1 and walking == false and del == false and atkd == false and attacking == false then
  694. for i = 0,1,.25 do
  695. swait(.001)
  696. if del == false and attacking == false then
  697. TC.C0 = clerp(ITCF,TCF,i)
  698. HC.C0 = clerp(IHCF,HCF * CFrame.fromEulerAnglesXYZ(math.rad(10),0,0),i)
  699. RW.C0 = clerp((RWF - Vector3.new(-1,0,.7)) * CFrame.fromEulerAnglesXYZ(math.rad(45),0,math.rad(45)),IRWF,1-i)
  700. LW.C0 = clerp((LWF - Vector3.new(1,0,.7)) * CFrame.fromEulerAnglesXYZ(math.rad(45),0,math.rad(-45)),ILWF,1-i)
  701. end
  702. end
  703. walking = true
  704. else
  705. end
  706. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement