-- VANTA Minimal 1.4 | Roblox Studio LocalScript for experiences you own or are authorized to edit. -- Place in StarterPlayer > StarterPlayerScripts. No external requests or executor dependencies. local Players=game:GetService('Players') local UIS=game:GetService('UserInputService') local Run=game:GetService('RunService') local Tween=game:GetService('TweenService') local Lighting=game:GetService('Lighting') local SoundService=game:GetService('SoundService') local Http=game:GetService('HttpService') -- JSON encode/decode only local player=Players.LocalPlayer local pg=player:WaitForChild('PlayerGui') if pg:FindFirstChild('VANTA') then return end local C={bg=Color3.fromRGB(16,16,16),card=Color3.fromRGB(26,26,26),line=Color3.fromRGB(37,37,37),text=Color3.fromRGB(238,238,238),muted=Color3.fromRGB(140,140,140),accent=Color3.fromRGB(229,229,229)} local defaults={fov=70,speed=100,loop=false,animId='',animKey='K',volume=65,bass=0,treble=0,audioId='',bloom=false,color=false,dof=false,shadows=false,particles=false,fps=true,compact=false,motion=true,island=true,scale=100,opacity=100,theme='Default',accent='White',profile='Default',walk=16,jump=50,mute=false,sky='Default',favorites={},notifications=true,lowDetail=false,quality="Balanced",brightness=2,clock=14,saturation=0,contrast=0,mid=0,lyrics="",skyLyrics=false,groundLyrics=false,camFollow=true,packIdle="",packWalk="",packRun="",packJump="",packFall="",packClimb="",packSwim="",packEnabled=false,reanimHide=true,reanimReverse=false,reanimFade=150,reanimLoop=true,reanimCustomName="",reanimFavs={},reanimBinds={},reanimCustoms={},reanimStates=false,stateSpeed=100,stateIdle='Default',stateWalk='Default',stateRun='Default',stateJump='Default',stateFall='Default',stateClimb='Default',stateSwim='Default',stateSit='Default',reanimCurve='Smooth',reverseKey='R',speedKey1='',speedKey2='',speedKey3='',speedPreset1=50,speedPreset2=100,speedPreset3=150,reanimFreeze=false,reanimHead=false,reanimLeftStretch=100,reanimRightStretch=100} local cfg=table.clone(defaults); cfg.favorites={};cfg.reanimFavs={};cfg.reanimBinds={};cfg.reanimCustoms={} local connections={}; local rowConnections={}; local drawing=false; local alive=true; local track,anim,recording=nil,nil,false; local samples={}; local recTime=0; local trimStart,trimEnd=0,10; local exportText; local nav={}; local tab='Home'; local query=''; local fps=60; local particleOriginal={}; local materialOriginal={}; local originalShadow=Lighting.GlobalShadows; local camera=workspace.CurrentCamera; local originalFov=camera and camera.FieldOfView or 70; local originalHum={}; local effects={}; local accentObjects={}; local surfaceObjects={}; local bgObjects={}; local strokeObjects={}; local audio=Instance.new('Sound'); audio.Name='VANTA_LocalAudio'; audio.Parent=SoundService local eq=Instance.new('EqualizerSoundEffect');eq.Parent=audio local function bind(signal,fn) local c=signal:Connect(fn); table.insert(drawing and rowConnections or connections,c); return c end local function new(class,parent,props) local o=Instance.new(class); for k,v in pairs(props or {}) do o[k]=v end;o.Parent=parent;return o end local function corner(o,r) new('UICorner',o,{CornerRadius=UDim.new(0,r or 7)}) end local function border(o) local s=new('UIStroke',o,{Color=C.line,Thickness=1});table.insert(strokeObjects,s);return s end local function frame(p,pos,size,color) return new('Frame',p,{Position=pos,Size=size,BackgroundColor3=color or C.card,BorderSizePixel=0}) end local function text(p,t,pos,size,fs,color,bold) return new('TextLabel',p,{Text=t,Position=pos,Size=size,BackgroundTransparency=1,TextColor3=color or C.text,TextSize=fs or 13,Font=bold and Enum.Font.ArialBold or Enum.Font.Arial,TextXAlignment=Enum.TextXAlignment.Left,TextTruncate=Enum.TextTruncate.AtEnd}) end local function button(p,t,pos,size,fn,accent) local b=new('TextButton',p,{Text=t,Position=pos,Size=size,BackgroundColor3=accent and C.accent or C.card,TextColor3=accent and C.bg or C.text,BorderSizePixel=0,Font=Enum.Font.ArialBold,TextSize=12,AutoButtonColor=true});corner(b,3); if accent then table.insert(accentObjects,b) else table.insert(surfaceObjects,b) end;bind(b.Activated,fn);return b end local gui=new('ScreenGui',pg,{Name='VANTA',ResetOnSpawn=false,IgnoreGuiInset=true,ZIndexBehavior=Enum.ZIndexBehavior.Sibling}) local root=new('CanvasGroup',gui,{Position=UDim2.fromScale(.5,.5),Size=UDim2.fromOffset(674,422),AnchorPoint=Vector2.new(.5,.5),BackgroundColor3=C.bg,BorderSizePixel=0});corner(root,5);border(root);table.insert(bgObjects,root) local scale=new('UIScale',root,{Scale=1}) local side=frame(root,UDim2.new(),UDim2.new(0,128,1,0),Color3.fromRGB(19,19,19));local brand=text(side,'vanta',UDim2.fromOffset(16,0),UDim2.fromOffset(100,47),19,C.text,true);brand.Active=true frame(root,UDim2.fromOffset(128,0),UDim2.new(0,1,1,0),C.line) local main=frame(root,UDim2.fromOffset(129,0),UDim2.new(1,-129,1,0),C.bg);table.insert(bgObjects,main) local top=frame(main,UDim2.new(),UDim2.new(1,0,0,43),C.bg);top.Active=true;table.insert(bgObjects,top) local heading=text(top,'Home',UDim2.fromOffset(14,0),UDim2.fromOffset(265,43),14,C.text,true) local subtitle=text(top,'',UDim2.new(),UDim2.new(),10,C.muted);local statusTop=subtitle frame(main,UDim2.fromOffset(0,43),UDim2.new(1,0,0,1),C.line) local search=new('TextBox',main,{Position=UDim2.fromOffset(14,49),Size=UDim2.new(1,-28,0,28),BackgroundColor3=C.card,TextColor3=C.text,PlaceholderColor3=C.muted,PlaceholderText='Search features',Text='',Visible=false,ClearTextOnFocus=false,Font=Enum.Font.Arial,TextSize=12});corner(search,3);border(search) local scroll=new('ScrollingFrame',main,{Position=UDim2.fromOffset(14,58),Size=UDim2.new(1,-28,1,-89),BackgroundTransparency=1,BorderSizePixel=0,ScrollBarThickness=2,ScrollBarImageColor3=C.muted,CanvasSize=UDim2.new(),AutomaticCanvasSize=Enum.AutomaticSize.Y}) local list=new('UIListLayout',scroll,{Padding=UDim.new(0,0),SortOrder=Enum.SortOrder.LayoutOrder}) local footer=frame(main,UDim2.new(0,0,1,-24),UDim2.new(1,0,0,24),C.bg);table.insert(bgObjects,footer);frame(footer,UDim2.new(),UDim2.new(1,0,0,1),C.line) local status=text(footer,'Ready',UDim2.fromOffset(14,0),UDim2.new(1,-145,1,0),10,C.muted) text(footer,'Right Shift to hide',UDim2.new(1,-123,0,0),UDim2.fromOffset(115,24),10,C.muted) text(side,'Local session',UDim2.new(0,15,1,-24),UDim2.fromOffset(110,19),10,C.muted) local island=frame(gui,UDim2.new(.5,0,0,24),UDim2.fromOffset(205,34),C.bg);island.AnchorPoint=Vector2.new(.5,0);corner(island,5);border(island);table.insert(bgObjects,island) local fpsLabel=text(island,'',UDim2.fromOffset(151,0),UDim2.fromOffset(50,34),10,C.muted) local function icon(p,name,x,y,col) local holder=new('Frame',p,{Position=UDim2.fromOffset(x,y),Size=UDim2.fromOffset(15,15),BackgroundTransparency=1}) col=col or C.muted local function line(a,b,c,d) local dx,dy=c-a,d-b;local o=frame(holder,UDim2.fromOffset((a+c)/2,(b+d)/2),UDim2.fromOffset(math.sqrt(dx*dx+dy*dy),1.2),col);o.AnchorPoint=Vector2.new(.5,.5);o.Rotation=math.deg(math.atan2(dy,dx));corner(o,1)end local function path(points)for i=1,#points-1 do line(points[i][1],points[i][2],points[i+1][1],points[i+1][2])end end local function circle(a,b,r)local f=frame(holder,UDim2.fromOffset(a-r,b-r),UDim2.fromOffset(r*2,r*2),col);f.BackgroundTransparency=1;corner(f,20);new('UIStroke',f,{Color=col,Thickness=1.15})end if name=='Home' then path({{1,7},{7.5,1},{14,7},{12,7},{12,14},{9,14},{9,9},{6,9},{6,14},{3,14},{3,7}}) elseif name=='Character' then circle(7.5,4,2.6);path({{2,14},{2,11},{4,8},{11,8},{13,11},{13,14}}) elseif name=='Animations' then path({{1,2},{14,2},{14,13},{1,13},{1,2}});path({{6,5},{10,7.5},{6,10},{6,5}}) elseif name=='Commands' then path({{2,3},{7,7.5},{2,12}});line(8,12,14,12) elseif name=='Players' then circle(5,4,2.4);path({{.5,14},{.5,11},{3,8},{7,8},{9.5,11},{9.5,14}});path({{10,2},{12,3},{12,6},{10,7}});path({{11,9},{14,11},{14,14}}) elseif name=='Music' then line(5,11,5,3);line(5,3,13,1);line(13,1,13,9);line(5,5,13,3);circle(3,12,2);circle(11,10,2) elseif name=='Visuals' then path({{1,7.5},{4,4},{7.5,3},{11,4},{14,7.5},{11,11},{7.5,12},{4,11},{1,7.5}});circle(7.5,7.5,2) elseif name=='Performance' then path({{1,13},{1,8},{3,4},{7.5,2},{12,4},{14,8},{14,13}});line(7.5,10,11,5);circle(7.5,10,1) elseif name=='Search' then circle(6,6,4);line(9,9,14,14) elseif name=='Logo' then path({{1,2},{7.5,14},{14,2}});path({{5,2},{7.5,7},{10,2}}) else for i=1,3 do local y2=i*4;line(1,y2,14,y2);circle(i==2 and 10 or 5,y2,1.6)end end return holder end local render;local function go(t)tab=t;query='';search.Text='';search.Visible=false;scroll.Position=UDim2.fromOffset(14,58);scroll.Size=UDim2.new(1,-28,1,-89);root.Visible=true;render()end local function searchToggle()search.Visible=not search.Visible;scroll.Position=UDim2.fromOffset(14,search.Visible and 84 or 58);scroll.Size=UDim2.new(1,-28,1,search.Visible and -115 or -89);if search.Visible then search:CaptureFocus()else search.Text='' end end local sb=button(top,'',UDim2.new(1,-57,0,9),UDim2.fromOffset(25,25),searchToggle);sb.BackgroundTransparency=1;icon(sb,'Search',5,5) local cb=button(top,'×',UDim2.new(1,-29,0,9),UDim2.fromOffset(25,25),function()root.Visible=false end);cb.BackgroundTransparency=1;cb.TextSize=18 for i,t in ipairs({'Logo','Home','Animations','Music','Settings'})do local b=button(island,'',UDim2.fromOffset(5+(i-1)*29,4),UDim2.fromOffset(28,26),function()if t=='Logo'then root.Visible=not root.Visible else go(t)end end);b.BackgroundTransparency=1;icon(b,t,6,5)end local function notify(msg) if alive and cfg.notifications then status.Text=msg end end local function humanoid() return player.Character and player.Character:FindFirstChildOfClass('Humanoid') end local function stopAnim() if track then track:Stop(.12);track:Destroy();track=nil end;if anim then anim:Destroy();anim=nil end end -- Independent visual reanimation rig. The original avatar retains all game physics. -- No server remotes, executor APIs, or character replacement. local R={rig=nil,source=nil,original={},joints={},stateTrack=nil,stateAnimation=nil,stateToken=nil} function R.target() return R.rig or player.Character end function R.stopState() if R.stateTrack then R.stateTrack:Stop(0.12);R.stateTrack:Destroy();R.stateTrack=nil end if R.stateAnimation then R.stateAnimation:Destroy();R.stateAnimation=nil end R.stateToken=nil end function R.restoreVisibility() for part,old in pairs(R.original)do if part.Parent then part.LocalTransparencyModifier=old end end table.clear(R.original) end function R.visibility() if not R.rig or not R.source then return end if not cfg.reanimHide then R.restoreVisibility();return end for _,part in ipairs(R.source:GetDescendants())do if part:IsA("BasePart")then if R.original[part]==nil then R.original[part]=part.LocalTransparencyModifier end part.LocalTransparencyModifier=1 end end end function R.disable() stopAnim();R.stopState();if R.stopClip then R.stopClip()end;R.waiting=nil;R.restoreVisibility() local rig=R.rig;R.rig=nil;R.source=nil;R.animator=nil;R.humanoid=nil table.clear(R.joints) if rig then rig:Destroy()end end function R.enable() if R.rig then return true end local src=player.Character local sh=src and src:FindFirstChildOfClass("Humanoid") local sr=src and src:FindFirstChild("HumanoidRootPart") if not(sh and sr and sh.Health>0)then return false,"Character is not ready"end stopAnim() local was=src.Archivable src.Archivable=true local ok,rig=pcall(function()return src:Clone()end) src.Archivable=was if not ok or not rig then return false,"Could not clone the local avatar"end R.rig=rig;R.source=src local setup,err=pcall(function() rig.Name="VANTA_LocalReanimation" local rootPart=assert(rig:FindFirstChild("HumanoidRootPart"),"Missing rig root") for _,o in ipairs(rig:GetDescendants())do if o.Parent then if o:IsA("LuaSourceContainer")or o:IsA("Sound")or o:IsA("Tool")or o:IsA("ParticleEmitter")or o:IsA("Trail")or o:IsA("Beam")or o:IsA("BillboardGui")or o:IsA("SurfaceGui")or o:IsA("ProximityPrompt")or o:IsA("ClickDetector")then o:Destroy() elseif o:IsA("BasePart")then o.Anchored=o==rootPart;o.CanCollide=false;o.CanTouch=false;o.CanQuery=false;o.Massless=true;o.LocalTransparencyModifier=0 end end end local h=assert(rig:FindFirstChildOfClass("Humanoid"),"Missing rig humanoid") h.DisplayDistanceType=Enum.HumanoidDisplayDistanceType.None;h.AutoRotate=false pcall(function()h.EvaluateStateMachine=false end) R.humanoid=h local animator=h:FindFirstChildOfClass("Animator") if not animator then animator=Instance.new("Animator");animator.Parent=h end R.animator=animator local originals={} for _,o in ipairs(src:GetDescendants())do if o:IsA("Motor6D")then originals[o.Name]=o end end for _,o in ipairs(rig:GetDescendants())do if o:IsA("Motor6D")and originals[o.Name]then R.joints[o]=originals[o.Name]end end assert(next(R.joints),"No compatible rig joints") rig:PivotTo(src:GetPivot());rig.Parent=workspace R.visibility() end) if not setup then R.disable();return false,tostring(err)end return true end function R.toggle() if R.rig then R.disable();notify("Reanimation disabled") else local ok,err=R.enable();notify(ok and "Local reanimation enabled"or("Reanimation failed: "..tostring(err)))end if render then render()end end -- Reanimation library: data-only Motor6D keyframes, independent local rig. R.library={} R.selected=nil R.clip=nil R.clock=0 R.waiting=nil local function poseFrame(t,angles) local joints={} local aliases={LeftShoulder="Left Shoulder",RightShoulder="Right Shoulder",LeftHip="Left Hip",RightHip="Right Hip",Root="RootJoint"} for joint,rot in pairs(angles)do local cf=CFrame.Angles(math.rad(rot[1]),math.rad(rot[2]),math.rad(rot[3])) joints[joint]={cf:GetComponents()} if aliases[joint]then joints[aliases[joint]]=joints[joint]end end return {t=t,joints=joints} end local function makeClip(name,frames) R.library[name]={format="VANTA-MOTOR6D-1",frames=frames} end makeClip("Wave",{poseFrame(0,{RightShoulder={0,0,0}}),poseFrame(.45,{RightShoulder={0,0,115},RightElbow={-35,0,0}}),poseFrame(.85,{RightShoulder={0,0,145},RightElbow={-55,0,0}}),poseFrame(1.25,{RightShoulder={0,0,100},RightElbow={-30,0,0}}),poseFrame(1.65,{RightShoulder={0,0,145},RightElbow={-55,0,0}}),poseFrame(2.1,{RightShoulder={0,0,0},RightElbow={0,0,0}})}) makeClip("Side step",{poseFrame(0,{}),poseFrame(.35,{LeftHip={-15,0,-15},RightHip={12,0,10},LeftShoulder={0,0,-22},RightShoulder={0,0,22},Waist={0,-8,0}}),poseFrame(.7,{}),poseFrame(1.05,{LeftHip={12,0,-10},RightHip={-15,0,15},LeftShoulder={0,0,-22},RightShoulder={0,0,22},Waist={0,8,0}}),poseFrame(1.4,{})}) makeClip("Shoulder groove",{poseFrame(0,{LeftShoulder={-12,0,-18},RightShoulder={12,0,18},Waist={0,-9,0}}),poseFrame(.5,{LeftShoulder={15,0,-10},RightShoulder={-15,0,30},Waist={0,10,0},Neck={0,-6,0}}),poseFrame(1,{LeftShoulder={-12,0,-18},RightShoulder={12,0,18},Waist={0,-9,0}})}) makeClip("Stretch",{poseFrame(0,{}),poseFrame(.65,{LeftShoulder={0,0,-145},RightShoulder={0,0,145},Waist={-8,0,0},Neck={8,0,0}}),poseFrame(1.5,{LeftShoulder={0,0,-145},RightShoulder={0,0,145},Waist={-8,0,0},Neck={8,0,0}}),poseFrame(2.1,{})}) makeClip("Head nod",{poseFrame(0,{Neck={0,0,0}}),poseFrame(.35,{Neck={22,0,0}}),poseFrame(.7,{Neck={-8,0,0}}),poseFrame(1.05,{Neck={18,0,0}}),poseFrame(1.4,{Neck={0,0,0}})}) makeClip("Air sway",{poseFrame(0,{LeftShoulder={0,0,-28},RightShoulder={0,0,28},Waist={0,0,-6},Root={0,0,-4}}),poseFrame(.65,{LeftShoulder={0,0,-36},RightShoulder={0,0,36},Waist={0,0,6},Root={0,0,4}}),poseFrame(1.3,{LeftShoulder={0,0,-28},RightShoulder={0,0,28},Waist={0,0,-6},Root={0,0,-4}})}) function R.validate(data) if type(data)~="table" or data.format~="VANTA-MOTOR6D-1" or type(data.frames)~="table" or #data.frames<2 or #data.frames>900 then return nil end local frames={};local prior=-1 for _,f in ipairs(data.frames)do if type(f)~="table" or type(f.t)~="number" or f.t~=f.t or f.t<0 or f.t>60 or f.t<=prior or type(f.joints)~="table" then return nil end prior=f.t local out={};local count=0 for n,v in pairs(f.joints)do count+=1 if count>80 or type(n)~="string" or #n>80 or type(v)~="table" or #v~=12 then return nil end local copy={} for i=1,12 do local q=v[i];if type(q)~="number" or q~=q or math.abs(q)>(i<=3 and 20 or 1.001)then return nil end;copy[i]=q end out[n]=copy end table.insert(frames,{t=f.t,joints=out}) end if prior-frames[1].t<.02 then return nil end local origin=frames[1].t for _,f in ipairs(frames)do f.t-=origin end return {format="VANTA-MOTOR6D-1",frames=frames} end function R.get(name) return R.library[name]or cfg.reanimCustoms[name] end function R.names(mode) local result={} if mode~="Customs"then for n in pairs(R.library)do table.insert(result,n)end end if mode~="Library"then for n in pairs(cfg.reanimCustoms)do table.insert(result,n)end end if mode=="Favorites"or mode=="Keybinds"then local target=mode=="Favorites"and cfg.reanimFavs or cfg.reanimBinds for i=#result,1,-1 do if not target[result[i]]then table.remove(result,i)end end end table.sort(result,function(a,b)return a:lower()0 and #n<=48 and not R.library[n]then local d=R.validate(data);if d then customs[n]=d;total+=1 end end end cfg.reanimCustoms=customs local favs,binds,used={},{},{} for n,v in pairs(type(cfg.reanimFavs)=="table"and cfg.reanimFavs or {})do if v==true and R.get(n)then favs[n]=true end end for n,k in pairs(type(cfg.reanimBinds)=="table"and cfg.reanimBinds or {})do if R.get(n)and type(k)=="string"and not used[k]and k~="RightShift"and k~="Unknown"and k~="Escape"then local ok,v=pcall(function()return Enum.KeyCode[k]end);if ok and v then binds[n]=k;used[k]=true end end end cfg.reanimFavs=favs;cfg.reanimBinds=binds end function R.stopClip() R.clip=nil;R.active=nil;R.blend=nil end function R.playClip(name) if not R.rig then notify("Enable reanimation first");return end if R.active==name then R.stopClip();notify("Animation stopped");if render then render()end;return end local data=R.get(name) if not data then notify("Animation not found");return end stopAnim();R.stopState() R.selected=name;R.active=name;R.clip=data.frames R.clock=cfg.reanimReverse and R.clip[#R.clip].t or 0 R.blend={};R.blendTime=0 for joint in pairs(R.joints)do if joint.Parent then R.blend[joint]=joint.Transform end end notify("Playing "..name);if render then render()end end function R.favorite(name) if not R.get(name)then return end cfg.reanimFavs[name]=not cfg.reanimFavs[name] or nil;R.save() if render then render()end end function R.bindName(name) if cfg.reanimBinds[name]then cfg.reanimBinds[name]=nil;R.waiting=nil;R.save();notify("Binding removed") else R.waiting=name;notify("Press a key for "..name)end if render then render()end end function R.handleInput(i,processed) if i.UserInputType~=Enum.UserInputType.Keyboard then return false end local key=i.KeyCode.Name if R.waiting and not UIS:GetFocusedTextBox()then local name=R.waiting;R.waiting=nil if key~="Escape" and key~="Backspace"and key~="Delete"and key~="RightShift"and key~="Unknown"then for n,k in pairs(cfg.reanimBinds)do if k==key then cfg.reanimBinds[n]=nil end end cfg.reanimBinds[name]=key;R.save();notify(name.." bound to "..key) else notify("Binding cancelled")end if render then render()end;return true end if processed or UIS:GetFocusedTextBox()or not R.rig then return false end for n,k in pairs(cfg.reanimBinds)do if k==key then R.playClip(n);return true end end return false end -- Restricted data reader: no evaluation of imported Lua. function R.readLiteral(src) local p,n,nodes=1,#src,0 local function ws() while p<=n do local _,b=src:find("^%s+",p) if b then p=b+1 elseif src:sub(p,p+3)=="--[["then local e=src:find("]]",p+4,true);assert(e,"Unclosed comment");p=e+2 elseif src:sub(p,p+1)=="--"then p=(src:find("\n",p+2,true)or n)+1 else break end end end local function take(s)ws();if src:sub(p,p+#s-1)==s then p+=#s;return true end;return false end local function need(s)assert(take(s),"Expected "..s)end local function ident()ws();local a,b=src:find("^[%a_][%w_]*",p);if a then p=b+1;return src:sub(a,b)end end local function str() local quote=src:sub(p,p);p+=1;local out={} while p<=n do local c=src:sub(p,p);p+=1 if c==quote then return table.concat(out)end if c=="\\"then c=src:sub(p,p);p+=1;c=({n="\n",r="\r",t="\t",["\\"]="\\",["'"]="'",['"']='"'})[c]or error("Unsupported escape")end table.insert(out,c);assert(#out<=1000,"String too long") end error("Unclosed string") end local expr local function atom(depth) ws();nodes+=1;assert(depth<40 and nodes<=600000,"Data limit exceeded") local c=src:sub(p,p) if c=="{"then p+=1;local t={};local i=1 while not take("}")do local key,v if take("[")then key=expr(depth+1);assert(type(key)=="string"or type(key)=="number","Invalid key");need("]");need("=");v=expr(depth+1) else local save=p;local id=ident();if id and take("=")then key=id;v=expr(depth+1)else p=save;key=i;i+=1;v=expr(depth+1)end end t[key]=v if take("}")then break end assert(take(",")or take(";"),"Expected table separator") end return t elseif c=="'"or c=='"'then return str() elseif c=="-"or c=="+"or c:match("[%d.]")then local a,b=src:find("^[+-]?%d*%.?%d+[eE][+-]?%d+",p) if not a then a,b=src:find("^[+-]?%d*%.?%d+",p)end assert(a,"Invalid number");local v=tonumber(src:sub(a,b));p=b+1;assert(v and v==v and math.abs(v)<1000000,"Invalid number");return v end local id=ident();assert(id,"Invalid value") if id=="true"then return true elseif id=="false"then return false elseif id=="nil"then return nil end need(".");local method=ident() if id=="math"and method=="pi"then return math.pi end need("(");local args={} if not take(")")then repeat table.insert(args,expr(depth+1));assert(#args<=12,"Too many arguments")until not take(",");need(")")end for _,v in ipairs(args)do assert(type(v)=="number","Numeric arguments required")end if id=="CFrame"and method=="new"and (#args==0 or #args==3 or #args==7 or #args==12)then return CFrame.new(table.unpack(args)) elseif id=="CFrame"and (method=="Angles"or method=="fromEulerAnglesXYZ"or method=="fromOrientation")and #args==3 then if method=="fromOrientation"then return CFrame.fromOrientation(table.unpack(args))end;return CFrame.Angles(table.unpack(args)) elseif id=="Vector3"and method=="new"and #args==3 then return Vector3.new(table.unpack(args)) elseif id=="math"and method=="rad"and #args==1 then return math.rad(args[1])end error("Unsupported constructor") end expr=function(depth) local v=atom(depth) while take("*")do local b=atom(depth+1);assert(typeof(v)=="CFrame"and typeof(b)=="CFrame","Only CFrame composition allowed");v=v*b end return v end ws();local save=p;local id=ident();local data if id=="return"then data=expr(0) elseif id=="local"then local var=ident();assert(var,"Expected table name");need("=");data=expr(0);take(";");assert(ident()=="return"and ident()==var,"Only a returned data table is allowed") else p=save;data=expr(0)end take(";");ws();assert(p>n and type(data)=="table","Only a data table is allowed") return data end function R.toFrame(v) if typeof(v)=="CFrame"then return v end if type(v)~="table"then return end if v.CFrame or v.cframe or v.transform then return R.toFrame(v.CFrame or v.cframe or v.transform)end local function xyz(a) if typeof(a)=="Vector3"then return a.X,a.Y,a.Z end if type(a)=="table"then return tonumber(a[1]or a.X or a.x or 0),tonumber(a[2]or a.Y or a.y or 0),tonumber(a[3]or a.Z or a.z or 0)end return 0,0,0 end local ok,cf=pcall(function() if #v==12 or #v==7 or #v==3 then return CFrame.new(table.unpack(v))end if #v==6 then return CFrame.new(v[1],v[2],v[3])*CFrame.Angles(v[4],v[5],v[6])end local pos=v.Position or v.position or v.pos local rot=v.Orientation or v.orientation or v.rotation or v.angles if pos or rot then local x,y,z=xyz(pos);local a,b,c=xyz(rot);return CFrame.new(x,y,z)*CFrame.Angles(a,b,c)end end) if ok then return cf end end function R.normalize(raw) if type(raw)~="table"then return end if raw.format=="VANTA-MOTOR6D-1"then return R.validate(raw)end local frames={};local visited={};local count=0 local function visit(node,key,depth) if type(node)~="table"or visited[node]or depth>12 then return end visited[node]=true;count+=1;assert(count<=10000,"Too many entries") local t=tonumber(node.Time or node.time or node.timestamp or node.t) local poses=node.Poses or node.poses or node.joints or node.bones or node.Joints or node.Data or node.data if not t and poses then t=tonumber(key)end if not t and type(key)=="number"and not node[1]then t=key end if t and t>=0 and t<=60 then local joints={} for name,v in pairs(type(poses)=="table"and poses or node)do if type(v)=="table"then name=v.Name or v.name or name end if type(name)=="string"and #name<=80 then local cf=R.toFrame(v) if cf then joints[name]={cf:GetComponents()}end end end if next(joints)then table.insert(frames,{t=t,joints=joints});assert(#frames<=900,"Too many frames");return end end local root=node.keyframes or node.Keyframes or node.frames or node.Frames or node.KeyframeSequence or node.animData or node.animations or node.data if type(root)=="table"then visit(root,nil,depth+1);return end for k,v in pairs(node)do if type(v)=="table"then visit(v,k,depth+1)end end end visit(raw,nil,0) table.sort(frames,function(a,b)return a.t3000000 then return nil,"File exceeds 3 MB"end raw=raw:gsub("^\239\187\191",""):gsub("\r\n","\n") local ok,data=pcall(Http.JSONDecode,Http,raw) if not ok then ok,data=pcall(R.readLiteral,raw)end if not ok then return nil,"Unsupported data syntax; use JSON or a literal Lua table"end local good,clip=pcall(R.normalize,data) if not good or not clip then return nil,"No valid keyframes found"end return clip end function R.addCustom() local name=tostring(cfg.reanimCustomName or ""):match("^%s*(.-)%s*$"):sub(1,48) if name==""or R.library[name]then notify("Enter a unique custom name");return end if not cfg.reanimCustoms[name]and #R.names("Customs")>=12 then notify("Custom library is full");return end local raw=exportText and exportText.Text or "" local clip,err=R.decodeKeyframes(raw) if not clip then notify(err or "Invalid keyframe data");return end if R.active==name then R.stopClip()end cfg.reanimCustoms[name]=clip;R.save();R.selected=name;notify("Saved "..name);render() end function R.removeCustom(name) if not cfg.reanimCustoms[name]then return end if R.active==name then R.stopClip()end cfg.reanimCustoms[name]=nil;cfg.reanimBinds[name]=nil;cfg.reanimFavs[name]=nil if R.selected==name then R.selected=nil end;R.save() render();notify("Removed "..name) end R.folderPath="Vanta/ReanimData" function R.folder() local f=workspace:FindFirstChild("Vanta") if not f then f=Instance.new("Folder");f.Name="Vanta";f.Parent=workspace end if not f:IsA("Folder")then return end local d=f:FindFirstChild("ReanimData") if not d then d=Instance.new("Folder");d.Name="ReanimData";d.Parent=f end if not d:IsA("Folder")then return end for _,n in ipairs({"customs","ConfigBackups","ConfigImports"})do if not d:FindFirstChild(n)then local x=Instance.new("Folder");x.Name=n;x.Parent=d end end return d end function R.snapshot() local customs={};for n,v in pairs(cfg.reanimCustoms)do table.insert(customs,{name=n,animData=v,isJson=true})end local states={};for _,n in ipairs({"Idle","Walk","Run","Jump","Fall","Climb","Swim","Sit"})do states[n]=cfg["state"..n]end return {schema=1,format="VANTA-REANIM-1",animations={favorites=cfg.reanimFavs,custom=customs,states=states,transition={duration=cfg.reanimFade/1000,curve=cfg.reanimCurve}},controls={animationKeybinds=cfg.reanimBinds,speed={current=cfg.speed/100,state=cfg.stateSpeed/100},speedKeys={{key=cfg.speedKey1,speed=cfg.speedPreset1/100},{key=cfg.speedKey2,speed=cfg.speedPreset2/100},{key=cfg.speedKey3,speed=cfg.speedPreset3/100}},reverseKey=cfg.reverseKey},features={loop=cfg.reanimLoop,reverse=cfg.reanimReverse}} end function R.save() local d=R.folder();if not d then return end local v=d:FindFirstChild("settings.json") if not v then v=Instance.new("StringValue");v.Name="settings.json";v.Parent=d end if v:IsA("StringValue")then local ok,s=pcall(Http.JSONEncode,Http,R.snapshot());if ok then v.Value=s end end end function R.export() if exportText then exportText.Text=Http:JSONEncode(R.snapshot());notify("Config ready to copy")end end function R.import() local raw=exportText and exportText.Text or "" if #raw>3000000 then notify("Config too large");return end local ok,d=pcall(Http.JSONDecode,Http,raw) if not ok or type(d)~="table"then notify("Invalid JSON");return end if type(d.settings)=="table"then d=d.settings end local a,c=d.animations,d.controls if type(a)~="table"then notify("Missing animation settings");return end local folder=R.folder();local b=folder and folder:FindFirstChild("ConfigBackups") if b then local v=Instance.new("StringValue");v.Name="before_"..os.time();v.Value=Http:JSONEncode(R.snapshot());v.Parent=b end local skipped=0 if type(a.custom)=="table"then for _,v in ipairs(a.custom)do if type(v)=="table"and type(v.name)=="string"and #v.name>0 and #v.name<=48 and not R.library[v.name]then local data=v.animData if type(data)~="table"and type(v.source)=="string"then local good,val=pcall(Http.JSONDecode,Http,v.source);if good then data=val end end local clip=R.normalize(data) if not clip and type(v.source)=="string"then clip=R.decodeKeyframes(v.source)end if clip and (cfg.reanimCustoms[v.name]or #R.names("Customs")<12)then cfg.reanimCustoms[v.name]=clip else skipped+=1 end else skipped+=1 end end end if type(a.favorites)=="table"then for n,v in pairs(a.favorites)do if v and R.get(n)then cfg.reanimFavs[n]=true end end end if type(c)=="table"then if type(c.animationKeybinds)=="table"then for n,k in pairs(c.animationKeybinds)do if R.get(n)and type(k)=="string"then cfg.reanimBinds[n]=k end end end if type(c.speed)=="table"then if type(c.speed.current)=="number"then cfg.speed=math.clamp(c.speed.current*100,25,200)end;if type(c.speed.state)=="number"then cfg.stateSpeed=math.clamp(c.speed.state*100,25,200)end end if type(c.speedKeys)=="table"then for i=1,3 do local s=c.speedKeys[i];if type(s)=="table"then if type(s.key)=="string"then cfg["speedKey"..i]=s.key end;if type(s.speed)=="number"then cfg["speedPreset"..i]=math.clamp(s.speed*100,25,200)end end end end if type(c.reverseKey)=="string"then cfg.reverseKey=c.reverseKey end end if type(a.transition)=="table"then if type(a.transition.duration)=="number"then cfg.reanimFade=math.clamp(a.transition.duration*1000,0,500)end;if a.transition.curve=="Linear"or a.transition.curve=="Smooth"then cfg.reanimCurve=a.transition.curve end end if type(a.states)=="table"then for _,n in ipairs({"Idle","Walk","Run","Jump","Fall","Climb","Swim","Sit"})do local v=a.states[n];if type(v)=="string"and R.get(v)then cfg["state"..n]=v end end end R.cleanProfile();R.save();render();notify("Imported supported config; skipped "..skipped.." incompatible clips") end function R.state() local h=R.source and R.source:FindFirstChildOfClass("Humanoid");if not h then return "Idle"end local s=h:GetState() if s==Enum.HumanoidStateType.Jumping then return "Jump"elseif s==Enum.HumanoidStateType.Freefall then return "Fall"elseif s==Enum.HumanoidStateType.Climbing then return "Climb"elseif s==Enum.HumanoidStateType.Swimming then return "Swim"elseif s==Enum.HumanoidStateType.Seated then return "Sit"elseif h.MoveDirection.Magnitude>.05 then return h.WalkSpeed>18 and "Run"or"Walk"end return "Idle" end function R.poseTools(joint,target) local n=joint.Name if cfg.reanimFreeze and R.frozen and R.frozen[n]then return R.frozen[n]end if cfg.reanimHead and n=="Neck"and workspace.CurrentCamera and R.source then local dir=R.source:GetPivot():VectorToObjectSpace(workspace.CurrentCamera.CFrame.LookVector);target=target*CFrame.Angles(math.clamp(math.asin(math.clamp(dir.Y,-1,1)),-.5,.5),math.clamp(math.atan2(-dir.X,-dir.Z),-.7,.7),0)end if n=="LeftShoulder"or n=="Left Shoulder"then target=target*CFrame.new(-(cfg.reanimLeftStretch-100)/100,0,0)end if n=="RightShoulder"or n=="Right Shoulder"then target=target*CFrame.new((cfg.reanimRightStretch-100)/100,0,0)end return target end function R.capturePose() local rig=R.target();if not rig then return end local f={};for _,j in ipairs(rig:GetDescendants())do if j:IsA("Motor6D")then f[j.Name]=j.Transform end end R.frozen=f;cfg.reanimFreeze=true;notify("Own pose captured");render() end function R.savePose() if not R.frozen then notify("Capture your pose first");return end local name=cfg.reanimCustomName~=""and cfg.reanimCustomName or "Captured pose" if #name>48 or R.library[name]or(not cfg.reanimCustoms[name]and #R.names("Customs")>=12)then notify("Choose another name");return end local j={};for n,cf in pairs(R.frozen)do j[n]={cf:GetComponents()}end cfg.reanimCustoms[name]={format="VANTA-MOTOR6D-1",frames={{t=0,joints=j},{t=1,joints=j}}};R.save();notify("Pose saved to Customs");render() end function R.speedInput(i,processed) if processed or UIS:GetFocusedTextBox()or not R.rig or R.waiting or i.UserInputType~=Enum.UserInputType.Keyboard then return false end local k=i.KeyCode.Name if k==cfg.reverseKey then cfg.reanimReverse=not cfg.reanimReverse;R.save();render();return true end for n=1,3 do if k==cfg["speedKey"..n]then cfg.speed=cfg["speedPreset"..n];R.save();render();return true end end return false end function R.step(dt) if not R.rig then return end if not R.rig.Parent or not R.source or R.source~=player.Character or not R.source.Parent then R.disable();return end R.rig:PivotTo(R.source:GetPivot()) if not R.clip and cfg.reanimStates then local n=cfg['state'..R.state()];local d=R.get(n);if d then R.stateClip=d.frames;R.stateClock=(R.stateClock or 0)+(dt or 0)*cfg.stateSpeed/100 else R.stateClip=nil end else R.stateClip=nil end if R.clip or R.stateClip then local isState=not R.clip;local frames=R.clip or R.stateClip;local duration=frames[#frames].t dt=math.clamp(dt or 0,0,.1) if isState then R.clock=(R.stateClock or 0)%duration else R.clock+=dt*cfg.speed/100*(cfg.reanimReverse and -1 or 1)end if R.clock>duration or R.clock<0 then if cfg.reanimLoop then R.clock=R.clock%duration else R.stopClip();task.defer(function()if alive and render then render()end end);return end end local lo,hi=1,#frames while hi-lo>1 do local mid=math.floor((lo+hi)/2);if frames[mid].t<=R.clock then lo=mid else hi=mid end end local a,b=frames[lo],frames[hi];local alpha=math.clamp((R.clock-a.t)/math.max(.0001,b.t-a.t),0,1) if cfg.reanimCurve=='Smooth'then alpha=alpha*alpha*(3-2*alpha)end R.blendTime=(R.blendTime or 0)+dt local blend=isState and 1 or math.clamp(R.blendTime/math.max(.001,cfg.reanimFade/1000),0,1) for joint,source in pairs(R.joints)do if joint.Parent and source.Parent then local part=joint.Part1 and joint.Part1.Name;local av=a.joints[joint.Name]or(part and a.joints[part]);local bv=b.joints[joint.Name]or(part and b.joints[part]) local base=source.Transform local x=av and CFrame.new(table.unpack(av))or base local y=bv and CFrame.new(table.unpack(bv))or base local target=x:Lerp(y,alpha) if blend<1 and R.blend[joint]then target=R.blend[joint]:Lerp(target,blend)end joint.Transform=R.poseTools(joint,target) end end return end if track and track.IsPlaying then return end for joint,source in pairs(R.joints)do if joint.Parent and source.Parent then joint.Transform=R.poseTools(joint,source.Transform) end end end function R.playbackSpeed() return cfg.speed/100*(cfg.reanimReverse and -1 or 1) end function R.startTrack(t) local rate=R.playbackSpeed() t:Play(cfg.reanimFade/1000,1,rate<0 and 0 or rate) if rate<0 then task.spawn(function() local untilTime=os.clock()+3 while alive and track==t and t.Length<=0 and os.clock()0 and cfg.reanimReverse then t.TimePosition=math.max(0,t.Length-.01)end t:AdjustSpeed(R.playbackSpeed()) end end) end end bind(Run.PreSimulation,R.step) bind(Run.RenderStepped,function()if R.rig and cfg.reanimHide then R.visibility()end end) bind(player.CharacterRemoving,function()if R.rig then R.disable();if render and alive then render()end end end) local function playAnim() if R.clip then R.stopClip()end;if track and track.IsPlaying then stopAnim();notify('Animation stopped');return end;if track then stopAnim()end;local id=tostring(cfg.animId):match('^%d+$');local h=humanoid();local animator=R.rig and R.animator or (h and h:FindFirstChildOfClass('Animator'));if not id or not animator then notify('Enter an allowed animation ID; Animator required');return end;anim=Instance.new('Animation');anim.AnimationId='rbxassetid://'..id;local ok,res=pcall(function()return animator:LoadAnimation(anim)end);if not ok then stopAnim();notify('Could not load animation');return end;R.stopState();track=res;track.Looped=cfg.loop;track.Priority=Enum.AnimationPriority.Action;local started=pcall(R.startTrack,track);if not started then stopAnim();notify('Animation could not start');return end;notify('Playing animation '..id) end local function applyParticles(obj) if obj:IsA('ParticleEmitter') or obj:IsA('Trail') or obj:IsA('Beam') then if cfg.particles then if particleOriginal[obj]==nil then particleOriginal[obj]=obj.Enabled end;obj.Enabled=false end end end local function restoreParticles() for o,v in pairs(particleOriginal) do if o.Parent then o.Enabled=v end end;table.clear(particleOriginal) end local function setEffect(key,class,props) local fx=effects[key];if not fx then fx=new(class,Lighting,{Name='VANTA_'..key,Enabled=false});effects[key]=fx;for k,v in pairs(props) do fx[k]=v end end;fx.Enabled=cfg[key] end local particlesApplied=false local originalLighting={Brightness=Lighting.Brightness,ClockTime=Lighting.ClockTime} local materialApplied=false local customLighting=false local packOriginal={} local lyricsObjects={} local function restoreMaterials()for o,v in pairs(materialOriginal)do if o.Parent then o.Material=v end end;table.clear(materialOriginal)end local function applyMaterial(o)if cfg.lowDetail and o:IsA('BasePart')and o.Material~=Enum.Material.SmoothPlastic then if materialOriginal[o]==nil then materialOriginal[o]=o.Material end;o.Material=Enum.Material.SmoothPlastic end end local function restorePack()for o,id in pairs(packOriginal)do if o.Parent then o.AnimationId=id end end;table.clear(packOriginal)end local function applyPack()restorePack();if not cfg.packEnabled then return end;local char=player.Character;local animate=char and char:FindFirstChild('Animate');if not animate then return end;for _,key in ipairs({'Idle','Walk','Run','Jump','Fall','Climb','Swim'})do local id=tostring(cfg['pack'..key]):match('^%d+$');local folder=animate:FindFirstChild(key:lower());if id and folder then for _,o in ipairs(folder:GetDescendants())do if o:IsA('Animation')then packOriginal[o]=o.AnimationId;o.AnimationId='rbxassetid://'..id end end end end end local function clearLyrics()for _,o in ipairs(lyricsObjects)do o:Destroy()end;table.clear(lyricsObjects)end local function applyLyrics()clearLyrics();if cfg.lyrics==''then return end;local char=player.Character;local hrp=char and char:FindFirstChild('HumanoidRootPart');if not hrp then return end;for _,mode in ipairs({'sky','ground'})do if cfg[mode..'Lyrics']then local part=new('Part',workspace,{Name='VANTA_Lyrics',Anchored=true,CanCollide=false,CanTouch=false,CanQuery=false,Transparency=1,Size=Vector3.new(1,1,1),CFrame=hrp.CFrame*CFrame.new(0,mode=='sky' and 12 or -2,-8)});table.insert(lyricsObjects,part);local board=new('BillboardGui',part,{Size=UDim2.fromOffset(330,65),AlwaysOnTop=false});local label=text(board,cfg.lyrics,UDim2.new(),UDim2.fromScale(1,1),20,C.text,true);label.TextWrapped=true;label.TextXAlignment=Enum.TextXAlignment.Center;label.TextStrokeTransparency=.35 end end end local function apply() local cam=workspace.CurrentCamera;if cam then cam.FieldOfView=cfg.fov end local h=humanoid();if h then if not originalHum[h] then originalHum[h]={h.WalkSpeed,h.JumpPower} end;if cfg.walk~=defaults.walk then h.WalkSpeed=cfg.walk elseif originalHum[h] then h.WalkSpeed=originalHum[h][1] end;if cfg.jump~=defaults.jump then h.JumpPower=cfg.jump elseif originalHum[h] then h.JumpPower=originalHum[h][2] end end if track then track:AdjustSpeed(R.playbackSpeed());track.Looped=cfg.loop end;if R.rig then R.visibility()end audio.Volume=cfg.mute and 0 or cfg.volume/100;eq.LowGain=cfg.bass;eq.MidGain=cfg.mid;eq.HighGain=cfg.treble Lighting.GlobalShadows=cfg.shadows and false or originalShadow; if cfg.shadows then Lighting.GlobalShadows=false end setEffect('bloom','BloomEffect',{Intensity=.45,Size=24,Threshold=1.1});setEffect('color','ColorCorrectionEffect',{Saturation=-.15,Contrast=.12,TintColor=Color3.fromRGB(210,235,255)});setEffect('dof','DepthOfFieldEffect',{FarIntensity=.25,FocusDistance=32,InFocusRadius=24}) if cfg.particles~=particlesApplied then particlesApplied=cfg.particles;if cfg.particles then for _,o in ipairs(workspace:GetDescendants()) do applyParticles(o) end else restoreParticles() end end if cfg.lowDetail~=materialApplied then materialApplied=cfg.lowDetail;if cfg.lowDetail then for _,o in ipairs(workspace:GetDescendants())do applyMaterial(o)end else restoreMaterials()end end if customLighting then Lighting.Brightness=cfg.brightness;Lighting.ClockTime=cfg.clock end local cc=effects.color;if cc then cc.Saturation=cfg.saturation/100;cc.Contrast=cfg.contrast/100 end island.Visible=cfg.island;scale.Scale=cfg.scale/100;root.GroupTransparency=1-cfg.opacity/100 local themes={Default={Color3.fromRGB(16,16,16),Color3.fromRGB(26,26,26)},Ink={Color3.fromRGB(9,9,9),Color3.fromRGB(20,20,20)}};local theme=themes[cfg.theme] or themes.Default;C.bg=theme[1];C.card=theme[2] local accents={White=Color3.fromRGB(229,229,229),Mint=Color3.fromRGB(145,193,166),Blue=Color3.fromRGB(157,185,228),Lilac=Color3.fromRGB(199,171,224),Sand=Color3.fromRGB(214,182,142)};C.accent=accents[cfg.accent] or accents.White for _,o in ipairs(bgObjects) do if o.Parent then o.BackgroundColor3=C.bg end end;for _,o in ipairs(surfaceObjects) do if o.Parent and not o:GetAttribute('VantaSwitch') and o.Parent~=side then o.BackgroundColor3=C.card end end;for _,o in ipairs(accentObjects) do if o.Parent then o.BackgroundColor3=C.accent end end;statusTop.TextColor3=C.accent end local function set(k,v) cfg[k]=v;if k:sub(1,6)=='reanim'or k:sub(1,5)=='state'or k:sub(1,5)=='speed'or k=='reverseKey'then R.save()end;if k=='brightness' or k=='clock' then customLighting=true end;if k=='quality' then cfg.particles=v=='Maximum FPS';cfg.shadows=cfg.particles;cfg.lowDetail=cfg.particles end;if k:sub(1,4)=='pack'then applyPack()end;if k=='lyrics' or k=='skyLyrics' or k=='groundLyrics'then applyLyrics()end;apply();notify('Updated')end local function exportConfig() return Http:JSONEncode(cfg) end local function safeImport(str) local ok,data=pcall(function()return Http:JSONDecode(str)end);if not ok or type(data)~='table' then notify('Invalid configuration JSON');return end;for k,v in pairs(defaults) do if k~='favorites' and type(data[k])==type(v) then cfg[k]=data[k] end end;for k,lohi in pairs({fov={40,100},speed={25,200},walk={8,32},jump={20,80},volume={0,100},bass={-12,12},treble={-12,12},scale={75,115},mid={-12,12},brightness={0,5},clock={0,24},saturation={-100,100},contrast={-100,100},opacity={65,100},reanimFade={0,500},stateSpeed={25,200},speedPreset1={25,200},speedPreset2={25,200},speedPreset3={25,200},reanimLeftStretch={100,150},reanimRightStretch={100,150}}) do cfg[k]=math.clamp(cfg[k],lohi[1],lohi[2]) end;R.cleanProfile();R.stopClip();cfg.favorites={};if type(data.favorites)=='table' then for _,id in ipairs(data.favorites) do if type(id)=='string' and id:match('^%d+$') and #cfg.favorites<100 then table.insert(cfg.favorites,id) end end end;apply();render();notify('Configuration imported') end local function playAudio() if audio.IsPlaying then audio:Pause();notify('Audio paused');return end;local id=tostring(cfg.audioId):match('^%d+$');if not id then notify('Enter an allowed audio asset ID');return end;local wanted='rbxassetid://'..id;if audio.SoundId~=wanted then audio.SoundId=wanted;audio:Play() elseif audio.TimePosition>0 then audio:Resume() else audio:Play() end;notify('Local audio playback') end local function unload() if not alive then return end;alive=false;R.disable();restoreParticles();restoreMaterials();restorePack();clearLyrics();Lighting.Brightness=originalLighting.Brightness;Lighting.ClockTime=originalLighting.ClockTime;Lighting.GlobalShadows=originalShadow;if workspace.CurrentCamera then workspace.CurrentCamera.FieldOfView=originalFov end;for h,values in pairs(originalHum) do if h.Parent then h.WalkSpeed=values[1];h.JumpPower=values[2] end end;for _,f in pairs(effects) do f:Destroy() end;audio:Destroy();for _,c in ipairs(connections) do c:Disconnect() end;for _,c in ipairs(rowConnections) do c:Disconnect() end;gui:Destroy() end local defs={};local function toggle(n,d,k) return {n,d,'toggle',k} end;local function range(n,d,k,lo,hi,s) return {n,d,'range',k,lo,hi,s or ''} end;local function input(n,d,k) return {n,d,'input',k} end;local function action(n,d,f) return {n,d,'action',f} end;local function choice(n,d,k,choices) return {n,d,'choice',k,choices} end local function recordingToggle() if recording then recording=false;notify('Recorded '..#samples..' frames');return end;samples={};recTime=0;recording=true;notify(R.rig and 'Recording reanimation rig at 15 Hz' or 'Recording own rig at 15 Hz') end local function recordingExport() if recording then recording=false end;local out={};for _,f in ipairs(samples) do if f.t>=trimStart and f.t<=trimEnd then table.insert(out,f) end end;if exportText then exportText.Text=Http:JSONEncode({format='VANTA-MOTOR6D-1',frames=out}) end;notify('Recording JSON prepared ('..#out..' frames)') end local function favorite() local id=tostring(cfg.animId):match('^%d+$');if not id then notify('Enter an animation ID');return end;if not table.find(cfg.favorites,id) then table.insert(cfg.favorites,id) end;render();notify('Favorite saved') end local function ownResetCamera() local h=humanoid();local cam=workspace.CurrentCamera;if cam and h then cam.CameraSubject=h;cam.CameraType=Enum.CameraType.Custom end;cfg.fov=70;apply();notify('Camera reset') end local function resetVisuals() customLighting=false;Lighting.Brightness=originalLighting.Brightness;Lighting.ClockTime=originalLighting.ClockTime;cfg.lowDetail=false;cfg.bloom=false;cfg.color=false;cfg.dof=false;cfg.shadows=false;cfg.particles=false;apply();render();notify('Visual effects reset') end local function resetCfg() R.disable();cfg=table.clone(defaults);cfg.favorites={};cfg.reanimFavs={};cfg.reanimBinds={};cfg.reanimCustoms={};customLighting=false;Lighting.Brightness=originalLighting.Brightness;Lighting.ClockTime=originalLighting.ClockTime;restorePack();clearLyrics();apply();render();notify('Defaults restored') end local function roster() local names={};for _,p in ipairs(Players:GetPlayers()) do table.insert(names,p.DisplayName..' (@'..p.Name..')') end;if exportText then exportText.Text=table.concat(names,'\n') end;notify('Roster: '..#names..' players') end local function trimInput(which,v) local n=tonumber(v);if n then if which=='start' then trimStart=math.clamp(n,0,trimEnd) else trimEnd=math.clamp(n,trimStart,60) end end end local order={'Home','Character','Animations','Commands','Players','Music','Visuals','Performance','Settings'} for i,t in ipairs(order)do local b=button(side,'',UDim2.fromOffset(6,47+(i-1)*33),UDim2.fromOffset(116,32),function()go(t)end);b.BackgroundTransparency=1;icon(b,t,9,8);text(b,t,UDim2.fromOffset(33,0),UDim2.fromOffset(80,32),12,C.text);nav[t]=b end local function quick(t,n)return action(n,'',function()go(t)end)end local sub='Library';local cmdFav={};local favOnly=false local function section(title,items)return {title,items}end local function exportProfile()if exportText then exportText.Text=exportConfig()end;notify('Profile JSON ready')end local function importProfile()if exportText then safeImport(exportText.Text);applyPack();applyLyrics()end end local function stopAudio()audio:Stop();notify('Audio stopped')end local function skyPreset(name) customLighting=true;cfg.clock=({Default=14,Midnight=0,Space=1,Dusk=18})[name]or 14;apply()end local sky='Default' local function skyCycle()local options={'Default','Midnight','Space','Dusk'};sky=options[(table.find(options,sky)or 1)%#options+1];skyPreset(sky);render()end local function listPlayers()local names={};for _,pl in ipairs(Players:GetPlayers())do table.insert(names,action(pl.DisplayName,'@'..pl.Name,function()notify(pl.DisplayName)end))end;return names end local commands={action('Toggle reanimation','',R.toggle),action('Stop reanimation clip','',function()R.stopClip();notify('Animation stopped')end),action('Reset camera','',ownResetCamera),action('Stop animation','',function()stopAnim()end),action('Play animation','',playAnim),action('Play audio','',playAudio),action('Stop audio','',stopAudio),action('Reset visuals','',resetVisuals),action('Hide menu','',function()root.Visible=false end),action('Reset settings','',resetCfg)} local function groups() if tab=='Home'then return {section('Quick settings',{toggle('FPS counter','','fps'),toggle('Music island','','island'),toggle('Notifications','','notifications'),toggle('Hide particles','','particles')}),section('Interface',{range('Opacity','','opacity',65,100,'%'),range('Scale','','scale',75,115,'%')})},{section('Shortcuts',{action('Reanimation','',function()sub='Library';go('Animations')end),quick('Animations','Animation library'),quick('Music','Music player'),quick('Performance','Graphics settings'),quick('Settings','Appearance')})} elseif tab=='Character'then return {section('Character actions',{action('Reanimation','',function()sub='Library';go('Animations')end),action('Animation recorder','',function()sub='Recorder';go('Animations')end),action('Animation packs','',function()sub='Packs';go('Animations')end),action('Asset playback','',function()sub='Asset playback';go('Animations')end),action('Camera reset','',ownResetCamera),quick('Visuals','Visual presets'),quick('Music','Music HUD'),quick('Settings','Profiles')}),section('Character settings',{range('Walk speed','Own experience','walk',8,32),range('Jump power','Own experience','jump',20,80)})},{section('Camera',{range('Field of view','','fov',40,100,'°')})} elseif tab=='Animations'then local common={section("Reanimation",{action(R.rig and "Disable reanimation"or"Enable reanimation",R.rig and"Local rig active"or"Local rig inactive",R.toggle),action("Stop animation","",function()R.stopClip();stopAnim();render()end)}),section("",{{"Rig preview","","rig"}})} local names={"Default"};for _,n in ipairs(R.names("All"))do table.insert(names,n)end if sub=="States"then local items={toggle("State animations","","reanimStates"),range("State speed","","stateSpeed",25,200,"%")} for _,n in ipairs({"Idle","Walk","Run","Jump","Fall","Climb","Swim","Sit"})do table.insert(items,choice(n,"","state"..n,names))end return {section("Movement states",items)},common elseif sub=="Playback"then local items={range("Playback speed","","speed",25,200,"%"),toggle("Reverse playback","","reanimReverse"),toggle("Loop playback","","reanimLoop"),range("Transition","","reanimFade",0,500,"ms"),choice("Transition curve","","reanimCurve",{"Linear","Smooth"}),input("Reverse key","","reverseKey")} for i=1,3 do table.insert(items,input("Speed key "..i,"","speedKey"..i));table.insert(items,range("Speed preset "..i,"","speedPreset"..i,25,200,"%"))end return {section("Playback",items)},common elseif sub=="Copier"then return {section("Own rig pose",{action("Capture own pose","",R.capturePose),input("Custom name","","reanimCustomName"),action("Save pose to Customs","",R.savePose),toggle("Freeze pose","","reanimFreeze"),action("Release pose","",function()cfg.reanimFreeze=false;R.frozen=nil;render()end),action("Open recorder","",function()sub="Recorder";render()end)})},common elseif sub=="Tracking"then return {section("Local tracking",{toggle("Head follows camera","","reanimHead"),toggle("Hide original locally","","reanimHide")})},common elseif sub=="Stretching"then return {section("Visual arm offsets",{range("Left arm","","reanimLeftStretch",100,150,"%"),range("Right arm","","reanimRightStretch",100,150,"%"),action("Reset offsets","",function()cfg.reanimLeftStretch=100;cfg.reanimRightStretch=100;render()end)})},common elseif sub=="Body tools"then return {section("Local rig",{action("Capture pose","",R.capturePose),toggle("Freeze pose","","reanimFreeze"),toggle("Hide original locally","","reanimHide"),action("Reset pose","",function()R.stopClip();R.frozen=nil;cfg.reanimFreeze=false;cfg.reanimHead=false;cfg.reanimLeftStretch=100;cfg.reanimRightStretch=100;render()end)})},common elseif sub=="Players"then return {section("Session roster",listPlayers())},common elseif sub=="Misc"then return {section("Reanimation settings",{toggle("Hide original locally","","reanimHide"),action("Save session settings","",function()R.save();notify("Saved in Studio workspace for this session")end),{"Vanta ReanimData","Studio session folder","label"},action("Export config","",R.export),action("Import config","",R.import),{"Reanimation JSON","","output"}})},common end local left,right if sub=="Library"or sub=="Favorites"or sub=="Keybinds"or sub=="Customs"then local items={} if sub=="Customs"then table.insert(items,input("Name","","reanimCustomName")) table.insert(items,{"Keyframe data (Lua, JSON, TXT, DAT)","","output"}) table.insert(items,action("Import keyframes","",R.addCustom)) end for _,n in ipairs(R.names(sub))do table.insert(items,{n,"","rclip",n})end if #items==0 then table.insert(items,{sub=="Favorites"and"No favorites yet"or"No keybinds yet","","label"})end left={section(sub,items)} right={section("Reanimation",{action(R.rig and "Disable reanimation"or"Enable reanimation",R.rig and"Local rig active"or"Local rig inactive",R.toggle),action("Stop animation","",function()R.stopClip();stopAnim();render();notify("Animation stopped")end),range("Playback speed","","speed",25,200,"%"),toggle("Reverse playback","","reanimReverse"),toggle("Loop playback","","reanimLoop"),range("Transition","","reanimFade",0,500,"ms")}),section("",{{"Rig preview","","rig"}})} return left,right end local left={};if sub=='Asset playback'then left={section('Custom animation',{input('Animation ID','Owned asset ID','animId'),range('Playback speed','','speed',25,200,'%'),toggle('Loop playback','','loop'),action('Animation pack','',function()sub='Packs';render()end)})} elseif sub=='Asset favorites'then local a={};for _,id in ipairs(cfg.favorites)do table.insert(a,action(id,'',function()cfg.animId=id;sub='Asset playback';render()end))end;if #a==0 then table.insert(a,{'No saved animations','','label'})end;left={section('Saved animations',a)} elseif sub=='Asset keybinds'then left={section('Animation keybind',{input('Animation ID','','animId'),input('Playback key','','animKey'),{'Toggle on same key','Enabled','label'}})} elseif sub=='Packs'then local a={toggle('Enable custom pack','','packEnabled')};for _,k in ipairs({'Idle','Walk','Run','Jump','Fall','Climb','Swim'})do table.insert(a,input(k,'Owned animation ID','pack'..k))end;left={section('Custom animation pack',a)} else left={section('Keyframe recording',{action(recording and 'Stop recording' or 'Record own rig','',function()recordingToggle();render()end),{'Trim start','','trim','start'},{'Trim end','','trim','end'},action('Export keyframes','',recordingExport),{'Recording JSON','','output'}})}end return left,{section('',{{'Rig preview','','rig'},action('Play or stop','',playAnim),action('Save favorite','',favorite)})} elseif tab=='Commands'then local a={};for _,d in ipairs(commands)do if not favOnly or cmdFav[d[1]]then table.insert(a,{d[1],'','command',d[4]})end end;return {section('Commands',a)},{} elseif tab=='Players'then return {section('Session roster',listPlayers())},{section('Preferences',{toggle('Local audio mute','','mute')})} elseif tab=='Music'then return {section('Playback',{input('Audio asset ID','Owned audio','audioId'),action('Play or pause','',playAudio),action('Stop','',stopAudio),{'Seek','','seek'},range('Volume','','volume',0,100,'%'),range('Bass','','bass',-12,12,'dB'),range('Mid','','mid',-12,12,'dB'),range('Treble','','treble',-12,12,'dB')})},{section('Music display',{toggle('Music island','','island'),input('Display text','Your own text','lyrics'),toggle('Sky lyrics','','skyLyrics'),toggle('Ground lyrics','','groundLyrics')})} elseif tab=='Visuals'then return {section('Lighting',{toggle('Bloom','','bloom'),toggle('Depth of field','','dof'),toggle('Color correction','','color'),range('Brightness','','brightness',0,5),range('Time of day','','clock',0,24)})},{section('Environment',{action('Sky preset: '..sky,'',skyCycle),range('Saturation','','saturation',-100,100,'%'),range('Contrast','','contrast',-100,100,'%'),action('Reset visuals','',resetVisuals)})} elseif tab=='Performance'then return {section('Graphics',{toggle('FPS counter','','fps'),toggle('Hide particles','','particles'),toggle('Disable shadows','','shadows'),toggle('Low detail materials','','lowDetail')})},{section('Quality',{choice('Quality preset','','quality',{'Balanced','Maximum FPS','Visual quality'}),action('Restore graphics','',resetVisuals)})} else return {section('Appearance',{choice('Theme','','theme',{'Default','Ink'}),choice('Accent','','accent',{'White','Mint','Blue','Lilac','Sand'}),range('Opacity','','opacity',65,100,'%'),range('Scale','','scale',75,115,'%')})},{section('Profile',{toggle('Notifications','','notifications'),action('Export profile','',exportProfile),action('Import profile','',importProfile),action('Reset settings','',resetCfg),action('Unload Vanta','',unload),{'Profile JSON','','output'}})}end end local rows={};local function clear()for _,c in ipairs(rowConnections)do c:Disconnect()end;table.clear(rowConnections);for _,o in ipairs(rows)do o:Destroy()end;table.clear(rows);for _,objects in ipairs({surfaceObjects,accentObjects,strokeObjects})do for i=#objects,1,-1 do if not objects[i].Parent then table.remove(objects,i)end end end;exportText=nil end local function field(parent,value,pos,size)local b=new('TextBox',parent,{Position=pos,Size=size,BackgroundColor3=C.card,BorderSizePixel=0,TextColor3=C.text,Text=tostring(value),Font=Enum.Font.Arial,TextSize=11,ClearTextOnFocus=false});corner(b,3);border(b);return b end local function makeRig(parent) local view=new('ViewportFrame',parent,{Size=UDim2.new(1,0,1,0),BackgroundColor3=Color3.fromRGB(22,22,22),BorderSizePixel=0,Ambient=Color3.fromRGB(175,175,175),LightColor=Color3.fromRGB(255,255,255)});corner(view,3) text(view,'Rig preview',UDim2.fromOffset(8,6),UDim2.fromOffset(100,14),10,C.muted) local wm=new('WorldModel',view,{});local cam=new('Camera',view,{});view.CurrentCamera=cam local char=R.target();if not char then return end;local old=char.Archivable;char.Archivable=true;local ok,clone=pcall(function()return char:Clone()end);char.Archivable=old;if not ok or not clone then return end for _,o in ipairs(clone:GetDescendants())do if o:IsA('LuaSourceContainer')or o:IsA('Sound')or o:IsA('ParticleEmitter')or o:IsA('Trail')or o:IsA('Beam')then o:Destroy()elseif o:IsA('BasePart')then o.CanCollide=false;o.CanTouch=false;o.CanQuery=false end end clone.Parent=wm;clone:PivotTo(CFrame.new());local center,size=clone:GetBoundingBox();local target=center.Position;cam.CFrame=CFrame.lookAt(target+Vector3.new(0,0,-math.max(size.Y*1.65,6)),target);cam.FieldOfView=40 local joints={};for _,o in ipairs(char:GetDescendants())do if o:IsA('Motor6D')then joints[o.Name]=o end end;local clones={};for _,o in ipairs(clone:GetDescendants())do if o:IsA('Motor6D')then table.insert(clones,o)end end bind(Run.RenderStepped,function()for _,o in ipairs(clones)do local source=joints[o.Name];if source and source.Parent then o.Transform=source.Transform end end end) end local function draw(parent,d) local n,desc,kind,k,lo,hi,s=table.unpack(d);local h=kind=='rig' and 166 or kind=='output' and 95 or 34 local f=frame(parent,UDim2.new(),UDim2.new(1,0,0,h),C.bg);f.BackgroundTransparency=1;f.LayoutOrder=#parent:GetChildren(); if kind=="rclip"then local n=d[4];local label=text(f,n,UDim2.fromOffset(0,0),UDim2.new(1,-106,1,0),11,R.active==n and C.accent or C.text) local play=button(f,R.active==n and"■"or"▶",UDim2.new(1,-104,.5,-11),UDim2.fromOffset(23,22),function()R.playClip(n)end) local fav=button(f,cfg.reanimFavs[n]and"★"or"☆",UDim2.new(1,-78,.5,-11),UDim2.fromOffset(23,22),function()R.favorite(n)end) local key=button(f,R.waiting==n and"..."or(cfg.reanimBinds[n]or"Bind"),UDim2.new(1,-52,.5,-11),UDim2.fromOffset(cfg.reanimCustoms[n]and 33 or 52,22),function()R.bindName(n)end) key.TextSize=9 if cfg.reanimCustoms[n]then button(f,"×",UDim2.new(1,-17,.5,-11),UDim2.fromOffset(17,22),function()R.removeCustom(n)end)end frame(f,UDim2.new(0,0,1,-1),UDim2.new(1,0,0,1),C.line) return end if kind=='rig'then makeRig(f);return end if kind=='output'then exportText=field(f,'',UDim2.fromOffset(0,0),UDim2.new(1,0,1,-5));exportText.MultiLine=true;exportText.TextWrapped=true;exportText.TextYAlignment=Enum.TextYAlignment.Top;exportText.TextXAlignment=Enum.TextXAlignment.Left;exportText.PlaceholderText=n;return end frame(f,UDim2.new(0,0,1,-1),UDim2.new(1,0,0,1),C.line) local name=text(f,n,UDim2.fromOffset(0,desc~=''and 2 or 0),UDim2.new(1,kind=='range'and -116 or kind=='input'and -110 or kind=='choice'and -100 or kind=='action'and -45 or -35,0,desc~=''and 18 or h),12,C.text) if desc~=''then text(f,desc,UDim2.fromOffset(0,17),UDim2.new(.58,0,0,12),10,C.muted)end if kind=='toggle'then local b=button(f,'',UDim2.new(1,-25,.5,-7),UDim2.fromOffset(25,14),function()set(k,not cfg[k]);render()end);corner(b,10);b.BackgroundColor3=cfg[k]and C.accent or Color3.fromRGB(57,57,57);b:SetAttribute('VantaSwitch',true);local dot=frame(b,UDim2.fromOffset(cfg[k]and 13 or 2,2),UDim2.fromOffset(10,10),cfg[k]and C.bg or Color3.fromRGB(155,155,155));corner(dot,10) elseif kind=='action'or kind=='command'then local b=button(f,'',UDim2.new(0,0,0,0),UDim2.new(1,kind=='command'and -30 or 0,1,0),function()k()end);b.BackgroundTransparency=1;text(f,'›',UDim2.new(1,-15,0,0),UDim2.fromOffset(14,h),16,C.muted);if kind=='command'then local star=button(f,cmdFav[n]and '★'or '☆',UDim2.new(1,-30,0,4),UDim2.fromOffset(25,25),function()cmdFav[n]=not cmdFav[n];render()end);star.BackgroundTransparency=1 end elseif kind=='input'or kind=='trim'then local v=kind=='trim'and(k=='start'and trimStart or trimEnd)or cfg[k];local b=field(f,v,UDim2.new(1,-105,.5,-11),UDim2.fromOffset(105,22));bind(b.FocusLost,function()if kind=='trim'then trimInput(k,b.Text)else set(k,b.Text)end end) elseif kind=='choice'then local b=button(f,tostring(cfg[k]),UDim2.new(1,-100,.5,-11),UDim2.fromOffset(100,22),function()local i=table.find(lo,cfg[k])or 1;set(k,lo[i%#lo+1]);render()end);b.TextSize=10 elseif kind=='range'or kind=='seek'then local seek=kind=='seek';local low,high=seek and 0 or lo,seek and math.max(audio.TimeLength,1)or hi;local v=seek and audio.TimePosition or cfg[k];local val=text(f,tostring(math.floor(v+.5))..(s or ''),UDim2.new(1,-33,0,0),UDim2.fromOffset(33,h),10,C.muted);val.TextXAlignment=Enum.TextXAlignment.Right;local bar=frame(f,UDim2.new(1,-115,.5,-2),UDim2.fromOffset(80,4),Color3.fromRGB(53,53,53));bar.Active=true;corner(bar,2);local fill=frame(bar,UDim2.new(),UDim2.fromScale(math.clamp((v-low)/(high-low),0,1),1),C.accent);corner(fill,2);local dragging=false;local function move(x)local q=math.clamp((x-bar.AbsolutePosition.X)/math.max(bar.AbsoluteSize.X,1),0,1);if seek then high=math.max(audio.TimeLength,1)end;local nv=math.floor(low+q*(high-low)+.5);if seek then if audio.TimeLength>0 then audio.TimePosition=math.min(nv,audio.TimeLength)end else cfg[k]=nv;if k=='scale'then scale.Scale=nv/100 elseif k=='opacity'then root.GroupTransparency=1-nv/100 end end;fill.Size=UDim2.fromScale(q,1);val.Text=tostring(nv)..(s or '')end;bind(bar.InputBegan,function(i)if i.UserInputType==Enum.UserInputType.MouseButton1 or i.UserInputType==Enum.UserInputType.Touch then dragging=true;move(i.Position.X)end end);bind(UIS.InputChanged,function(i)if dragging and (i.UserInputType==Enum.UserInputType.MouseMovement or i.UserInputType==Enum.UserInputType.Touch)then move(i.Position.X)end end);bind(UIS.InputEnded,function(i)if dragging and(i.UserInputType==Enum.UserInputType.MouseButton1 or i.UserInputType==Enum.UserInputType.Touch)then dragging=false;if not seek then set(k,cfg[k])end end end) end end local function groupColumn(parent,groups,x,w) local col=new('Frame',parent,{Position=UDim2.fromOffset(x,0),Size=UDim2.fromOffset(w,0),AutomaticSize=Enum.AutomaticSize.Y,BackgroundTransparency=1});new('UIListLayout',col,{SortOrder=Enum.SortOrder.LayoutOrder,Padding=UDim.new(0,0)}) for i,g in ipairs(groups)do local group=new('Frame',col,{Size=UDim2.new(1,0,0,0),AutomaticSize=Enum.AutomaticSize.Y,BackgroundTransparency=1,LayoutOrder=i});new('UIListLayout',group,{SortOrder=Enum.SortOrder.LayoutOrder});if g[1]~=''then local head=text(group,g[1],UDim2.new(),UDim2.new(1,0,0,22),11,C.muted);head.LayoutOrder=0 end;for _,d in ipairs(g[2])do draw(group,d)end;local gap=frame(group,UDim2.new(),UDim2.new(1,0,0,18),C.bg);gap.BackgroundTransparency=1;gap.LayoutOrder=999 end return col end render=function()if not alive then return end;clear();drawing=true;heading.Text=tab;for t,b in pairs(nav)do b.BackgroundTransparency=t==tab and 0 or 1;b.BackgroundColor3=Color3.fromRGB(41,41,41)end if tab=='Animations'or tab=='Commands'then local bar=frame(scroll,UDim2.new(),UDim2.new(1,0,0,30),C.bg);bar.BackgroundTransparency=1;table.insert(rows,bar);frame(bar,UDim2.new(0,0,1,-1),UDim2.new(1,0,0,1),C.line);local names=tab=='Animations'and {'Library','Favorites','Packs','Customs','Keybinds','States','Playback','Copier','Tracking','Stretching','Body tools','Players','Misc','Recorder'}or {'All commands','Favorites'};if tab=='Animations'then bar.Size=UDim2.new(1,0,0,90)end;local x,y=0,0;for _,name in ipairs(names)do local w=math.max(48,#name*6+8);if x+w>505 then x=0;y+=30 end;local selected=tab=='Animations'and sub==name or tab=='Commands'and((name=='Favorites')==favOnly);local b=button(bar,name,UDim2.fromOffset(x,y),UDim2.fromOffset(w,27),function()if tab=='Animations'then sub=name else favOnly=name=='Favorites'end;render()end);b.BackgroundTransparency=1;b.TextColor3=selected and C.text or C.muted;if selected then frame(bar,UDim2.fromOffset(x,y+28),UDim2.fromOffset(w,2),C.accent)end;x=x+w+4 end end local left,right=groups();if query~=''then local q=query:lower();local function filter(gs)local out={};for _,g in ipairs(gs)do local a={};for _,d in ipairs(g[2])do if d[1]:lower():find(q,1,true)then table.insert(a,d)end end;if #a>0 then table.insert(out,section(g[1],a))end end;return out end;left=filter(left);right=filter(right)end local body=frame(scroll,UDim2.new(),UDim2.new(1,-4,0,0),C.bg);body.BackgroundTransparency=1;body.LayoutOrder=10;table.insert(rows,body);local full=tab=='Commands';local a=groupColumn(body,left,0,full and 505 or 246);local b=groupColumn(body,right,268,245);local function sizeBody()body.Size=UDim2.new(1,-4,0,math.max(a.AbsoluteSize.Y,b.AbsoluteSize.Y)/math.max(scale.Scale,.01)+2)end;bind(a:GetPropertyChangedSignal('AbsoluteSize'),sizeBody);bind(b:GetPropertyChangedSignal('AbsoluteSize'),sizeBody);sizeBody();drawing=false end bind(search:GetPropertyChangedSignal('Text'),function()query=search.Text;render()end) local dragStart,dragPos;for _,obj in ipairs({top,brand})do bind(obj.InputBegan,function(i)if i.UserInputType==Enum.UserInputType.MouseButton1 or i.UserInputType==Enum.UserInputType.Touch then dragStart=i.Position;dragPos=root.Position end end)end bind(UIS.InputChanged,function(i)if dragStart and(i.UserInputType==Enum.UserInputType.MouseMovement or i.UserInputType==Enum.UserInputType.Touch)then local d=i.Position-dragStart;root.Position=UDim2.new(dragPos.X.Scale,dragPos.X.Offset+d.X,dragPos.Y.Scale,dragPos.Y.Offset+d.Y)end end) bind(UIS.InputEnded,function(i)if i.UserInputType==Enum.UserInputType.MouseButton1 or i.UserInputType==Enum.UserInputType.Touch then dragStart=nil end end) bind(UIS.InputBegan,function(i,processed)if R.handleInput(i,processed)or R.speedInput(i,processed)then return end;if processed or UIS:GetFocusedTextBox()then return end;if i.KeyCode==Enum.KeyCode.RightShift then root.Visible=not root.Visible elseif i.KeyCode==Enum.KeyCode.K and(UIS:IsKeyDown(Enum.KeyCode.LeftControl)or UIS:IsKeyDown(Enum.KeyCode.RightControl))then root.Visible=true;searchToggle()elseif not R.rig and i.KeyCode.Name:lower()==tostring(cfg.animKey):lower()then playAnim()end end) bind(workspace.DescendantAdded,function(o)applyParticles(o);applyMaterial(o)end) bind(player.CharacterAdded,function()R.disable();recording=false;task.delay(.5,function()if alive then apply();applyPack();applyLyrics();if tab=='Animations'then render()end end end)end) local acc,frames,recordAcc=0,0,0;bind(Run.RenderStepped,function(dt)acc=acc+dt;frames=frames+1;if acc>=.5 then fps=math.floor(frames/acc+.5);fpsLabel.Text=cfg.fps and tostring(fps)..' FPS' or '';acc=0;frames=0 end;if recording then recTime=recTime+dt;recordAcc=recordAcc+dt;if recTime>=60 then recording=false;notify('Recording reached 60 seconds');return end;if recordAcc>=1/15 then recordAcc=0;local f={t=math.floor(recTime*1000+.5)/1000,joints={}};local char=R.target();if char then for _,o in ipairs(char:GetDescendants())do if o:IsA('Motor6D')then f.joints[o.Name]={o.Transform:GetComponents()}end end end;table.insert(samples,f)end end end) apply();render() R.save()