papapyst

Fe patchma hub

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