Advertisement
DarkScriptZEditors

Untitled

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