Advertisement
Dark_Agent

Patchma-HUB

Jun 9th, 2024
1,125
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 211.31 KB | Gaming | 0 0
  1. --[[
  2.     patchma hub by MyWorld (discord: myworldmain)
  3.     optimize the optimized
  4.  
  5.     IDs of paid accessories:
  6.  
  7.     -for arms 11159410305,11263254795 or 14255556501,14255554762 or 12344545199,12344591101 or 13839976999,13831200263
  8.  
  9.     -for legs 14768693948,14768701869 or 11159483910,12652786974
  10.  
  11.     -for torso 14255528083 or 13421786478 or 14768678294
  12.  
  13.     or anything else that covers ur torso. examples:
  14.     14532301415,13423624885,11502853991,14053485259,13779879140,14443132226,17163407577,16297156693,17180496303,17171230401
  15.     can be same stuff but different colors
  16.  
  17.     there are 104 ways to make a rig with the ids above
  18.  
  19.     IDs of free accessories:
  20.     3033910400,3409612660,3438342658,3398308134,4324158403,3822880197,4154538250,3443038622,4819740796
  21. ]]
  22.  
  23. --no need to get and index the library tables with function names every time the script uses them
  24. local osclock=os.clock
  25. local tspawn=task.spawn
  26. local twait=task.wait
  27. local schar=string.char
  28. local ssub=string.sub
  29. local sfind=string.find
  30. local supper=string.upper
  31. local mrandom=math.random
  32. local sin=math.sin
  33. local cos=math.cos
  34. local abs=math.abs
  35. local rad=math.rad
  36. local min=math.min
  37. local clamp=math.clamp
  38. local tinsert=table.insert
  39. local tclear=table.clear
  40. local tclone=table.clone
  41. local tfind=table.find
  42. local tunpack=table.unpack
  43.  
  44. --the script doesnt have to read global varaibles every time to get them
  45. --why not have them saved in local varaibles for faster access times
  46. local next=next
  47. local pcall=pcall
  48. local xpcall=xpcall
  49. local type=type
  50. local typeof=typeof
  51. local game=game
  52.  
  53. local i=Instance.new
  54. local v2=Vector2.new
  55. local v3=Vector3.new
  56. local c3=Color3.new
  57. local cf=CFrame.new
  58. local cfl=CFrame.lookAt
  59. local angles=CFrame.Angles
  60. local u2=UDim2.new
  61. local e=Enum
  62. local rp=RaycastParams.new
  63. local cs=ColorSequence.new
  64. local csk=ColorSequenceKeypoint.new
  65.  
  66. local sine=osclock()
  67. local deltaTime=0
  68. local v3_0=v3(0,0,0)
  69. local v3_101=v3(1,0,1)
  70. local v3_010=v3(0,1,0)
  71. local v3_001=v3(0,0,1)
  72. local cf_0=cf(0,0,0)
  73. local v3_xz=v3_101*10
  74. local v3_xzL=v3_101*250.1
  75. local v3_net=v3_010*25.01
  76.  
  77. local function rs(l)
  78.     l=l or mrandom(8,15)
  79.     local s=""
  80.     for i=1,l do
  81.         if mrandom(1,2)==1 then
  82.             s=s..schar(mrandom(65,90))
  83.         else
  84.             s=s..schar(mrandom(97,122))
  85.         end
  86.     end
  87.     return s
  88. end
  89.  
  90. --it runs even faster if u call __index and __newindex of metatables of userdata directly
  91. local function getMetamethodFromErrorStack(userdata,f,test)
  92.     local ret=nil
  93.     xpcall(f,function()
  94.         ret=debug.info(2,"f")
  95.     end,userdata,nil,0)
  96.     if (type(ret)~="function") or not test(ret) then
  97.         return f
  98.     end
  99.     return ret
  100. end
  101. local insSet=getMetamethodFromErrorStack(game,function(a,b,c) a[b]=c end,function(f) local a=i("Folder") local b=rs() f(a,"Name",b) return a.Name==b end)
  102. local insGet=getMetamethodFromErrorStack(game,function(a,b) return a[b] end,function(f) local a=i("Folder") local b=rs() a.Name=b return f(a,"Name")==b end)
  103. local cfGet=getMetamethodFromErrorStack(cf_0,function(a,b) return a[b] end,function(f) return f(cf(1,2,3),"Position")==v3(1,2,3) end)
  104. local cfMul=getMetamethodFromErrorStack(cf_0,function(a,b) return a*b end,function(f) return angles(1,2,3)*angles(1,2,3)==f(angles(1,2,3),angles(1,2,3)) end)
  105. local cfAdd=getMetamethodFromErrorStack(cf_0,function(a,b) return a+b end,function(f) return cf(1,2,3)+v3(1,2,3)==f(cf(1,2,3),v3(1,2,3)) end)
  106. local v3Get=getMetamethodFromErrorStack(v3_0,function(a,b) return a[b] end,function(f) return v3(1,2,3).Unit==f(v3(1,2,3),"Unit") end)
  107. --multiplying and adding vector3 is faster if you use the * and + operators
  108.  
  109. --no need to index instances every time to call their functions
  110. local Clone=insGet(game,"Clone")
  111. local ClearAllChildren=insGet(game,"ClearAllChildren")
  112. local Destroy=insGet(game,"Destroy")
  113. local IsA=insGet(game,"IsA")
  114. local FindFirstChildOfClass=insGet(game,"FindFirstChildOfClass")
  115. local FindFirstChildWhichIsA=insGet(game,"FindFirstChildWhichIsA")
  116. local GetChildren=insGet(game,"GetChildren")
  117. local GetDescendants=insGet(game,"GetDescendants")
  118. local IsDescendantOf=insGet(game,"IsDescendantOf")
  119. local GetPropertyChangedSignal=insGet(game,"GetPropertyChangedSignal")
  120.  
  121. --findfirstchildofclass faster than getservice
  122. local plrs=FindFirstChildOfClass(game,"Players")
  123. local rus=FindFirstChildOfClass(game,"RunService")
  124. local ws=FindFirstChildOfClass(game,"Workspace")
  125. local uis=FindFirstChildOfClass(game,"UserInputService")
  126. local gs=FindFirstChildOfClass(game,"GuiService")
  127. local lp=insGet(plrs,"LocalPlayer")
  128. local pg=FindFirstChildOfClass(lp,"PlayerGui")
  129. local mouse=insGet(lp,"GetMouse")(lp)
  130. local stepped=insGet(rus,"Stepped")
  131. local heartbeat=insGet(rus,"Heartbeat")
  132. local renderstepped=insGet(rus,"RenderStepped")
  133.  
  134. local GetPlayers=insGet(plrs,"GetPlayers")
  135. local Raycast=insGet(ws,"Raycast")
  136. local Connect=heartbeat.Connect
  137. local Disconnect=Connect(GetPropertyChangedSignal(game,"CreatorId"),type).Disconnect
  138. local Wait=heartbeat.Wait
  139. local GetMouseLocation=insGet(uis,"GetMouseLocation")
  140. local GetFocusedTextBox=insGet(uis,"GetFocusedTextBox")
  141. local GetMouseDelta=insGet(uis,"GetMouseDelta")
  142. local IsMouseButtonPressed=insGet(uis,"IsMouseButtonPressed")
  143. local IsKeyDown=insGet(uis,"IsKeyDown")
  144.  
  145. local Inverse=cfGet(cf_0,"Inverse")
  146. local Lerp=cfGet(cf_0,"Lerp")
  147.  
  148. local guiTheme={
  149.     guiTitle="patchma hub",
  150.     windowTitleColor=c3(0,0,1),
  151.     windowTopColor=c3(0,0,0),
  152.     windowBottomColor=c3(0,0,0.584314),
  153.     windowMinimizedSize={X=220,Y=22},
  154.     windowRegularSize={X=220,Y=290},
  155.     buttonsTextColor=c3(0.0941177,0.317647,0.878431),
  156.     labelsTextColor=c3(0.560784,0.560784,0.560784),
  157.     listTopColor=c3(0,0,0),
  158.     listBottomColor=c3(0.0705882,0.0705882,0.0705882)
  159. }
  160.  
  161. local accessorylimbs={
  162.  
  163.     {meshid="11263221350",textureid="11263219250",C0=angles(1.5707963267948966,0,1.5707963267948966),Name="Left Arm"},
  164.     {meshid="11159370334",textureid="11159284657",C0=angles(-1.5707963267948966,0,1.5707963267948966),Name="Right Arm"},
  165.  
  166.     {meshid="14255522247",textureid="",C0=angles(1.5707963267948966,0,1.5707963267948966),Name="Left Arm"},
  167.     {meshid="14255522247",textureid="",C0=angles(-1.5707963267948966,0,1.5707963267948966),Name="Right Arm"},
  168.  
  169.     {meshid="12344207333",textureid="",C0=angles(2,0,0),Name="Left Arm"},
  170.     {meshid="12344206657",textureid="",C0=angles(2,0,0),Name="Right Arm"},
  171.    
  172.     {meshid="13831073174",textureid="",C0=cfMul(cf(0.017,0,-0.23),angles(-1.4835298641951802,-0.15707963267948966,2.199114857512855)),Name="Left Arm"},
  173.     {meshid="13839903766",textureid="",C0=cfMul(cf(0,-0.62,-0.01),angles(1.6580627893946132,0.15707963267948966,-2.199114857512855)),Name="Right Arm"},
  174.  
  175.     {meshid="11159370334",textureid="11159285454",C0=angles(1.5707963267948966,0,1.5707963267948966),Name="Left Leg"},
  176.     {meshid="12652772399",textureid="12652775021",C0=cf(0,-0.125,0),Name="Right Leg"},
  177.  
  178.     {meshid="14768684979",textureid="",C0=angles(0,0,1.5707963267948966),Name="Left Leg"},
  179.     {meshid="14768684979",textureid="",C0=angles(0,0,1.5707963267948966),Name="Right Leg"},
  180.  
  181.     {meshid="14768666349",textureid="",C0=cf_0,Name="Torso"},
  182.     {meshid="14241018198",textureid="",C0=cf_0,Name="Torso"},
  183.     {meshid="13421774668",textureid="",C0=cf_0,Name="Torso"},
  184.  
  185.     {meshid="4324138105",textureid="4324138210",C0=cfMul(angles(-1.6144295580947547,1.5707963267948966,0),cf(-0.125,0.3,0)),Name="Left Arm"},
  186.     {meshid="4154474745",textureid="4154474807",C0=cfMul(angles(1.5271630954950384,-1.5707963267948966,0),cf(-0.125,-0.3,0)),Name="Left Arm"},
  187.     {meshid="3030546036",textureid="3650191503",C0=cfMul(angles(1.5271630954950384,1.5707963267948966,0),cf(0.125,-0.3,0)),Name="Right Arm"},
  188.     {meshid="3030546036",textureid="3443321249",C0=cfMul(angles(-1.6144295580947547,-1.5707963267948966,0),cf(0.125,0.3,0)),Name="Right Arm"},
  189.     {meshid="3030546036",textureid="3360974849",C0=cfMul(angles(1.5271630954950384,1.5707963267948966,0),cf(-0.125,-0.35,0)),Name="Left Leg"},
  190.     {meshid="3030546036",textureid="3360978739",C0=cfMul(angles(-1.6144295580947547,-1.5707963267948966,0),cf(-0.125,0.3,0)),Name="Left Leg"},
  191.     {meshid="3030546036",textureid="3033898741",C0=cfMul(angles(1.5271630954950384,-1.5707963267948966,0),cf(0.125,-0.35,0)),Name="Right Leg"},
  192.     {meshid="3030546036",textureid="3409604993",C0=cfMul(angles(-1.6144295580947547,1.5707963267948966,0),cf(0.125,0.3,0)),Name="Right Leg"},
  193.     {meshid="4819720316",textureid="4819722776",C0=angles(0,0,0.2617993877991494),Name="Torso"}
  194. }
  195.  
  196. local function gp(p,n,cl)
  197.     for i,v in next,GetChildren(p) do
  198.         if IsA(v,cl) and (insGet(v,"Name")==n) then
  199.             return v
  200.         end
  201.     end
  202.     return nil
  203. end
  204. local function timegp(p,n,c,t)
  205.     t=osclock()+t
  206.     while t>osclock() do
  207.         local r=gp(p,n,c)
  208.         if r then
  209.             return r
  210.         end
  211.         Wait(stepped)
  212.     end
  213.     return nil
  214. end
  215. local function getNetlessVelocity(realVel)
  216.     --if true then return v3_0 end
  217.     --if true then return realVel end
  218.     --if true then return v3_net end
  219.     if v3Get(realVel,"Magnitude")>25.01 then
  220.         return v3Get(realVel,"Unit")*v3_xzL+v3_net
  221.     end
  222.     return realVel*v3_xz+v3_net
  223. end
  224. local sft=1/45
  225. local function getFallingTime(Ypos,destY,gravity)
  226.     local velY=25.01
  227.     local fallingTime=0
  228.     gravity=gravity*sft
  229.     while (Ypos>destY) or (velY>0) do
  230.         fallingTime=fallingTime+sft
  231.         velY=velY-gravity
  232.         Ypos=Ypos+(velY*sft)
  233.     end
  234.     return fallingTime
  235. end
  236. local function getMeshOfPart(v)
  237.     if IsA(v,"MeshPart") then
  238.         return insGet(v,"MeshId"), insGet(v,"TextureID")
  239.     elseif IsA(v,"BasePart") then
  240.         v=FindFirstChildOfClass(v,"SpecialMesh")
  241.         if v then
  242.             return insGet(v,"MeshId"), insGet(v,"TextureId")
  243.         end
  244.     end
  245.     return nil, nil
  246. end
  247. local function makeplaceholder(v)
  248.     if typeof(v)~="Instance" then
  249.         return nil
  250.     end
  251.     if not insGet(v,"Archivable") then
  252.         insSet(v,"Archivable",true)
  253.     end
  254.     v=Clone(v)
  255.     for i,v in next,GetChildren(v) do
  256.         if IsA(v,"SpecialMesh") then
  257.             insSet(v,"Name",rs())
  258.             ClearAllChildren(v)
  259.         else
  260.             Destroy(v)
  261.         end
  262.     end
  263.     insSet(v,"Name",rs())
  264.     insSet(v,"Anchored",true)
  265.     insSet(v,"CanCollide",false)
  266.     insSet(v,"Transparency",0.25)
  267.     insSet(v,"Parent",ws)
  268.     return v
  269. end
  270. local function emptyfunction() end
  271.  
  272. local i1=i("Frame")
  273. local i2=i("Frame")
  274. local i3=i("Frame")
  275. local i4=i("ScrollingFrame")
  276. local i5=i("UIListLayout")
  277. local i6=i("UIGradient")
  278. local i7=i("TextBox")
  279. local i8=i("TextButton")
  280. local i9=i("UIGradient")
  281. local i10=i("ScreenGui")
  282. insSet(i1,"AnchorPoint",v2(0.5,0))
  283. insSet(i1,"Active",true)
  284. insSet(i1,"BorderSizePixel",0)
  285. insSet(i1,"ClipsDescendants",true)
  286. insSet(i1,"Position",u2(0.5,0,0.5,guiTheme.windowRegularSize.Y/-2))
  287. insSet(i1,"Size",u2(0,guiTheme.windowRegularSize.X,0,guiTheme.windowRegularSize.Y))
  288. insSet(i1,"Name",rs())
  289. insSet(i1,"Parent",i10)
  290. insSet(i2,"BackgroundColor3",c3(1,1,1))
  291. insSet(i2,"BorderSizePixel",0)
  292. insSet(i2,"Size",u2(0,guiTheme.windowRegularSize.X,0,guiTheme.windowRegularSize.Y))
  293. insSet(i2,"Name",rs())
  294. insSet(i2,"Parent",i1)
  295. insSet(i3,"BackgroundColor3",c3(1,1,1))
  296. insSet(i3,"BorderSizePixel",0)
  297. insSet(i3,"Position",u2(0,5,0,guiTheme.windowMinimizedSize.Y-2))
  298. insSet(i3,"Size",u2(1,-10,0,guiTheme.windowRegularSize.Y-guiTheme.windowMinimizedSize.Y-3))
  299. insSet(i3,"Name",rs())
  300. insSet(i3,"Parent",i2)
  301. insSet(i4,"Active",true)
  302. insSet(i4,"BackgroundTransparency",1)
  303. insSet(i4,"BorderSizePixel",0)
  304. insSet(i4,"Size",u2(1,-3,1,0))
  305. insSet(i4,"AutomaticCanvasSize",e.AutomaticSize.Y)
  306. insSet(i4,"CanvasSize",u2(0,0,0,0))
  307. insSet(i4,"ScrollBarThickness",7)
  308. insSet(i4,"Name",rs())
  309. insSet(i4,"Parent",i3)
  310. insSet(i5,"Name",rs())
  311. insSet(i5,"Parent",i4)
  312. insSet(i5,"SortOrder",e.SortOrder.LayoutOrder)
  313. insSet(i6,"Name",rs())
  314. insSet(i6,"Parent",i3)
  315. insSet(i6,"Color",cs({csk(0,guiTheme.listTopColor),csk(1,guiTheme.listBottomColor)}))
  316. insSet(i6,"Rotation",90)
  317. insSet(i7,"Font",e.Font.SourceSans)
  318. insSet(i7,"FontSize",e.FontSize.Size18)
  319. insSet(i7,"ClearTextOnFocus",false)
  320. insSet(i7,"Text",guiTheme.guiTitle)
  321. insSet(i7,"TextColor3",guiTheme.windowTitleColor)
  322. insSet(i7,"TextSize",16)
  323. insSet(i7,"AnchorPoint",v2(0.5,0))
  324. insSet(i7,"BackgroundTransparency",1)
  325. insSet(i7,"Position",u2(0.5,0,0,guiTheme.windowMinimizedSize.Y/2))
  326. insSet(i7,"Name",rs())
  327. insSet(i7,"Parent",i2)
  328. insSet(i8,"AnchorPoint",v2(1,0))
  329. insSet(i8,"BackgroundTransparency",1)
  330. insSet(i8,"Position",u2(1,0,0,0))
  331. insSet(i8,"Size",u2(0,40,0,guiTheme.windowMinimizedSize.Y))
  332. insSet(i8,"Name",rs())
  333. insSet(i8,"Parent",i2)
  334. insSet(i8,"Font",e.Font.SourceSans)
  335. insSet(i8,"FontSize",e.FontSize.Size18)
  336. insSet(i8,"Text","-")
  337. insSet(i8,"TextColor3",c3(1,1,1))
  338. insSet(i8,"TextSize",16)
  339. insSet(i9,"Name",rs())
  340. insSet(i9,"Parent",i2)
  341. insSet(i9,"Color",cs({csk(0,guiTheme.windowTopColor),csk(1,guiTheme.windowBottomColor)}))
  342. insSet(i9,"Rotation",90)
  343. insSet(i10,"ZIndexBehavior",e.ZIndexBehavior.Sibling)
  344. insSet(i10,"IgnoreGuiInset",true)
  345. insSet(i10,"ResetOnSpawn",false)
  346. insSet(i10,"DisplayOrder",2147483647)
  347. insSet(i10,"Name",rs())
  348. local guimin=false
  349. local minloop=false
  350. local i1X=guiTheme.windowRegularSize.X
  351. local i1Y=guiTheme.windowRegularSize.Y
  352. local i1Xdest=i1X
  353. local i1Ydest=i1Y
  354. Connect(insGet(i8,"MouseButton1Click"),function()
  355.     guimin = not guimin
  356.     if guimin then
  357.         i1Xdest=guiTheme.windowMinimizedSize.X
  358.         i1Ydest=guiTheme.windowMinimizedSize.Y
  359.     else
  360.         i1Xdest=guiTheme.windowRegularSize.X
  361.         i1Ydest=guiTheme.windowRegularSize.Y
  362.     end
  363.     if minloop then
  364.         return
  365.     end
  366.     minloop=true
  367.     insSet(i3,"Visible",true)
  368.     sine=osclock()
  369.     local lastsine=sine
  370.     while true do
  371.         sine=osclock()
  372.         local deltaTime=(sine-lastsine)*10
  373.         lastsine=sine
  374.         local difX=i1Xdest-i1X
  375.         local difY=i1Ydest-i1Y
  376.         if (abs(difY)<=1) and (abs(difX)<=1) then
  377.             i1X=i1Xdest
  378.             i1Y=i1Ydest
  379.             insSet(i1,"Size",u2(0,i1X,0,i1Y))
  380.             break
  381.         end
  382.         i1X=i1X+difX*deltaTime
  383.         i1Y=i1Y+difY*deltaTime
  384.         insSet(i1,"Size",u2(0,i1X,0,i1Y))
  385.         twait()
  386.     end
  387.     insSet(i3,"Visible",not guimin)
  388.     minloop=false
  389. end)
  390. local function Draggable(window,obj)
  391.     local MB1enum = e.UserInputType.MouseButton1
  392.     local TOUCHenum = e.UserInputType.Touch
  393.     obj = obj or window
  394.     local activeEntered = 0
  395.     local mouseStart = nil
  396.     local dragStart = nil
  397.     local inputbegancon = nil
  398.     local rendersteppedcon = nil
  399.     local inputendedcon = nil
  400.     local function inputendedf(a)
  401.         a=insGet(a,"UserInputType")
  402.         if (a==MB1enum) or (a==TOUCHenum) then
  403.             Disconnect(rendersteppedcon)
  404.             Disconnect(inputendedcon)
  405.         end
  406.     end
  407.     local function rendersteppedf()
  408.         local off = GetMouseLocation(uis)-mouseStart
  409.         insSet(window,"Position",dragStart+u2(0,off.X,0,off.Y))
  410.     end
  411.     local function inputbeganf(a)
  412.         a=insGet(a,"UserInputType")
  413.         if ((a==MB1enum) or (a==TOUCHenum)) and (activeEntered==0) and not GetFocusedTextBox(uis) then
  414.             mouseStart=GetMouseLocation(uis)
  415.             dragStart=insGet(window,"Position")
  416.             if rendersteppedcon then Disconnect(rendersteppedcon) end
  417.             rendersteppedcon = Connect(renderstepped,rendersteppedf)
  418.             if inputendedcon then Disconnect(inputendedcon) end
  419.             inputendedcon = Connect(insGet(uis,"InputEnded"),inputendedf)
  420.         end
  421.     end
  422.     Connect(insGet(obj,"MouseEnter"),function()
  423.         if inputbegancon then Disconnect(inputbegancon) end
  424.         inputbegancon = Connect(insGet(uis,"InputBegan"),inputbeganf)
  425.     end)
  426.     Connect(insGet(obj,"MouseLeave"),function()
  427.         Disconnect(inputbegancon)
  428.     end)
  429.     local function ondes(d)
  430.         if IsA(d,"GuiObject") then
  431.             local thisEntered = false
  432.             local thisAdded = false
  433.             local con0 = Connect(insGet(d,"MouseEnter"),function()
  434.                 thisEntered = true
  435.                 if (not thisAdded) and insGet(d,"Active") then
  436.                     activeEntered = activeEntered + 1
  437.                     thisAdded = true
  438.                 end
  439.             end)
  440.             local con1 = Connect(insGet(d,"MouseLeave"),function()
  441.                 thisEntered = false
  442.                 if thisAdded then
  443.                     activeEntered = activeEntered - 1
  444.                     thisAdded = false
  445.                 end
  446.             end)
  447.             local con2 = Connect(GetPropertyChangedSignal(d,"Active"),function()
  448.                 if thisEntered then
  449.                     if thisAdded and not insGet(d,"Active") then
  450.                         activeEntered = activeEntered - 1
  451.                         thisAdded = false
  452.                     elseif insGet(d,"Active") and not thisAdded then
  453.                         activeEntered = activeEntered + 1
  454.                         thisAdded = true
  455.                     end
  456.                 end
  457.             end)
  458.             local con3 = nil
  459.             con3 = Connect(insGet(d,"AncestryChanged"),function()
  460.                 if not IsDescendantOf(d,window) then
  461.                     if thisEntered then
  462.                         activeEntered = activeEntered - 1
  463.                     end
  464.                     Disconnect(con0)
  465.                     Disconnect(con1)
  466.                     Disconnect(con2)
  467.                     Disconnect(con3)
  468.                 end
  469.             end)
  470.         end
  471.     end
  472.     Connect(insGet(window,"DescendantAdded"),ondes)
  473.     for i,v in next,GetDescendants(window) do
  474.         ondes(v)
  475.     end
  476. end
  477. local function btn(txt, f)
  478.     local i1=i("TextBox")
  479.     local i2=i("TextButton")
  480.     insSet(i1,"Font",e.Font.SourceSans)
  481.     insSet(i1,"FontSize",e.FontSize.Size14)
  482.     insSet(i1,"Text",txt)
  483.     insSet(i1,"ClearTextOnFocus",false)
  484.     insSet(i1,"Position",u2(0.5,0,0.5,0))
  485.     insSet(i1,"TextColor3",guiTheme.buttonsTextColor)
  486.     insSet(i1,"Name",rs())
  487.     insSet(i1,"Parent",i2)
  488.     insSet(i2,"BackgroundTransparency",1)
  489.     insSet(i2,"TextTransparency",1)
  490.     insSet(i2,"Size",u2(1,0,0,14))
  491.     insSet(i2,"Name",rs())
  492.     if f then
  493.         Connect(insGet(i2,"MouseButton1Click"),f)
  494.     end
  495.     insSet(i2,"Parent",i4)
  496.     return i1
  497. end
  498. local function lbl(txt)
  499.     local i1=i("TextBox")
  500.     local i2=i("Frame")
  501.     insSet(i1,"Font",e.Font.SourceSans)
  502.     insSet(i1,"FontSize",e.FontSize.Size14)
  503.     insSet(i1,"Text",txt)
  504.     insSet(i1,"ClearTextOnFocus",false)
  505.     insSet(i1,"TextColor3",guiTheme.labelsTextColor)
  506.     insSet(i1,"Position",u2(0.5,0,0.5))
  507.     insSet(i1,"BackgroundTransparency",1)
  508.     insSet(i1,"Name",rs())
  509.     insSet(i1,"Parent",i2)
  510.     insSet(i2,"Size",u2(1,0,0,14))
  511.     insSet(i2,"BackgroundTransparency",1)
  512.     insSet(i2,"Name",rs())
  513.     insSet(i2,"Parent",i4)
  514.     return i1
  515. end
  516.  
  517. Draggable(i1)
  518.  
  519. lbl("by MyWorld")
  520. lbl("discord.gg/QMy5f6DrbH")
  521.  
  522. local allowshiftlock=nil
  523. local ctrltp=nil
  524. local placeholders=nil
  525. local clickfling=nil
  526. local highlightflingtargets=nil
  527. local discharscripts=nil
  528. local flingchangestate=nil
  529. local respawntp=nil
  530. local breakjointsmethod=nil
  531. local simrad=false
  532.  
  533. local c=nil
  534. local function stopreanimate()
  535.     if c then
  536.         c=nil
  537.         return true
  538.     end
  539.     return false
  540. end
  541. local function reanimate()
  542.     --[[
  543.         FDless reanimate by MyWorld
  544.         aka no client sided instances
  545.         "what else do i optimize here"
  546.     ]]
  547.  
  548.     local novoid = true --prevents parts from going under workspace.FallenPartsDestroyHeight if you control them
  549.     local speedlimit = 3000 --makes your parts move slower if the magnitude of their velocity is higher than this
  550.     local retVelTime = 0.51 --time that claimed parts have velocity to reclaim in case u lose them
  551.     local walkSpeed = 16 --your walkspeed (can be changed at runtime)
  552.     local jumpPower = 50 --your jump power (can be changed at runtime)
  553.     local gravity = 196.2 --how fast the characters velocity decreases while falling (can be changed at runtime)
  554.     local ctrlclicktp = ctrltp --makes you teleport where u point ur mouse cursor at when click and hold ctrl down
  555.     local clickfling = clickfling --makes you fling the person you clicked when its available to do so
  556.     local flingvel = v3(15000,16000,15000) --the rotation velocity that ur character will have while flinging
  557.  
  558.     if stopreanimate() then return end
  559.     c=insGet(lp,"Character")
  560.     if not (c and IsDescendantOf(c,ws)) then return end
  561.  
  562.     local rootpart=gp(c,"HumanoidRootPart","BasePart") or gp(c,"Torso","BasePart") or gp(c,"UpperTorso","BasePart") or timegp(c,"HumanoidRootPart","BasePart",0.5) or FindFirstChildWhichIsA(c,"BasePart")
  563.     if not rootpart then return end
  564.  
  565.     local cam=nil
  566.     --theres a way to have ws.currentcamera nil on heartbeat and still have the game run normally
  567.     local function refcam()
  568.         local newcam=insGet(ws,"CurrentCamera")
  569.         while not newcam do
  570.             Wait(GetPropertyChangedSignal(ws,"CurrentCamera"))
  571.             newcam=insGet(ws,"CurrentCamera")
  572.         end
  573.         cam=newcam
  574.     end
  575.     refcam()
  576.     local camcf=insGet(cam,"CFrame")
  577.     local enumCamS=e.CameraType.Scriptable
  578.     local camt=insGet(cam,"CameraType")
  579.     local camcon0=nil
  580.     local camcon1=nil
  581.     local camcon2=nil
  582.     local function onnewcamera()
  583.         refcam()
  584.         if camcon0 then
  585.             Disconnect(camcon0)
  586.             Disconnect(camcon1)
  587.             camcon0=nil
  588.         end
  589.         if not c then
  590.             if insGet(cam,"CameraType")==enumCamS then
  591.                 insSet(cam,"CameraType",camt)
  592.             end
  593.             return Disconnect(camcon2)
  594.         end
  595.         camcon0=Connect(GetPropertyChangedSignal(cam,"CFrame"),function()
  596.             if insGet(cam,"CFrame")~=camcf then
  597.                 insSet(cam,"CFrame",camcf)
  598.             end
  599.         end)
  600.         camcon1=Connect(GetPropertyChangedSignal(cam,"CameraType"),function()
  601.             if insGet(cam,"CameraType")~=enumCamS then
  602.                 insSet(cam,"CameraType",enumCamS)
  603.             end
  604.         end)
  605.         if insGet(cam,"CameraType")~=enumCamS then
  606.             insSet(cam,"CameraType",enumCamS)
  607.         end
  608.         if insGet(cam,"CFrame")~=camcf then
  609.             insSet(cam,"CFrame",camcf)
  610.         end
  611.     end
  612.     camcon2=Connect(GetPropertyChangedSignal(ws,"CurrentCamera"),onnewcamera)
  613.     onnewcamera()
  614.  
  615.     local rGravity=insGet(ws,"Gravity")
  616.     Connect(GetPropertyChangedSignal(ws,"Gravity"),function()
  617.         rGravity=insGet(ws,"Gravity")
  618.     end)
  619.  
  620.     local fpdh=insGet(ws,"FallenPartsDestroyHeight")
  621.     novoid=novoid and (fpdh+1)
  622.  
  623.     local Yvel=0
  624.     local cfr=insGet(rootpart,"CFrame")
  625.     local pos=cfGet(cfr,"Position")
  626.     cfr=cfl(pos,pos+cfGet(cfr,"LookVector")*v3_101)
  627.     local primarypart=nil
  628.     local shiftlock=false
  629.     local firstperson=false
  630.     local xzvel=v3_0
  631.     local v3_0150=v3_010*1.5
  632.     local camcfLV=cfGet(camcf,"LookVector")
  633.     local camrot=cfl(v3_0,camcfLV)
  634.     local camcfRV=cfGet(camrot,"RightVector")
  635.     local cammag=-v3Get((cfGet(camcf,"Position")-(pos+v3_0150)),"Magnitude")
  636.  
  637.     local R6parts={
  638.         head={Name="Head"},
  639.         torso={Name="Torso"},
  640.         root={Name="HumanoidRootPart"},
  641.         leftArm={Name="Left Arm"},
  642.         rightArm={Name="Right Arm"},
  643.         leftLeg={Name="Left Leg"},
  644.         rightLeg={Name="Right Leg"}
  645.     }
  646.     rootpart=R6parts.root
  647.     local cframes={}
  648.     for i,v in next,R6parts do
  649.         cframes[v]=cfr
  650.     end
  651.     local joints={
  652.         {
  653.             Name="Neck",
  654.             Part0=R6parts.torso,Part1=R6parts.head,
  655.             C0=cf(0,1,0,-1,0,0,0,0,1,0,1,-0),
  656.             C1=cf(0,-0.5,0,-1,0,0,0,0,1,0,1,-0)
  657.         },
  658.         {
  659.             Name="RootJoint",
  660.             Part0=rootpart,Part1=R6parts.torso,
  661.             C0=cf(0,0,0,-1,0,0,0,0,1,0,1,-0),
  662.             C1=cf(0,0,0,-1,0,0,0,0,1,0,1,-0)
  663.         },
  664.         {
  665.             Name="Right Shoulder",
  666.             Part0=R6parts.torso,Part1=R6parts.rightArm,
  667.             C0=cf(1,0.5,0,0,0,1,0,1,-0,-1,0,0),
  668.             C1=cf(-0.5,0.5,0,0,0,1,0,1,-0,-1,0,0)
  669.         },
  670.         {
  671.             Name="Left Shoulder",
  672.             Part0=R6parts.torso,Part1=R6parts.leftArm,
  673.             C0=cf(-1,0.5,0,0,0,-1,0,1,0,1,0,0),
  674.             C1=cf(0.5,0.5,0,0,0,-1,0,1,0,1,0,0)
  675.         },
  676.         {
  677.             Name="Right Hip",
  678.             Part0=R6parts.torso,Part1=R6parts.rightLeg,
  679.             C0=cf(1,-1,0,0,0,1,0,1,-0,-1,0,0),
  680.             C1=cf(0.5,1,0,0,0,1,0,1,-0,-1,0,0)
  681.         },
  682.         {
  683.             Name="Left Hip",
  684.             Part0=R6parts.torso,Part1=R6parts.leftLeg,
  685.             C0=cf(-1,-1,0,0,0,-1,0,1,0,1,0,0),
  686.             C1=cf(-0.5,1,0,0,0,-1,0,1,0,1,0,0)
  687.         }
  688.     }
  689.  
  690.     local refreshedjoints={}
  691.     local refreshjointsI=nil
  692.     refreshjointsI=function(part)
  693.         tinsert(refreshedjoints,part)
  694.         for i,v in next,joints do
  695.             local part0=v.Part0
  696.             local part1=v.Part1
  697.             if part1 and (part0==part) then
  698.                 cframes[part1]=cfMul(cframes[part],cfMul(v.C0,Inverse(v.C1)))
  699.                 if not tfind(refreshedjoints,part1) then
  700.                     refreshjointsI(part1)
  701.                 end
  702.             elseif part0 and (part1==part) then
  703.                 cframes[part0]=cfMul(cframes[part],cfMul(v.C1,Inverse(v.C0)))
  704.                 if not tfind(refreshedjoints,part0) then
  705.                     refreshjointsI(part0)
  706.                 end
  707.             end
  708.         end
  709.     end
  710.     refreshjointsI(rootpart)
  711.     tclear(refreshedjoints)
  712.  
  713.     local attachments={
  714.         RightShoulderAttachment={R6parts.rightArm,cf(0,1,0,1,0,0,0,1,0,0,0,1)},
  715.         RightGripAttachment={R6parts.rightArm,cf(0,-1,0,1,0,0,0,1,0,0,0,1)},
  716.         LeftFootAttachment={R6parts.leftLeg,cf(0,-1,0,1,0,0,0,1,0,0,0,1)},
  717.         LeftShoulderAttachment={R6parts.leftArm,cf(0,1,0,1,0,0,0,1,0,0,0,1)},
  718.         LeftGripAttachment={R6parts.leftArm,cf(0,-1,0,1,0,0,0,1,0,0,0,1)},
  719.         RootAttachment={rootpart,cf(0,0,0,1,0,0,0,1,0,0,0,1)},
  720.         RightFootAttachment={R6parts.rightLeg,cf(0,-1,0,1,0,0,0,1,0,0,0,1)},
  721.         NeckAttachment={R6parts.torso,cf(0,1,0,1,0,0,0,1,0,0,0,1)},
  722.         BodyFrontAttachment={R6parts.torso,cf(0,0,-0.5,1,0,0,0,1,0,0,0,1)},
  723.         BodyBackAttachment={R6parts.torso,cf(0,0,0.5,1,0,0,0,1,0,0,0,1)},
  724.         LeftCollarAttachment={R6parts.torso,cf(-1,1,0,1,0,0,0,1,0,0,0,1)},
  725.         RightCollarAttachment={R6parts.torso,cf(1,1,0,1,0,0,0,1,0,0,0,1)},
  726.         WaistFrontAttachment={R6parts.torso,cf(0,-1,-0.5,1,0,0,0,1,0,0,0,1)},
  727.         WaistCenterAttachment={R6parts.torso,cf(0,-1,0,1,0,0,0,1,0,0,0,1)},
  728.         WaistBackAttachment={R6parts.torso,cf(0,-1,0.5,1,0,0,0,1,0,0,0,1)},
  729.         HairAttachment={R6parts.head,cf(0,0.6,0,1,0,0,0,1,0,0,0,1)},
  730.         HatAttachment={R6parts.head,cf(0,0.6,0,1,0,0,0,1,0,0,0,1)},
  731.         FaceFrontAttachment={R6parts.head,cf(0,0,-0.6,1,0,0,0,1,0,0,0,1)},
  732.         FaceCenterAttachment={R6parts.head,cf(0,0,0,1,0,0,0,1,0,0,0,1)}
  733.     }
  734.  
  735.     local function getPart(name,blacklist)
  736.         for i,v in next,cframes do
  737.             if (i.Name==name) and not (blacklist and tfind(blacklist,i)) then
  738.                 return i
  739.             end
  740.         end
  741.         return nil
  742.     end
  743.  
  744.     local function getJoint(name)
  745.         for i,v in next,joints do
  746.             if v.Name==name then
  747.                 return v
  748.             end
  749.         end
  750.         return {C0=cf_0,C1=cf_0}
  751.     end
  752.  
  753.     local function getPartFromMesh(m,t,blacklist)
  754.         if blacklist then
  755.             for v,_ in next,cframes do
  756.                 if v.m and (not tfind(blacklist,v)) and sfind(v.m,m) and sfind(v.t,t) then
  757.                     return v
  758.                 end
  759.             end
  760.         else
  761.             for v,_ in next,cframes do
  762.                 if v.m and sfind(v.m,m) and sfind(v.t,t) then
  763.                     return v
  764.                 end
  765.             end
  766.         end
  767.         local p={m=m,t=t}
  768.         cframes[p]=cfr
  769.         local j={C0=cf_0,C1=cf_0,Part0=p}
  770.         p.j=j
  771.         return p
  772.     end
  773.  
  774.     local function getPartJoint(p)
  775.         if cframes[p] then
  776.             local j=p.j
  777.             if j then
  778.                 return j
  779.             end
  780.             for i,v in next,joints do
  781.                 if v.Part0==p then
  782.                     return v
  783.                 end
  784.             end
  785.             for i,v in next,joints do
  786.                 if v.Part1==p then
  787.                     return v
  788.                 end
  789.             end
  790.         end
  791.         return nil
  792.     end
  793.  
  794.     local function getAccWeldFromMesh(m,t)
  795.         return getPartJoint(getPartFromMesh(m,t))
  796.     end
  797.  
  798.     local raycastparams=rp()
  799.     raycastparams.FilterType=e.RaycastFilterType.Blacklist
  800.     raycastparams.RespectCanCollide=true
  801.     local rayfilter={}
  802.     local characters={}
  803.     local function refreshrayfilter()
  804.         tclear(rayfilter)
  805.         for i,v in next,characters do
  806.             tinsert(rayfilter,v)
  807.         end
  808.         raycastparams.FilterDescendantsInstances=rayfilter
  809.     end
  810.     local flingtable={}
  811.     local rootparts={}
  812.     for i,v in next,accessorylimbs do
  813.         v.p=getPart(v.Name)
  814.     end
  815.     local function makePartCons(p,t)
  816.         if (t.p==p) and insGet(p,"Anchored") then
  817.             t.p=nil
  818.         end
  819.         local con0=Connect(GetPropertyChangedSignal(p,"Anchored"),function()
  820.             if insGet(p,"Anchored") then
  821.                 if t.p==p then
  822.                     t.c=nil
  823.                     t.p=nil
  824.                 end
  825.             elseif not t.p then
  826.                 t.p=p
  827.             end
  828.         end)
  829.         local con1=nil
  830.         con1=Connect(insGet(p,"AncestryChanged"),function()
  831.             if not IsDescendantOf(p,ws) then
  832.                 Disconnect(con0)
  833.                 Disconnect(con1)
  834.                 if t.p==p then
  835.                     t.p=nil
  836.                 end
  837.             end
  838.         end)
  839.     end
  840.     local ondes=nil
  841.     ondes=function(v)
  842.         if c and IsA(v,"Attachment") and IsDescendantOf(c,ws) then
  843.             local v1=attachments[insGet(v,"Name")]
  844.             if v1 then
  845.                 local p=insGet(v,"Parent")
  846.                 if insGet(p,"Parent")~=c then
  847.                     local meshid,textureid=getMeshOfPart(p)
  848.                     if meshid then
  849.                         local found=false
  850.                         for i,_ in next,cframes do
  851.                             if (meshid==i.m) and (textureid==i.t) then
  852.                                 local p1=i.p
  853.                                 if p1 and IsDescendantOf(p1,c) then
  854.                                     if p1==p then
  855.                                         found=true
  856.                                         break
  857.                                     end
  858.                                 else
  859.                                     found=true
  860.                                     i.p=p
  861.                                     makePartCons(p,i)
  862.                                     break
  863.                                 end
  864.                             else
  865.                                 local j=i.j
  866.                                 if j and sfind(meshid,i.m) and sfind(textureid,i.t) then
  867.                                     i.m=meshid
  868.                                     i.t=textureid
  869.                                     i.l=insGet(p,"Position")
  870.                                     i.p=p
  871.                                     makePartCons(p,i)
  872.                                     i.j=nil
  873.                                     i.Name=insGet(p,"Name")
  874.                                     j.C0=insGet(v,"CFrame")
  875.                                     j.C1=v1[2]
  876.                                     j.Part1=v1[1]
  877.                                     tinsert(joints,j)
  878.                                     found=true
  879.                                     break
  880.                                 end
  881.                             end
  882.                         end
  883.                         if not found then
  884.                             for i,l in next,accessorylimbs do
  885.                                 if l.p and sfind(meshid,l.meshid) and sfind(textureid,l.textureid) then
  886.                                     local t={Name=insGet(p,"Name"),l=insGet(p,"Position"),m=meshid,t=textureid,p=p}
  887.                                     makePartCons(p,t)
  888.                                     if placeholders then
  889.                                         t.v=makeplaceholder(p)
  890.                                     end
  891.                                     cframes[t]=insGet(p,"CFrame")
  892.                                     tinsert(joints,{Part0=t,Part1=l.p,C0=l.C0,C1=cf_0})
  893.                                     l.p=nil
  894.                                     found=true
  895.                                     break
  896.                                 end
  897.                             end
  898.                             if not found then
  899.                                 local t={Name=insGet(p,"Name"),l=insGet(p,"Position"),m=meshid,t=textureid,p=p}
  900.                                 makePartCons(p,t)
  901.                                 if placeholders then
  902.                                     t.v=makeplaceholder(p)
  903.                                 end
  904.                                 cframes[t]=insGet(p,"CFrame")
  905.                                 tinsert(joints,{Part0=t,Part1=v1[1],C0=insGet(v,"CFrame"),C1=v1[2]})
  906.                             end
  907.                         end
  908.                     end
  909.                 end
  910.             end
  911.         end
  912.     end
  913.  
  914.     local simradv=0
  915.     local charcons={}
  916.     local function onplayer(v)
  917.         simradv=simradv+1000
  918.         local lastc=nil
  919.         local function oncharacter()
  920.             local newc=insGet(v,"Character")
  921.             if c and newc and (newc~=lastc) then
  922.                 lastc=newc
  923.                 characters[v]=newc
  924.                 refreshrayfilter()
  925.                 if v==lp then
  926.                     if discharscripts then
  927.                         Connect(insGet(newc,"DescendantAdded"),discharscripts)
  928.                         for i,v in next,GetDescendants(newc) do
  929.                             if IsA(v,"Script") then
  930.                                 insSet(v,"Disabled",true)
  931.                             end
  932.                         end
  933.                     end
  934.                     local hrp=timegp(newc,"HumanoidRootPart","BasePart",10)
  935.                     if not (hrp and c and IsDescendantOf(newc,ws)) then return end
  936.                     c=newc
  937.                     local fi,fv=next(flingtable)
  938.                     if fi then
  939.                         if flingchangestate then
  940.                             local hum=FindFirstChildOfClass(c,"Humanoid")
  941.                             if hum then
  942.                                 insGet(hum,"ChangeState")(hum,e.HumanoidStateType.Physics)
  943.                             end
  944.                         end
  945.                         for i,v in next,tclone(flingtable) do
  946.                             if not c then
  947.                                 return
  948.                             end
  949.                             local startpos=insGet(i,"Position")
  950.                             local stoptime=sine+3
  951.                             while true do
  952.                                 twait()
  953.                                 if sine>stoptime then
  954.                                     break
  955.                                 end
  956.                                 if insGet(i,"Anchored") or not IsDescendantOf(i,ws) then
  957.                                     break
  958.                                 end
  959.                                 if v3Get((startpos-insGet(i,"Position")),"Magnitude")>200 then
  960.                                     break
  961.                                 end
  962.                                 local tcf=cfAdd(insGet(i,"CFrame"),insGet(i,"AssemblyLinearVelocity")*(sin(sine*15)+1))
  963.                                 if novoid and (cfGet(tcf,"Y")<novoid) then
  964.                                     tcf=cfAdd(tcf,v3_010*(novoid-cfGet(tcf,"Y")))
  965.                                 end
  966.                                 insSet(hrp,"CFrame",tcf)
  967.                                 insSet(hrp,"AssemblyLinearVelocity",insGet(i,"AssemblyLinearVelocity")*v3_101*75)
  968.                                 insSet(hrp,"AssemblyAngularVelocity",flingvel)
  969.                             end
  970.                             if v then
  971.                                 Destroy(v)
  972.                             end
  973.                             flingtable[i]=nil
  974.                         end
  975.                         insSet(hrp,"AssemblyLinearVelocity",v3_0)
  976.                         insSet(hrp,"AssemblyAngularVelocity",v3_0)
  977.                         insSet(hrp,"CFrame",cfr)
  978.                         twait(0.2501)
  979.                     end
  980.                     if respawntp then
  981.                         local startpos=pos+v3(mrandom(-32,32),0,mrandom(-32,32))
  982.                         local dir=nil
  983.                         local poscheck=true
  984.                         while poscheck do
  985.                             poscheck=false
  986.                             for i,v in next,rootparts do
  987.                                 local diff=(startpos-insGet(v,"Position"))*v3_101
  988.                                 if v3Get(diff,"Magnitude")<10 then
  989.                                     poscheck=true
  990.                                     dir=dir or (v3Get(diff,"Unit") * 3)
  991.                                     startpos=startpos+dir
  992.                                 end
  993.                             end
  994.                             local diff=(startpos-pos)*v3_101
  995.                             if v3Get(diff,"Magnitude")<10 then
  996.                                 poscheck=true
  997.                                 dir=dir or (v3Get(diff,"Unit") * 3)
  998.                                 startpos=startpos+dir
  999.                             end
  1000.                         end
  1001.                         startpos=cfAdd(cfGet(cfr,"Rotation"),startpos)
  1002.                         insSet(hrp,"CFrame",startpos)
  1003.                         insSet(hrp,"AssemblyLinearVelocity",v3_0)
  1004.                         insSet(hrp,"AssemblyAngularVelocity",v3_0)
  1005.                         twait(0.2501)
  1006.                     end
  1007.                     if newc~=c then
  1008.                         return
  1009.                     end
  1010.                     primarypart=insGet(newc,"PrimaryPart") or hrp
  1011.                     if breakjointsmethod==1 then
  1012.                         insGet(newc,"BreakJoints")(newc)
  1013.                         local h=FindFirstChildOfClass(newc,"Humanoid")
  1014.                         if h then
  1015.                             insSet(h,"Health",0)
  1016.                         end
  1017.                     elseif breakjointsmethod==2 then
  1018.                         local h=FindFirstChildOfClass(newc,"Humanoid")
  1019.                         if h then
  1020.                             insSet(h,"Health",0)
  1021.                         else
  1022.                             insGet(newc,"BreakJoints")(newc)
  1023.                         end
  1024.                     else
  1025.                         insGet(newc,"BreakJoints")(newc)
  1026.                     end
  1027.                     Connect(insGet(newc,"DescendantAdded"),ondes)
  1028.                     for i,v in next,GetDescendants(newc) do
  1029.                         ondes(v)
  1030.                     end
  1031.                 else
  1032.                     local hrp=timegp(newc,"HumanoidRootPart","BasePart",10)
  1033.                     if hrp and c and IsDescendantOf(newc,ws) then
  1034.                         rootparts[v]=hrp
  1035.                     end
  1036.                 end
  1037.             end
  1038.         end
  1039.         charcons[v]=Connect(GetPropertyChangedSignal(v,"Character"),oncharacter)
  1040.         oncharacter()
  1041.     end
  1042.     for i,v in next,GetPlayers(plrs) do simradv=simradv+1000 if v~=lp then tspawn(onplayer,v) end end
  1043.     Connect(insGet(plrs,"PlayerAdded"),onplayer)
  1044.     onplayer(lp)
  1045.     Connect(insGet(plrs,"PlayerRemoving"),function(v)
  1046.         simradv=simradv-1000
  1047.         local charcon=charcons[v]
  1048.         if charcon then
  1049.             Disconnect(charcon)
  1050.         end
  1051.         characters[v]=nil
  1052.         rootparts[v]=nil
  1053.     end)
  1054.     local setsimrad=emptyfunction
  1055.     if simrad then
  1056.         setsimrad=function()
  1057.             local canset,_=pcall(function()
  1058.                 insSet(lp,"SimulationRadius",simradv)
  1059.             end)
  1060.             if canset then
  1061.                 setsimrad=function()
  1062.                     insSet(lp,"SimulationRadius",simradv)
  1063.                 end
  1064.             else
  1065.                 setsimrad=emptyfunction
  1066.             end
  1067.         end
  1068.     end
  1069.  
  1070.     local mradN05=rad(-0.5)
  1071.     local KeyCode=e.KeyCode
  1072.     local enumMB2=e.UserInputType.MouseButton2
  1073.     local enumMLCP=e.MouseBehavior.LockCurrentPosition
  1074.     local enumMLC=(insGet(uis,"TouchEnabled") and enumMLCP) or e.MouseBehavior.LockCenter
  1075.     local enumMD=e.MouseBehavior.Default
  1076.     local enumMW=e.UserInputType.MouseWheel
  1077.     local enumMM=e.UserInputType.MouseMovement
  1078.  
  1079.     local mouseBehavior=nil
  1080.     local lastMouseBehavior=insGet(uis,"MouseBehavior")
  1081.     Connect(GetPropertyChangedSignal(uis,"MouseBehavior"),function()
  1082.         if mouseBehavior and (insGet(uis,"MouseBehavior")~=mouseBehavior) then
  1083.             insSet(uis,"MouseBehavior",mouseBehavior)
  1084.         end
  1085.     end)
  1086.  
  1087.     local mode="default"
  1088.     local defaultmode={}
  1089.     local modes={default=defaultmode}
  1090.  
  1091.     local lerpsIdle=emptyfunction
  1092.     local lerpsWalk=emptyfunction
  1093.     local lerpsJump=emptyfunction
  1094.     local lerpsFall=emptyfunction
  1095.  
  1096.     local function addmode(key,mode)
  1097.         if (type(key)~="string") or (type(mode)~="table") then
  1098.             return
  1099.         end
  1100.         for i,v in next,mode do
  1101.             if type(v)~="function" then
  1102.                 mode[i]=nil
  1103.             end
  1104.         end
  1105.         if key=="default" then
  1106.             defaultmode=mode
  1107.             modes.default=mode
  1108.             lerpsIdle=mode.idle or emptyfunction
  1109.             lerpsWalk=mode.walk or emptyfunction
  1110.             lerpsJump=mode.jump or emptyfunction
  1111.             lerpsFall=mode.fall or emptyfunction
  1112.             if mode.modeEntered then
  1113.                 mode.modeEntered()
  1114.             end
  1115.         elseif #key==1 then
  1116.             key=KeyCode[supper(ssub(key,1,1))]
  1117.             modes[key]=mode
  1118.         end
  1119.     end
  1120.  
  1121.     local keyW=KeyCode.W
  1122.     local Wpressed=IsKeyDown(uis,keyW)
  1123.     local keyA=KeyCode.A
  1124.     local Apressed=IsKeyDown(uis,keyA)
  1125.     local keyS=KeyCode.S
  1126.     local Spressed=IsKeyDown(uis,keyS)
  1127.     local keyD=KeyCode.D
  1128.     local Dpressed=IsKeyDown(uis,keyD)
  1129.     local keySpace=KeyCode.Space
  1130.     local jumpingInput=IsKeyDown(uis,keySpace)
  1131.  
  1132.     local FWmovement=0
  1133.     local RTmovement=0
  1134.     local isWalking=false
  1135.     local function refreshKeyboardMovement()
  1136.         if Wpressed then if Spressed then if Dpressed then if Apressed then isWalking=false else FWmovement=0 RTmovement=1 isWalking=true end else if Apressed then FWmovement=0 RTmovement=-1 isWalking=true else isWalking=false end end else FWmovement=1 if Dpressed then if Apressed then RTmovement=0 else RTmovement=1 end else if Apressed then RTmovement=-1 else RTmovement=0 end end isWalking=true end else if Spressed then FWmovement=-1 if Dpressed then if Apressed then RTmovement=0 else RTmovement=1 end else if Apressed then RTmovement=-1 else RTmovement=0 end end isWalking=true else if Dpressed then if Apressed then isWalking=false else FWmovement=0 RTmovement=1 isWalking=true end else if Apressed then FWmovement=0 RTmovement=-1 isWalking=true else isWalking=false end end end end
  1137.     end
  1138.     refreshKeyboardMovement()
  1139.  
  1140.     local keyShift=KeyCode.LeftShift
  1141.     Connect(insGet(uis,"InputBegan"),function(a)
  1142.         if insGet(gs,"MenuIsOpen") or GetFocusedTextBox(uis) then
  1143.             return
  1144.         end
  1145.         a=insGet(a,"KeyCode")
  1146.         if a==keyW then
  1147.             Wpressed=true
  1148.             refreshKeyboardMovement()
  1149.         elseif a==keyA then
  1150.             Apressed=true
  1151.             refreshKeyboardMovement()
  1152.         elseif a==keyS then
  1153.             Spressed=true
  1154.             refreshKeyboardMovement()
  1155.         elseif a==keyD then
  1156.             Dpressed=true
  1157.             refreshKeyboardMovement()
  1158.         elseif a==keySpace then
  1159.             jumpingInput=true
  1160.         elseif a==keyShift then
  1161.             shiftlock=allowshiftlock and not shiftlock
  1162.         elseif modes[a] then
  1163.             if modes[mode].modeLeft then
  1164.                 modes[mode].modeLeft()
  1165.             end
  1166.             if mode==a then
  1167.                 mode="default"
  1168.             else
  1169.                 mode=a
  1170.             end
  1171.             local modet=modes[mode]
  1172.             lerpsIdle=modet.idle or defaultmode.idle or emptyfunction
  1173.             lerpsWalk=modet.walk or defaultmode.walk or emptyfunction
  1174.             lerpsJump=modet.jump or defaultmode.jump or emptyfunction
  1175.             lerpsFall=modet.fall or defaultmode.fall or emptyfunction
  1176.             if modes[mode].modeEntered then
  1177.                 modes[mode].modeEntered()
  1178.             end
  1179.         end
  1180.     end)
  1181.     Connect(insGet(uis,"InputEnded"),function(a)
  1182.         a=insGet(a,"KeyCode")
  1183.         if a==keyW then
  1184.             Wpressed=false
  1185.             refreshKeyboardMovement()
  1186.         elseif a==keyA then
  1187.             Apressed=false
  1188.             refreshKeyboardMovement()
  1189.         elseif a==keyS then
  1190.             Spressed=false
  1191.             refreshKeyboardMovement()
  1192.         elseif a==keyD then
  1193.             Dpressed=false
  1194.             refreshKeyboardMovement()
  1195.         elseif a==keySpace then
  1196.             jumpingInput=false
  1197.         end
  1198.     end)
  1199.  
  1200.     local thumbstickEndX=0
  1201.     local thumbstickStartY=0
  1202.  
  1203.     local thumbstickSizeMultiplier=0
  1204.  
  1205.     local jumpStartX=0
  1206.     local jumpStartY=0
  1207.     local jumpEndX=0
  1208.     local jumpEndY=0
  1209.  
  1210.     local thumbstickInputObject=nil
  1211.     local jumpInputObject=nil
  1212.     local cameraRotateInputObject=nil
  1213.     local cameraZoomInputObject=nil
  1214.  
  1215.     local thumbstickTouchStart=v3_0
  1216.     local cameraZoomInputMagnitude=0
  1217.  
  1218.     Connect(insGet(uis,"TouchStarted"),function(inputObject)
  1219.         if insGet(gs,"MenuIsOpen") or GetFocusedTextBox(uis) then
  1220.             return
  1221.         end
  1222.  
  1223.         local touchPos=insGet(inputObject,"Position")
  1224.         local touchX=v3Get(touchPos,"X")
  1225.         local touchY=v3Get(touchPos,"Y")
  1226.  
  1227.         if (not thumbstickInputObject) and touchX<thumbstickEndX and touchY>thumbstickStartY then
  1228.             thumbstickInputObject=inputObject
  1229.             thumbstickTouchStart=insGet(inputObject,"Position")
  1230.             isWalking=false
  1231.         elseif (not jumpInputObject) and touchY>jumpStartY and touchX>jumpStartX and touchX<jumpEndX and touchY<jumpEndY then
  1232.             jumpInputObject=inputObject
  1233.             jumpingInput=true
  1234.         elseif not cameraRotateInputObject then
  1235.             cameraRotateInputObject=inputObject
  1236.         else
  1237.             cameraZoomInputObject=inputObject
  1238.             cameraZoomInputMagnitude=v3Get(insGet(cameraRotateInputObject,"Position")-insGet(cameraZoomInputObject,"Position"),"Magnitude")
  1239.         end
  1240.     end)
  1241.     Connect(insGet(uis,"TouchMoved"),function(inputObject)
  1242.         local touchPos=insGet(inputObject,"Position")
  1243.         local touchX=v3Get(touchPos,"X")
  1244.         local touchY=v3Get(touchPos,"Y")
  1245.         if inputObject==thumbstickInputObject then
  1246.             local direction=insGet(inputObject,"Position")-thumbstickTouchStart
  1247.             local directionMag=v3Get(direction,"Magnitude")/thumbstickSizeMultiplier
  1248.             if directionMag>0.05 then
  1249.                 isWalking=true
  1250.                 direction=v3Get(direction,"Unit")*min(1,(directionMag-0.05)/0.95)
  1251.                 FWmovement=-v3Get(direction,"Y")
  1252.                 RTmovement=v3Get(direction,"X")
  1253.             else
  1254.                 isWalking=false
  1255.             end
  1256.         elseif inputObject==jumpInputObject then
  1257.             jumpingInput=touchY>jumpStartY and touchX>jumpStartX and touchX<jumpEndX and touchY<jumpEndY
  1258.         else
  1259.             if cameraZoomInputObject then
  1260.                 local newMagnitude=v3Get(insGet(cameraRotateInputObject,"Position")-insGet(cameraZoomInputObject,"Position"),"Magnitude")                  
  1261.                 cammag=cammag+(newMagnitude-cameraZoomInputMagnitude)*0.04*(0.75-cammag/4)
  1262.                 cameraZoomInputMagnitude=newMagnitude
  1263.                 if cammag<0 then
  1264.                     firstperson=false
  1265.                 else
  1266.                     cammag=0
  1267.                     firstperson=true
  1268.                 end
  1269.             elseif inputObject==cameraRotateInputObject then
  1270.                 local rotation=GetMouseDelta(uis)*mradN05
  1271.                 camcfLV=cfGet(cfMul(camrot,angles(rotation.Y,rotation.X,0)),"LookVector")
  1272.                 camrot=cfl(v3_0,camcfLV)
  1273.                 camcfRV=cfGet(camrot,"RightVector")
  1274.             end
  1275.         end
  1276.     end)
  1277.     Connect(insGet(uis,"TouchEnded"),function(inputObject)
  1278.         if inputObject==thumbstickInputObject then
  1279.             thumbstickInputObject=nil
  1280.             isWalking=false
  1281.         elseif inputObject==jumpInputObject then
  1282.             jumpInputObject=nil
  1283.             jumpingInput=false
  1284.         elseif inputObject==cameraRotateInputObject then
  1285.             cameraRotateInputObject=nil
  1286.             cameraZoomInputObject=nil
  1287.         elseif inputObject==cameraZoomInputObject then
  1288.             cameraZoomInputObject=nil
  1289.         end
  1290.     end)
  1291.  
  1292.     local function refreshTouchRegions()
  1293.         local sX=insGet(mouse,"ViewSizeX")
  1294.         local sY=insGet(mouse,"ViewSizeY")
  1295.         local isSmallScreen=min(sX,sY)<=500
  1296.  
  1297.         sY=sY+insGet(gs,"TopbarInset").Height
  1298.  
  1299.         thumbstickEndX=sX*0.4
  1300.         thumbstickStartY=(sY+0)*0.333
  1301.  
  1302.         if isSmallScreen then
  1303.             thumbstickSizeMultiplier=35
  1304.             jumpStartX=sX-95
  1305.             jumpStartY=sY-90
  1306.             jumpEndX=jumpStartX+70
  1307.             jumpEndY=jumpStartY+70
  1308.         else
  1309.             thumbstickSizeMultiplier=60
  1310.             jumpStartX=sX-170
  1311.             jumpStartY=sY-210
  1312.             jumpEndX=jumpStartX+120
  1313.             jumpEndY=jumpStartY+120
  1314.         end
  1315.     end
  1316.     Connect(GetPropertyChangedSignal(mouse,"ViewSizeX"),refreshTouchRegions)
  1317.     Connect(GetPropertyChangedSignal(mouse,"ViewSizeY"),refreshTouchRegions)
  1318.     Connect(GetPropertyChangedSignal(gs,"TopbarInset"),refreshTouchRegions)
  1319.     refreshTouchRegions()
  1320.  
  1321.     local mouseCameraMove=false
  1322.     Connect(insGet(uis,"InputChanged"),function(a,b)
  1323.         if b then return end
  1324.         local inputType=insGet(a,"UserInputType")
  1325.         if mouseCameraMove and inputType==enumMM then
  1326.             local rotation=GetMouseDelta(uis)*mradN05
  1327.             camcfLV=cfGet(cfMul(camrot,angles(rotation.Y,rotation.X,0)),"LookVector")
  1328.             camrot=cfl(v3_0,camcfLV)
  1329.             camcfRV=cfGet(camrot,"RightVector")
  1330.         elseif inputType==enumMW then
  1331.             cammag=cammag+v3Get(insGet(a,"Position"),"Z")*(0.75-cammag/4)
  1332.             if cammag<0 then
  1333.                 firstperson=false
  1334.             else
  1335.                 cammag=0
  1336.                 firstperson=true
  1337.             end
  1338.         end
  1339.     end)
  1340.  
  1341.     local function predictionfling(target)
  1342.         if not c then
  1343.             return false
  1344.         end
  1345.         if typeof(target)~="Instance" then
  1346.             target=insGet(mouse,"Target")
  1347.             if not target then
  1348.                 return false
  1349.             end
  1350.         end
  1351.         if not IsDescendantOf(target,ws) then
  1352.             return false
  1353.         end
  1354.         if IsA(target,"Humanoid") or IsA(target,"BasePart") then
  1355.             target=insGet(target,"Parent")
  1356.             if IsA(target,"Accessory") then
  1357.                 target=insGet(target,"Parent")
  1358.             end
  1359.         end
  1360.         if (target==c) or (not IsA(target,"Model")) then
  1361.             return false
  1362.         end
  1363.         local targetpart=gp(target,"HumanoidRootPart","BasePart") or gp(target,"Torso","BasePart") or gp(target,"UpperTorso","BasePart")
  1364.         if (not targetpart) or (flingtable[targetpart]~=nil) then
  1365.             return false
  1366.         end
  1367.         if highlightflingtargets then
  1368.             local h=i("Highlight")
  1369.             insSet(h,"Name",rs())
  1370.             insSet(h,"Adornee",target)
  1371.             insSet(h,"FillColor",c3(1,0,0))
  1372.             insSet(h,"OutlineColor",c3(1,0,0))
  1373.             insSet(h,"FillTransparency",0.5)
  1374.             insSet(h,"OutlineTransparency",0)
  1375.             insSet(h,"Parent",i10)
  1376.             flingtable[targetpart]=h
  1377.         else
  1378.             flingtable[targetpart]=false
  1379.         end
  1380.         return true
  1381.     end
  1382.  
  1383.     local clickConnection=nil
  1384.     if ctrlclicktp then
  1385.         ctrlclicktp=KeyCode.LeftControl
  1386.         local tpoff=v3_010*3
  1387.         if clickfling then
  1388.             clickConnection=Connect(insGet(mouse,"Button1Down"),function()
  1389.                 if insGet(mouse,"Target") then
  1390.                     if IsKeyDown(uis,ctrlclicktp) then
  1391.                         pos=cfGet(insGet(mouse,"Hit"),"Position")+tpoff
  1392.                         cfr=cfl(pos,pos+camcfLV*v3_101)
  1393.                         xzvel=v3_0
  1394.                         Yvel=0
  1395.                     else
  1396.                         predictionfling()
  1397.                     end
  1398.                 end
  1399.             end)
  1400.         else
  1401.             clickConnection=Connect(insGet(mouse,"Button1Down"),function()
  1402.                 if insGet(mouse,"Target") and IsKeyDown(uis,ctrlclicktp) then
  1403.                     pos=cfGet(insGet(mouse,"Hit"),"Position")+tpoff
  1404.                     cfr=cfl(pos,pos+camcfLV*v3_101)
  1405.                     xzvel=v3_0
  1406.                     Yvel=0
  1407.                 end
  1408.             end)
  1409.         end
  1410.     elseif clickfling then
  1411.         clickConnection=Connect(insGet(mouse,"Button1Down"),predictionfling)
  1412.     end
  1413.  
  1414.     local noYvelTime=1
  1415.     local lastsine=sine
  1416.     local con=nil
  1417.     local function mainFunction()
  1418.         if not c then
  1419.             for i,v in next,cframes do
  1420.                 local p=i.v
  1421.                 if p then
  1422.                     Destroy(p)
  1423.                 end
  1424.             end
  1425.             for i,v in next,flingtable do
  1426.                 if v then --it could be false
  1427.                     Destroy(v)
  1428.                 end
  1429.             end
  1430.             for i,v in next,charcons do
  1431.                 Disconnect(v)
  1432.             end
  1433.             if clickConnection then
  1434.                 Disconnect(clickConnection)
  1435.             end
  1436.             mouseBehavior=nil
  1437.             insSet(uis,"MouseBehavior",enumMD)
  1438.             onnewcamera()
  1439.             local c=insGet(lp,"Character")
  1440.             if c then
  1441.                 insSet(cam,"CameraSubject",FindFirstChildOfClass(c,"Humanoid"))
  1442.             end
  1443.             return con and Disconnect(con)
  1444.         end
  1445.  
  1446.         sine=osclock()
  1447.         local delta=sine-lastsine
  1448.         deltaTime=min(delta*10,1)
  1449.         lastsine=sine
  1450.  
  1451.         if shiftlock then
  1452.             if allowshiftlock then
  1453.                 mouseBehavior=enumMLC
  1454.                 mouseCameraMove=true
  1455.             else
  1456.                 shiftlock=false
  1457.             end
  1458.         elseif firstperson then
  1459.             mouseBehavior=enumMLC
  1460.             mouseCameraMove=true
  1461.         elseif IsMouseButtonPressed(uis,enumMB2) then
  1462.             mouseBehavior=enumMLCP
  1463.             mouseCameraMove=true
  1464.         else
  1465.             mouseBehavior=enumMD
  1466.             mouseCameraMove=false
  1467.         end
  1468.         if lastMouseBehavior~=mouseBehavior then
  1469.             lastMouseBehavior=mouseBehavior
  1470.             insSet(uis,"MouseBehavior",mouseBehavior)
  1471.         end
  1472.  
  1473.         local raycastresult=Raycast(ws,pos,v3_010*(fpdh-v3Get(pos,"Y")),raycastparams)
  1474.         local onground=nil
  1475.         if raycastresult then
  1476.             raycastresult=v3Get(raycastresult.Position,"Y")
  1477.             onground=v3Get(pos,"Y")-raycastresult<3.01
  1478.             if onground then
  1479.                 Yvel=0
  1480.                 pos=pos+v3_010*(raycastresult+3-v3Get(pos,"Y"))*min(delta*20,1)
  1481.                 if jumpingInput and (jumpPower>0) then
  1482.                     Yvel=jumpPower
  1483.                     onground=false
  1484.                 end
  1485.             else
  1486.                 Yvel=Yvel-gravity*delta
  1487.                 if v3Get(pos,"Y")+Yvel*delta<raycastresult then
  1488.                     Yvel=0
  1489.                     pos=pos+v3_010*(raycastresult+3-v3Get(pos,"Y"))
  1490.                 end
  1491.             end
  1492.         else
  1493.             Yvel=0
  1494.             onground=false
  1495.         end
  1496.  
  1497.         if firstperson then
  1498.             if isWalking then
  1499.                 if walkSpeed==0 then
  1500.                     xzvel=v3_0
  1501.                     if onground then
  1502.                         cfr=cfl(pos,pos+camcfLV*v3_101)
  1503.                         camcf=cfAdd(camrot,pos+v3_0150)
  1504.                         cframes[rootpart]=cfr
  1505.                         insSet(cam,"CFrame",camcf)
  1506.                         lerpsIdle()
  1507.                         noYvelTime=min(noYvelTime+delta*0.3,1)
  1508.                         xzvel=xzvel*(1-noYvelTime)
  1509.                     elseif Yvel>0 then
  1510.                         pos=pos+v3_010*Yvel*delta
  1511.                         cfr=cfl(pos,pos+camcfLV*v3_101)
  1512.                         camcf=cfAdd(camrot,pos+v3_0150)
  1513.                         cframes[rootpart]=cfr
  1514.                         insSet(cam,"CFrame",camcf)
  1515.                         lerpsJump()
  1516.                         noYvelTime=0
  1517.                     else
  1518.                         pos=pos+v3_010*Yvel*delta
  1519.                         cfr=cfl(pos,pos+camcfLV*v3_101)
  1520.                         camcf=cfAdd(camrot,pos+v3_0150)
  1521.                         cframes[rootpart]=cfr
  1522.                         insSet(cam,"CFrame",camcf)
  1523.                         lerpsFall()
  1524.                         noYvelTime=0
  1525.                     end
  1526.                 else
  1527.                     xzvel=v3Get(v3Get(camcfLV*v3_101,"Unit")*FWmovement+v3Get(camcfRV*v3_101,"Unit")*RTmovement,"Unit")*walkSpeed
  1528.                     if onground then
  1529.                         pos=pos+xzvel*delta
  1530.                         cfr=cfl(pos,pos+camcfLV*v3_101)
  1531.                         camcf=cfAdd(camrot,pos+v3_0150)
  1532.                         cframes[rootpart]=cfr
  1533.                         insSet(cam,"CFrame",camcf)
  1534.                         lerpsWalk()
  1535.                         noYvelTime=min(noYvelTime+delta*0.3,1)
  1536.                         xzvel=xzvel*(1-noYvelTime)
  1537.                     elseif Yvel>0 then
  1538.                         pos=pos+(xzvel+v3_010*Yvel)*delta
  1539.                         cfr=cfl(pos,pos+camcfLV*v3_101)
  1540.                         camcf=cfAdd(camrot,pos+v3_0150)
  1541.                         cframes[rootpart]=cfr
  1542.                         insSet(cam,"CFrame",camcf)
  1543.                         lerpsJump()
  1544.                         noYvelTime=0
  1545.                     else
  1546.                         pos=pos+(xzvel+v3_010*Yvel)*delta
  1547.                         cfr=cfl(pos,pos+camcfLV*v3_101)
  1548.                         camcf=cfAdd(camrot,pos+v3_0150)
  1549.                         cframes[rootpart]=cfr
  1550.                         insSet(cam,"CFrame",camcf)
  1551.                         lerpsFall()
  1552.                         noYvelTime=0
  1553.                     end
  1554.                 end
  1555.             else
  1556.                 xzvel=v3_0
  1557.                 if onground then
  1558.                     cfr=cfl(pos,pos+camcfLV*v3_101)
  1559.                     camcf=cfAdd(camrot,pos+v3_0150)
  1560.                     cframes[rootpart]=cfr
  1561.                     insSet(cam,"CFrame",camcf)
  1562.                     lerpsIdle()
  1563.                     noYvelTime=min(noYvelTime+delta*0.3,1)
  1564.                     xzvel=xzvel*(1-noYvelTime)
  1565.                 elseif Yvel>0 then
  1566.                     pos=pos+v3_010*Yvel*delta
  1567.                     cfr=cfl(pos,pos+camcfLV*v3_101)
  1568.                     camcf=cfAdd(camrot,pos+v3_0150)
  1569.                     cframes[rootpart]=cfr
  1570.                     insSet(cam,"CFrame",camcf)
  1571.                     lerpsJump()
  1572.                     noYvelTime=0
  1573.                 else
  1574.                     pos=pos+v3_010*Yvel*delta
  1575.                     cfr=cfl(pos,pos+camcfLV*v3_101)
  1576.                     camcf=cfAdd(camrot,pos+v3_0150)
  1577.                     cframes[rootpart]=cfr
  1578.                     insSet(cam,"CFrame",camcf)
  1579.                     lerpsFall()
  1580.                     noYvelTime=0
  1581.                 end
  1582.             end
  1583.         elseif shiftlock then  
  1584.             if isWalking then
  1585.                 if walkSpeed==0 then
  1586.                     xzvel=v3_0
  1587.                     if onground then
  1588.                         cfr=cfl(pos,pos+camcfLV*v3_101)
  1589.                         camcf=cfAdd(camrot,pos+v3_0150+camcfRV*1.75+camcfLV*cammag)
  1590.                         cframes[rootpart]=cfr
  1591.                         insSet(cam,"CFrame",camcf)
  1592.                         lerpsIdle()
  1593.                         noYvelTime=min(noYvelTime+delta*0.3,1)
  1594.                         xzvel=xzvel*(1-noYvelTime)
  1595.                     elseif Yvel>0 then
  1596.                         pos=pos+v3_010*Yvel*delta
  1597.                         cfr=cfl(pos,pos+camcfLV*v3_101)
  1598.                         camcf=cfAdd(camrot,pos+v3_0150+camcfRV*1.75+camcfLV*cammag)
  1599.                         cframes[rootpart]=cfr
  1600.                         insSet(cam,"CFrame",camcf)
  1601.                         lerpsJump()
  1602.                         noYvelTime=0
  1603.                     else
  1604.                         pos=pos+v3_010*Yvel*delta
  1605.                         cfr=cfl(pos,pos+camcfLV*v3_101)
  1606.                         camcf=cfAdd(camrot,pos+v3_0150+camcfRV*1.75+camcfLV*cammag)
  1607.                         cframes[rootpart]=cfr
  1608.                         insSet(cam,"CFrame",camcf)
  1609.                         lerpsFall()
  1610.                         noYvelTime=0
  1611.                     end
  1612.                 else
  1613.                     xzvel=v3Get(v3Get(camcfLV*v3_101,"Unit")*FWmovement+v3Get(camcfRV*v3_101,"Unit")*RTmovement,"Unit")*walkSpeed
  1614.                     if onground then
  1615.                         pos=pos+xzvel*delta
  1616.                         cfr=cfl(pos,pos+camcfLV*v3_101)
  1617.                         camcf=cfAdd(camrot,pos+v3_0150+camcfRV*1.75+camcfLV*cammag)
  1618.                         cframes[rootpart]=cfr
  1619.                         insSet(cam,"CFrame",camcf)
  1620.                         lerpsWalk()
  1621.                         noYvelTime=min(noYvelTime+delta*0.3,1)
  1622.                         xzvel=xzvel*(1-noYvelTime)
  1623.                     elseif Yvel>0 then
  1624.                         pos=pos+(xzvel+v3_010*Yvel)*delta
  1625.                         cfr=cfl(pos,pos+camcfLV*v3_101)
  1626.                         camcf=cfAdd(camrot,pos+v3_0150+camcfRV*1.75+camcfLV*cammag)
  1627.                         cframes[rootpart]=cfr
  1628.                         insSet(cam,"CFrame",camcf)
  1629.                         lerpsJump()
  1630.                         noYvelTime=0
  1631.                     else
  1632.                         pos=pos+(xzvel+v3_010*Yvel)*delta
  1633.                         cfr=cfl(pos,pos+camcfLV*v3_101)
  1634.                         camcf=cfAdd(camrot,pos+v3_0150+camcfRV*1.75+camcfLV*cammag)
  1635.                         cframes[rootpart]=cfr
  1636.                         insSet(cam,"CFrame",camcf)
  1637.                         lerpsFall()
  1638.                         noYvelTime=0
  1639.                     end
  1640.                 end
  1641.             else
  1642.                 xzvel=v3_0
  1643.                 if onground then
  1644.                     cfr=cfl(pos,pos+camcfLV*v3_101)
  1645.                     camcf=cfAdd(camrot,pos+v3_0150+camcfRV*1.75+camcfLV*cammag)
  1646.                     cframes[rootpart]=cfr
  1647.                     insSet(cam,"CFrame",camcf)
  1648.                     lerpsIdle()
  1649.                     noYvelTime=min(noYvelTime+delta*0.3,1)
  1650.                     xzvel=xzvel*(1-noYvelTime)
  1651.                 elseif Yvel>0 then
  1652.                     pos=pos+v3_010*Yvel*delta
  1653.                     cfr=cfl(pos,pos+camcfLV*v3_101)
  1654.                     camcf=cfAdd(camrot,pos+v3_0150+camcfRV*1.75+camcfLV*cammag)
  1655.                     cframes[rootpart]=cfr
  1656.                     insSet(cam,"CFrame",camcf)
  1657.                     lerpsJump()
  1658.                     noYvelTime=0
  1659.                 else
  1660.                     pos=pos+v3_010*Yvel*delta
  1661.                     cfr=cfl(pos,pos+camcfLV*v3_101)
  1662.                     camcf=cfAdd(camrot,pos+v3_0150+camcfRV*1.75+camcfLV*cammag)
  1663.                     cframes[rootpart]=cfr
  1664.                     insSet(cam,"CFrame",camcf)
  1665.                     lerpsFall()
  1666.                     noYvelTime=0
  1667.                 end
  1668.             end
  1669.         else
  1670.             if isWalking then
  1671.                 if walkSpeed==0 then
  1672.                     xzvel=v3_0
  1673.                     if onground then
  1674.                         cfr=cfAdd(cfGet(cfr,"Rotation"),pos)
  1675.                         camcf=cfAdd(camrot,pos+v3_0150+camcfLV*cammag)
  1676.                         cframes[rootpart]=cfr
  1677.                         insSet(cam,"CFrame",camcf)
  1678.                         lerpsIdle()
  1679.                         noYvelTime=min(noYvelTime+delta*0.3,1)
  1680.                         xzvel=xzvel*(1-noYvelTime)
  1681.                     elseif Yvel>0 then
  1682.                         pos=pos+v3_010*Yvel*delta
  1683.                         cfr=cfAdd(cfGet(cfr,"Rotation"),pos)
  1684.                         camcf=cfAdd(camrot,pos+v3_0150+camcfLV*cammag)
  1685.                         cframes[rootpart]=cfr
  1686.                         insSet(cam,"CFrame",camcf)
  1687.                         lerpsJump()
  1688.                         noYvelTime=0
  1689.                     else
  1690.                         pos=pos+v3_010*Yvel*delta
  1691.                         cfr=cfAdd(cfGet(cfr,"Rotation"),pos)
  1692.                         camcf=cfAdd(camrot,pos+v3_0150+camcfLV*cammag)
  1693.                         cframes[rootpart]=cfr
  1694.                         insSet(cam,"CFrame",camcf)
  1695.                         lerpsFall()
  1696.                         noYvelTime=0
  1697.                     end
  1698.                 else
  1699.                     xzvel=v3Get(v3Get(camcfLV*v3_101,"Unit")*FWmovement+v3Get(camcfRV*v3_101,"Unit")*RTmovement,"Unit")*walkSpeed
  1700.                     if onground then
  1701.                         pos=pos+xzvel*delta
  1702.                         cfr=cfAdd(Lerp(cfGet(cfr,"Rotation"),cfl(v3_0,xzvel),deltaTime),pos)
  1703.                         camcf=cfAdd(camrot,pos+v3_0150+camcfLV*cammag)
  1704.                         cframes[rootpart]=cfr
  1705.                         insSet(cam,"CFrame",camcf)
  1706.                         lerpsWalk()
  1707.                         noYvelTime=min(noYvelTime+delta*0.3,1)
  1708.                         xzvel=xzvel*(1-noYvelTime)
  1709.                     elseif Yvel>0 then
  1710.                         pos=pos+(xzvel+(v3_010*Yvel))*delta
  1711.                         cfr=cfAdd(Lerp(cfGet(cfr,"Rotation"),cfl(v3_0,xzvel),deltaTime),pos)
  1712.                         camcf=cfAdd(camrot,pos+v3_0150+camcfLV*cammag)
  1713.                         cframes[rootpart]=cfr
  1714.                         insSet(cam,"CFrame",camcf)
  1715.                         lerpsJump()
  1716.                         noYvelTime=0
  1717.                     else
  1718.                         pos=pos+(xzvel+(v3_010*Yvel))*delta
  1719.                         cfr=cfAdd(Lerp(cfGet(cfr,"Rotation"),cfl(v3_0,xzvel),deltaTime),pos)
  1720.                         camcf=cfAdd(camrot,pos+v3_0150+camcfLV*cammag)
  1721.                         cframes[rootpart]=cfr
  1722.                         insSet(cam,"CFrame",camcf)
  1723.                         lerpsFall()
  1724.                         noYvelTime=0
  1725.                     end
  1726.                 end
  1727.             else
  1728.                 xzvel=v3_0
  1729.                 if onground then
  1730.                     cfr=cfAdd(cfGet(cfr,"Rotation"),pos)
  1731.                     camcf=cfAdd(camrot,pos+v3_0150+camcfLV*cammag)
  1732.                     cframes[rootpart]=cfr
  1733.                     insSet(cam,"CFrame",camcf)
  1734.                     lerpsIdle()
  1735.                     noYvelTime=min(noYvelTime+delta*0.3,1)
  1736.                     xzvel=xzvel*(1-noYvelTime)
  1737.                 elseif Yvel>0 then
  1738.                     pos=pos+v3_010*Yvel*delta
  1739.                     cfr=cfAdd(cfGet(cfr,"Rotation"),pos)
  1740.                     camcf=cfAdd(camrot,pos+v3_0150+camcfLV*cammag)
  1741.                     cframes[rootpart]=cfr
  1742.                     insSet(cam,"CFrame",camcf)
  1743.                     lerpsJump()
  1744.                     noYvelTime=0
  1745.                 else
  1746.                     pos=pos+v3_010*Yvel*delta
  1747.                     cfr=cfAdd(cfGet(cfr,"Rotation"),pos)
  1748.                     camcf=cfAdd(camrot,pos+v3_0150+camcfLV*cammag)
  1749.                     cframes[rootpart]=cfr
  1750.                     insSet(cam,"CFrame",camcf)
  1751.                     lerpsFall()
  1752.                     noYvelTime=0
  1753.                 end
  1754.             end
  1755.         end
  1756.  
  1757.         refreshjointsI(rootpart)
  1758.         tclear(refreshedjoints)
  1759.  
  1760.         local idlerv=v3(sin((sine-0.0375)*16),sin(sine*16),sin((sine+0.075)*16))
  1761.         local idleoff=idlerv*0.001
  1762.  
  1763.         local claimpos=insGet(primarypart,"Position")
  1764.         local claimposY=v3Get(claimpos,"Y")
  1765.         for i,v in next,cframes do
  1766.             local part=i.p
  1767.            
  1768.             if part then
  1769.                 if insGet(part,"ReceiveAge")==0 then
  1770.                     local placeholder=i.v
  1771.                     if novoid and (cfGet(v,"Y")<novoid) then
  1772.                         v=cfAdd(v,v3_010*(novoid-cfGet(v,"Y")))
  1773.                     end
  1774.                     local lastpos=i.l
  1775.                     local vel=(cfGet(v,"Position")-lastpos)/delta
  1776.                     if v3Get(vel,"Magnitude")<0.15 then
  1777.                         if placeholder then
  1778.                             insSet(placeholder,"Parent",nil)
  1779.                         end
  1780.                         v=cfAdd(v,idleoff)
  1781.                     elseif v3Get(vel,"Magnitude")>speedlimit then
  1782.                         if placeholder then
  1783.                             insSet(placeholder,"CFrame",v)
  1784.                             insSet(placeholder,"Parent",ws)
  1785.                         end
  1786.                         vel=v3Get(vel,"Unit")*speedlimit
  1787.                         v=cfAdd(cfGet(v,"Rotation"),lastpos+vel*delta)
  1788.                     elseif placeholder then
  1789.                         insSet(placeholder,"Parent",nil)
  1790.                     end
  1791.                     i.l=cfGet(v,"Position")
  1792.                     local claimtime=i.c
  1793.                     if claimtime then
  1794.                         if sine-claimtime<retVelTime then
  1795.                             insSet(part,"AssemblyLinearVelocity",(claimpos-cfGet(v,"Position"))*v3_101/getFallingTime(cfGet(v,"Y"),claimposY,rGravity)+v3_net)
  1796.                         else
  1797.                             insSet(part,"AssemblyLinearVelocity",getNetlessVelocity(vel*noYvelTime+xzvel))
  1798.                         end
  1799.                     else
  1800.                         i.c=sine
  1801.                         insSet(part,"AssemblyLinearVelocity",getNetlessVelocity(vel*noYvelTime+xzvel))
  1802.                     end
  1803.                     insSet(part,"CFrame",v)
  1804.                     insSet(part,"AssemblyAngularVelocity",idlerv)
  1805.                 else
  1806.                     i.c=nil
  1807.                     i.l=insGet(part,"Position")
  1808.                     local placeholder=i.v
  1809.                     if placeholder then
  1810.                         insSet(placeholder,"CFrame",v)
  1811.                         insSet(placeholder,"Parent",ws)
  1812.                     end
  1813.                 end
  1814.             else
  1815.                 local placeholder=i.v
  1816.                 if placeholder then
  1817.                     insSet(placeholder,"CFrame",v)
  1818.                     insSet(placeholder,"Parent",ws)
  1819.                 end
  1820.             end
  1821.         end
  1822.         setsimrad()
  1823.     end
  1824.  
  1825.     sine=osclock()
  1826.     lastsine=sine
  1827.     con=Connect(heartbeat,mainFunction)
  1828.     mainFunction()
  1829.  
  1830.     local function refreshjoints(v) --use this on the main part if u have parts that
  1831.         refreshjointsI(v) --are connected with each other but arent connected to rootpart
  1832.         tclear(refreshedjoints)
  1833.     end
  1834.  
  1835.     local legcfR=cf(1,-1,0)
  1836.     local legcfL=cf(-1,-1,0)
  1837.     local raydir=v3_010*-2
  1838.     local function raycastlegs() --this returns 2 values: right leg raycast offset, left leg raycast offset
  1839.         local rY=Raycast(ws,cfGet(cfMul(cfr,legcfR),"Position"),raydir,raycastparams)
  1840.         local lY=Raycast(ws,cfGet(cfMul(cfr,legcfL),"Position"),raydir,raycastparams)
  1841.         return rY and (v3Get(rY.Position,"Y")-(v3Get(pos,"Y")-3)) or 0,lY and (v3Get(lY.Position,"Y")-(v3Get(pos,"Y")-3)) or 0
  1842.     end
  1843.  
  1844.     local function velbycfrvec() --this returns 2 values: forward/backwards movement (from -1 to 1), right/left movement (from -1 to 1)
  1845.         local fw=cfGet(cfr,"LookVector")*xzvel/walkSpeed
  1846.         local rt=cfGet(cfr,"RightVector")*xzvel/walkSpeed
  1847.         return v3Get(fw,"X")+v3Get(fw,"Z"),v3Get(rt,"X")+v3Get(rt,"Z")
  1848.     end
  1849.  
  1850.     local lastvel=v3_0
  1851.     local velchg1=v3_0
  1852.     local function velchgbycfrvec() --this returns 2 values: forward/backwards velocity change, right/left velocity change
  1853.         velchg1=velchg1+(lastvel-xzvel) --i recommend setting velchg1 to v3_0 when u start using this function or it will look worse
  1854.         lastvel=xzvel
  1855.         velchg1=velchg1-velchg1*(deltaTime/2)
  1856.         local fw=cfGet(cfr,"LookVector")*velchg1/32
  1857.         local rt=cfGet(cfr,"RightVector")*velchg1/32
  1858.         return v3Get(fw,"X")+v3Get(fw,"Z"),v3Get(rt,"X")+v3Get(rt,"Z")
  1859.     end
  1860.  
  1861.     local lastYvel=0
  1862.     local velYchg1=0
  1863.     local function velYchg() --this returns Y axis velocity change
  1864.         velYchg1=clamp(velYchg1+(lastYvel-Yvel),-50,50) --i recommend setting velYchg1 to 0 when u start using this function or it will look worse
  1865.         lastYvel=Yvel
  1866.         velYchg1=velYchg1-velYchg1*(deltaTime/2)
  1867.         return velYchg1
  1868.     end
  1869.  
  1870.     local function rotToMouse(alpha) --this rotates ur character towards your mouse hit position
  1871.         cfr=Lerp(cfr,cfl(pos,pos*v3_010+cfGet(insGet(mouse,"Hit"),"Position")*v3_101),alpha or deltaTime)
  1872.     end
  1873.  
  1874.     local function glitchJoint(joint,targetGlitchTime,delayFrom,delayTo,radiansFrom,radiansTo)
  1875.         if sine>targetGlitchTime then --local glitchtime=0 addMode("x",{idle=function() glitchtime=glitchJoint(joint,glitchtime,0.2,0.4,-0.1,0.1) end})
  1876.             radiansFrom=radiansFrom*100
  1877.             radiansTo=radiansTo*100
  1878.             joint.C0=cfMul(joint.C0,angles(mrandom(radiansFrom,radiansTo)/100,mrandom(radiansFrom,radiansTo)/100,mrandom(radiansFrom,radiansTo)/100))
  1879.             return sine+mrandom(delayFrom*100,delayTo*100)/100
  1880.         end
  1881.         return targetGlitchTime
  1882.     end
  1883.  
  1884.     local function setWalkSpeed(n)
  1885.         if type(n)~="number" then
  1886.             n=16
  1887.         end
  1888.         walkSpeed=n
  1889.     end
  1890.     local function setJumpPower(n)
  1891.         if type(n)~="number" then
  1892.             n=50
  1893.         end
  1894.         jumpPower=n
  1895.     end
  1896.     local function setGravity(n)
  1897.         if type(n)~="number" then
  1898.             n=196.2
  1899.         end
  1900.         gravity=n
  1901.     end
  1902.     local function setCfr(v) --sets character cframe
  1903.         if typeof(v)=="CFrame" then
  1904.             local newpos=cfGet(v,"Position")
  1905.             camcf=cfAdd(camcf,newpos-pos)
  1906.             insSet(cam,"CFrame",camcf)
  1907.             cfr=v
  1908.             pos=newpos
  1909.         elseif typeof(v)=="Vector3" then
  1910.             camcf=cfAdd(camcf,v-pos)
  1911.             insSet(cam,"CFrame",camcf)
  1912.             cfr=cfAdd(cfGet(cfr,"Rotation"),v)
  1913.             pos=v
  1914.         end
  1915.     end
  1916.     local function getVel() --returns character velocity
  1917.         return xzvel+v3_010*Yvel --important: use only in lerps or it might not work
  1918.     end
  1919.     local function getCamCF() --returns camera cframe
  1920.         return camcf
  1921.     end
  1922.     local function isFirstPerson() --returns true if user is in first person camera mode
  1923.         return firstperson
  1924.     end
  1925.  
  1926.     return {
  1927.         cframes=cframes,
  1928.         joints=joints,
  1929.         fling=predictionfling,
  1930.         predictionfling=predictionfling,
  1931.         refreshjoints=refreshjoints,
  1932.         raycastlegs=raycastlegs,
  1933.         velbycfrvec=velbycfrvec,
  1934.         velchgbycfrvec=velchgbycfrvec,
  1935.         velYchg=velYchg,
  1936.         addmode=addmode,
  1937.         getPart=getPart,
  1938.         getPartFromMesh=getPartFromMesh,
  1939.         getAccWeldFromMesh=getAccWeldFromMesh,
  1940.         getJoint=getJoint,
  1941.         getPartJoint=getPartJoint,
  1942.         rotToMouse=rotToMouse,
  1943.         glitchJoint=glitchJoint,
  1944.         setWalkSpeed=setWalkSpeed,
  1945.         setJumpPower=setJumpPower,
  1946.         setGravity=setGravity,
  1947.         setCfr=setCfr,
  1948.         getVel=getVel,
  1949.         getCamCF=getCamCF,
  1950.         isFirstPerson=isFirstPerson
  1951.     }
  1952. end
  1953.  
  1954. btn("creepy crawler",function()
  1955.     local t=reanimate()
  1956.     if type(t)~="table" then return end
  1957.     local getJoint=t.getJoint
  1958.     local rootJoint=getJoint("RootJoint")
  1959.     local rightShoulder=getJoint("Right Shoulder")
  1960.     local leftShoulder=getJoint("Left Shoulder")
  1961.     local rightHip=getJoint("Right Hip")
  1962.     local leftHip=getJoint("Left Hip")
  1963.     local neck=getJoint("Neck")
  1964.  
  1965.     t.setWalkSpeed(10)
  1966.  
  1967.     local euler=angles
  1968.     local function jumplerp()
  1969.         local sine=sine*60
  1970.         neck.C0 = Lerp(neck.C0,cfMul(cf(0,0,0.5), euler(0,0,3.141592653589793)),deltaTime)
  1971.         rootJoint.C0 = Lerp(rootJoint.C0,cfMul(cf(0,-1.4,0), euler(3.141592653589793,0,-3.141592653589793)),deltaTime)
  1972.         leftShoulder.C0 = Lerp(leftShoulder.C0,cfMul(cf(-1,1.5,0.3), euler(1.7453292519943295,0,-0.17453292519943295)),deltaTime)
  1973.         rightShoulder.C0 = Lerp(rightShoulder.C0,cfMul(cf(1,1.5,0.3), euler(1.7453292519943295,0,0.17453292519943295)),deltaTime)
  1974.         leftHip.C0 = Lerp(leftHip.C0,cfMul(cf(-1,-1.5,0.8), euler(1.3962634015954636,0,-0.17453292519943295)),deltaTime)
  1975.         rightHip.C0 = Lerp(rightHip.C0,cfMul(cf(1,-1.5,0.8), euler(1.3962634015954636,0,0.17453292519943295)),deltaTime)
  1976.     end
  1977.  
  1978.     t.addmode("default",{
  1979.         idle=function()
  1980.             local sine=sine*60
  1981.             neck.C0 = Lerp(neck.C0,cfMul(cf(0,0,0.5), euler(0.08726646259971647 * sin((sine + 20) * 0.05),0,3.141592653589793 + 0.3490658503988659 * sin((sine + -30) * 0.025))),deltaTime)
  1982.             rootJoint.C0 = Lerp(rootJoint.C0,cfMul(cf(0,-1.5 + 0.1 * sin(sine * 0.05),0), euler(3.141592653589793,0,-3.1590459461097367 + 0.05235987755982989 * sin(sine * 0.025))),deltaTime)
  1983.             leftShoulder.C0 = Lerp(leftShoulder.C0,cfMul(cf(-1,1.5,-0.1 * sin(sine * 0.05)), euler(1.5707963267948966,0,0.08726646259971647 * sin(sine * 0.025))),deltaTime)
  1984.             rightShoulder.C0 = Lerp(rightShoulder.C0,cfMul(cf(1,1.5,-0.1 * sin(sine * 0.05)), euler(1.5707963267948966,0,0.08726646259971647 * sin(sine * 0.025))),deltaTime)
  1985.             leftHip.C0 = Lerp(leftHip.C0,cfMul(cf(-1,-1.5,0.5 + -0.1 * sin((sine + 10) * 0.05)), euler(1.5707963267948966,0,0.08726646259971647 * sin(sine * 0.025))),deltaTime)
  1986.             rightHip.C0 = Lerp(rightHip.C0,cfMul(cf(1,-1.5,0.5 + -0.1 * sin((sine + 10) * 0.05)), euler(1.5707963267948966,0,0.08726646259971647 * sin(sine * 0.025))),deltaTime)
  1987.         end,
  1988.         walk=function()
  1989.             local sine=sine*60
  1990.             neck.C0 = Lerp(neck.C0,cfMul(cf(0,0,0.5), euler(0.17453292519943295,0.03490658503988659 * sin((sine + 2.5) * 0.2),3.141592653589793 + -0.17453292519943295 * sin((sine + -10) * 0.2))),deltaTime)
  1991.             rootJoint.C0 = Lerp(rootJoint.C0,cfMul(cf(0,-1.5,0), euler(3.0543261909900767,0.08726646259971647 * sin((sine + 7.5) * 0.2),-3.1590459461097367 + -0.08726646259971647 * sin(sine * 0.2))),deltaTime)
  1992.             leftShoulder.C0 = Lerp(leftShoulder.C0,cfMul(cf(-1,1.5 + 0.5 * sin((sine + 10) * 0.2),0.3 + 0.2 * sin((sine + -10) * 0.2)), euler(1.6580627893946132 + 0.17453292519943295 * sin((sine + 15) * 0.2),0,-0.08726646259971647 * sin(sine * 0.2))),deltaTime)
  1993.             rightShoulder.C0 = Lerp(rightShoulder.C0,cfMul(cf(1,1.5 + 0.5 * sin((sine + -7.5) * 0.2),0.3 + 0.2 * sin((sine + 5) * 0.2)), euler(1.6580627893946132 + 0.17453292519943295 * sin(sine * 0.2),0,-0.08726646259971647 * sin(sine * 0.2))),deltaTime)
  1994.             leftHip.C0 = Lerp(leftHip.C0,cfMul(cf(-1,-1.5 + 0.5 * sin((sine + -7.5) * 0.2),0.5 + 0.2 * sin((sine + 5) * 0.2)), euler(1.6580627893946132 + 0.17453292519943295 * sin(sine * 0.2),0,-0.08726646259971647 * sin(sine * 0.2))),deltaTime)
  1995.             rightHip.C0 = Lerp(rightHip.C0,cfMul(cf(1,-1.5 + 0.5 * sin((sine + 10) * 0.2),0.5 + 0.2 * sin((sine + -7.5) * 0.2)), euler(1.6580627893946132 + -0.17453292519943295 * sin(sine * 0.2),0,-0.08726646259971647 * sin(sine * 0.2))),deltaTime)
  1996.         end,
  1997.         jump=jumplerp,
  1998.         fall=jumplerp
  1999.     })
  2000. end)
  2001.  
  2002. btn("nameless animations V8", function()
  2003.     local t=reanimate()
  2004.     if type(t)~="table" then return end
  2005.     local raycastlegs=t.raycastlegs
  2006.     local velbycfrvec=t.velbycfrvec
  2007.     local addmode=t.addmode
  2008.     local getJoint=t.getJoint
  2009.     local velYchg=t.velYchg
  2010.     local setWalkSpeed=t.setWalkSpeed
  2011.     local RootJoint=getJoint("RootJoint")
  2012.     local RightShoulder=getJoint("Right Shoulder")
  2013.     local LeftShoulder=getJoint("Left Shoulder")
  2014.     local RightHip=getJoint("Right Hip")
  2015.     local LeftHip=getJoint("Left Hip")
  2016.     local Neck=getJoint("Neck")
  2017.  
  2018.     addmode("default", {
  2019.         idle = function()
  2020.             local rY, lY = raycastlegs()
  2021.  
  2022.             local Ychg=velYchg()/20
  2023.  
  2024.             LeftShoulder.C0=Lerp(LeftShoulder.C0,cfMul(cf(-1,0.5+0.1*sin((sine - 1)*1.3),0.05 * sin((sine-0.3)*1.3)),angles(0.5235987755982988+0.08726646259971647*sin(sine*1),-1.4835298641951802+0.10471975511965978*sin(sine*1.3),0.5235987755982988)),deltaTime)
  2025.             RightShoulder.C0=Lerp(RightShoulder.C0,cfMul(cf(1,0.5+0.1*sin((sine - 1)*1.3),0.05 * sin((sine-0.3)*1.3)),angles(0.5235987755982988+0.08726646259971647*sin(sine*1),1.4835298641951802-0.10471975511965978*sin(sine*1.3),-0.5235987755982988)),deltaTime)
  2026.             LeftHip.C0=Lerp(LeftHip.C0,cfMul(cf(-1,-1.09-0.1*sin(sine*1.3)+lY-Ychg,lY*-0.5),angles(-0.026179938779914945*sin(sine*1.3),-1.3962634015954636,0)),deltaTime)
  2027.             RightHip.C0=Lerp(RightHip.C0,cfMul(cf(1,-1.09-0.1*sin(sine*1.3)+rY-Ychg,rY*-0.5),angles(-0.026179938779914945*sin(sine*1.3),1.3962634015954636,0)),deltaTime)
  2028.             RootJoint.C0=Lerp(RootJoint.C0,cfMul(cf(0,0.09+0.1*sin(sine*1.3) + Ychg,0.025 * sin(sine*1.3)),angles(-1.5707963267948966+0.026179938779914945*sin(sine*1.3),0,3.141592653589793)),deltaTime)
  2029.             Neck.C0=Lerp(Neck.C0,cfMul(cf(0,1,0),angles(-1.53588974175501-0.026179938779914945*sin((sine+1)*1.3),0.05235987755982989*sin((sine-0.6)*0.65),3.141592653589793)),deltaTime)
  2030.             --MW_animatorProgressSave: LeftArm,-1,0,0,1,30,5,0,1,0.5,0.1,-1,1.3,-85,6,0,1.3,0,0.05,-0.3,1.3,30,0,0,1,RightArm,1,0,0,1,30,5,0,1,0.5,0.1,-1,1.3,85,-6,0,1.3,0,0.05,-0.3,1.3,-30,0,0,1,LeftLeg,-1,0,0,1,-0,-1.5,0,1.3,-1.09,-0.1,0,1.3,-80,0,0,1,0,0,0,1,0,0,0,1,CPlusPlusTextbook_Handle,8.658389560878277e-09,0,0,1,0,0,0,1,-0.25,0,0,1,0,0,0,1,-0.0002722442150115967,0,0,1,0,0,0,1,RightLeg,1,0,0,1,0,-1.5,0,1.3,-1.09,-0.1,0,1.3,80,0,0,1,0,0,0,1,0,0,0,1,Torso,0,0,0,1,-90,1.5,0,1.3,0.09,0.1,0,1.3,-0,0,0,1,0,0.025,0,1.3,180,0,0,1,Head,0,0,0,1,-88,-1.5,1,1.3,1,0,0,1,-0,3,-0.6,0.65,0,0,0,1,180,0,0,1
  2031.         end,
  2032.         walk = function()
  2033.             local Vfw, Vrt = velbycfrvec()
  2034.  
  2035.             local rY, lY = raycastlegs()
  2036.  
  2037.             local Ychg=velYchg()/20
  2038.  
  2039.             LeftShoulder.C0=Lerp(LeftShoulder.C0,cfMul(cf(-1,0.5,0),angles(-0.7853981633974483*sin((sine+0.07)*8)*Vfw,-1.5707963267948966+0.5235987755982988*sin((sine+0.15)*8),0)),deltaTime)
  2040.             RightShoulder.C0=Lerp(RightShoulder.C0,cfMul(cf(1,0.5,0),angles(0.7853981633974483*sin((sine+0.07)*8)*Vfw,1.5707963267948966+0.5235987755982988*sin((sine+0.15)*8),0)),deltaTime)
  2041.             RightHip.C0=Lerp(RightHip.C0,cfMul(cf(1,-1+0.3*sin((sine - 0.15)*8)+rY-Ychg,rY*-0.5),angles(1.5707963267948966-0.9599310885968813*sin(sine*8)*Vfw,1.5707963267948966-0.7853981633974483*sin(sine*8)*Vrt,-1.5707963267948966)),deltaTime)
  2042.             LeftHip.C0=Lerp(LeftHip.C0,cfMul(cf(-1,-1+0.3*sin((sine + 0.15)*8)+lY-Ychg,lY*-0.5),angles(1.5707963267948966+0.9599310885968813*sin(sine*8)*Vfw,-1.5707963267948966+0.7853981633974483*sin(sine*8)*Vrt,1.5707963267948966)),deltaTime)
  2043.             Neck.C0=Lerp(Neck.C0,cfMul(cf(0,1,0),angles(-1.5707963267948966+0.08726646259971647*sin(sine*16),0,3.141592653589793+0.08726646259971647*sin((sine+0.04)*8)-Vrt)),deltaTime)
  2044.             RootJoint.C0=Lerp(RootJoint.C0,cfMul(cf(0,0.2 * sin((sine+0.1)*16) + Ychg,0),angles(-1.5707963267948966,0,3.141592653589793)),deltaTime)
  2045.             --MW_animatorProgressSave: CPlusPlusTextbook_Handle,8.658389560878277e-09,0,0,8,0,0,0,8,-0.25,0,0,8,0,0,0,8,-0.0002722442150115967,0,0,8,0,0,0,8,LeftArm,-1,0,0,8,-0,-45,0.07,8,0.5,0,0,8,-90,30,0.15,8,0,0,0,8,0,0,0,8,RightArm,1,0,0,8,0,45,0.07,8,0.5,0,0,8,90,30,0.15,8,0,0,0,8,0,0,0,8,RightLeg,1,0,0,8,90,-55,0,8,-1,0.3,-0.15,8,90,-45,0,8,0,0,0,8,-90,0,0,8,LeftLeg,-1,0,0,8,90,55,0,8,-1,0.3,0.15,8,-90,45,0,8,0,0,0,8,90,0,0,8,Head,0,0,0,8,-90,5,0,16,1,0,0,8,-0,0,0,8,0,0,0,8,180,5,0.04,8,Torso,0,0,0,8,-90,0,0,8,0,0.2,0.1,16,-0,0,0,8,0,0,0,8,180,0,0,8
  2046.         end,
  2047.         jump = function()
  2048.             velYchg()
  2049.             local Vfw, Vrt = velbycfrvec()
  2050.             RootJoint.C0 = Lerp(RootJoint.C0,cfMul(cf_0,angles(-1.4835298641951802 + Vfw * 0.1, Vrt * -0.05, -3.141592653589793)),deltaTime)
  2051.             RightShoulder.C0 = Lerp(RightShoulder.C0,cfMul(cf(1, 0.5, 0),angles(4.014257279586958 - 0.08726646259971647 * sin((sine + 0.5) * 4), 1.7453292519943295 + 0.08726646259971647 * sin((sine + 0.25) * 4), -1.5707963267948966)),deltaTime)
  2052.             LeftHip.C0 = Lerp(LeftHip.C0,cfMul(cf(-1, -1, 0),angles(1.5707963267948966 - 0.08726646259971647 * sin((sine + 0.5) * 4), -1.6580627893946132 + 0.06981317007977318 * sin((sine + 0.25) * 4), 1.5707963267948966)),deltaTime)
  2053.             LeftShoulder.C0 = Lerp(LeftShoulder.C0,cfMul(cf(-1, 0.5, 0),angles(4.014257279586958 - 0.08726646259971647 * sin((sine + 0.5) * 4), -1.7453292519943295 - 0.08726646259971647 * sin((sine + 0.25) * 4), 1.5707963267948966)),deltaTime)
  2054.             Neck.C0 = Lerp(Neck.C0,cfMul(cf(0, 1, 0),angles(-1.3962634015954636, 0, -3.141592653589793 - Vrt)),deltaTime)
  2055.             RightHip.C0 = Lerp(RightHip.C0,cfMul(cf(1, -1, 0),angles(1.5707963267948966 - 0.08726646259971647 * sin((sine + 0.5) * 4), 1.6580627893946132 - 0.06981317007977318 * sin((sine + 0.25) * 4), -1.5707963267948966)),deltaTime)
  2056.             --Torso,0,0,0,4,-85,0,0,4,0,0,0,4,0,0,0,4,0,0,0,4,-180,0,0,4,RightArm,1,0,0,4,230,-5,0.5,4,0.5,0,0,4,100,5,0.25,4,0,0,0,4,-90,0,0,4,LeftLeg,-1,0,0,4,90,-5,0.5,4,-1,0,0,4,-95,4,0.25,4,0,0,0,4,90,0,0,4,LeftArm,-1,0,0,4,230,-5,0.5,4,0.5,0,0,4,-100,-5,0.25,4,0,0,0,4,90,0,0,4,Head,0,0,0,4,-80,0,0.5,4,1,0,0,4,0,0,0.25,4,0,0,0,4,-180,0,0,4,RightLeg,1,0,0,4,90,-5,0.5,4,-1,0,0,4,95,-4,0.25,4,0,0,0,4,-90,0,0,4
  2057.         end,
  2058.         fall = function()
  2059.             velYchg()
  2060.             local Vfw, Vrt = velbycfrvec()
  2061.             RootJoint.C0 = Lerp(RootJoint.C0,cfMul(cf_0,angles(-1.6580627893946132 + Vfw * 0.1, Vrt * -0.05, -3.141592653589793)),deltaTime)
  2062.             RightShoulder.C0 = Lerp(RightShoulder.C0,cfMul(cf(1, 0.5, 0),angles(4.014257279586958 - 0.08726646259971647 * sin((sine + 0.5) * 4), 1.7453292519943295 + 0.08726646259971647 * sin((sine + 0.25) * 4), -1.5707963267948966)),deltaTime)
  2063.             LeftHip.C0 = Lerp(LeftHip.C0,cfMul(cf(-1, -1, 0),angles(1.5707963267948966 - 0.08726646259971647 * sin((sine + 0.5) * 4), -1.6580627893946132 + 0.06981317007977318 * sin((sine + 0.25) * 4), 1.5707963267948966)),deltaTime)
  2064.             LeftShoulder.C0 = Lerp(LeftShoulder.C0,cfMul(cf(-1, 0.5, 0),angles(4.014257279586958 - 0.08726646259971647 * sin((sine + 0.5) * 4), -1.7453292519943295 - 0.08726646259971647 * sin((sine + 0.25) * 4), 1.5707963267948966)),deltaTime)
  2065.             Neck.C0 = Lerp(Neck.C0,cfMul(cf(0, 1, 0),angles(-1.7453292519943295, 0, -3.141592653589793 - Vrt)),deltaTime)
  2066.             RightHip.C0 = Lerp(RightHip.C0,cfMul(cf(1, -1, 0),angles(1.5707963267948966 - 0.08726646259971647 * sin((sine + 0.5) * 4), 1.6580627893946132 - 0.06981317007977318 * sin((sine + 0.25) * 4), -1.5707963267948966)),deltaTime)
  2067.             --Torso,0,0,0,4,-95,0,0,4,0,0,0,4,0,0,0,4,0,0,0,4,-180,0,0,4,RightArm,1,0,0,4,230,-5,0.5,4,0.5,0,0,4,100,5,0.25,4,0,0,0,4,-90,0,0,4,LeftLeg,-1,0,0,4,90,-5,0.5,4,-1,0,0,4,-95,4,0.25,4,0,0,0,4,90,0,0,4,LeftArm,-1,0,0,4,230,-5,0.5,4,0.5,0,0,4,-100,-5,0.25,4,0,0,0,4,90,0,0,4,Head,0,0,0,4,-100,0,0.5,4,1,0,0,4,0,0,0.25,4,0,0,0,4,-180,0,0,4,RightLeg,1,0,0,4,90,-5,0.5,4,-1,0,0,4,95,-4,0.25,4,0,0,0,4,-90,0,0,4
  2068.         end
  2069.     })
  2070.  
  2071.     addmode("q", {
  2072.         idle = function()
  2073.             velYchg()
  2074.             LeftShoulder.C0 = Lerp(LeftShoulder.C0,cfMul(cf(-1, 0.75, -0.2),angles(2.705260340591211 - 0.08726646259971647 * sin((sine + 0.1) * 2), -2.792526803190927, -0.6981317007977318)),deltaTime)
  2075.             RightShoulder.C0 = Lerp(RightShoulder.C0,cfMul(cf(1, 0.75, -0.2),angles(2.705260340591211 - 0.08726646259971647 * sin((sine + 0.1) * 2), 2.792526803190927, 0.6981317007977318)),deltaTime)
  2076.             Neck.C0 = Lerp(Neck.C0,cfMul(cf(0, 1, 0),angles(-1.9198621771937625 - 0.10471975511965978 * sin((sine + 0.3) * 2), 0, 3.141592653589793)),deltaTime)
  2077.             RootJoint.C0 = Lerp(RootJoint.C0,cfMul(cf(0, -2.45 - 0.05 * sin(sine * 2), 0),angles(0.03490658503988659 * sin(sine * 2), 0, 3.141592653589793)),deltaTime)
  2078.             RightHip.C0 = Lerp(RightHip.C0,cfMul(cf(1, -1, 0),angles(1.3962634015954636 - 0.03490658503988659 * sin(sine * 2), 1.3089969389957472, -0.9599310885968813)),deltaTime)
  2079.             LeftHip.C0 = Lerp(LeftHip.C0,cfMul(cf(-1, -1, 0),angles(1.5707963267948966 - 0.03490658503988659 * sin(sine * 2), -1.3089969389957472, 1.5707963267948966)),deltaTime)
  2080.             --LeftArm,-1,0,0,2,155,-5,0.1,2,0.75,0,0,2,-160,0,0,2,-0.2,0,0,2,-40,0,0,2,RightArm,1,0,0,2,155,-5,0.1,2,0.75,0,0,2,160,0,0,2,-0.2,0,0,2,40,0,0,2,Head,0,0,0,2,-110,-6,0.3,2,1,0,0,2,-0,0,0,2,0,0,0,2,180,0,0,2,Torso,0,0,0,2,0,2,0,2,-2.45,-0.05,0,2,-0,0,0,2,0,0,0,2,180,0,0,2,RightLeg,1,0,0,2,80,-2,0,2,-1,0,0,2,75,0,0,2,0,0,0,2,-55,0,0,2,LeftLeg,-1,0,0,2,90,-2,0,2,-1,0,0,2,-75,0,0,2,0,0,0,2,90,0,0,2
  2081.         end
  2082.     })
  2083.     addmode("e", {
  2084.         idle = function()
  2085.             velYchg()
  2086.             LeftShoulder.C0 = Lerp(LeftShoulder.C0,cfMul(cf(-0.9, 0.4 + 0.1 * sin(sine * 2), 0.3 - 0.15 * sin(sine * 2)),angles(-1.0471975511965976 - 0.12217304763960307 * sin(sine * 2), -1.3962634015954636, -0.6981317007977318)),deltaTime)
  2087.             RootJoint.C0 = Lerp(RootJoint.C0,cfMul(cf(0, -1.85 - 0.1 * sin((sine + 0.2) * 2), 0),angles(-1.3962634015954636 + 0.03490658503988659 * sin(sine * 2), -0.08726646259971647, 3.141592653589793)),deltaTime)
  2088.             RightShoulder.C0 = Lerp(RightShoulder.C0,cfMul(cf(1, 0.4 + 0.1 * sin(sine * 2), 0.2 - 0.15 * sin(sine * 2)),angles(0.6108652381980153 - 0.12217304763960307 * sin(sine * 2), 1.2217304763960306, -0.7853981633974483)),deltaTime)
  2089.             Neck.C0 = Lerp(Neck.C0,cfMul(cf(0, 1, 0),angles(-1.6580627893946132 - 0.03490658503988659 * sin((sine + 0.6) * 2), 0.10471975511965978 + 0.06981317007977318 * sin(sine * 0.66), 3.141592653589793 + 0.3490658503988659 * sin(sine * 0.66))),deltaTime)
  2090.             RightHip.C0 = Lerp(RightHip.C0,cfMul(cf(1, 0.2 + 0.15 * sin((sine + 0.2) * 2), -0.7 + 0.1 * sin(sine * 2)),angles(1.4835298641951802 + 0.03490658503988659 * sin(sine * 2), 1.4835298641951802, -1.5707963267948966)),deltaTime)
  2091.             LeftHip.C0 = Lerp(LeftHip.C0,cfMul(cf(-1, -0.75 + 0.1 * sin((sine + 0.2) * 2), -0.5),angles(1.3962634015954636 - 0.03490658503988659 * sin(sine * 2), -1.6580627893946132, 0)),deltaTime)
  2092.             --LeftArm,-0.9,0,0,2,-60,-7,0,2,0.4,0.1,0,2,-80,0,0,2,0.3,-0.15,0,2,-40,0,0,2,Torso,0,0,0,2,-80,2,0,2,-1.85,-0.1,0.2,2,-5,0,0,2,0,0,0,2,180,0,0,2,RightArm,1,0,0,2,35,-7,0,2,0.4,0.1,0,2,70,0,0,2,0.2,-0.15,0,2,-45,0,0,2,Head,0,0,0,2,-95,-2,0.6,2,1,0,0,2,6,4,0,0.66,0,0,0,2,180,20,0,0.66,RightLeg,1,0,0,2,85,2,0,2,0.2,0.15,0.2,2,85,0,0,2,-0.7,0.1,0,2,-90,0,0,2,LeftLeg,-1,0,0,2,80,-2,0,2,-0.75,0.1,0.2,2,-95,0,0,2,-0.5,0,0,2,0,0,0,2
  2093.         end
  2094.     })
  2095.     addmode("r", {
  2096.         idle = function()
  2097.             local Ychg=velYchg()/20
  2098.             RightHip.C0 = Lerp(RightHip.C0,cfMul(cf(1, -0.9 - 0.2 * sin(sine * 2)-Ychg, 0),angles(1.5707963267948966, 1.6580627893946132 - 0.17453292519943295 * sin(sine + 0.8), -1.5707963267948966)),deltaTime)
  2099.             RootJoint.C0 = Lerp(RootJoint.C0,cfMul(cf(0.3 * sin(sine + 0.8), -0.1 + 0.2 * sin(sine * 2)+Ychg, 0),angles(-1.5707963267948966, 0, -3.141592653589793)),deltaTime)
  2100.             Neck.C0 = Lerp(Neck.C0,cfMul(cf(0, 1, 0),angles(-1.5707963267948966 + 0.08726646259971647 * sin((sine - 0.5) * 2), 0.08726646259971647 * sin(sine - 1), -3.141592653589793 + 0.2617993877991494 * sin(sine * 5))),deltaTime)
  2101.             LeftShoulder.C0 = Lerp(LeftShoulder.C0,cfMul(cf(-1 + 0.1 * sin(sine * 7), 0.2 - 0.1 * sin(sine + 0.8), -0.25),angles(1.5707963267948966 + 0.5235987755982988 * sin(sine * 7), -0.6981317007977318, 0.3490658503988659 * sin(sine * 7))),deltaTime)
  2102.             LeftHip.C0 = Lerp(LeftHip.C0,cfMul(cf(-1, -0.9 - 0.2 * sin(sine * 2)-Ychg, 0),angles(1.5707963267948966, -1.6580627893946132 - 0.17453292519943295 * sin(sine + 0.8), 1.5707963267948966)),deltaTime)
  2103.             RightShoulder.C0 = Lerp(RightShoulder.C0,cfMul(cf(1 + 0.1 * sin(sine * 7), 0.2 + 0.1 * sin(sine + 0.8), -0.25),angles(1.5707963267948966 - 0.5235987755982988 * sin(sine * 7), 0.6981317007977318, 0.3490658503988659 * sin(sine * 7))),deltaTime)
  2104.             --RightLeg,1,0,0,1,90,0,0,1,-0.9,-0.2,0,2,95,-10,0.8,1,0,0,0,1,-90,0,0,1,Torso,0,0.3,0.8,1,-90,0,0,1,-0.1,0.2,0,2,0,0,0,1,0,0,0,1,-180,0,0,1,Head,0,0,0,1,-90,5,-0.5,2,1,0,0,1,0,5,-1,1,0,0,0,1,-180,15,0,5,Fedora_Handle,8.657480066176504e-09,0,0,1,-6,0,0,1,-0.15052366256713867,0,0,1,0,0,0,1,-0.010221302509307861,0,0,1,0,0,0,1,LeftArm,-1,0.1,0,7,90,30,0,7,0.2,-0.1,0.8,1,-40,0,0,1,-0.25,0,0,1,0,20,0,7,LeftLeg,-1,0,0,1,90,0,0,1,-0.9,-0.2,0,2,-95,-10,0.8,1,0,0,0,1,90,0,0,1,RightArm,1,0.1,0,7,90,-30,0,7,0.2,0.1,0.8,1,40,0,0,1,-0.25,0,0,1,-0,20,0,7
  2105.         end
  2106.     })
  2107.     addmode("t", {
  2108.         idle = function()
  2109.             local Ychg=velYchg()/20
  2110.             LeftShoulder.C0 = Lerp(LeftShoulder.C0,cfMul(cf(-1, 0.5, 0),angles(1.5707963267948966, -1.6580627893946132 + 0.08726646259971647 * sin((sine - 0.3) * 4), 1.5707963267948966)),deltaTime)
  2111.             RightShoulder.C0 = Lerp(RightShoulder.C0,cfMul(cf(1 + 0.15 * sin((sine - 0.4) * 4), 1.42, 0),angles(1.5707963267948966, 1.4835298641951802 - 0.3490658503988659 * sin((sine - 0.4) * 4), 1.5707963267948966)),deltaTime)
  2112.             Neck.C0 = Lerp(Neck.C0,cfMul(cf(0, 1, 0),angles(-1.4835298641951802, 0.04363323129985824 - 0.08726646259971647 * sin((sine + 0.1) * 4), -3.141592653589793 + 0.04363323129985824 * sin(sine * 4))),deltaTime)
  2113.             RootJoint.C0 = Lerp(RootJoint.C0,cfMul(cf(0.1 * sin(sine * 4), Ychg, 0),angles(-1.5707963267948966, -0.08726646259971647 + 0.08726646259971647 * sin(sine * 4), -3.141592653589793)),deltaTime)
  2114.             RightHip.C0 = Lerp(RightHip.C0,cfMul(cf(1, -1.1 + 0.1 * sin(sine * 4)-Ychg, 0),angles(1.5707963267948966, 1.5707963267948966 + 0.08726646259971647 * sin(sine * 4), -1.5707963267948966)),deltaTime)
  2115.             LeftHip.C0 = Lerp(LeftHip.C0,cfMul(cf(-1 - 0.02 * sin(sine * 4), -0.925 - 0.07 * sin(sine * 4)-Ychg, 0),angles(1.5707963267948966, -1.7453292519943295 + 0.08726646259971647 * sin(sine * 4), 1.5707963267948966)),deltaTime)
  2116.             --LeftArm,-1,0,0,4,90,0,0,4,0.5,0,0,4,-95,5,-0.3,4,0,0,0,4,90,0,0,4,RightArm,1,0.15,-0.4,4,90,0,0,4,1.42,0,0,4,85,-20,-0.4,4,0,0,0,4,90,0,0,4,Head,0,0,0,4,-85,0,0,4,1,0,0,4,2.5,-5,0.1,4,0,0,0,4,-180,2.5,0,4,Torso,0,0.1,0,4,-90,0,0,4,0,0,0,4,-5,5,0,4,0,0,0,4,-180,0,0,4,RightLeg,1,0,0,4,90,0,0,4,-1.1,0.1,0,4,90,5,0,4,0,0,0,4,-90,0,0,4,LeftLeg,-1,-0.02,0,4,90,0,0,4,-0.925,-0.07,0,4,-100,5,0,4,0,0,0,4,90,0,0,4
  2117.         end
  2118.     })
  2119.     addmode("y", {
  2120.         idle = function()
  2121.             local Ychg=velYchg()/20
  2122.             LeftShoulder.C0 = Lerp(LeftShoulder.C0,cfMul(cf(-1.5, 0.5, 0),angles(-1.7453292519943295, 0.17453292519943295 - 0.04363323129985824 * sin(sine * 2), -1.4835298641951802)),deltaTime)
  2123.             RightHip.C0 = Lerp(RightHip.C0,cfMul(cf(1, -0.9000000953674316 - 0.1 * sin(sine * 2)-Ychg, 0),angles(-1.3962634015954636, 1.3962634015954636, 1.5707963267948966)),deltaTime)
  2124.             LeftHip.C0 = Lerp(LeftHip.C0,cfMul(cf(-1, -1.0000001192092896 - 0.1 * sin(sine * 2)-Ychg, 0),angles(-1.5707963267948966, -1.3962634015954636, -1.5707963267948966)),deltaTime)
  2125.             Neck.C0 = Lerp(Neck.C0,cfMul(cf(0, 1, 0),angles(-2.0943951023931953 + 0.08726646259971647 * sin((sine - 1) * 2), -0.08726646259971647, 2.792526803190927)),deltaTime)
  2126.             RightShoulder.C0 = Lerp(RightShoulder.C0,cfMul(cf(1, 1.2000000476837158, 0),angles(2.6179938779914944 + 0.08726646259971647 * sin((sine - 1) * 2), 0.6981317007977318, -1.3962634015954636)),deltaTime)
  2127.             RootJoint.C0 = Lerp(RootJoint.C0,cfMul(cf(0, 0.1 * sin(sine * 2) + Ychg, 0),angles(-1.6580627893946132, 0.08726646259971647, 3.0543261909900767)),deltaTime)
  2128.             --LeftArm,-1.5,0,0,2,-100,0,0,2,0.5,0,0,2,10,-2.5,0,2,0,0,0,2,-85,0,0,2,RightLeg,1,0,0,2,-80,0,0,2,-0.9000000953674316,-0.1,0,2,80,0,0,2,0,0,0,2,90,0,0,2,LeftLeg,-1,0,0,2,-90,0,0,2,-1.0000001192092896,-0.1,0,2,-80,0,0,2,0,0,0,2,-90,0,0,2,Fedora_Handle,8.657480066176504e-09,0,0,2,-6,0,0,2,-0.15052366256713867,0,0,2,0,0,0,2,-0.010221302509307861,0,0,2,0,0,0,2,Head,0,0,0,2,-120,5,-1,2,1,0,0,2,-5,0,0,2,0,0,0,2,160,0,0,2,RightArm,1,0,0,2,150,5,-1,2,1.2000000476837158,0,0,2,40,0,0,2,0,0,0,2,-80,0,0,2,Torso,0,0,0,2,-95,0,0,2,0,0.1,0,2,5,0,0,2,0,0,0,2,175,0,0,2
  2129.         end
  2130.     })
  2131.     addmode("u", {
  2132.         idle = function()
  2133.             velYchg()
  2134.             RootJoint.C0 = Lerp(RootJoint.C0,cfMul(cf(0, 0.75 + 0.25 * sin(sine * 2), 0),angles(-1.5707963267948966, 0, 3.141592653589793)),deltaTime)
  2135.             Neck.C0 = Lerp(Neck.C0,cfMul(cf(0, 1.5 - 0.1 * sin((sine + 0.2) * 2), 0),angles(-1.5707963267948966 - 0.08726646259971647 * sin((sine + 0.4) * 2), 0, 3.141592653589793 + 0.3490658503988659 * sin(sine * 0.66))),deltaTime)
  2136.             LeftHip.C0 = Lerp(LeftHip.C0,cfMul(cf(-0.5 - 1 * sin((sine + 0.2) * 2.2), -0.75 - 0.25 * sin(sine * 2), 1 * sin((sine + 0.95) * 2.2)),angles(0, -1.5707963267948966, 0)),deltaTime)
  2137.             RightHip.C0 = Lerp(RightHip.C0,cfMul(cf(0.5 + 1 * sin((sine + 0.2) * 2.2), -0.75 - 0.25 * sin(sine * 2), -1 * sin((sine + 0.95) * 2.2)),angles(0, 1.5707963267948966, 0)),deltaTime)
  2138.             RightShoulder.C0 = Lerp(RightShoulder.C0,cfMul(cf(-0.5 - 1.85 * sin(sine * 2), 0.8 - 0.5 * sin(sine * 2), -1.85 * sin((sine + 0.75) * 2)),angles(0, 1.5707963267948966, 0)),deltaTime)
  2139.             LeftShoulder.C0 = Lerp(LeftShoulder.C0,cfMul(cf(0.5 + 1.85 * sin(sine * 2), 0.8 - 0.5 * sin(sine * 2), 1.85 * sin((sine + 0.75) * 2)),angles(0, -1.5707963267948966, 0)),deltaTime)
  2140.             --Torso,0,0,0,2,-90,0,0,2,0.75,0.25,0,2,-0,0,0,2,0,0,0,2,180,0,0,2,Fedora_Handle,8.657480066176504e-09,0,0,2,-6,0,0,2,-0.15052366256713867,0,0,2,0,0,0,2,-0.010221302509307861,0,0,2,0,0,0,2,Head,0,0,0,2,-90,-5,0.4,2,1.5,-0.1,0.2,2,-0,0,0,2,0,0,0,2,180,20,0,0.66,LeftLeg,-0.5,-1,0.2,2.2,-0,0,0,2,-0.75,-0.25,0,2,-90,0,0,2,0,1,0.95,2.2,0,0,0,2,RightLeg,0.5,1,0.2,2.2,0,0,0,2,-0.75,-0.25,0,2,90,0,0,2,0,-1,0.95,2.2,0,0,0,2,RightArm,-0.5,-1.85,0,2,0,0,0,2,0.8,-0.5,0,2,90,0,0,2,0,-1.85,0.75,2,0,0,0,2,LeftArm,0.5,1.85,0,2,-0,0,0,2,0.8,-0.5,0,2,-90,0,0,2,0,1.85,0.75,2,0,0,0,2
  2141.         end
  2142.     })
  2143.     addmode("i", {
  2144.         idle = function()
  2145.             local Ychg=velYchg()/20
  2146.             LeftShoulder.C0 = Lerp(LeftShoulder.C0,cfMul(cf(-0.5, 0.5 + 0.1 * sin((sine - 0.4444444444444444) * 9), 0),angles(2.9670597283903604 + 0.17453292519943295 * sin((sine - 0.17777777777777778) * 9), -0.5235987755982988, 1.5707963267948966 + 0.17453292519943295 * sin(sine * 4.5))),deltaTime)
  2147.             LeftHip.C0 = Lerp(LeftHip.C0,cfMul(cf(-1, -0.5 + 0.1 * sin((sine + 0.26666666666666666) * 4.5)-Ychg, -0.5),angles(1.7453292519943295 - 1.0471975511965976 * sin(sine * 4.5), -1.5707963267948966 + 0.03490658503988659 * sin(sine * 4.5), 1.5707963267948966)),deltaTime)
  2148.             RootJoint.C0 = Lerp(RootJoint.C0,cfMul(cf(0, -0.5 + 0.5 * sin((sine + 0.17777777777777778) * 9)+Ychg, 0),angles(-1.3962634015954636 - 0.03490658503988659 * sin((sine + 0.17777777777777778) * 9), -0.05235987755982989 * sin(sine * 4.5), 3.141592653589793 + 0.03490658503988659 * sin(sine * 4.5))),deltaTime)
  2149.             Neck.C0 = Lerp(Neck.C0,cfMul(cf(0, 1 + 0.2 * sin(sine * 9), 0),angles(-1.5707963267948966 + 0.08726646259971647 * sin(sine * 9), 0.08726646259971647 * sin(sine * 4.5), 3.141592653589793 - 0.06981317007977318 * sin(sine * 4.5))),deltaTime)
  2150.             RightShoulder.C0 = Lerp(RightShoulder.C0,cfMul(cf(0.5, 0.5 + 0.1 * sin((sine - 0.4444444444444444) * 9), 0),angles(2.9670597283903604 + 0.17453292519943295 * sin((sine - 0.17777777777777778) * 9), 0.5235987755982988, -1.5707963267948966 + 0.17453292519943295 * sin(sine * 4.5))),deltaTime)
  2151.             RightHip.C0 = Lerp(RightHip.C0,cfMul(cf(1, -0.5 + 0.1 * sin((sine - 0.26666666666666666) * 4.5)-Ychg, -0.5),angles(1.7453292519943295 + 1.0471975511965976 * sin(sine * 4.5), 1.5707963267948966 + 0.03490658503988659 * sin(sine * 4.5), -1.5707963267948966)),deltaTime)
  2152.             --LeftArm,-0.5,0,0,4.5,170,10,-0.17777777777777778,9,0.5,0.1,-0.4444444444444444,9,-30,0,0,4.5,0,0,0,4.5,90,10,0,4.5,LeftLeg,-1,0,0,4.5,100,-60,0,4.5,-0.5,0.1,0.26666666666666666,4.5,-90,2,0,4.5,-0.5,0,0,4.5,90,0,0,4.5,Torso,0,0,0,4.5,-80,-2,0.17777777777777778,9,-0.5,0.5,0.17777777777777778,9,-0,-3,0,4.5,0,0,0,4.5,180,2,0,4.5,Head,0,0,0,4.5,-90,5,0,9,1,0.2,0,9,-0,5,0,4.5,0,0,0,4.5,180,-4,0,4.5,RightArm,0.5,0,0,4.5,170,10,-0.17777777777777778,9,0.5,0.1,-0.4444444444444444,9,30,0,0,4.5,0,0,0,4.5,-90,10,0,4.5,RightLeg,1,0,0,4.5,100,60,0,4.5,-0.5,0.1,-0.26666666666666666,4.5,90,2,0,4.5,-0.5,0,0,4.5,-90,0,0,4.5
  2153.         end,
  2154.     })
  2155.     addmode("o", {
  2156.         idle = function()
  2157.             local Ychg=velYchg()/20
  2158.             local rY, lY = raycastlegs()
  2159.  
  2160.             LeftHip.C0 = Lerp(LeftHip.C0,cfMul(cf(-1, -1 + lY-Ychg, lY * -0.5),angles(-1.8325957145940461 - 0.08726646259971647 * sin(sine * 2), -1.4835298641951802, -1.5707963267948966)),deltaTime)
  2161.             RootJoint.C0 = Lerp(RootJoint.C0,cfMul(cf(0, Ychg, 0.09 * sin(sine * 2)),angles(-1.3962634015954636 + 0.08726646259971647 * sin(sine * 2), -0.08726646259971647, 3.141592653589793)),deltaTime)
  2162.             LeftShoulder.C0 = Lerp(LeftShoulder.C0,cfMul(cf(-1, 0.5, 0),angles(2.9670597283903604 + 0.08726646259971647 * sin(sine * 1), -1.5707963267948966 + 0.08726646259971647 * sin((sine + 0.6) * 1), 1.5707963267948966)),deltaTime)
  2163.             RightHip.C0 = Lerp(RightHip.C0,cfMul(cf(1, -1.1 + rY-Ychg, rY * -0.5),angles(-1.7453292519943295 - 0.08726646259971647 * sin(sine * 2), 1.5707963267948966, 1.5707963267948966)),deltaTime)
  2164.             Neck.C0 = Lerp(Neck.C0,cfMul(cf(0, 1, 0),angles(-1.2217304763960306 - 0.08726646259971647 * sin((sine + 0.3) * 2), -0.2617993877991494 - 0.08726646259971647 * sin(sine * 2), 3.141592653589793)),deltaTime)
  2165.             RightShoulder.C0 = Lerp(RightShoulder.C0,cfMul(cf(1, 0.5, 0),angles(2.8797932657906435 + 0.08726646259971647 * sin(sine * 1), 1.5707963267948966 - 0.08726646259971647 * sin((sine + 0.6) * 1), -1.5707963267948966)),deltaTime)
  2166.             --LeftLeg,-1,0,0,2,-105,-5,0,2,-1,0,0,2,-85,0,0,2,0,0,0,2,-90,0,0.75,2,Torso,0,0,0,2,-80,5,0,2,0,0,0,2,-5,0,0,2,0,0.09,0,2,180,0,0,2,LeftArm,-1,0,0,2,170,5,0,1,0.5,0,0,2,-90,5,0.6,1,0,0,0,2,90,0,0,2,RightLeg,1,0,0,2,-100,-5,0,2,-1.1,0,0,2,90,0,0,2,0,0,0,2,90,0,0.75,2,Head,0,0,0,2,-70,-5,0.3,2,1,0,0,2,-15,-5,0,2,0,0,0,2,180,0,0,2,RightArm,1,0,0,2,165,5,0,1,0.5,0,0,2,90,-5,0.6,1,0,0,0,2,-90,0,0,2
  2167.         end,
  2168.         walk = function()
  2169.             local Ychg=velYchg()/20
  2170.             local Vfw, Vrt = velbycfrvec()
  2171.  
  2172.             local rY, lY = raycastlegs()
  2173.  
  2174.             Neck.C0 = Lerp(Neck.C0,cfMul(cf(0, 1, 0),angles(-1.5707963267948966 + 0.04363323129985824 * sin(sine * 16), 0, 3.141592653589793 + 0.08726646259971647 * sin(sine * 8) - Vrt)),deltaTime)
  2175.             RightHip.C0 = Lerp(RightHip.C0,cfMul(cf(1, -1 - 0.3 * sin((sine + 0.15) * 8) + rY-Ychg, rY * -0.5),angles(-1.5707963267948966 - 0.6981317007977318 * sin(sine * 8) * Vfw, 1.5707963267948966 + 0.6981317007977318 * sin(sine * 8) * Vrt, 1.5707963267948966)),deltaTime)
  2176.             RightShoulder.C0 = Lerp(RightShoulder.C0,cfMul(cf(1, 0.5, 0),angles(0.08726646259971647 * sin((sine - 0.05) * 16), 1.5707963267948966 + 0.08726646259971647 * sin(sine * 8) - Vrt/3, 1.5707963267948966)),deltaTime)
  2177.             LeftShoulder.C0 = Lerp(LeftShoulder.C0,cfMul(cf(-1, 0.5, 0),angles(0.08726646259971647 * sin((sine - 0.05) * 16), -1.5707963267948966 + 0.08726646259971647 * sin(sine * 8) - Vrt/3, -1.5707963267948966)),deltaTime)
  2178.             RootJoint.C0 = Lerp(RootJoint.C0,cfMul(cf(0, 0.1 * sin((sine + 0.1) * 16)+Ychg, 0),angles(-1.5707963267948966, 0, 3.141592653589793 - 0.08726646259971647 * sin(sine * 8))),deltaTime)
  2179.             LeftHip.C0 = Lerp(LeftHip.C0,cfMul(cf(-1, -1 + 0.3 * sin((sine + 0.15) * 8) + lY-Ychg, lY * -0.5),angles(1.5707963267948966 + 0.6981317007977318 * sin(sine * 8) * Vfw, -1.5707963267948966 + 0.6981317007977318 * sin(sine * 8) * Vrt, 1.5707963267948966)),deltaTime)
  2180.             --Head,0,0,0,8,-90,2.5,0,16,1,0,0,8,-0,0,0,8,0,0,0,8,180,5,0,8,RightLeg,1,0,0,8,-90,-40,0,8,-1,-0.3,0.15,8,90,40,0,8,0,0,0,8,90,0,0,8,RightArm,1,0,0,8,0,5,-0.05,16,0.5,0,0,8,90,5,0,8,0,0,0,8,90,0,0,8,LeftArm,-1,0,0,8,0,5,-0.05,16,0.5,0,0,8,-90,5,0,8,0,0,0,8,-90,0,0,8,Torso,0,0,0,8,-90,0,0,8,0,0.1,0.1,16,-0,0,0,8,0,0,0,8,180,-5,0,8,LeftLeg,-1,0,0,8,90,40,0,8,-1,0.3,0.15,8,-90,40,0,8,0,0,0,8,90,0,0,8
  2181.         end
  2182.     })
  2183.     addmode("p", {
  2184.         idle = function()
  2185.             local Ychg=velYchg()/20
  2186.             RightShoulder.C0 = Lerp(RightShoulder.C0,cfMul(cf(1.5, 0.5, 0),angles(1.5707963267948966, 3.141592653589793, -1.5707963267948966)),deltaTime)
  2187.             RightHip.C0 = Lerp(RightHip.C0,cfMul(cf(1, -1-Ychg, 0),angles(0, 1.5707963267948966, 0)),deltaTime)
  2188.             LeftShoulder.C0 = Lerp(LeftShoulder.C0,cfMul(cf(-1.5, 0.5, 0),angles(1.5707963267948966, 3.141592653589793, 1.5707963267948966)),deltaTime)
  2189.             LeftHip.C0 = Lerp(LeftHip.C0,cfMul(cf(-1, -1-Ychg, 0),angles(0, -1.5707963267948966, 0)),deltaTime)
  2190.             Neck.C0 = Lerp(Neck.C0,cfMul(cf(0, 1, 0),angles(-1.5707963267948966, 0, -3.141592653589793)),deltaTime)
  2191.             RootJoint.C0 = Lerp(RootJoint.C0,cfMul(cf(0, Ychg, 0),angles(-1.5707963267948966, 0, -3.141592653589793)),deltaTime)
  2192.             --RightArm,1.5,0,0,1,90,0,0,1,0.5,0,0,1,180,0,0,1,0,0,0,1,-90,0,0,1,RightLeg,1,0,0,1,0,0,0,1,-1,0,0,1,90,0,0,1,0,0,0,1,0,0,0,1,Fedora_Handle,8.657480066176504e-09,0,0,1,-6,0,0,1,-0.15052366256713867,0,0,1,0,0,0,1,-0.010221302509307861,0,0,1,0,0,0,1,LeftArm,-1.5,0,0,1,90,0,0,1,0.5,0,0,1,180,0,0,1,0,0,0,1,90,0,0,1,LeftLeg,-1,0,0,1,-0,0,0,1,-1,0,0,1,-90,0,0,1,0,0,0,1,0,0,0,1,Head,0,0,0,1,-90,0,0,1,1,0,0,1,0,0,0,1,0,0,0,1,-180,0,0,1,Torso,0,0,0,1,-90,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,-180,0,0,1
  2193.         end
  2194.     })
  2195.     addmode("f", {
  2196.         modeEntered = function()
  2197.             setWalkSpeed(25)
  2198.         end,
  2199.         idle = function()
  2200.             velYchg()
  2201.             LeftShoulder.C0 = Lerp(LeftShoulder.C0,cfMul(cf(-1, 0.5, 0),angles(-3.0543261909900767 - 0.17453292519943295 * sin((sine + 1.5) * 1), -1.5707963267948966 + 0.08726646259971647 * sin((sine + 0.6) * 1), -1.5707963267948966)),deltaTime)
  2202.             RightShoulder.C0 = Lerp(RightShoulder.C0,cfMul(cf(1, 0.5, 0),angles(3.141592653589793 - 0.08726646259971647 * sin(sine * 1), 0.3490658503988659 + 0.08726646259971647 * sin((sine + 0.3) * 1), -1.9198621771937625 + 0.08726646259971647 * sin((sine + 1) * 1))),deltaTime)
  2203.             Neck.C0 = Lerp(Neck.C0,cfMul(cf(0, 1, 0),angles(-1.3089969389957472 - 0.2617993877991494 * sin((sine + 1.2) * 1), 0.08726646259971647 * sin((sine + 0.2) * 0.5), -2.9670597283903604)),deltaTime)
  2204.             RootJoint.C0 = Lerp(RootJoint.C0,cfMul(cf(0, 5 - 0.5 * sin((sine - 0.2) * 1), 0.2 * sin((sine - 1.2) * 1)),angles(-0.08726646259971647 + 0.17453292519943295 * sin((sine + 1.2) * 1), 0.08726646259971647 * sin(sine * 0.5), 3.141592653589793)),deltaTime)
  2205.             LeftHip.C0 = Lerp(LeftHip.C0,cfMul(cf(-1, -1, 0),angles(1.3962634015954636 + 0.12217304763960307 * sin((sine + 1.5) * 1), -1.2217304763960306 + 0.08726646259971647 * sin((sine + 0.2) * 0.5), 1.5707963267948966)),deltaTime)
  2206.             RightHip.C0 = Lerp(RightHip.C0,cfMul(cf(1, -1, 0),angles(1.9198621771937625 + 0.12217304763960307 * sin((sine + 1.5) * 1), 1.2217304763960306 + 0.08726646259971647 * sin((sine + 0.2) * 0.5), -1.5707963267948966)),deltaTime)
  2207.             --LeftArm,-1,0,0,1,-175,-10,1.5,1,0.5,0,0,1,-90,5,0.6,1,0,0,0,1,-90,0,0,1,RightArm,1,0,0,1,180,-5,0,1,0.5,0,0,1,20,5,0.3,1,0,0,0,1,-110,5,1,1,Head,0,0,0,1,-75,-15,1.2,1,1,0,0,1,-0,5,0.2,0.5,0,0,0,1,-170,0,0,1,Torso,0,0,0,1,-5,10,1.2,1,5,-0.5,-0.2,1,-0,5,0,0.5,0,0.2,-1.2,1,180,0,0,1,LeftLeg,-1,0,0,1,80,7,1.5,1,-1,0,0,1,-70,5,0.2,0.5,0,0,0,1,90,0,0,1,RightLeg,1,0,0,1,110,7,1.5,1,-1,0,0,1,70,5,0.2,0.5,0,0,0,1,-90,0,0,1
  2208.         end,
  2209.         walk = function()
  2210.             velYchg()
  2211.             local Vfw, Vrt = velbycfrvec()
  2212.             LeftShoulder.C0 = Lerp(LeftShoulder.C0,cfMul(cf(-1, 0.5, 0),angles(-3.0543261909900767 - 0.17453292519943295 * sin((sine + 1.5) * 1) - Vfw * 0.1, -1.5707963267948966 + 0.08726646259971647 * sin((sine + 0.6) * 1) + Vrt * 0.2, -1.5707963267948966)),deltaTime)
  2213.             RightShoulder.C0 = Lerp(RightShoulder.C0,cfMul(cf(1, 0.5, 0),angles(3.141592653589793 - 0.08726646259971647 * sin(sine * 1), 0.3490658503988659 + 0.08726646259971647 * sin((sine + 0.3) * 1), -1.9198621771937625 + 0.08726646259971647 * sin((sine + 1) * 1))),deltaTime)
  2214.             Neck.C0 = Lerp(Neck.C0,cfMul(cf(0, 1, 0),angles(-1.3089969389957472 - 0.2617993877991494 * sin((sine + 1.2) * 1) + Vfw * 0.1, 0.08726646259971647 * sin((sine + 0.2) * 0.5) - Vrt * 0.2, -2.9670597283903604)),deltaTime)
  2215.             RootJoint.C0 = Lerp(RootJoint.C0,cfMul(cf(0, 5 - 0.5 * sin((sine - 0.2) * 1), 0.2 * sin((sine - 1.2) * 1)),angles(-0.08726646259971647 + 0.17453292519943295 * sin((sine + 1.2) * 1) - Vfw * 0.2, 0.08726646259971647 * sin(sine * 0.5), 3.141592653589793 - Vrt * 0.2)),deltaTime)
  2216.             LeftHip.C0 = Lerp(LeftHip.C0,cfMul(cf(-1, -1, 0),angles(1.3962634015954636 + 0.12217304763960307 * sin((sine + 1.5) * 1) - Vfw * 0.2, -1.2217304763960306 + 0.08726646259971647 * sin((sine + 0.2) * 0.5), 1.5707963267948966)),deltaTime)
  2217.             RightHip.C0 = Lerp(RightHip.C0,cfMul(cf(1, -1, 0),angles(1.9198621771937625 + 0.12217304763960307 * sin((sine + 1.5) * 1) - Vfw * 0.2, 1.2217304763960306 + 0.08726646259971647 * sin((sine + 0.2) * 0.5), -1.5707963267948966)),deltaTime)
  2218.             --LeftArm,-1,0,0,1,-175,-10,1.5,1,0.5,0,0,1,-90,5,0.6,1,0,0,0,1,-90,0,0,1,RightArm,1,0,0,1,180,-5,0,1,0.5,0,0,1,20,5,0.3,1,0,0,0,1,-110,5,1,1,Head,0,0,0,1,-75,-15,1.2,1,1,0,0,1,-0,5,0.2,0.5,0,0,0,1,-170,0,0,1,Torso,0,0,0,1,-5,10,1.2,1,5,-0.5,-0.2,1,-0,5,0,0.5,0,0.2,-1.2,1,180,0,0,1,LeftLeg,-1,0,0,1,80,7,1.5,1,-1,0,0,1,-70,5,0.2,0.5,0,0,0,1,90,0,0,1,RightLeg,1,0,0,1,110,7,1.5,1,-1,0,0,1,70,5,0.2,0.5,0,0,0,1,-90,0,0,1
  2219.         end,
  2220.         modeLeft = function()
  2221.             setWalkSpeed(16)
  2222.         end,
  2223.     })
  2224.     addmode("g", {
  2225.         idle = function()
  2226.             local Ychg=velYchg()/20
  2227.             LeftShoulder.C0 = Lerp(LeftShoulder.C0,cfMul(cf(-0.9 + 0.4 * sin(sine * 8), 0.5, 0.5 * sin((sine + 0.25) * 4)),angles(1.5707963267948966, -1.5707963267948966 + 1.0471975511965976 * sin(sine * 8), 1.5707963267948966 + 0.6981317007977318 * sin((sine + 0.25) * 4))),deltaTime)
  2228.             RootJoint.C0 = Lerp(RootJoint.C0,cfMul(cf(0.3 * sin((sine + 0.4) * 8), Ychg, 0),angles(-1.5707963267948966, 0.3490658503988659 * sin(sine * 8), -3.141592653589793)),deltaTime)
  2229.             Neck.C0 = Lerp(Neck.C0,cfMul(cf(0, 1, 0),angles(-1.5707963267948966 + 0.061086523819801536 * sin((sine + 0.125) * 16), -0.3839724354387525 * sin(sine * 8), -3.141592653589793)),deltaTime)
  2230.             RightHip.C0 = Lerp(RightHip.C0,cfMul(cf(1, -1 + 0.4 * sin((sine - 0.01) * 8)-Ychg, 0),angles(1.5707963267948966, 1.7453292519943295 + 0.6981317007977318 * sin(sine * 8), -1.5707963267948966)),deltaTime)
  2231.             LeftHip.C0 = Lerp(LeftHip.C0,cfMul(cf(-1, -1 - 0.4 * sin((sine - 0.01) * 8)-Ychg, 0),angles(1.5707963267948966, -1.7453292519943295 + 0.6981317007977318 * sin(sine * 8), 1.5707963267948966)),deltaTime)
  2232.             RightShoulder.C0 = Lerp(RightShoulder.C0,cfMul(cf(0.9 + 0.4 * sin(sine * 8), 0.5, -0.5 * sin((sine - 0.35) * 4)),angles(1.5707963267948966 + 0.6981317007977318 * sin(sine * 4), 1.5707963267948966 + 1.0471975511965976 * sin(sine * 8), -1.5707963267948966 + 0.17453292519943295 * sin((sine - 0.35) * 4))),deltaTime)
  2233.             --LeftArm,-0.9,0.4,0,8,90,0,0.25,4,0.5,0,0,8,-90,60,0,8,0,0.5,0.25,4,90,40,0.25,4,Torso,0,0.3,0.4,8,-90,0,0,8,0,0,0,4,0,20,0,8,0,0,0,8,-180,0,0,8,Head,0,0,0,8,-90,3.5,0.125,16,1,0,0,8,0,-22,0,8,0,0,0,8,-180,0,0,1.1,RightLeg,1,0,0,8,90,0,0,8,-1,0.4,-0.01,8,100,40,0,8,0,0,0,8,-90,0,0,8,LeftLeg,-1,0,0,8,90,0,0,8,-1,-0.4,-0.01,8,-100,40,0,8,0,0,0,8,90,0,0,8,RightArm,0.9,0.4,0,8,90,40,0,4,0.5,0,0,8,90,60,0,8,0,-0.5,-0.35,4,-90,10,-0.35,4
  2234.         end
  2235.     })
  2236.     addmode("h", {
  2237.         idle = function()
  2238.             local Ychg=velYchg()/20
  2239.             Neck.C0 = Lerp(Neck.C0,cfMul(cf(0, 1, 0),angles(-1.5707963267948966, -0.4363323129985824 * sin(sine * 8), -3.141592653589793)),deltaTime)
  2240.             RightHip.C0 = Lerp(RightHip.C0,cfMul(cf(1, -1 + 0.3 * sin(sine * 8)-Ychg, 0),angles(1.5707963267948966, 1.5707963267948966 + 0.5235987755982988 * sin(sine * 8), -1.5707963267948966)),deltaTime)
  2241.             LeftShoulder.C0 = Lerp(LeftShoulder.C0,cfMul(cf(-0.5, 1, 0),angles(-0.5235987755982988, -1.5707963267948966 - 0.5235987755982988 * sin(sine * 8), 3.141592653589793)),deltaTime)
  2242.             RightShoulder.C0 = Lerp(RightShoulder.C0,cfMul(cf(0.5, 1, 0),angles(-0.5235987755982988, 1.5707963267948966 - 0.5235987755982988 * sin(sine * 8), 3.141592653589793)),deltaTime)
  2243.             RootJoint.C0 = Lerp(RootJoint.C0,cfMul(cf(-0.1 * sin(sine * 8), 0.2 * sin((sine + 0.1) * 16)+Ychg, 0),angles(-1.5707963267948966, 0.2617993877991494 * sin(sine * 8), -3.141592653589793)),deltaTime)
  2244.             LeftHip.C0 = Lerp(LeftHip.C0,cfMul(cf(-1, -1 - 0.3 * sin(sine * 8)-Ychg, 0),angles(1.5707963267948966, -1.5707963267948966 + 0.5235987755982988 * sin(sine * 8), 1.5707963267948966)),deltaTime)
  2245.             --Head,0,0,0,8,-90,0,0,8,1,0,0,8,0,-25,0,8,0,0,0,8,-180,0,0,8,RightLeg,1,0,0,8,90,0,0,8,-1,0.3,0,8,90,30,0,8,0,0,0,8,-90,0,0,8,LeftArm,-0.5,0,0,8,-30,0,0,8,1,0,0,8,-90,-30,0,8,0,0,0,8,180,0,0,8,RightArm,0.5,0,0,8,-30,0,0,8,1,0,0,16,90,-30,0,8,0,0,0,8,180,0,0,8,Torso,0,-0.1,0,8,-90,0,0,8,0,0.2,0.1,16,0,15,0,8,0,0,0,8,-180,0,0,8,LeftLeg,-1,0,0,8,90,0,0,8,-1,-0.3,0,8,-90,30,0,8,0,0,0,8,90,0,0,8,Fedora_Handle,8.657480066176504e-09,0,0,8,-6,0,0,8,-0.15052366256713867,0,0,8,0,0,0,8,-0.010221302509307861,0,0,8,0,0,0,8
  2246.         end
  2247.     })
  2248.     addmode("j", {
  2249.         idle = function()
  2250.             local Ychg=velYchg()/20
  2251.             LeftHip.C0 = Lerp(LeftHip.C0,cfMul(cf(-0.8, -1, -0.1),angles(0.17453292519943295, -0.6981317007977318, 0)),deltaTime)
  2252.             LeftShoulder.C0 = Lerp(LeftShoulder.C0,cfMul(cf(-1.2, 0.5, 0),angles(-0.3490658503988659 + 0.08726646259971647 * sin((sine + 0.1) * 4), 0, 0.6981317007977318 + 0.08726646259971647 * sin((sine + 0.1) * 4))),deltaTime)
  2253.             RightHip.C0 = Lerp(RightHip.C0,cfMul(cf(1.1, -1, 0),angles(1.5707963267948966, 1.7453292519943295, -1.5707963267948966)),deltaTime)
  2254.             Neck.C0 = Lerp(Neck.C0,cfMul(cf(0, 1, 0),angles(-1.5707963267948966 + 0.08726646259971647 * sin((sine + 0.1) * 4), 0, 2.792526803190927)),deltaTime)
  2255.             RootJoint.C0 = Lerp(RootJoint.C0,cfMul(cf(0, -1.7 + 0.5 * sin(sine * 4)+Ychg, 0.15 * sin(sine * 4)),angles(3.3161255787892263 + 0.17453292519943295 * sin(sine * 4), 0, 3.6651914291880923)),deltaTime)
  2256.             RightShoulder.C0 = Lerp(RightShoulder.C0,cfMul(cf(0.8 + 0.4 * sin(sine * 4), 0.6 + 0.1 * sin(sine * 4), 0.4 - 0.25 * sin(sine * 4)),angles(2.9670597283903604, 2.2689280275926285 - 0.17453292519943295 * sin(sine * 4), -1.4835298641951802 - 0.17453292519943295 * sin(sine * 4))),deltaTime)
  2257.             --GalaxyBeautifulHair_Handle,-0.15000000596046448,0,0,1,0,0,0,1,0.10000000149011612,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,LeftLeg,-0.8,0,0,4,10,0,0,4,-1,0,0,4,-40,0,0,4,-0.1,0,0,4,0,0,0,4,LeftArm,-1.2,0,0,4,-20,5,0.1,4,0.5,0,0,4,0,0,0,4,0,0,0,4,40,5,0.1,4,Fedora_Handle,8.657480066176504e-09,0,0,1,-6,0,0,1,-0.15052366256713867,0,0,1,0,0,0,1,-0.010221302509307861,0,0,1,0,0,0,1,ValkyrieHelm_Handle,8.658389560878277e-09,0,0,1,-15,0,0,1,-0.2433757781982422,0,0,1,0,0,0,1,-0.2657628059387207,0,0,1,0,0,0,1,RightLeg,1.1,0,0,4,90,0,0,4,-1,0,0,4,100,0,0,4,0,0,0,4,-90,0,0,4,BlackIronAntlers_Handle,8.658389560878277e-09,0,0,1,0,0,0,1,-0.6500000953674316,0,0,1,0,0,0,1,0.19972775876522064,0,0,1,0,0,0,1,DevAwardsAdurite_Handle,0,0,0,1,0,0,0,1,-0.25,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,SilverthornAntlers_Handle,8.658389560878277e-09,0,0,1,0,0,0,1,-0.6500000953674316,0,0,1,0,0,0,1,0.19972775876522064,0,0,1,0,0,0,1,Head,0,0,0,4,-90,5,0.1,4,1,0,0,4,-0,0,0,4,0,0,0,4,160,0,0,4,Torso,0,0,0,4,190,10,0,4,-1.70,0.5,0,4,-0,0,0,4,0,0.15,0,4,210,0,0,4,RightArm,0.8,0.4,0,4,170,0,0,4,0.6,0.1,0,4,130,-10,0,4,0.4,-0.25,0,4,-85,-10,0,4
  2258.         end
  2259.     })
  2260.     addmode("k", {
  2261.         idle = function()
  2262.             local Ychg=velYchg()/20
  2263.             Neck.C0 = Lerp(Neck.C0,cfMul(cf(0, 1, 0),angles(-1.6580627893946132 - 0.08726646259971647 * sin((sine + 0.3333333333333333) * 12), -0.08726646259971647 * sin((sine + 0.2) * 6), 3.141592653589793)),deltaTime)
  2264.             LeftHip.C0 = Lerp(LeftHip.C0,cfMul(cf(-1, -0.5 - 0.5 * sin((sine + 0.39999999999999997) * 12)-Ychg, -0.5),angles(1.7453292519943295 - 1.0471975511965976 * sin(sine * 6), -1.5707963267948966 + 0.1308996938995747 * sin(sine * 6), 1.5707963267948966)),deltaTime)
  2265.             RightHip.C0 = Lerp(RightHip.C0,cfMul(cf(1, -0.5 - 0.5 * sin((sine + 0.39999999999999997) * 12)-Ychg, -0.5),angles(1.7453292519943295 + 1.0471975511965976 * sin(sine * 6), 1.5707963267948966 + 0.1308996938995747 * sin(sine * 6), -1.5707963267948966)),deltaTime)
  2266.             RootJoint.C0 = Lerp(RootJoint.C0,cfMul(cf(0, -0.5 + 0.3 * sin((sine + 0.16666666666666666) * 12)+Ychg, 0),angles(-1.3962634015954636 + 0.08726646259971647 * sin((sine + 0.3333333333333333) * 12), 0.08726646259971647 * sin((sine + 0.06666666666666667) * 6), 3.141592653589793)),deltaTime)
  2267.             LeftShoulder.C0 = Lerp(LeftShoulder.C0,cfMul(cf(-0.8 - 0.1 * sin(sine * 6), 0.5 + 0.1 * sin(sine * 6), -0.2),angles(3.141592653589793 - 0.17453292519943295 * sin((sine + 0.39999999999999997) * 12), -0.17453292519943295, 1.5707963267948966)),deltaTime)
  2268.             RightShoulder.C0 = Lerp(RightShoulder.C0,cfMul(cf(0.8 - 0.1 * sin(sine * 6), 0.5 - 0.1 * sin(sine * 6), -0.2),angles(3.141592653589793 - 0.17453292519943295 * sin((sine + 0.39999999999999997) * 12), 0.17453292519943295, -1.5707963267948966)),deltaTime)
  2269.             --GalaxyBeautifulHair_Handle,-0.15000000596046448,0,0,1.5,0,0,0,1.5,0.10000000149011612,0,0,1.5,0,0,0,1.5,0,0,0,1.5,0,0,0,1.5,Head,0,0,0,6,-95,-5,0.3333333333333333,12,1,0,0,6,-0,-5,0.2,6,0,0,0,6,180,0,0,6,ValkyrieHelm_Handle,8.658389560878277e-09,0,0,1.5,-15,0,0,1.5,-0.2433757781982422,0,0,1.5,0,0,0,1.5,-0.2657628059387207,0,0,1.5,0,0,0,1.5,SilverthornAntlers_Handle,8.658389560878277e-09,0,0,1.5,0,0,0,1.5,-0.6500000953674316,0,0,1.5,0,0,0,1.5,0.19972775876522064,0,0,1.5,0,0,0,1.5,BlackIronAntlers_Handle,8.658389560878277e-09,0,0,1.5,0,0,0,1.5,-0.6500000953674316,0,0,1.5,0,0,0,1.5,0.19972775876522064,0,0,1.5,0,0,0,1.5,Fedora_Handle,8.657480066176504e-09,0,0,1.5,-6,0,0,1.5,-0.15052366256713867,0,0,1.5,0,0,0,1.5,-0.010221302509307861,0,0,1.5,0,0,0,1.5,LeftLeg,-1,0,0,6,100,-60,0,6,-0.5,-0.5,0.39999999999999997,12,-90,7.5,0,6,-0.5,0,0,6,90,0,0,6,EyelessSmileHead_Handle,-0.00043487548828125,0,0,1.5,180,0,0,1.5,0.6000361442565918,0,0,1.5,0,0,0,1.5,0.0003204345703125,0,0,1.5,180,0,0,1.5,RightLeg,1,0,0,6,100,60,0,6,-0.5,-0.5,0.39999999999999997,12,90,7.5,0,6,-0.5,0,0,6,-90,0,0,6,DevAwardsAdurite_Handle,0,0,0,1.5,0,0,0,1.5,-0.25,0,0,1.5,0,0,0,1.5,0,0,0,1.5,0,0,0,1.5,Torso,0,0,0,6,-80,5,0.3333333333333333,12,-0.5,0.3,0.16666666666666666,12,-0,5,0.06666666666666667,6,0,0,0,6,180,0,0,6,LeftArm,-0.8,-0.1,0,6,180,-10,0.39999999999999997,12,0.5,0.1,0,6,-10,0,0,6,-0.2,0,0,6,90,0,0,6,RightArm,0.8,-0.1,0,6,180,-10,0.39999999999999997,12,0.5,-0.1,0,6,10,0,0,6,-0.2,0,0,6,-90,0,0,6
  2270.         end
  2271.     })
  2272.     local function idleL()
  2273.         local Ychg=velYchg()/20
  2274.         RightHip.C0=Lerp(RightHip.C0,cfMul(cf(1,-0.9+0.2*sin((sine - 0.2)*16)-Ychg,0.25),angles(0,0.7853981633974483,0.4363323129985824-1.1344640137963142*sin((sine-0.0875)*8))),deltaTime)
  2275.         RootJoint.C0=Lerp(RootJoint.C0,cfMul(cf(0.15 * sin((sine-0.1)*8),0.54 * sin(sine*16)+Ychg,0),angles(-1.5707963267948966,-0.08726646259971647*sin((sine-0.0785)*8),3.141592653589793-0.08726646259971647*sin((sine-0.0785)*8))),deltaTime)
  2276.         RightShoulder.C0=Lerp(RightShoulder.C0,cfMul(cf(0.75+0.07*sin((sine - 0.0785)*8),1.3+0.1*sin((sine - 0.0875)*16),0),angles(1.3962634015954636,2.356194490192345-0.06981317007977318*sin((sine-0.0785)*8),1.2217304763960306)),deltaTime)
  2277.         Neck.C0=Lerp(Neck.C0,cfMul(cf(0,1,0),angles(-1.5707963267948966+0.08726646259971647*sin((sine-0.1)*16),0.12217304763960307*sin((sine-0.0785)*8),3.141592653589793)),deltaTime)
  2278.         LeftHip.C0=Lerp(LeftHip.C0,cfMul(cf(-1,-0.9+0.2*sin((sine - 0.2)*16)-Ychg,0.25),angles(0,-0.7853981633974483,-0.4363323129985824-1.1344640137963142*sin((sine-0.0875)*8))),deltaTime)
  2279.         LeftShoulder.C0=Lerp(LeftShoulder.C0,cfMul(cf(-1,0.45+0.05*sin((sine - 0.0875)*16),-0.2),angles(2.0943951023931953+0.17453292519943295*sin((sine-0.0875)*16),-0.5235987755982988,1.5707963267948966+0.17453292519943295*sin((sine-0.0875)*16))),deltaTime)
  2280.         --MW_animatorProgressSave: RightLeg,1,0,0,16,0,0,0,8,-0.9,0.2,-0.2,16,45,0,-0.0875,8,0.25,0,0,16,25,-65,-0.0875,8,Fedora_Handle,8.657480066176504e-09,0,0,2,-6,0,0,2,-0.15052366256713867,0,0,2,0,0,0,2,-0.010221302509307861,0,0,2,0,0,0,2,Torso,0,0.15,-0.1,8,-90,0,0,16,0,0.54,0,16,-0,-5,-0.0785,8,0,0,0,16,180,-5,-0.0785,8,RightArm,0.75,0.07,-0.0785,8,80,0,0,16,1.3,0.1,-0.0875,16,135,-4,-0.0785,8,0,0,0,16,70,0,0,16,Head,0,0,0,16,-90,5,-0.1,16,1,0,0,16,-0,7,-0.0785,8,0,0,0,16,180,0,0,16,LeftLeg,-1,0,0,16,0,0,0,8,-0.9,0.2,-0.2,16,-45,0,0,8,0.25,0,0,16,-25,-65,-0.0875,8,Bandana_Handle,3.9362930692732334e-09,0,0,2,0,0,0,2,0.3000001907348633,0,0,2,0,0,0,2,-0.6002722978591919,0,0,2,0,0,0,2,LeftArm,-1,0,0,16,120,10,-0.0875,16,0.45,0.05,-0.0875,16,-30,0,0,16,-0.2,0,0,16,90,10,-0.0875,16
  2281.     end
  2282.     addmode("l", {
  2283.         modeEntered = function()
  2284.             setWalkSpeed(10)
  2285.         end,
  2286.         idle = idleL,
  2287.         walk = idleL,
  2288.         modeLeft = function()
  2289.             setWalkSpeed(16)
  2290.         end
  2291.     })
  2292. end)
  2293.  
  2294. btn("nameless animations V7", function()
  2295.     local t=reanimate()
  2296.     if type(t)~="table" then return end
  2297.     local raycastlegs=t.raycastlegs
  2298.     local velbycfrvec=t.velbycfrvec
  2299.     local velchgbycfrvec=t.velchgbycfrvec
  2300.     local addmode=t.addmode
  2301.     local getJoint=t.getJoint
  2302.     local RootJoint=getJoint("RootJoint")
  2303.     local RightShoulder=getJoint("Right Shoulder")
  2304.     local LeftShoulder=getJoint("Left Shoulder")
  2305.     local RightHip=getJoint("Right Hip")
  2306.     local LeftHip=getJoint("Left Hip")
  2307.     local Neck=getJoint("Neck")
  2308.  
  2309.     addmode("default", {
  2310.         idle = function()
  2311.             local rY, lY = raycastlegs()
  2312.  
  2313.             local Cfw, Crt = velchgbycfrvec()
  2314.  
  2315.             RightShoulder.C0 = Lerp(RightShoulder.C0,cfMul(cf(1, 0.3 + 0.1 * sin(sine * 2), -0.1),angles(-0.5235987755982988 + 0.05235987755982989 * sin((sine + 1.5) * 2), 1.0471975511965976 + 0.08726646259971647 * sin((sine + 0.5) * 2), 0.5235987755982988)),deltaTime)
  2316.             Neck.C0 = Lerp(Neck.C0,cfMul(cf(0, 1, 0),angles(-1.6580627893946132 + 0.08726646259971647 * sin((sine + 0.6) * 2), 0, 3.141592653589793 + 0.2617993877991494 * sin((sine - 1.2) * 1))),deltaTime)
  2317.             RootJoint.C0 = Lerp(RootJoint.C0,cfMul(cf(Crt * 3, 0.1 * sin(sine * 2), Cfw * -3),angles(-1.5707963267948966 + 0.08726646259971647 * sin(sine * 2) - Cfw, Crt, 3.141592653589793)),deltaTime)
  2318.             RightHip.C0 = Lerp(RightHip.C0,cfMul(cf(1, -1 - 0.1 * sin(sine * 2) + rY, 0.1 * sin(sine * 2) - rY * 0.5),angles(-0.6981317007977318 - 0.08726646259971647 * sin(sine * 2), 1.0471975511965976, 0.5235987755982988)),deltaTime)
  2319.             LeftShoulder.C0 = Lerp(LeftShoulder.C0,cfMul(cf(-1, 0.6 + 0.1 * sin(sine * 2), 0),angles(3.141592653589793 + 0.05235987755982989 * sin((sine + 0.5) * 2), -2.705260340591211 + 0.017453292519943295 * sin((sine + 1.5) * 2), -1.2217304763960306 + 0.05235987755982989 * sin((sine + 1.5) * 2))),deltaTime)
  2320.             LeftHip.C0 = Lerp(LeftHip.C0,cfMul(cf(-1, -1 - 0.1 * sin(sine * 2) + lY, 0.1 * sin(sine * 2) - lY * 0.5),angles(-0.3490658503988659 - 0.08726646259971647 * sin(sine * 2), -1.0471975511965976, -0.5235987755982988)),deltaTime)
  2321.             --RightArm,1,0,0,2,-30,3,1.5,2,0.3,0.1,0,2,60,5,0.5,2,-0.1,0,0,2,30,0,0,2,Head,0,0,0,2,-95,5,0.6,2,1,0,0,2,-0,0,0,1,0,0,0,2,180,15,-1.2,1,Torso,0,0,0,2,-90,5,0,2,0,0.1,0,2,-0,0,0,2,0,0,0,2,180,0,0,2,RightLeg,1,0,0,2,-40,-5,0,2,-1,-0.1,0,2,60,0,0,2,0,0.1,0,2,30,0,0,2,Meshes/TrollFaceHeadAccessory_Handle,0.01043701171875,0,0,1,0,0,0,1,0.43610429763793945,0,0,1,0,0,0,1,-0.01102447509765625,0,0,1,0,0,0,1,LeftArm,-1,0,0,2,180,3,0.5,2,0.6,0.1,0,2,-155,1,1.5,2,0,0,0,2,-70,3,1.5,2,LeftLeg,-1,0,0,2,-20,-5,0,2,-1,-0.1,0,2,-60,0,0,2,0,0.1,0,2,-30,0,0,2
  2322.         end,
  2323.         walk = function()
  2324.             local Vfw, Vrt = velbycfrvec()
  2325.  
  2326.             local rY, lY = raycastlegs()
  2327.  
  2328.             local Cfw, Crt = velchgbycfrvec()
  2329.  
  2330.             RootJoint.C0 = Lerp(RootJoint.C0,cfMul(cf(Crt * 3, -0.2 + 0.2 * sin(sine * 16), Cfw * -3),angles(-1.6580627893946132 + 0.04363323129985824 * sin(sine * 16) - Vfw * 0.15 - Cfw, 0.03490658503988659 * sin(sine * 8) + Vrt * 0.15 + Crt, -3.141592653589793 - 0.08726646259971647 * sin((sine + 0.25) * 8) - Vrt * 0.1)),deltaTime)
  2331.             RightHip.C0 = Lerp(RightHip.C0,cfMul(cf(1, -0.8 + 0.4 * sin((sine + 0.125) * 8) + rY, -0.15 * Vfw + 0.4 * sin((sine + 10) * 8) * Vfw + rY * -0.5),angles(1.3962634015954636 + 0.6981317007977318 * sin(sine * 8)*Vfw, 1.5707963267948966 + 0.6981317007977318 * sin(sine * 8)*Vrt, -1.5707963267948966 + 0.2617993877991494 * sin(sine * 8))),deltaTime)
  2332.             LeftShoulder.C0 = Lerp(LeftShoulder.C0,cfMul(cf(-1, 0.35 - 0.1 * sin(sine * 8), 0),angles(0.5235987755982988 * sin(sine * 8)*Vfw, -1.5707963267948966 - 0.5235987755982988 * sin(sine * 8)*Vfw, -0.5235987755982988 * sin(sine * 8)*Vfw)),deltaTime)
  2333.             RightShoulder.C0 = Lerp(RightShoulder.C0,cfMul(cf(1, 0.35 + 0.1 * sin(sine * 8), 0),angles(-0.5235987755982988 * sin(sine * 8)*Vfw, 1.5707963267948966 - 0.5235987755982988 * sin(sine * 8)*Vfw, -0.5235987755982988 * sin(sine * 8)*Vfw)),deltaTime)
  2334.             LeftHip.C0 = Lerp(LeftHip.C0,cfMul(cf(-1, -0.8 - 0.4 * sin((sine + 0.125) * 8) + lY, -0.15 * Vfw - 0.4 * sin((sine + 10) * 8) * Vfw + lY * -0.5),angles(1.3962634015954636 - 0.6981317007977318 * sin(sine * 8)*Vfw, -1.5707963267948966 - 0.6981317007977318 * sin(sine * 8)*Vrt, 1.5707963267948966 + 0.2617993877991494 * sin(sine * 8))),deltaTime)
  2335.             Neck.C0 = Lerp(Neck.C0,cfMul(cf(0, 1, 0),angles(-1.5707963267948966 + 0.08726646259971647 * sin((sine + 10) * 16) + Vfw * 0.15, -0.08726646259971647 * sin(sine * 8) + Vrt * -0.1, 3.141592653589793 - 0.05235987755982989 * sin((sine + 5) * 8) - Vrt * 0.5)),deltaTime)
  2336.             --Torso,0,0,0,8,-95,2.5,0,16,-0.2,0.2,0,16,0,5,0,8,0,0,0,8,-180,-5,0.25,8,RightArm,1,0,0,1,0,-30,0,8,0.35,0.1,0,8,90,-30,0,8,0,0,0,8,0,-30,0,8,RightLeg,1,0,0,8,80,40,0,8,-0.8,0.4,0.125,8,90,40,0,8,-0.15,0.4,10,8,-90,15,0,8,LeftLeg,-1,0,0,8,80,-40,0,8,-0.8,-0.4,0.125,8,-90,-40,0,8,-0.15,-0.4,10,8,90,15,0,8,Head,0,0,0,1,-90,2.5,10,16,1,0,0,1,-0,-5,0,8,0,0,0,1,180,-3,5,8,LeftArm,-1,0,0,1,0,30,0,8,0.35,-0.1,0,8,-90,-30,0,8,0,-0.4,0,8,0,-30,0,8
  2337.         end,
  2338.         jump = function()
  2339.             local Vfw, Vrt = velbycfrvec()
  2340.  
  2341.             local Cfw, Crt = velchgbycfrvec()
  2342.  
  2343.             RootJoint.C0 = Lerp(RootJoint.C0,cfMul(cf(Crt * 3, 0, Cfw * -3),angles(-1.4835298641951802 + Vfw * 0.1 - Cfw, Vrt * -0.05 + Crt, -3.141592653589793)),deltaTime)
  2344.             RightShoulder.C0 = Lerp(RightShoulder.C0,cfMul(cf(1, 0.5, 0),angles(4.014257279586958 - 0.08726646259971647 * sin((sine + 0.5) * 4), 1.7453292519943295 + 0.08726646259971647 * sin((sine + 0.25) * 4), -1.5707963267948966)),deltaTime)
  2345.             LeftHip.C0 = Lerp(LeftHip.C0,cfMul(cf(-1, -1, 0),angles(1.5707963267948966 - 0.08726646259971647 * sin((sine + 0.5) * 4), -1.6580627893946132 + 0.06981317007977318 * sin((sine + 0.25) * 4), 1.5707963267948966)),deltaTime)
  2346.             LeftShoulder.C0 = Lerp(LeftShoulder.C0,cfMul(cf(-1, 0.5, 0),angles(4.014257279586958 - 0.08726646259971647 * sin((sine + 0.5) * 4), -1.7453292519943295 - 0.08726646259971647 * sin((sine + 0.25) * 4), 1.5707963267948966)),deltaTime)
  2347.             Neck.C0 = Lerp(Neck.C0,cfMul(cf(0, 1, 0),angles(-1.3962634015954636, 0, -3.141592653589793 - Vrt)),deltaTime)
  2348.             RightHip.C0 = Lerp(RightHip.C0,cfMul(cf(1, -1, 0),angles(1.5707963267948966 - 0.08726646259971647 * sin((sine + 0.5) * 4), 1.6580627893946132 - 0.06981317007977318 * sin((sine + 0.25) * 4), -1.5707963267948966)),deltaTime)
  2349.             --Torso,0,0,0,4,-85,0,0,4,0,0,0,4,0,0,0,4,0,0,0,4,-180,0,0,4,RightArm,1,0,0,4,230,-5,0.5,4,0.5,0,0,4,100,5,0.25,4,0,0,0,4,-90,0,0,4,LeftLeg,-1,0,0,4,90,-5,0.5,4,-1,0,0,4,-95,4,0.25,4,0,0,0,4,90,0,0,4,LeftArm,-1,0,0,4,230,-5,0.5,4,0.5,0,0,4,-100,-5,0.25,4,0,0,0,4,90,0,0,4,Head,0,0,0,4,-80,0,0.5,4,1,0,0,4,0,0,0.25,4,0,0,0,4,-180,0,0,4,RightLeg,1,0,0,4,90,-5,0.5,4,-1,0,0,4,95,-4,0.25,4,0,0,0,4,-90,0,0,4
  2350.         end,
  2351.         fall = function()
  2352.             local Vfw, Vrt = velbycfrvec()
  2353.  
  2354.             local Cfw, Crt = velchgbycfrvec()
  2355.  
  2356.             RootJoint.C0 = Lerp(RootJoint.C0,cfMul(cf(Crt * 3, 0, Cfw * -3),angles(-1.6580627893946132 + Vfw * 0.1 - Cfw, Vrt * -0.05 + Crt, -3.141592653589793)),deltaTime)
  2357.             RightShoulder.C0 = Lerp(RightShoulder.C0,cfMul(cf(1, 0.5, 0),angles(4.014257279586958 - 0.08726646259971647 * sin((sine + 0.5) * 4), 1.7453292519943295 + 0.08726646259971647 * sin((sine + 0.25) * 4), -1.5707963267948966)),deltaTime)
  2358.             LeftHip.C0 = Lerp(LeftHip.C0,cfMul(cf(-1, -1, 0),angles(1.5707963267948966 - 0.08726646259971647 * sin((sine + 0.5) * 4), -1.6580627893946132 + 0.06981317007977318 * sin((sine + 0.25) * 4), 1.5707963267948966)),deltaTime)
  2359.             LeftShoulder.C0 = Lerp(LeftShoulder.C0,cfMul(cf(-1, 0.5, 0),angles(4.014257279586958 - 0.08726646259971647 * sin((sine + 0.5) * 4), -1.7453292519943295 - 0.08726646259971647 * sin((sine + 0.25) * 4), 1.5707963267948966)),deltaTime)
  2360.             Neck.C0 = Lerp(Neck.C0,cfMul(cf(0, 1, 0),angles(-1.7453292519943295, 0, -3.141592653589793 - Vrt)),deltaTime)
  2361.             RightHip.C0 = Lerp(RightHip.C0,cfMul(cf(1, -1, 0),angles(1.5707963267948966 - 0.08726646259971647 * sin((sine + 0.5) * 4), 1.6580627893946132 - 0.06981317007977318 * sin((sine + 0.25) * 4), -1.5707963267948966)),deltaTime)
  2362.             --Torso,0,0,0,4,-95,0,0,4,0,0,0,4,0,0,0,4,0,0,0,4,-180,0,0,4,RightArm,1,0,0,4,230,-5,0.5,4,0.5,0,0,4,100,5,0.25,4,0,0,0,4,-90,0,0,4,LeftLeg,-1,0,0,4,90,-5,0.5,4,-1,0,0,4,-95,4,0.25,4,0,0,0,4,90,0,0,4,LeftArm,-1,0,0,4,230,-5,0.5,4,0.5,0,0,4,-100,-5,0.25,4,0,0,0,4,90,0,0,4,Head,0,0,0,4,-100,0,0.5,4,1,0,0,4,0,0,0.25,4,0,0,0,4,-180,0,0,4,RightLeg,1,0,0,4,90,-5,0.5,4,-1,0,0,4,95,-4,0.25,4,0,0,0,4,-90,0,0,4
  2363.         end
  2364.     })
  2365.  
  2366.     addmode("q", {
  2367.         idle = function()
  2368.             local Cfw, Crt = velchgbycfrvec()
  2369.  
  2370.             LeftShoulder.C0 = Lerp(LeftShoulder.C0,cfMul(cf(-1, 0.75, -0.2),angles(2.705260340591211 - 0.08726646259971647 * sin((sine + 0.1) * 2), -2.792526803190927, -0.6981317007977318)),deltaTime)
  2371.             RightShoulder.C0 = Lerp(RightShoulder.C0,cfMul(cf(1, 0.75, -0.2),angles(2.705260340591211 - 0.08726646259971647 * sin((sine + 0.1) * 2), 2.792526803190927, 0.6981317007977318)),deltaTime)
  2372.             Neck.C0 = Lerp(Neck.C0,cfMul(cf(0, 1, 0),angles(-1.9198621771937625 - 0.10471975511965978 * sin((sine + 0.3) * 2), 0, 3.141592653589793)),deltaTime)
  2373.             RootJoint.C0 = Lerp(RootJoint.C0,cfMul(cf(Crt * 3, -2.45 - 0.05 * sin(sine * 2), Cfw * -3),angles(0.03490658503988659 * sin(sine * 2) - Cfw, Crt, 3.141592653589793)),deltaTime)
  2374.             RightHip.C0 = Lerp(RightHip.C0,cfMul(cf(1, -1, 0),angles(1.3962634015954636 - 0.03490658503988659 * sin(sine * 2), 1.3089969389957472, -0.9599310885968813)),deltaTime)
  2375.             LeftHip.C0 = Lerp(LeftHip.C0,cfMul(cf(-1, -1, 0),angles(1.5707963267948966 - 0.03490658503988659 * sin(sine * 2), -1.3089969389957472, 1.5707963267948966)),deltaTime)
  2376.             --LeftArm,-1,0,0,2,155,-5,0.1,2,0.75,0,0,2,-160,0,0,2,-0.2,0,0,2,-40,0,0,2,RightArm,1,0,0,2,155,-5,0.1,2,0.75,0,0,2,160,0,0,2,-0.2,0,0,2,40,0,0,2,Head,0,0,0,2,-110,-6,0.3,2,1,0,0,2,-0,0,0,2,0,0,0,2,180,0,0,2,Torso,0,0,0,2,0,2,0,2,-2.45,-0.05,0,2,-0,0,0,2,0,0,0,2,180,0,0,2,RightLeg,1,0,0,2,80,-2,0,2,-1,0,0,2,75,0,0,2,0,0,0,2,-55,0,0,2,LeftLeg,-1,0,0,2,90,-2,0,2,-1,0,0,2,-75,0,0,2,0,0,0,2,90,0,0,2
  2377.         end
  2378.     })
  2379.     addmode("e", {
  2380.         idle = function()
  2381.             local Cfw, Crt = velchgbycfrvec()
  2382.  
  2383.             LeftShoulder.C0 = Lerp(LeftShoulder.C0,cfMul(cf(-0.9, 0.4 + 0.1 * sin(sine * 2), 0.3 - 0.15 * sin(sine * 2)),angles(-1.0471975511965976 - 0.12217304763960307 * sin(sine * 2), -1.3962634015954636, -0.6981317007977318)),deltaTime)
  2384.             RootJoint.C0 = Lerp(RootJoint.C0,cfMul(cf(Crt * 3, -1.85 - 0.1 * sin((sine + 0.2) * 2), Cfw * -3),angles(-1.3962634015954636 + 0.03490658503988659 * sin(sine * 2) - Cfw, -0.08726646259971647 + Crt, 3.141592653589793)),deltaTime)
  2385.             RightShoulder.C0 = Lerp(RightShoulder.C0,cfMul(cf(1, 0.4 + 0.1 * sin(sine * 2), 0.2 - 0.15 * sin(sine * 2)),angles(0.6108652381980153 - 0.12217304763960307 * sin(sine * 2), 1.2217304763960306, -0.7853981633974483)),deltaTime)
  2386.             Neck.C0 = Lerp(Neck.C0,cfMul(cf(0, 1, 0),angles(-1.6580627893946132 - 0.03490658503988659 * sin((sine + 0.6) * 2), 0.10471975511965978 + 0.06981317007977318 * sin(sine * 0.66), 3.141592653589793 + 0.3490658503988659 * sin(sine * 0.66))),deltaTime)
  2387.             RightHip.C0 = Lerp(RightHip.C0,cfMul(cf(1, 0.2 + 0.15 * sin((sine + 0.2) * 2), -0.7 + 0.1 * sin(sine * 2)),angles(1.4835298641951802 + 0.03490658503988659 * sin(sine * 2), 1.4835298641951802, -1.5707963267948966)),deltaTime)
  2388.             LeftHip.C0 = Lerp(LeftHip.C0,cfMul(cf(-1, -0.75 + 0.1 * sin((sine + 0.2) * 2), -0.5),angles(1.3962634015954636 - 0.03490658503988659 * sin(sine * 2), -1.6580627893946132, 0)),deltaTime)
  2389.             --LeftArm,-0.9,0,0,2,-60,-7,0,2,0.4,0.1,0,2,-80,0,0,2,0.3,-0.15,0,2,-40,0,0,2,Torso,0,0,0,2,-80,2,0,2,-1.85,-0.1,0.2,2,-5,0,0,2,0,0,0,2,180,0,0,2,RightArm,1,0,0,2,35,-7,0,2,0.4,0.1,0,2,70,0,0,2,0.2,-0.15,0,2,-45,0,0,2,Head,0,0,0,2,-95,-2,0.6,2,1,0,0,2,6,4,0,0.66,0,0,0,2,180,20,0,0.66,RightLeg,1,0,0,2,85,2,0,2,0.2,0.15,0.2,2,85,0,0,2,-0.7,0.1,0,2,-90,0,0,2,LeftLeg,-1,0,0,2,80,-2,0,2,-0.75,0.1,0.2,2,-95,0,0,2,-0.5,0,0,2,0,0,0,2
  2390.         end
  2391.     })
  2392.     addmode("r", {
  2393.         idle = function()
  2394.             local Cfw, Crt = velchgbycfrvec()
  2395.  
  2396.             RightHip.C0 = Lerp(RightHip.C0,cfMul(cf(1, -0.9 - 0.2 * sin(sine * 2), 0),angles(1.5707963267948966, 1.6580627893946132 - 0.17453292519943295 * sin(sine + 0.8), -1.5707963267948966)),deltaTime)
  2397.             RootJoint.C0 = Lerp(RootJoint.C0,cfMul(cf(0.3 * sin(sine + 0.8) + Crt * 3, -0.1 + 0.2 * sin(sine * 2), Cfw * -3),angles(-1.5707963267948966 - Cfw, Crt, -3.141592653589793)),deltaTime)
  2398.             Neck.C0 = Lerp(Neck.C0,cfMul(cf(0, 1, 0),angles(-1.5707963267948966 + 0.08726646259971647 * sin((sine - 0.5) * 2), 0.08726646259971647 * sin(sine - 1), -3.141592653589793 + 0.2617993877991494 * sin(sine * 5))),deltaTime)
  2399.             LeftShoulder.C0 = Lerp(LeftShoulder.C0,cfMul(cf(-1 + 0.1 * sin(sine * 7), 0.2 - 0.1 * sin(sine + 0.8), -0.25),angles(1.5707963267948966 + 0.5235987755982988 * sin(sine * 7), -0.6981317007977318, 0.3490658503988659 * sin(sine * 7))),deltaTime)
  2400.             LeftHip.C0 = Lerp(LeftHip.C0,cfMul(cf(-1, -0.9 - 0.2 * sin(sine * 2), 0),angles(1.5707963267948966, -1.6580627893946132 - 0.17453292519943295 * sin(sine + 0.8), 1.5707963267948966)),deltaTime)
  2401.             RightShoulder.C0 = Lerp(RightShoulder.C0,cfMul(cf(1 + 0.1 * sin(sine * 7), 0.2 + 0.1 * sin(sine + 0.8), -0.25),angles(1.5707963267948966 - 0.5235987755982988 * sin(sine * 7), 0.6981317007977318, 0.3490658503988659 * sin(sine * 7))),deltaTime)
  2402.             --RightLeg,1,0,0,1,90,0,0,1,-0.9,-0.2,0,2,95,-10,0.8,1,0,0,0,1,-90,0,0,1,Torso,0,0.3,0.8,1,-90,0,0,1,-0.1,0.2,0,2,0,0,0,1,0,0,0,1,-180,0,0,1,Head,0,0,0,1,-90,5,-0.5,2,1,0,0,1,0,5,-1,1,0,0,0,1,-180,15,0,5,Fedora_Handle,8.657480066176504e-09,0,0,1,-6,0,0,1,-0.15052366256713867,0,0,1,0,0,0,1,-0.010221302509307861,0,0,1,0,0,0,1,LeftArm,-1,0.1,0,7,90,30,0,7,0.2,-0.1,0.8,1,-40,0,0,1,-0.25,0,0,1,0,20,0,7,LeftLeg,-1,0,0,1,90,0,0,1,-0.9,-0.2,0,2,-95,-10,0.8,1,0,0,0,1,90,0,0,1,RightArm,1,0.1,0,7,90,-30,0,7,0.2,0.1,0.8,1,40,0,0,1,-0.25,0,0,1,-0,20,0,7
  2403.         end
  2404.     })
  2405.     addmode("t", {
  2406.         idle = function()
  2407.             local Cfw, Crt = velchgbycfrvec()
  2408.  
  2409.             LeftShoulder.C0 = Lerp(LeftShoulder.C0,cfMul(cf(-1, 0.5, 0),angles(1.5707963267948966, -1.6580627893946132 + 0.08726646259971647 * sin((sine - 0.3) * 4), 1.5707963267948966)),deltaTime)
  2410.             RightShoulder.C0 = Lerp(RightShoulder.C0,cfMul(cf(1 + 0.15 * sin((sine - 0.4) * 4), 1.42, 0),angles(1.5707963267948966, 1.4835298641951802 - 0.3490658503988659 * sin((sine - 0.4) * 4), 1.5707963267948966)),deltaTime)
  2411.             Neck.C0 = Lerp(Neck.C0,cfMul(cf(0, 1, 0),angles(-1.4835298641951802, 0.04363323129985824 - 0.08726646259971647 * sin((sine + 0.1) * 4), -3.141592653589793 + 0.04363323129985824 * sin(sine * 4))),deltaTime)
  2412.             RootJoint.C0 = Lerp(RootJoint.C0,cfMul(cf(0.1 * sin(sine * 4) + Crt * 3, 0, Cfw * -3),angles(-1.5707963267948966 - Cfw, -0.08726646259971647 + 0.08726646259971647 * sin(sine * 4) + Crt, -3.141592653589793)),deltaTime)
  2413.             RightHip.C0 = Lerp(RightHip.C0,cfMul(cf(1, -1.1 + 0.1 * sin(sine * 4), 0),angles(1.5707963267948966, 1.5707963267948966 + 0.08726646259971647 * sin(sine * 4), -1.5707963267948966)),deltaTime)
  2414.             LeftHip.C0 = Lerp(LeftHip.C0,cfMul(cf(-1 - 0.02 * sin(sine * 4), -0.925 - 0.07 * sin(sine * 4), 0),angles(1.5707963267948966, -1.7453292519943295 + 0.08726646259971647 * sin(sine * 4), 1.5707963267948966)),deltaTime)
  2415.             --LeftArm,-1,0,0,4,90,0,0,4,0.5,0,0,4,-95,5,-0.3,4,0,0,0,4,90,0,0,4,RightArm,1,0.15,-0.4,4,90,0,0,4,1.42,0,0,4,85,-20,-0.4,4,0,0,0,4,90,0,0,4,Head,0,0,0,4,-85,0,0,4,1,0,0,4,2.5,-5,0.1,4,0,0,0,4,-180,2.5,0,4,Torso,0,0.1,0,4,-90,0,0,4,0,0,0,4,-5,5,0,4,0,0,0,4,-180,0,0,4,RightLeg,1,0,0,4,90,0,0,4,-1.1,0.1,0,4,90,5,0,4,0,0,0,4,-90,0,0,4,LeftLeg,-1,-0.02,0,4,90,0,0,4,-0.925,-0.07,0,4,-100,5,0,4,0,0,0,4,90,0,0,4
  2416.         end
  2417.     })
  2418.     addmode("y", {
  2419.         idle = function()
  2420.             local Cfw, Crt = velchgbycfrvec()
  2421.  
  2422.             LeftShoulder.C0 = Lerp(LeftShoulder.C0,cfMul(cf(-1.5, 0.5, 0),angles(-1.7453292519943295, 0.17453292519943295 - 0.04363323129985824 * sin(sine * 2), -1.4835298641951802)),deltaTime)
  2423.             RightHip.C0 = Lerp(RightHip.C0,cfMul(cf(1, -0.9000000953674316 - 0.1 * sin(sine * 2), 0),angles(-1.3962634015954636, 1.3962634015954636, 1.5707963267948966)),deltaTime)
  2424.             LeftHip.C0 = Lerp(LeftHip.C0,cfMul(cf(-1, -1.0000001192092896 - 0.1 * sin(sine * 2), 0),angles(-1.5707963267948966, -1.3962634015954636, -1.5707963267948966)),deltaTime)
  2425.             Neck.C0 = Lerp(Neck.C0,cfMul(cf(0, 1, 0),angles(-2.0943951023931953 + 0.08726646259971647 * sin((sine - 1) * 2), -0.08726646259971647, 2.792526803190927)),deltaTime)
  2426.             RightShoulder.C0 = Lerp(RightShoulder.C0,cfMul(cf(1, 1.2000000476837158, 0),angles(2.6179938779914944 + 0.08726646259971647 * sin((sine - 1) * 2), 0.6981317007977318, -1.3962634015954636)),deltaTime)
  2427.             RootJoint.C0 = Lerp(RootJoint.C0,cfMul(cf(Crt * 3, 0.1 * sin(sine * 2), Cfw * -3),angles(-1.6580627893946132 - Cfw, 0.08726646259971647 + Crt, 3.0543261909900767)),deltaTime)
  2428.             --LeftArm,-1.5,0,0,2,-100,0,0,2,0.5,0,0,2,10,-2.5,0,2,0,0,0,2,-85,0,0,2,RightLeg,1,0,0,2,-80,0,0,2,-0.9000000953674316,-0.1,0,2,80,0,0,2,0,0,0,2,90,0,0,2,LeftLeg,-1,0,0,2,-90,0,0,2,-1.0000001192092896,-0.1,0,2,-80,0,0,2,0,0,0,2,-90,0,0,2,Fedora_Handle,8.657480066176504e-09,0,0,2,-6,0,0,2,-0.15052366256713867,0,0,2,0,0,0,2,-0.010221302509307861,0,0,2,0,0,0,2,Head,0,0,0,2,-120,5,-1,2,1,0,0,2,-5,0,0,2,0,0,0,2,160,0,0,2,RightArm,1,0,0,2,150,5,-1,2,1.2000000476837158,0,0,2,40,0,0,2,0,0,0,2,-80,0,0,2,Torso,0,0,0,2,-95,0,0,2,0,0.1,0,2,5,0,0,2,0,0,0,2,175,0,0,2
  2429.         end
  2430.     })
  2431.     addmode("u", {
  2432.         idle = function()
  2433.             local Cfw, Crt = velchgbycfrvec()
  2434.  
  2435.             RootJoint.C0 = Lerp(RootJoint.C0,cfMul(cf(Crt * 3, 0.75 + 0.25 * sin(sine * 2), Cfw * -3),angles(-1.5707963267948966 - Cfw, Crt, 3.141592653589793)),deltaTime)
  2436.             Neck.C0 = Lerp(Neck.C0,cfMul(cf(0, 1.5 - 0.1 * sin((sine + 0.2) * 2), 0),angles(-1.5707963267948966 - 0.08726646259971647 * sin((sine + 0.4) * 2), 0, 3.141592653589793 + 0.3490658503988659 * sin(sine * 0.66))),deltaTime)
  2437.             LeftHip.C0 = Lerp(LeftHip.C0,cfMul(cf(-0.5 - 1 * sin((sine + 0.2) * 2.2), -0.75 - 0.25 * sin(sine * 2), 1 * sin((sine + 0.95) * 2.2)),angles(0, -1.5707963267948966, 0)),deltaTime)
  2438.             RightHip.C0 = Lerp(RightHip.C0,cfMul(cf(0.5 + 1 * sin((sine + 0.2) * 2.2), -0.75 - 0.25 * sin(sine * 2), -1 * sin((sine + 0.95) * 2.2)),angles(0, 1.5707963267948966, 0)),deltaTime)
  2439.             RightShoulder.C0 = Lerp(RightShoulder.C0,cfMul(cf(-0.5 - 1.85 * sin(sine * 2), 0.8 - 0.5 * sin(sine * 2), -1.85 * sin((sine + 0.75) * 2)),angles(0, 1.5707963267948966, 0)),deltaTime)
  2440.             LeftShoulder.C0 = Lerp(LeftShoulder.C0,cfMul(cf(0.5 + 1.85 * sin(sine * 2), 0.8 - 0.5 * sin(sine * 2), 1.85 * sin((sine + 0.75) * 2)),angles(0, -1.5707963267948966, 0)),deltaTime)
  2441.             --Torso,0,0,0,2,-90,0,0,2,0.75,0.25,0,2,-0,0,0,2,0,0,0,2,180,0,0,2,Fedora_Handle,8.657480066176504e-09,0,0,2,-6,0,0,2,-0.15052366256713867,0,0,2,0,0,0,2,-0.010221302509307861,0,0,2,0,0,0,2,Head,0,0,0,2,-90,-5,0.4,2,1.5,-0.1,0.2,2,-0,0,0,2,0,0,0,2,180,20,0,0.66,LeftLeg,-0.5,-1,0.2,2.2,-0,0,0,2,-0.75,-0.25,0,2,-90,0,0,2,0,1,0.95,2.2,0,0,0,2,RightLeg,0.5,1,0.2,2.2,0,0,0,2,-0.75,-0.25,0,2,90,0,0,2,0,-1,0.95,2.2,0,0,0,2,RightArm,-0.5,-1.85,0,2,0,0,0,2,0.8,-0.5,0,2,90,0,0,2,0,-1.85,0.75,2,0,0,0,2,LeftArm,0.5,1.85,0,2,-0,0,0,2,0.8,-0.5,0,2,-90,0,0,2,0,1.85,0.75,2,0,0,0,2
  2442.         end
  2443.     })
  2444.     addmode("i", {
  2445.         idle = function()
  2446.             local Cfw, Crt = velchgbycfrvec()
  2447.  
  2448.             LeftShoulder.C0 = Lerp(LeftShoulder.C0,cfMul(cf(-0.5, 0.5 + 0.1 * sin((sine - 0.4444444444444444) * 9), 0),angles(2.9670597283903604 + 0.17453292519943295 * sin((sine - 0.17777777777777778) * 9), -0.5235987755982988, 1.5707963267948966 + 0.17453292519943295 * sin(sine * 4.5))),deltaTime)
  2449.             LeftHip.C0 = Lerp(LeftHip.C0,cfMul(cf(-1, -0.5 + 0.1 * sin((sine + 0.26666666666666666) * 4.5), -0.5),angles(1.7453292519943295 - 1.0471975511965976 * sin(sine * 4.5), -1.5707963267948966 + 0.03490658503988659 * sin(sine * 4.5), 1.5707963267948966)),deltaTime)
  2450.             RootJoint.C0 = Lerp(RootJoint.C0,cfMul(cf(Crt * 3, -0.5 + 0.5 * sin((sine + 0.17777777777777778) * 9), Cfw * -3),angles(-1.3962634015954636 - 0.03490658503988659 * sin((sine + 0.17777777777777778) * 9) - Cfw, -0.05235987755982989 * sin(sine * 4.5) + Crt, 3.141592653589793 + 0.03490658503988659 * sin(sine * 4.5))),deltaTime)
  2451.             Neck.C0 = Lerp(Neck.C0,cfMul(cf(0, 1 + 0.2 * sin(sine * 9), 0),angles(-1.5707963267948966 + 0.08726646259971647 * sin(sine * 9), 0.08726646259971647 * sin(sine * 4.5), 3.141592653589793 - 0.06981317007977318 * sin(sine * 4.5))),deltaTime)
  2452.             RightShoulder.C0 = Lerp(RightShoulder.C0,cfMul(cf(0.5, 0.5 + 0.1 * sin((sine - 0.4444444444444444) * 9), 0),angles(2.9670597283903604 + 0.17453292519943295 * sin((sine - 0.17777777777777778) * 9), 0.5235987755982988, -1.5707963267948966 + 0.17453292519943295 * sin(sine * 4.5))),deltaTime)
  2453.             RightHip.C0 = Lerp(RightHip.C0,cfMul(cf(1, -0.5 + 0.1 * sin((sine - 0.26666666666666666) * 4.5), -0.5),angles(1.7453292519943295 + 1.0471975511965976 * sin(sine * 4.5), 1.5707963267948966 + 0.03490658503988659 * sin(sine * 4.5), -1.5707963267948966)),deltaTime)
  2454.             --LeftArm,-0.5,0,0,4.5,170,10,-0.17777777777777778,9,0.5,0.1,-0.4444444444444444,9,-30,0,0,4.5,0,0,0,4.5,90,10,0,4.5,LeftLeg,-1,0,0,4.5,100,-60,0,4.5,-0.5,0.1,0.26666666666666666,4.5,-90,2,0,4.5,-0.5,0,0,4.5,90,0,0,4.5,Torso,0,0,0,4.5,-80,-2,0.17777777777777778,9,-0.5,0.5,0.17777777777777778,9,-0,-3,0,4.5,0,0,0,4.5,180,2,0,4.5,Head,0,0,0,4.5,-90,5,0,9,1,0.2,0,9,-0,5,0,4.5,0,0,0,4.5,180,-4,0,4.5,RightArm,0.5,0,0,4.5,170,10,-0.17777777777777778,9,0.5,0.1,-0.4444444444444444,9,30,0,0,4.5,0,0,0,4.5,-90,10,0,4.5,RightLeg,1,0,0,4.5,100,60,0,4.5,-0.5,0.1,-0.26666666666666666,4.5,90,2,0,4.5,-0.5,0,0,4.5,-90,0,0,4.5
  2455.         end,
  2456.     })
  2457.     addmode("o", {
  2458.         idle = function()
  2459.             local rY, lY = raycastlegs()
  2460.  
  2461.             local Cfw, Crt = velchgbycfrvec()
  2462.  
  2463.             LeftHip.C0 = Lerp(LeftHip.C0,cfMul(cf(-1, -1 + lY, lY * -0.5),angles(-1.8325957145940461 - 0.08726646259971647 * sin(sine * 2), -1.4835298641951802, -1.5707963267948966)),deltaTime)
  2464.             RootJoint.C0 = Lerp(RootJoint.C0,cfMul(cf(Crt, 0, 0.09 * sin(sine * 2) - Cfw * 3),angles(-1.3962634015954636 + 0.08726646259971647 * sin(sine * 2) - Cfw, -0.08726646259971647 + Crt, 3.141592653589793)),deltaTime)
  2465.             LeftShoulder.C0 = Lerp(LeftShoulder.C0,cfMul(cf(-1, 0.5, 0),angles(2.9670597283903604 + 0.08726646259971647 * sin(sine * 1), -1.5707963267948966 + 0.08726646259971647 * sin((sine + 0.6) * 1), 1.5707963267948966)),deltaTime)
  2466.             RightHip.C0 = Lerp(RightHip.C0,cfMul(cf(1, -1.1 + rY, rY * -0.5),angles(-1.7453292519943295 - 0.08726646259971647 * sin(sine * 2), 1.5707963267948966, 1.5707963267948966)),deltaTime)
  2467.             Neck.C0 = Lerp(Neck.C0,cfMul(cf(0, 1, 0),angles(-1.2217304763960306 - 0.08726646259971647 * sin((sine + 0.3) * 2), -0.2617993877991494 - 0.08726646259971647 * sin(sine * 2), 3.141592653589793)),deltaTime)
  2468.             RightShoulder.C0 = Lerp(RightShoulder.C0,cfMul(cf(1, 0.5, 0),angles(2.8797932657906435 + 0.08726646259971647 * sin(sine * 1), 1.5707963267948966 - 0.08726646259971647 * sin((sine + 0.6) * 1), -1.5707963267948966)),deltaTime)
  2469.             --LeftLeg,-1,0,0,2,-105,-5,0,2,-1,0,0,2,-85,0,0,2,0,0,0,2,-90,0,0.75,2,Torso,0,0,0,2,-80,5,0,2,0,0,0,2,-5,0,0,2,0,0.09,0,2,180,0,0,2,LeftArm,-1,0,0,2,170,5,0,1,0.5,0,0,2,-90,5,0.6,1,0,0,0,2,90,0,0,2,RightLeg,1,0,0,2,-100,-5,0,2,-1.1,0,0,2,90,0,0,2,0,0,0,2,90,0,0.75,2,Head,0,0,0,2,-70,-5,0.3,2,1,0,0,2,-15,-5,0,2,0,0,0,2,180,0,0,2,RightArm,1,0,0,2,165,5,0,1,0.5,0,0,2,90,-5,0.6,1,0,0,0,2,-90,0,0,2
  2470.         end,
  2471.         walk = function()
  2472.             local Vfw, Vrt = velbycfrvec()
  2473.  
  2474.             local rY, lY = raycastlegs()
  2475.  
  2476.             local Cfw, Crt = velchgbycfrvec()
  2477.  
  2478.             Neck.C0 = Lerp(Neck.C0,cfMul(cf(0, 1, 0),angles(-1.5707963267948966 + 0.04363323129985824 * sin(sine * 16), 0, 3.141592653589793 + 0.08726646259971647 * sin(sine * 8) - Vrt)),deltaTime)
  2479.             RightHip.C0 = Lerp(RightHip.C0,cfMul(cf(1, -1 - 0.3 * sin((sine + 0.15) * 8) + rY, rY * -0.5),angles(-1.5707963267948966 - 0.6981317007977318 * sin(sine * 8) * Vfw, 1.5707963267948966 + 0.6981317007977318 * sin(sine * 8) * Vrt, 1.5707963267948966)),deltaTime)
  2480.             RightShoulder.C0 = Lerp(RightShoulder.C0,cfMul(cf(1, 0.5, 0),angles(0.08726646259971647 * sin((sine - 0.05) * 16), 1.5707963267948966 + 0.08726646259971647 * sin(sine * 8) - Vrt/3, 1.5707963267948966)),deltaTime)
  2481.             LeftShoulder.C0 = Lerp(LeftShoulder.C0,cfMul(cf(-1, 0.5, 0),angles(0.08726646259971647 * sin((sine - 0.05) * 16), -1.5707963267948966 + 0.08726646259971647 * sin(sine * 8) - Vrt/3, -1.5707963267948966)),deltaTime)
  2482.             RootJoint.C0 = Lerp(RootJoint.C0,cfMul(cf(Crt * 3, 0.1 * sin((sine + 0.1) * 16), Cfw * -3),angles(-1.5707963267948966 - Cfw, Crt, 3.141592653589793 - 0.08726646259971647 * sin(sine * 8))),deltaTime)
  2483.             LeftHip.C0 = Lerp(LeftHip.C0,cfMul(cf(-1, -1 + 0.3 * sin((sine + 0.15) * 8) + lY, lY * -0.5),angles(1.5707963267948966 + 0.6981317007977318 * sin(sine * 8) * Vfw, -1.5707963267948966 + 0.6981317007977318 * sin(sine * 8) * Vrt, 1.5707963267948966)),deltaTime)
  2484.             --Head,0,0,0,8,-90,2.5,0,16,1,0,0,8,-0,0,0,8,0,0,0,8,180,5,0,8,RightLeg,1,0,0,8,-90,-40,0,8,-1,-0.3,0.15,8,90,40,0,8,0,0,0,8,90,0,0,8,RightArm,1,0,0,8,0,5,-0.05,16,0.5,0,0,8,90,5,0,8,0,0,0,8,90,0,0,8,LeftArm,-1,0,0,8,0,5,-0.05,16,0.5,0,0,8,-90,5,0,8,0,0,0,8,-90,0,0,8,Torso,0,0,0,8,-90,0,0,8,0,0.1,0.1,16,-0,0,0,8,0,0,0,8,180,-5,0,8,LeftLeg,-1,0,0,8,90,40,0,8,-1,0.3,0.15,8,-90,40,0,8,0,0,0,8,90,0,0,8
  2485.         end
  2486.     })
  2487.     addmode("p", {
  2488.         idle = function()
  2489.             local Cfw, Crt = velchgbycfrvec()
  2490.  
  2491.             RightShoulder.C0 = Lerp(RightShoulder.C0,cfMul(cf(1.5, 0.5, 0),angles(1.5707963267948966, 3.141592653589793, -1.5707963267948966)),deltaTime)
  2492.             RightHip.C0 = Lerp(RightHip.C0,cfMul(cf(1, -1, 0),angles(0, 1.5707963267948966, 0)),deltaTime)
  2493.             LeftShoulder.C0 = Lerp(LeftShoulder.C0,cfMul(cf(-1.5, 0.5, 0),angles(1.5707963267948966, 3.141592653589793, 1.5707963267948966)),deltaTime)
  2494.             LeftHip.C0 = Lerp(LeftHip.C0,cfMul(cf(-1, -1, 0),angles(0, -1.5707963267948966, 0)),deltaTime)
  2495.             Neck.C0 = Lerp(Neck.C0,cfMul(cf(0, 1, 0),angles(-1.5707963267948966, 0, -3.141592653589793)),deltaTime)
  2496.             RootJoint.C0 = Lerp(RootJoint.C0,cfMul(cf(Crt * 3, 0, Cfw * -3),angles(-1.5707963267948966 - Cfw, Crt, -3.141592653589793)),deltaTime)
  2497.             --RightArm,1.5,0,0,1,90,0,0,1,0.5,0,0,1,180,0,0,1,0,0,0,1,-90,0,0,1,RightLeg,1,0,0,1,0,0,0,1,-1,0,0,1,90,0,0,1,0,0,0,1,0,0,0,1,Fedora_Handle,8.657480066176504e-09,0,0,1,-6,0,0,1,-0.15052366256713867,0,0,1,0,0,0,1,-0.010221302509307861,0,0,1,0,0,0,1,LeftArm,-1.5,0,0,1,90,0,0,1,0.5,0,0,1,180,0,0,1,0,0,0,1,90,0,0,1,LeftLeg,-1,0,0,1,-0,0,0,1,-1,0,0,1,-90,0,0,1,0,0,0,1,0,0,0,1,Head,0,0,0,1,-90,0,0,1,1,0,0,1,0,0,0,1,0,0,0,1,-180,0,0,1,Torso,0,0,0,1,-90,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,-180,0,0,1
  2498.         end
  2499.     })
  2500.     addmode("f", {
  2501.         idle = function()
  2502.             local Cfw, Crt = velchgbycfrvec()
  2503.  
  2504.             LeftShoulder.C0 = Lerp(LeftShoulder.C0,cfMul(cf(-1, 0.5, 0),angles(-3.0543261909900767 - 0.17453292519943295 * sin((sine + 1.5) * 1), -1.5707963267948966 + 0.08726646259971647 * sin((sine + 0.6) * 1), -1.5707963267948966)),deltaTime)
  2505.             RightShoulder.C0 = Lerp(RightShoulder.C0,cfMul(cf(1, 0.5, 0),angles(3.141592653589793 - 0.08726646259971647 * sin(sine * 1), 0.3490658503988659 + 0.08726646259971647 * sin((sine + 0.3) * 1), -1.9198621771937625 + 0.08726646259971647 * sin((sine + 1) * 1))),deltaTime)
  2506.             Neck.C0 = Lerp(Neck.C0,cfMul(cf(0, 1, 0),angles(-1.3089969389957472 - 0.2617993877991494 * sin((sine + 1.2) * 1), 0.08726646259971647 * sin((sine + 0.2) * 0.5), -2.9670597283903604)),deltaTime)
  2507.             RootJoint.C0 = Lerp(RootJoint.C0,cfMul(cf(Crt * 3, 5 - 0.5 * sin((sine - 0.2) * 1), 0.2 * sin((sine - 1.2) * 1) - Cfw * 3),angles(-0.08726646259971647 + 0.17453292519943295 * sin((sine + 1.2) * 1) - Cfw, 0.08726646259971647 * sin(sine * 0.5) + Crt, 3.141592653589793)),deltaTime)
  2508.             LeftHip.C0 = Lerp(LeftHip.C0,cfMul(cf(-1, -1, 0),angles(1.3962634015954636 + 0.12217304763960307 * sin((sine + 1.5) * 1), -1.2217304763960306 + 0.08726646259971647 * sin((sine + 0.2) * 0.5), 1.5707963267948966)),deltaTime)
  2509.             RightHip.C0 = Lerp(RightHip.C0,cfMul(cf(1, -1, 0),angles(1.9198621771937625 + 0.12217304763960307 * sin((sine + 1.5) * 1), 1.2217304763960306 + 0.08726646259971647 * sin((sine + 0.2) * 0.5), -1.5707963267948966)),deltaTime)
  2510.             --LeftArm,-1,0,0,1,-175,-10,1.5,1,0.5,0,0,1,-90,5,0.6,1,0,0,0,1,-90,0,0,1,RightArm,1,0,0,1,180,-5,0,1,0.5,0,0,1,20,5,0.3,1,0,0,0,1,-110,5,1,1,Head,0,0,0,1,-75,-15,1.2,1,1,0,0,1,-0,5,0.2,0.5,0,0,0,1,-170,0,0,1,Torso,0,0,0,1,-5,10,1.2,1,5,-0.5,-0.2,1,-0,5,0,0.5,0,0.2,-1.2,1,180,0,0,1,LeftLeg,-1,0,0,1,80,7,1.5,1,-1,0,0,1,-70,5,0.2,0.5,0,0,0,1,90,0,0,1,RightLeg,1,0,0,1,110,7,1.5,1,-1,0,0,1,70,5,0.2,0.5,0,0,0,1,-90,0,0,1
  2511.         end,
  2512.         walk = function()
  2513.             local Vfw, Vrt = velbycfrvec()
  2514.  
  2515.             local Cfw, Crt = velchgbycfrvec()
  2516.  
  2517.             LeftShoulder.C0 = Lerp(LeftShoulder.C0,cfMul(cf(-1, 0.5, 0),angles(-3.0543261909900767 - 0.17453292519943295 * sin((sine + 1.5) * 1) - Vfw * 0.1, -1.5707963267948966 + 0.08726646259971647 * sin((sine + 0.6) * 1) + Vrt * 0.2, -1.5707963267948966)),deltaTime)
  2518.             RightShoulder.C0 = Lerp(RightShoulder.C0,cfMul(cf(1, 0.5, 0),angles(3.141592653589793 - 0.08726646259971647 * sin(sine * 1), 0.3490658503988659 + 0.08726646259971647 * sin((sine + 0.3) * 1), -1.9198621771937625 + 0.08726646259971647 * sin((sine + 1) * 1))),deltaTime)
  2519.             Neck.C0 = Lerp(Neck.C0,cfMul(cf(0, 1, 0),angles(-1.3089969389957472 - 0.2617993877991494 * sin((sine + 1.2) * 1) + Vfw * 0.1, 0.08726646259971647 * sin((sine + 0.2) * 0.5) - Vrt * 0.2, -2.9670597283903604)),deltaTime)
  2520.             RootJoint.C0 = Lerp(RootJoint.C0,cfMul(cf(Crt * 3, 5 - 0.5 * sin((sine - 0.2) * 1), 0.2 * sin((sine - 1.2) * 1) - Cfw * 3),angles(-0.08726646259971647 + 0.17453292519943295 * sin((sine + 1.2) * 1) - Vfw * 0.2 - Cfw, 0.08726646259971647 * sin(sine * 0.5) + Crt, 3.141592653589793 - Vrt * 0.2)),deltaTime)
  2521.             LeftHip.C0 = Lerp(LeftHip.C0,cfMul(cf(-1, -1, 0),angles(1.3962634015954636 + 0.12217304763960307 * sin((sine + 1.5) * 1) - Vfw * 0.2, -1.2217304763960306 + 0.08726646259971647 * sin((sine + 0.2) * 0.5), 1.5707963267948966)),deltaTime)
  2522.             RightHip.C0 = Lerp(RightHip.C0,cfMul(cf(1, -1, 0),angles(1.9198621771937625 + 0.12217304763960307 * sin((sine + 1.5) * 1) - Vfw * 0.2, 1.2217304763960306 + 0.08726646259971647 * sin((sine + 0.2) * 0.5), -1.5707963267948966)),deltaTime)
  2523.             --LeftArm,-1,0,0,1,-175,-10,1.5,1,0.5,0,0,1,-90,5,0.6,1,0,0,0,1,-90,0,0,1,RightArm,1,0,0,1,180,-5,0,1,0.5,0,0,1,20,5,0.3,1,0,0,0,1,-110,5,1,1,Head,0,0,0,1,-75,-15,1.2,1,1,0,0,1,-0,5,0.2,0.5,0,0,0,1,-170,0,0,1,Torso,0,0,0,1,-5,10,1.2,1,5,-0.5,-0.2,1,-0,5,0,0.5,0,0.2,-1.2,1,180,0,0,1,LeftLeg,-1,0,0,1,80,7,1.5,1,-1,0,0,1,-70,5,0.2,0.5,0,0,0,1,90,0,0,1,RightLeg,1,0,0,1,110,7,1.5,1,-1,0,0,1,70,5,0.2,0.5,0,0,0,1,-90,0,0,1
  2524.         end
  2525.     })
  2526.     addmode("g", {
  2527.         idle = function()
  2528.             local Cfw, Crt = velchgbycfrvec()
  2529.  
  2530.             LeftShoulder.C0 = Lerp(LeftShoulder.C0,cfMul(cf(-0.9 + 0.4 * sin(sine * 8), 0.5, 0.5 * sin((sine + 0.25) * 4)),angles(1.5707963267948966, -1.5707963267948966 + 1.0471975511965976 * sin(sine * 8), 1.5707963267948966 + 0.6981317007977318 * sin((sine + 0.25) * 4))),deltaTime)
  2531.             RootJoint.C0 = Lerp(RootJoint.C0,cfMul(cf(0.3 * sin((sine + 0.4) * 8) + Crt * 3, 0, Cfw * -3),angles(-1.5707963267948966 - Cfw, 0.3490658503988659 * sin(sine * 8) + Crt, -3.141592653589793)),deltaTime)
  2532.             Neck.C0 = Lerp(Neck.C0,cfMul(cf(0, 1, 0),angles(-1.5707963267948966 + 0.061086523819801536 * sin((sine + 0.125) * 16), -0.3839724354387525 * sin(sine * 8), -3.141592653589793)),deltaTime)
  2533.             RightHip.C0 = Lerp(RightHip.C0,cfMul(cf(1, -1 + 0.4 * sin((sine - 0.01) * 8), 0),angles(1.5707963267948966, 1.7453292519943295 + 0.6981317007977318 * sin(sine * 8), -1.5707963267948966)),deltaTime)
  2534.             LeftHip.C0 = Lerp(LeftHip.C0,cfMul(cf(-1, -1 - 0.4 * sin((sine - 0.01) * 8), 0),angles(1.5707963267948966, -1.7453292519943295 + 0.6981317007977318 * sin(sine * 8), 1.5707963267948966)),deltaTime)
  2535.             RightShoulder.C0 = Lerp(RightShoulder.C0,cfMul(cf(0.9 + 0.4 * sin(sine * 8), 0.5, -0.5 * sin((sine - 0.35) * 4)),angles(1.5707963267948966 + 0.6981317007977318 * sin(sine * 4), 1.5707963267948966 + 1.0471975511965976 * sin(sine * 8), -1.5707963267948966 + 0.17453292519943295 * sin((sine - 0.35) * 4))),deltaTime)
  2536.             --LeftArm,-0.9,0.4,0,8,90,0,0.25,4,0.5,0,0,8,-90,60,0,8,0,0.5,0.25,4,90,40,0.25,4,Torso,0,0.3,0.4,8,-90,0,0,8,0,0,0,4,0,20,0,8,0,0,0,8,-180,0,0,8,Head,0,0,0,8,-90,3.5,0.125,16,1,0,0,8,0,-22,0,8,0,0,0,8,-180,0,0,1.1,RightLeg,1,0,0,8,90,0,0,8,-1,0.4,-0.01,8,100,40,0,8,0,0,0,8,-90,0,0,8,LeftLeg,-1,0,0,8,90,0,0,8,-1,-0.4,-0.01,8,-100,40,0,8,0,0,0,8,90,0,0,8,RightArm,0.9,0.4,0,8,90,40,0,4,0.5,0,0,8,90,60,0,8,0,-0.5,-0.35,4,-90,10,-0.35,4
  2537.         end
  2538.     })
  2539.     addmode("h", {
  2540.         idle = function()
  2541.             local Cfw, Crt = velchgbycfrvec()
  2542.  
  2543.             Neck.C0 = Lerp(Neck.C0,cfMul(cf(0, 1, 0),angles(-1.5707963267948966, -0.4363323129985824 * sin(sine * 8), -3.141592653589793)),deltaTime)
  2544.             RightHip.C0 = Lerp(RightHip.C0,cfMul(cf(1, -1 + 0.3 * sin(sine * 8), 0),angles(1.5707963267948966, 1.5707963267948966 + 0.5235987755982988 * sin(sine * 8), -1.5707963267948966)),deltaTime)
  2545.             LeftShoulder.C0 = Lerp(LeftShoulder.C0,cfMul(cf(-0.5, 1, 0),angles(-0.5235987755982988, -1.5707963267948966 - 0.5235987755982988 * sin(sine * 8), 3.141592653589793)),deltaTime)
  2546.             RightShoulder.C0 = Lerp(RightShoulder.C0,cfMul(cf(0.5, 1, 0),angles(-0.5235987755982988, 1.5707963267948966 - 0.5235987755982988 * sin(sine * 8), 3.141592653589793)),deltaTime)
  2547.             RootJoint.C0 = Lerp(RootJoint.C0,cfMul(cf(-0.1 * sin(sine * 8) + Crt * 3, 0.2 * sin((sine + 0.1) * 16), Cfw * -3),angles(-1.5707963267948966 - Cfw, 0.2617993877991494 * sin(sine * 8) + Crt, -3.141592653589793)),deltaTime)
  2548.             LeftHip.C0 = Lerp(LeftHip.C0,cfMul(cf(-1, -1 - 0.3 * sin(sine * 8), 0),angles(1.5707963267948966, -1.5707963267948966 + 0.5235987755982988 * sin(sine * 8), 1.5707963267948966)),deltaTime)
  2549.             --Head,0,0,0,8,-90,0,0,8,1,0,0,8,0,-25,0,8,0,0,0,8,-180,0,0,8,RightLeg,1,0,0,8,90,0,0,8,-1,0.3,0,8,90,30,0,8,0,0,0,8,-90,0,0,8,LeftArm,-0.5,0,0,8,-30,0,0,8,1,0,0,8,-90,-30,0,8,0,0,0,8,180,0,0,8,RightArm,0.5,0,0,8,-30,0,0,8,1,0,0,16,90,-30,0,8,0,0,0,8,180,0,0,8,Torso,0,-0.1,0,8,-90,0,0,8,0,0.2,0.1,16,0,15,0,8,0,0,0,8,-180,0,0,8,LeftLeg,-1,0,0,8,90,0,0,8,-1,-0.3,0,8,-90,30,0,8,0,0,0,8,90,0,0,8,Fedora_Handle,8.657480066176504e-09,0,0,8,-6,0,0,8,-0.15052366256713867,0,0,8,0,0,0,8,-0.010221302509307861,0,0,8,0,0,0,8
  2550.         end
  2551.     })
  2552.     addmode("j", {
  2553.         idle = function()
  2554.             local Cfw, Crt = velchgbycfrvec()
  2555.  
  2556.             LeftHip.C0 = Lerp(LeftHip.C0,cfMul(cf(-0.8, -1, -0.1),angles(0.17453292519943295, -0.6981317007977318, 0)),deltaTime)
  2557.             LeftShoulder.C0 = Lerp(LeftShoulder.C0,cfMul(cf(-1.2, 0.5, 0),angles(-0.3490658503988659 + 0.08726646259971647 * sin((sine + 0.1) * 4), 0, 0.6981317007977318 + 0.08726646259971647 * sin((sine + 0.1) * 4))),deltaTime)
  2558.             RightHip.C0 = Lerp(RightHip.C0,cfMul(cf(1.1, -1, 0),angles(1.5707963267948966, 1.7453292519943295, -1.5707963267948966)),deltaTime)
  2559.             Neck.C0 = Lerp(Neck.C0,cfMul(cf(0, 1, 0),angles(-1.5707963267948966 + 0.08726646259971647 * sin((sine + 0.1) * 4), 0, 2.792526803190927)),deltaTime)
  2560.             RootJoint.C0 = Lerp(RootJoint.C0,cfMul(cf(Crt * 3, -1.7 + 0.5 * sin(sine * 4), 0.15 * sin(sine * 4) - Cfw * 3),angles(3.3161255787892263 + 0.17453292519943295 * sin(sine * 4) - Cfw, Crt, 3.6651914291880923)),deltaTime)
  2561.             RightShoulder.C0 = Lerp(RightShoulder.C0,cfMul(cf(0.8 + 0.4 * sin(sine * 4), 0.6 + 0.1 * sin(sine * 4), 0.4 - 0.25 * sin(sine * 4)),angles(2.9670597283903604, 2.2689280275926285 - 0.17453292519943295 * sin(sine * 4), -1.4835298641951802 - 0.17453292519943295 * sin(sine * 4))),deltaTime)
  2562.             --GalaxyBeautifulHair_Handle,-0.15000000596046448,0,0,1,0,0,0,1,0.10000000149011612,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,LeftLeg,-0.8,0,0,4,10,0,0,4,-1,0,0,4,-40,0,0,4,-0.1,0,0,4,0,0,0,4,LeftArm,-1.2,0,0,4,-20,5,0.1,4,0.5,0,0,4,0,0,0,4,0,0,0,4,40,5,0.1,4,Fedora_Handle,8.657480066176504e-09,0,0,1,-6,0,0,1,-0.15052366256713867,0,0,1,0,0,0,1,-0.010221302509307861,0,0,1,0,0,0,1,ValkyrieHelm_Handle,8.658389560878277e-09,0,0,1,-15,0,0,1,-0.2433757781982422,0,0,1,0,0,0,1,-0.2657628059387207,0,0,1,0,0,0,1,RightLeg,1.1,0,0,4,90,0,0,4,-1,0,0,4,100,0,0,4,0,0,0,4,-90,0,0,4,BlackIronAntlers_Handle,8.658389560878277e-09,0,0,1,0,0,0,1,-0.6500000953674316,0,0,1,0,0,0,1,0.19972775876522064,0,0,1,0,0,0,1,DevAwardsAdurite_Handle,0,0,0,1,0,0,0,1,-0.25,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,SilverthornAntlers_Handle,8.658389560878277e-09,0,0,1,0,0,0,1,-0.6500000953674316,0,0,1,0,0,0,1,0.19972775876522064,0,0,1,0,0,0,1,Head,0,0,0,4,-90,5,0.1,4,1,0,0,4,-0,0,0,4,0,0,0,4,160,0,0,4,Torso,0,0,0,4,190,10,0,4,-1.70,0.5,0,4,-0,0,0,4,0,0.15,0,4,210,0,0,4,RightArm,0.8,0.4,0,4,170,0,0,4,0.6,0.1,0,4,130,-10,0,4,0.4,-0.25,0,4,-85,-10,0,4
  2563.         end
  2564.     })
  2565.     addmode("k", {
  2566.         idle = function()
  2567.             local Cfw, Crt = velchgbycfrvec()
  2568.  
  2569.             Neck.C0 = Lerp(Neck.C0,cfMul(cf(0, 1, 0),angles(-1.6580627893946132 - 0.08726646259971647 * sin((sine + 0.3333333333333333) * 12), -0.08726646259971647 * sin((sine + 0.2) * 6), 3.141592653589793)),deltaTime)
  2570.             LeftHip.C0 = Lerp(LeftHip.C0,cfMul(cf(-1, -0.5 - 0.5 * sin((sine + 0.39999999999999997) * 12), -0.5),angles(1.7453292519943295 - 1.0471975511965976 * sin(sine * 6), -1.5707963267948966 + 0.1308996938995747 * sin(sine * 6), 1.5707963267948966)),deltaTime)
  2571.             RightHip.C0 = Lerp(RightHip.C0,cfMul(cf(1, -0.5 - 0.5 * sin((sine + 0.39999999999999997) * 12), -0.5),angles(1.7453292519943295 + 1.0471975511965976 * sin(sine * 6), 1.5707963267948966 + 0.1308996938995747 * sin(sine * 6), -1.5707963267948966)),deltaTime)
  2572.             RootJoint.C0 = Lerp(RootJoint.C0,cfMul(cf(Crt * 3, -0.5 + 0.3 * sin((sine + 0.16666666666666666) * 12), Cfw * -3),angles(-1.3962634015954636 + 0.08726646259971647 * sin((sine + 0.3333333333333333) * 12) - Cfw, 0.08726646259971647 * sin((sine + 0.06666666666666667) * 6) + Crt, 3.141592653589793)),deltaTime)
  2573.             LeftShoulder.C0 = Lerp(LeftShoulder.C0,cfMul(cf(-0.8 - 0.1 * sin(sine * 6), 0.5 + 0.1 * sin(sine * 6), -0.2),angles(3.141592653589793 - 0.17453292519943295 * sin((sine + 0.39999999999999997) * 12), -0.17453292519943295, 1.5707963267948966)),deltaTime)
  2574.             RightShoulder.C0 = Lerp(RightShoulder.C0,cfMul(cf(0.8 - 0.1 * sin(sine * 6), 0.5 - 0.1 * sin(sine * 6), -0.2),angles(3.141592653589793 - 0.17453292519943295 * sin((sine + 0.39999999999999997) * 12), 0.17453292519943295, -1.5707963267948966)),deltaTime)
  2575.             --GalaxyBeautifulHair_Handle,-0.15000000596046448,0,0,1.5,0,0,0,1.5,0.10000000149011612,0,0,1.5,0,0,0,1.5,0,0,0,1.5,0,0,0,1.5,Head,0,0,0,6,-95,-5,0.3333333333333333,12,1,0,0,6,-0,-5,0.2,6,0,0,0,6,180,0,0,6,ValkyrieHelm_Handle,8.658389560878277e-09,0,0,1.5,-15,0,0,1.5,-0.2433757781982422,0,0,1.5,0,0,0,1.5,-0.2657628059387207,0,0,1.5,0,0,0,1.5,SilverthornAntlers_Handle,8.658389560878277e-09,0,0,1.5,0,0,0,1.5,-0.6500000953674316,0,0,1.5,0,0,0,1.5,0.19972775876522064,0,0,1.5,0,0,0,1.5,BlackIronAntlers_Handle,8.658389560878277e-09,0,0,1.5,0,0,0,1.5,-0.6500000953674316,0,0,1.5,0,0,0,1.5,0.19972775876522064,0,0,1.5,0,0,0,1.5,Fedora_Handle,8.657480066176504e-09,0,0,1.5,-6,0,0,1.5,-0.15052366256713867,0,0,1.5,0,0,0,1.5,-0.010221302509307861,0,0,1.5,0,0,0,1.5,LeftLeg,-1,0,0,6,100,-60,0,6,-0.5,-0.5,0.39999999999999997,12,-90,7.5,0,6,-0.5,0,0,6,90,0,0,6,EyelessSmileHead_Handle,-0.00043487548828125,0,0,1.5,180,0,0,1.5,0.6000361442565918,0,0,1.5,0,0,0,1.5,0.0003204345703125,0,0,1.5,180,0,0,1.5,RightLeg,1,0,0,6,100,60,0,6,-0.5,-0.5,0.39999999999999997,12,90,7.5,0,6,-0.5,0,0,6,-90,0,0,6,DevAwardsAdurite_Handle,0,0,0,1.5,0,0,0,1.5,-0.25,0,0,1.5,0,0,0,1.5,0,0,0,1.5,0,0,0,1.5,Torso,0,0,0,6,-80,5,0.3333333333333333,12,-0.5,0.3,0.16666666666666666,12,-0,5,0.06666666666666667,6,0,0,0,6,180,0,0,6,LeftArm,-0.8,-0.1,0,6,180,-10,0.39999999999999997,12,0.5,0.1,0,6,-10,0,0,6,-0.2,0,0,6,90,0,0,6,RightArm,0.8,-0.1,0,6,180,-10,0.39999999999999997,12,0.5,-0.1,0,6,10,0,0,6,-0.2,0,0,6,-90,0,0,6
  2576.         end
  2577.     })
  2578.     addmode("l", {
  2579.         idle = function()
  2580.             local Cfw, Crt = velchgbycfrvec()
  2581.  
  2582.             Neck.C0 = Lerp(Neck.C0,cfMul(cf(0, 1, 0),angles(-1.5707963267948966 + 0.04363323129985824 * sin((sine + 0.1) * 1), -0.17453292519943295 * sin((sine + 0.1) * 5), -3.141592653589793)),deltaTime)
  2583.             RightHip.C0 = Lerp(RightHip.C0,cfMul(cf(1, -1 + 0.2 * sin(sine * 5), -0.2 + 0.2 * sin(sine * 5)),angles(2.181661564992912 - 0.8726646259971648 * sin(sine * 5), 1.9198621771937625 - 0.3490658503988659 * sin(sine * 5), -1.5707963267948966)),deltaTime)
  2584.             RightShoulder.C0 = Lerp(RightShoulder.C0,cfMul(cf(0.7, 0.8, 0),angles(1.0471975511965976 + 0.03490658503988659 * sin(sine * 10), 2.0943951023931953 + 0.10471975511965978 * sin((sine + 0.1) * 5), 1.5707963267948966)),deltaTime)
  2585.             LeftHip.C0 = Lerp(LeftHip.C0,cfMul(cf(-1, -1 - 0.2 * sin(sine * 5), -0.2 - 0.2 * sin(sine * 5)),angles(2.181661564992912 + 0.8726646259971648 * sin(sine * 5), -1.9198621771937625 - 0.3490658503988659 * sin(sine * 5), 1.5707963267948966)),deltaTime)
  2586.             RootJoint.C0 = Lerp(RootJoint.C0,cfMul(cf(Crt * 3, 0.15 + 0.4 * sin((sine - 0.5) * 10), Cfw * -3),angles(-1.4835298641951802 - Cfw, 0.17453292519943295 * sin(sine * 5) + Crt, -3.141592653589793)),deltaTime)
  2587.             LeftShoulder.C0 = Lerp(LeftShoulder.C0,cfMul(cf(-0.7, 0.5, -0.3),angles(1.7453292519943295, -0.8726646259971648, 1.5707963267948966)),deltaTime)
  2588.             --Head,0,0,0,5,-90,2.5,0.1,1,1,0,0,4,0,-10,0.1,5,0,0,0,4,-180,0,0,4,RightLeg,1,0,0,4,125,-50,0,5,-1,0.2,0,5,110,-20,0,5,-0.2,0.2,0,5,-90,0,0,4,RightArm,0.7,0,0,4,60,2,0,10,0.8,0,0,4,120,6,0.1,5,0,0,0,4,90,0,0,4,LeftLeg,-1,0,0,4,125,50,0,5,-1,-0.2,0,5,-110,-20,0,5,-0.2,-0.2,0,5,90,0,0,4,Torso,0,0,0,4,-85,0,0,4,0.15,0.4,-0.5,10,0,10,0,5,0,0,0,4,-180,0,0,4,LeftArm,-0.7,0,0,4,100,0,0,4,0.5,0,0,4,-50,0,0,4,-0.3,0,0,4,90,0,0,4
  2589.         end
  2590.     })
  2591.  
  2592.     addmode("x", {
  2593.         idle = function()
  2594.             local Cfw, Crt = velchgbycfrvec()
  2595.  
  2596.             RightShoulder.C0 = Lerp(RightShoulder.C0,cfMul(cf(1, 0.5, 0),angles(0, 1.5707963267948966, 0)),deltaTime)
  2597.             Neck.C0 = Lerp(Neck.C0,cfMul(cf(0, 1, 0),angles(-1.5707963267948966, 0, 3.141592653589793)),deltaTime)
  2598.             RightHip.C0 = Lerp(RightHip.C0,cfMul(cf(1, -1, 0),angles(0, 1.5707963267948966, 0)),deltaTime)
  2599.             LeftHip.C0 = Lerp(LeftHip.C0,cfMul(cf(-1, -1, 0),angles(0, -1.5707963267948966, 0)),deltaTime)
  2600.             RootJoint.C0 = Lerp(RootJoint.C0,cfMul(cf(Crt * 3, 0, Cfw * -3),angles(-1.5707963267948966 - Cfw, Crt, 3.141592653589793)),deltaTime)
  2601.             LeftShoulder.C0 = Lerp(LeftShoulder.C0,cfMul(cf(-1, 0.5, 0),angles(0, -1.5707963267948966, 0)),deltaTime)
  2602.             --RightArm,1,0,0,1,0,0,0,1,0.5,0,0,1,90,0,0,1,0,0,0,1,0,0,0,1,Fedora_Handle,8.657480066176504e-09,0,0,1,-6,0,0,1,-0.15052366256713867,0,0,1,0,0,0,1,-0.010221302509307861,0,0,1,0,0,0,1,Head,0,0,0,1,-90,0,0,1,1,0,0,1,-0,0,0,1,0,0,0,1,180,0,0,1,RightLeg,1,0,0,1,0,0,0,1,-1,0,0,1,90,0,0,1,0,0,0,1,0,0,0,1,LeftLeg,-1,0,0,1,-0,0,0,1,-1,0,0,1,-90,0,0,1,0,0,0,1,0,0,0,1,Torso,0,0,0,1,-90,0,0,1,0,0,0,1,-0,0,0,1,0,0,0,1,180,0,0,1,LeftArm,-1,0,0,1,-0,0,0,1,0.5,0,0,1,-90,0,0,1,0,0,0,1,0,0,0,1
  2603.         end,
  2604.         walk = function()
  2605.             local Cfw, Crt = velchgbycfrvec()
  2606.  
  2607.             RightShoulder.C0 = Lerp(RightShoulder.C0,cfMul(cf(1, 0.5, 0),angles(0, 1.5707963267948966, 0)),deltaTime)
  2608.             Neck.C0 = Lerp(Neck.C0,cfMul(cf(0, 1, 0),angles(-1.5707963267948966, 0, 3.141592653589793)),deltaTime)
  2609.             RightHip.C0 = Lerp(RightHip.C0,cfMul(cf(1, -1, 0),angles(0, 1.5707963267948966, 0)),deltaTime)
  2610.             LeftHip.C0 = Lerp(LeftHip.C0,cfMul(cf(-1, -1, 0),angles(0, -1.5707963267948966, 0)),deltaTime)
  2611.             RootJoint.C0 = Lerp(RootJoint.C0,cfMul(cf(Crt * 3, 0, Cfw * -3),angles(-1.5707963267948966 - Cfw, Crt, 3.141592653589793)),deltaTime)
  2612.             LeftShoulder.C0 = Lerp(LeftShoulder.C0,cfMul(cf(-1, 0.5, 0),angles(0, -1.5707963267948966, 0)),deltaTime)
  2613.             --RightArm,1,0,0,1,0,0,0,1,0.5,0,0,1,90,0,0,1,0,0,0,1,0,0,0,1,Fedora_Handle,8.657480066176504e-09,0,0,1,-6,0,0,1,-0.15052366256713867,0,0,1,0,0,0,1,-0.010221302509307861,0,0,1,0,0,0,1,Head,0,0,0,1,-90,0,0,1,1,0,0,1,-0,0,0,1,0,0,0,1,180,0,0,1,RightLeg,1,0,0,1,0,0,0,1,-1,0,0,1,90,0,0,1,0,0,0,1,0,0,0,1,LeftLeg,-1,0,0,1,-0,0,0,1,-1,0,0,1,-90,0,0,1,0,0,0,1,0,0,0,1,Torso,0,0,0,1,-90,0,0,1,0,0,0,1,-0,0,0,1,0,0,0,1,180,0,0,1,LeftArm,-1,0,0,1,-0,0,0,1,0.5,0,0,1,-90,0,0,1,0,0,0,1,0,0,0,1
  2614.         end
  2615.     })
  2616. end)
  2617.  
  2618. btn("nameless animations V6", function()
  2619.     local t=reanimate()
  2620.     if type(t)~="table" then return end
  2621.     local raycastlegs=t.raycastlegs
  2622.     local velbycfrvec=t.velbycfrvec
  2623.     local addmode=t.addmode
  2624.     local getJoint=t.getJoint
  2625.     local RootJoint=getJoint("RootJoint")
  2626.     local RightShoulder=getJoint("Right Shoulder")
  2627.     local LeftShoulder=getJoint("Left Shoulder")
  2628.     local RightHip=getJoint("Right Hip")
  2629.     local LeftHip=getJoint("Left Hip")
  2630.     local Neck=getJoint("Neck")
  2631.     addmode("default", {
  2632.         idle = function()
  2633.             local rY, lY = raycastlegs()
  2634.  
  2635.             RightShoulder.C0 = Lerp(RightShoulder.C0,cfMul(cf(1, 0.3 + 0.1 * sin(sine * 2), -0.1),angles(-0.5235987755982988 + 0.05235987755982989 * sin((sine + 1.5) * 2), 1.0471975511965976 + 0.08726646259971647 * sin((sine + 0.5) * 2), 0.5235987755982988)),deltaTime)
  2636.             Neck.C0 = Lerp(Neck.C0,cfMul(cf(0, 1, 0),angles(-1.6580627893946132 + 0.08726646259971647 * sin((sine + 0.6) * 2), 0, 3.141592653589793 + 0.2617993877991494 * sin((sine - 1.2) * 1))),deltaTime)
  2637.             RootJoint.C0 = Lerp(RootJoint.C0,cfMul(cf(0, 0.1 * sin(sine * 2), 0),angles(-1.5707963267948966 + 0.08726646259971647 * sin(sine * 2), 0, 3.141592653589793)),deltaTime)
  2638.             RightHip.C0 = Lerp(RightHip.C0,cfMul(cf(1, -1 - 0.1 * sin(sine * 2) + rY, 0.1 * sin(sine * 2) - rY * 0.5),angles(-0.6981317007977318 - 0.08726646259971647 * sin(sine * 2), 1.0471975511965976, 0.5235987755982988)),deltaTime)
  2639.             LeftShoulder.C0 = Lerp(LeftShoulder.C0,cfMul(cf(-1, 0.6 + 0.1 * sin(sine * 2), 0),angles(3.141592653589793 + 0.05235987755982989 * sin((sine + 0.5) * 2), -2.705260340591211 + 0.017453292519943295 * sin((sine + 1.5) * 2), -1.2217304763960306 + 0.05235987755982989 * sin((sine + 1.5) * 2))),deltaTime)
  2640.             LeftHip.C0 = Lerp(LeftHip.C0,cfMul(cf(-1, -1 - 0.1 * sin(sine * 2) + lY, 0.1 * sin(sine * 2) - lY * 0.5),angles(-0.3490658503988659 - 0.08726646259971647 * sin(sine * 2), -1.0471975511965976, -0.5235987755982988)),deltaTime)
  2641.             --RightArm,1,0,0,2,-30,3,1.5,2,0.3,0.1,0,2,60,5,0.5,2,-0.1,0,0,2,30,0,0,2,Head,0,0,0,2,-95,5,0.6,2,1,0,0,2,-0,0,0,1,0,0,0,2,180,15,-1.2,1,Torso,0,0,0,2,-90,5,0,2,0,0.1,0,2,-0,0,0,2,0,0,0,2,180,0,0,2,RightLeg,1,0,0,2,-40,-5,0,2,-1,-0.1,0,2,60,0,0,2,0,0.1,0,2,30,0,0,2,Meshes/TrollFaceHeadAccessory_Handle,0.01043701171875,0,0,1,0,0,0,1,0.43610429763793945,0,0,1,0,0,0,1,-0.01102447509765625,0,0,1,0,0,0,1,LeftArm,-1,0,0,2,180,3,0.5,2,0.6,0.1,0,2,-155,1,1.5,2,0,0,0,2,-70,3,1.5,2,LeftLeg,-1,0,0,2,-20,-5,0,2,-1,-0.1,0,2,-60,0,0,2,0,0.1,0,2,-30,0,0,2
  2642.         end,
  2643.         walk = function()
  2644.             local fw, rt = velbycfrvec()
  2645.  
  2646.             local rY, lY = raycastlegs()
  2647.  
  2648.             RootJoint.C0 = Lerp(RootJoint.C0,cfMul(cf(0, -0.2 + 0.2 * sin(sine * 16), 0),angles(-1.6580627893946132 + 0.04363323129985824 * sin(sine * 16) - fw * 0.15, 0.03490658503988659 * sin(sine * 8) + rt * 0.15, -3.141592653589793 - 0.08726646259971647 * sin((sine + 0.25) * 8) - rt * 0.1)),deltaTime)
  2649.             RightHip.C0 = Lerp(RightHip.C0,cfMul(cf(1, -0.8 + 0.4 * sin((sine + 0.125) * 8) + rY, -0.15 * fw + 0.4 * sin((sine + 10) * 8) * fw + rY * -0.5),angles(1.3962634015954636 + 0.6981317007977318 * sin(sine * 8)*fw, 1.5707963267948966 + 0.6981317007977318 * sin(sine * 8)*rt, -1.5707963267948966 + 0.2617993877991494 * sin(sine * 8))),deltaTime)
  2650.             LeftShoulder.C0 = Lerp(LeftShoulder.C0,cfMul(cf(-1, 0.35 - 0.1 * sin(sine * 8), 0),angles(0.5235987755982988 * sin(sine * 8)*fw, -1.5707963267948966 - 0.5235987755982988 * sin(sine * 8)*fw, -0.5235987755982988 * sin(sine * 8)*fw)),deltaTime)
  2651.             RightShoulder.C0 = Lerp(RightShoulder.C0,cfMul(cf(1, 0.35 + 0.1 * sin(sine * 8), 0),angles(-0.5235987755982988 * sin(sine * 8)*fw, 1.5707963267948966 - 0.5235987755982988 * sin(sine * 8)*fw, -0.5235987755982988 * sin(sine * 8)*fw)),deltaTime)
  2652.             LeftHip.C0 = Lerp(LeftHip.C0,cfMul(cf(-1, -0.8 - 0.4 * sin((sine + 0.125) * 8) + lY, -0.15 * fw - 0.4 * sin((sine + 10) * 8) * fw + lY * -0.5),angles(1.3962634015954636 - 0.6981317007977318 * sin(sine * 8)*fw, -1.5707963267948966 - 0.6981317007977318 * sin(sine * 8)*rt, 1.5707963267948966 + 0.2617993877991494 * sin(sine * 8))),deltaTime)
  2653.             Neck.C0 = Lerp(Neck.C0,cfMul(cf(0, 1, 0),angles(-1.5707963267948966 + 0.08726646259971647 * sin((sine + 10) * 16) + fw * 0.15, -0.08726646259971647 * sin(sine * 8) + rt * -0.1, 3.141592653589793 - 0.05235987755982989 * sin((sine + 5) * 8) - rt * 0.5)),deltaTime)
  2654.             --Torso,0,0,0,8,-95,2.5,0,16,-0.2,0.2,0,16,0,5,0,8,0,0,0,8,-180,-5,0.25,8,RightArm,1,0,0,1,0,-30,0,8,0.35,0.1,0,8,90,-30,0,8,0,0,0,8,0,-30,0,8,RightLeg,1,0,0,8,80,40,0,8,-0.8,0.4,0.125,8,90,40,0,8,-0.15,0.4,10,8,-90,15,0,8,LeftLeg,-1,0,0,8,80,-40,0,8,-0.8,-0.4,0.125,8,-90,-40,0,8,-0.15,-0.4,10,8,90,15,0,8,Head,0,0,0,1,-90,2.5,10,16,1,0,0,1,-0,-5,0,8,0,0,0,1,180,-3,5,8,LeftArm,-1,0,0,1,0,30,0,8,0.35,-0.1,0,8,-90,-30,0,8,0,-0.4,0,8,0,-30,0,8
  2655.         end,
  2656.         jump = function()
  2657.             local fw, rt = velbycfrvec()
  2658.  
  2659.             RootJoint.C0 = Lerp(RootJoint.C0,cfMul(cf_0,angles(-1.4835298641951802 + fw * 0.1, rt * -0.05, -3.141592653589793)),deltaTime)
  2660.             RightShoulder.C0 = Lerp(RightShoulder.C0,cfMul(cf(1, 0.5, 0),angles(4.014257279586958 - 0.08726646259971647 * sin((sine + 0.5) * 4), 1.7453292519943295 + 0.08726646259971647 * sin((sine + 0.25) * 4), -1.5707963267948966)),deltaTime)
  2661.             LeftHip.C0 = Lerp(LeftHip.C0,cfMul(cf(-1, -1, 0),angles(1.5707963267948966 - 0.08726646259971647 * sin((sine + 0.5) * 4), -1.6580627893946132 + 0.06981317007977318 * sin((sine + 0.25) * 4), 1.5707963267948966)),deltaTime)
  2662.             LeftShoulder.C0 = Lerp(LeftShoulder.C0,cfMul(cf(-1, 0.5, 0),angles(4.014257279586958 - 0.08726646259971647 * sin((sine + 0.5) * 4), -1.7453292519943295 - 0.08726646259971647 * sin((sine + 0.25) * 4), 1.5707963267948966)),deltaTime)
  2663.             Neck.C0 = Lerp(Neck.C0,cfMul(cf(0, 1, 0),angles(-1.3962634015954636, 0, -3.141592653589793 - rt)),deltaTime)
  2664.             RightHip.C0 = Lerp(RightHip.C0,cfMul(cf(1, -1, 0),angles(1.5707963267948966 - 0.08726646259971647 * sin((sine + 0.5) * 4), 1.6580627893946132 - 0.06981317007977318 * sin((sine + 0.25) * 4), -1.5707963267948966)),deltaTime)
  2665.             --Torso,0,0,0,4,-85,0,0,4,0,0,0,4,0,0,0,4,0,0,0,4,-180,0,0,4,RightArm,1,0,0,4,230,-5,0.5,4,0.5,0,0,4,100,5,0.25,4,0,0,0,4,-90,0,0,4,LeftLeg,-1,0,0,4,90,-5,0.5,4,-1,0,0,4,-95,4,0.25,4,0,0,0,4,90,0,0,4,LeftArm,-1,0,0,4,230,-5,0.5,4,0.5,0,0,4,-100,-5,0.25,4,0,0,0,4,90,0,0,4,Head,0,0,0,4,-80,0,0.5,4,1,0,0,4,0,0,0.25,4,0,0,0,4,-180,0,0,4,RightLeg,1,0,0,4,90,-5,0.5,4,-1,0,0,4,95,-4,0.25,4,0,0,0,4,-90,0,0,4
  2666.         end,
  2667.         fall = function()
  2668.             local fw, rt = velbycfrvec()
  2669.  
  2670.             RootJoint.C0 = Lerp(RootJoint.C0,cfMul(cf_0,angles(-1.6580627893946132 + fw * 0.1, rt * -0.05, -3.141592653589793)),deltaTime)
  2671.             RightShoulder.C0 = Lerp(RightShoulder.C0,cfMul(cf(1, 0.5, 0),angles(4.014257279586958 - 0.08726646259971647 * sin((sine + 0.5) * 4), 1.7453292519943295 + 0.08726646259971647 * sin((sine + 0.25) * 4), -1.5707963267948966)),deltaTime)
  2672.             LeftHip.C0 = Lerp(LeftHip.C0,cfMul(cf(-1, -1, 0),angles(1.5707963267948966 - 0.08726646259971647 * sin((sine + 0.5) * 4), -1.6580627893946132 + 0.06981317007977318 * sin((sine + 0.25) * 4), 1.5707963267948966)),deltaTime)
  2673.             LeftShoulder.C0 = Lerp(LeftShoulder.C0,cfMul(cf(-1, 0.5, 0),angles(4.014257279586958 - 0.08726646259971647 * sin((sine + 0.5) * 4), -1.7453292519943295 - 0.08726646259971647 * sin((sine + 0.25) * 4), 1.5707963267948966)),deltaTime)
  2674.             Neck.C0 = Lerp(Neck.C0,cfMul(cf(0, 1, 0),angles(-1.7453292519943295, 0, -3.141592653589793 - rt)),deltaTime)
  2675.             RightHip.C0 = Lerp(RightHip.C0,cfMul(cf(1, -1, 0),angles(1.5707963267948966 - 0.08726646259971647 * sin((sine + 0.5) * 4), 1.6580627893946132 - 0.06981317007977318 * sin((sine + 0.25) * 4), -1.5707963267948966)),deltaTime)
  2676.             --Torso,0,0,0,4,-95,0,0,4,0,0,0,4,0,0,0,4,0,0,0,4,-180,0,0,4,RightArm,1,0,0,4,230,-5,0.5,4,0.5,0,0,4,100,5,0.25,4,0,0,0,4,-90,0,0,4,LeftLeg,-1,0,0,4,90,-5,0.5,4,-1,0,0,4,-95,4,0.25,4,0,0,0,4,90,0,0,4,LeftArm,-1,0,0,4,230,-5,0.5,4,0.5,0,0,4,-100,-5,0.25,4,0,0,0,4,90,0,0,4,Head,0,0,0,4,-100,0,0.5,4,1,0,0,4,0,0,0.25,4,0,0,0,4,-180,0,0,4,RightLeg,1,0,0,4,90,-5,0.5,4,-1,0,0,4,95,-4,0.25,4,0,0,0,4,-90,0,0,4
  2677.         end
  2678.     })
  2679.  
  2680.     addmode("q", {
  2681.         idle = function()
  2682.             LeftShoulder.C0 = Lerp(LeftShoulder.C0,cfMul(cf(-1, 0.75, -0.2),angles(2.705260340591211 - 0.08726646259971647 * sin((sine + 0.1) * 2), -2.792526803190927, -0.6981317007977318)),deltaTime)
  2683.             RightShoulder.C0 = Lerp(RightShoulder.C0,cfMul(cf(1, 0.75, -0.2),angles(2.705260340591211 - 0.08726646259971647 * sin((sine + 0.1) * 2), 2.792526803190927, 0.6981317007977318)),deltaTime)
  2684.             Neck.C0 = Lerp(Neck.C0,cfMul(cf(0, 1, 0),angles(-1.9198621771937625 - 0.10471975511965978 * sin((sine + 0.3) * 2), 0, 3.141592653589793)),deltaTime)
  2685.             RootJoint.C0 = Lerp(RootJoint.C0,cfMul(cf(0, -2.45 - 0.05 * sin(sine * 2), 0),angles(0.03490658503988659 * sin(sine * 2), 0, 3.141592653589793)),deltaTime)
  2686.             RightHip.C0 = Lerp(RightHip.C0,cfMul(cf(1, -1, 0),angles(1.3962634015954636 - 0.03490658503988659 * sin(sine * 2), 1.3089969389957472, -0.9599310885968813)),deltaTime)
  2687.             LeftHip.C0 = Lerp(LeftHip.C0,cfMul(cf(-1, -1, 0),angles(1.5707963267948966 - 0.03490658503988659 * sin(sine * 2), -1.3089969389957472, 1.5707963267948966)),deltaTime)
  2688.             --LeftArm,-1,0,0,2,155,-5,0.1,2,0.75,0,0,2,-160,0,0,2,-0.2,0,0,2,-40,0,0,2,RightArm,1,0,0,2,155,-5,0.1,2,0.75,0,0,2,160,0,0,2,-0.2,0,0,2,40,0,0,2,Head,0,0,0,2,-110,-6,0.3,2,1,0,0,2,-0,0,0,2,0,0,0,2,180,0,0,2,Torso,0,0,0,2,0,2,0,2,-2.45,-0.05,0,2,-0,0,0,2,0,0,0,2,180,0,0,2,RightLeg,1,0,0,2,80,-2,0,2,-1,0,0,2,75,0,0,2,0,0,0,2,-55,0,0,2,LeftLeg,-1,0,0,2,90,-2,0,2,-1,0,0,2,-75,0,0,2,0,0,0,2,90,0,0,2
  2689.         end
  2690.     })
  2691.     addmode("e", {
  2692.         idle = function()
  2693.             LeftShoulder.C0 = Lerp(LeftShoulder.C0,cfMul(cf(-0.9, 0.4 + 0.1 * sin(sine * 2), 0.3 - 0.15 * sin(sine * 2)),angles(-1.0471975511965976 - 0.12217304763960307 * sin(sine * 2), -1.3962634015954636, -0.6981317007977318)),deltaTime)
  2694.             RootJoint.C0 = Lerp(RootJoint.C0,cfMul(cf(0, -1.85 - 0.1 * sin((sine + 0.2) * 2), 0),angles(-1.3962634015954636 + 0.03490658503988659 * sin(sine * 2), -0.08726646259971647, 3.141592653589793)),deltaTime)
  2695.             RightShoulder.C0 = Lerp(RightShoulder.C0,cfMul(cf(1, 0.4 + 0.1 * sin(sine * 2), 0.2 - 0.15 * sin(sine * 2)),angles(0.6108652381980153 - 0.12217304763960307 * sin(sine * 2), 1.2217304763960306, -0.7853981633974483)),deltaTime)
  2696.             Neck.C0 = Lerp(Neck.C0,cfMul(cf(0, 1, 0),angles(-1.6580627893946132 - 0.03490658503988659 * sin((sine + 0.6) * 2), 0.10471975511965978 + 0.06981317007977318 * sin(sine * 0.66), 3.141592653589793 + 0.3490658503988659 * sin(sine * 0.66))),deltaTime)
  2697.             RightHip.C0 = Lerp(RightHip.C0,cfMul(cf(1, 0.2 + 0.15 * sin((sine + 0.2) * 2), -0.7 + 0.1 * sin(sine * 2)),angles(1.4835298641951802 + 0.03490658503988659 * sin(sine * 2), 1.4835298641951802, -1.5707963267948966)),deltaTime)
  2698.             LeftHip.C0 = Lerp(LeftHip.C0,cfMul(cf(-1, -0.75 + 0.1 * sin((sine + 0.2) * 2), -0.5),angles(1.3962634015954636 - 0.03490658503988659 * sin(sine * 2), -1.6580627893946132, 0)),deltaTime)
  2699.             --LeftArm,-0.9,0,0,2,-60,-7,0,2,0.4,0.1,0,2,-80,0,0,2,0.3,-0.15,0,2,-40,0,0,2,Torso,0,0,0,2,-80,2,0,2,-1.85,-0.1,0.2,2,-5,0,0,2,0,0,0,2,180,0,0,2,RightArm,1,0,0,2,35,-7,0,2,0.4,0.1,0,2,70,0,0,2,0.2,-0.15,0,2,-45,0,0,2,Head,0,0,0,2,-95,-2,0.6,2,1,0,0,2,6,4,0,0.66,0,0,0,2,180,20,0,0.66,RightLeg,1,0,0,2,85,2,0,2,0.2,0.15,0.2,2,85,0,0,2,-0.7,0.1,0,2,-90,0,0,2,LeftLeg,-1,0,0,2,80,-2,0,2,-0.75,0.1,0.2,2,-95,0,0,2,-0.5,0,0,2,0,0,0,2
  2700.         end
  2701.     })
  2702.     addmode("r", {
  2703.         idle = function()
  2704.             RightHip.C0 = Lerp(RightHip.C0,cfMul(cf(1, -0.9 - 0.2 * sin(sine * 2), 0),angles(1.5707963267948966, 1.6580627893946132 - 0.17453292519943295 * sin(sine + 0.8), -1.5707963267948966)),deltaTime)
  2705.             RootJoint.C0 = Lerp(RootJoint.C0,cfMul(cf(0.3 * sin(sine + 0.8), -0.1 + 0.2 * sin(sine * 2), 0),angles(-1.5707963267948966, 0, -3.141592653589793)),deltaTime)
  2706.             Neck.C0 = Lerp(Neck.C0,cfMul(cf(0, 1, 0),angles(-1.5707963267948966 + 0.08726646259971647 * sin((sine - 0.5) * 2), 0.08726646259971647 * sin(sine - 1), -3.141592653589793 + 0.2617993877991494 * sin(sine * 5))),deltaTime)
  2707.             LeftShoulder.C0 = Lerp(LeftShoulder.C0,cfMul(cf(-1 + 0.1 * sin(sine * 7), 0.2 - 0.1 * sin(sine + 0.8), -0.25),angles(1.5707963267948966 + 0.5235987755982988 * sin(sine * 7), -0.6981317007977318, 0.3490658503988659 * sin(sine * 7))),deltaTime)
  2708.             LeftHip.C0 = Lerp(LeftHip.C0,cfMul(cf(-1, -0.9 - 0.2 * sin(sine * 2), 0),angles(1.5707963267948966, -1.6580627893946132 - 0.17453292519943295 * sin(sine + 0.8), 1.5707963267948966)),deltaTime)
  2709.             RightShoulder.C0 = Lerp(RightShoulder.C0,cfMul(cf(1 + 0.1 * sin(sine * 7), 0.2 + 0.1 * sin(sine + 0.8), -0.25),angles(1.5707963267948966 - 0.5235987755982988 * sin(sine * 7), 0.6981317007977318, 0.3490658503988659 * sin(sine * 7))),deltaTime)
  2710.             --RightLeg,1,0,0,1,90,0,0,1,-0.9,-0.2,0,2,95,-10,0.8,1,0,0,0,1,-90,0,0,1,Torso,0,0.3,0.8,1,-90,0,0,1,-0.1,0.2,0,2,0,0,0,1,0,0,0,1,-180,0,0,1,Head,0,0,0,1,-90,5,-0.5,2,1,0,0,1,0,5,-1,1,0,0,0,1,-180,15,0,5,Fedora_Handle,8.657480066176504e-09,0,0,1,-6,0,0,1,-0.15052366256713867,0,0,1,0,0,0,1,-0.010221302509307861,0,0,1,0,0,0,1,LeftArm,-1,0.1,0,7,90,30,0,7,0.2,-0.1,0.8,1,-40,0,0,1,-0.25,0,0,1,0,20,0,7,LeftLeg,-1,0,0,1,90,0,0,1,-0.9,-0.2,0,2,-95,-10,0.8,1,0,0,0,1,90,0,0,1,RightArm,1,0.1,0,7,90,-30,0,7,0.2,0.1,0.8,1,40,0,0,1,-0.25,0,0,1,-0,20,0,7
  2711.         end
  2712.     })
  2713.     addmode("t", {
  2714.         idle = function()
  2715.             LeftShoulder.C0 = Lerp(LeftShoulder.C0,cfMul(cf(-1, 0.5, 0),angles(1.5707963267948966, -1.6580627893946132 + 0.08726646259971647 * sin((sine - 0.3) * 4), 1.5707963267948966)),deltaTime)
  2716.             RightShoulder.C0 = Lerp(RightShoulder.C0,cfMul(cf(1 + 0.15 * sin((sine - 0.4) * 4), 1.42, 0),angles(1.5707963267948966, 1.4835298641951802 - 0.3490658503988659 * sin((sine - 0.4) * 4), 1.5707963267948966)),deltaTime)
  2717.             Neck.C0 = Lerp(Neck.C0,cfMul(cf(0, 1, 0),angles(-1.4835298641951802, 0.04363323129985824 - 0.08726646259971647 * sin((sine + 0.1) * 4), -3.141592653589793 + 0.04363323129985824 * sin(sine * 4))),deltaTime)
  2718.             RootJoint.C0 = Lerp(RootJoint.C0,cfMul(cf(0.1 * sin(sine * 4), 0, 0),angles(-1.5707963267948966, -0.08726646259971647 + 0.08726646259971647 * sin(sine * 4), -3.141592653589793)),deltaTime)
  2719.             RightHip.C0 = Lerp(RightHip.C0,cfMul(cf(1, -1.1 + 0.1 * sin(sine * 4), 0),angles(1.5707963267948966, 1.5707963267948966 + 0.08726646259971647 * sin(sine * 4), -1.5707963267948966)),deltaTime)
  2720.             LeftHip.C0 = Lerp(LeftHip.C0,cfMul(cf(-1 - 0.02 * sin(sine * 4), -0.925 - 0.07 * sin(sine * 4), 0),angles(1.5707963267948966, -1.7453292519943295 + 0.08726646259971647 * sin(sine * 4), 1.5707963267948966)),deltaTime)
  2721.             --LeftArm,-1,0,0,4,90,0,0,4,0.5,0,0,4,-95,5,-0.3,4,0,0,0,4,90,0,0,4,RightArm,1,0.15,-0.4,4,90,0,0,4,1.42,0,0,4,85,-20,-0.4,4,0,0,0,4,90,0,0,4,Head,0,0,0,4,-85,0,0,4,1,0,0,4,2.5,-5,0.1,4,0,0,0,4,-180,2.5,0,4,Torso,0,0.1,0,4,-90,0,0,4,0,0,0,4,-5,5,0,4,0,0,0,4,-180,0,0,4,RightLeg,1,0,0,4,90,0,0,4,-1.1,0.1,0,4,90,5,0,4,0,0,0,4,-90,0,0,4,LeftLeg,-1,-0.02,0,4,90,0,0,4,-0.925,-0.07,0,4,-100,5,0,4,0,0,0,4,90,0,0,4
  2722.         end
  2723.     })
  2724.     addmode("y", {
  2725.         idle = function()
  2726.             LeftShoulder.C0 = Lerp(LeftShoulder.C0,cfMul(cf(-1.5, 0.5, 0),angles(-1.7453292519943295, 0.17453292519943295 - 0.04363323129985824 * sin(sine * 2), -1.4835298641951802)),deltaTime)
  2727.             RightHip.C0 = Lerp(RightHip.C0,cfMul(cf(1, -0.9000000953674316 - 0.1 * sin(sine * 2), 0),angles(-1.3962634015954636, 1.3962634015954636, 1.5707963267948966)),deltaTime)
  2728.             LeftHip.C0 = Lerp(LeftHip.C0,cfMul(cf(-1, -1.0000001192092896 - 0.1 * sin(sine * 2), 0),angles(-1.5707963267948966, -1.3962634015954636, -1.5707963267948966)),deltaTime)
  2729.             Neck.C0 = Lerp(Neck.C0,cfMul(cf(0, 1, 0),angles(-2.0943951023931953 + 0.08726646259971647 * sin((sine - 1) * 2), -0.08726646259971647, 2.792526803190927)),deltaTime)
  2730.             RightShoulder.C0 = Lerp(RightShoulder.C0,cfMul(cf(1, 1.2000000476837158, 0),angles(2.6179938779914944 + 0.08726646259971647 * sin((sine - 1) * 2), 0.6981317007977318, -1.3962634015954636)),deltaTime)
  2731.             RootJoint.C0 = Lerp(RootJoint.C0,cfMul(cf(0, 0.1 * sin(sine * 2), 0),angles(-1.6580627893946132, 0.08726646259971647, 3.0543261909900767)),deltaTime)
  2732.             --LeftArm,-1.5,0,0,2,-100,0,0,2,0.5,0,0,2,10,-2.5,0,2,0,0,0,2,-85,0,0,2,RightLeg,1,0,0,2,-80,0,0,2,-0.9000000953674316,-0.1,0,2,80,0,0,2,0,0,0,2,90,0,0,2,LeftLeg,-1,0,0,2,-90,0,0,2,-1.0000001192092896,-0.1,0,2,-80,0,0,2,0,0,0,2,-90,0,0,2,Fedora_Handle,8.657480066176504e-09,0,0,2,-6,0,0,2,-0.15052366256713867,0,0,2,0,0,0,2,-0.010221302509307861,0,0,2,0,0,0,2,Head,0,0,0,2,-120,5,-1,2,1,0,0,2,-5,0,0,2,0,0,0,2,160,0,0,2,RightArm,1,0,0,2,150,5,-1,2,1.2000000476837158,0,0,2,40,0,0,2,0,0,0,2,-80,0,0,2,Torso,0,0,0,2,-95,0,0,2,0,0.1,0,2,5,0,0,2,0,0,0,2,175,0,0,2
  2733.         end
  2734.     })
  2735.     addmode("u", {
  2736.         idle = function()
  2737.             RootJoint.C0 = Lerp(RootJoint.C0,cfMul(cf(0, 0.75 + 0.25 * sin(sine * 2), 0),angles(-1.5707963267948966, 0, 3.141592653589793)),deltaTime)
  2738.             Neck.C0 = Lerp(Neck.C0,cfMul(cf(0, 1.5 - 0.1 * sin((sine + 0.2) * 2), 0),angles(-1.5707963267948966 - 0.08726646259971647 * sin((sine + 0.4) * 2), 0, 3.141592653589793 + 0.3490658503988659 * sin(sine * 0.66))),deltaTime)
  2739.             LeftHip.C0 = Lerp(LeftHip.C0,cfMul(cf(-0.5 - 1 * sin((sine + 0.2) * 2.2), -0.75 - 0.25 * sin(sine * 2), 1 * sin((sine + 0.95) * 2.2)),angles(0, -1.5707963267948966, 0)),deltaTime)
  2740.             RightHip.C0 = Lerp(RightHip.C0,cfMul(cf(0.5 + 1 * sin((sine + 0.2) * 2.2), -0.75 - 0.25 * sin(sine * 2), -1 * sin((sine + 0.95) * 2.2)),angles(0, 1.5707963267948966, 0)),deltaTime)
  2741.             RightShoulder.C0 = Lerp(RightShoulder.C0,cfMul(cf(-0.5 - 1.85 * sin(sine * 2), 0.8 - 0.5 * sin(sine * 2), -1.85 * sin((sine + 0.75) * 2)),angles(0, 1.5707963267948966, 0)),deltaTime)
  2742.             LeftShoulder.C0 = Lerp(LeftShoulder.C0,cfMul(cf(0.5 + 1.85 * sin(sine * 2), 0.8 - 0.5 * sin(sine * 2), 1.85 * sin((sine + 0.75) * 2)),angles(0, -1.5707963267948966, 0)),deltaTime)
  2743.             --Torso,0,0,0,2,-90,0,0,2,0.75,0.25,0,2,-0,0,0,2,0,0,0,2,180,0,0,2,Fedora_Handle,8.657480066176504e-09,0,0,2,-6,0,0,2,-0.15052366256713867,0,0,2,0,0,0,2,-0.010221302509307861,0,0,2,0,0,0,2,Head,0,0,0,2,-90,-5,0.4,2,1.5,-0.1,0.2,2,-0,0,0,2,0,0,0,2,180,20,0,0.66,LeftLeg,-0.5,-1,0.2,2.2,-0,0,0,2,-0.75,-0.25,0,2,-90,0,0,2,0,1,0.95,2.2,0,0,0,2,RightLeg,0.5,1,0.2,2.2,0,0,0,2,-0.75,-0.25,0,2,90,0,0,2,0,-1,0.95,2.2,0,0,0,2,RightArm,-0.5,-1.85,0,2,0,0,0,2,0.8,-0.5,0,2,90,0,0,2,0,-1.85,0.75,2,0,0,0,2,LeftArm,0.5,1.85,0,2,-0,0,0,2,0.8,-0.5,0,2,-90,0,0,2,0,1.85,0.75,2,0,0,0,2
  2744.         end
  2745.     })
  2746.     addmode("i", {
  2747.         idle = function()
  2748.             LeftShoulder.C0 = Lerp(LeftShoulder.C0,cfMul(cf(-0.5, 0.5 + 0.1 * sin((sine - 0.4444444444444444) * 9), 0),angles(2.9670597283903604 + 0.17453292519943295 * sin((sine - 0.17777777777777778) * 9), -0.5235987755982988, 1.5707963267948966 + 0.17453292519943295 * sin(sine * 4.5))),deltaTime)
  2749.             LeftHip.C0 = Lerp(LeftHip.C0,cfMul(cf(-1, -0.5 + 0.1 * sin((sine + 0.26666666666666666) * 4.5), -0.5),angles(1.7453292519943295 - 1.0471975511965976 * sin(sine * 4.5), -1.5707963267948966 + 0.03490658503988659 * sin(sine * 4.5), 1.5707963267948966)),deltaTime)
  2750.             RootJoint.C0 = Lerp(RootJoint.C0,cfMul(cf(0, -0.5 + 0.5 * sin((sine + 0.17777777777777778) * 9), 0),angles(-1.3962634015954636 - 0.03490658503988659 * sin((sine + 0.17777777777777778) * 9), -0.05235987755982989 * sin(sine * 4.5), 3.141592653589793 + 0.03490658503988659 * sin(sine * 4.5))),deltaTime)
  2751.             Neck.C0 = Lerp(Neck.C0,cfMul(cf(0, 1 + 0.2 * sin(sine * 9), 0),angles(-1.5707963267948966 + 0.08726646259971647 * sin(sine * 9), 0.08726646259971647 * sin(sine * 4.5), 3.141592653589793 - 0.06981317007977318 * sin(sine * 4.5))),deltaTime)
  2752.             RightShoulder.C0 = Lerp(RightShoulder.C0,cfMul(cf(0.5, 0.5 + 0.1 * sin((sine - 0.4444444444444444) * 9), 0),angles(2.9670597283903604 + 0.17453292519943295 * sin((sine - 0.17777777777777778) * 9), 0.5235987755982988, -1.5707963267948966 + 0.17453292519943295 * sin(sine * 4.5))),deltaTime)
  2753.             RightHip.C0 = Lerp(RightHip.C0,cfMul(cf(1, -0.5 + 0.1 * sin((sine - 0.26666666666666666) * 4.5), -0.5),angles(1.7453292519943295 + 1.0471975511965976 * sin(sine * 4.5), 1.5707963267948966 + 0.03490658503988659 * sin(sine * 4.5), -1.5707963267948966)),deltaTime)
  2754.             --LeftArm,-0.5,0,0,4.5,170,10,-0.17777777777777778,9,0.5,0.1,-0.4444444444444444,9,-30,0,0,4.5,0,0,0,4.5,90,10,0,4.5,LeftLeg,-1,0,0,4.5,100,-60,0,4.5,-0.5,0.1,0.26666666666666666,4.5,-90,2,0,4.5,-0.5,0,0,4.5,90,0,0,4.5,Torso,0,0,0,4.5,-80,-2,0.17777777777777778,9,-0.5,0.5,0.17777777777777778,9,-0,-3,0,4.5,0,0,0,4.5,180,2,0,4.5,Head,0,0,0,4.5,-90,5,0,9,1,0.2,0,9,-0,5,0,4.5,0,0,0,4.5,180,-4,0,4.5,RightArm,0.5,0,0,4.5,170,10,-0.17777777777777778,9,0.5,0.1,-0.4444444444444444,9,30,0,0,4.5,0,0,0,4.5,-90,10,0,4.5,RightLeg,1,0,0,4.5,100,60,0,4.5,-0.5,0.1,-0.26666666666666666,4.5,90,2,0,4.5,-0.5,0,0,4.5,-90,0,0,4.5
  2755.         end,
  2756.     })
  2757.     addmode("o", {
  2758.         idle = function()
  2759.             local rY, lY = raycastlegs()
  2760.  
  2761.             LeftHip.C0 = Lerp(LeftHip.C0,cfMul(cf(-1, -1 + lY, lY * -0.5),angles(-1.8325957145940461 - 0.08726646259971647 * sin(sine * 2), -1.4835298641951802, -1.5707963267948966)),deltaTime)
  2762.             RootJoint.C0 = Lerp(RootJoint.C0,cfMul(cf(0, 0, 0.09 * sin(sine * 2)),angles(-1.3962634015954636 + 0.08726646259971647 * sin(sine * 2), -0.08726646259971647, 3.141592653589793)),deltaTime)
  2763.             LeftShoulder.C0 = Lerp(LeftShoulder.C0,cfMul(cf(-1, 0.5, 0),angles(2.9670597283903604 + 0.08726646259971647 * sin(sine * 1), -1.5707963267948966 + 0.08726646259971647 * sin((sine + 0.6) * 1), 1.5707963267948966)),deltaTime)
  2764.             RightHip.C0 = Lerp(RightHip.C0,cfMul(cf(1, -1.1 + rY, rY * -0.5),angles(-1.7453292519943295 - 0.08726646259971647 * sin(sine * 2), 1.5707963267948966, 1.5707963267948966)),deltaTime)
  2765.             Neck.C0 = Lerp(Neck.C0,cfMul(cf(0, 1, 0),angles(-1.2217304763960306 - 0.08726646259971647 * sin((sine + 0.3) * 2), -0.2617993877991494 - 0.08726646259971647 * sin(sine * 2), 3.141592653589793)),deltaTime)
  2766.             RightShoulder.C0 = Lerp(RightShoulder.C0,cfMul(cf(1, 0.5, 0),angles(2.8797932657906435 + 0.08726646259971647 * sin(sine * 1), 1.5707963267948966 - 0.08726646259971647 * sin((sine + 0.6) * 1), -1.5707963267948966)),deltaTime)
  2767.             --LeftLeg,-1,0,0,2,-105,-5,0,2,-1,0,0,2,-85,0,0,2,0,0,0,2,-90,0,0.75,2,Torso,0,0,0,2,-80,5,0,2,0,0,0,2,-5,0,0,2,0,0.09,0,2,180,0,0,2,LeftArm,-1,0,0,2,170,5,0,1,0.5,0,0,2,-90,5,0.6,1,0,0,0,2,90,0,0,2,RightLeg,1,0,0,2,-100,-5,0,2,-1.1,0,0,2,90,0,0,2,0,0,0,2,90,0,0.75,2,Head,0,0,0,2,-70,-5,0.3,2,1,0,0,2,-15,-5,0,2,0,0,0,2,180,0,0,2,RightArm,1,0,0,2,165,5,0,1,0.5,0,0,2,90,-5,0.6,1,0,0,0,2,-90,0,0,2
  2768.         end,
  2769.         walk = function()
  2770.             local fw, rt = velbycfrvec()
  2771.  
  2772.             local rY, lY = raycastlegs()
  2773.  
  2774.             Neck.C0 = Lerp(Neck.C0,cfMul(cf(0, 1, 0),angles(-1.5707963267948966 + 0.04363323129985824 * sin(sine * 16), 0, 3.141592653589793 + 0.08726646259971647 * sin(sine * 8) - rt)),deltaTime)
  2775.             RightHip.C0 = Lerp(RightHip.C0,cfMul(cf(1, -1 - 0.3 * sin((sine + 0.15) * 8) + rY, rY * -0.5),angles(-1.5707963267948966 - 0.6981317007977318 * sin(sine * 8) * fw, 1.5707963267948966 + 0.6981317007977318 * sin(sine * 8) * rt, 1.5707963267948966)),deltaTime)
  2776.             RightShoulder.C0 = Lerp(RightShoulder.C0,cfMul(cf(1, 0.5, 0),angles(0.08726646259971647 * sin((sine - 0.05) * 16), 1.5707963267948966 + 0.08726646259971647 * sin(sine * 8) - rt/3, 1.5707963267948966)),deltaTime)
  2777.             LeftShoulder.C0 = Lerp(LeftShoulder.C0,cfMul(cf(-1, 0.5, 0),angles(0.08726646259971647 * sin((sine - 0.05) * 16), -1.5707963267948966 + 0.08726646259971647 * sin(sine * 8) - rt/3, -1.5707963267948966)),deltaTime)
  2778.             RootJoint.C0 = Lerp(RootJoint.C0,cfMul(cf(0, 0.1 * sin((sine + 0.1) * 16), 0),angles(-1.5707963267948966, 0, 3.141592653589793 - 0.08726646259971647 * sin(sine * 8))),deltaTime)
  2779.             LeftHip.C0 = Lerp(LeftHip.C0,cfMul(cf(-1, -1 + 0.3 * sin((sine + 0.15) * 8) + lY, lY * -0.5),angles(1.5707963267948966 + 0.6981317007977318 * sin(sine * 8) * fw, -1.5707963267948966 + 0.6981317007977318 * sin(sine * 8) * rt, 1.5707963267948966)),deltaTime)
  2780.             --Head,0,0,0,8,-90,2.5,0,16,1,0,0,8,-0,0,0,8,0,0,0,8,180,5,0,8,RightLeg,1,0,0,8,-90,-40,0,8,-1,-0.3,0.15,8,90,40,0,8,0,0,0,8,90,0,0,8,RightArm,1,0,0,8,0,5,-0.05,16,0.5,0,0,8,90,5,0,8,0,0,0,8,90,0,0,8,LeftArm,-1,0,0,8,0,5,-0.05,16,0.5,0,0,8,-90,5,0,8,0,0,0,8,-90,0,0,8,Torso,0,0,0,8,-90,0,0,8,0,0.1,0.1,16,-0,0,0,8,0,0,0,8,180,-5,0,8,LeftLeg,-1,0,0,8,90,40,0,8,-1,0.3,0.15,8,-90,40,0,8,0,0,0,8,90,0,0,8
  2781.         end
  2782.     })
  2783.     addmode("p", {
  2784.         idle = function()
  2785.             RightShoulder.C0 = Lerp(RightShoulder.C0,cfMul(cf(1.5, 0.5, 0),angles(1.5707963267948966, 3.141592653589793, -1.5707963267948966)),deltaTime)
  2786.             RightHip.C0 = Lerp(RightHip.C0,cfMul(cf(1, -1, 0),angles(0, 1.5707963267948966, 0)),deltaTime)
  2787.             LeftShoulder.C0 = Lerp(LeftShoulder.C0,cfMul(cf(-1.5, 0.5, 0),angles(1.5707963267948966, 3.141592653589793, 1.5707963267948966)),deltaTime)
  2788.             LeftHip.C0 = Lerp(LeftHip.C0,cfMul(cf(-1, -1, 0),angles(0, -1.5707963267948966, 0)),deltaTime)
  2789.             Neck.C0 = Lerp(Neck.C0,cfMul(cf(0, 1, 0),angles(-1.5707963267948966, 0, -3.141592653589793)),deltaTime)
  2790.             RootJoint.C0 = Lerp(RootJoint.C0,cfMul(cf_0,angles(-1.5707963267948966, 0, -3.141592653589793)),deltaTime)
  2791.             --RightArm,1.5,0,0,1,90,0,0,1,0.5,0,0,1,180,0,0,1,0,0,0,1,-90,0,0,1,RightLeg,1,0,0,1,0,0,0,1,-1,0,0,1,90,0,0,1,0,0,0,1,0,0,0,1,Fedora_Handle,8.657480066176504e-09,0,0,1,-6,0,0,1,-0.15052366256713867,0,0,1,0,0,0,1,-0.010221302509307861,0,0,1,0,0,0,1,LeftArm,-1.5,0,0,1,90,0,0,1,0.5,0,0,1,180,0,0,1,0,0,0,1,90,0,0,1,LeftLeg,-1,0,0,1,-0,0,0,1,-1,0,0,1,-90,0,0,1,0,0,0,1,0,0,0,1,Head,0,0,0,1,-90,0,0,1,1,0,0,1,0,0,0,1,0,0,0,1,-180,0,0,1,Torso,0,0,0,1,-90,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,-180,0,0,1
  2792.         end
  2793.     })
  2794.     addmode("f", {
  2795.         idle = function()
  2796.             LeftShoulder.C0 = Lerp(LeftShoulder.C0,cfMul(cf(-1, 0.5, 0),angles(-3.0543261909900767 - 0.17453292519943295 * sin((sine + 1.5) * 1), -1.5707963267948966 + 0.08726646259971647 * sin((sine + 0.6) * 1), -1.5707963267948966)),deltaTime)
  2797.             RightShoulder.C0 = Lerp(RightShoulder.C0,cfMul(cf(1, 0.5, 0),angles(3.141592653589793 - 0.08726646259971647 * sin(sine * 1), 0.3490658503988659 + 0.08726646259971647 * sin((sine + 0.3) * 1), -1.9198621771937625 + 0.08726646259971647 * sin((sine + 1) * 1))),deltaTime)
  2798.             Neck.C0 = Lerp(Neck.C0,cfMul(cf(0, 1, 0),angles(-1.3089969389957472 - 0.2617993877991494 * sin((sine + 1.2) * 1), 0.08726646259971647 * sin((sine + 0.2) * 0.5), -2.9670597283903604)),deltaTime)
  2799.             RootJoint.C0 = Lerp(RootJoint.C0,cfMul(cf(0, 5 - 0.5 * sin((sine - 0.2) * 1), 0.2 * sin((sine - 1.2) * 1)),angles(-0.08726646259971647 + 0.17453292519943295 * sin((sine + 1.2) * 1), 0.08726646259971647 * sin(sine * 0.5), 3.141592653589793)),deltaTime)
  2800.             LeftHip.C0 = Lerp(LeftHip.C0,cfMul(cf(-1, -1, 0),angles(1.3962634015954636 + 0.12217304763960307 * sin((sine + 1.5) * 1), -1.2217304763960306 + 0.08726646259971647 * sin((sine + 0.2) * 0.5), 1.5707963267948966)),deltaTime)
  2801.             RightHip.C0 = Lerp(RightHip.C0,cfMul(cf(1, -1, 0),angles(1.9198621771937625 + 0.12217304763960307 * sin((sine + 1.5) * 1), 1.2217304763960306 + 0.08726646259971647 * sin((sine + 0.2) * 0.5), -1.5707963267948966)),deltaTime)
  2802.             --LeftArm,-1,0,0,1,-175,-10,1.5,1,0.5,0,0,1,-90,5,0.6,1,0,0,0,1,-90,0,0,1,RightArm,1,0,0,1,180,-5,0,1,0.5,0,0,1,20,5,0.3,1,0,0,0,1,-110,5,1,1,Head,0,0,0,1,-75,-15,1.2,1,1,0,0,1,-0,5,0.2,0.5,0,0,0,1,-170,0,0,1,Torso,0,0,0,1,-5,10,1.2,1,5,-0.5,-0.2,1,-0,5,0,0.5,0,0.2,-1.2,1,180,0,0,1,LeftLeg,-1,0,0,1,80,7,1.5,1,-1,0,0,1,-70,5,0.2,0.5,0,0,0,1,90,0,0,1,RightLeg,1,0,0,1,110,7,1.5,1,-1,0,0,1,70,5,0.2,0.5,0,0,0,1,-90,0,0,1
  2803.         end,
  2804.         walk = function()
  2805.             local fw, rt = velbycfrvec()
  2806.  
  2807.             LeftShoulder.C0 = Lerp(LeftShoulder.C0,cfMul(cf(-1, 0.5, 0),angles(-3.0543261909900767 - 0.17453292519943295 * sin((sine + 1.5) * 1) - fw * 0.1, -1.5707963267948966 + 0.08726646259971647 * sin((sine + 0.6) * 1) + rt * 0.2, -1.5707963267948966)),deltaTime)
  2808.             RightShoulder.C0 = Lerp(RightShoulder.C0,cfMul(cf(1, 0.5, 0),angles(3.141592653589793 - 0.08726646259971647 * sin(sine * 1), 0.3490658503988659 + 0.08726646259971647 * sin((sine + 0.3) * 1), -1.9198621771937625 + 0.08726646259971647 * sin((sine + 1) * 1))),deltaTime)
  2809.             Neck.C0 = Lerp(Neck.C0,cfMul(cf(0, 1, 0),angles(-1.3089969389957472 - 0.2617993877991494 * sin((sine + 1.2) * 1) + fw * 0.1, 0.08726646259971647 * sin((sine + 0.2) * 0.5) - rt * 0.2, -2.9670597283903604)),deltaTime)
  2810.             RootJoint.C0 = Lerp(RootJoint.C0,cfMul(cf(0, 5 - 0.5 * sin((sine - 0.2) * 1), 0.2 * sin((sine - 1.2) * 1)),angles(-0.08726646259971647 + 0.17453292519943295 * sin((sine + 1.2) * 1) - fw * 0.2, 0.08726646259971647 * sin(sine * 0.5), 3.141592653589793 - rt * 0.2)),deltaTime)
  2811.             LeftHip.C0 = Lerp(LeftHip.C0,cfMul(cf(-1, -1, 0),angles(1.3962634015954636 + 0.12217304763960307 * sin((sine + 1.5) * 1) - fw * 0.2, -1.2217304763960306 + 0.08726646259971647 * sin((sine + 0.2) * 0.5), 1.5707963267948966)),deltaTime)
  2812.             RightHip.C0 = Lerp(RightHip.C0,cfMul(cf(1, -1, 0),angles(1.9198621771937625 + 0.12217304763960307 * sin((sine + 1.5) * 1) - fw * 0.2, 1.2217304763960306 + 0.08726646259971647 * sin((sine + 0.2) * 0.5), -1.5707963267948966)),deltaTime)
  2813.             --LeftArm,-1,0,0,1,-175,-10,1.5,1,0.5,0,0,1,-90,5,0.6,1,0,0,0,1,-90,0,0,1,RightArm,1,0,0,1,180,-5,0,1,0.5,0,0,1,20,5,0.3,1,0,0,0,1,-110,5,1,1,Head,0,0,0,1,-75,-15,1.2,1,1,0,0,1,-0,5,0.2,0.5,0,0,0,1,-170,0,0,1,Torso,0,0,0,1,-5,10,1.2,1,5,-0.5,-0.2,1,-0,5,0,0.5,0,0.2,-1.2,1,180,0,0,1,LeftLeg,-1,0,0,1,80,7,1.5,1,-1,0,0,1,-70,5,0.2,0.5,0,0,0,1,90,0,0,1,RightLeg,1,0,0,1,110,7,1.5,1,-1,0,0,1,70,5,0.2,0.5,0,0,0,1,-90,0,0,1
  2814.         end
  2815.     })
  2816.     addmode("g", {
  2817.         idle = function()
  2818.             LeftShoulder.C0 = Lerp(LeftShoulder.C0,cfMul(cf(-0.9 + 0.4 * sin(sine * 8), 0.5, 0.5 * sin((sine + 0.25) * 4)),angles(1.5707963267948966, -1.5707963267948966 + 1.0471975511965976 * sin(sine * 8), 1.5707963267948966 + 0.6981317007977318 * sin((sine + 0.25) * 4))),deltaTime)
  2819.             RootJoint.C0 = Lerp(RootJoint.C0,cfMul(cf(0.3 * sin((sine + 0.4) * 8), 0, 0),angles(-1.5707963267948966, 0.3490658503988659 * sin(sine * 8), -3.141592653589793)),deltaTime)
  2820.             Neck.C0 = Lerp(Neck.C0,cfMul(cf(0, 1, 0),angles(-1.5707963267948966 + 0.061086523819801536 * sin((sine + 0.125) * 16), -0.3839724354387525 * sin(sine * 8), -3.141592653589793)),deltaTime)
  2821.             RightHip.C0 = Lerp(RightHip.C0,cfMul(cf(1, -1 + 0.4 * sin((sine - 0.01) * 8), 0),angles(1.5707963267948966, 1.7453292519943295 + 0.6981317007977318 * sin(sine * 8), -1.5707963267948966)),deltaTime)
  2822.             LeftHip.C0 = Lerp(LeftHip.C0,cfMul(cf(-1, -1 - 0.4 * sin((sine - 0.01) * 8), 0),angles(1.5707963267948966, -1.7453292519943295 + 0.6981317007977318 * sin(sine * 8), 1.5707963267948966)),deltaTime)
  2823.             RightShoulder.C0 = Lerp(RightShoulder.C0,cfMul(cf(0.9 + 0.4 * sin(sine * 8), 0.5, -0.5 * sin((sine - 0.35) * 4)),angles(1.5707963267948966 + 0.6981317007977318 * sin(sine * 4), 1.5707963267948966 + 1.0471975511965976 * sin(sine * 8), -1.5707963267948966 + 0.17453292519943295 * sin((sine - 0.35) * 4))),deltaTime)
  2824.             --LeftArm,-0.9,0.4,0,8,90,0,0.25,4,0.5,0,0,8,-90,60,0,8,0,0.5,0.25,4,90,40,0.25,4,Torso,0,0.3,0.4,8,-90,0,0,8,0,0,0,4,0,20,0,8,0,0,0,8,-180,0,0,8,Head,0,0,0,8,-90,3.5,0.125,16,1,0,0,8,0,-22,0,8,0,0,0,8,-180,0,0,1.1,RightLeg,1,0,0,8,90,0,0,8,-1,0.4,-0.01,8,100,40,0,8,0,0,0,8,-90,0,0,8,LeftLeg,-1,0,0,8,90,0,0,8,-1,-0.4,-0.01,8,-100,40,0,8,0,0,0,8,90,0,0,8,RightArm,0.9,0.4,0,8,90,40,0,4,0.5,0,0,8,90,60,0,8,0,-0.5,-0.35,4,-90,10,-0.35,4
  2825.         end
  2826.     })
  2827.     addmode("h", {
  2828.         idle = function()
  2829.             Neck.C0 = Lerp(Neck.C0,cfMul(cf(0, 1, 0),angles(-1.5707963267948966, -0.4363323129985824 * sin(sine * 8), -3.141592653589793)),deltaTime)
  2830.             RightHip.C0 = Lerp(RightHip.C0,cfMul(cf(1, -1 + 0.3 * sin(sine * 8), 0),angles(1.5707963267948966, 1.5707963267948966 + 0.5235987755982988 * sin(sine * 8), -1.5707963267948966)),deltaTime)
  2831.             LeftShoulder.C0 = Lerp(LeftShoulder.C0,cfMul(cf(-0.5, 1, 0),angles(-0.5235987755982988, -1.5707963267948966 - 0.5235987755982988 * sin(sine * 8), 3.141592653589793)),deltaTime)
  2832.             RightShoulder.C0 = Lerp(RightShoulder.C0,cfMul(cf(0.5, 1, 0),angles(-0.5235987755982988, 1.5707963267948966 - 0.5235987755982988 * sin(sine * 8), 3.141592653589793)),deltaTime)
  2833.             RootJoint.C0 = Lerp(RootJoint.C0,cfMul(cf(-0.1 * sin(sine * 8), 0.2 * sin((sine + 0.1) * 16), 0),angles(-1.5707963267948966, 0.2617993877991494 * sin(sine * 8), -3.141592653589793)),deltaTime)
  2834.             LeftHip.C0 = Lerp(LeftHip.C0,cfMul(cf(-1, -1 - 0.3 * sin(sine * 8), 0),angles(1.5707963267948966, -1.5707963267948966 + 0.5235987755982988 * sin(sine * 8), 1.5707963267948966)),deltaTime)
  2835.             --Head,0,0,0,8,-90,0,0,8,1,0,0,8,0,-25,0,8,0,0,0,8,-180,0,0,8,RightLeg,1,0,0,8,90,0,0,8,-1,0.3,0,8,90,30,0,8,0,0,0,8,-90,0,0,8,LeftArm,-0.5,0,0,8,-30,0,0,8,1,0,0,8,-90,-30,0,8,0,0,0,8,180,0,0,8,RightArm,0.5,0,0,8,-30,0,0,8,1,0,0,16,90,-30,0,8,0,0,0,8,180,0,0,8,Torso,0,-0.1,0,8,-90,0,0,8,0,0.2,0.1,16,0,15,0,8,0,0,0,8,-180,0,0,8,LeftLeg,-1,0,0,8,90,0,0,8,-1,-0.3,0,8,-90,30,0,8,0,0,0,8,90,0,0,8,Fedora_Handle,8.657480066176504e-09,0,0,8,-6,0,0,8,-0.15052366256713867,0,0,8,0,0,0,8,-0.010221302509307861,0,0,8,0,0,0,8
  2836.         end
  2837.     })
  2838.     addmode("j", {
  2839.         idle = function()
  2840.             LeftHip.C0 = Lerp(LeftHip.C0,cfMul(cf(-0.8, -1, -0.1),angles(0.17453292519943295, -0.6981317007977318, 0)),deltaTime)
  2841.             LeftShoulder.C0 = Lerp(LeftShoulder.C0,cfMul(cf(-1.2, 0.5, 0),angles(-0.3490658503988659 + 0.08726646259971647 * sin((sine + 0.1) * 4), 0, 0.6981317007977318 + 0.08726646259971647 * sin((sine + 0.1) * 4))),deltaTime)
  2842.             RightHip.C0 = Lerp(RightHip.C0,cfMul(cf(1.1, -1, 0),angles(1.5707963267948966, 1.7453292519943295, -1.5707963267948966)),deltaTime)
  2843.             Neck.C0 = Lerp(Neck.C0,cfMul(cf(0, 1, 0),angles(-1.5707963267948966 + 0.08726646259971647 * sin((sine + 0.1) * 4), 0, 2.792526803190927)),deltaTime)
  2844.             RootJoint.C0 = Lerp(RootJoint.C0,cfMul(cf(0, -1.7 + 0.5 * sin(sine * 4), 0.15 * sin(sine * 4)),angles(3.3161255787892263 + 0.17453292519943295 * sin(sine * 4), 0, 3.6651914291880923)),deltaTime)
  2845.             RightShoulder.C0 = Lerp(RightShoulder.C0,cfMul(cf(0.8 + 0.4 * sin(sine * 4), 0.6 + 0.1 * sin(sine * 4), 0.4 - 0.25 * sin(sine * 4)),angles(2.9670597283903604, 2.2689280275926285 - 0.17453292519943295 * sin(sine * 4), -1.4835298641951802 - 0.17453292519943295 * sin(sine * 4))),deltaTime)
  2846.             --GalaxyBeautifulHair_Handle,-0.15000000596046448,0,0,1,0,0,0,1,0.10000000149011612,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,LeftLeg,-0.8,0,0,4,10,0,0,4,-1,0,0,4,-40,0,0,4,-0.1,0,0,4,0,0,0,4,LeftArm,-1.2,0,0,4,-20,5,0.1,4,0.5,0,0,4,0,0,0,4,0,0,0,4,40,5,0.1,4,Fedora_Handle,8.657480066176504e-09,0,0,1,-6,0,0,1,-0.15052366256713867,0,0,1,0,0,0,1,-0.010221302509307861,0,0,1,0,0,0,1,ValkyrieHelm_Handle,8.658389560878277e-09,0,0,1,-15,0,0,1,-0.2433757781982422,0,0,1,0,0,0,1,-0.2657628059387207,0,0,1,0,0,0,1,RightLeg,1.1,0,0,4,90,0,0,4,-1,0,0,4,100,0,0,4,0,0,0,4,-90,0,0,4,BlackIronAntlers_Handle,8.658389560878277e-09,0,0,1,0,0,0,1,-0.6500000953674316,0,0,1,0,0,0,1,0.19972775876522064,0,0,1,0,0,0,1,DevAwardsAdurite_Handle,0,0,0,1,0,0,0,1,-0.25,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,SilverthornAntlers_Handle,8.658389560878277e-09,0,0,1,0,0,0,1,-0.6500000953674316,0,0,1,0,0,0,1,0.19972775876522064,0,0,1,0,0,0,1,Head,0,0,0,4,-90,5,0.1,4,1,0,0,4,-0,0,0,4,0,0,0,4,160,0,0,4,Torso,0,0,0,4,190,10,0,4,-1.70,0.5,0,4,-0,0,0,4,0,0.15,0,4,210,0,0,4,RightArm,0.8,0.4,0,4,170,0,0,4,0.6,0.1,0,4,130,-10,0,4,0.4,-0.25,0,4,-85,-10,0,4
  2847.         end
  2848.     })
  2849.     addmode("k", {
  2850.         idle = function()
  2851.             Neck.C0 = Lerp(Neck.C0,cfMul(cf(0, 1, 0),angles(-1.6580627893946132 - 0.08726646259971647 * sin((sine + 0.3333333333333333) * 12), -0.08726646259971647 * sin((sine + 0.2) * 6), 3.141592653589793)),deltaTime)
  2852.             LeftHip.C0 = Lerp(LeftHip.C0,cfMul(cf(-1, -0.5 - 0.5 * sin((sine + 0.39999999999999997) * 12), -0.5),angles(1.7453292519943295 - 1.0471975511965976 * sin(sine * 6), -1.5707963267948966 + 0.1308996938995747 * sin(sine * 6), 1.5707963267948966)),deltaTime)
  2853.             RightHip.C0 = Lerp(RightHip.C0,cfMul(cf(1, -0.5 - 0.5 * sin((sine + 0.39999999999999997) * 12), -0.5),angles(1.7453292519943295 + 1.0471975511965976 * sin(sine * 6), 1.5707963267948966 + 0.1308996938995747 * sin(sine * 6), -1.5707963267948966)),deltaTime)
  2854.             RootJoint.C0 = Lerp(RootJoint.C0,cfMul(cf(0, -0.5 + 0.3 * sin((sine + 0.16666666666666666) * 12), 0),angles(-1.3962634015954636 + 0.08726646259971647 * sin((sine + 0.3333333333333333) * 12), 0.08726646259971647 * sin((sine + 0.06666666666666667) * 6), 3.141592653589793)),deltaTime)
  2855.             LeftShoulder.C0 = Lerp(LeftShoulder.C0,cfMul(cf(-0.8 - 0.1 * sin(sine * 6), 0.5 + 0.1 * sin(sine * 6), -0.2),angles(3.141592653589793 - 0.17453292519943295 * sin((sine + 0.39999999999999997) * 12), -0.17453292519943295, 1.5707963267948966)),deltaTime)
  2856.             RightShoulder.C0 = Lerp(RightShoulder.C0,cfMul(cf(0.8 - 0.1 * sin(sine * 6), 0.5 - 0.1 * sin(sine * 6), -0.2),angles(3.141592653589793 - 0.17453292519943295 * sin((sine + 0.39999999999999997) * 12), 0.17453292519943295, -1.5707963267948966)),deltaTime)
  2857.             --GalaxyBeautifulHair_Handle,-0.15000000596046448,0,0,1.5,0,0,0,1.5,0.10000000149011612,0,0,1.5,0,0,0,1.5,0,0,0,1.5,0,0,0,1.5,Head,0,0,0,6,-95,-5,0.3333333333333333,12,1,0,0,6,-0,-5,0.2,6,0,0,0,6,180,0,0,6,ValkyrieHelm_Handle,8.658389560878277e-09,0,0,1.5,-15,0,0,1.5,-0.2433757781982422,0,0,1.5,0,0,0,1.5,-0.2657628059387207,0,0,1.5,0,0,0,1.5,SilverthornAntlers_Handle,8.658389560878277e-09,0,0,1.5,0,0,0,1.5,-0.6500000953674316,0,0,1.5,0,0,0,1.5,0.19972775876522064,0,0,1.5,0,0,0,1.5,BlackIronAntlers_Handle,8.658389560878277e-09,0,0,1.5,0,0,0,1.5,-0.6500000953674316,0,0,1.5,0,0,0,1.5,0.19972775876522064,0,0,1.5,0,0,0,1.5,Fedora_Handle,8.657480066176504e-09,0,0,1.5,-6,0,0,1.5,-0.15052366256713867,0,0,1.5,0,0,0,1.5,-0.010221302509307861,0,0,1.5,0,0,0,1.5,LeftLeg,-1,0,0,6,100,-60,0,6,-0.5,-0.5,0.39999999999999997,12,-90,7.5,0,6,-0.5,0,0,6,90,0,0,6,EyelessSmileHead_Handle,-0.00043487548828125,0,0,1.5,180,0,0,1.5,0.6000361442565918,0,0,1.5,0,0,0,1.5,0.0003204345703125,0,0,1.5,180,0,0,1.5,RightLeg,1,0,0,6,100,60,0,6,-0.5,-0.5,0.39999999999999997,12,90,7.5,0,6,-0.5,0,0,6,-90,0,0,6,DevAwardsAdurite_Handle,0,0,0,1.5,0,0,0,1.5,-0.25,0,0,1.5,0,0,0,1.5,0,0,0,1.5,0,0,0,1.5,Torso,0,0,0,6,-80,5,0.3333333333333333,12,-0.5,0.3,0.16666666666666666,12,-0,5,0.06666666666666667,6,0,0,0,6,180,0,0,6,LeftArm,-0.8,-0.1,0,6,180,-10,0.39999999999999997,12,0.5,0.1,0,6,-10,0,0,6,-0.2,0,0,6,90,0,0,6,RightArm,0.8,-0.1,0,6,180,-10,0.39999999999999997,12,0.5,-0.1,0,6,10,0,0,6,-0.2,0,0,6,-90,0,0,6
  2858.         end
  2859.     })
  2860.     addmode("l", {
  2861.         idle = function()
  2862.             Neck.C0 = Lerp(Neck.C0,cfMul(cf(0, 1, 0),angles(-1.5707963267948966 + 0.04363323129985824 * sin((sine + 0.1) * 1), -0.17453292519943295 * sin((sine + 0.1) * 5), -3.141592653589793)),deltaTime)
  2863.             RightHip.C0 = Lerp(RightHip.C0,cfMul(cf(1, -1 + 0.2 * sin(sine * 5), -0.2 + 0.2 * sin(sine * 5)),angles(2.181661564992912 - 0.8726646259971648 * sin(sine * 5), 1.9198621771937625 - 0.3490658503988659 * sin(sine * 5), -1.5707963267948966)),deltaTime)
  2864.             RightShoulder.C0 = Lerp(RightShoulder.C0,cfMul(cf(0.7, 0.8, 0),angles(1.0471975511965976 + 0.03490658503988659 * sin(sine * 10), 2.0943951023931953 + 0.10471975511965978 * sin((sine + 0.1) * 5), 1.5707963267948966)),deltaTime)
  2865.             LeftHip.C0 = Lerp(LeftHip.C0,cfMul(cf(-1, -1 - 0.2 * sin(sine * 5), -0.2 - 0.2 * sin(sine * 5)),angles(2.181661564992912 + 0.8726646259971648 * sin(sine * 5), -1.9198621771937625 - 0.3490658503988659 * sin(sine * 5), 1.5707963267948966)),deltaTime)
  2866.             RootJoint.C0 = Lerp(RootJoint.C0,cfMul(cf(0, 0.15 + 0.4 * sin((sine - 0.5) * 10), 0),angles(-1.4835298641951802, 0.17453292519943295 * sin(sine * 5), -3.141592653589793)),deltaTime)
  2867.             LeftShoulder.C0 = Lerp(LeftShoulder.C0,cfMul(cf(-0.7, 0.5, -0.3),angles(1.7453292519943295, -0.8726646259971648, 1.5707963267948966)),deltaTime)
  2868.             --Head,0,0,0,5,-90,2.5,0.1,1,1,0,0,4,0,-10,0.1,5,0,0,0,4,-180,0,0,4,RightLeg,1,0,0,4,125,-50,0,5,-1,0.2,0,5,110,-20,0,5,-0.2,0.2,0,5,-90,0,0,4,RightArm,0.7,0,0,4,60,2,0,10,0.8,0,0,4,120,6,0.1,5,0,0,0,4,90,0,0,4,LeftLeg,-1,0,0,4,125,50,0,5,-1,-0.2,0,5,-110,-20,0,5,-0.2,-0.2,0,5,90,0,0,4,Torso,0,0,0,4,-85,0,0,4,0.15,0.4,-0.5,10,0,10,0,5,0,0,0,4,-180,0,0,4,LeftArm,-0.7,0,0,4,100,0,0,4,0.5,0,0,4,-50,0,0,4,-0.3,0,0,4,90,0,0,4
  2869.         end
  2870.     })
  2871. end)
  2872.  
  2873. btn("goofy trolus (goofy)", function()
  2874.     local t=reanimate()
  2875.     if type(t)~="table" then return end
  2876.     local velbycfrvec=t.velbycfrvec
  2877.     local raycastlegs=t.raycastlegs
  2878.     local getJoint=t.getJoint
  2879.     local RootJoint=getJoint("RootJoint")
  2880.     local RightShoulder=getJoint("Right Shoulder")
  2881.     local LeftShoulder=getJoint("Left Shoulder")
  2882.     local RightHip=getJoint("Right Hip")
  2883.     local LeftHip=getJoint("Left Hip")
  2884.     local Neck=getJoint("Neck")
  2885.     t.addmode("default", {
  2886.         idle = function()
  2887.             local rY, lY = raycastlegs()
  2888.  
  2889.             RightShoulder.C0 = Lerp(RightShoulder.C0,cfMul(cf(1, 0.5, 0),angles(0.6981317007977318 * sin((sine + 0.5) * 4), 1.5707963267948966 - 0.3490658503988659 * sin(sine * 4), 0)),deltaTime)
  2890.             LeftShoulder.C0 = Lerp(LeftShoulder.C0,cfMul(cf(-1, 0.5, 0),angles(0.6981317007977318 * sin((sine + 0.5) * 4), -1.5707963267948966 + 0.3490658503988659 * sin(sine * 4), 0)),deltaTime)
  2891.             RightHip.C0 = Lerp(RightHip.C0,cfMul(cf(1, -1 + rY, 0),angles(1.5707963267948966 - 1.0471975511965976 * sin(sine * 4), 1.6580627893946132, -1.5707963267948966)),deltaTime)
  2892.             RootJoint.C0 = Lerp(RootJoint.C0,cfMul(cf(0, -0.2 + 0.2 * sin((sine + 1) * 8), 0),angles(-1.5707963267948966 + 0.6981317007977318 * sin(sine * 4), 0, 3.141592653589793)),deltaTime)
  2893.             LeftHip.C0 = Lerp(LeftHip.C0,cfMul(cf(-1, -1 + lY, 0),angles(1.5707963267948966 - 1.0471975511965976 * sin(sine * 4), -1.6580627893946132, 1.5707963267948966)),deltaTime)
  2894.             Neck.C0 = Lerp(Neck.C0,cfMul(cf(0, 1, 0),angles(-1.5707963267948966 - 0.8726646259971648 * sin((sine + 0.25) * 4), 0, 3.141592653589793)),deltaTime)
  2895.             --RightArm,1,0,0,4,0,40,0.5,4,0.5,0,0,4,90,-20,0,4,0,0,0,4,0,0,0,4,LeftArm,-1,0,0,4,-0,40,0.5,4,0.5,0,0,4,-90,20,0,4,0,0,0,4,0,0,0,4,RightLeg,1,0,0,4,90,-60,0,4,-1,0,0,4,95,0,0,4,0,0,0,4,-90,0,0,4,Torso,0,0,0,4,-90,40,0,4,-0.2,0.2,1,8,-0,0,0,4,0,0,0,4,180,0,0,4,LeftLeg,-1,0,0,4,90,-60,0,4,-1,0,0,4,-95,0,0,4,0,0,0,4,90,0,0,4,Head,0,0,0,4,-90,-50,0.25,4,1,0,0,4,-0,0,0,4,0,0,0,4,180,0,0,4,CPlusPlusTextbook_Handle,8.658389560878277e-09,0,0,4,0,0,0,4,-0.25,0,0,4,0,0,0,4,-0.0002722442150115967,0,0,4,0,0,0,4
  2896.         end,
  2897.         walk = function()
  2898.             local fw, rt = velbycfrvec()
  2899.  
  2900.             Neck.C0 = Lerp(Neck.C0,cfMul(cf(0, 1, 0),angles(-1.5707963267948966 + 0.5235987755982988 * sin((sine + 0.45) * 8), 0, 3.141592653589793)),deltaTime)
  2901.             RightShoulder.C0 = Lerp(RightShoulder.C0,cfMul(cf(1, 0.5, 0),angles(2.0943951023931953 - 1.7453292519943295 * sin((sine - 0.1) * 4), 1.9198621771937625, -1.5707963267948966)),deltaTime)
  2902.             RootJoint.C0 = Lerp(RootJoint.C0,cfMul(cf(0, 0.25 + 0.5 * sin((sine - 0.125) * 8), 0),angles(-1.5707963267948966 + 0.17453292519943295 * sin(sine * 8), 0, 3.141592653589793)),deltaTime)
  2903.             LeftHip.C0 = Lerp(LeftHip.C0,cfMul(cf(-1, -1 - 1 * sin(sine * 4), 0),angles(1.5707963267948966 - 1.2217304763960306 * sin((sine - 0.15) * 4) * fw, -1.5707963267948966 - 0.6108652381980153 * sin((sine - 0.15) * 4) * rt, 1.5707963267948966)),deltaTime)
  2904.             RightHip.C0 = Lerp(RightHip.C0,cfMul(cf(1, -1 + 1 * sin(sine * 4), 0),angles(1.5707963267948966 + 1.2217304763960306 * sin((sine - 0.15) * 4) * fw, 1.5707963267948966 + 0.6108652381980153 * sin((sine - 0.15) * 4) * rt, -1.5707963267948966)),deltaTime)
  2905.             LeftShoulder.C0 = Lerp(LeftShoulder.C0,cfMul(cf(-1, 0.5, 0),angles(2.0943951023931953 + 1.7453292519943295 * sin((sine - 0.1) * 4), -1.7453292519943295, 1.5707963267948966)),deltaTime)
  2906.             --Head,0,0,0,4,-90,30,0.45,8,1,0,0,4,-0,0,0,4,0,0,0,4,180,0,0,4,CPlusPlusTextbook_Handle,8.658389560878277e-09,0,0,4,0,0,0,4,-0.25,0,0,4,0,0,0,4,-0.0002722442150115967,0,0,4,0,0,0,4,RightArm,1,0,0,4,120,-100,-0.1,4,0.5,0,0,4,110,0,0,4,0,0,0,4,-90,0,0,4,Torso,0,0,0,4,-90,10,0,8,0.25,0.5,-0.125,8,-0,0,0,4,0,0,0,4,180,0,0,4,LeftLeg,-1,0,0,4,90,-70,-0.15,4,-1,-1,0,4,-90,-35,-0.15,4,0,0,0,4,90,0,0,4,RightLeg,1,0,0,4,90,70,-0.15,4,-1,1,0,4,90,35,-0.15,4,0,0,0,4,-90,0,0,4,LeftArm,-1,0,0,4,120,100,-0.1,4,0.5,0,0,4,-100,0,0,4,0,0,0,4,90,0,0,4
  2907.         end
  2908.     })
  2909. end)
  2910.  
  2911. btn("good cop bad cop animations", function()
  2912.     local t=reanimate()
  2913.     if type(t)~="table" then return end
  2914.     local addmode=t.addmode
  2915.     local getJoint=t.getJoint
  2916.     local RootJoint=getJoint("RootJoint")
  2917.     local RightShoulder=getJoint("Right Shoulder")
  2918.     local LeftShoulder=getJoint("Left Shoulder")
  2919.     local RightHip=getJoint("Right Hip")
  2920.     local LeftHip=getJoint("Left Hip")
  2921.     local Neck=getJoint("Neck")
  2922.     local setWalkSpeed=t.setWalkSpeed
  2923.     local setJumpPower=t.setJumpPower
  2924.     setWalkSpeed(20)
  2925.     setJumpPower(50)
  2926.  
  2927.     local ROOTC0=angles(rad(-90),0,rad(180))
  2928.     local NECKC0=cfMul(cf(0,1,0),angles(rad(-90),0,rad(180)))
  2929.     local RIGHTSHOULDERC0=cfMul(cf(-0.5,0,0),angles(0,rad(90),0))
  2930.     local LEFTSHOULDERC0=cfMul(cf(0.5,0,0),angles(0,rad(-90),0))
  2931.  
  2932.     --bruh yeah shackluster had a lot of math.rad(0) instead of just 0
  2933.     --and a lot of multyplying by angles(0, 0, 0)
  2934.     --and he had ArtificialHB
  2935.     --and he had a sine value increasing by 2/3 each frame
  2936.     --and a lot of variables with names saying other things
  2937.     --and he had both C0 and C1 lerps for the same animations
  2938.  
  2939.     local function jumplerps()
  2940.         local Animation_Speed = 0.45 / deltaTime
  2941.         RootJoint.C1 = Lerp(RootJoint.C1,ROOTC0, 0.2 / Animation_Speed)
  2942.         Neck.C1 = Lerp(Neck.C1,cfMul(cf(0, -0.5, 0),angles(rad(-90), 0, rad(180))), 0.2 / Animation_Speed)
  2943.         RightHip.C1 = Lerp(RightHip.C1,cfMul(cf(0.5, 1, 0),angles(0, rad(90), 0)), 0.7 / Animation_Speed)
  2944.         LeftHip.C1 = Lerp(LeftHip.C1,cfMul(cf(-0.5, 1, 0),angles(0, rad(-90), 0)), 0.7 / Animation_Speed)
  2945.  
  2946.         RootJoint.C0 = Lerp(RootJoint.C0,ROOTC0, 0.2 / Animation_Speed)
  2947.         Neck.C0 = Lerp(Neck.C0,cfMul(NECKC0,angles(rad(-20), 0, 0)), 0.2 / Animation_Speed)
  2948.         RightShoulder.C0 = Lerp(RightShoulder.C0,cfMul(cfMul(cf(1.5, 0.5, 0),angles(rad(-40), 0, rad(20))), RIGHTSHOULDERC0), 0.2 / Animation_Speed)
  2949.         LeftShoulder.C0 = Lerp(LeftShoulder.C0,cfMul(cfMul(cf(-1.5, 0.5, 0),angles(rad(-40), 0, rad(-20))), LEFTSHOULDERC0), 0.2 / Animation_Speed)
  2950.         RightHip.C0 = Lerp(RightHip.C0,cfMul(cf(1, -1, -0.3),angles(0, rad(90), 0),angles(rad(-5), 0, rad(-20))), 0.2 / Animation_Speed)
  2951.         LeftHip.C0 = Lerp(LeftHip.C0,cfMul(cf(-1, -1, -0.3),angles(0, rad(-90), 0),angles(rad(-5), 0, rad(20))), 0.2 / Animation_Speed)
  2952.     end
  2953.     local function falllerps()
  2954.         local Animation_Speed = 0.45 / deltaTime
  2955.         RootJoint.C1 = Lerp(RootJoint.C1,ROOTC0, 0.2 / Animation_Speed)
  2956.         Neck.C1 = Lerp(Neck.C1,cfMul(cf(0, -0.5, 0),angles(rad(-90), 0, rad(180))), 0.2 / Animation_Speed)
  2957.         RightHip.C1 = Lerp(RightHip.C1,cfMul(cf(0.5, 1, 0),angles(0, rad(90), 0)), 0.7 / Animation_Speed)
  2958.         LeftHip.C1 = Lerp(LeftHip.C1,cfMul(cf(-0.5, 1, 0),angles(0, rad(-90), 0)), 0.7 / Animation_Speed)
  2959.  
  2960.         RootJoint.C0 = Lerp(RootJoint.C0,ROOTC0, 0.2 / Animation_Speed)
  2961.         Neck.C0 = Lerp(Neck.C0,cfMul(NECKC0,angles(rad(20), 0, 0)), 0.2 / Animation_Speed)
  2962.         RightShoulder.C0 = Lerp(RightShoulder.C0,cfMul(cfMul(cf(1.5, 0.5, 0),angles(0, 0, rad(60))), RIGHTSHOULDERC0), 0.2 / Animation_Speed)
  2963.         LeftShoulder.C0 = Lerp(LeftShoulder.C0,cfMul(cfMul(cf(-1.5, 0.5, 0),angles(0, 0, rad(-60))), LEFTSHOULDERC0), 0.2 / Animation_Speed)
  2964.         RightHip.C0 = Lerp(RightHip.C0,cfMul(cfMul(cf(1, -1, 0),angles(0, rad(90), 0)),angles(0, 0, rad(20))), 0.2 / Animation_Speed)
  2965.         LeftHip.C0 = Lerp(LeftHip.C0,cfMul(cfMul(cf(-1, -1, 0),angles(0, rad(-90), 0)),angles(0, 0, rad(10))), 0.2 / Animation_Speed)
  2966.     end
  2967.  
  2968.     local idleOverwrite=nil
  2969.  
  2970.     addmode("default",{ --mode 1
  2971.         modeLeft=function() --enter mode 0
  2972.             setWalkSpeed(0)
  2973.             setJumpPower(0)
  2974.             idleOverwrite=function()
  2975.                 local sine = sine * 40
  2976.                 local Animation_Speed = 0.45 / deltaTime
  2977.                 RootJoint.C1 = Lerp(RootJoint.C1,ROOTC0, 0.2 / Animation_Speed)
  2978.                 Neck.C1 = Lerp(Neck.C1,cfMul(cf(0, -0.5, 0),angles(rad(-90), 0, rad(180))), 0.2 / Animation_Speed)
  2979.                 RightHip.C1 = Lerp(RightHip.C1,cfMul(cf(0.5, 1, 0),angles(0, rad(90), 0)), 0.7 / Animation_Speed)
  2980.                 LeftHip.C1 = Lerp(LeftHip.C1,cfMul(cf(-0.5, 1, 0),angles(0, rad(-90), 0)), 0.7 / Animation_Speed)
  2981.  
  2982.                 RootJoint.C0 = Lerp(RootJoint.C0,ROOTC0 * cf(0, 0, 0.05 * cos(sine / 12)), 1 / Animation_Speed)
  2983.                 Neck.C0 = Lerp(Neck.C0, NECKC0, 1 / Animation_Speed)
  2984.                 RightShoulder.C0 = Lerp(RightShoulder.C0, cf(1.5, 0.5, 0) * angles(0, 0, rad(25)) * RIGHTSHOULDERC0, 1 / Animation_Speed)
  2985.                 LeftShoulder.C0 = Lerp(LeftShoulder.C0, cf(-1.5, 0.5, 0) * angles(0, 0, rad(-25)) * LEFTSHOULDERC0, 1 / Animation_Speed)
  2986.                 RightHip.C0 = Lerp(RightHip.C0, cf(1, -1 - 0.05 * cos(sine / 12), -0.01) * angles(0, rad(83), 0), 1 / Animation_Speed)
  2987.                 LeftHip.C0 = Lerp(LeftHip.C0, cf(-1, -1 - 0.05 * cos(sine / 12), -0.01) * angles(0, rad(-83), 0), 1 / Animation_Speed)
  2988.             end
  2989.             twait(0.15)
  2990.             idleOverwrite=function()
  2991.                 local sine = sine * 40
  2992.                 local Animation_Speed = 0.45 / deltaTime
  2993.                 RootJoint.C1 = Lerp(RootJoint.C1,ROOTC0, 0.2 / Animation_Speed)
  2994.                 Neck.C1 = Lerp(Neck.C1,cfMul(cf(0, -0.5, 0),angles(rad(-90), 0, rad(180))), 0.2 / Animation_Speed)
  2995.                 RightHip.C1 = Lerp(RightHip.C1,cfMul(cf(0.5, 1, 0),angles(0, rad(90), 0)), 0.7 / Animation_Speed)
  2996.                 LeftHip.C1 = Lerp(LeftHip.C1,cfMul(cf(-0.5, 1, 0),angles(0, rad(-90), 0)), 0.7 / Animation_Speed)
  2997.  
  2998.                 RootJoint.C0 = Lerp(RootJoint.C0,ROOTC0 * cf(0, 0, 0.05 * cos(sine / 12)), 1 / Animation_Speed)
  2999.                 Neck.C0 = Lerp(Neck.C0, NECKC0 * angles(rad(5), 0, 0), 1 / Animation_Speed)
  3000.                 RightShoulder.C0 = Lerp(RightShoulder.C0, cf(1.25, 0.5, -0.5) * angles(rad(100), 0, rad(-70)) * RIGHTSHOULDERC0, 1 / Animation_Speed)
  3001.                 LeftShoulder.C0 = Lerp(LeftShoulder.C0, cf(-1.25, 0.35, -0.35) * angles(rad(70), 0, rad(80)) * LEFTSHOULDERC0, 1 / Animation_Speed)
  3002.                 RightHip.C0 = Lerp(RightHip.C0, cf(1, -1 - 0.05 * cos(sine / 12), -0.01) * angles(0, rad(83), 0), 1 / Animation_Speed)
  3003.                 LeftHip.C0 = Lerp(LeftHip.C0, cf(-1, -1 - 0.05 * cos(sine / 12), -0.01) * angles(0, rad(-83), 0), 1 / Animation_Speed)
  3004.             end
  3005.             twait(0.5)
  3006.             --CreateSound(363808674, Torso, 6, 1, false)
  3007.             idleOverwrite=function()
  3008.                 local sine = sine * 40
  3009.                 local Animation_Speed = 0.45 / deltaTime
  3010.                 RootJoint.C1 = Lerp(RootJoint.C1,ROOTC0, 0.2 / Animation_Speed)
  3011.                 Neck.C1 = Lerp(Neck.C1,cfMul(cf(0, -0.5, 0),angles(rad(-90), 0, rad(180))), 0.2 / Animation_Speed)
  3012.                 RightHip.C1 = Lerp(RightHip.C1,cfMul(cf(0.5, 1, 0),angles(0, rad(90), 0)), 0.7 / Animation_Speed)
  3013.                 LeftHip.C1 = Lerp(LeftHip.C1,cfMul(cf(-0.5, 1, 0),angles(0, rad(-90), 0)), 0.7 / Animation_Speed)
  3014.  
  3015.                 RootJoint.C0 = Lerp(RootJoint.C0,ROOTC0 * cf(0, 0, 0.05 * cos(sine / 12)), 1 / Animation_Speed)
  3016.                 Neck.C0 = Lerp(Neck.C0, NECKC0 * angles(rad(5), rad(25), 0), 1 / Animation_Speed)
  3017.                 RightShoulder.C0 = Lerp(RightShoulder.C0, cf(1.25, 0.5, -0.5) * angles(rad(100), 0, rad(-50)) * RIGHTSHOULDERC0, 1 / Animation_Speed)
  3018.                 LeftShoulder.C0 = Lerp(LeftShoulder.C0, cf(-1.25, 0.35, -0.35) * angles(rad(70), 0, rad(60)) * LEFTSHOULDERC0, 1 / Animation_Speed)
  3019.                 RightHip.C0 = Lerp(RightHip.C0, cf(1, -1 - 0.05 * cos(sine / 12), -0.01) * angles(0, rad(83), 0), 1 / Animation_Speed)
  3020.                 LeftHip.C0 = Lerp(LeftHip.C0, cf(-1, -1 - 0.05 * cos(sine / 12), -0.01) * angles(0, rad(-83), 0), 1 / Animation_Speed)
  3021.             end
  3022.             twait(0.3)
  3023.             --CreateSound(363808674, Torso, 6, 1, false)
  3024.             idleOverwrite=function()
  3025.                 local sine = sine * 40
  3026.                 local Animation_Speed = 0.45 / deltaTime
  3027.                 RootJoint.C1 = Lerp(RootJoint.C1,ROOTC0, 0.2 / Animation_Speed)
  3028.                 Neck.C1 = Lerp(Neck.C1,cfMul(cf(0, -0.5, 0),angles(rad(-90), 0, rad(180))), 0.2 / Animation_Speed)
  3029.                 RightHip.C1 = Lerp(RightHip.C1,cfMul(cf(0.5, 1, 0),angles(0, rad(90), 0)), 0.7 / Animation_Speed)
  3030.                 LeftHip.C1 = Lerp(LeftHip.C1,cfMul(cf(-0.5, 1, 0),angles(0, rad(-90), 0)), 0.7 / Animation_Speed)
  3031.  
  3032.                 RootJoint.C0 = Lerp(RootJoint.C0,ROOTC0 * cf(0, 0, 0.05 * cos(sine / 12)), 1 / Animation_Speed)
  3033.                 Neck.C0 = Lerp(Neck.C0, NECKC0 * angles(rad(5), rad(-25), 0), 1 / Animation_Speed)
  3034.                 RightShoulder.C0 = Lerp(RightShoulder.C0, cf(1.25, 0.5, -0.5) * angles(rad(100), 0, rad(-90)) * RIGHTSHOULDERC0, 1 / Animation_Speed)
  3035.                 LeftShoulder.C0 = Lerp(LeftShoulder.C0, cf(-1.25, 0.35, -0.35) * angles(rad(70), 0, rad(90)) * LEFTSHOULDERC0, 1 / Animation_Speed)
  3036.                 RightHip.C0 = Lerp(RightHip.C0, cf(1, -1 - 0.05 * cos(sine / 12), -0.01) * angles(0, rad(83), 0), 1 / Animation_Speed)
  3037.                 LeftHip.C0 = Lerp(LeftHip.C0, cf(-1, -1 - 0.05 * cos(sine / 12), -0.01) * angles(0, rad(-83), 0), 1 / Animation_Speed)
  3038.             end
  3039.             twait(0.3)
  3040.             idleOverwrite=nil
  3041.             setWalkSpeed(20)
  3042.             setJumpPower(50)
  3043.         end,
  3044.         idle = function()
  3045.             if idleOverwrite then
  3046.                 return idleOverwrite()
  3047.             end
  3048.  
  3049.             local Animation_Speed = 0.45 / deltaTime
  3050.             local sine = sine * 40
  3051.  
  3052.             RootJoint.C1 = Lerp(RootJoint.C1,ROOTC0, 0.2 / Animation_Speed)
  3053.             Neck.C1 = Lerp(Neck.C1,cfMul(cf(0, -0.5, 0),angles(rad(-90), 0, rad(180))), 0.2 / Animation_Speed)
  3054.             RightHip.C1 = Lerp(RightHip.C1,cfMul(cf(0.5, 1, 0),angles(0, rad(90), 0)), 0.7 / Animation_Speed)
  3055.             LeftHip.C1 = Lerp(LeftHip.C1,cfMul(cf(-0.5, 1, 0),angles(0, rad(-90), 0)), 0.7 / Animation_Speed)
  3056.  
  3057.             RootJoint.C0 = Lerp(RootJoint.C0,cfMul(ROOTC0, cf(0.05 * cos(sine / 12), 0, 0.05 * sin(sine / 12))), 0.15 / Animation_Speed)
  3058.             Neck.C0 = Lerp(Neck.C0,cfMul(NECKC0, angles(rad(15 - 2.5 * sin(sine / 12)), 0, rad(-25))), 1 / Animation_Speed)
  3059.             RightShoulder.C0 = Lerp(RightShoulder.C0,cfMul(cfMul(cf(1.25, 0.5, 0.3),angles(rad(-45), 0, rad(-45))), RIGHTSHOULDERC0), 1 / Animation_Speed)
  3060.             LeftShoulder.C0 = Lerp(LeftShoulder.C0,cfMul(cfMul(cf(-1.25, 0.5, 0.3),angles(rad(-40), 0, rad(45))), LEFTSHOULDERC0), 1 / Animation_Speed)
  3061.             RightHip.C0 = Lerp(RightHip.C0,cfMul(cfMul(cf(1 + 0.05 * cos(sine / 12), -1 - 0.05 * sin(sine / 12), -0.01),angles(0, rad(85), 0)),angles(rad(-1), 0, 0)), 0.15 / Animation_Speed)
  3062.             LeftHip.C0 = Lerp(LeftHip.C0,cfMul(cfMul(cf(-1 + 0.05 * cos(sine / 12), -1 - 0.05 * sin(sine / 12), -0.01),angles(0, rad(-85), 0)),angles(rad(-1), 0, 0)), 0.15 / Animation_Speed)
  3063.         end,
  3064.         walk = function()
  3065.             local Animation_Speed = 0.45 / deltaTime
  3066.             local sine = sine * 40
  3067.             RootJoint.C1 = Lerp(RootJoint.C1,cfMul(ROOTC0, cf(0, 0, 0.05 * cos(sine / (2.4)))), 2 * 1.25 / Animation_Speed)
  3068.             Neck.C1 = Lerp(Neck.C1,cfMul(cf(0, -0.5, 0),angles(rad(-90), 0, rad(180))), 0.2 * 1.25 / Animation_Speed)
  3069.             RightHip.C1 = Lerp(RightHip.C1,cfMul(cfMul(cf(0.5, 0.875 - 0.125 * sin(sine / 4.8) - 0.15 * cos(sine / 2.4), 0),angles(0, rad(90), 0)),angles(0, 0, rad(35 * cos(sine / 4.8)))), 0.6 / Animation_Speed)
  3070.             LeftHip.C1 = Lerp(LeftHip.C1,cfMul(cfMul(cf(-0.5, 0.875 + 0.125 * sin(sine / 4.8) - 0.15 * cos(sine / 2.4), 0),angles(0, rad(-90), 0)),angles(0, 0, rad(35 * cos(sine / 4.8)))), 0.6 / Animation_Speed)
  3071.  
  3072.             RootJoint.C0 = Lerp(RootJoint.C0,cfMul(ROOTC0, cf(0, 0, -0.05)), 0.15 / Animation_Speed)
  3073.             Neck.C0 = Lerp(Neck.C0,cfMul(NECKC0,angles(rad(5), 0, 0)), 0.15 / Animation_Speed)
  3074.             RightShoulder.C0 = Lerp(RightShoulder.C0,cfMul(cfMul(cf(1.25, 0.5 + 0.05 * sin(sine / (2.4)), 0.3),angles(rad(-45), 0, rad(-45))), RIGHTSHOULDERC0), 1 / Animation_Speed)
  3075.             LeftShoulder.C0 = Lerp(LeftShoulder.C0,cfMul(cfMul(cf(-1.25, 0.5 + 0.05 * sin(sine / (2.4)), 0.3),angles(rad(-40), 0, rad(45))), LEFTSHOULDERC0), 1 / Animation_Speed)
  3076.             RightHip.C0 = Lerp(RightHip.C0,cfMul(cfMul(cf(1, -1, 0),angles(0, rad(80), 0)),angles(0, 0, rad(-5))), 2 / Animation_Speed)
  3077.             LeftHip.C0 = Lerp(LeftHip.C0,cfMul(cfMul(cf(-1, -1, 0),angles(0, rad(-80), 0)),angles(0, 0, rad(5))), 2 / Animation_Speed)
  3078.         end,
  3079.         jump = jumplerps,
  3080.         fall = falllerps
  3081.     })
  3082.  
  3083.     addmode("f",{ --mode 0
  3084.         modeLeft=function() --enter mode 1
  3085.             setWalkSpeed(0)
  3086.             setJumpPower(0)
  3087.             --CreateSound(147722227, Torso, 4, 1.3, false)
  3088.             idleOverwrite=function()
  3089.                 local sine = sine * 40
  3090.                 local Animation_Speed = 0.45 / deltaTime
  3091.                 RootJoint.C1 = Lerp(RootJoint.C1,ROOTC0, 0.2 / Animation_Speed)
  3092.                 Neck.C1 = Lerp(Neck.C1,cfMul(cf(0, -0.5, 0),angles(rad(-90), 0, rad(180))), 0.2 / Animation_Speed)
  3093.                 RightHip.C1 = Lerp(RightHip.C1,cfMul(cf(0.5, 1, 0),angles(0, rad(90), 0)), 0.7 / Animation_Speed)
  3094.                 LeftHip.C1 = Lerp(LeftHip.C1,cfMul(cf(-0.5, 1, 0),angles(0, rad(-90), 0)), 0.7 / Animation_Speed)
  3095.  
  3096.                 RootJoint.C0 = Lerp(RootJoint.C0,ROOTC0 * cf(0, 0, 0.05 * cos(sine / 12)), 1 / Animation_Speed)
  3097.                 Neck.C0 = Lerp(Neck.C0, NECKC0 * angles(rad(35), 0, 0), 1 / Animation_Speed)
  3098.                 RightShoulder.C0 = Lerp(RightShoulder.C0, cf(1.5, 0.5, 0) * angles(0, 0, rad(25)) * RIGHTSHOULDERC0, 1 / Animation_Speed)
  3099.                 LeftShoulder.C0 = Lerp(LeftShoulder.C0, cf(-1.5, 0.5, 0) * angles(0, 0, rad(-25)) * LEFTSHOULDERC0, 1 / Animation_Speed)
  3100.                 RightHip.C0 = Lerp(RightHip.C0, cf(1, -1 - 0.05 * cos(sine / 12), -0.01) * angles(0, rad(83), 0), 1 / Animation_Speed)
  3101.                 LeftHip.C0 = Lerp(LeftHip.C0, cf(-1, -1 - 0.05 * cos(sine / 12), -0.01) * angles(0, rad(-83), 0), 1 / Animation_Speed)
  3102.             end
  3103.             twait(0.15)
  3104.             idleOverwrite=nil
  3105.             setWalkSpeed(20)
  3106.             setJumpPower(50)
  3107.         end,
  3108.         idle = function()
  3109.             if idleOverwrite then
  3110.                 return idleOverwrite()
  3111.             end
  3112.  
  3113.             local Animation_Speed = 0.45 / deltaTime
  3114.             local sine = sine * 40
  3115.  
  3116.             RootJoint.C1 = Lerp(RootJoint.C1,ROOTC0, 0.2 / Animation_Speed)
  3117.             Neck.C1 = Lerp(Neck.C1,cfMul(cf(0, -0.5, 0),angles(rad(-90), 0, rad(180))), 0.2 / Animation_Speed)
  3118.             RightHip.C1 = Lerp(RightHip.C1,cfMul(cf(0.5, 1, 0),angles(0, rad(90), 0)), 0.7 / Animation_Speed)
  3119.             LeftHip.C1 = Lerp(LeftHip.C1,cfMul(cf(-0.5, 1, 0),angles(0, rad(-90), 0)), 0.7 / Animation_Speed)
  3120.  
  3121.             RootJoint.C0 = Lerp(RootJoint.C0,cfMul(ROOTC0, cf(0, 0, 0.05 * cos(sine / 12))), 1 / Animation_Speed)
  3122.             Neck.C0 = Lerp(Neck.C0,cfMul(NECKC0,angles(rad(-5 - 2.5 * cos(sine / 12)), 0, rad(25))), 1 / Animation_Speed)
  3123.             RightShoulder.C0 = Lerp(RightShoulder.C0,cfMul(cfMul(cf(0.9, 0.5 + 0.05 * sin(sine / 12), -0.5),angles(rad(100), 0, rad(-70))), RIGHTSHOULDERC0), 1 / Animation_Speed)
  3124.             LeftShoulder.C0 = Lerp(LeftShoulder.C0,cfMul(cfMul(cf(-0.9, 0.25 + 0.05 * sin(sine / 12), -0.35),angles(rad(70), 0, rad(80))), LEFTSHOULDERC0), 1 / Animation_Speed)
  3125.             RightHip.C0 = Lerp(RightHip.C0,cfMul(cf(1, -1 - 0.05 * cos(sine / 12), -0.01),angles(0, rad(80), 0)), 1 / Animation_Speed)
  3126.             LeftHip.C0 = Lerp(LeftHip.C0,cfMul(cf(-1, -1 - 0.05 * cos(sine / 12), -0.01),angles(0, rad(-80), 0)), 1 / Animation_Speed)
  3127.         end,
  3128.         walk = function()
  3129.             local Animation_Speed = 0.45 / deltaTime
  3130.             local sine = sine * 40
  3131.             RootJoint.C1 = Lerp(RootJoint.C1,cfMul(ROOTC0, cf(0, 0, 0.05 * cos(sine / (2.4)))), 2 * 1.25 / Animation_Speed)
  3132.             Neck.C1 = Lerp(Neck.C1,cfMul(cf(0, -0.5, 0),angles(rad(-90), 0, rad(180))), 0.2 * 1.25 / Animation_Speed)
  3133.             RightHip.C1 = Lerp(RightHip.C1,cfMul(cfMul(cf(0.5, 0.875 - 0.125 * sin(sine / 4.8) - 0.15 * cos(sine / 2.4), 0),angles(0, rad(90), 0)),angles(0, 0, rad(35 * cos(sine / 4.8)))), 0.6 / Animation_Speed)
  3134.             LeftHip.C1 = Lerp(LeftHip.C1,cfMul(cfMul(cf(-0.5, 0.875 + 0.125 * sin(sine / 4.8) - 0.15 * cos(sine / 2.4), 0),angles(0, rad(-90), 0)),angles(0, 0, rad(35 * cos(sine / 4.8)))), 0.6 / Animation_Speed)
  3135.  
  3136.             RootJoint.C0 = Lerp(RootJoint.C0,cfMul(ROOTC0, cf(0, 0, -0.05)), 0.15 / Animation_Speed)
  3137.             Neck.C0 = Lerp(Neck.C0,cfMul(NECKC0,angles(rad(5), 0, 0)), 0.15 / Animation_Speed)
  3138.             RightShoulder.C0 = Lerp(RightShoulder.C0,cfMul(cfMul(cf(0.9, 0.5 + 0.05 * sin(sine / (2.4)), -0.5),angles(rad(100), 0, rad(-70))), RIGHTSHOULDERC0), 1 / Animation_Speed)
  3139.             LeftShoulder.C0 = Lerp(LeftShoulder.C0,cfMul(cfMul(cf(-0.9, 0.25 + 0.05 * sin(sine / (2.4)), -0.35),angles(rad(70), 0, rad(80))), LEFTSHOULDERC0), 1 / Animation_Speed)
  3140.             RightHip.C0 = Lerp(RightHip.C0,cfMul(cfMul(cf(1, -1, 0),angles(0, rad(80), 0)),angles(0, 0, rad(-5))), 2 / Animation_Speed)
  3141.             LeftHip.C0 = Lerp(LeftHip.C0,cfMul(cfMul(cf(-1, -1, 0),angles(0, rad(-80), 0)),angles(0, 0, rad(5))), 2 / Animation_Speed)
  3142.         end,
  3143.         jump = jumplerps,
  3144.         fall = falllerps
  3145.     })
  3146. end)
  3147. lbl("original by shackluster")
  3148. lbl("the classics never die")
  3149.  
  3150. btn("metamorphosis vibe", function()
  3151.     local t=reanimate()
  3152.     if type(t)~="table" then return end
  3153.     local addmode=t.addmode
  3154.     local getJoint=t.getJoint
  3155.     local velbycfrvec=t.velbycfrvec
  3156.     local RootJoint=getJoint("RootJoint")
  3157.     local RightShoulder=getJoint("Right Shoulder")
  3158.     local LeftShoulder=getJoint("Left Shoulder")
  3159.     local RightHip=getJoint("Right Hip")
  3160.     local LeftHip=getJoint("Left Hip")
  3161.     local Neck=getJoint("Neck")
  3162.     t.setWalkSpeed(4.5)
  3163.  
  3164.     addmode("default",{
  3165.         idle=function()
  3166.             Neck.C0=Lerp(Neck.C0,cfMul(cf(0,1,0),angles(-1.7453292519943295-0.08726646259971647*sin(sine*8),-0.12217304763960307*sin((sine+0.2)*4),2.8797932657906435+0.2007128639793479*sin((sine+0.15)*4))),deltaTime)
  3167.             RightHip.C0=Lerp(RightHip.C0,cfMul(cf(1,-1+0.1*sin(sine*4),0),angles(1.5707963267948966,1.5707963267948966+0.17453292519943295*sin(sine*4),-1.5707963267948966)),deltaTime)
  3168.             RightShoulder.C0=Lerp(RightShoulder.C0,cfMul(cf(1,0.3,0),angles(2.530727415391778+0.20943951023931956*sin((sine+0.4)*8),1.5707963267948966-0.4363323129985824*sin((sine+0.2)*4),-1.5707963267948966)),deltaTime)
  3169.             LeftShoulder.C0=Lerp(LeftShoulder.C0,cfMul(cf(-1,0.5,0),angles(1.0471975511965976,-1.2217304763960306+0.08726646259971647*sin((sine+0.2)*4),1.5707963267948966)),deltaTime)
  3170.             LeftHip.C0=Lerp(LeftHip.C0,cfMul(cf(-1,-1-0.1*sin(sine*4),0),angles(1.5707963267948966,-1.5707963267948966+0.17453292519943295*sin(sine*4),1.5707963267948966)),deltaTime)
  3171.             RootJoint.C0=Lerp(RootJoint.C0,cfMul(cf(-0.1 * sin(sine*4),0,0),angles(-1.5707963267948966,0.08726646259971647*sin(sine*4),3.141592653589793)),deltaTime)
  3172.             --MW_animatorProgressSave: Fedora_Handle,8.657480066176504e-09,0,0,4,-6,0,0,4,-0.15052366256713867,0,0,4,0,0,0,4,-0.010221302509307861,0,0,4,0,0,0,4,Bandana_Handle,3.9362930692732334e-09,0,0,4,0,0,0,4,0.3000001907348633,0,0,4,0,0,0,4,-0.6002722978591919,0,0,4,0,0,0,4,Head,0,0,0,4,-100,-5,0,8,1,0,0,4,-0,-7,0.2,4,0,0,0,4,165,11.5,0.15,4,RightLeg,1,0,0,4,90,0,0,4,-1,0.1,0,4,90,10,0,4,0,0,0,4,-90,0,0,4,RightArm,1,0,0,4,145,12,0.4,8,0.3,0,0,4,90,-25,0.2,4,0,0,0,4,-90,0,0,4,LeftArm,-1,0,0,4,60,0,0,4,0.5,0,0,4,-70,5,0.2,4,0,0,0,4,90,0,0,4,LeftLeg,-1,0,0,4,90,0,0,4,-1,-0.1,0,4,-90,10,0,4,0,0,0,4,90,0,0,4,Torso,0,-0.1,0,4,-90,0,0,4,0,0,0,4,-0,5,0,4,0,0,0,4,180,0,0,4
  3173.         end,
  3174.         walk=function()
  3175.             local fw,rt=velbycfrvec()
  3176.  
  3177.             Neck.C0=Lerp(Neck.C0,cfMul(cf(0,1,0),angles(-1.5707963267948966+0.08726646259971647*sin((sine-0.1)*8),0.3490658503988659*sin((sine-0.07)*4),3.141592653589793-0.4363323129985824*sin((sine-0.4)*4))),deltaTime)
  3178.             RightHip.C0=Lerp(RightHip.C0,cfMul(cf(1,-1+0.3*sin((sine + 0.3)*4),0),angles(1.5707963267948966,1.5707963267948966+0.6981317007977318*sin(sine*4)*rt,-1.5707963267948966+0.6981317007977318*sin(sine*4)*fw)),deltaTime)
  3179.             RightShoulder.C0=Lerp(RightShoulder.C0,cfMul(cf(1,0.5,0),angles(-0.5235987755982988*sin((sine+0.2)*4),1.5707963267948966-0.3490658503988659*sin(sine*4),0)),deltaTime)
  3180.             LeftShoulder.C0=Lerp(LeftShoulder.C0,cfMul(cf(-1,0.5,0),angles(0.5235987755982988*sin((sine+0.2)*4),-1.5707963267948966-0.3490658503988659*sin(sine*4),0)),deltaTime)
  3181.             LeftHip.C0=Lerp(LeftHip.C0,cfMul(cf(-1,-1-0.3*sin((sine + 0.3)*4),0),angles(1.5707963267948966,-1.5707963267948966-0.6981317007977318*sin(sine*4)*rt,1.5707963267948966+0.6981317007977318*sin(sine*4)*fw)),deltaTime)
  3182.             RootJoint.C0=Lerp(RootJoint.C0,cfMul(cf(0,0.05+0.2*sin((sine + 0.15)*8),0),angles(-1.5707963267948966,0,3.141592653589793)),deltaTime)
  3183.             --MW_animatorProgressSave: Fedora_Handle,8.657480066176504e-09,0,0,4,-6,0,0,4,-0.15052366256713867,0,0,4,0,0,0,4,-0.010221302509307861,0,0,4,0,0,0,4,Bandana_Handle,3.9362930692732334e-09,0,0,4,0,0,0,4,0.3000001907348633,0,0,4,0,0,0,4,-0.6002722978591919,0,0,4,0,0,0,4,Head,0,0,0,4,-90,5,-0.1,8,1,0,0,4,-0,20,-0.07,4,0,0,0,4,180,-25,-0.4,4,RightLeg,1,0,0,4,90,0,0,4,-1,0.3,0.3,4,90,40,0,4,0,0,0,4,-90,40,0,4,RightArm,1,0,0,4,0,-30,0.2,4,0.5,0,0,4,90,-20,0,4,0,0,0,4,0,0,0,4,LeftArm,-1,0,0,4,0,30,0.2,4,0.5,0,0,4,-90,-20,0,4,0,0,0,4,0,0,0,4,LeftLeg,-1,0,0,4,90,0,0,4,-1,-0.3,0.3,4,-90,-40,0,4,0,0,0,4,90,40,0,4,Torso,0,0,0,4,-90,0,0,4,0.05,0.2,0.15,8,-0,0,0,4,0,0,0,4,180,0,0,4
  3184.         end
  3185.     })
  3186. end)
  3187.  
  3188. lbl("INTERWORLD - METAMORPHOSIS")
  3189. lbl("was listening to ^^ and animating")
  3190.  
  3191. btn("empty reanimate (no animations)", reanimate)
  3192. insSet(btn("stop current script",stopreanimate),"TextColor3",c3(0.75,0,0))
  3193.  
  3194. lbl("SETTINGS (REANIMATE TO APPLY)")
  3195.  
  3196. local function swtc(txt,options,onchanged)
  3197.     local current=0
  3198.     local swtcbtn=nil
  3199.     local function btnpressed()
  3200.         current=current+1
  3201.         if current>#options then
  3202.             current=1
  3203.         end
  3204.         local option=options[current]
  3205.         insSet(swtcbtn,"Text",txt..": "..option.text)
  3206.         onchanged(option.value)
  3207.     end
  3208.     swtcbtn=btn("change",btnpressed)
  3209.     btnpressed()
  3210.     return swtcbtn
  3211. end
  3212.  
  3213. swtc("client sided placeholders",{
  3214.     {value=true,text="yes"},
  3215.     {value=false,text="no"}
  3216. },function(v)
  3217.     placeholders=v
  3218. end)
  3219.  
  3220. swtc("highlight fling targets",{
  3221.     {value=true,text="yes"},
  3222.     {value=false,text="no"}
  3223. },function(v)
  3224.     highlightflingtargets=v
  3225. end)
  3226.  
  3227. swtc("allow shiftlock",{
  3228.     {value=true,text="yes"},
  3229.     {value=false,text="no"}
  3230. },function(v)
  3231.     allowshiftlock=v
  3232. end)
  3233.  
  3234. swtc("ctrl click tp",{
  3235.     {value=true,text="yes"},
  3236.     {value=false,text="no"}
  3237. },function(v)
  3238.     ctrltp=v
  3239. end)
  3240.  
  3241. swtc("click fling",{
  3242.     {value=true,text="yes"},
  3243.     {value=false,text="no"}
  3244. },function(v)
  3245.     clickfling=v
  3246. end)
  3247.  
  3248. swtc("changestate when fling",{
  3249.     {value=true,text="yes"},
  3250.     {value=false,text="no"}
  3251. },function(v)
  3252.     flingchangestate=v
  3253. end)
  3254. lbl("(limb collision)")
  3255.  
  3256. swtc("respawn tp",{
  3257.     {value=true,text="random tp close"},
  3258.     {value=false,text="stay at spawn"}
  3259. },function(v)
  3260.     respawntp=v
  3261. end)
  3262.  
  3263. local disguiscripts=nil
  3264. swtc("new gui scripts",{
  3265.     {value=true,text="disable"},
  3266.     {value=false,text="keep"}
  3267. },function(v)
  3268.     disguiscripts=v
  3269. end)
  3270. Connect(insGet(pg,"DescendantAdded"),function(v)
  3271.     if c and disguiscripts and IsA(v,"Script") then --mind Enum.RunContext.Client
  3272.         insSet(v,"Disabled",true)
  3273.     end
  3274. end)
  3275.  
  3276. swtc("new character scripts",{
  3277.     {value=function(v)
  3278.         if IsA(v,"Script") then --mind Enum.RunContext.Client
  3279.             insSet(v,"Disabled",true)
  3280.         end
  3281.     end,text="disable"},
  3282.     {value=false,text="keep"}
  3283. },function(v)
  3284.     discharscripts=v
  3285. end)
  3286.  
  3287. swtc("breakjoints",{
  3288.     {value=1,text="breakjoints+health"},
  3289.     {value=2,text="health or breakjoints"},
  3290.     {value=3,text="breakjoints"}
  3291. },function(v)
  3292.     breakjointsmethod=v
  3293. end)
  3294.  
  3295. swtc("set simulation radius",{
  3296.     {value=true,text="yes"},
  3297.     {value=false,text="no"},
  3298. },function(v)
  3299.     simrad=v
  3300. end)
  3301.  
  3302. local iscg,_=pcall(insSet,i10,"Parent",FindFirstChildOfClass(game,"CoreGui"))
  3303. if not iscg then
  3304.     insSet(i7,"Text","PLAYERGUI MODE")
  3305.     insSet(i10,"Parent",pg)
  3306.     twait(3)
  3307.     insSet(i7,"Text",guiTheme.guiTitle)
  3308. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement