Advertisement
DarkScriptZEditors

Domino

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