Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- print("FE code by Starzozero, Thanks to him!")
- if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
- local Player,game,owner = owner,game
- local RealPlayer = Player
- do
- print("FE Compatibility code by Mokiros, Edited by StarzoZero")
- local rp = RealPlayer
- script.Parent = rp.Character
- --RemoteEvent for communicating
- local Event = Instance.new("RemoteEvent")
- Event.Name = "UserInput_Event"
- --Fake event to make stuff like Mouse.KeyDown work
- local function fakeEvent()
- local t = {_fakeEvent=true,Functions={},Connect=function(self,f)table.insert(self.Functions,f) end}
- t.connect = t.Connect
- return t
- end
- --Creating fake input objects with fake variables
- local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent(),Button2Up=fakeEvent(),Button2Down=fakeEvent()}
- local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
- local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
- CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
- end}
- --Merged 2 functions into one by checking amount of arguments
- CAS.UnbindAction = CAS.BindAction
- --This function will trigger the events that have been :Connect()'ed
- local function te(self,ev,...)
- local t = m[ev]
- if t and t._fakeEvent then
- for _,f in pairs(t.Functions) do
- f(...)
- end
- end
- end
- m.TrigEvent = te
- UIS.TrigEvent = te
- Event.OnServerEvent:Connect(function(plr,io)
- if plr~=rp then return end
- m.Target = io.Target
- m.Hit = io.Hit
- if not io.isMouse then
- local b = io.UserInputState == Enum.UserInputState.Begin
- if io.UserInputType == Enum.UserInputType.MouseButton1 then
- return m:TrigEvent(b and "Button1Down" or "Button1Up")
- end
- if io.UserInputType == Enum.UserInputType.MouseButton2 then
- return m:TrigEvent(b and "Button2Down" or "Button2Up")
- end
- for _,t in pairs(CAS.Actions) do
- for _,k in pairs(t.Keys) do
- if k==io.KeyCode then
- t.Function(t.Name,io.UserInputState,io)
- end
- end
- end
- m:TrigEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
- UIS:TrigEvent(b and "InputBegan" or "InputEnded",io,false)
- end
- end)
- Event.Parent = NLS([==[
- local Player = game:GetService("Players").LocalPlayer
- local Event = script:WaitForChild("UserInput_Event")
- local Mouse = Player:GetMouse()
- local UIS = game:GetService("UserInputService")
- local input = function(io,a)
- if a then return end
- --Since InputObject is a client-side instance, we create and pass table instead
- Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState,Hit=Mouse.Hit,Target=Mouse.Target})
- end
- UIS.InputBegan:Connect(input)
- UIS.InputEnded:Connect(input)
- local h,t
- --Give the server mouse data 30 times every second, but only if the values changed
- --If player is not moving their mouse, client won't fire events
- while wait(1/30) do
- if h~=Mouse.Hit or t~=Mouse.Target then
- h,t=Mouse.Hit,Mouse.Target
- Event:FireServer({isMouse=true,Target=t,Hit=h})
- end
- end]==],Player.Character)
- ----Sandboxed game object that allows the usage of client-side methods and services
- --Real game object
- local _rg = game
- --Metatable for fake service
- local fsmt = {
- __index = function(self,k)
- local s = rawget(self,"_RealService")
- if s then
- return typeof(s[k])=="function"
- and function(_,...)return s[k](s,...)end or s[k]
- end
- end,
- __newindex = function(self,k,v)
- local s = rawget(self,"_RealService")
- if s then s[k]=v end
- end
- }
- local function FakeService(t,RealService)
- t._RealService = typeof(RealService)=="string" and _rg:GetService(RealService) or RealService
- return setmetatable(t,fsmt)
- end
- --Fake game object
- local g = {
- GetService = function(self,s)
- return rawget(self,s) or _rg:GetService(s)
- end,
- Players = FakeService({
- LocalPlayer = FakeService({GetMouse=function(self)return m end},Player)
- },"Players"),
- UserInputService = FakeService(UIS,"UserInputService"),
- ContextActionService = FakeService(CAS,"ContextActionService"),
- RunService = FakeService({
- _btrs = {},
- RenderStepped = _rg:GetService("RunService").Heartbeat,
- BindToRenderStep = function(self,name,_,fun)
- self._btrs[name] = self.Heartbeat:Connect(fun)
- end,
- UnbindFromRenderStep = function(self,name)
- self._btrs[name]:Disconnect()
- end,
- },"RunService")
- }
- rawset(g.Players,"localPlayer",g.Players.LocalPlayer)
- g.service = g.GetService
- FakeService(g,game)
- --Changing owner to fake player object to support owner:GetMouse()
- game,owner = g,g.Players.LocalPlayer
- end
- --Jarred made this for Frisk a while ago
- --leak it and i'll rip your ass off while i cut your head
- tool = Instance.new("HopperBin",game.Players.LocalPlayer.Backpack)
- tool.Name="Dildo"
- local status = Instance.new("BoolValue", tool)
- local animframe = Instance.new("IntValue", status)
- local animtype = Instance.new("StringValue", status)
- local animweight = Instance.new("IntValue", status)
- local animcanbeinterrupted = Instance.new("BoolValue", status)
- status.Name = "Status"
- status.Value = true
- animframe.Name = "AnimFrame"
- animtype.Name = "AnimType"
- animtype.Value = "NOTHING AT ALL"
- animweight.Name = "AnimWeight"
- animcanbeinterrupted.Name = "AnimCanBeInterrupted"
- animcanbeinterrupted.Value = true
- New = function(Object, Parent, Name, Data)
- local Object = Instance.new(Object)
- for Index, Value in pairs(Data or {}) do
- Object[Index] = Value
- end
- Object.Parent = Parent
- Object.Name = Name
- return Object
- end
- Weapon = New("Model",nil,"Weapon",{})
- Part = New("Part",Weapon,"Part",{BrickColor = BrickColor.new("Black"),Material = Enum.Material.SmoothPlastic,Shape = Enum.PartType.Ball,Size = Vector3.new(0.25999999, 0.25999999, 0.25999999),CFrame = CFrame.new(-6.07590628, 2.69000244, 10.4602642, 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(0.105882, 0.164706, 0.207843),})
- Part = New("Part",Weapon,"Part",{BrickColor = BrickColor.new("Cashmere"),Material = Enum.Material.SmoothPlastic,Shape = Enum.PartType.Ball,Size = Vector3.new(0.480000079, 0.480000079, 0.480000079),CFrame = CFrame.new(-6.07590628, 4.72000122, 10.4602623, 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(0.827451, 0.745098, 0.588235),})
- Part = New("Part",Weapon,"Part",{BrickColor = BrickColor.new("Cashmere"),Material = Enum.Material.SmoothPlastic,Shape = Enum.PartType.Ball,Size = Vector3.new(0.880000174, 0.880000174, 0.880000174),CFrame = CFrame.new(-6.40303469, 5.05891132, 10.8883619, 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(0.827451, 0.745098, 0.588235),})
- Part = New("Part",Weapon,"Part",{BrickColor = BrickColor.new("Cashmere"),Material = Enum.Material.SmoothPlastic,Shape = Enum.PartType.Ball,Size = Vector3.new(0.880000174, 0.880000174, 0.880000174),CFrame = CFrame.new(-5.76301908, 5.05891132, 10.8883619, 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(0.827451, 0.745098, 0.588235),})
- Handle = New("Part",Weapon,"Handle",{BrickColor = BrickColor.new("Black"),Material = Enum.Material.SmoothPlastic,Size = Vector3.new(0.25, 2.03000021, 0.310000002),CFrame = CFrame.new(-6.07538939, 3.68499947, 10.4633636, 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(0.105882, 0.164706, 0.207843),})
- Mesh = New("CylinderMesh",Handle,"Mesh",{})
- Part = New("Part",Weapon,"Part",{BrickColor = BrickColor.new("Cashmere"),Material = Enum.Material.SmoothPlastic,Size = Vector3.new(0.519999981, 6.08999968, 0.5),CFrame = CFrame.new(-6.07038641, 7.75500154, 10.4583607, 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(0.827451, 0.745098, 0.588235),})
- Mesh = New("CylinderMesh",Part,"Mesh",{})
- Spike_Mesh = New("Part",Weapon,"Spike Mesh",{BrickColor = BrickColor.new("Pink"),Material = Enum.Material.SmoothPlastic,Shape = Enum.PartType.Ball,Size = Vector3.new(0.560000062, 0.560000062, 0.560000062),CFrame = CFrame.new(-6.07590628, 10.8900023, 10.4602623, 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.4, 0.8),})
- function stick(x, y)
- local weld = Instance.new("Weld")
- weld.Part0 = x
- weld.Part1 = y
- local HitPos = x.Position
- local CJ = CFrame.new(HitPos)
- local C0 = x.CFrame:inverse() *CJ
- local C1 = y.CFrame:inverse() * CJ
- weld.C0 = C0
- weld.C1 = C1
- weld.Parent = x
- end
- list = Weapon:GetChildren()
- for x = 1, #list do
- if list[x].className == "Part" then
- stick(Weapon.Handle, list[x])
- end
- end
- vPlayer=game.Players.LocalPlayer
- char = vPlayer.Character
- tor = char.Torso
- mouse=vPlayer:GetMouse()
- regroup=false
- pi=math.pi
- rad=math.rad
- cf=CFrame.new
- ca=CFrame.Angles
- mo=Instance.new("Model",tor)
- mo.Name="Boobs"
- function cp(parent,color,size,transparency,anchored,cancollide)
- local newp=Instance.new("Part",parent)
- newp.TopSurface='Smooth'
- newp.BottomSurface='Smooth'
- newp.FormFactor="Custom"
- newp.BrickColor=BrickColor.new(color)
- newp.Size=size
- newp.Anchored=anchored
- newp.CanCollide=cancollide
- newp.Transparency=transparency
- newp.Material="SmoothPlastic"
- newp:BreakJoints()
- return newp
- end
- function weld(p0,p1,c0)
- local w=Instance.new("Weld",p0)w.Part0=p0
- w.Part1=p1 w.C1=c0
- return w
- end
- cm = function(par,num,x,y,z)
- local msh = 0
- if num == 1 then msh = Instance.new("CylinderMesh",par)
- elseif num == 2 then msh = Instance.new("SpecialMesh",par) msh.MeshType = 3
- elseif num == 3 then msh = Instance.new("BlockMesh",par)
- elseif type(num) == 'string' then msh = Instance.new("SpecialMesh",par) msh.MeshId = num
- end
- msh.Scale=Vector3.new(x,y,z)
- return msh
- end
- Tween = function(Weld, Stop, Step,a)
- ypcall(function()local func = function()
- local Start = Weld.C1 local X1, Y1, Z1 = Start:toEulerAnglesXYZ()
- local Stop = Stop local X2, Y2, Z2 = Stop:toEulerAnglesXYZ()
- Spawn(function()
- for i = 0, 1, Step or .1 do wait()
- Weld.C1 = cf( (Start.p.X * (1 - i)) + (Stop.p.X * i),(Start.p.Y * (1 - i)) + (Stop.p.Y * i),(Start.p.Z * (1 - i)) + (Stop.p.Z * i)) * ca((X1 * (1 - i)) + (X2 * i), (Y1 * (1 - i)) + (Y2 * i),(Z1 * (1 - i)) + (Z2 * i) )
- end
- Weld.C1 = Stop
- end)
- end
- if a then
- coroutine.wrap(func)()
- else func()
- end
- end)
- end
- function jiggle()
- Tween(b1w,cf(.46,.5+.2,-.5-.2)*ca(rad(70),0,0),.1)
- Tween(b2w,cf(-.46,.5+.2,-.5-.2)*ca(rad(70),0,0),.1)
- wait(.3)
- Tween(b1w,cf(.46,.5,-.5)*ca(-rad(5),0,0),.1)
- Tween(b2w,cf(-.46,.5,-.5)*ca(-rad(5),0,0),.1)
- wait(.3)
- Tween(b1w,cf(.46,.5+.1,-.5-.1)*ca(rad(30),0,0),.1)
- Tween(b2w,cf(-.46,.5+.1,-.5-.1)*ca(rad(30),0,0),.1)
- wait(.3)
- Tween(b1w,cf(.46,.5,-.5)*ca(0,0,0),.1)
- Tween(b2w,cf(-.46,.5,-.5)*ca(0,0,0),.1)
- wait(.3)
- end
- function jiggle2()
- Tween(b1w,cf(.46,.5+.2,-.5-.2)*ca(rad(20),0,0),.1)
- Tween(b2w,cf(-.46,.5+.2,-.5-.2)*ca(rad(20),0,0),.1)
- wait(.3)
- Tween(b1w,cf(.46,.5,-.5)*ca(0,0,0),.1)
- Tween(b2w,cf(-.46,.5,-.5)*ca(0,0,0),.1)
- wait(.3)
- end
- function jiggle3()
- Tween(b1w,cf(.46,.5+.2,-.5-.2)*ca(rad(20),0,0),.1)
- Tween(b2w,cf(-.46,.5,-.5)*ca(0,0,0),.1)
- wait(.3)
- Tween(b1w,cf(.46,.5,-.5)*ca(0,0,0),.1)
- Tween(b2w,cf(-.46,.5+.2,-.5-.2)*ca(rad(20),0,0),.1)
- wait(.3)
- end
- b1=cp(mo,tor.BrickColor.Color,Vector3.new(1,1,1),0,false,false)
- cm(b1,2,1,1,1.1)
- b1w=weld(b1,tor,cf(.46,.5,-.5))
- b2=cp(mo,tor.BrickColor.Color,Vector3.new(1,1,1),0,false,false)
- cm(b2,2,1,1,1.1)
- b2w=weld(b2,tor,cf(-.46,.5,-.5))
- p=cp(mo,char.Head.BrickColor.Color,Vector3.new(1,1,1),0,false,false)
- cm(p,2,.6,.6,.6)
- weld(p,b1,cf(-0.2,0.2,0))
- p=cp(mo,char.Head.BrickColor.Color,Vector3.new(1,1,1),0,false,false)
- cm(p,2,.6,.6,.6)
- weld(p,b2,cf(0.2,0.2,0))
- p=cp(mo,char.Head.BrickColor.Color,Vector3.new(.1,.1,.1),0,false,false)
- weld(p,tor,cf(0,.9,-0.401))
- mouse.KeyDown:connect(function(k)
- if string.byte(k) == 48 then
- char.Humanoid.WalkSpeed = 25
- end
- end)
- mouse.KeyUp:connect(function(k)
- if string.byte(k) == 48 then
- char.Humanoid.WalkSpeed = 16
- regroup=true
- end
- end)
- spawn(function()
- while wait() do
- if regroup==true then
- Tween(b1w,cf(.46,.5,-.5)*ca(0,0,0),.1)
- Tween(b2w,cf(-.46,.5,-.5)*ca(0,0,0),.1)
- wait(.3)
- regroup=false
- end
- if char.Humanoid.jump==true then
- wait(.1)
- jiggle()
- elseif Vector3.new(tor.Velocity.x, 0, tor.Velocity.z).magnitude > 2 then
- if char.Humanoid.WalkSpeed==16 then
- jiggle2()
- else
- jiggle3()
- end
- end
- end
- end)
- mo.Parent=nil
- RightShoulder=nil
- LeftShoulder=nil
- RightHip=nil
- LeftHip=nil
- Neck=nil
- RootJoint=nil
- RightShoulderC0=CFrame.new(1, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
- RightShoulderC1=CFrame.new(-0.5, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
- LeftShoulderC0=CFrame.new(-1, 0.5, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
- LeftShoulderC1=CFrame.new(0.5, 0.5, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
- RightHipC0=CFrame.new(1, -1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
- RightHipC1=CFrame.new(0.5, 1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
- LeftHipC0=CFrame.new(-1, -1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
- LeftHipC1=CFrame.new(-0.5, 1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
- NeckC0=CFrame.new(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
- NeckC1=CFrame.new(0, -0.5, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
- RootJointC0=CFrame.new(0, 0, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
- RootJointC1=CFrame.new(0, 0, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
- Grip=nil
- GripC0=CFrame.new(0,-.85,0)*CFrame.fromEulerAnglesXYZ(-math.pi/2,math.pi/2,0)
- TrackFunction=nil
- PlayerAnimationScript=nil
- equipdebounce=true
- PlayerCanJump = true
- StickDir=5
- StickPos=5
- PlayerCombatKeys={}
- radiushelp = 0
- InfoGui=nil
- SoundTable={["Airdash"] = "153092348",
- ["BarrierHit"] = "153092205",
- ["Grapple"] = "153092304",
- ["Hit_Damage_Heavycut"] = "153092274",
- ["Hit_Damage_Heavydelaysmack"] = "153092217",
- ["Hit_Damage_Heavysmack"] = "153092227",
- ["Hit_Damage_Lightcut"] = "153092285",
- ["Hit_Damage_Lightsmack"] = "153092249",
- ["Hit_Damage_Mediumcut"] = "153092292",
- ["Hit_Damage_Medsmack"] = "153092238",
- ["Hit_Damage_Medsmack_Alt"] = "153092213",
- ["Hit_Damage_Tinycut"] = "153092296",
- ["Overdrive_Begin"] = "153092315",
- ["Overdrive_End"] = "153092334",
- ["none"]="",
- }
- BodyVel=Instance.new("BodyVelocity")
- BodyVel.Name="HumanoidMover"
- BodyVel.P=2000
- BodyVel.maxForce=Vector3.new(4800000,0,4800000)
- BodyVel.Parent=nil
- BodyGyro=Instance.new("BodyGyro")
- BodyGyro.P=13000
- BodyGyro.maxTorque=Vector3.new(1850000,1850000,1850000)
- BodyGyro.D=200
- CanAttack=true
- PlayerInputs={}
- PlayerInputCullThreshold=30
- PlayerInputAgeCullFactor=30
- PlayerInputStringFrame=.7
- CurrentCameraState="3D"
- CanChangeCameraState=false
- CameraResetTime=180
- PlayerFacing="Right"
- DesiredPlayerFacing="Right"
- CameraPlane=CFrame.new(0,0,0)
- CameraOutDir=Vector3.new(0,0,0)
- FirstTick=false
- DesiredWalkspeed=16
- TwoDInputs={}
- setlastnormal=function(key)
- lastnormal=key
- coroutine.resume(coroutine.create(function(k,kt)
- while k == lastnormal do
- if kt + 1.2 < tick() then
- break
- end
- wait()
- end
- lastnormal=""
- --print("Done")
- end),lastnormal,tick())
- end
- CameraPlane = function()
- local buttspoop = (workspace.CurrentCamera.CoordinateFrame.p - (workspace.CurrentCamera.CoordinateFrame*CFrame.new(0,0,5)).p).unit
- return Vector3.new(buttspoop.x,0,buttspoop.z).unit
- end
- InputNormals={}
- LastGrunt=time()
- InputNormals["Z"]=function()
- if CurrentAnimation==Animations["Z"] and tool.Status.AnimCanBeInterrupted.Value==false then return end
- RequestAnimationChange("Z",0)
- if CurrentAnimation~=Animations["Z"] then return end
- if TrackFunction~=nil then
- TrackFunction:disconnect()
- TrackFunction=nil
- end
- CanInterrupt(false)
- PlayerIsAttacking=true
- local rawframes=0
- tool.Status.AnimFrame.Value=0
- local DidHit=false
- local CPlane=CameraPlane()
- vPlayer.Character.HumanoidRootPart.CFrame=CFrame.new(vPlayer.Character.HumanoidRootPart.Position,vPlayer.Character.HumanoidRootPart.Position + CPlane * 50)
- local cl = 0
- local clastframe = lastframe
- TrackFunction=game:GetService("RunService").Heartbeat:connect(function()
- BodyVel.Parent=vPlayer.Character.HumanoidRootPart
- BodyGyro.Parent=vPlayer.Character.HumanoidRootPart
- BodyGyro.cframe=CFrame.new(BodyGyro.Parent.Position,BodyGyro.Parent.Position + CPlane * 50)
- if rawframes==0 then
- BodyGyro.Parent.CFrame=BodyGyro.cframe
- end
- if rawframes <= 7 then
- LerpWelds(clastframe,rawframes/7,Animations["Z"]["Animation"](0))
- elseif rawframes > 7 and rawframes <= 14 then
- if rawframes == 8 then
- p=Instance.new("Sound",vPlayer.Character.Weapon.Handle)
- p.Volume=1
- p.Pitch=1
- p.SoundId="http://www.roblox.com/asset/?id=231917961"
- wait()
- p:Play()
- game:GetService("Debris"):AddItem(p,3)
- end
- cl = cl + (rawframes-7) * .042
- LerpWelds({Animations["Z"]["Animation"](0)},cl,Animations["Z"]["Animation"](1))
- elseif rawframes > 14 and rawframes <= 21 then --overlerp
- local ccl = cl - 1
- LerpWelds({Animations["Z"]["Animation"](0)},1 + ccl - ccl/6*(rawframes-15),Animations["Z"]["Animation"](1))
- elseif rawframes > 22 then
- --print((rawframes-22)/7)
- LerpWelds({Animations["Z"]["Animation"](1)},(rawframes-22)/7,Animations["Stand"]["Animation"](0))
- end
- if rawframes >= 6 and rawframes <= 9 then
- BodyVel.velocity=CPlane*(rawframes)
- else
- BodyVel.velocity=BodyVel.velocity/1.1
- end
- if rawframes >= 9 and rawframes <= 14 then
- for _,v in pairs(GetNubsInRadius(vPlayer.Character.Weapon["Spike Mesh"].Position - CPlane * 2,3.5)) do
- applyDamage(v,16 + math.random(-2,2),CPlane*25,false,false,nil,.2,1)
- applyCameraShake(v,180,5)
- if DidHit==false then
- local s = Instance.new("Sound",v:FindFirstChild("Torso"))
- s.Volume=1
- s.SoundId="http://www.roblox.com/asset/?id=191395561"
- wait()
- s:Play()
- game:GetService("Debris"):AddItem(s,2)
- end
- DidHit=true
- end
- for _,v in pairs(GetNubsInRadius(vPlayer.Character.Weapon["Handle"].Position - CPlane * 1,3)) do
- applyDamage(v,8 + math.random(-2,2),CPlane*35,false,false,nil,.2,1)
- applyCameraShake(v,180,5)
- if DidHit==false then
- local s = Instance.new("Sound",v:FindFirstChild("Torso"))
- s.Volume=1
- s.SoundId="http://www.roblox.com/asset/?id=153092227"
- wait()
- s:Play()
- game:GetService("Debris"):AddItem(s,2)
- end
- DidHit=true
- end
- end
- if rawframes==22 then
- CanInterrupt(true)
- setlastnormal("Z")
- --print("JORJ")
- end
- if rawframes == 28 then
- TrackFunction:disconnect()
- TrackFunction=nil
- DesiredWalkspeed=18
- PlayerIsAttacking=false
- CanInterrupt(true)
- setlastnormal("")
- Stand()
- end
- rawframes=rawframes+1
- end)
- end
- InputNormals["ZZ"]=function()
- --print("8)")
- if CurrentAnimation==Animations["ZZ"] and tool.Status.AnimCanBeInterrupted.Value==false then return end
- RequestAnimationChange("ZZ",0)
- if CurrentAnimation~=Animations["ZZ"] then return end
- --print("WEEOOB")
- if TrackFunction~=nil then
- TrackFunction:disconnect()
- TrackFunction=nil
- end
- --print("GOE")
- CanInterrupt(false)
- PlayerIsAttacking=true
- local rawframes=0
- tool.Status.AnimFrame.Value=0
- local DidHit=false
- local CPlane=CameraPlane()
- vPlayer.Character.HumanoidRootPart.CFrame=CFrame.new(vPlayer.Character.HumanoidRootPart.Position,vPlayer.Character.HumanoidRootPart.Position + CPlane * 50)
- local cl = 0
- local clastframe = lastframe
- TrackFunction=game:GetService("RunService").Heartbeat:connect(function()
- BodyVel.Parent=vPlayer.Character.HumanoidRootPart
- BodyGyro.Parent=vPlayer.Character.HumanoidRootPart
- BodyGyro.cframe=CFrame.new(BodyGyro.Parent.Position,BodyGyro.Parent.Position + CPlane * 50)
- if rawframes==0 then
- BodyGyro.Parent.CFrame=BodyGyro.cframe
- end
- if rawframes <= 7 then
- LerpWelds(clastframe,rawframes/7,Animations["ZZ"]["Animation"](0))
- elseif rawframes > 7 and rawframes <= 14 then
- if rawframes == 8 then
- p=Instance.new("Sound",vPlayer.Character.Weapon.Handle)
- p.Volume=1
- p.Pitch=.9
- p.SoundId="http://www.roblox.com/asset/?id=231917950"
- wait()
- p:Play()
- game:GetService("Debris"):AddItem(p,3)
- end
- cl = cl + (rawframes-7) * .037
- LerpWelds({Animations["ZZ"]["Animation"](0)},cl,Animations["ZZ"]["Animation"](1))
- elseif rawframes > 14 and rawframes <= 21 then --overlerp
- local ccl = cl - 1
- LerpWelds({Animations["ZZ"]["Animation"](0)},1 + ccl - ccl/6*(rawframes-15),Animations["ZZ"]["Animation"](1))
- elseif rawframes > 22 then
- --print((rawframes-22)/7)
- LerpWelds({Animations["ZZ"]["Animation"](1)},(rawframes-22)/7,Animations["Stand"]["Animation"](0))
- end
- if rawframes >= 3 and rawframes <= 6 then
- BodyVel.velocity=CPlane*(rawframes*3)
- else
- BodyVel.velocity=BodyVel.velocity/1.2
- end
- if rawframes >= 9 and rawframes <= 14 then
- for _,v in pairs(GetNubsInRadius(vPlayer.Character.Weapon["Spike Mesh"].Position,5)) do
- applyDamage(v,20 + math.random(-2,2),CPlane*35,false,false,nil,.2,1)
- applyCameraShake(v,180,5)
- if DidHit==false then
- local s = Instance.new("Sound",v:FindFirstChild("Torso"))
- s.Volume=1
- s.Pitch=1.05
- s.SoundId="http://www.roblox.com/asset/?id=191395561"
- wait()
- s:Play()
- game:GetService("Debris"):AddItem(s,2)
- end
- DidHit=true
- end
- for _,v in pairs(GetNubsInRadius(vPlayer.Character.Weapon["Handle"].Position - CPlane * 1,3)) do
- applyDamage(v,12 + math.random(-2,2),CPlane*55,false,false,nil,.2,1)
- applyCameraShake(v,180,5)
- if DidHit==false then
- local s = Instance.new("Sound",v:FindFirstChild("Torso"))
- s.Volume=1
- s.SoundId="http://www.roblox.com/asset/?id=153092227"
- wait()
- s:Play()
- game:GetService("Debris"):AddItem(s,2)
- end
- DidHit=true
- end
- end
- if rawframes==21 then
- CanInterrupt(true)
- setlastnormal("ZZ")
- --print("JORJ")
- end
- if rawframes == 28 then
- TrackFunction:disconnect()
- TrackFunction=nil
- DesiredWalkspeed=18
- PlayerIsAttacking=false
- CanInterrupt(true)
- setlastnormal("")
- Stand()
- end
- rawframes=rawframes+1
- end)
- end
- InputNormals["ZZZ"]=function()
- --print("8)")
- if CurrentAnimation==Animations["ZZZ"] and tool.Status.AnimCanBeInterrupted.Value==false then return end
- RequestAnimationChange("ZZZ",0)
- if CurrentAnimation~=Animations["ZZZ"] then return end
- --print("WEEOOB")
- if TrackFunction~=nil then
- TrackFunction:disconnect()
- TrackFunction=nil
- end
- --print("GOE")
- CanInterrupt(false)
- PlayerIsAttacking=true
- local rawframes=0
- tool.Status.AnimFrame.Value=0
- local DidHit=false
- local CPlane=CameraPlane()
- vPlayer.Character.HumanoidRootPart.CFrame=CFrame.new(vPlayer.Character.HumanoidRootPart.Position,vPlayer.Character.HumanoidRootPart.Position + CPlane * 50)
- local cl = 0
- local clastframe = lastframe
- TrackFunction=game:GetService("RunService").Heartbeat:connect(function()
- BodyVel.Parent=vPlayer.Character.HumanoidRootPart
- BodyGyro.Parent=vPlayer.Character.HumanoidRootPart
- BodyGyro.cframe=CFrame.new(BodyGyro.Parent.Position,BodyGyro.Parent.Position + CPlane * 50)
- if rawframes==0 then
- BodyGyro.Parent.CFrame=BodyGyro.cframe
- end
- if rawframes <= 5 then
- LerpWelds(clastframe,rawframes/5,Animations["ZZZ"]["Animation"](0))
- if rawframes == 3 then
- p=Instance.new("Sound",vPlayer.Character.Weapon.Handle)
- p.Volume=1
- p.Pitch=1
- p.SoundId="http://www.roblox.com/asset/?id=231917977"
- wait()
- p:Play()
- game:GetService("Debris"):AddItem(p,3)
- --http://www.roblox.com/SFX-Specialsetup-01-item?id=231917977
- end
- elseif rawframes > 5 and rawframes <= 10 then
- --print((rawframes - 5)/5)
- LerpWelds({Animations["ZZZ"]["Animation"](0)},(rawframes - 5)/5,Animations["ZZZ"]["Animation"](1))
- elseif rawframes > 13 then
- LerpWelds({Animations["ZZZ"]["Animation"](1)},(rawframes-13)/9,Animations["Stand"]["Animation"](0))
- end
- if rawframes >= 2 and rawframes < 6 and DidHit==false then
- BodyVel.velocity=CPlane*(rawframes*14)
- else
- BodyVel.velocity=BodyVel.velocity/1.2
- if DidHit then
- BodyVel.velocity=BodyVel.velocity/1.2
- end
- end
- if rawframes >= 6 and rawframes <= 11 then
- for _,v in pairs(GetNubsInRadius(vPlayer.Character.Torso.Position + CPlane * 1,4)) do
- applyDamage(v,12 + math.random(-2,2),CPlane*20,false,false,nil,.2,1)
- applyCameraShake(v,100,3)
- if DidHit==false then
- local s = Instance.new("Sound",v:FindFirstChild("Torso"))
- s.Volume=1
- s.Pitch=1.05
- s.SoundId="http://www.roblox.com/asset/?id=153092213"
- wait()
- s:Play()
- game:GetService("Debris"):AddItem(s,2)
- end
- DidHit=true
- end
- end
- if rawframes==16 then
- CanInterrupt(true)
- setlastnormal("ZZZ")
- --print("JORJ")
- end
- if rawframes == 20 then
- TrackFunction:disconnect()
- TrackFunction=nil
- DesiredWalkspeed=18
- PlayerIsAttacking=false
- CanInterrupt(true)
- setlastnormal("")
- Stand()
- end
- rawframes=rawframes+1
- end)
- end
- InputNormals["ZZZZ"]=function()
- --print("8)")
- if CurrentAnimation==Animations["ZZZZ"] and tool.Status.AnimCanBeInterrupted.Value==false then return end
- RequestAnimationChange("ZZZZ",0)
- if CurrentAnimation~=Animations["ZZZZ"] then return end
- --print("WEEOOB")
- if TrackFunction~=nil then
- TrackFunction:disconnect()
- TrackFunction=nil
- end
- --print("GOE")
- CanInterrupt(false)
- PlayerIsAttacking=true
- local rawframes=0
- tool.Status.AnimFrame.Value=0
- local DidHit=false
- local CPlane=CameraPlane()
- vPlayer.Character.HumanoidRootPart.CFrame=CFrame.new(vPlayer.Character.HumanoidRootPart.Position,vPlayer.Character.HumanoidRootPart.Position + CPlane * 50)
- local cl = 0
- local clastframe = lastframe
- TrackFunction=game:GetService("RunService").Heartbeat:connect(function()
- BodyVel.Parent=vPlayer.Character.HumanoidRootPart
- BodyGyro.Parent=vPlayer.Character.HumanoidRootPart
- BodyGyro.cframe=CFrame.new(BodyGyro.Parent.Position,BodyGyro.Parent.Position + CPlane * 50)
- if rawframes==0 then
- BodyGyro.Parent.CFrame=BodyGyro.cframe
- end
- if rawframes <= 5 then
- LerpWelds(clastframe,rawframes/5,Animations["ZZZZ"]["Animation"](0))
- elseif rawframes > 5 and rawframes <= 10 then
- if rawframes == 6 then
- p=Instance.new("Sound",vPlayer.Character.Weapon.Handle)
- p.Volume=1
- p.Pitch=1.4
- p.SoundId="http://www.roblox.com/asset/?id=231917987"
- wait()
- p:Play()
- game:GetService("Debris"):AddItem(p,3)
- end
- --print((rawframes - 5)/5)
- LerpWelds({Animations["ZZZZ"]["Animation"](0)},(rawframes - 5)/5,Animations["ZZZZ"]["Animation"](1))
- elseif rawframes > 13 then
- LerpWelds({Animations["ZZZZ"]["Animation"](1)},(rawframes-13)/9,Animations["Stand"]["Animation"](0))
- end
- if rawframes >= 5 and rawframes < 7 and DidHit==false then
- BodyVel.velocity=CPlane*(rawframes*9)
- else
- BodyVel.velocity=BodyVel.velocity/1.2
- if DidHit then
- BodyVel.velocity=BodyVel.velocity/1.2
- end
- end
- if rawframes >= 6 and rawframes <= 11 then
- for _,v in pairs(GetNubsInRadius(vPlayer.Character.Torso.Position + CPlane * 4,4)) do
- applyDamage(v,18 + math.random(-2,2),CPlane*20,false,false,nil,.2,1)
- applyCameraShake(v,150,3)
- if DidHit==false then
- local s = Instance.new("Sound",v:FindFirstChild("Torso"))
- s.Volume=1
- s.Pitch=1
- s.SoundId="http://www.roblox.com/asset/?id=153092274"
- wait()
- s:Play()
- game:GetService("Debris"):AddItem(s,2)
- end
- DidHit=true
- end
- end
- if rawframes==13 then
- CanInterrupt(true)
- setlastnormal("ZZZZ")
- --print("JORJ")
- end
- if rawframes == 20 then
- TrackFunction:disconnect()
- TrackFunction=nil
- DesiredWalkspeed=18
- PlayerIsAttacking=false
- CanInterrupt(true)
- setlastnormal("")
- Stand()
- end
- rawframes=rawframes+1
- end)
- end
- InputNormals["ZZZZZ"]=function()
- if CurrentAnimation==Animations["ZZZZZ"] and tool.Status.AnimCanBeInterrupted.Value==false then return end
- RequestAnimationChange("ZZZZZ",0)
- if CurrentAnimation~=Animations["ZZZZZ"] then return end
- if TrackFunction~=nil then
- TrackFunction:disconnect()
- TrackFunction=nil
- end
- CanInterrupt(false)
- PlayerIsAttacking=true
- local rawframes=0
- tool.Status.AnimFrame.Value=0
- local DidHit=false
- local CPlane=CameraPlane()
- vPlayer.Character.HumanoidRootPart.CFrame=CFrame.new(vPlayer.Character.HumanoidRootPart.Position,vPlayer.Character.HumanoidRootPart.Position + CPlane * 50)
- local cl = 0
- local clastframe = lastframe
- TrackFunction=game:GetService("RunService").Heartbeat:connect(function()
- BodyVel.Parent=vPlayer.Character.HumanoidRootPart
- BodyGyro.Parent=vPlayer.Character.HumanoidRootPart
- BodyGyro.cframe=CFrame.new(BodyGyro.Parent.Position,BodyGyro.Parent.Position + CPlane * 50)
- if rawframes==0 then
- BodyGyro.Parent.CFrame=BodyGyro.cframe
- end
- if rawframes <= 3 then
- LerpWelds(clastframe,rawframes/3,Animations["ZZZZZ"]["Animation"](0))
- elseif rawframes > 3 and rawframes <= 9 then
- if rawframes == 4 then
- p=Instance.new("Sound",vPlayer.Character.Weapon.Handle)
- p.Volume=1
- p.Pitch=1
- p.SoundId="http://www.roblox.com/asset/?id=231917961"
- wait()
- p:Play()
- game:GetService("Debris"):AddItem(p,3)
- end
- cl = cl + (rawframes-3) * .07
- --print(cl,1)
- LerpWelds({Animations["ZZZZZ"]["Animation"](0)},cl,Animations["ZZZZZ"]["Animation"](1))
- elseif rawframes > 9 and rawframes <= 17 then --overlerp
- local ccl = cl - 1
- --print(1 + ccl - ccl/6*(rawframes-9),2)
- LerpWelds({Animations["ZZZZZ"]["Animation"](0)},1 + ccl - ccl/6*(rawframes-10),Animations["ZZZZZ"]["Animation"](1))
- elseif rawframes > 17 then
- --print((rawframes-17)/10,3)
- LerpWelds({Animations["ZZZZZ"]["Animation"](1)},(rawframes-18)/10,Animations["Stand"]["Animation"](0))
- end
- if rawframes >= 6 and rawframes <= 9 then
- BodyVel.velocity=CPlane*(rawframes)
- else
- BodyVel.velocity=BodyVel.velocity/1.1
- end
- if rawframes >= 5 and rawframes <= 7 then
- for _,v in pairs(GetNubsInRadius(vPlayer.Character.Weapon["Spike Mesh"].Position,4)) do
- applyDamage(v,14 + math.random(-2,2),CPlane*10 + Vector3.new(0,55,0),true,false,nil,.2,1)
- applyCameraShake(v,220,5)
- if DidHit==false then
- local s = Instance.new("Sound",v:FindFirstChild("Torso"))
- s.Volume=1
- s.SoundId="http://www.roblox.com/asset/?id=191395579"
- wait()
- s:Play()
- game:GetService("Debris"):AddItem(s,2)
- end
- DidHit=true
- end
- for _,v in pairs(GetNubsInRadius(vPlayer.Character.Weapon["Handle"].Position - CPlane * 1,3)) do
- applyDamage(v,6 + math.random(-2,2),CPlane*35,false,false,nil,.2,1)
- applyCameraShake(v,220,5)
- if DidHit==false then
- local s = Instance.new("Sound",v:FindFirstChild("Torso"))
- s.Volume=1
- s.SoundId="http://www.roblox.com/asset/?id=153092227"
- wait()
- s:Play()
- game:GetService("Debris"):AddItem(s,2)
- end
- DidHit=true
- end
- end
- if rawframes==18 then
- CanInterrupt(true)
- setlastnormal("")
- --print("JORJ")
- end
- if rawframes == 26 then
- TrackFunction:disconnect()
- TrackFunction=nil
- DesiredWalkspeed=18
- PlayerIsAttacking=false
- CanInterrupt(true)
- setlastnormal("")
- Stand()
- end
- rawframes=rawframes+1
- end)
- end
- GetNubs=function()
- scrubs={}
- for _,v in pairs(game.Workspace:children()) do
- if v:FindFirstChild("Humanoid")~=nil and v:FindFirstChild("Torso")~=nil and v.Name~=game.Players.LocalPlayer.Name then
- table.insert(scrubs,v)
- end
- end
- return scrubs
- end
- GetNubsInRadius=function(pos,radius)
- radius=radius+radiushelp
- scrubs=GetNubs()
- filtered={}
- for _,v in pairs(scrubs) do
- if v:FindFirstChild("Torso")~=nil then
- if (v.Torso.Position-pos).magnitude<=radius then
- table.insert(filtered,v)
- end
- end
- end
- return filtered
- end
- noy=function(pos)
- return Vector3.new(pos.x,0,pos.z)
- end
- applyCameraShake=function(Noob,Intens,Time)
- end
- applyHitEffect=function(Noob,Level,CutBlunt)
- t=Noob:FindFirstChild("Torso")
- if Level==nil then Level=0 end
- if t~=nil then
- if CutBlunt=="Blunt" then
- p=Instance.new("Part")
- p.Name="HITEFFECT"
- p.CanCollide=false
- p.TopSurface=0
- p.BottomSurface=0
- p.BrickColor=BrickColor.new("Institutional white")
- p.Anchored=true
- p.CFrame=t.CFrame + Vector3.new(math.random(-15,15)/10,math.random(-15,15)/10,math.random(-15,15)/10)
- p.formFactor="Symmetric"
- p.Size=Vector3.new(1,1,1)
- p.Parent=t.Parent
- m=Instance.new("SpecialMesh")
- m.MeshType="Sphere"
- m.Parent=p
- game:GetService("Debris"):AddItem(p,5)
- coroutine.resume(coroutine.create(function(p,l)
- for i=1, 9 do
- p.Transparency=.5+i/18
- p.Mesh.Scale=p.Mesh.Scale+Vector3.new(.6+l,.6+l,.6+l)
- wait(.031)
- end
- p:Remove() end),p,(Level-1)/4)
- end
- p=Instance.new("Part")
- p.Name="HITEFFECT"
- p.CanCollide=false
- p.TopSurface=0
- p.BottomSurface=0
- p.BrickColor=BrickColor.new("Institutional white")
- p.Anchored=true
- p.CFrame=t.CFrame
- p.formFactor="Symmetric"
- p.Size=Vector3.new(1,1,1)
- p.Parent=t.Parent
- m=Instance.new("SpecialMesh")
- m.MeshType="Sphere"
- m.Parent=p
- game:GetService("Debris"):AddItem(p,5)
- coroutine.resume(coroutine.create(function(p)
- for i=1, 8 do
- p.Transparency=i/8
- p.Mesh.Scale=p.Mesh.Scale+Vector3.new(.5,.5,.5)
- wait(.031)
- end
- p:Remove() end),p)
- if Level>=2 then
- for i=1, Level do
- p=Instance.new("Part")
- p.Name="HITEFFECT"
- p.CanCollide=false
- p.TopSurface=0
- p.BottomSurface=0
- p.BrickColor=BrickColor.new("Institutional white")
- p.Anchored=true
- p.CFrame=t.CFrame * CFrame.fromEulerAnglesXYZ(math.random(-10,10),math.random(-10,10),math.random(-10,10))
- p.formFactor="Symmetric"
- p.Size=Vector3.new(1,1,1)
- p.Parent=t.Parent
- m=Instance.new("SpecialMesh")
- m.MeshId="http://www.roblox.com/asset/?id=3270017"
- m.Scale=Vector3.new(2.4+i,2.4+i,.6)
- m.Parent=p
- game:GetService("Debris"):AddItem(p,5)
- coroutine.resume(coroutine.create(function(p,l)
- for i=1, 8 do
- p.Transparency=i/8
- p.Mesh.Scale=p.Mesh.Scale+Vector3.new(1.2+l,1.2+l,0)
- wait(.031)
- end
- p:Remove() end),p,Level/3)
- end
- end
- end
- end
- LastHitTime=time()
- LastDamage=0
- ComboHits=0
- asset = math.random(1,10^8)
- --print("asset roll: "..asset)
- applyDamage=function(Noob,Damage,KnockDir,Down,ForceDown,addFunc,DebounceTime,aYvel)
- if KnockDir==nil then
- KnockDir=Vector3.new(0,0,0)
- end
- if Down==nil then
- Down=false
- end
- if addFunc==nil then
- addFunc=function() end
- end
- if aYvel==nil then
- aYvel=0
- end
- local h=Noob:FindFirstChild("Humanoid")
- local t=Noob:FindFirstChild("HumanoidRootPart")
- if t==nil then
- t=Noob:FindFirstChild("Torso")
- end
- if h~=nil and t~=nil then
- if h:FindFirstChild("SADebounce"..asset) == nil then
- local b = Instance.new("BoolValue",h)
- b.Name="SADebounce"..asset
- game:GetService("Debris"):AddItem(b,DebounceTime)
- else
- return
- end
- addonCullMovers(Noob)
- if addFunc~=nil then
- addFunc(Noob)
- end
- coroutine.resume(coroutine.create(function(t,KnockDir,aYvel,KnockForce,aHitstop)
- v=Instance.new("BodyVelocity")
- v.Name="AIDS"
- v.P=4500
- if KnockDir.magnitude > 0 then
- v.Parent=t
- end
- v.maxForce=Vector3.new(9000000,aYvel*9000000,9000000)*2
- v.velocity=Vector3.new(KnockDir.x,KnockDir.y,KnockDir.z)*1
- game:GetService("Debris"):AddItem(v,.25)
- t.CFrame = t.CFrame + KnockDir / 30
- end),t,KnockDir,aYvel)
- if Down==true then
- g=Instance.new("BodyAngularVelocity")
- g.P=4000
- g.maxTorque=Vector3.new(800000000000,800000000000,800000000000)
- g.angularvelocity=KnockDir / 1.5 + Vector3.new(math.random(-20,20),math.random(-20,20),math.random(-20,20))
- g.Parent=t
- game:GetService("Debris"):AddItem(g,.5)
- --print(g.Parent)
- if ForceDown==true then
- g:Remove()
- t.CFrame=t.CFrame*CFrame.fromEulerAnglesXYZ(math.pi/2,0,0)+Vector3.new(0,.3,0)
- g=Instance.new("BodyGyro")
- g.P=400
- g.maxTorque=Vector3.new(80000,80000,80000)
- g.D=20
- g.cframe=CFrame.new(vPlayer.Character.Torso.Position,vPlayer.Character.Torso.Position-Vector3.new(0,50,0))
- g.Parent=v.Parent
- game:GetService("Debris"):AddItem(g,1)
- end
- end
- h:TakeDamage(Damage*1)
- end
- end
- coroutine.resume(coroutine.create(function()
- while true do
- wait()
- if Hitstop>1 then
- vPlayer.Character.HumanoidRootPart.Anchored=true
- else
- vPlayer.Character.HumanoidRootPart.Anchored=false
- end
- if Comboing==true then
- if InfoGui==nil then
- InfoGui=script.InfoGui:clone()
- if vPlayer:FindFirstChild("PlayerGui")~=nil then
- InfoGui.Parent=vPlayer.PlayerGui
- end
- Scrubs=0
- for _,v in pairs(ComboNubs) do
- Scrubs=Scrubs+1
- end
- if Scrubs==0 then Scrubs=1 end
- InfoGui.Frame.HitsLabel.Text=ComboHits
- InfoGui.Frame.DamageLabel.Text=LastDamage
- InfoGui.Frame.EffectiveDamageLabel.Text=LastDamage / Scrubs
- else
- Scrubs=0
- for _,v in pairs(ComboNubs) do
- Scrubs=Scrubs+1
- end
- if Scrubs==0 then Scrubs=1 end
- InfoGui.Frame.HitsLabel.Text=ComboHits
- InfoGui.Frame.DamageLabel.Text=math.floor(LastDamage)
- InfoGui.Frame.EffectiveDamageLabel.Text=math.floor(LastDamage / Scrubs)
- TimeDiff = LastHitTime - time()
- InfoGui.Frame.HitstunFrame.Fill.Size=UDim2.new(0,40 * TimeDiff,0,10)
- InfoGui.Frame.HitstunFrame.Fill.Position=UDim2.new(.5,-20 * TimeDiff,0,0)
- end
- else
- if InfoGui~=nil then
- coroutine.resume(coroutine.create(function(g)
- for i=1, 15 do
- g.Frame.Position=g.Frame.Position+UDim2.new(0,10 + i,0,0)
- wait(.03)
- end
- g:Remove()
- end),InfoGui)
- InfoGui=nil
- end
- end
- if LastHitTime<=time() and Comboing==true then
- Scrubs=0
- for _,v in pairs(ComboNubs) do
- Scrubs=Scrubs+1
- end
- if Scrubs==0 then Scrubs=1 end
- ComboNubs={}
- LastDamage=LastDamage/Scrubs
- --print("Combo Ended: "..LastDamage.." effective damage.")
- wait(.05)
- ComboHits=0
- LastDamage=0
- Comboing=false
- end
- end
- end))
- addonHoldDown=function(Noob)
- local t=Noob:FindFirstChild("HumanoidRootPart")
- if t==nil then
- t=Noob:FindFirstChild("Torso")
- end
- add=Vector3.new(0,0,0)
- if t:FindFirstChild("AIDS")~=nil then
- add=t.AIDS.velocity
- t.AIDS:Remove()
- --print(":)")
- end
- v=Instance.new("BodyPosition")
- v.P=2000
- v.D=v.D/2
- v.maxForce=Vector3.new(6000000000,600000,6000000000)
- v.position=t.Position-Vector3.new(0,10,0)+add
- v.Parent=t
- game:GetService("Debris"):AddItem(v,1.2)
- Noob.Humanoid.PlatformStand=true
- coroutine.resume(coroutine.create(function(noob,t)
- wait(.5)
- while t:FindFirstChild("BodyPosition")~=nil do
- wait(.01)
- end
- noob.PlatformStand=false
- end),Noob.Humanoid,t)
- end
- addonCullMovers=function(Noob)
- local t=Noob:FindFirstChild("HumanoidRootPart")
- if t==nil then
- t=Noob:FindFirstChild("Torso")
- end
- for _,v in pairs(t:children()) do
- if v:IsA("BodyMover") then
- v:Remove()
- end
- end
- end
- LerpWelds=function(orig,alpha,RJ0,N0,RS0,LS0,RH0,LH0,GR0,RJ1,N1,RS1,LS1,RH1,LH1)
- local e = tick()
- RootJoint.C0 = clerp(orig[1],RJ0,alpha)
- Neck.C0 = clerp(orig[2],N0,alpha)
- RightShoulder.C0 = clerp(orig[3],RS0,alpha)
- LeftShoulder.C0 = clerp(orig[4],LS0,alpha)
- RightHip.C0 = clerp(orig[5],RH0,alpha)
- LeftHip.C0 = clerp(orig[6],LH0,alpha)
- Grip.C0 = clerp(orig[7],GR0,alpha)
- RootJoint.C1 = clerp(orig[8],RJ1,alpha)
- Neck.C1 = clerp(orig[9],N1,alpha)
- RightShoulder.C1 = clerp(orig[10],RS1,alpha)
- LeftShoulder.C1 = clerp(orig[11],LS1,alpha)
- RightHip.C1 = clerp(orig[12],RH1,alpha)
- LeftHip.C1 = clerp(orig[13],LH1,alpha)
- lastframe = {RootJoint.C0,Neck.C0,RightShoulder.C0,LeftShoulder.C0,RightHip.C0,LeftHip.C0,Grip.C0,RootJoint.C1,Neck.C1,RightShoulder.C1,LeftShoulder.C1,RightHip.C1,LeftHip.C1}
- return (tick() - e)
- end
- sRootJoint,sNeck,sRightShoulder,sLeftShoulder,sRightHip,sLeftHip,sGrip = Instance.new("Motor6D"),Instance.new("Motor6D"),Instance.new("Motor6D"),Instance.new("Motor6D"),Instance.new("Motor6D"),Instance.new("Motor6D"),Instance.new("Motor6D"),Instance.new("Motor6D")
- sresetWelds=function()
- sRootJoint.C0=RootJointC0
- sNeck.C0=NeckC0
- sRightShoulder.C0=RightShoulderC0
- sLeftShoulder.C0=LeftShoulderC0
- sRightHip.C0=RightHipC0
- sLeftHip.C0=LeftHipC0
- sRootJoint.C1=RootJointC1
- sNeck.C1=NeckC1
- sRightShoulder.C1=RightShoulderC1
- sLeftShoulder.C1=LeftShoulderC1
- sRightHip.C1=RightHipC1
- sLeftHip.C1=LeftHipC1
- sGrip.C0=GripC0
- end
- --//XLegoX's spherical linear interpolation
- function clerp(a,b,t)
- local qa = {QuaternionFromCFrame(a)}
- local qb = {QuaternionFromCFrame(b)}
- local ax, ay, az = a.x, a.y, a.z
- local bx, by, bz = b.x, b.y, b.z
- local _t = 1-t
- return QuaternionToCFrame(_t*ax + t*bx, _t*ay + t*by, _t*az + t*bz,QuaternionSlerp(qa, qb, t))
- end
- function QuaternionFromCFrame(cf)
- local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components()
- local trace = m00 + m11 + m22
- if trace > 0 then
- local s = math.sqrt(1 + trace)
- local recip = 0.5/s
- return (m21-m12)*recip, (m02-m20)*recip, (m10-m01)*recip, s*0.5
- else
- local i = 0
- if m11 > m00 then
- i = 1
- end
- if m22 > (i == 0 and m00 or m11) then
- i = 2
- end
- if i == 0 then
- local s = math.sqrt(m00-m11-m22+1)
- local recip = 0.5/s
- return 0.5*s, (m10+m01)*recip, (m20+m02)*recip, (m21-m12)*recip
- elseif i == 1 then
- local s = math.sqrt(m11-m22-m00+1)
- local recip = 0.5/s
- return (m01+m10)*recip, 0.5*s, (m21+m12)*recip, (m02-m20)*recip
- elseif i == 2 then
- local s = math.sqrt(m22-m00-m11+1)
- local recip = 0.5/s return (m02+m20)*recip, (m12+m21)*recip, 0.5*s, (m10-m01)*recip
- end
- end
- end
- function QuaternionToCFrame(px, py, pz, x, y, z, w)
- local xs, ys, zs = x + x, y + y, z + z
- local wx, wy, wz = w*xs, w*ys, w*zs
- local xx = x*xs
- local xy = x*ys
- local xz = x*zs
- local yy = y*ys
- local yz = y*zs
- local zz = z*zs
- return CFrame.new(px, py, pz,1-(yy+zz), xy - wz, xz + wy,xy + wz, 1-(xx+zz), yz - wx, xz - wy, yz + wx, 1-(xx+yy))
- end
- function QuaternionSlerp(a, b, t)
- local cosTheta = a[1]*b[1] + a[2]*b[2] + a[3]*b[3] + a[4]*b[4]
- local startInterp, finishInterp;
- if cosTheta >= 0.0001 then
- if (1 - cosTheta) > 0.0001 then
- local theta = math.acos(cosTheta)
- local invSinTheta = 1/math.sin(theta)
- startInterp = math.sin((1-t)*theta)*invSinTheta
- finishInterp = math.sin(t*theta)*invSinTheta
- else
- startInterp = 1-t
- finishInterp = t
- end
- else
- if (1+cosTheta) > 0.0001 then
- local theta = math.acos(-cosTheta)
- local invSinTheta = 1/math.sin(theta)
- startInterp = math.sin((t-1)*theta)*invSinTheta
- finishInterp = math.sin(t*theta)*invSinTheta
- else
- startInterp = t-1
- finishInterp = t
- end
- end
- return a[1]*startInterp + b[1]*finishInterp, a[2]*startInterp + b[2]*finishInterp, a[3]*startInterp + b[3]*finishInterp, a[4]*startInterp + b[4]*finishInterp
- end
- PlayerKeys={}
- -----
- -----
- CurrentAnimation=nil
- Hitstop=0
- DesiredWalkspeed=18
- -----
- -----
- -----
- -----
- CanInterrupt=function(t)
- tool.Status.AnimCanBeInterrupted.Value=t
- end
- PlayerCanJump=function()
- if CurrentAnimation~=nil then
- local doescancel=false
- for _,v in pairs(CurrentAnimation["Cancels"]) do
- if v=="Jump" or v=="Everything" then
- doescancel=true
- break
- end
- end
- if tool.Status.AnimCanBeInterrupted.Value==true then
- return doescancel
- else
- return false
- end
- end
- end
- -----------
- -----------
- --[[Section 3: ATTACKING]]
- ComboNubs={}
- GetNubs=function()
- scrubs={}
- for _,v in pairs(game.Workspace:children()) do
- if v:FindFirstChild("Humanoid")~=nil and v:FindFirstChild("Torso")~=nil and v.Name~=game.Players.LocalPlayer.Name then
- table.insert(scrubs,v)
- end
- end
- return scrubs
- end
- PlaySound=function(SName,Vol,Pitch,Par)
- if Par==nil then Par=script end
- local s=Instance.new("Sound")
- s.Volume=Vol
- s.Pitch=Pitch
- s.SoundId="http://www.roblox.com/asset/?id="..SName
- s.Parent=Par
- wait()
- s:Play()
- game:GetService("Debris"):AddItem(s,10)
- end
- -----------
- -----------
- -----
- -------
- -------
- --[[Section 4: HARD ANIMSET FUNCTIONS]]
- Stand=function()
- if TrackFunction~=nil then
- TrackFunction:disconnect()
- end
- if CurrentAnimation~=Animations["Stand"] then
- RequestAnimationChange("Stand",0)
- tool.Status.AnimFrame.Value=0
- end
- local el = 40
- local elv = 1
- local cel = 0
- local clastframe = lastframe
- TrackFunction=game:GetService("RunService").Heartbeat:connect(function(Step)
- if cel > 3 then
- LerpWelds({Animations["Stand"]["Animation"](0)},el / 40,Animations["Stand"]["Animation"](1))
- el = el + elv
- if el >= 40 then
- elv = -1
- elseif el == 0 then
- elv = 1
- end
- elseif cel <= 3 then
- LerpWelds(clastframe,cel/3,Animations["Stand"]["Animation"](0))
- end
- cel = cel + 1
- end)
- end
- Walk=function()
- if TrackFunction~=nil then
- TrackFunction:disconnect()
- end
- if CurrentAnimation~=Animations["Walk"] then
- RequestAnimationChange("Walk",0)
- tool.Status.AnimFrame.Value=0
- end
- local e = 0
- local clastframe = lastframe
- TrackFunction=game:GetService("RunService").Heartbeat:connect(function(Step)
- if e <= 5 then
- LerpWelds(clastframe,e/5,Animations["Walk"]["Animation"](0))
- else
- LerpWelds(clastframe,1,Animations["Walk"]["Animation"](0))
- end
- e = e+1
- end)
- end
- DesiredWalkspeedLast=18
- PlayerInAir=false
- lastplayervel=0
- Jump=function()
- if tool.Status.AnimCanBeInterrupted.Value==false then return end
- if TrackFunction~=nil then
- TrackFunction:disconnect()
- end
- if CurrentAnimation~=Animations["Jump"] then
- RequestAnimationChange("Jump",0)
- tool.Status.AnimFrame.Value=0
- ----print("Jumping!")
- end
- Hitstop=0
- local e = 0
- local clastframe = lastframe
- TrackFunction=game:GetService("RunService").Heartbeat:connect(function(Step)
- if e <= 3 then
- LerpWelds(clastframe,e/3,Animations["Jump"]["Animation"](0))
- else
- LerpWelds(clastframe,1,Animations["Jump"]["Animation"](0))
- end
- e = e+1
- end)
- enddir=Vector3.new(0,0,0)
- lastplayervel=enddir
- v_h=vPlayer.Character.Torso:FindFirstChild("JUMP_PROP")
- if v_h==nil then
- v_h=Instance.new("BodyVelocity")
- v_h.P=650
- v_h.maxForce=Vector3.new(0,2800000,0)
- v_h.velocity=Vector3.new(lastplayervel.x,75,lastplayervel.z)
- v_h.Parent=vPlayer.Character.Torso
- v_h.Name="JUMP_PROP"
- else
- v_h.P=650
- v_h.maxForce=Vector3.new(0,2800000,0)
- v_h.velocity=Vector3.new(lastplayervel.x,75,lastplayervel.z)
- end
- local cpos=vPlayer.Character.Torso.CFrame*CFrame.new(0,-1,0)
- local par,loc=game.Workspace:FindPartOnRay(Ray.new(cpos.p,Vector3.new(0,-8,0)),vPlayer.Character)
- timejump=time()
- bumped=false
- canland=false
- PlayerState="Jumping"
- CanInterrupt(true)
- local ttimejump=time()
- local rr = TrackFunction
- DesiredMovespeed=19
- while v_h.Parent~=nil and timejump==ttimejump do
- PlayerInAir=true
- if time()-timejump>.4 then
- canland=true
- end
- if (loc-cpos.p).magnitude<6 and canland==true or rawequal(rr,TrackFunction) == false then
- break
- end
- local ss = game:GetService("RunService").Heartbeat:wait()
- cpos=vPlayer.Character.Torso.CFrame*CFrame.new(0,.8,0)
- par,loc=game.Workspace:FindPartOnRay(Ray.new(cpos.p,Vector3.new(0,-15,0)),vPlayer.Character)
- if vPlayer.Character.HumanoidRootPart.Anchored==false then
- v_h.velocity=v_h.velocity-Vector3.new(0,186.2*ss,0)
- end
- end
- if timejump~=ttimejump or rawequal(rr,TrackFunction) == false then
- return
- end
- PlayerState="Standing"
- PlayerInAir=false
- DesiredMovespeed=19
- vPlayer.Character.Humanoid.WalkSpeed=DesiredMovespeed
- v_h:Remove()
- CanInterrupt(true)
- PlayerIsAttacking=false
- Stand()
- end
- Jump_Cont=function()
- lastplayervel = vPlayer.Character.Torso.Velocity
- cpos=vPlayer.Character.Torso.CFrame*CFrame.new(0,.8,0)
- par,loc=game.Workspace:FindPartOnRay(Ray.new(cpos.p,Vector3.new(0,-15,0)),vPlayer.Character)
- if (loc-cpos.p).magnitude<4 then
- PlayerState="Standing"
- CanInterrupt(true)
- return Stand()
- end
- if TrackFunction~=nil then
- TrackFunction:disconnect()
- TrackFunction=nil
- end
- if CurrentAnimation~=Animations["Jump"] then
- RequestAnimationChange("Jump",0)
- tool.Status.AnimFrame.Value=0
- CurrentAnimation = Animations["Jump"]
- ----print("Jumping!")
- end
- Hitstop=0
- local e = 0
- local clastframe = lastframe
- TrackFunction=game:GetService("RunService").Heartbeat:connect(function(Step)
- if e <= 4 then
- LerpWelds(clastframe,e/4,Animations["Jump"]["Animation"](0))
- else
- LerpWelds(clastframe,1,Animations["Jump"]["Animation"](0))
- end
- e = e+1
- end)
- timejump=time()
- bumped=false
- canland=false
- PlayerState="Jumping"
- CanInterrupt(true)
- local ttimejump=time()
- local rr = TrackFunction
- v_h=vPlayer.Character.Torso:FindFirstChild("JUMP_PROP")
- if v_h==nil then
- v_h=Instance.new("BodyVelocity")
- v_h.P=650
- v_h.maxForce=Vector3.new(0,2800000,0)
- v_h.velocity=Vector3.new(lastplayervel.x,lastplayervel.y,lastplayervel.z)
- v_h.Parent=vPlayer.Character.Torso
- v_h.Name="JUMP_PROP"
- else
- v_h.P=650
- v_h.maxForce=Vector3.new(0,2800000,0)
- v_h.velocity=Vector3.new(lastplayervel.x,lastplayervel.y,lastplayervel.z)
- end
- local cpos=vPlayer.Character.Torso.CFrame*CFrame.new(0,-1,0)
- local par,loc=game.Workspace:FindPartOnRay(Ray.new(cpos.p,Vector3.new(0,-8,0)),vPlayer.Character)
- timejump=time()
- bumped=false
- canland=false
- PlayerState="Jumping"
- CanInterrupt(true)
- local ttimejump=time()
- local rr = TrackFunction
- DesiredMovespeed = 18
- while v_h.Parent~=nil and timejump==ttimejump do
- PlayerInAir=true
- if time()-timejump>.4 then
- canland=true
- end
- if (loc-cpos.p).magnitude<6 and canland==true or rawequal(rr,TrackFunction) == false then
- break
- end
- local ss = game:GetService("RunService").Heartbeat:wait()
- cpos=vPlayer.Character.Torso.CFrame*CFrame.new(0,.8,0)
- par,loc=game.Workspace:FindPartOnRay(Ray.new(cpos.p,Vector3.new(0,-15,0)),vPlayer.Character)
- if vPlayer.Character.HumanoidRootPart.Anchored==false then
- v_h.velocity=v_h.velocity-Vector3.new(0,186.2*ss,0)
- end
- end
- if timejump~=ttimejump or rawequal(rr,TrackFunction) == false then
- return
- end
- PlayerState="Standing"
- PlayerInAir=false
- DesiredMovespeed=19
- vPlayer.Character.Humanoid.WalkSpeed=DesiredMovespeed
- v_h:Remove()
- CanInterrupt(true)
- DesiredMovespeed=19
- PlayerIsAttacking=false
- CanDoubleJump=true
- TrackFunction:disconnect()
- TrackFunction = nil
- Walk()
- end
- -------
- -------
- -------------------------------
- --------------------------------
- ---------CORE FUNCTIONS----------
- --------------------------------
- -------------------------------
- Hitstop=0
- RequestNewFrame=function(f)
- if CurrentAnimation==nil then return end
- if Hitstop~=nil then
- if Hitstop>0 then
- Hitstop=Hitstop-1
- else
- CurrentAnimation["Animation"](0)
- ----print(f)
- end
- end
- return f
- end
- RequestAnimationChange=function(n,f)
- _nanim=Animations[n]
- if CurrentAnimation~=nil then
- local doescancel=false
- for _,v in pairs(CurrentAnimation["Cancels"]) do
- if v==_nanim["Reference"] or v=="Everything" then
- doescancel=true
- break
- end
- end
- if doescancel==true and tool.Status.AnimCanBeInterrupted.Value==true then
- CurrentAnimation=_nanim
- return CurrentAnimation
- else
- end
- else
- CurrentAnimation=Animations[n] --:/
- end
- return false
- end
- getWelds=function(c) --designate weld variables
- local t=c.Torso
- local hrp=c.HumanoidRootPart.RootJoint
- RightShoulder=t:FindFirstChild("Right Shoulder")
- LeftShoulder=t:FindFirstChild("Left Shoulder")
- RightHip=t:FindFirstChild("Right Hip")
- LeftHip=t:FindFirstChild("Left Hip")
- RootJoint=hrp
- Neck=t:FindFirstChild("Neck")
- end
- resetWelds=function(ext,occ) --extent 1-3; occlusion
- --1 == reset desiredangle/currentangle
- --2 == reset C0/C1
- --3 == reset both des/cur/c0/c1
- local r={RightShoulder,LeftShoulder,RightHip,LeftHip,RootJoint,Neck}
- for _,v in pairs(r) do
- for i=1, #occ do
- if occ[i]==v then
- table.remove(r,_)
- end
- end
- end
- for _,v in pairs(r) do
- if v.Name=="Right Shoulder" then
- if ext==1 then
- v.DesiredAngle=0
- v.CurrentAngle=0
- elseif ext==2 then
- v.C0=RightShoulderC0
- v.C1=RightShoulderC1
- elseif ext==3 then
- v.DesiredAngle=0
- v.CurrentAngle=0
- v.C0=RightShoulderC0
- v.C1=RightShoulderC1
- end
- elseif v.Name=="Left Shoulder" then
- if ext==1 then
- v.DesiredAngle=0
- v.CurrentAngle=0
- elseif ext==2 then
- v.C0=LeftShoulderC0
- v.C1=LeftShoulderC1
- elseif ext==3 then
- v.DesiredAngle=0
- v.CurrentAngle=0
- v.C0=LeftShoulderC0
- v.C1=LeftShoulderC1
- end
- elseif v.Name=="Right Hip" then
- if ext==1 then
- v.DesiredAngle=0
- v.CurrentAngle=0
- elseif ext==2 then
- v.C0=RightHipC0
- v.C1=RightHipC1
- elseif ext==3 then
- v.DesiredAngle=0
- v.CurrentAngle=0
- v.C0=RightHipC0
- v.C1=RightHipC1
- end
- elseif v.Name=="Left Hip" then
- if ext==1 then
- v.DesiredAngle=0
- v.CurrentAngle=0
- elseif ext==2 then
- v.C0=LeftHipC0
- v.C1=LeftHipC1
- elseif ext==3 then
- v.DesiredAngle=0
- v.CurrentAngle=0
- v.C0=LeftHipC0
- v.C1=LeftHipC1
- end
- elseif v.Name=="Neck" then
- if ext==1 then
- v.DesiredAngle=0
- v.CurrentAngle=0
- elseif ext==2 then
- v.C0=NeckC0
- v.C1=NeckC1
- elseif ext==3 then
- v.DesiredAngle=0
- v.CurrentAngle=0
- v.C0=NeckC0
- v.C1=NeckC1
- end
- elseif v.Name=="RootJoint" then
- if ext==1 then
- v.DesiredAngle=0
- v.CurrentAngle=0
- elseif ext==2 then
- v.C0=RootJointC0
- v.C1=RootJointC1
- elseif ext==3 then
- v.DesiredAngle=0
- v.CurrentAngle=0
- v.C0=RootJointC0
- v.C1=RootJointC1
- end
- elseif v.Name=="RightGrip" then
- if ext==1 then
- elseif ext==2 then
- Grip.C0=nGrip.C0
- Grip.C1=nGrip.C1
- elseif ext==3 then
- Grip.C0=nGrip.C0
- Grip.C1=nGrip.C1
- end
- end
- end
- end
- setMotorParameters=function(Motor,DesiredAngle,CurrentAngle,MaxVelocity,C0,C1)
- if C0==nil then C0=Motor.C0 end
- if C1==nil then C1=Motor.C1 end
- if DesiredAngle==nil then DesiredAngle=Motor.DesiredAngle end
- if CurrentAngle==nil then CurrentAngle=Motor.CurrentAngle end
- if MaxVelocity==nil then MaxVelocity=Motor.MaxVelocity end
- Motor.C0=C0
- Motor.C1=C1
- Motor.DesiredAngle=DesiredAngle
- Motor.CurrentAngle=CurrentAngle
- Motor.MaxVelocity=MaxVelocity
- end
- PlayerIsAttacking=false
- PlayerBeingAttacked=false
- PlayerState="Standing"
- getCharacterState=function()
- if tool.Status.AnimCanBeInterrupted.Value==false or PlayerIsAttacking==true then return end
- local CPlayer=game.Players.LocalPlayer.Character
- local moveVelocity=CPlayer.HumanoidRootPart.Velocity.magnitude
- if PlayerIsAttacking==false and PlayerState~="Jumping" then
- if moveVelocity >= 5 then
- PlayerState="Moving"
- if StickPos>3 or CurrentCameraState=="3D" then
- if MovementPreference=="Walk" then
- if CurrentAnimation~=Animations["Walk"] and tool.Status.AnimCanBeInterrupted.Value==true and PlayerState~="Jumping" then
- Walk()
- end
- end
- end
- else
- PlayerState="Standing"
- --print("SS")
- if StickPos>3 or CurrentCameraState=="3D" then
- if CurrentAnimation~=Animations["Stand"] and tool.Status.AnimCanBeInterrupted.Value==true then
- DesiredWalkspeed=18
- Stand()
- end
- end
- end
- end
- end
- lastinput=time()
- MovementPreference="Walk"
- playerDash=function()
- end
- ----
- NewInput=function(Key,atTick,Edge)
- local new={["Input"]=Key,["Tick"]=atTick,["Edge"]=Edge,["Age"]=0}
- table.insert(PlayerInputs,new)
- end
- FindInputStrings=function()
- local curtime=tick()
- local strunginputs={}
- for _,v in pairs(PlayerInputs) do
- if curtime - v["Tick"] <= PlayerInputStringFrame then
- table.insert(strunginputs,v)
- end
- end
- table.sort(strunginputs,(function(x,y) if x["Tick"]<y["Tick"] then return true end return false end))
- return strunginputs
- end
- MorphInputs=function(i)
- i=string.upper(i)
- if CurrentCameraState=="3D" then
- i=string.gsub(i,"A","")
- i=string.gsub(i,"S","<")
- i=string.gsub(i,"D","")
- i=string.gsub(i,"W",">")
- else
- if PlayerFacing=="Left" then
- i=string.gsub(i,"A","<")
- i=string.gsub(i,"S","v")
- i=string.gsub(i,"D",">")
- i=string.gsub(i,"W","^")
- else
- i=string.gsub(i,"A",">")
- i=string.gsub(i,"S","v")
- i=string.gsub(i,"D","<")
- i=string.gsub(i,"W","^")
- end
- end
- return i
- end
- CullPlayerInput=function()
- local toremove={}
- for _,v in pairs(PlayerInputs) do
- v["Age"]=v["Age"]+1
- if tick() - v["Tick"] > (PlayerInputStringFrame+.05) or _>PlayerInputCullThreshold then
- table.remove(PlayerInputs,_)
- end
- end
- table.sort(PlayerInputs,(function(x,y) if x["Tick"]<y["Tick"] then return true end return false end))
- end
- IgnoreEdge=function(st)
- str=string.gsub(st,".%-","")
- str=string.gsub(str,"%+","")
- return str
- end
- RequestNewAnimation=RequestAnimationChange
- LastDashInput=time()
- CheckDeb=true
- LastKeyCheck=""
- LastCheckTime=time()
- lastnormal=""
- CheckNormals=function()
- KeyCheck=""
- if PlayerKeys["z"]~=nil then
- KeyCheck="Z"
- end
- if PlayerKeys["x"]~=nil then
- KeyCheck="X"
- end
- j=""
- if PlayerState=="Jumping" or PlayerIsInAir==true then
- j="j"
- end
- if InputNormals[j..lastnormal..KeyCheck]~=nil and CheckDeb==true and LastKeyCheck~=KeyCheck and tool.Status.AnimCanBeInterrupted.Value==true then
- LastKeyCheck=KeyCheck
- LastCheckTime=time()
- Hitstop=0
- --print("JIMMIES RUSTLED")
- --print(j..lastnormal..KeyCheck)
- InputNormals[j..lastnormal..KeyCheck]()
- end
- if time()-LastCheckTime > .23 then
- LastKeyCheck=""
- end
- end
- timejump=time()
- DetectInput=function()
- local Scrub=FindInputStrings()
- DURRD=false
- if PlayerIsAttacking==false then
- BodyGyro:Remove()
- BodyVel:Remove()
- end
- if #Scrub>0 then
- local input=""
- for _,v in pairs(Scrub) do
- input=input..v["Input"]..v["Edge"]
- end
- input=MorphInputs(input)
- edgelessinput=IgnoreEdge(input)
- DURRD=false
- for _,v in pairs(TwoDInputs) do
- for __,vv in pairs(v["Inputs"]) do
- if edgelessinput==vv and tool.Status.AnimCanBeInterrupted.Value==true then
- DURRD=true
- DesiredMovespeed=0
- v["Function"]()
- elseif IgnoreEdge(input,true)==vv and tool.Status.AnimCanBeInterrupted.Value==true then
- DURRD=true
- DesiredMovespeed=0
- v["Function"]()
- end
- end
- end
- end
- if DURRD==false then
- CheckNormals()
- end
- end
- rawKeyInput=function()
- end
- SetCombatKey=function(k)
- PlayerCombatKeys[k]=true
- coroutine.resume(coroutine.create(function(k)
- for i=1, 1000 do
- wait(.01)
- if PlayerCombatKeys[k]==nil then
- break
- end
- end
- PlayerCombatKeys[k]=nil
- end),k)
- end
- getCharacterState=function()
- if tool.Status.AnimCanBeInterrupted.Value==false or PlayerIsAttacking==true then return end
- local CPlayer=game.Players.LocalPlayer.Character
- local moveVelocity=(Vector3.new(0,0,0) - CPlayer.HumanoidRootPart.Velocity).magnitude
- if PlayerIsAttacking==false and PlayerState~="Jumping" then
- if moveVelocity >= 5 then
- PlayerState="Moving"
- if MovementPreference=="Walk" then
- if CurrentAnimation~=Animations["Walk"] and tool.Status.AnimCanBeInterrupted.Value==true and PlayerState~="Jumping" then
- Walk()
- end
- end
- else
- PlayerState="Standing"
- if PlayerIsAttacking==false and tool.Status.AnimCanBeInterrupted.Value==true then
- if CurrentAnimation~=Animations["Stand"] and tool.Status.AnimCanBeInterrupted.Value==true then
- DesiredWalkspeed=18
- Stand()
- end
- end
- end
- end
- end
- lastinput=time()
- MovementPreference="Walk"
- controllerStore={}
- LastHealth=0
- Wep=nil
- onEquip=function(mouse)
- mo.Parent=char
- PlayerAnimationScript=vPlayer.Character:FindFirstChild("Animate")
- if PlayerAnimationScript~=nil then
- PlayerAnimationScript.Disabled=true
- end
- getWelds(vPlayer.Character)
- resetWelds(3,{})
- Wep=Weapon:Clone()
- Wep.Parent=vPlayer.Character
- Grip=Instance.new("Weld",Wep.Handle)
- Grip.Part0=vPlayer.Character["Right Arm"]
- Grip.Part1=Grip.Parent
- Grip.C0=GripC0
- wait(.5)
- tool.Status.AnimFrame.Value=0
- Stand()
- LastHealth=vPlayer.Character.Humanoid.Health
- chs=game:GetService("RunService").Heartbeat:connect(function()
- CullPlayerInput()
- rawKeyInput()
- end)
- chsCS=game:GetService("RunService").Heartbeat:connect(function()
- getCharacterState()
- DetectInput()
- end)
- chsj=vPlayer.Character.Humanoid.Changed:connect(function(v)
- vPlayer.Character.Humanoid.Jump=false
- end)
- mouse.KeyDown:connect(function(key)
- PlayerKeys[key]=true
- NewInput(key,tick(),"+")
- SetCombatKey(key)
- if key == " " and PlayerCanJump()==true then
- if PlayerState == "Jumping" then
- if CanDoubleJump then
- CanDoubleJump=false
- Jump()
- end
- else
- Jump()
- end
- end
- end)
- mouse.KeyUp:connect(function(key) PlayerKeys[key] = nil end)
- end
- Down=nil
- onEquipLocal=function(mouse)
- end
- onPutaway=function()
- mo.Parent=nil
- TrackFunction:disconnect()
- TrackFunction=nil
- chs:disconnect()
- chs=nil
- chsj:disconnect()
- chsj=nil
- chsCS:disconnect()
- chsCS=nil
- BodyVel.Parent=nil BodyGyro.Parent=nil
- Wep.Parent=nil
- Wep=nil
- if PlayerAnimationScript~=nil then
- PlayerAnimationScript.Disabled=false
- end
- resetWelds(3,{})
- end
- tool.Selected:connect(onEquip) tool.Selected:connect(onEquipLocal)
- tool.Deselected:connect(onPutaway)
- Animations={}
- Animations["Stand"]={["Animation"]=function(fr)
- local keyframe={}
- sresetWelds()
- keyframe[0]=function()
- sRootJoint.C0=sRootJoint.C0*CFrame.new(0,0,-.225)*CFrame.Angles(math.rad(8),math.rad(0),math.rad(46))
- sNeck.C0=sNeck.C0*CFrame.new(0,0,0)*CFrame.Angles(math.rad(6),math.rad(-3),math.rad(-24))
- sRightShoulder.C0=sRightShoulder.C0*CFrame.new(-.3,-.5,.4)*CFrame.Angles(math.rad(12),math.rad(-9),math.rad(64))
- sRightShoulder.C1=sRightShoulder.C1*CFrame.new(0,0,0)*CFrame.Angles(math.rad(0),math.rad(-88),math.rad(0))
- sLeftShoulder.C0=sLeftShoulder.C0*CFrame.new(-.35,-.6,.3)*CFrame.Angles(math.rad(8),math.rad(20),-math.rad(100))
- sLeftShoulder.C1=sLeftShoulder.C1*CFrame.new(0,0,0)*CFrame.Angles(math.rad(0),math.rad(90),math.rad(0))
- sRightHip.C0=sRightHip.C0*CFrame.new(-.25,.25,0)*CFrame.Angles(math.rad(-9),math.rad(0),math.rad(0))
- sRightHip.C1=sRightHip.C1*CFrame.new(0,0,0)*CFrame.Angles(math.rad(0),math.rad(45),math.rad(-7))
- sLeftHip.C0=sLeftHip.C0*CFrame.new(0,.1,0)*CFrame.Angles(math.rad(-6),math.rad(9),math.rad(0))
- sLeftHip.C1=sLeftHip.C1*CFrame.new(0,0,0)*CFrame.Angles(math.rad(0),math.rad(18),math.rad(0))
- sGrip.C0 = GripC0 * CFrame.new(.1,.5,0) * CFrame.Angles(math.rad(0),math.rad(60),math.rad(0))
- end
- keyframe[1]=function()
- sRootJoint.C0=sRootJoint.C0*CFrame.new(0,0,-.2)*CFrame.Angles(math.rad(10),math.rad(0),math.rad(46))
- sNeck.C0=sNeck.C0*CFrame.new(0,0,0)*CFrame.Angles(math.rad(6),math.rad(-3),math.rad(-26))
- sRightShoulder.C0=sRightShoulder.C0*CFrame.new(-.3,-.5,.4)*CFrame.Angles(math.rad(12),math.rad(-8),math.rad(61))
- sRightShoulder.C1=sRightShoulder.C1*CFrame.new(0,0,0)*CFrame.Angles(math.rad(0),math.rad(-88),math.rad(0))
- sLeftShoulder.C0=sLeftShoulder.C0*CFrame.new(-.3,-.6,.3)*CFrame.Angles(math.rad(8),math.rad(20),-math.rad(94))
- sLeftShoulder.C1=sLeftShoulder.C1*CFrame.new(0,0,0)*CFrame.Angles(math.rad(0),math.rad(90),math.rad(0))
- sRightHip.C0=sRightHip.C0*CFrame.new(-.25,.25,0)*CFrame.Angles(math.rad(-9),math.rad(-2),math.rad(0))
- sRightHip.C1=sRightHip.C1*CFrame.new(0,0,0)*CFrame.Angles(math.rad(0),math.rad(48),math.rad(-7))
- sLeftHip.C0=sLeftHip.C0*CFrame.new(-.075,.1,0)*CFrame.Angles(math.rad(-6),math.rad(9),math.rad(0))
- sLeftHip.C1=sLeftHip.C1*CFrame.new(0,0,0)*CFrame.Angles(math.rad(0),math.rad(24),math.rad(0))
- sGrip.C0 = GripC0 * CFrame.new(.1,.5,0) * CFrame.Angles(math.rad(-1),math.rad(40),math.rad(-1))
- end
- keyframe[fr]()
- return sRootJoint.C0,sNeck.C0,sRightShoulder.C0,sLeftShoulder.C0,sRightHip.C0,sLeftHip.C0,sGrip.C0,sRootJoint.C1,sNeck.C1,sRightShoulder.C1,sLeftShoulder.C1,sRightHip.C1,sLeftHip.C1
- end,["Cancels"]={"Everything"},["Reference"]="Stand"}
- Animations["Z"]={["Animation"]=function(fr)
- local keyframe={}
- sresetWelds()
- keyframe[0]=function()
- sRootJoint.C0=sRootJoint.C0*CFrame.new(0,0,-.2)*CFrame.Angles(math.rad(8),math.rad(0),math.rad(66))
- sNeck.C0=sNeck.C0*CFrame.new(0,0,0)*CFrame.Angles(math.rad(6),math.rad(-3),math.rad(-24))
- sRightShoulder.C0=sRightShoulder.C0*CFrame.new(-.3,-.5,.4)*CFrame.Angles(math.rad(0),math.rad(0),math.rad(80))
- sRightShoulder.C1=sRightShoulder.C1*CFrame.new(0,0,0)*CFrame.Angles(math.rad(0),math.rad(-90),math.rad(0))
- sLeftShoulder.C0=sLeftShoulder.C0*CFrame.new(.1,-.6,.3)*CFrame.Angles(math.rad(4),math.rad(30),-math.rad(88))
- sLeftShoulder.C1=sLeftShoulder.C1*CFrame.new(0,0,0)*CFrame.Angles(math.rad(0),math.rad(100),math.rad(0))
- sRightHip.C0=sRightHip.C0*CFrame.new(-.4,.25,0)*CFrame.Angles(math.rad(-10),math.rad(0),math.rad(-10))
- sRightHip.C1=sRightHip.C1*CFrame.new(0,0,0)*CFrame.Angles(math.rad(0),math.rad(60),math.rad(-7))
- sLeftHip.C0=sLeftHip.C0*CFrame.new(0,.1,0)*CFrame.Angles(math.rad(-6),math.rad(9),math.rad(0))
- sLeftHip.C1=sLeftHip.C1*CFrame.new(0,0,0)*CFrame.Angles(math.rad(0),math.rad(18),math.rad(0))
- sGrip.C0 = GripC0 * CFrame.new(.1,.5,0) * CFrame.Angles(math.rad(0),math.rad(-10),math.rad(0))
- end
- keyframe[1]=function()
- sRootJoint.C0=sRootJoint.C0*CFrame.new(0,-.5,-.4)*CFrame.Angles(math.rad(25),math.rad(-12),math.rad(-10))
- sNeck.C0=sNeck.C0*CFrame.new(0,0,0)*CFrame.Angles(math.rad(-6),math.rad(-3),math.rad(15))
- sRightShoulder.C0=sRightShoulder.C0*CFrame.new(0,-.5,.4)*CFrame.Angles(math.rad(-30),math.rad(-90),math.rad(80))
- sRightShoulder.C1=sRightShoulder.C1*CFrame.new(0,0,0)*CFrame.Angles(math.rad(0),math.rad(-80),math.rad(0))
- sLeftShoulder.C0=sLeftShoulder.C0*CFrame.new(.1,-.6,.3)*CFrame.Angles(math.rad(4),math.rad(30),-math.rad(88))
- sLeftShoulder.C1=sLeftShoulder.C1*CFrame.new(0,0,0)*CFrame.Angles(math.rad(0),math.rad(100),math.rad(0))
- sRightHip.C0=sRightHip.C0*CFrame.new(0.45,.6,-.1)*CFrame.Angles(math.rad(-3),math.rad(0),math.rad(25))
- sRightHip.C1=sRightHip.C1*CFrame.new(0,0,0)*CFrame.Angles(math.rad(0),math.rad(0),math.rad(0))
- sLeftHip.C0=sLeftHip.C0*CFrame.new(-.05,.05,0)*CFrame.Angles(math.rad(0),math.rad(0),math.rad(0))
- sLeftHip.C1=sLeftHip.C1*CFrame.new(0,0,0)*CFrame.Angles(math.rad(0),math.rad(-10),math.rad(0))
- sGrip.C0 = GripC0 * CFrame.new(.3,.3,0) * CFrame.Angles(math.rad(0),math.rad(-10),math.rad(-35))
- end
- keyframe[fr]()
- return sRootJoint.C0,sNeck.C0,sRightShoulder.C0,sLeftShoulder.C0,sRightHip.C0,sLeftHip.C0,sGrip.C0,sRootJoint.C1,sNeck.C1,sRightShoulder.C1,sLeftShoulder.C1,sRightHip.C1,sLeftHip.C1
- end,["Cancels"]={"Stand","ZZ"},["Reference"]="Z"}
- Animations["ZZ"]={["Animation"]=function(fr)
- local keyframe={}
- sresetWelds()
- keyframe[0]=function()
- sRootJoint.C0=sRootJoint.C0*CFrame.new(0,0,-.3)*CFrame.Angles(math.rad(15),math.rad(-5),math.rad(-105))
- sNeck.C0=sNeck.C0*CFrame.new(0,0,0)*CFrame.Angles(math.rad(10),math.rad(3),math.rad(60))
- sRightShoulder.C0=sRightShoulder.C0*CFrame.new(0,.5,.4)*CFrame.Angles(math.rad(20),math.rad(-30),math.rad(70))
- sRightShoulder.C1=sRightShoulder.C1*CFrame.new(0,0,0)*CFrame.Angles(math.rad(0),math.rad(80),math.rad(0))
- sLeftShoulder.C0=sLeftShoulder.C0*CFrame.new(-1,.6,0)*CFrame.Angles(math.rad(-30),math.rad(-65),-math.rad(100))
- sLeftShoulder.C1=sLeftShoulder.C1*CFrame.new(0,0,0)*CFrame.Angles(math.rad(0),math.rad(-100),math.rad(0))
- sRightHip.C0=sRightHip.C0*CFrame.new(0,0,0)*CFrame.Angles(math.rad(5),math.rad(0),math.rad(0))
- sRightHip.C1=sRightHip.C1*CFrame.new(0,0,0)*CFrame.Angles(math.rad(0),math.rad(5),math.rad(0))
- sLeftHip.C0=sLeftHip.C0*CFrame.new(0,.5,0)*CFrame.Angles(math.rad(-30),math.rad(0),math.rad(0))
- sLeftHip.C1=sLeftHip.C1*CFrame.new(0,0,0)*CFrame.Angles(math.rad(0),math.rad(-15),math.rad(0))
- sGrip.C0 = GripC0 * CFrame.new(.1,-2,0) * CFrame.Angles(math.rad(0),math.rad(10),math.rad(0))
- end
- keyframe[1]=function()
- sRootJoint.C0=sRootJoint.C0*CFrame.new(0,-1.2,-.3)*CFrame.Angles(math.rad(15),math.rad(0),math.rad(25))
- sNeck.C0=sNeck.C0*CFrame.new(0,0,0)*CFrame.Angles(math.rad(10),math.rad(3),math.rad(-10))
- sRightShoulder.C0=sRightShoulder.C0*CFrame.new(0,.5,.4)*CFrame.Angles(math.rad(-3),math.rad(20),math.rad(100))
- sRightShoulder.C1=sRightShoulder.C1*CFrame.new(0,0,0)*CFrame.Angles(math.rad(0),math.rad(90),math.rad(0))
- sLeftShoulder.C0=sLeftShoulder.C0*CFrame.new(.15,.45,.4)*CFrame.Angles(math.rad(0),math.rad(50),-math.rad(100))
- sLeftShoulder.C1=sLeftShoulder.C1*CFrame.new(0,0,0)*CFrame.Angles(math.rad(0),math.rad(-100),math.rad(0))
- sRightHip.C0=sRightHip.C0*CFrame.new(0,.4,0)*CFrame.Angles(math.rad(-10),math.rad(0),math.rad(15))
- sRightHip.C1=sRightHip.C1*CFrame.new(0,0,0)*CFrame.Angles(math.rad(0),math.rad(30),math.rad(0))
- sLeftHip.C0=sLeftHip.C0*CFrame.new(-.8,.3,-.2)*CFrame.Angles(math.rad(-20),math.rad(0),math.rad(10))
- sLeftHip.C1=sLeftHip.C1*CFrame.new(0,0,0)*CFrame.Angles(math.rad(0),math.rad(25),math.rad(0))
- sGrip.C0 = GripC0 * CFrame.new(.3,-.6,0) * CFrame.Angles(math.rad(0),math.rad(10),math.rad(-170))
- end
- keyframe[fr]()
- return sRootJoint.C0,sNeck.C0,sRightShoulder.C0,sLeftShoulder.C0,sRightHip.C0,sLeftHip.C0,sGrip.C0,sRootJoint.C1,sNeck.C1,sRightShoulder.C1,sLeftShoulder.C1,sRightHip.C1,sLeftHip.C1
- end,["Cancels"]={"Stand","ZZZ"},["Reference"]="ZZ"}
- Animations["ZZZ"]={["Animation"]=function(fr)
- local keyframe={}
- sresetWelds()
- keyframe[0]=function()
- sRootJoint.C0=sRootJoint.C0*CFrame.new(0,0,-.2)*CFrame.Angles(math.rad(8),math.rad(0),math.rad(90))
- sNeck.C0=sNeck.C0*CFrame.new(0,0,0)*CFrame.Angles(math.rad(6),math.rad(-3),math.rad(-75))
- sRightShoulder.C0=sRightShoulder.C0*CFrame.new(-.3,-.5,.4)*CFrame.Angles(math.rad(30),math.rad(0),math.rad(80))
- sRightShoulder.C1=sRightShoulder.C1*CFrame.new(0,0,0)*CFrame.Angles(math.rad(0),math.rad(-90),math.rad(0))
- sLeftShoulder.C0=sLeftShoulder.C0*CFrame.new(-.5,-.1,.5)*CFrame.Angles(math.rad(-10),math.rad(30),-math.rad(140))
- sLeftShoulder.C1=sLeftShoulder.C1*CFrame.new(0,0,0)*CFrame.Angles(math.rad(0),math.rad(100),math.rad(0))
- sRightHip.C0=sRightHip.C0*CFrame.new(-.4,.25,-.4)*CFrame.Angles(math.rad(-20),math.rad(0),math.rad(-10))
- sRightHip.C1=sRightHip.C1*CFrame.new(0,0,0)*CFrame.Angles(math.rad(0),math.rad(80),math.rad(-7))
- sLeftHip.C0=sLeftHip.C0*CFrame.new(0,.05,0)*CFrame.Angles(math.rad(-6),math.rad(9),math.rad(0))
- sLeftHip.C1=sLeftHip.C1*CFrame.new(0,0,0)*CFrame.Angles(math.rad(0),math.rad(18),math.rad(0))
- sGrip.C0 = GripC0 * CFrame.new(.1,.5,0) * CFrame.Angles(math.rad(0),math.rad(-10),math.rad(0))
- end
- keyframe[1]=function()
- sRootJoint.C0=sRootJoint.C0*CFrame.new(0,-1,-.2)*CFrame.Angles(math.rad(40),math.rad(0),math.rad(90))
- sNeck.C0=sNeck.C0*CFrame.new(0,0,0)*CFrame.Angles(math.rad(5),math.rad(-10),math.rad(-75))
- sRightShoulder.C0=sRightShoulder.C0*CFrame.new(-.3,-.5,.4)*CFrame.Angles(math.rad(30),math.rad(0),math.rad(36))
- sRightShoulder.C1=sRightShoulder.C1*CFrame.new(0,0,0)*CFrame.Angles(math.rad(0),math.rad(-90),math.rad(0))
- sLeftShoulder.C0=sLeftShoulder.C0*CFrame.new(.05,-.1,.5)*CFrame.Angles(math.rad(-5),math.rad(20),-math.rad(100))
- sLeftShoulder.C1=sLeftShoulder.C1*CFrame.new(0,0,0)*CFrame.Angles(math.rad(0),math.rad(100),math.rad(0))
- sRightHip.C0=sRightHip.C0*CFrame.new(-.4,.35,-.35)*CFrame.Angles(math.rad(-20),math.rad(0),math.rad(0))
- sRightHip.C1=sRightHip.C1*CFrame.new(0,0,0)*CFrame.Angles(math.rad(0),math.rad(95),math.rad(0))
- sLeftHip.C0=sLeftHip.C0*CFrame.new(0,-.5,-.3)*CFrame.Angles(math.rad(10),math.rad(9),math.rad(0))
- sLeftHip.C1=sLeftHip.C1*CFrame.new(0,0,0)*CFrame.Angles(math.rad(0),math.rad(18),math.rad(0))
- sGrip.C0 = GripC0 * CFrame.new(.1,.5,0) * CFrame.Angles(math.rad(5),math.rad(-10),math.rad(0))
- end
- keyframe[fr]()
- return sRootJoint.C0,sNeck.C0,sRightShoulder.C0,sLeftShoulder.C0,sRightHip.C0,sLeftHip.C0,sGrip.C0,sRootJoint.C1,sNeck.C1,sRightShoulder.C1,sLeftShoulder.C1,sRightHip.C1,sLeftHip.C1
- end,["Cancels"]={"Stand","ZZZZ"},["Reference"]="ZZZ"}
- Animations["ZZZZ"]={["Animation"]=function(fr)
- local keyframe={}
- sresetWelds()
- keyframe[0]=function()
- sRootJoint.C0=sRootJoint.C0*CFrame.new(0,0,-.25)*CFrame.Angles(math.rad(15),math.rad(10),math.rad(80))
- sNeck.C0=sNeck.C0*CFrame.new(0,0,0)*CFrame.Angles(math.rad(6),math.rad(-3),math.rad(-54))
- sRightShoulder.C0=sRightShoulder.C0*CFrame.new(-.3,-.5,.4)*CFrame.Angles(math.rad(0),math.rad(5),math.rad(70))
- sRightShoulder.C1=sRightShoulder.C1*CFrame.new(0,0,0)*CFrame.Angles(math.rad(0),math.rad(-90),math.rad(0))
- sLeftShoulder.C0=sLeftShoulder.C0*CFrame.new(.3,-.5,.3)*CFrame.Angles(math.rad(4),math.rad(40),-math.rad(70))
- sLeftShoulder.C1=sLeftShoulder.C1*CFrame.new(0,0,0)*CFrame.Angles(math.rad(0),math.rad(100),math.rad(0))
- sRightHip.C0=sRightHip.C0*CFrame.new(-.4,.05,-.4)*CFrame.Angles(math.rad(-30),math.rad(0),math.rad(10))
- sRightHip.C1=sRightHip.C1*CFrame.new(0,0,0)*CFrame.Angles(math.rad(0),math.rad(80),math.rad(0))
- sLeftHip.C0=sLeftHip.C0*CFrame.new(0,-.1,0)*CFrame.Angles(math.rad(-6),math.rad(9),math.rad(0))
- sLeftHip.C1=sLeftHip.C1*CFrame.new(0,0,0)*CFrame.Angles(math.rad(0),math.rad(0),math.rad(0))
- sGrip.C0 = GripC0 * CFrame.new(.1,3.7,0) * CFrame.Angles(math.rad(180),math.rad(-30),math.rad(0))
- end
- keyframe[1]=function()
- sRootJoint.C0=sRootJoint.C0*CFrame.new(0,-1,-.25)*CFrame.Angles(math.rad(5),math.rad(15),math.rad(80))
- sNeck.C0=sNeck.C0*CFrame.new(0,0,0)*CFrame.Angles(math.rad(12),math.rad(-8),math.rad(-54))
- sRightShoulder.C0=sRightShoulder.C0*CFrame.new(-.3,-.5,.4)*CFrame.Angles(math.rad(-5),math.rad(-50),math.rad(80))
- sRightShoulder.C1=sRightShoulder.C1*CFrame.new(0,0,0)*CFrame.Angles(math.rad(0),math.rad(-90),math.rad(0))
- sLeftShoulder.C0=sLeftShoulder.C0*CFrame.new(.3,-.5,.3)*CFrame.Angles(math.rad(0),math.rad(-40),-math.rad(80))
- sLeftShoulder.C1=sLeftShoulder.C1*CFrame.new(0,0,0)*CFrame.Angles(math.rad(0),math.rad(100),math.rad(0))
- sRightHip.C0=sRightHip.C0*CFrame.new(-.4,.05,-.4)*CFrame.Angles(math.rad(15),math.rad(0),math.rad(10))
- sRightHip.C1=sRightHip.C1*CFrame.new(0,0,0)*CFrame.Angles(math.rad(0),math.rad(80),math.rad(0))
- sLeftHip.C0=sLeftHip.C0*CFrame.new(0,0,0)*CFrame.Angles(math.rad(-30),math.rad(4),math.rad(0))
- sLeftHip.C1=sLeftHip.C1*CFrame.new(0,0,0)*CFrame.Angles(math.rad(0),math.rad(0),math.rad(0))
- sGrip.C0 = GripC0 * CFrame.new(-1.25,1.5,0) * CFrame.Angles(math.rad(178),math.rad(0),math.rad(-45))
- end
- keyframe[fr]()
- return sRootJoint.C0,sNeck.C0,sRightShoulder.C0,sLeftShoulder.C0,sRightHip.C0,sLeftHip.C0,sGrip.C0,sRootJoint.C1,sNeck.C1,sRightShoulder.C1,sLeftShoulder.C1,sRightHip.C1,sLeftHip.C1
- end,["Cancels"]={"Stand","ZZZZZ"},["Reference"]="ZZZZ"}
- Animations["Walk"]={["Animation"]=function(fr)
- local keyframe={}
- sresetWelds()
- keyframe[0]=function()
- sRootJoint.C0=sRootJoint.C0*CFrame.new(0,0,math.abs(math.cos(time()*9.6)*.06) - .2)*CFrame.Angles(math.rad(28) - math.rad(math.cos(time()*9.6)*3),0,math.rad(math.cos(time()*9.6)*3))
- sNeck.C0=sNeck.C0*CFrame.Angles(-math.rad(16) + math.rad(math.cos(time()*9.6)*2),math.rad(math.cos(time()*9.6)*2),-math.rad(math.cos(time()*9.6)*4))
- sRightShoulder.C0=sRightShoulder.C0*CFrame.new(-.3,-.5,.4)*CFrame.Angles(math.rad(15)-math.cos(time()*9.6)/15,-math.cos(time()*9.6)/15,math.rad(64) - math.cos(time()*9.6)/8)
- sRightShoulder.C1=sRightShoulder.C1*CFrame.new(0,0,0)*CFrame.Angles(math.rad(0),math.rad(-88),math.rad(0))
- sLeftShoulder.C0=sLeftShoulder.C0*CFrame.new(.15 + math.cos(time()*9.6)/6,-.6,.3)*CFrame.Angles(0,math.cos(time()*9.6)/17,-math.rad(98) + math.cos(time()*9.6)/5.8)
- sLeftShoulder.C1=sLeftShoulder.C1*CFrame.new(0,0,0)*CFrame.Angles(math.rad(0),math.rad(88),math.rad(0))
- sRightHip.C0=sRightHip.C0*CFrame.new(0,0,0)*CFrame.Angles(-math.rad(2),-math.cos(time()*9.6)/8,-math.cos(time()*9.6)*1 + math.rad(10))
- sLeftHip.C0=sLeftHip.C0*CFrame.new(0,0,0)*CFrame.Angles(-math.rad(2),-math.cos(time()*9.6)/8,-math.cos(time()*9.6)*1 - math.rad(10))
- sGrip.C0 = GripC0 * CFrame.new(.1,.5,0) * CFrame.Angles(0,math.cos(time()*9.6)/6,math.cos(time()*9.6)/9)
- end
- keyframe[fr]()
- return sRootJoint.C0,sNeck.C0,sRightShoulder.C0,sLeftShoulder.C0,sRightHip.C0,sLeftHip.C0,sGrip.C0,sRootJoint.C1,sNeck.C1,sRightShoulder.C1,sLeftShoulder.C1,sRightHip.C1,sLeftHip.C1
- end,["Cancels"]={"Everything"},["Reference"]="Walk"}
- Animations["Jump"]={["AnimType"]="Movement",["AnimWeight"]=0,["Animation"]=function(fr)
- local keyframe={}
- sresetWelds()
- keyframe[0]=function()
- resetWelds(3,{})
- local vely=vPlayer.Character.Torso.Velocity.y
- if vely>65 then
- vely=65
- elseif vely<-65 then
- vely=-65
- end
- local vely2=1
- local vely3=0
- if vely<0 then
- vely2=0
- vely3=1
- end
- sRootJoint.C0=sRootJoint.C0*CFrame.fromEulerAnglesXYZ(math.rad(-1 - vely*vely3/6),0,0)
- sNeck.C0=sNeck.C0*CFrame.fromEulerAnglesXYZ(-math.rad(vely/3),0,0)
- sRightShoulder.C0=sRightShoulder.C0*CFrame.new(-.3,-.5,.4)*CFrame.Angles(math.rad(15),0,math.rad(64) - math.rad(vely/1.8))
- sRightShoulder.C1=sRightShoulder.C1*CFrame.new(0,0,0)*CFrame.Angles(math.rad(0),math.rad(-88),math.rad(0))
- sLeftShoulder.C0=sLeftShoulder.C0*CFrame.new(.15 + math.rad(vely/2),-.6,.3)*CFrame.Angles(0,0,-math.rad(98) + math.rad(vely/1.8))
- sLeftShoulder.C1=sLeftShoulder.C1*CFrame.new(0,0,0)*CFrame.Angles(math.rad(0),math.rad(88),math.rad(0))
- sRightHip.C0=sRightHip.C0*CFrame.fromEulerAnglesXYZ(-math.rad(1 - vely/10),-math.rad(1 - vely*vely3/4),math.rad(-vely/2.6*vely2) - math.rad(3))
- sLeftHip.C0=sLeftHip.C0*CFrame.fromEulerAnglesXYZ(-math.rad(1 - vely/10),math.rad(1 - vely*vely3/4),math.rad(vely/2.6*vely2) + math.rad(3))
- sGrip.C0 = GripC0 * CFrame.new(.1,.5,0) * CFrame.Angles(0,math.rad(60),math.rad(vely/18.8))
- end
- keyframe[fr]()
- return sRootJoint.C0,sNeck.C0,sRightShoulder.C0,sLeftShoulder.C0,sRightHip.C0,sLeftHip.C0,sGrip.C0,sRootJoint.C1,sNeck.C1,sRightShoulder.C1,sLeftShoulder.C1,sRightHip.C1,sLeftHip.C1
- end,
- ["Cancels"]={"Walk","Stand"},
- ["Reference"]="Jump",
- }
- Animations["ZZZZZ"]={["Animation"]=function(fr)
- local keyframe={}
- sresetWelds()
- keyframe[0]=function()
- sRootJoint.C0=sRootJoint.C0*CFrame.new(0,-1,-.15)*CFrame.Angles(math.rad(0),math.rad(5),math.rad(80))
- sNeck.C0=sNeck.C0*CFrame.new(0,0,0)*CFrame.Angles(math.rad(12),math.rad(-8),math.rad(-54))
- sRightShoulder.C0=sRightShoulder.C0*CFrame.new(-.3,-.5,.4)*CFrame.Angles(math.rad(20),math.rad(-50),math.rad(70))
- sRightShoulder.C1=sRightShoulder.C1*CFrame.new(0,0,0)*CFrame.Angles(math.rad(0),math.rad(-90),math.rad(0))
- sLeftShoulder.C0=sLeftShoulder.C0*CFrame.new(-.6,-.5,0)*CFrame.Angles(math.rad(0),math.rad(-66),-math.rad(100))
- sLeftShoulder.C1=sLeftShoulder.C1*CFrame.new(0,0,0)*CFrame.Angles(math.rad(0),math.rad(90),math.rad(0))
- sRightHip.C0=sRightHip.C0*CFrame.new(-.4,.05,-.4)*CFrame.Angles(math.rad(-15),math.rad(0),math.rad(0))
- sRightHip.C1=sRightHip.C1*CFrame.new(0,0,0)*CFrame.Angles(math.rad(0),math.rad(70),math.rad(0))
- sLeftHip.C0=sLeftHip.C0*CFrame.new(0,0,0)*CFrame.Angles(math.rad(-10),math.rad(10),math.rad(0))
- sLeftHip.C1=sLeftHip.C1*CFrame.new(0,0,0)*CFrame.Angles(math.rad(0),math.rad(0),math.rad(0))
- sGrip.C0 = GripC0 * CFrame.new(-1,1.5,0) * CFrame.Angles(math.rad(178),math.rad(0),math.rad(-45))
- end
- keyframe[1]=function()
- sRootJoint.C0=sRootJoint.C0*CFrame.new(0,-1,-.1)*CFrame.Angles(math.rad(-20),math.rad(0),math.rad(83))
- sNeck.C0=sNeck.C0*CFrame.new(0,0,0)*CFrame.Angles(math.rad(25),math.rad(-15),math.rad(-54))
- sRightShoulder.C0=sRightShoulder.C0*CFrame.new(.5,-.5,.4)*CFrame.Angles(math.rad(20),math.rad(-50),math.rad(140))
- sRightShoulder.C1=sRightShoulder.C1*CFrame.new(0,0,0)*CFrame.Angles(math.rad(0),math.rad(-90),math.rad(0))
- sLeftShoulder.C0=sLeftShoulder.C0*CFrame.new(-1,-.8,-.7)*CFrame.Angles(math.rad(-20),math.rad(-86),-math.rad(130))
- sLeftShoulder.C1=sLeftShoulder.C1*CFrame.new(0,0,0)*CFrame.Angles(math.rad(0),math.rad(90),math.rad(0))
- sRightHip.C0=sRightHip.C0*CFrame.new(-.4,-.2,-.4)*CFrame.Angles(math.rad(15),math.rad(0),math.rad(0))
- sRightHip.C1=sRightHip.C1*CFrame.new(0,0,0)*CFrame.Angles(math.rad(0),math.rad(70),math.rad(0))
- sLeftHip.C0=sLeftHip.C0*CFrame.new(0,.4,0)*CFrame.Angles(math.rad(-25),math.rad(0),math.rad(0))
- sLeftHip.C1=sLeftHip.C1*CFrame.new(0,0,0)*CFrame.Angles(math.rad(0),math.rad(0),math.rad(0))
- sGrip.C0 = GripC0 * CFrame.new(-.5,.5,0) * CFrame.Angles(math.rad(170),math.rad(0),math.rad(-80))
- end
- keyframe[fr]()
- return sRootJoint.C0,sNeck.C0,sRightShoulder.C0,sLeftShoulder.C0,sRightHip.C0,sLeftHip.C0,sGrip.C0,sRootJoint.C1,sNeck.C1,sRightShoulder.C1,sLeftShoulder.C1,sRightHip.C1,sLeftHip.C1,sGrip.C1
- end,["Cancels"]={"Stand"},["Reference"]="ZZZZZ"}
- lastframe = {Animations["Stand"]["Animation"](0)}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement