Advertisement
Urban_IS

Hamon

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