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