Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local plr = game.Players.LocalPlayer
- local char = plr.Character
- local mouse = plr:GetMouse()
- local torso = char.Torso
- local rs = torso["Right Shoulder"]
- local ls = torso["Left Shoulder"]
- local rh = torso["Right Hip"]
- local lh = torso["Left Hip"]
- local rj = char.HumanoidRootPart.RootJoint
- local neck = torso.Neck
- local animpose = "Idle"
- local attacking = false
- local cananim = true
- local rage = false
- local shield = nil
- local sprint = false
- local canrage = true
- local legs = false
- local recording = false
- local animatepls = false
- local timetravel = false
- local mode = "Neutral"
- local outlines = {}
- local bc = char:WaitForChild("Body Colors")
- local multiplier = 0
- local lac = char["Body Colors"].LeftArmColor
- local rac = char["Body Colors"].RightArmColor
- local rlc = char["Body Colors"].RightArmColor
- local llc = char["Body Colors"].LeftLegColor
- local hc = char["Body Colors"].HeadColor
- local tc = char["Body Colors"].TorsoColor
- local humanoid = char:FindFirstChildOfClass("Humanoid")
- local huge = Vector3.new(math.huge,math.huge,math.huge)
- local model = Instance.new("Model", char)
- model.Name = "thingy"
- function legsonly()
- spawn(function()
- for i = 0, 10 do
- wait(0.001)
- if attacking then break end
- end
- if not attacking then
- legs = false
- end
- end)
- end
- function smooth(obj)
- for i,v in pairs({"Right", "Left", "Top", "Bottom", "Front", "Back"}) do
- obj[v.."Surface"] = "SmoothNoOutlines"
- end
- end
- function swait(t)
- if t == nil or t == 0 then
- game:service('RunService').Stepped:wait(0)
- else
- for i = 0, t do
- game:service('RunService').Stepped:wait(0)
- end
- end
- end
- function hurt(hit, dmg)
- if hit.Parent then
- if hit.Parent.Name == "thingy" then print("urmum") hit.Parent:Destroy() end
- local hum = hit.Parent:FindFirstChildOfClass("Humanoid")
- if hum then
- if hum.Parent.Name ~= plr.Name then
- if dmg == "Kill" or hum.Health > 100000 then
- hit.Parent:BreakJoints()
- return true
- else
- if math.random(0, 100) == 50 then
- hum.Health = hum.Health - dmg*multiplier*2.5
- else
- hum.Health = hum.Health -dmg*multiplier
- end
- return true
- end
- end
- end
- end
- end
- function soundeffect(id, volume, speed, parent, forcewait)
- if not forcewait then
- spawn(function()
- local s = Instance.new("Sound")
- s.SoundId = id
- s.Volume = volume
- s.PlaybackSpeed = speed
- s.Parent = parent
- s:Play()
- repeat wait() until not s.Playing
- s:Destroy()
- end)
- else
- local s = Instance.new("Sound")
- s.SoundId = id
- s.Volume = volume
- s.PlaybackSpeed = speed
- s.Parent = parent
- s:Play()
- repeat wait() until not s.Playing
- s:Destroy()
- end
- end
- function gethum(obj)
- if obj.Parent then
- if obj.Parent:FindFirstChild("Humanoid") then
- if obj.Parent.Name ~= plr.Name then
- return obj.Parent:FindFirstChildOfClass("Humanoid")
- end
- end
- end
- end
- function fade(obj, dest, grow)
- spawn(function()
- local oldcf = obj.CFrame
- for i = 0, 10 do
- if grow then
- obj.Size = obj.Size +Vector3.new(1,1,1)
- obj.CFrame = oldcf
- end
- obj.Transparency = obj.Transparency +0.1
- swait()
- end
- if dest then
- obj:Destroy()
- end
- end)
- end
- function animate()
- a = function(b)
- for i,v in pairs(b:children()) do
- if v:IsA("BasePart") and v.Name ~= "HumanoidRootPart" then
- if v.Anchored == false then
- local val = Instance.new("StringValue", v)
- val.Name = "Anchoredz"
- v.Anchored = true
- end
- end
- a(v)
- end
- end
- a(workspace)
- end
- function unanimate()
- a = function(b)
- for i,v in pairs(b:children()) do
- if v:IsA("BasePart") then
- if v:FindFirstChild("Anchoredz") then
- v.Anchoredz:Destroy()
- v.Anchored = false
- end
- end
- a(v)
- end
- end
- a(workspace)
- end
- local data = {
- ["Objects"] = {
- }
- }
- local freeze = false
- local frames = 0
- local objects = 0
- local cons4freeze = {}
- mouse.KeyDown:connect(function(key)
- if key == "e" and not timetravel and not freeze then
- timetravel = true
- local currentframe = frames+1
- animate(true)
- spawn(function()
- local num = 2
- repeat
- num = num - 0.1
- soundeffect("rbxassetid://1", 3, num, char, true)
- until not timetravel
- end)
- for i,v in pairs(cons4freeze) do
- if v then
- v:disconnect()
- v = nil
- end
- end
- for i = 1, frames do
- currentframe = currentframe - 1
- local currentobj = 0
- for i = 1, objects do
- currentobj = currentobj + 1
- obj = data["Objects"]["obj"..currentobj]
- if obj["Object"] then
- if obj["Frame"..currentframe] then
- obj["Object"].CFrame = obj["Frame"..currentframe]["CFrame"]
- end
- end
- end
- wait()
- end
- unanimate()
- timetravel = false
- objects = 0
- frames = 0
- data = {
- ["Objects"] = {
- }
- }
- end
- end)
- mouse.KeyDown:connect(function(key)
- if key == "q" and not recording and not timetravel then
- recording = true
- if not timetravel and recording then
- frames = frames+1
- local num = 0
- a = function(b)
- for i,v in pairs(b:children()) do
- if v:IsA("BasePart") then
- num = num + 1
- if not data["Objects"]["obj"..num] then
- data["Objects"]["obj"..num] = {
- ["Object"] = nil
- }
- data["Objects"]["obj"..num]["Object"] = v
- objects = objects + 1
- end
- data["Objects"]["obj"..num]["Frame"..frames] = {}
- data["Objects"]["obj"..num]["Frame"..frames]["Size"] = v.Size
- data["Objects"]["obj"..num]["Frame"..frames]["CFrame"] = v.CFrame
- end
- a(v)
- end
- end
- a(workspace)
- end
- recording = false
- end
- end)
- local joints = {rs,ls,rh,lh,neck,rj}
- local todo = {}
- for i,v in pairs(joints) do
- local tabl = {
- Name = v.Name,
- Part0 = v.Part0,
- Part1 = v.Part1,
- C0 = v.C0,
- C1 = v.C1,
- Parent = v.Parent,
- }
- table.insert(todo, tabl)
- end
- local idlesin = 0
- local walkloopnum = 0
- local function ontouch()
- local cf1 = char.Head.CFrame
- local cf2 = char.Torso.CFrame
- local cf3 = char["Right Arm"].CFrame
- local cf4 = char["Left Arm"].CFrame
- local cf5 = char["Right Leg"].CFrame
- local cf6 = char["Left Leg"].CFrame
- wait(2)
- repeat wait()
- local hum = humanoid
- hum.Health = hum.MaxHealth
- char.Head.CFrame = cf1
- char.Torso.CFrame = cf2
- char["Right Arm"].CFrame = cf3
- char["Left Arm"].CFrame = cf4
- char["Right Leg"].CFrame = cf5
- char["Left Leg"].CFrame = cf6
- for i,v in pairs(char:children()) do
- if v:IsA("BasePart") and v.Name ~= "HumanoidRootPart" then
- v.Anchored = true
- end
- end
- for i,v in pairs(todo) do
- local m = Instance.new("Motor6D")
- local stuf = {"Name", "Part0", "Part1", "C0", "C1", "Parent"}
- for i,e in pairs(stuf) do
- m[e] = v[e]
- end
- end
- for i,v in pairs(char:children()) do
- if v:IsA("BasePart") and v.Name ~= "HumanoidRootPart" then
- v.Anchored = false
- end
- end
- hum.Health = hum.MaxHealth
- swait()
- until hum.Health > 0
- end
- humanoid.Died:connect(function()
- ontouch(char.Torso)
- end)
- -- Roblox.LUA | Neko Pets, WIP. | Made by Cass.
- --Declarations
- local Cn=CFrame.new
- local CA=CFrame.Angles
- local mr=math.rad
- local rn=math.random
- local mc=math.cos
- local Vn=Vector3.new
- local NR=NumberRange.new
- local NSeq=NumberSequence.new
- local plrs=game:service"Players"
- local wrk=game:service"Workspace"
- local deb=game:service"Debris"
- local rs=game:service"RunService".Stepped
- local IS=game:GetService("InsertService")
- local TS=game:GetService("TweenService")
- local UIS=game:GetService("UserInputService")
- local p=plrs.LocalPlayer
- local cam=wrk.CurrentCamera
- local char=p.Character
- local mouse=p:GetMouse()
- local lam=char["Left Arm"]
- local ram=char["Right Arm"]
- local llg=char["Left Leg"]
- local rlg=char["Right Leg"]
- local hed=char.Head
- local tor=char.Torso
- local hrp=char.HumanoidRootPart
- for _,v in pairs(char:GetChildren()) do
- if v.Name=="asdFlower" then
- v:Destroy()
- end
- end
- script.Name="asdFlower"
- ---Tables
- local Anims={}
- local Vars={
- sine=0;
- animpose="";
- lastanimpose="";
- ffing=false;
- on=false;
- noRig=false;
- int=0;
- sFollow=true;
- kFollow=true;
- sPos=Cn(30,10,30);
- kPos=Cn(26,10,30);
- sRot=CA(0,0,0);
- kRot=CA(0,0,0);
- sRotting=true;
- kRotting=true;
- }
- local blink={
- sCur=0;
- kCur=0;
- sMax=7;
- kMax=7;
- sOn=false;
- kOn=false;
- }
- ---Functions
- function bool(lean)
- on.Value=lean
- Vars.on=lean
- end
- --
- function FndHm(flnm)
- for i,v in pairs(flnm:GetChildren()) do
- if v:IsA("Humanoid") then
- return v
- end
- end
- end
- local hum=FndHm(char)
- --
- function chrDes(inst)
- local ret=nil
- for _,v in pairs(game.Players:GetChildren()) do
- if inst:IsDescendantOf(v) then
- ret=v
- break
- end
- end
- return ret
- end
- --
- function get(a)
- local cont={}
- for i,v in pairs(a:GetChildren()) do
- table.insert(cont,v)
- pcall(function()
- for _,b in pairs(get(v)) do
- table.insert(cont,b)
- end
- end)
- end
- return cont
- end
- --
- function inT(qur,tbl)
- local a=false
- for i,v in pairs(tbl) do
- if v==qur then
- a=true
- break
- else
- a=false
- end
- end
- return a
- end
- --
- function Tween(a,b,c)
- return a+(b-a)*c
- end
- --
- function vectorTween(a,b,c)
- return Vector3.new(a.X+(b.X-a.X)*c,a.Y+(b.Y-a.Y)*c,a.Z+(b.Z-a.Z)*c)
- end
- --
- function Avg(a,b)
- return Cn((a.X+b.X)/2,(a.Y+b.Y)/2,(a.Z+b.Z)/2)
- end
- --
- function RLerp(c1,c2,tim)
- return c1:lerp(c2,tim)
- end
- --
- function tPos(ui,ud,ES,tim)
- ui:TweenPosition(ud,0,ES,tim)
- end
- --
- function newAnim(wld)
- local asd={["Weld"]=wld;["Int"]=0;["Frame"]=1;}
- asd.getFrames=function()
- local num=0
- for _,v in pairs(asd) do
- pcall(function()
- num=num+v.Length
- end)
- end
- return num
- end
- asd.resetAnim=function()
- asd.Int=0
- asd.Frame=1
- end
- table.insert(Anims,asd)
- return asd
- end
- --
- function newKF(tab,c0,lng,off,eas)
- off=off or 1
- table.insert(tab,{["C0"]=c0,["Length"]=lng,["Offset"]=off,["Ease"]=eas})
- end
- --
- function runKF(tab)
- tab.Int=tab.Int+1
- if tab.Int>=tab[tab.Frame].Length-(tab[tab.Frame].Ease or 0) then
- tab.Frame=tab.Frame+1
- tab.Int=0
- if tab.Frame>#tab then
- tab.Frame=1
- end
- end
- tab.Weld.C0=RLerp(tab.Weld.C0,tab[tab.Frame].C0,(tab[tab.Frame].Offset/tab[tab.Frame].Length)*tab.Int)
- end
- --
- function nwPrt(prnt,siz,cf,col)
- local prt=Instance.new("Part")
- prt.Parent=prnt
- prt.FormFactor=3
- prt.Name="Part"
- prt.Size=siz
- prt.CanCollide=false
- prt.Anchored=true
- prt.Locked=true
- prt.TopSurface=10
- prt.BottomSurface=10
- prt.FrontSurface=10
- prt.BackSurface=10
- prt.LeftSurface=10
- prt.RightSurface=10
- prt:BreakJoints()
- prt.CFrame=cf or Cn(30,10,30)
- prt.Material="SmoothPlastic"
- prt.BrickColor=BrickColor.new(col)
- m=Instance.new("SpecialMesh",prt)
- m.MeshType=6
- return prt
- end
- --
- function nwWdg(prnt,siz,cf,col)
- local prt=Instance.new("WedgePart")
- prt.Parent=prnt
- prt.FormFactor=3
- prt.Name="Part"
- prt.Size=siz
- prt.CanCollide=false
- prt.Anchored=false
- prt.Locked=true
- prt.TopSurface=0
- prt.BottomSurface=0
- prt:BreakJoints()
- prt.CFrame=cf or Cn(30,10,30)
- prt.Material="SmoothPlastic"
- prt.BrickColor=BrickColor.new(col)
- return prt
- end
- --
- function newGui(prnt,clsnm,siz,pos,bsp,bc,bt)
- local gui=Instance.new(clsnm,prnt)
- gui.Size=siz or UDim2.new(0,100,0,100)
- gui.Position=pos or UDim2.new(0,0,0,0)
- gui.BorderSizePixel=bsp or 0
- gui.BackgroundColor3=bc or Color3.new(0,0,0)
- gui.BackgroundTransparency=bt or 1
- return gui
- end
- --
- function nwWld(wp0,wp1,wc0)
- wld = Instance.new("Weld",wp1)
- wld.Part0=wp0
- wld.Part1=wp1
- wld.C0=wc0 or Cn(0,0,0)
- return wld
- end
- --
- function nwSnd(pch,vol,id)
- local s=Instance.new("Sound",hed)
- s.Pitch=pch
- s.Volume=vol
- s.SoundId="rbxassetid://"..id
- s.PlayOnRemove=true
- s:Destroy()
- end
- --
- function newRay(start,face,range,wat)
- local rey=Ray.new(start.p,(face.p-start.p).Unit*range)
- hit,pos=Workspace:FindPartOnRayWithIgnoreList(rey,wat)
- return rey,hit,pos
- end
- --
- for _,v in pairs(get(char)) do
- if v:IsA("Motor6D") then
- v.Parent=v.Part1
- end
- end
- function replaceWeld(purt)
- for _,v in pairs(purt:GetChildren()) do
- if v:IsA("Motor6D") then
- table.insert(Mots,v)
- v.Parent=nil
- local wld=nwWld(v.Part0,v.Part1,v.C0)
- wld.C1=v.C1
- return wld
- elseif v:IsA("Weld") then
- for _,c in pairs(Mots) do
- if c.Part1==purt then
- v:Destroy()
- c.Parent=purt
- end
- end
- end
- end
- end
- --
- function HSV(H,S,V)
- H = H%360
- local C=V*S
- local H2=H/60
- local X=C*(1-math.abs((H2%2)-1))
- local color=Color3.new(0,0,0)
- if H2<=0 then
- color=Color3.new(C,0,0)
- elseif 0<=H2 and H2<=1 then
- color=Color3.new(C,X,0)
- elseif 1<=H2 and H2<=2 then
- color=Color3.new(X,C,0)
- elseif 2<=H2 and H2<=3 then
- color=Color3.new(0,C,X)
- elseif 3<=H2 and H2<=4 then
- color=Color3.new(0,X,C)
- elseif 4<=H2 and H2<=5 then
- color=Color3.new(X,0,C)
- elseif 5<=H2 and H2<=6 then
- color=Color3.new(C,0,X)
- end
- local m=V-C
- return Vector3.new(color.r+m,color.g+m,color.b+m)
- end
- ---Welds
- local law=nwWld(tor,lam,Cn(-1.5,0.5,0))
- law.C1=Cn(0,0.5,0)
- local raw=nwWld(tor,ram,Cn(1.5,0.5,0))
- raw.C1=Cn(0,0.5,0)
- hew=nwWld(tor,hed,Cn(0,1.5,0))
- local llw=nwWld(tor,llg,Cn(-0.5,-1,0))
- llw.C1=Cn(0,1,0)
- local rlw=nwWld(tor,rlg,Cn(0.5,-1,0))
- rlw.C1=Cn(0,1,0)
- local tow=nwWld(hrp,tor,Cn(0,-1,0))
- tow.C1=Cn(0,-1,0)
- --
- local laD=Cn(-1.5,0.5,0)
- local raD=Cn(1.5,0.5,0)
- local hD=Cn(0,1.5,0)
- local tD=Cn(0,-1,0)
- local llD=Cn(-0.5,-1,0)
- local rlD=Cn(0.5,-1,0)
- ---Build
- ---Anims
- --Idle
- local heid=newAnim(hew)
- newKF(heid,hD,40,0.3,5)
- local toid=newAnim(tow)
- newKF(toid,tD*Cn(0,0.025,0)*CA(mr(0.5),0,0),40,0.3,5)
- newKF(toid,tD,40,0.3,5)
- local laid=newAnim(law)
- newKF(laid,laD*Cn(0,0.025,0)*CA(0,0,mr(-1)),40,0.3,5)
- newKF(laid,laD,40,0.3,5)
- local raid=newAnim(raw)
- newKF(raid,raD*Cn(0,0.025,0)*CA(0,0,mr(1)),40,0.3,5)
- newKF(raid,raD,40,0.3,5)
- local llid=newAnim(llw)
- newKF(llid,llD*Cn(0,-0.025,0)*CA(mr(-0.5),0,0),40,0.3,5)
- newKF(llid,llD,40,0.3,5)
- local rlid=newAnim(rlw)
- newKF(rlid,rlD*Cn(0,-0.025,0)*CA(mr(-0.5),0,0),40,0.3,5)
- newKF(rlid,rlD,40,0.3,5)
- --Walk
- local hewk=newAnim(hew)
- newKF(hewk,hD,40,0.3,5)
- local towk=newAnim(tow)
- newKF(towk,tD*Cn(0,0.1,0),15,0.3,2)
- newKF(towk,tD*CA(0,0,mr(-1)),15,0.3,2)
- newKF(towk,tD*Cn(0,0.1,0),15,0.3,2)
- newKF(towk,tD*CA(0,0,mr(1)),15,0.3,2)
- local lawk=newAnim(law)
- newKF(lawk,laD*CA(mr(40),0,0),30,0.3,4)
- newKF(lawk,laD*CA(mr(-40),0,0),30,0.3,4)
- local rawk=newAnim(raw)
- newKF(rawk,raD*CA(mr(-40),0,0),30,0.3,4)
- newKF(rawk,raD*CA(mr(40),0,0),30,0.3,4)
- local llwk=newAnim(llw)
- newKF(llwk,llD*Cn(0,0,0)*CA(mr(-45),0,0),26,0.3,0)
- newKF(llwk,llD*Cn(0,0.2,0),15,0.3,2)
- newKF(llwk,llD*Cn(0,-0.2,0)*CA(mr(45),0,0),15,0.3,2)
- local rlwk=newAnim(rlw)
- newKF(rlwk,rlD*Cn(0,0.2,0),15,0.3,2)
- newKF(rlwk,rlD*Cn(0,-0.2,0)*CA(mr(45),0,0),15,0.3,2)
- newKF(rlwk,rlD*Cn(0,0,0)*CA(mr(-45),0,0),26,0.3,0)
- --FreeFalling
- local heff=newAnim(hew)
- newKF(heff,hD,20,0.3,5)
- local toff=newAnim(tow)
- newKF(toff,tD,20,0.3,5)
- local laff=newAnim(law)
- newKF(laff,laD*CA(mr(140),0,mr(-10)),20,0.3,5)
- local raff=newAnim(raw)
- newKF(raff,raD*CA(mr(140),0,mr(10)),20,0.3,5)
- local llff=newAnim(llw)
- newKF(llff,llD*CA(0,0,mr(-5)),20,0.3,5)
- local rlff=newAnim(rlw)
- newKF(rlff,rlD*CA(0,0,mr(5)),20,0.3,5)
- --Blink
- local eyeInfo=TweenInfo.new(0.3,1,1,0,false,0)
- function cEye(ley,rey)
- local anim1=TS:Create(ley.Mesh,eyeInfo,{Scale=Vn(1,0.2,1)})
- local anim2=TS:Create(rey.Mesh,eyeInfo,{Scale=Vn(1,0.2,1)})
- anim1:Play()
- anim2:Play()
- end
- function oEye(ley,rey)
- local anim1=TS:Create(ley.Mesh,eyeInfo,{Scale=Vn(1,1,1)})
- local anim2=TS:Create(rey.Mesh,eyeInfo,{Scale=Vn(1,1,1)})
- anim1:Play()
- anim2:Play()
- end
- function hcEye(ley,rey)
- local anim1=TS:Create(ley.Mesh,eyeInfo,{Scale=Vn(1,0.6,1)})
- local anim2=TS:Create(rey.Mesh,eyeInfo,{Scale=Vn(1,0.6,1)})
- anim1:Play()
- anim2:Play()
- end
- --Angry
- local movInfo=TweenInfo.new(0.1,1,1,1,false,0.1)
- ---Main
- function reAdjust(ey1,ey2)
- for i=1,10 do
- ey1.Motor6D.C0=RLerp(ey1.Motor6D.C0,leD,0.2)
- ey2.Motor6D.C0=RLerp(ey2.Motor6D.C0,reD,0.2)
- rs:wait()
- end
- end
- function happy(bod,ey1,ey2)
- cEye(ey1,ey2)
- local scalInfo=TweenInfo.new(0.4,7,1,0,false,0)
- local wobl=TS:Create(bod.Mesh,scalInfo,{Scale=Vn(1,1,1)})
- local a,b,c=bod.CFrame:toEulerAnglesXYZ()
- for i=1,5 do
- for i=1,10 do
- bod.CFrame=RLerp(bod.CFrame,Cn(bod.Position+Vn(0,1,0))*CA(a,b,c),0.3)
- rs:wait()
- end
- for i=1,10 do
- bod.CFrame=RLerp(bod.CFrame,Cn(bod.Position-Vn(0,1,0))*CA(a,b,c),0.3)
- rs:wait()
- end
- bod.Mesh.Scale=Vn(1.2,0.8,1.2)
- wobl:Play()
- wait(0.1)
- end
- reAdjust(ey1,ey2)
- end
- function angry(bod,ey1,ey2)
- hcEye(ey1,ey2)
- for i=1,10 do
- ey1.Motor6D.C0=RLerp(ey1.Motor6D.C0,leD*CA(0,0,mr(-40)),0.2)
- ey2.Motor6D.C0=RLerp(ey2.Motor6D.C0,reD*CA(0,0,mr(40)),0.2)
- rs:wait()
- end
- end
- function chase()
- Vars.on=true
- Vars.sFollow=false
- Vars.kFollow=false
- Vars.sRotting=false
- Vars.kRotting=false
- blink.sOn=true
- blink.kOn=true
- Vars.sPos=(Cn(hrp.Position)*Cn(0,0,-3)).p
- Vars.kPos=(Cn(hrp.Position)*CA(0,mr(-5),0)*Cn(0,0,-3)).p
- angry(kbod,key1,key2)
- wait(0.1)
- for a=1,6 do
- for i=0,360,10 do
- Vars.sPos=(Cn(hrp.Position)*CA(0,mr(i),0)*Cn(0,0,-3)).p
- Vars.kPos=(Cn(hrp.Position)*CA(0,mr(i-40),0)*Cn(0,0,-3)).p
- Vars.sRot=CA(0,mr(i+90+(40*mc(Vars.sine/4))),0)
- Vars.kRot=CA(0,mr(i+60),0)
- wait()
- end
- end
- local rand=rn(1,2)
- if rand==1 then
- local a,b,c=Cn(sbod.Position,kbod.Position):toEulerAnglesXYZ()
- Vars.sRot=CA(a,b,c)*CA(0,mr(0+(40*mc(Vars.sine/4))),0)
- reAdjust(key1,key2)
- happy(kbod,key1,key2)
- elseif rand==2 then
- Vars.sPos=(hrp.CFrame*Cn(-2.5,-1.5,1)).p
- wait(0.2)
- local sa,sb,sc=Cn(sbod.Position,kbod.Position):toEulerAnglesXYZ()
- local ka,kb,kc=Cn(kbod.Position,sbod.Position):toEulerAnglesXYZ()
- Vars.sRot=CA(sa,sb,sc)
- Vars.kRot=CA(ka,kb,kc)
- happy(sbod,sey1,sey2)
- wait(0.4)
- Vars.sPos=(hrp.CFrame*Cn(3,0.5,1)).p
- wait(0.2)
- local sa,sb,sc=Cn(sbod.Position,kbod.Position):toEulerAnglesXYZ()
- local ka,kb,kc=Cn(kbod.Position,sbod.Position):toEulerAnglesXYZ()
- Vars.sRot=CA(sa,sb,sc)
- Vars.kRot=CA(ka,kb,kc)
- happy(sbod,sey1,sey2)
- wait(0.6)
- Vars.sPos=(hrp.CFrame*Cn(0,4,1)).p
- wait(0.2)
- local sa,sb,sc=Cn(sbod.Position,kbod.Position):toEulerAnglesXYZ()
- local ka,kb,kc=Cn(kbod.Position,sbod.Position):toEulerAnglesXYZ()
- Vars.sRot=CA(sa,sb,sc)
- Vars.kRot=CA(ka,kb,kc)
- happy(sbod,sey1,sey2)
- wait(0.4)
- end
- local ha,hb,hc=hrp.CFrame:toEulerAnglesXYZ()
- Vars.sRot=CA(ha,hb,hc)
- Vars.kRot=CA(ha,hb,hc)
- Vars.sFollow=true
- Vars.kFollow=true
- Vars.sRotting=true
- Vars.kRotting=true
- blink.sOn=false
- blink.kOn=false
- Vars.on=false
- end
- mouse.KeyDown:connect(function(k)
- if k=="l" then
- chase()
- end
- end)
- ---Loop
- local ffing=false
- hum.FreeFalling:connect(function(asd)
- ffing=asd
- end)
- rs:connect(function()
- Vars.sine=Vars.sine+1
- if blink.sOn==false then
- blink.sCur=blink.sCur+0.03
- end
- if blink.kOn==false then
- blink.kCur=blink.kCur+0.03
- end
- if hum.Sit==true then
- Vars.animpose="Sitting"
- elseif ffing==true then
- Vars.animpose="Freefalling"
- elseif (hrp.Velocity*Vn(1,0,1)).magnitude<2 then
- Vars.animpose="Idle"
- elseif (hrp.Velocity*Vn(1,0,1)).magnitude<20 then
- Vars.animpose="Walking"
- elseif (hrp.Velocity*Vn(1,0,1)).magnitude>20 then
- Vars.animpose="Sprinting"
- end
- if Vars.noRig==false then
- if Vars.animpose=="Freefalling" then
- runKF(heff)
- runKF(toff)
- runKF(laff)
- runKF(raff)
- runKF(llff)
- runKF(rlff)
- elseif Vars.animpose=="Idle" then
- runKF(heid)
- runKF(toid)
- runKF(laid)
- runKF(raid)
- runKF(llid)
- runKF(rlid)
- elseif Vars.animpose=="Walking" then
- runKF(hewk)
- runKF(towk)
- runKF(lawk)
- runKF(rawk)
- runKF(llwk)
- runKF(rlwk)
- end
- end
- if Vars.sFollow==true then
- Vars.sPos=(hrp.CFrame*Cn(-2,3,0)).p
- end
- if Vars.kFollow==true then
- Vars.kPos=(hrp.CFrame*Cn(2,3,0)).p
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement