Advertisement
lafur

Untitled

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