Advertisement
Tigron1901

patchma

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