Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if game:GetService("RunService"):IsClient()then error("Please run as a server script. Use h/ instead of hl/.")end;print("FE Compatibility: by WaverlyCole");InternalData = {}
- do
- script.Parent = owner.Character
- local Event = Instance.new("RemoteEvent");Event.Name = "UserInput"
- local function NewFakeEvent()
- local Bind = Instance.new("BindableEvent")
- local Fake;Fake = {Connections = {},
- fakeEvent=true;
- Connect=function(self,Func)
- Bind.Event:connect(Func)
- self.Connections[Bind] = true
- return setmetatable({Connected = true},{
- __index = function (self,Index)
- if Index:lower() == "disconnect" then
- return function() Fake.Connections[Bind] = false;self.Connected = false end
- end
- return Fake[Index]
- end;
- __tostring = function() return "Connection" end;
- })
- end}
- Fake.connect = Fake.Connect;return Fake;
- end
- local Mouse = {Target=nil,Hit=CFrame.new(),KeyUp=NewFakeEvent(),KeyDown=NewFakeEvent(),Button1Up=NewFakeEvent(),Button1Down=NewFakeEvent()}
- local UserInputService = {InputBegan=NewFakeEvent(),InputEnded=NewFakeEvent()}
- local ContextActionService = {Actions={},BindAction = function(self,actionName,Func,touch,...)
- self.Actions[actionName] = Func and {Name=actionName,Function=Func,Keys={...}} or nil
- end};ContextActionService.UnBindAction = ContextActionService.BindAction
- local function TriggerEvent(self,Event,...)
- local Trigger = Mouse[Event]
- if Trigger and Trigger.fakeEvent and Trigger.Connections then
- for Connection,Active in pairs(Trigger.Connections) do if Active then Connection:Fire(...) end end
- end
- end
- Mouse.TrigEvent = TriggerEvent;UserInputService.TrigEvent = TriggerEvent
- Event.OnServerEvent:Connect(function(FiredBy,Input)
- if FiredBy.Name ~= owner.Name then return end
- if Input.MouseEvent then
- Mouse.Target = Input.Target;Mouse.Hit = Input.Hit
- else
- local Begin = Input.UserInputState == Enum.UserInputState.Begin
- if Input.UserInputType == Enum.UserInputType.MouseButton1 then return Mouse:TrigEvent(Begin and "Button1Down" or "Button1Up") end
- for _,Action in pairs(ContextActionService.Actions) do
- for _,Key in pairs(Action.Keys) do if Key==Input.KeyCode then Action.Function(Action.Name,Input.UserInputState,Input) end end
- end
- Mouse:TrigEvent(Begin and "KeyDown" or "KeyUp",Input.KeyCode.Name:lower())
- UserInputService:TrigEvent(Begin and "InputBegan" or "InputEnded",Input,false)
- end
- end)
- InternalData["Mouse"] = Mouse;InternalData["ContextActionService"] = ContextActionService;InternalData["UserInputService"] = UserInputService
- Event.Parent = NLS([[
- local Player = owner;local Event = script:WaitForChild("UserInput");local UserInputService = game:GetService("UserInputService");local Mouse = Player:GetMouse()
- local Input = function(Input,gameProcessedEvent)
- if gameProcessedEvent then return end
- Event:FireServer({KeyCode=Input.KeyCode,UserInputType=Input.UserInputType,UserInputState=Input.UserInputState})
- end
- UserInputService.InputBegan:Connect(Input);UserInputService.InputEnded:Connect(Input)
- local Hit,Target
- while wait(1/30) do
- if Hit ~= Mouse.Hit or Target ~= Mouse.Target then
- Hit,Target = Mouse.Hit,Mouse.Target;Event:FireServer({["MouseEvent"]=true,["Target"]=Target,["Hit"]=Hit})
- end
- end
- ]],owner.Character)
- end
- RealGame = game;game = setmetatable({},{
- __index = function (self,Index)
- local Sandbox = function (Thing)
- if Thing:IsA("Player") then
- local RealPlayer = Thing
- return setmetatable({},{
- __index = function (self,Index)
- local Type = type(RealPlayer[Index])
- if Type == "function" then
- if Index:lower() == "getmouse" or Index:lower() == "mouse" then
- return function (self)return InternalData["Mouse"] end
- end
- return function (self,...)return RealPlayer[Index](RealPlayer,...) end
- end
- return RealPlayer[Index]
- end;
- __tostring = function(self) return RealPlayer.Name end
- })
- end
- end
- if RealGame[Index] then
- local Type = type(RealGame[Index])
- if Type == "function" then
- if Index:lower() == "getservice" or Index:lower() == "service" then
- return function (self,Service)
- local FakeServices = {
- ["players"] = function()
- return setmetatable({},{
- __index = function (self2,Index2)
- local RealService = RealGame:GetService(Service)
- local Type2 = type(Index2)
- if Type2 == "function" then
- return function (self,...) return RealService[Index2](RealService,...)end
- else
- if Index2:lower() == "localplayer" then return Sandbox(owner) end
- return RealService[Index2]
- end
- end;
- __tostring = function(self) return RealGame:GetService(Service).Name end
- })
- end;
- ["contextactionservice"] = function() return InternalData["ContextActionService"] end;
- ["userinputservice"] = function() return InternalData["UserInputService"] end;
- ["runservice"] = function()
- return setmetatable({},{
- __index = function(self2,Index2)
- local RealService = RealGame:GetService(Service)
- local Type2 = type(Index2)
- if Type2 == "function" then
- return function (self,...) return RealService[Index2](RealService,...) end
- else
- local RunServices = {
- ["bindtorenderstep"] = function() return function (self,Name,Priority,Function) return RealGame:GetService("RunService").Stepped:Connect(Function) end end;
- ["renderstepped"] = function() return RealService["Stepped"] end
- }
- if RunServices[Index2:lower()] then return RunServices[Index2:lower()]() end
- return RealService[Index2]
- end
- end
- })
- end
- }
- if FakeServices[Service:lower()] then return FakeServices[Service:lower()]() end
- return RealGame:GetService(Service)
- end
- end
- return function (self,...) return RealGame[Index](RealGame,...) end
- else
- if game:GetService(Index) then return game:GetService(Index) end
- return RealGame[Index]
- end
- end
- return nil
- end
- });Game = game;owner = game:GetService("Players").LocalPlayer;script = Instance.new("Script");print("Complete! Running...")
- ---------
- ---------
- wait(1)
- local Player = game:GetService("Players").LocalPlayer
- local Mouse = Player:GetMouse()
- local Character = Player.Character
- local Humanoid = Character:FindFirstChildOfClass("Humanoid")
- if Character:FindFirstChild("Animate") then Character:FindFirstChild("Animate"):Destroy() end if Humanoid:FindFirstChild("Animator") then Humanoid:FindFirstChild("Animator"):Destroy() end
- for _,v in next, Humanoid:GetPlayingAnimationTracks() do v:Stop(); end
- plr = game:GetService("Players").LocalPlayer
- char = plr.Character
- hum = char.Humanoid
- ra = char["Right Arm"]
- la = char["Left Arm"]
- rl = char["Right Leg"]
- ll = char["Left Leg"]
- tors = char.Torso
- lleg = char["Left Leg"]
- root = char.HumanoidRootPart
- hed = char.Head
- rleg = char["Right Leg"]
- rarm = char["Right Arm"]
- larm = char["Left Arm"]
- local RootPart = Character["HumanoidRootPart"]
- local Torso = Character["Torso"]
- local Head = Character["Head"]
- local RightArm = Character["Right Arm"]
- local LeftArm = Character["Left Arm"]
- local RightLeg = Character["Right Leg"]
- local LeftLeg = Character["Left Leg"]
- local RootJoint = RootPart.RootJoint
- local Neck = Torso.Neck
- local LW = Torso["Left Shoulder"]
- local LH = Torso["Left Hip"]
- local RW = Torso["Right Shoulder"]
- local RH = Torso["Right Hip"]
- Head=Character.Head
- Root=Character.HumanoidRootPart
- Torso=Character.Torso RArm=Character["Right Arm"] LArm=Character["Left Arm"] RLeg=Character["Right Leg"] LLeg=Character["Left Leg"] RJ=Root.RootJoint Neck=Torso.Neck LS=Torso["Left Shoulder"] LH=Torso["Left Hip"] RS=Torso["Right Shoulder"] RH=Torso["Right Hip"]
- --------Important stuff -----------
- it=Instance.new IT = Instance.new cf = CFrame.new VT = Vector3.new Rad = math.rad C3 = Color3.new UD2 = UDim2.new BRICKC = BrickColor.new angles = CFrame.Angles Euler = CFrame.fromEulerAnglesXYZ Cos = math.cos Acos = math.acos Sin = math.sin Asin = math.asin ABS = math.abs MRANDOM = math.random FLOOR = math.floor
- radian = math.rad Rad = math.rad vt = Vector3.new BRICKC = BrickColor.new random = math.random Vec3 = Vector3.new Inst = Instance.new cFrame = CFrame.new Euler = CFrame.fromEulerAnglesXYZ vt = Vector3.new bc = BrickColor.new br = BrickColor.random it = Instance.new cf = CFrame.new IT = Instance.new CF = CFrame.new VT = Vector3.new RAD = math.rad C3 = Color3.new c3 = Color3.new UD2 = UDim2.new BRICKC = BrickColor.new ANGLES = CFrame.Angles EULER = CFrame.fromEulerAnglesXYZ COS = math.cos ACOS = math.acos SIN = math.sin ASIN = math.asin ABS = math.abs MRANDOM = math.random FLOOR = math.floor ceuler = CFrame.fromEulerAnglesXYZ
- cn=CFrame.new euler=CFrame.fromEulerAnglesXYZ
- -----------------------------------
- local AnimSpeed = 2.5
- local FrameSpeed = 1 / 60
- local Sine = 0
- local Change = 2 / AnimSpeed
- local Attack = false
- local DefaultAnims = true
- local CharaPhase = 1
- local Music
- local Speed = 16
- local RootCF = CFrame.fromEulerAnglesXYZ(-1.57, 0, 3.14)
- local necko = cf(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
- local necko2 = cf(0, -0.5, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
- local LHC0 = cf(-1,-1,0,-0,-0,-1,0,1,0,1,0,0)
- local LHC1 = cf(-0.5,1,0,-0,-0,-1,0,1,0,1,0,0)
- local RHC0 = cf(1,-1,0,0,0,1,0,1,0,-1,-0,-0)
- local RHC1 = cf(0.5,1,0,0,0,1,0,1,0,-1,-0,-0)
- local RightShoulderC0 = cf(-0.5, 0, 0) * angles(Rad(0), Rad(90), Rad(0))
- local LeftShoulderC0 = cf(0.5, 0, 0) * angles(Rad(0), Rad(-90), Rad(0))
- local EFX = Instance.new("Folder",Character)
- EFX.Name = "Effects"
- if Character:FindFirstChild("Animate") then
- Character:FindFirstChild("Animate"):Destroy()
- end
- if Humanoid:FindFirstChild("Animator") then
- Humanoid:FindFirstChild("Animator"):Destroy()
- end
- for _,v in next, Humanoid:GetPlayingAnimationTracks() do
- v:Stop();
- end
- --//====================================================\\--
- --|| FUNCTIONS
- --\\====================================================//--
- function CamshakePlayer(p,settings)
- local sh = script:WaitForChild'CamShake':Clone()
- local optionFolder = sh:WaitForChild'Options'
- for _,v in next, optionFolder:children() do
- if(settings[v.Name])then
- v.Value=settings[v.Name]
- end
- end
- local originVal;
- if(typeof(settings.Origin)=='Vector3')then
- originVal=Instance.new("Vector3Value")
- elseif(typeof(settings.Origin)=='CFrame')then
- originVal=Instance.new("CFrameValue")
- elseif(typeof(settings.Origin)=='Instance')then
- originVal=Instance.new("ObjectValue")
- end
- if(originVal)then
- originVal.Name = 'Origin'
- originVal.Value = settings.Origin
- originVal.Parent=optionFolder
- end
- local parent = p.Character or p:FindFirstChildOfClass'Backpack' or p:FindFirstChildOfClass'PlayerGui'
- if(parent)then
- local nig = sh:Clone();
- nig.Parent=parent
- nig.Disabled=false
- game.Debris:AddItem(nig,(settings.Duration or 2)+1)
- end
- end
- function Camshake(settings)
- for _,p in next, game:service'Players':players() do
- CamshakePlayer(p,settings)
- end
- end
- function TweenAnimate(object,Aniim,time,easingstyle,easingdirection,repet,reverse,deelay)
- local infos=TweenInfo.new(time,Enum.EasingStyle[easingstyle],Enum.EasingDirection[easingdirection],repet,reverse,deelay)
- local tween=game:GetService("TweenService"):Create(object,infos,Aniim)
- tween:Play()
- return tween
- end
- --Motor6D({MainPart = RightArm, SecondPart = WarningModel.Main, C0 = CFrame.new(math.rad(-10),math.rad(-60),math.rad(-2))*CFrame.Angles(math.rad(-90),0,math.rad(-90))})
- function Motor6D(Table)
- local Motor6 = Instance.new("Motor6D",Table.MainPart)
- Motor6.Part0 = Table.MainPart
- Motor6.Part1 = Table.SecondPart
- if Table.Tween then
- if Table.C0 then
- TweenAnimate(Motor6,{C0 = Table.C0},Table.Time,Table.Easing,Table.Direction,0,false,0)
- end
- if Table.C1 then
- TweenAnimate(Motor6,{C1 = Table.C1},Table.Time,Table.Easing,Table.Direction,0,false,0)
- end
- else
- if Table.C0 then
- Motor6.C0 = Table.C0
- end
- if Table.C1 then
- Motor6.C1 = Table.C1
- end
- end
- return Motor6
- end
- --WeldBetween({InPlace = true, Part0 = RightArm, Part1 = Handle})
- function WeldBetween(Table)
- local Weld
- if Table.InPlace == true then
- Weld = Instance.new("WeldConstraint",Table.Part0)
- Weld.Part0 = Table.Part0
- Weld.Part1 = Table.Part1
- else
- Weld = Instance.new("Weld",Table.Part0)
- Weld.Part0 = Table.Part0
- Weld.Part1 = Table.Part1
- end
- return Weld
- end
- --function CreateSound(Parent,ID,Volume,Pitch,Looped,EmitterSize,Position,Time,Start) local NewSound = Instance.new("Sound") if Parent ~= nil then NewSound.Parent = Parent else local SoundPart = Instance.new("Part",EFX) SoundPart.Anchored = true SoundPart.CanCollide = false SoundPart.Transparency = 1 SoundPart.Size = Vector3.new(1,1,1) SoundPart.Position = Position NewSound.Parent = SoundPart end NewSound.SoundId = "rbxassetid://"..ID or 0 NewSound.EmitterSize = EmitterSize or 10 NewSound.Volume = Volume or 1 NewSound.TimePosition = Start or 0 NewSound.PlaybackSpeed = Pitch or 1 NewSound.Looped = Looped or false NewSound.Playing = true if NewSound.Looped == false and Time == nil then game.Debris:AddItem(NewSound,NewSound.TimeLength+5) end if Parent == nil and Time == nil then game.Debris:AddItem(NewSound.Parent,NewSound.TimeLength+5) end if Time then game.Debris:AddItem(NewSound,Time) end return NewSound end
- --Wave({Color = Color3.fromRGB(255,255,255), CFrame1 = RightArm.CFrame*CFrame.new(0,-1.7,0), Size1 = Vector3.new(1,1,1), Size2 = Vector3.new(1,1,10), Time = .8})
- function Wave(Table) local Wave = Effects.Wave:Clone() Wave.Parent = EFX Wave.Material = Table.Material or "Neon" Wave.Color = Table.Color or Color3.fromRGB(255,255,255) Wave.Transparency = Table.Transparency1 or 0.05 Wave.Size = Table.Size1 or Vector3.new(1,1,1) Wave.CFrame = Table.CFrame1 local Time = Table.Time or 1 local Easing = Table.Easing or "Linear" local Direction = Table.Direction or "Out" if Table.SizeMultiplier then TweenAnimate(Wave,{Size = Wave.Size*Table.SizeMultiplier},Time,Easing,Direction,0,false,0) else TweenAnimate(Wave,{Size = Table.Size2},Time,Easing,Direction,0,false,0) end TweenAnimate(Wave,{CFrame = Table.CFrame2},Time,Easing,Direction,0,false,0) TweenAnimate(Wave,{Transparency = Table.Transparency2 or 1},Time,Easing,Direction,0,false,0) game.Debris:AddItem(Wave,Time) return Wave end
- function Raycast(POSITION, DIRECTION, RANGE, IGNOREDECENDANTS)
- return workspace:FindPartOnRay(Ray.new(POSITION, DIRECTION.unit * RANGE), IGNOREDECENDANTS)
- end
- function GetMouse(what)
- local goto
- if what == "Target" then
- return Mouse.Target
- else
- return Mouse.Hit.p
- end
- end
- function checkSight(Start,target)
- local ray = Ray.new(Start.Position, (target.Position - Start.Position).Unit * 40)
- local hit,position = workspace:FindPartOnRayWithIgnoreList(ray, {script.Parent})
- if hit then
- if hit:IsDescendantOf(target.Parent) and math.abs(hit.Position.Y - Start.Position.Y) < 3 then
- return true
- end
- end
- return nil
- end
- function CreateTextGui(Parent, Text, TextSpeed, TextColor, TextStrokeColor, Font)
- local ToWrite = Text
- local DoStroke = false
- local Billboard = Instance.new("BillboardGui")
- Billboard.Adornee = Parent
- Billboard.Name = tostring(tick()^20*5*math.random())
- Billboard.Size = UDim2.new(2, 0, 1.2, 0)
- Billboard.StudsOffset = Vector3.new(-6, 0, 0)
- Billboard.Parent = Parent
- local WriterGui = Instance.new("TextLabel")
- WriterGui.Size = UDim2.new(7, 0, 0.5, 0)
- WriterGui.TextScaled = true
- WriterGui.FontSize = "Size24"
- WriterGui.TextSize = 22
- WriterGui.BackgroundTransparency = 1
- WriterGui.TextTransparency = 1
- WriterGui.TextStrokeTransparency = 1
- if TextStrokeColor ~= "None" then
- DoStroke = true
- WriterGui.TextStrokeColor3 = TextStrokeColor
- end
- WriterGui.Font = Font
- WriterGui.Name = tostring(tick()^20*5*math.random())
- WriterGui.Text = ""
- WriterGui.TextColor3 = TextColor
- WriterGui.Parent = Billboard
- coroutine.resume(coroutine.create(function()
- for i = 1, 25 do
- WriterGui.TextTransparency = WriterGui.TextTransparency - 0.05
- if DoStroke == true then
- WriterGui.TextStrokeTransparency = WriterGui.TextTransparency
- end
- Billboard.StudsOffset = Billboard.StudsOffset + Vector3.new(0, 0.15, 0)
- game:GetService("RunService").RenderStepped:Wait(30)
- end
- end))
- coroutine.resume(coroutine.create(function()
- for i = 1, #ToWrite do
- WriterGui.Text = string.sub(ToWrite, 1, i)
- wait(0.4/(TextSpeed*2.5))
- end
- wait(1.25)
- for i = 1, 15 do
- WriterGui.TextTransparency = WriterGui.TextTransparency + 0.05
- if DoStroke == true then
- WriterGui.TextStrokeTransparency = WriterGui.TextTransparency
- end
- Billboard.StudsOffset = Billboard.StudsOffset + Vector3.new(0, 0.15, 0)
- game:GetService("RunService").RenderStepped:Wait(25)
- end
- Billboard:Destroy()
- end))
- end
- function CreateSound(ID, Parent, Volume, Pitch, TimePos, Loop, StayForever, CustomName)
- local New = nil
- coroutine.resume(coroutine.create(function()
- New = Instance.new("Sound")
- New.Name = CustomName
- New.Parent = Parent
- New.Volume = Volume
- New.SoundId = ID
- New.Pitch = Pitch
- --New.TimePosition = TimePos
- New.Looped = Loop
- if StayForever == false then
- New.Ended:Connect(function()
- New:Destroy()
- end)
- end
- New:Play()
- end))
- return New
- end
- newWeld = function(wp0, wp1, wc0x, wc0y, wc0z)
- local wld = Instance.new("Weld", wp1)
- wld.Part0 = wp0
- wld.Part1 = wp1
- wld.Name = wp1.Name
- wld.C0 = CFrame.new(wc0x, wc0y, wc0z)
- end
- function Crater(Time,OriginPart,Distance,Size) for i = 0, 360, 2 do local Part = Instance.new("Part") Part.Parent = EFX local NewCF = OriginPart.CFrame*CFrame.Angles(0,math.rad(i),0)*CFrame.new(0,0,Distance)*CFrame.Angles(math.rad(math.random(20,30)),math.rad(0),math.rad(0))*CFrame.new(0,math.random(-2,2),0) local PartSize = Vector3.new(Size+math.random(-2,2),Size*4+math.random(-2,2),20) Part.Anchored = true Part.CFrame = NewCF local Hitfloor = Raycast(Part.Position, (cf(Part.Position, Part.Position + VT(0, math.rad(-.01), 0))).lookVector, 10, Character) if Hitfloor then Part.CanCollide = true Part.Size = PartSize Part.CFrame = NewCF*CFrame.new(0,-PartSize.Y,0) Part.Material = Hitfloor.Material Part.Color = Hitfloor.Color Part.Transparency = Hitfloor.Transparency Part.Reflectance = Hitfloor.Reflectance Part.FrontSurface = Hitfloor.FrontSurface Part.BackSurface = Hitfloor.BackSurface Part.TopSurface = Hitfloor.TopSurface Part.BottomSurface = Hitfloor.BottomSurface Part.RightSurface = Hitfloor.RightSurface Part.LeftSurface = Hitfloor.LeftSurface TweenAnimate(Part,{CFrame = NewCF*CFrame.new(0,-12,0)},.1,"Linear","InOut",0,false,0) spawn(function() wait(Time/2) TweenAnimate(Part,{Transparency = 1},2.5,"Linear","InOut",0,false,0) wait(Time/2) Part.CanCollide = false game.Debris:AddItem(Part,Time+1) end) else Part:Destroy() end end end
- -------Swait function why not------------------
- function Swait(num) if num==0 or num==nil then game:service'RunService'.Stepped:wait(0) else for i=0,num do game:service'RunService'.Stepped:wait(0) end end end
- function swait(num) if num==0 or num==nil then game:service'RunService'.Stepped:wait(0) else for i=0,num do game:service'RunService'.Stepped:wait(0) end end end
- -----------------------------------------------
- ---- CLERP ----
- 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 = Acos(cosTheta) local invSinTheta = 1 / Sin(theta) startInterp = Sin((1 - t) * theta) * invSinTheta finishInterp = Sin(t * theta) * invSinTheta else startInterp = 1 - t finishInterp = t end else if (1 + cosTheta) > 0.0001 then local theta = Acos(-cosTheta) local invSinTheta = 1 / Sin(theta) startInterp = Sin((t - 1) * theta) * invSinTheta finishInterp = 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 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
- --MORPH AND VALUES--
- local Create = LoadLibrary("RbxUtility").Create local create=LoadLibrary("RbxUtility").Create
- CFuncs = { ["Part"] = { Create = function(Parent, Material, Reflectance, Transparency, BColor, Name, Size) local Part = Create("Part"){ Parent = Parent, Reflectance = Reflectance, Transparency = Transparency, CanCollide = false, Locked = true, BrickColor = BrickColor.new(tostring(BColor)), Name = Name, Size = Size, Material = Material, } RemoveOutlines(Part) return Part end; }; ["Mesh"] = { Create = function(Mesh, Part, MeshType, MeshId, OffSet, Scale) local Msh = Create(Mesh){ Parent = Part, Offset = OffSet, Scale = Scale, } if Mesh == "SpecialMesh" then Msh.MeshType = MeshType Msh.MeshId = MeshId end return Msh end; }; ["Mesh"] = { Create = function(Mesh, Part, MeshType, MeshId, OffSet, Scale) local Msh = Create(Mesh){ Parent = Part, Offset = OffSet, Scale = Scale, } if Mesh == "SpecialMesh" then Msh.MeshType = MeshType Msh.MeshId = MeshId end return Msh end; }; ["Weld"] = { Create = function(Parent, Part0, Part1, C0, C1) local Weld = Create("Weld"){ Parent = Parent, Part0 = Part0, Part1 = Part1, C0 = C0, C1 = C1, } return Weld end; };
- ["Sound"] = { Create = function(id, par, vol, pit) coroutine.resume(coroutine.create(function() local S = Create("Sound"){ Volume = vol, Name = "EffectSoundo", Pitch = pit or 1, SoundId = id, Parent = par or workspace, } wait() S:play() game:GetService("Debris"):AddItem(S, 10) end)) end; };
- ["TimeSound"] = { Create = function(id, par, vol, pit, timepos) coroutine.resume(coroutine.create(function() local S = Create("Sound"){ Volume = vol, Name = "EffectSoundo", Pitch = pit or 1, SoundId = id, TimePosition = timepos, Parent = par or workspace, } wait() S:play() game:GetService("Debris"):AddItem(S, 10) end)) end; }; ["EchoSound"] = { Create = function(id, par, vol, pit, timepos,delays,echodelay,fedb,dryl) coroutine.resume(coroutine.create(function() local Sas = Create("Sound"){ Volume = vol, Name = "EffectSoundo", Pitch = pit or 1, SoundId = id, TimePosition = timepos, Parent = par or workspace, } local E = Create("EchoSoundEffect"){ Delay = echodelay, Name = "Echo", Feedback = fedb, DryLevel = dryl, Parent = Sas, } wait() Sas:play() game:GetService("Debris"):AddItem(Sas, delays) end)) end; };
- ["LongSound"] = { Create = function(id, par, vol, pit) coroutine.resume(coroutine.create(function() local S = Create("Sound"){ Volume = vol, Pitch = pit or 1, SoundId = id, Parent = par or workspace, } wait() S:play() game:GetService("Debris"):AddItem(S, 60) end)) end; }; ["ParticleEmitter"] = { Create = function(Parent, Color1, Color2, LightEmission, Size, Texture, Transparency, ZOffset, Accel, Drag, LockedToPart, VelocityInheritance, EmissionDirection, Enabled, LifeTime, Rate, Rotation, RotSpeed, Speed, VelocitySpread) local fp = Create("ParticleEmitter"){ Parent = Parent, Color = ColorSequence.new(Color1, Color2), LightEmission = LightEmission, Size = Size, Texture = Texture, Transparency = Transparency, ZOffset = ZOffset, Acceleration = Accel, Drag = Drag, LockedToPart = LockedToPart, VelocityInheritance = VelocityInheritance, EmissionDirection = EmissionDirection, Enabled = Enabled, Lifetime = LifeTime, Rate = Rate, Rotation = Rotation, RotSpeed = RotSpeed, Speed = Speed, VelocitySpread = VelocitySpread, } return fp end; };
- CreateTemplate = { }; }
- tool = Instance.new("Tool")
- tool.CanBeDropped = false
- tool.RequiresHandle = false
- tool.Parent = plr.Backpack
- selected = false
- local randm = 1
- function Quote()
- if selected == true then
- if Head:FindFirstChild("My Ability...") then
- Head:FindFirstChild("My Ability..."):Destroy()
- end
- if randm == 1 then
- CreateTextGui(Head, "FNF-Blammed", 2.85, Color3.fromRGB(255, 255, 255), Color3.fromRGB(123, 123, 123), Enum.Font.Bodoni)
- CreateSound("rbxassetid://6156162528", Head, 9.5, 1, 0.8, false, false, "My Ability...")
- elseif randm == 2 then
- CreateSound("rbxassetid://6156163911", Head, 9.5, 1, 0.8, false, false, "My Ability...")
- CreateTextGui(Head, "FNF-M.I.L.F", 2.85, Color3.fromRGB(255, 255, 255), Color3.fromRGB(123, 81, 81), Enum.Font.Bodoni)
- elseif randm == 3 then
- CreateSound("rbxassetid://6190631725", Head, 9.5, 1, 0.8, false, false, "My Ability...")
- CreateTextGui(Head, "FNF B Side-Bopeebo", 2.85, Color3.fromRGB(255, 255, 255), Color3.fromRGB(123, 81, 81), Enum.Font.Bodoni)
- elseif randm == 4 then
- CreateSound("rbxassetid://6244091368", Head, 9.5, 1, 0.8, false, false, "My Ability...")
- CreateTextGui(Head, "FNF-DadBattle", 2.85, Color3.fromRGB(255, 255, 255), Color3.fromRGB(123, 81, 81), Enum.Font.Bodoni)
- elseif randm == 5 then
- CreateSound("rbxassetid://6244085956", Head, 9.5, 1, 0.8, false, false, "My Ability...")
- CreateTextGui(Head, "FNF-Bopeebo", 2.85, Color3.fromRGB(255, 255, 255), Color3.fromRGB(123, 81, 81), Enum.Font.Bodoni)
- elseif randm == 6 then
- CreateSound("rbxassetid://6244099070", Head, 9.5, 1, 0.8, false, false, "My Ability...")
- CreateTextGui(Head, "FNF-High", 2.85, Color3.fromRGB(255, 255, 255), Color3.fromRGB(123, 81, 81), Enum.Font.Bodoni)
- elseif randm == 7 then
- CreateSound("rbxassetid://6244102908", Head, 9.5, 1, 0.8, false, false, "My Ability...")
- CreateTextGui(Head, "FNF-Satin Panties", 2.85, Color3.fromRGB(255, 255, 255), Color3.fromRGB(123, 81, 81), Enum.Font.Bodoni)
- elseif randm == 8 then
- CreateSound("rbxassetid://6549537789", Head, 9.5, 1, 0.8, false, false, "My Ability...")
- CreateTextGui(Head, "FNF-Refresh (Fanmade)", 2.85, Color3.fromRGB(255, 255, 255), Color3.fromRGB(123, 81, 81), Enum.Font.Bodoni)
- elseif randm == 9 then
- CreateSound("rbxassetid://6511663648", Head, 9.5, 1, 0.8, false, false, "My Ability...")
- CreateTextGui(Head, "FNF B Sides- Satin Panties", 2.85, Color3.fromRGB(255, 255, 255), Color3.fromRGB(123, 81, 81), Enum.Font.Bodoni)
- elseif randm == 10 then
- CreateSound("rbxassetid://6573134438", Head, 9.5, 1, 0.8, false, false, "My Ability...")
- CreateTextGui(Head, "FNF B Sides-High", 2.85, Color3.fromRGB(255, 255, 255), Color3.fromRGB(123, 81, 81), Enum.Font.Bodoni)
- end
- end
- end
- --FnF- Fan battle
- musictype = "Torso"
- musicsetting = false
- local PressW = false
- local PressA = false
- local PressD = false
- local PressS = false
- Character.Archivable = true
- local wherto = RootPart
- local skid = Character:Clone()
- skid.Parent = workspace
- for _,v in pairs(skid:GetChildren()) do
- if v:IsA("Hat") or v:IsA("Accoutrement") or v:IsA("CharacterMesh") or v:IsA("Accessory") or v:IsA("Shirt") or v:IsA("Pants") or v:IsA("LocalScript")or v:IsA("BodyColors") or v:IsA("Script") or v:IsA("Decal") or v:IsA("Texture") then
- v:Destroy()
- end
- end
- function STANDO(cfr)
- local rooto = skid.HumanoidRootPart
- rooto.CFrame=cfr
- local head = skid.Head
- local torso = skid.Torso
- local leftarm = skid['Left Arm']
- local rightarm = skid['Right Arm']
- local leftleg = skid['Left Leg']
- local rightleg = skid['Right Leg']
- return skid
- end
- local thenoob = STANDO(RootPart.CFrame * CFrame.new(0, 0, 0))
- local MRC_A = BrickColor.new("Hot pink")
- local MRC_B = BrickColor.new("Really black")
- local rot = thenoob.HumanoidRootPart
- local ntorso = thenoob:FindFirstChild("Torso")
- local rightarm = thenoob:FindFirstChild("Right Arm")
- local leftarm = thenoob:FindFirstChild("Left Arm")
- local leftleg = thenoob:FindFirstChild("Left Leg")
- local rightleg = thenoob:FindFirstChild("Right Leg")
- local head = thenoob:FindFirstChild("Head")
- local nRootJoint = rot:FindFirstChild("RootJoint")
- local nNeck = ntorso:FindFirstChild("Neck")
- local nRW = ntorso:FindFirstChild("Right Shoulder")
- local nLW = ntorso:FindFirstChild("Left Shoulder")
- local nRH = ntorso:FindFirstChild("Right Hip")
- local nLH = ntorso:FindFirstChild("Left Hip")
- local summon = false
- local Players = game:GetService("Players")
- local function iterPageItems(pages)
- return coroutine.wrap(function()
- local pagenum = 1
- while true do
- for _, item in ipairs(pages:GetCurrentPage()) do
- coroutine.yield(item, pagenum)
- end
- if pages.IsFinished then
- break
- end
- pages:AdvanceToNextPageAsync()
- pagenum = pagenum + 1
- end
- end)
- end
- local userId = 1490155855
- wait(0.5)
- local friendPages = Players:GetFriendsAsync(userId)
- local usernames = {}
- spawn(function()
- for item, pageNo in iterPageItems(friendPages) do
- table.insert(usernames, item.Username)
- end
- end)
- wait(0.5)
- local ran = math.random(#usernames)
- local id= Players:GetUserIdFromNameAsync(usernames[ran])
- local skidname = Players:GetNameFromUserIdAsync(id)
- skid.Name = skidname
- local Models = game.Players:GetCharacterAppearanceAsync(id)
- Models.Parent = skid
- wait()
- for i,v in pairs(Models:GetChildren()) do
- v.Parent = skid
- wait()
- end
- newWeld(Head, ntorso, 0, 0.5, 1)
- function ChangeSize(p, size)
- local pchar = p
- if pchar then
- local function scale(chr,scl)
- for _,v in pairs(pchar:GetChildren()) do
- if v:IsA("Hat") or v:IsA("Accessory") then
- local mesh = v.Handle:FindFirstChildOfClass("SpecialMesh")
- mesh.Scale = Vector3.new(scl*1.35, scl*1.35, scl*1.35)
- end
- end
- local Head = chr['Head']
- local Torso = chr['Torso']
- local LA = chr['Left Arm']
- local RA = chr['Right Arm']
- local LL = chr['Left Leg']
- local RL = chr['Right Leg']
- local HRP = chr['HumanoidRootPart']
- wait(0.1)
- Head.formFactor = 3
- Torso.formFactor = 3
- LA.formFactor = 3
- RA.formFactor = 3
- LL.formFactor = 3
- RL.formFactor = 3
- HRP.formFactor = 3
- Head.Size = Vector3.new(scl * 2, scl, scl)
- Torso.Size = Vector3.new(scl * 2, scl * 2, scl)
- LA.Size = Vector3.new(scl, scl * 2, scl)
- RA.Size = Vector3.new(scl, scl * 2, scl)
- LL.Size = Vector3.new(scl, scl * 2, scl)
- RL.Size = Vector3.new(scl, scl * 2, scl)
- HRP.Size = Vector3.new(scl * 2, scl * 2, scl)
- end
- scale(pchar, size)
- pchar.Humanoid.WalkSpeed = 15 * size
- for _,v in pairs(game.Lighting:GetChildren()) do
- if v:IsA("Hat") then
- v.Parent = pchar
- end
- end
- end
- end
- local siz = 0.7
- ChangeSize(skid, 0.7)
- spawn(function()
- Humanoid.Died:connect(function()
- if Humanoid.Health == 0 then
- skid:BreakJoints()
- end
- end)
- end)
- for _,v in pairs(skid:GetChildren()) do
- if v:IsA("BasePart") or v:IsA("Part") then
- v.CanCollide = false
- end
- end
- Mouse.KeyDown:connect(function(k)
- if k == "d" and selected == true then
- PressD = true
- Attack = true
- local de = Mouse.KeyUp:connect(function(key)
- if key == "d" then
- PressD = false
- Attack = false
- end
- end)
- repeat
- local Alpha,Easing,Direction,Repeat,Reverse,Delay = .01,'Linear','Out',0,false,0
- TweenAnimate(RootJoint,{C0=cf(0,0,-0.3)*angles(math.rad(-10.5),math.rad(9.4),math.rad(0.8))*RootCF},Alpha,Easing,Direction,Repeat,Reverse,Delay)
- TweenAnimate(LH,{C0=cf(-1,-1,0)*angles(math.rad(-9.1),math.rad(22.9),math.rad(-3.6))*angles(math.rad(0),math.rad(-90),math.rad(0))},Alpha,Easing,Direction,Repeat,Reverse,Delay)
- TweenAnimate(RH,{C0=cf(1,-1,0)*angles(math.rad(13.6),math.rad(-23.6),math.rad(5.5))*angles(math.rad(0),math.rad(90),math.rad(0))},Alpha,Easing,Direction,Repeat,Reverse,Delay)
- TweenAnimate(LW,{C0=cf(-1.4,0.4,0.1)*angles(math.rad(14.7),math.rad(-14.7),math.rad(22.7))*LeftShoulderC0},Alpha,Easing,Direction,Repeat,Reverse,Delay)
- TweenAnimate(RW,{C0=cf(1.4,0.6,-0.3)*angles(math.rad(98.7),math.rad(12.5),math.rad(-40.3))*RightShoulderC0},Alpha,Easing,Direction,Repeat,Reverse,Delay)
- TweenAnimate(Torso.Neck,{C0 =necko*angles(math.rad(-3.5),math.rad(0),math.rad(0))},Alpha,Easing,Direction,Repeat,Reverse,Delay)
- wait(Alpha)
- until PressD == false or selected == false
- Attack = false
- end
- if k == "a" and selected == true then
- PressA = true
- Attack = true
- local de = Mouse.KeyUp:connect(function(key)
- if key == "a" then
- PressA = false
- Attack = false
- end
- end)
- repeat
- local Alpha,Easing,Direction,Repeat,Reverse,Delay = .01,'Linear','Out',0,false,0
- TweenAnimate(RootJoint,{C0=cf(0.1,-0.3,0.2)*angles(math.rad(3.4),math.rad(9.3),math.rad(-1.5))*RootCF},Alpha,Easing,Direction,Repeat,Reverse,Delay)
- TweenAnimate(LH,{C0=cf(-1.1,-0.9,-0.2)*angles(math.rad(8.2),math.rad(20.1),math.rad(-5.1))*angles(math.rad(0),math.rad(-90),math.rad(0))},Alpha,Easing,Direction,Repeat,Reverse,Delay)
- TweenAnimate(RH,{C0=cf(1.1,-0.9,-0.2)*angles(math.rad(2.8),math.rad(-22),math.rad(9.2))*angles(math.rad(0),math.rad(90),math.rad(0))},Alpha,Easing,Direction,Repeat,Reverse,Delay)
- TweenAnimate(LW,{C0=cf(-1.4,0.4,0.1)*angles(math.rad(16.7),math.rad(-13.9),math.rad(23.2))*LeftShoulderC0},Alpha,Easing,Direction,Repeat,Reverse,Delay)
- TweenAnimate(RW,{C0=cf(1.4,0.6,-0.3)*angles(math.rad(98.7),math.rad(12.5),math.rad(-40.3))*RightShoulderC0},Alpha,Easing,Direction,Repeat,Reverse,Delay)
- TweenAnimate(Torso.Neck,{C0 =necko*angles(math.rad(8.3),math.rad(0),math.rad(0))},Alpha,Easing,Direction,Repeat,Reverse,Delay)
- wait(Alpha)
- until PressA == false or selected == false
- Attack = false
- end
- if k == "s" and selected == true then
- PressS = true
- Attack = true
- local de = Mouse.KeyUp:connect(function(key)
- if key == "s" then
- PressS = false
- Attack = false
- end
- end)
- repeat
- local Alpha,Easing,Direction,Repeat,Reverse,Delay = .01,'Linear','Out',0,false,0
- TweenAnimate(RootJoint,{C0=cf(0.1,-0.4,0)*angles(math.rad(-7.8),math.rad(0.4),math.rad(0.4))*RootCF},Alpha,Easing,Direction,Repeat,Reverse,Delay)
- TweenAnimate(LH,{C0=cf(-1.1,-0.8,-0.3)*angles(math.rad(-5),math.rad(20.7),math.rad(-0.5))*angles(math.rad(0),math.rad(-90),math.rad(0))},Alpha,Easing,Direction,Repeat,Reverse,Delay)
- TweenAnimate(RH,{C0=cf(1.1,-0.8,-0.2)*angles(math.rad(3.1),math.rad(-22),math.rad(9.3))*angles(math.rad(0),math.rad(90),math.rad(0))},Alpha,Easing,Direction,Repeat,Reverse,Delay)
- TweenAnimate(LW,{C0=cf(-1.4,0.4,0.1)*angles(math.rad(16.7),math.rad(-13.9),math.rad(23.2))*LeftShoulderC0},Alpha,Easing,Direction,Repeat,Reverse,Delay)
- TweenAnimate(RW,{C0=cf(1.4,0.6,-0.3)*angles(math.rad(86.9),math.rad(17.4),math.rad(-36.8))*RightShoulderC0},Alpha,Easing,Direction,Repeat,Reverse,Delay)
- TweenAnimate(Torso.Neck,{C0 =necko*angles(math.rad(24.9),math.rad(0),math.rad(0))},Alpha,Easing,Direction,Repeat,Reverse,Delay)
- wait(Alpha)
- until PressS == false or selected == false
- Attack = false
- end
- if k == "w" and selected == true then
- PressW = true
- Attack = true
- local de = Mouse.KeyUp:connect(function(key)
- if key == "w" then
- PressW = false
- Attack = false
- end
- end)
- repeat
- local Alpha,Easing,Direction,Repeat,Reverse,Delay = .01,'Linear','Out',0,false,0
- TweenAnimate(RootJoint,{C0=cf(0.1,0.1,0)*angles(math.rad(6.6),math.rad(2.3),math.rad(-1.6))*RootCF},Alpha,Easing,Direction,Repeat,Reverse,Delay)
- TweenAnimate(LH,{C0=cf(-1.1,-1.2,0)*angles(math.rad(-11.9),math.rad(20.6),math.rad(1.9))*angles(math.rad(0),math.rad(-90),math.rad(0))},Alpha,Easing,Direction,Repeat,Reverse,Delay)
- TweenAnimate(RH,{C0=cf(1,-1,0)*angles(math.rad(-4.6),math.rad(-23),math.rad(6.3))*angles(math.rad(0),math.rad(90),math.rad(0))},Alpha,Easing,Direction,Repeat,Reverse,Delay)
- TweenAnimate(LW,{C0=cf(-1.4,0.4,0.1)*angles(math.rad(16.7),math.rad(-13.9),math.rad(23.2))*LeftShoulderC0},Alpha,Easing,Direction,Repeat,Reverse,Delay)
- TweenAnimate(RW,{C0=cf(1.5,0.7,-0.4)*angles(math.rad(108.5),math.rad(4),math.rad(-41.7))*RightShoulderC0},Alpha,Easing,Direction,Repeat,Reverse,Delay)
- TweenAnimate(Torso.Neck,{C0 =necko*angles(math.rad(-6.6),math.rad(0),math.rad(0))},Alpha,Easing,Direction,Repeat,Reverse,Delay)
- wait(Alpha)
- until PressW == false or selected == false
- end
- end)
- Mouse.Button1Down:Connect(function()
- if Attack then return end
- end)
- local footstepSounds = {
- [Enum.Material.Grass]=510933218;
- [Enum.Material.Metal]=1263161138;
- [Enum.Material.CorrodedMetal]=1263161138;
- [Enum.Material.DiamondPlate]=1263161138;
- [Enum.Material.Wood]=2452053757;
- [Enum.Material.WoodPlanks]=2452053757;
- [Enum.Material.Sand]=134456884;
- [Enum.Material.Snow]=2452051182;
- }
- tool.Equipped:connect(function()
- selected = true
- RootPart.Anchored = true
- end)
- tool.Unequipped:connect(function()
- selected = false
- RootPart.Anchored = false
- end)
- local StepThing = 3.2
- local val = .1
- --ANIMATION--
- while true do
- Swait()
- Sine = Sine + Change
- local TorsoVelocity = (RootPart.Velocity * VT(1, 0, 1)).magnitude
- local TORSOVERTICALVELOCITY = RootPart.Velocity.y
- local Hitfloor = Raycast(RootPart.Position, (cf(RootPart.Position, RootPart.Position + VT(0, -1, 0))).lookVector, 4+Humanoid.HipHeight, Character)
- local WalkSpeedValue = 4 / (Humanoid.WalkSpeed / 10)
- local sidevec = math.clamp((RootPart.Velocity*RootPart.CFrame.rightVector).X+(RootPart.Velocity*RootPart.CFrame.rightVector).Z,-Humanoid.WalkSpeed,Humanoid.WalkSpeed)
- local forwardvec = math.clamp((RootPart.Velocity*RootPart.CFrame.lookVector).X+(RootPart.Velocity*RootPart.CFrame.lookVector).Z,-Humanoid.WalkSpeed,Humanoid.WalkSpeed)
- local sidevelocity = sidevec/Humanoid.WalkSpeed
- local forwardvelocity = forwardvec/Humanoid.WalkSpeed
- local Alpha,Easing,Direction,Repeat,Reverse,Delay = .1,'Linear','Out',0,false,0-- - Server - Tween:63
- TweenAnimate(nRootJoint,{C0=cf(0,0,0.4*siz)*angles(math.rad(-20),math.rad(0),math.rad(0))*RootCF},Alpha,Easing,Direction,Repeat,Reverse,Delay)-- - Server - Tween:72
- TweenAnimate(nLH,{C0=cf(-1.25*siz,-0.3*siz,-0.7*siz)*angles(math.rad(25.9),math.rad(0),math.rad(0))*angles(math.rad(0),math.rad(-90),math.rad(0))},Alpha,Easing,Direction,Repeat,Reverse,Delay)-- - Server - Tween:73
- TweenAnimate(nRH,{C0=cf(1.25*siz,-0.3*siz,-0.7*siz)*angles(math.rad(25.9),math.rad(0),math.rad(0))*angles(math.rad(0),math.rad(90),math.rad(0))},Alpha,Easing,Direction,Repeat,Reverse,Delay)-- - Server - Tween:74
- TweenAnimate(nLW,{C0=cf(-1.3*siz,0.3*siz,-0.2*siz)*angles(math.rad(60.7),math.rad(0),math.rad(0))*LeftShoulderC0},Alpha,Easing,Direction,Repeat,Reverse,Delay)-- - Server - Tween:75
- TweenAnimate(nRW,{C0=cf(1.3*siz,0.3*siz,-0.2*siz)*angles(math.rad(60.7),math.rad(0),math.rad(0))*RightShoulderC0},Alpha,Easing,Direction,Repeat,Reverse,Delay)-- - Server - Tween:76
- TweenAnimate(nNeck,{C0 =necko*CFrame.new(0,0,-siz/2)*angles(math.rad(-0),math.rad(0),math.rad(0))},Alpha,Easing,Direction,Repeat,Reverse,Delay)
- if Attack == false then
- if Hitfloor then
- if ANIM == "Walk" or ANIM == "Run" then local LLegFloor,lpos = workspace:FindPartOnRayWithIgnoreList(Ray.new(LeftLeg.CFrame.p,((CFrame.new(LeftLeg.Position,LeftLeg.Position - Vector3.new(0,1,0))).lookVector).unit * (2)), {EFX,Character}) local RLegFloor,rpos = workspace:FindPartOnRayWithIgnoreList(Ray.new(RightLeg.CFrame.p,((CFrame.new(RightLeg.Position,RightLeg.Position - Vector3.new(0,1,0))).lookVector).unit * (2)), {EFX,Character}) local nextstep = math.cos(Sine/(WalkSpeedValue*StepThing)) if nextstep > -0.0 and nextstep < val then if RLegFloor then if footstepSounds[RLegFloor.Material] then CreateSound(RightLeg,footstepSounds[RLegFloor.Material],1.5,.9) else CreateSound(RightLeg,141491460,1.5,.9) end elseif LLegFloor then if footstepSounds[LLegFloor.Material] then CreateSound(LeftLeg,footstepSounds[LLegFloor.Material],1.5,.9) else CreateSound(LeftLeg,141491460,1.5,.9) end end end end end
- Humanoid.WalkSpeed = Speed
- if Hitfloor then
- AnimSpeed = 3
- if TorsoVelocity < 1 then
- ANIM = "Idle"
- if selected == false then
- RootJoint.C0 = Clerp(RootJoint.C0, CFrame.new(0,0.1*math.cos(Sine/25),0)*CFrame.Angles(math.rad(0),math.rad(0),math.rad(0))*RootCF,0.5 / AnimSpeed)
- LH.C0 = Clerp(LH.C0, CFrame.new(-1,-1+-0.1*math.cos(Sine/25),0)*CFrame.Angles(math.rad(0),math.rad(5),math.rad(-3))*CFrame.Angles(math.rad(0),math.rad(-90),math.rad(0)),0.5 / AnimSpeed)
- RH.C0 = Clerp(RH.C0, CFrame.new(1,-1+-0.1*math.cos(Sine/25),0)*CFrame.Angles(math.rad(0),math.rad(-5),math.rad(3))*CFrame.Angles(math.rad(0),math.rad(90),math.rad(0)),0.5 / AnimSpeed)
- LW.C0 = Clerp(LW.C0, CFrame.new(-1.5,0.5,0*math.sin(Sine/25))*CFrame.Angles(math.rad(0),math.rad(0),math.rad(0))*LeftShoulderC0,0.5 / AnimSpeed)
- RW.C0 = Clerp(RW.C0, CFrame.new(1.5,0.5,0*math.sin(Sine/25))*CFrame.Angles(math.rad(0),math.rad(0),math.rad(0))*RightShoulderC0,0.5 / AnimSpeed)
- Neck.C0 = Clerp(Neck.C0, necko*CFrame.new(0,0,0.01*math.sin(Sine/25))*CFrame.Angles(math.rad(0),math.rad(0),math.rad(0)),0.5 / AnimSpeed)
- elseif selected == true then
- RootJoint.C0 = Clerp(RootJoint.C0, CFrame.new(0,-0.2+0.1*math.cos(Sine/25),0)*CFrame.Angles(math.rad(-10),math.rad(0),math.rad(0))*RootCF,0.5 / AnimSpeed)
- LH.C0 = Clerp(LH.C0, CFrame.new(-1,-1+-0.1*math.cos(Sine/25),-0.3)*CFrame.Angles(math.rad(10),math.rad(30),math.rad(-5))*CFrame.Angles(math.rad(0),math.rad(-90),math.rad(0)),0.5 / AnimSpeed)
- RH.C0 = Clerp(RH.C0, CFrame.new(1,-1+-0.1*math.cos(Sine/25),-0.3)*CFrame.Angles(math.rad(0),math.rad(-15),math.rad(3))*CFrame.Angles(math.rad(0),math.rad(90),math.rad(0)),0.5 / AnimSpeed)
- LW.C0 = Clerp(LW.C0, CFrame.new(-1.5,0,0.2)*CFrame.Angles(math.rad(15),math.rad(0),math.rad(30))*LeftShoulderC0,0.5 / AnimSpeed)
- RW.C0 = Clerp(RW.C0, CFrame.new(1.5,-0.5,0*math.sin(Sine/25))*CFrame.Angles(math.rad(135+-2*math.sin(Sine/40)),math.rad(-50),math.rad(0))*RightShoulderC0,0.5 / AnimSpeed)
- Neck.C0 = Clerp(Neck.C0, necko*CFrame.new(0,0,0.01*math.sin(Sine/25))*CFrame.Angles(math.rad(-6),math.rad(0),math.rad(0)),0.5 / AnimSpeed)
- end
- elseif TorsoVelocity >= 1 and Humanoid.WalkSpeed <= 20 then
- AnimSpeed = 2
- ANIM = "Walk"
- StepThing = 3.2
- val = .13
- RootJoint.C0 = Clerp(RootJoint.C0, cf(0,-0.1+0.1*math.sin(Sine/(WalkSpeedValue*1.6)),0)*angles(math.rad(-5)-forwardvelocity/5,math.rad(2*math.sin(Sine/(WalkSpeedValue*3.2))),math.rad(-2*math.sin(Sine/(WalkSpeedValue*3.2))-sidevelocity*10))*RootCF,0.5 / AnimSpeed)
- LH.C0 = Clerp(LH.C0, cf(-1,-0.9+-0.2*math.cos(Sine/(WalkSpeedValue*3.2)),-0.2+0.3*math.cos(Sine/(WalkSpeedValue*3.2)))*angles(math.rad(0+-forwardvelocity*30*math.sin(Sine/(WalkSpeedValue*3.2))),math.rad(0),math.rad(-2+-2*math.sin(Sine/(WalkSpeedValue*3.2))-sidevelocity*30*math.sin(Sine/(WalkSpeedValue*3.2))))*angles(math.rad(0),math.rad(-90),math.rad(0)),0.5 / AnimSpeed)
- RH.C0 = Clerp(RH.C0, cf(1,-0.9+0.2*math.cos(Sine/(WalkSpeedValue*3.2)),-0.2+-0.3*math.cos(Sine/(WalkSpeedValue*3.2)))*angles(math.rad(0+forwardvelocity*30*math.sin(Sine/(WalkSpeedValue*3.2))),math.rad(0),math.rad(2+2*math.sin(Sine/(WalkSpeedValue*3.2))+sidevelocity*30*math.sin(Sine/(WalkSpeedValue*3.2))))*angles(math.rad(0),math.rad(90),math.rad(0)),0.5 / AnimSpeed)
- LW.C0 = Clerp(LW.C0, cf(-1.5,0.5,0)*angles(math.rad(forwardvelocity*35*math.sin(Sine/(WalkSpeedValue*3.2))),math.rad(0),math.rad(sidevelocity*5*math.cos(Sine/(WalkSpeedValue*3.2))))*LeftShoulderC0,0.5 / AnimSpeed)
- RW.C0 = Clerp(RW.C0, CFrame.new(1.5,0.5,0*math.sin(Sine/25))*CFrame.Angles(math.rad(0),math.rad(0),math.rad(0))*RightShoulderC0,0.5 / AnimSpeed)
- Neck.C0 = Clerp(Neck.C0, necko*cf(0,0,0)*angles(math.rad(-5+3*math.cos(Sine/(WalkSpeedValue*1.6))),math.rad(0),math.rad(-sidevelocity*40)),0.5 / AnimSpeed)
- elseif Humanoid.WalkSpeed >= 20 then
- ANIM = "Run"
- StepThing = 5
- val = .15
- AnimSpeed = 2
- if selected == false then
- RootJoint.C0 = Clerp(RootJoint.C0, cf(0,-.1+0.2*math.sin(Sine/(WalkSpeedValue*2.5)),0)*angles(math.rad(-8)-forwardvelocity/2,math.rad(2*math.sin(Sine/(WalkSpeedValue*5))),math.rad(-2*math.sin(Sine/(WalkSpeedValue*5))-sidevelocity*15))*RootCF,0.5 / AnimSpeed)
- LW.C0 = Clerp(LW.C0, CFrame.new(-1.41,0.35,0.1)*CFrame.Angles(math.rad(5.4),math.rad(0),math.rad(18))*LeftShoulderC0,0.5 / AnimSpeed)
- RW.C0 = Clerp(RW.C0, cf(1.5,0.5,0)*angles(math.rad(0+forwardvelocity*80*math.sin(Sine/(WalkSpeedValue*5))),math.rad(0),math.rad(15))*RightShoulderC0,0.5 / AnimSpeed)
- LH.C0 = Clerp(LH.C0, cf(-1,-0.9+0.3*math.cos(Sine/(WalkSpeedValue*5)),-0.2-0.3*math.cos(Sine/(WalkSpeedValue*5)))*angles(math.rad(0+forwardvelocity*70*math.sin(Sine/(WalkSpeedValue*5))),math.rad(0),math.rad(2+2*math.sin(Sine/(WalkSpeedValue*5))+sidevelocity*30*math.sin(Sine/(WalkSpeedValue*5))))*angles(math.rad(0),math.rad(-90),math.rad(0)),0.5 / AnimSpeed)
- RH.C0 = Clerp(RH.C0, cf(1,-0.9-0.3*math.cos(Sine/(WalkSpeedValue*5)),-0.2+0.3*math.cos(Sine/(WalkSpeedValue*5)))*angles(math.rad(0-forwardvelocity*70*math.sin(Sine/(WalkSpeedValue*5))),math.rad(0),math.rad(-2-2*math.sin(Sine/(WalkSpeedValue*5))-sidevelocity*30*math.sin(Sine/(WalkSpeedValue*5))))*angles(math.rad(0),math.rad(90),math.rad(0)),0.5 / AnimSpeed)
- Neck.C0 = Clerp(Neck.C0, necko*cf(0,0,0)*angles(math.rad(-forwardvelocity*15+5*math.cos(Sine/(WalkSpeedValue*2.5))),math.rad(0),math.rad(-sidevelocity*40)),0.5 / AnimSpeed)
- elseif selected == true then
- RootJoint.C0 = Clerp(RootJoint.C0, cf(0,-.1+0.2*math.sin(Sine/(WalkSpeedValue*2.5)),0)*angles(math.rad(-8)-forwardvelocity/2,math.rad(2*math.sin(Sine/(WalkSpeedValue*5))),math.rad(-2*math.sin(Sine/(WalkSpeedValue*5))-sidevelocity*15))*RootCF,0.5 / AnimSpeed)
- LW.C0 = Clerp(LW.C0, CFrame.new(-1.41,0.35,0.1)*CFrame.Angles(math.rad(5.4),math.rad(0),math.rad(18))*LeftShoulderC0,0.5 / AnimSpeed)
- RW.C0 = RW.C0:lerp(cf(1,0.6,-0.1)*angles(math.rad(92.1),math.rad(75),math.rad(-17.4)),0.5/AnimSpeed)
- LH.C0 = Clerp(LH.C0, cf(-1,-0.9+0.3*math.cos(Sine/(WalkSpeedValue*5)),-0.2-0.3*math.cos(Sine/(WalkSpeedValue*5)))*angles(math.rad(0+forwardvelocity*70*math.sin(Sine/(WalkSpeedValue*5))),math.rad(0),math.rad(2+2*math.sin(Sine/(WalkSpeedValue*5))+sidevelocity*30*math.sin(Sine/(WalkSpeedValue*5))))*angles(math.rad(0),math.rad(-90),math.rad(0)),0.5 / AnimSpeed)
- RH.C0 = Clerp(RH.C0, cf(1,-0.9-0.3*math.cos(Sine/(WalkSpeedValue*5)),-0.2+0.3*math.cos(Sine/(WalkSpeedValue*5)))*angles(math.rad(0-forwardvelocity*70*math.sin(Sine/(WalkSpeedValue*5))),math.rad(0),math.rad(-2-2*math.sin(Sine/(WalkSpeedValue*5))-sidevelocity*30*math.sin(Sine/(WalkSpeedValue*5))))*angles(math.rad(0),math.rad(90),math.rad(0)),0.5 / AnimSpeed)
- Neck.C0 = Clerp(Neck.C0, necko*cf(0,0,0)*angles(math.rad(-forwardvelocity*15+5*math.cos(Sine/(WalkSpeedValue*2.5))),math.rad(0),math.rad(-sidevelocity*40)),0.5 / AnimSpeed)
- end
- end
- else
- if TORSOVERTICALVELOCITY > 0 then
- ANIM = "Jump"
- RootJoint.C0 = Clerp(RootJoint.C0, cf(0,0,0)*angles(math.rad(7.2),math.rad(0),math.rad(0))*RootCF,0.5 / AnimSpeed)
- LH.C0 = Clerp(LH.C0, cf(-1.1,-0.4,-0.8)*angles(math.rad(-24.2),math.rad(12),math.rad(0))*angles(math.rad(0),math.rad(-90),math.rad(0)),0.5 / AnimSpeed)
- RH.C0 = Clerp(RH.C0, cf(1,-1,0)*angles(math.rad(-18.2),math.rad(-18.6),math.rad(0))*angles(math.rad(0),math.rad(90),math.rad(0)),0.5 / AnimSpeed)
- LW.C0 = Clerp(LW.C0, cf(-1.5,0.6,0.2)*angles(math.rad(-22.7),math.rad(24.3),math.rad(0)) * LeftShoulderC0,0.5 / AnimSpeed)
- RW.C0 = Clerp(RW.C0, cf(1.5,0.5,0.1)*angles(math.rad(-21.4),math.rad(-15.5),math.rad(0)) * RightShoulderC0,0.5 / AnimSpeed)
- Neck.C0 = Clerp(Neck.C0, cf(0,0,-0.3)*angles(math.rad(17),math.rad(0),math.rad(0))*necko,0.5 / AnimSpeed)
- else
- ANIM = "Fall"
- RootJoint.C0 = Clerp(RootJoint.C0, cf(0,0,0)*angles(math.rad(-21.4+ RootPart.Velocity.y/10),math.rad(0),math.rad(0))*RootCF,0.5 / AnimSpeed)
- LH.C0 = Clerp(LH.C0, cf(-1.1,-0.4,-0.8)*angles(math.rad(-24.2),math.rad(12),math.rad(0))*angles(math.rad(0),math.rad(-90),math.rad(0)),0.5 / AnimSpeed)
- RH.C0 = Clerp(RH.C0, cf(1,-1,0)*angles(math.rad(-18.2),math.rad(-18.6),math.rad(0))*angles(math.rad(0),math.rad(90),math.rad(0)),0.5 / AnimSpeed)
- LW.C0 = Clerp(LW.C0, cf(-1.2,0.9,0.2)*angles(math.rad(28.8),math.rad(1.9),math.rad(-72.2+ RootPart.Velocity.y/6)) * LeftShoulderC0,0.5 / AnimSpeed)
- RW.C0 = Clerp(RW.C0, cf(1.1,0.9,0.3)*angles(math.rad(32.9),math.rad(-4.5),math.rad(77.6- RootPart.Velocity.y/6)) * RightShoulderC0,0.5 / AnimSpeed)
- Neck.C0 = Clerp(Neck.C0, cf(0,0,0.3)*angles(math.rad(-18.1),math.rad(0),math.rad(0))*necko,0.5 / AnimSpeed)
- end
- end
- end
- Change = 2 / AnimSpeed
- end
Add Comment
Please, Sign In to add comment