Advertisement
SCRIPTCUSTOMIZER

Test

Dec 6th, 2023
38
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 40.19 KB | None | 0 0
  1.  
  2.  
  3. function rmesh(a)
  4. if not (workspace[game.Players.LocalPlayer.Name][a].Handle:FindFirstChild('Mesh') or workspace[game.Players.LocalPlayer.Name][a].Handle:FindFirstChild('SpecialMesh')) then return end
  5. old=game.Players.LocalPlayer.Character
  6. game.Players.LocalPlayer.Character=workspace[game.Players.LocalPlayer.Name]
  7. for i,v in next, workspace[game.Players.LocalPlayer.Name]:FindFirstChild(a).Handle:GetDescendants() do
  8. if v:IsA('Mesh') or v:IsA('SpecialMesh') then
  9. v:Remove()
  10. end
  11. end
  12. for i = 1 , 2 do
  13. game.Players.LocalPlayer.Character=old
  14. end
  15. end
  16.  
  17.  
  18. local Vector3_101 = Vector3.new(1, 0, 1)
  19. local netless_Y = Vector3.new(0, 25.1, 0)
  20. local function getNetlessVelocity(realPartVelocity) --change this if you have a better method
  21. local mag = realPartVelocity.Magnitude
  22. if (mag > 1) and (mag < 100) then
  23. local unit = realPartVelocity.Unit
  24. if (unit.Y > 0.25) or (unit.Y < -0.75) then
  25. return realPartVelocity * (25.1 / realPartVelocity.Y)
  26. end
  27. realPartVelocity = unit * 100
  28. end
  29. return (realPartVelocity * Vector3_101) + netless_Y
  30. end
  31. local simradius = "shp" --simulation radius (net bypass) method
  32. --"shp" - sethiddenproperty
  33. --"ssr" - setsimulationradius
  34. --false - disable
  35. local noclipAllParts = false --set it to true if you want noclip
  36. local antiragdoll = true --removes hingeConstraints and ballSocketConstraints from your character
  37. local newanimate = true --disables the animate script and enables after reanimation
  38. local discharscripts = true --disables all localScripts parented to your character before reanimation
  39. local R15toR6 = true --tries to convert your character to r6 if its r15
  40. local hatcollide = false --makes hats cancollide (credit to ShownApe) (works only with reanimate method 0)
  41. local humState16 = true --enables collisions for limbs before the humanoid dies (using hum:ChangeState)
  42. local addtools = false --puts all tools from backpack to character and lets you hold them after reanimation
  43. local hedafterneck = true --disable aligns for head and enable after neck or torso is removed
  44. local loadtime = game:GetService("Players").RespawnTime + 0.5 --anti respawn delay
  45. local method = 3 --reanimation method
  46. --methods:
  47. --0 - breakJoints (takes [loadtime] seconds to laod)
  48. --1 - limbs
  49. --2 - limbs + anti respawn
  50. --3 - limbs + breakJoints after [loadtime] seconds
  51. --4 - remove humanoid + breakJoints
  52. --5 - remove humanoid + limbs
  53. local alignmode = 2 --AlignPosition mode
  54. --modes:
  55. --1 - AlignPosition rigidity enabled true
  56. --2 - 2 AlignPositions rigidity enabled both true and false
  57. --3 - AlignPosition rigidity enabled false
  58. local flingpart = "HumanoidRootPart" --name of the part or the hat used for flinging
  59. --the fling function
  60. --usage: fling(target, duration, velocity)
  61. --target can be set to: basePart, CFrame, Vector3, character model or humanoid (flings at mouse.Hit if argument not provided))
  62. --duration (fling time in seconds) can be set to: a number or a string convertable to the number (0.5s if not provided),
  63. --velocity (fling part rotation velocity) can be set to a vector3 value (Vector3.new(20000, 20000, 20000) if not provided)
  64.  
  65. local lp = game:GetService("Players").LocalPlayer
  66. local rs = game:GetService("RunService")
  67. local stepped = rs.Stepped
  68. local heartbeat = rs.Heartbeat
  69. local renderstepped = rs.RenderStepped
  70. local sg = game:GetService("StarterGui")
  71. local ws = game:GetService("Workspace")
  72. local cf = CFrame.new
  73. local v3 = Vector3.new
  74. local v3_0 = Vector3.zero
  75. local inf = math.huge
  76.  
  77. local c = lp.Character
  78.  
  79. if not (c and c.Parent) then
  80. return
  81. end
  82.  
  83. c:GetPropertyChangedSignal("Parent"):Connect(function()
  84. if not (c and c.Parent) then
  85. c = nil
  86. end
  87. end)
  88.  
  89. local function gp(parent, name, className)
  90. if typeof(parent) == "Instance" then
  91. for i, v in pairs(parent:GetChildren()) do
  92. if (v.Name == name) and v:IsA(className) then
  93. return v
  94. end
  95. end
  96. end
  97. return nil
  98. end
  99.  
  100. if type(getNetlessVelocity) ~= "function" then
  101. getNetlessVelocity = nil
  102. end
  103.  
  104. local function align(Part0, Part1)
  105. Part0.CustomPhysicalProperties = PhysicalProperties.new(0, 0, 0, 0, 0)
  106.  
  107. local att0 = Instance.new("Attachment")
  108. att0.Orientation = v3_0
  109. att0.Position = v3_0
  110. att0.Name = "att0_" .. Part0.Name
  111. local att1 = Instance.new("Attachment")
  112. att1.Orientation = v3_0
  113. att1.Position = v3_0
  114. att1.Name = "att1_" .. Part1.Name
  115.  
  116. if (alignmode == 1) or (alignmode == 2) then
  117. local ape = Instance.new("AlignPosition", att0)
  118. ape.ApplyAtCenterOfMass = false
  119. ape.MaxForce = inf
  120. ape.MaxVelocity = inf
  121. ape.ReactionForceEnabled = false
  122. ape.Responsiveness = 200
  123. ape.Attachment1 = att1
  124. ape.Attachment0 = att0
  125. ape.Name = "AlignPositionRtrue"
  126. ape.RigidityEnabled = true
  127. end
  128.  
  129. if (alignmode == 2) or (alignmode == 3) then
  130. local apd = Instance.new("AlignPosition", att0)
  131. apd.ApplyAtCenterOfMass = false
  132. apd.MaxForce = inf
  133. apd.MaxVelocity = inf
  134. apd.ReactionForceEnabled = false
  135. apd.Responsiveness = 200
  136. apd.Attachment1 = att1
  137. apd.Attachment0 = att0
  138. apd.Name = "AlignPositionRfalse"
  139. apd.RigidityEnabled = false
  140. end
  141.  
  142. local ao = Instance.new("AlignOrientation", att0)
  143. ao.MaxAngularVelocity = inf
  144. ao.MaxTorque = inf
  145. ao.PrimaryAxisOnly = false
  146. ao.ReactionTorqueEnabled = false
  147. ao.Responsiveness = 200
  148. ao.Attachment1 = att1
  149. ao.Attachment0 = att0
  150. ao.RigidityEnabled = false
  151.  
  152. if getNetlessVelocity then
  153. local vel = Part0.Velocity
  154. local velpart = Part1
  155. local rsteppedcon = renderstepped:Connect(function()
  156. Part0.Velocity = vel
  157. end)
  158. local heartbeatcon = heartbeat:Connect(function()
  159. vel = Part0.Velocity
  160. Part0.Velocity = getNetlessVelocity(velpart.Velocity)
  161. end)
  162. local attcon = nil
  163. Part0:GetPropertyChangedSignal("Parent"):Connect(function()
  164. if not (Part0 and Part0.Parent) then
  165. rsteppedcon:Disconnect()
  166. heartbeatcon:Disconnect()
  167. attcon:Disconnect()
  168. end
  169. end)
  170. attcon = att1:GetPropertyChangedSignal("Parent"):Connect(function()
  171. if not (att1 and att1.Parent) then
  172. attcon:Disconnect()
  173. velpart = Part0
  174. else
  175. velpart = att1.Parent
  176. if not velpart:IsA("BasePart") then
  177. velpart = Part0
  178. end
  179. end
  180. end)
  181. end
  182.  
  183. att0.Parent = Part0
  184. att1.Parent = Part1
  185. end
  186.  
  187. local function respawnrequest()
  188. local ccfr = ws.CurrentCamera.CFrame
  189. local c = lp.Character
  190. lp.Character = nil
  191. lp.Character = c
  192. local con = nil
  193. con = ws.CurrentCamera.Changed:Connect(function(prop)
  194. if (prop ~= "Parent") and (prop ~= "CFrame") then
  195. return
  196. end
  197. ws.CurrentCamera.CFrame = ccfr
  198. con:Disconnect()
  199. end)
  200. end
  201.  
  202. local destroyhum = (method == 4) or (method == 5)
  203. local breakjoints = (method == 0) or (method == 4)
  204. local antirespawn = (method == 0) or (method == 2) or (method == 3)
  205.  
  206. hatcollide = hatcollide and (method == 0)
  207.  
  208. addtools = addtools and gp(lp, "Backpack", "Backpack")
  209.  
  210. local fenv = getfenv()
  211. local shp = fenv.sethiddenproperty or fenv.set_hidden_property or fenv.set_hidden_prop or fenv.sethiddenprop
  212. local ssr = fenv.setsimulationradius or fenv.set_simulation_radius or fenv.set_sim_radius or fenv.setsimradius or fenv.set_simulation_rad or fenv.setsimulationrad
  213.  
  214. if shp and (simradius == "shp") then
  215. spawn(function()
  216. while c and heartbeat:Wait() do
  217. shp(lp, "SimulationRadius", inf)
  218. end
  219. end)
  220. elseif ssr and (simradius == "ssr") then
  221. spawn(function()
  222. while c and heartbeat:Wait() do
  223. ssr(inf)
  224. end
  225. end)
  226. end
  227.  
  228. antiragdoll = antiragdoll and function(v)
  229. if v:IsA("HingeConstraint") or v:IsA("BallSocketConstraint") then
  230. v.Parent = nil
  231. end
  232. end
  233.  
  234. if antiragdoll then
  235. for i, v in pairs(c:GetDescendants()) do
  236. antiragdoll(v)
  237. end
  238. c.DescendantAdded:Connect(antiragdoll)
  239. end
  240.  
  241. if antirespawn then
  242. respawnrequest()
  243. end
  244.  
  245. if method == 0 then
  246. wait(loadtime)
  247. if not c then
  248. return
  249. end
  250. end
  251.  
  252. if discharscripts then
  253. for i, v in pairs(c:GetChildren()) do
  254. if v:IsA("LocalScript") then
  255. v.Disabled = true
  256. end
  257. end
  258. elseif newanimate then
  259. local animate = gp(c, "Animate", "LocalScript")
  260. if animate and (not animate.Disabled) then
  261. animate.Disabled = true
  262. else
  263. newanimate = false
  264. end
  265. end
  266.  
  267. if addtools then
  268. for i, v in pairs(addtools:GetChildren()) do
  269. if v:IsA("Tool") then
  270. v.Parent = c
  271. end
  272. end
  273. end
  274.  
  275. pcall(function()
  276. settings().Physics.AllowSleep = false
  277. settings().Physics.PhysicsEnvironmentalThrottle = Enum.EnviromentalPhysicsThrottle.Disabled
  278. end)
  279.  
  280. local OLDscripts = {}
  281.  
  282. for i, v in pairs(c:GetDescendants()) do
  283. if v.ClassName == "Script" then
  284. table.insert(OLDscripts, v)
  285. end
  286. end
  287.  
  288. local scriptNames = {}
  289.  
  290. for i, v in pairs(c:GetDescendants()) do
  291. if v:IsA("BasePart") then
  292. local newName = tostring(i)
  293. local exists = true
  294. while exists do
  295. exists = false
  296. for i, v in pairs(OLDscripts) do
  297. if v.Name == newName then
  298. exists = true
  299. end
  300. end
  301. if exists then
  302. newName = newName .. "_"
  303. end
  304. end
  305. table.insert(scriptNames, newName)
  306. Instance.new("Script", v).Name = newName
  307. end
  308. end
  309.  
  310. c.Archivable = true
  311. local hum = c:FindFirstChildOfClass("Humanoid")
  312. if hum then
  313. for i, v in pairs(hum:GetPlayingAnimationTracks()) do
  314. v:Stop()
  315. end
  316. end
  317. local cl = c:Clone()
  318. if hum and humState16 then
  319. hum:ChangeState(Enum.HumanoidStateType.Physics)
  320. if destroyhum then
  321. wait(1.6)
  322. end
  323. end
  324. if hum and hum.Parent and destroyhum then
  325. hum:Destroy()
  326. end
  327.  
  328. if not c then
  329. return
  330. end
  331.  
  332. local head = gp(c, "Head", "BasePart")
  333. local torso = gp(c, "Torso", "BasePart") or gp(c, "UpperTorso", "BasePart")
  334. local root = gp(c, "HumanoidRootPart", "BasePart")
  335. if hatcollide and c:FindFirstChildOfClass("Accessory") then
  336. local anything = c:FindFirstChildOfClass("BodyColors") or gp(c, "Health", "Script")
  337. if not (torso and root and anything) then
  338. return
  339. end
  340. torso:Destroy()
  341. root:Destroy()
  342. if shp then
  343. for i,v in pairs(c:GetChildren()) do
  344. if v:IsA("Accessory") then
  345. shp(v, "BackendAccoutrementState", 0)
  346. end
  347. end
  348. end
  349. anything:Destroy()
  350. end
  351.  
  352. local model = Instance.new("Model", c)
  353. model.Name = model.ClassName
  354.  
  355. model:GetPropertyChangedSignal("Parent"):Connect(function()
  356. if not (model and model.Parent) then
  357. model = nil
  358. end
  359. end)
  360.  
  361. for i, v in pairs(c:GetChildren()) do
  362. if v ~= model then
  363. if addtools and v:IsA("Tool") then
  364. for i1, v1 in pairs(v:GetDescendants()) do
  365. if v1 and v1.Parent and v1:IsA("BasePart") then
  366. local bv = Instance.new("BodyVelocity", v1)
  367. bv.Velocity = v3_0
  368. bv.MaxForce = v3(1000, 1000, 1000)
  369. bv.P = 1250
  370. bv.Name = "bv_" .. v.Name
  371. end
  372. end
  373. end
  374. v.Parent = model
  375. end
  376. end
  377.  
  378. if breakjoints then
  379. model:BreakJoints()
  380. else
  381. if head and torso then
  382. for i, v in pairs(model:GetDescendants()) do
  383. if v:IsA("Weld") or v:IsA("Snap") or v:IsA("Glue") or v:IsA("Motor") or v:IsA("Motor6D") then
  384. local save = false
  385. if (v.Part0 == torso) and (v.Part1 == head) then
  386. save = true
  387. end
  388. if (v.Part0 == head) and (v.Part1 == torso) then
  389. save = true
  390. end
  391. if save then
  392. if hedafterneck then
  393. hedafterneck = v
  394. end
  395. else
  396. v:Destroy()
  397. end
  398. end
  399. end
  400. end
  401. if method == 3 then
  402. spawn(function()
  403. wait(loadtime)
  404. if model then
  405. model:BreakJoints()
  406. end
  407. end)
  408. end
  409. end
  410.  
  411. cl.Parent = c
  412. for i, v in pairs(cl:GetChildren()) do
  413. v.Parent = c
  414. end
  415. cl:Destroy()
  416.  
  417. local noclipmodel = (noclipAllParts and c) or model
  418. local noclipcon = nil
  419. local function uncollide()
  420. if noclipmodel then
  421. for i, v in pairs(noclipmodel:GetDescendants()) do
  422. if v:IsA("BasePart") then
  423. v.CanCollide = false
  424. end
  425. end
  426. else
  427. noclipcon:Disconnect()
  428. end
  429. end
  430. noclipcon = stepped:Connect(uncollide)
  431. uncollide()
  432.  
  433. for i, scr in pairs(model:GetDescendants()) do
  434. if (scr.ClassName == "Script") and table.find(scriptNames, scr.Name) then
  435. local Part0 = scr.Parent
  436. if Part0:IsA("BasePart") then
  437. for i1, scr1 in pairs(c:GetDescendants()) do
  438. if (scr1.ClassName == "Script") and (scr1.Name == scr.Name) and (not scr1:IsDescendantOf(model)) then
  439. local Part1 = scr1.Parent
  440. if (Part1.ClassName == Part0.ClassName) and (Part1.Name == Part0.Name) then
  441. align(Part0, Part1)
  442. scr:Destroy()
  443. scr1:Destroy()
  444. break
  445. end
  446. end
  447. end
  448. end
  449. end
  450. end
  451.  
  452. for i, v in pairs(c:GetDescendants()) do
  453. if v and v.Parent and (not v:IsDescendantOf(model)) then
  454. if v:IsA("Decal") then
  455. v.Transparency = 1
  456. elseif v:IsA("BasePart") then
  457. v.Transparency = 1
  458. v.Anchored = false
  459. elseif v:IsA("ForceField") then
  460. v.Visible = false
  461. elseif v:IsA("Sound") then
  462. v.Playing = false
  463. elseif v:IsA("BillboardGui") or v:IsA("SurfaceGui") or v:IsA("ParticleEmitter") or v:IsA("Fire") or v:IsA("Smoke") or v:IsA("Sparkles") then
  464. v.Enabled = false
  465. end
  466. end
  467. end
  468.  
  469. if newanimate then
  470. local animate = gp(c, "Animate", "LocalScript")
  471. if animate then
  472. animate.Disabled = false
  473. end
  474. end
  475.  
  476. if addtools then
  477. for i, v in pairs(c:GetChildren()) do
  478. if v:IsA("Tool") then
  479. v.Parent = addtools
  480. end
  481. end
  482. end
  483.  
  484. local hum0 = model:FindFirstChildOfClass("Humanoid")
  485. if hum0 then
  486. hum0:GetPropertyChangedSignal("Parent"):Connect(function()
  487. if not (hum0 and hum0.Parent) then
  488. hum0 = nil
  489. end
  490. end)
  491. end
  492.  
  493. local hum1 = c:FindFirstChildOfClass("Humanoid")
  494. if hum1 then
  495. hum1:GetPropertyChangedSignal("Parent"):Connect(function()
  496. if not (hum1 and hum1.Parent) then
  497. hum1 = nil
  498. end
  499. end)
  500.  
  501. ws.CurrentCamera.CameraSubject = hum1
  502. local camSubCon = nil
  503. local function camSubFunc()
  504. camSubCon:Disconnect()
  505. if c and hum1 then
  506. ws.CurrentCamera.CameraSubject = hum1
  507. end
  508. end
  509. camSubCon = renderstepped:Connect(camSubFunc)
  510. if hum0 then
  511. hum0:GetPropertyChangedSignal("Jump"):Connect(function()
  512. if hum1 then
  513. hum1.Jump = hum0.Jump
  514. end
  515. end)
  516. else
  517. respawnrequest()
  518. end
  519. end
  520.  
  521. local rb = Instance.new("BindableEvent", c)
  522. rb.Event:Connect(function()
  523. rb:Destroy()
  524. sg:SetCore("ResetButtonCallback", true)
  525. if destroyhum then
  526. c:BreakJoints()
  527. return
  528. end
  529. if hum0 and (hum0.Health > 0) then
  530. model:BreakJoints()
  531. hum0.Health = 0
  532. end
  533. if antirespawn then
  534. respawnrequest()
  535. end
  536. end)
  537. sg:SetCore("ResetButtonCallback", rb)
  538.  
  539. spawn(function()
  540. while c do
  541. if hum0 and hum1 then
  542. hum1.Jump = hum0.Jump
  543. end
  544. wait()
  545. end
  546. sg:SetCore("ResetButtonCallback", true)
  547. end)
  548.  
  549. R15toR6 = R15toR6 and hum1 and (hum1.RigType == Enum.HumanoidRigType.R15)
  550. if R15toR6 then
  551. local part = gp(c, "HumanoidRootPart", "BasePart") or gp(c, "UpperTorso", "BasePart") or gp(c, "LowerTorso", "BasePart") or gp(c, "Head", "BasePart") or c:FindFirstChildWhichIsA("BasePart")
  552. if part then
  553. local cfr = part.CFrame
  554. local R6parts = {
  555. head = {
  556. Name = "Head",
  557. Size = v3(2, 1, 1),
  558. R15 = {
  559. Head = 0
  560. }
  561. },
  562. torso = {
  563. Name = "Torso",
  564. Size = v3(2, 2, 1),
  565. R15 = {
  566. UpperTorso = 0.2,
  567. LowerTorso = -0.8
  568. }
  569. },
  570. root = {
  571. Name = "HumanoidRootPart",
  572. Size = v3(2, 2, 1),
  573. R15 = {
  574. HumanoidRootPart = 0
  575. }
  576. },
  577. leftArm = {
  578. Name = "Left Arm",
  579. Size = v3(1, 2, 1),
  580. R15 = {
  581. LeftHand = -0.849,
  582. LeftLowerArm = -0.174,
  583. LeftUpperArm = 0.415
  584. }
  585. },
  586. rightArm = {
  587. Name = "Right Arm",
  588. Size = v3(1, 2, 1),
  589. R15 = {
  590. RightHand = -0.849,
  591. RightLowerArm = -0.174,
  592. RightUpperArm = 0.415
  593. }
  594. },
  595. leftLeg = {
  596. Name = "Left Leg",
  597. Size = v3(1, 2, 1),
  598. R15 = {
  599. LeftFoot = -0.85,
  600. LeftLowerLeg = -0.29,
  601. LeftUpperLeg = 0.49
  602. }
  603. },
  604. rightLeg = {
  605. Name = "Right Leg",
  606. Size = v3(1, 2, 1),
  607. R15 = {
  608. RightFoot = -0.85,
  609. RightLowerLeg = -0.29,
  610. RightUpperLeg = 0.49
  611. }
  612. }
  613. }
  614. for i, v in pairs(c:GetChildren()) do
  615. if v:IsA("BasePart") then
  616. for i1, v1 in pairs(v:GetChildren()) do
  617. if v1:IsA("Motor6D") then
  618. v1.Part0 = nil
  619. end
  620. end
  621. end
  622. end
  623. part.Archivable = true
  624. for i, v in pairs(R6parts) do
  625. local part = part:Clone()
  626. part:ClearAllChildren()
  627. part.Name = v.Name
  628. part.Size = v.Size
  629. part.CFrame = cfr
  630. part.Anchored = false
  631. part.Transparency = 1
  632. part.CanCollide = false
  633. for i1, v1 in pairs(v.R15) do
  634. local R15part = gp(c, i1, "BasePart")
  635. local att = gp(R15part, "att1_" .. i1, "Attachment")
  636. if R15part then
  637. local weld = Instance.new("Weld", R15part)
  638. weld.Name = "Weld_" .. i1
  639. weld.Part0 = part
  640. weld.Part1 = R15part
  641. weld.C0 = cf(0, v1, 0)
  642. weld.C1 = cf(0, 0, 0)
  643. R15part.Massless = true
  644. R15part.Name = "R15_" .. i1
  645. R15part.Parent = part
  646. if att then
  647. att.Parent = part
  648. att.Position = v3(0, v1, 0)
  649. end
  650. end
  651. end
  652. part.Parent = c
  653. R6parts[i] = part
  654. end
  655. local R6joints = {
  656. neck = {
  657. Parent = R6parts.torso,
  658. Name = "Neck",
  659. Part0 = R6parts.torso,
  660. Part1 = R6parts.head,
  661. C0 = cf(0, 1, 0, -1, 0, 0, 0, 0, 1, 0, 1, -0),
  662. C1 = cf(0, -0.5, 0, -1, 0, 0, 0, 0, 1, 0, 1, -0)
  663. },
  664. rootJoint = {
  665. Parent = R6parts.root,
  666. Name = "RootJoint" ,
  667. Part0 = R6parts.root,
  668. Part1 = R6parts.torso,
  669. C0 = cf(0, 0, 0, -1, 0, 0, 0, 0, 1, 0, 1, -0),
  670. C1 = cf(0, 0, 0, -1, 0, 0, 0, 0, 1, 0, 1, -0)
  671. },
  672. rightShoulder = {
  673. Parent = R6parts.torso,
  674. Name = "Right Shoulder",
  675. Part0 = R6parts.torso,
  676. Part1 = R6parts.rightArm,
  677. C0 = cf(1, 0.5, 0, 0, 0, 1, 0, 1, -0, -1, 0, 0),
  678. C1 = cf(-0.5, 0.5, 0, 0, 0, 1, 0, 1, -0, -1, 0, 0)
  679. },
  680. leftShoulder = {
  681. Parent = R6parts.torso,
  682. Name = "Left Shoulder",
  683. Part0 = R6parts.torso,
  684. Part1 = R6parts.leftArm,
  685. C0 = cf(-1, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0),
  686. C1 = cf(0.5, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  687. },
  688. rightHip = {
  689. Parent = R6parts.torso,
  690. Name = "Right Hip",
  691. Part0 = R6parts.torso,
  692. Part1 = R6parts.rightLeg,
  693. C0 = cf(1, -1, 0, 0, 0, 1, 0, 1, -0, -1, 0, 0),
  694. C1 = cf(0.5, 1, 0, 0, 0, 1, 0, 1, -0, -1, 0, 0)
  695. },
  696. leftHip = {
  697. Parent = R6parts.torso,
  698. Name = "Left Hip" ,
  699. Part0 = R6parts.torso,
  700. Part1 = R6parts.leftLeg,
  701. C0 = cf(-1, -1, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0),
  702. C1 = cf(-0.5, 1, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  703. }
  704. }
  705. for i, v in pairs(R6joints) do
  706. local joint = Instance.new("Motor6D")
  707. for prop, val in pairs(v) do
  708. joint[prop] = val
  709. end
  710. R6joints[i] = joint
  711. end
  712. if hum1 then
  713. hum1.RigType = Enum.HumanoidRigType.R6
  714. hum1.HipHeight = 0
  715. end
  716. end
  717. end
  718.  
  719. local torso1 = torso
  720. torso = gp(c, "Torso", "BasePart") or ((not R15toR6) and gp(c, torso.Name, "BasePart"))
  721. if (typeof(hedafterneck) == "Instance") and head and torso and torso1 then
  722. local conNeck = nil
  723. local conTorso = nil
  724. local contorso1 = nil
  725. local aligns = {}
  726. local function enableAligns()
  727. conNeck:Disconnect()
  728. conTorso:Disconnect()
  729. conTorso1:Disconnect()
  730. for i, v in pairs(aligns) do
  731. v.Enabled = true
  732. end
  733. end
  734. conNeck = hedafterneck.Changed:Connect(function(prop)
  735. if table.find({"Part0", "Part1", "Parent"}, prop) then
  736. enableAligns()
  737. end
  738. end)
  739. conTorso = torso:GetPropertyChangedSignal("Parent"):Connect(enableAligns)
  740. conTorso1 = torso1:GetPropertyChangedSignal("Parent"):Connect(enableAligns)
  741. for i, v in pairs(head:GetDescendants()) do
  742. if v:IsA("AlignPosition") or v:IsA("AlignOrientation") then
  743. i = tostring(i)
  744. aligns[i] = v
  745. v:GetPropertyChangedSignal("Parent"):Connect(function()
  746. aligns[i] = nil
  747. end)
  748. v.Enabled = false
  749. end
  750. end
  751. end
  752.  
  753. local flingpart0 = gp(model, flingpart, "BasePart") or gp(gp(model, flingpart, "Accessory"), "Handle", "BasePart")
  754. local flingpart1 = gp(c, flingpart, "BasePart") or gp(gp(c, flingpart, "Accessory"), "Handle", "BasePart")
  755.  
  756. local fling = function() end
  757. if flingpart0 and flingpart1 then
  758. flingpart0:GetPropertyChangedSignal("Parent"):Connect(function()
  759. if not (flingpart0 and flingpart0.Parent) then
  760. flingpart0 = nil
  761. fling = function() end
  762. end
  763. end)
  764. flingpart0.Archivable = true
  765. flingpart1:GetPropertyChangedSignal("Parent"):Connect(function()
  766. if not (flingpart1 and flingpart1.Parent) then
  767. flingpart1 = nil
  768. fling = function() end
  769. end
  770. end)
  771. local att0 = gp(flingpart0, "att0_" .. flingpart0.Name, "Attachment")
  772. local att1 = gp(flingpart1, "att1_" .. flingpart1.Name, "Attachment")
  773. if att0 and att1 then
  774. att0:GetPropertyChangedSignal("Parent"):Connect(function()
  775. if not (att0 and att0.Parent) then
  776. att0 = nil
  777. fling = function() end
  778. end
  779. end)
  780. att1:GetPropertyChangedSignal("Parent"):Connect(function()
  781. if not (att1 and att1.Parent) then
  782. att1 = nil
  783. fling = function() end
  784. end
  785. end)
  786. local lastfling = nil
  787. local mouse = lp:GetMouse()
  788. fling = function(target, duration, rotVelocity)
  789. if typeof(target) == "Instance" then
  790. if target:IsA("BasePart") then
  791. target = target.Position
  792. elseif target:IsA("Model") then
  793. target = gp(target, "HumanoidRootPart", "BasePart") or gp(target, "Torso", "BasePart") or gp(target, "UpperTorso", "BasePart") or target:FindFirstChildWhichIsA("BasePart")
  794. if target then
  795. target = target.Position
  796. else
  797. return
  798. end
  799. elseif target:IsA("Humanoid") then
  800. local parent = target.Parent
  801. if not (parent and parent:IsA("Model")) then
  802. return
  803. end
  804. target = gp(target, "HumanoidRootPart", "BasePart") or gp(target, "Torso", "BasePart") or gp(target, "UpperTorso", "BasePart") or target:FindFirstChildWhichIsA("BasePart")
  805. if target then
  806. target = target.Position
  807. else
  808. return
  809. end
  810. else
  811. return
  812. end
  813. elseif typeof(target) == "CFrame" then
  814. target = target.Position
  815. elseif typeof(target) ~= "Vector3" then
  816. target = mouse.Hit
  817. if target then
  818. target = target.Position
  819. else
  820. return
  821. end
  822. end
  823. lastfling = target
  824. if type(duration) ~= "number" then
  825. duration = tonumber(duration) or 0.5
  826. end
  827. if typeof(rotVelocity) ~= "Vector3" then
  828. rotVelocity = v3(20000, 20000, 20000)
  829. end
  830. if not (target and flingpart0 and flingpart1 and att0 and att1) then
  831. return
  832. end
  833. local flingpart = flingpart0:Clone()
  834. flingpart.Transparency = 1
  835. flingpart.Size = v3(0.01, 0.01, 0.01)
  836. flingpart.CanCollide = false
  837. flingpart.Name = "flingpart_" .. flingpart0.Name
  838. flingpart.Anchored = true
  839. flingpart.Velocity = v3_0
  840. flingpart.RotVelocity = v3_0
  841. flingpart:GetPropertyChangedSignal("Parent"):Connect(function()
  842. if not (flingpart and flingpart.Parent) then
  843. flingpart = nil
  844. end
  845. end)
  846. flingpart.Parent = flingpart1
  847. if flingpart0.Transparency > 0.5 then
  848. flingpart0.Transparency = 0.5
  849. end
  850. att1.Parent = flingpart
  851. for i, v in pairs(att0:GetChildren()) do
  852. if v:IsA("AlignOrientation") then
  853. v.Enabled = false
  854. end
  855. end
  856. local con = nil
  857. con = heartbeat:Connect(function()
  858. if target and (lastfling == target) and flingpart and flingpart0 and flingpart1 and att0 and att1 then
  859. flingpart0.RotVelocity = rotVelocity
  860. flingpart.Position = target
  861. else
  862. con:Disconnect()
  863. end
  864. end)
  865. local rsteppedRotVel = v3(
  866. ((rotVelocity.X > 0) and -1) or 1,
  867. ((rotVelocity.Y > 0) and -1) or 1,
  868. ((rotVelocity.Z > 0) and -1) or 1
  869. )
  870. local con = nil
  871. con = renderstepped:Connect(function()
  872. if target and (lastfling == target) and flingpart and flingpart0 and flingpart1 and att0 and att1 then
  873. flingpart0.RotVelocity = rsteppedRotVel
  874. flingpart.Position = target
  875. else
  876. con:Disconnect()
  877. end
  878. end)
  879. wait(duration)
  880. if lastfling ~= target then
  881. if flingpart then
  882. if att1 and (att1.Parent == flingpart) then
  883. att1.Parent = flingpart1
  884. end
  885. flingpart:Destroy()
  886. end
  887. return
  888. end
  889. target = nil
  890. if not (flingpart and flingpart0 and flingpart1 and att0 and att1) then
  891. return
  892. end
  893. flingpart0.RotVelocity = v3_0
  894. att1.Parent = flingpart1
  895. for i, v in pairs(att0:GetChildren()) do
  896. if v:IsA("AlignOrientation") then
  897. v.Enabled = true
  898. end
  899. end
  900. if flingpart then
  901. flingpart:Destroy()
  902. end
  903. end
  904. end
  905. end
  906.  
  907. IT = Instance.new
  908. CF = CFrame.new
  909. VT = Vector3.new
  910. RAD = math.rad
  911. C3 = Color3.new
  912. UD2 = UDim2.new
  913. BRICKC = BrickColor.new
  914. ANGLES = CFrame.Angles
  915. EULER = CFrame.fromEulerAnglesXYZ
  916. COS = math.cos
  917. ACOS = math.acos
  918. SIN = math.sin
  919. ASIN = math.asin
  920. ABS = math.abs
  921. MRANDOM = math.random
  922. FLOOR = math.floor
  923.  
  924. speed = 1
  925. sine = 1
  926. srv = game:GetService('RunService')
  927.  
  928. reanim = game.Players.LocalPlayer.Character
  929.  
  930. function hat(h,p,c1,c0,m)
  931. reanim[h].Handle.AccessoryWeld.Part1=reanim[p]
  932. reanim[h].Handle.AccessoryWeld.C1=c1 or CFrame.new()
  933. reanim[h].Handle.AccessoryWeld.C0=reanim[h].Handle.AccessoryWeld.C0:Lerp(c0 or CFrame.new(),1)
  934. if m == true then
  935. rmesh(h)
  936. end
  937. end
  938. m=game.Players.LocalPlayer:GetMouse()
  939. RJ = reanim.HumanoidRootPart.RootJoint
  940. RS = reanim.Torso['Right Shoulder']
  941. LS = reanim.Torso['Left Shoulder']
  942. RH = reanim.Torso['Right Hip']
  943. LH = reanim.Torso['Left Hip']
  944. Root = reanim.HumanoidRootPart
  945. NECK = reanim.Torso.Neck
  946. NECK.C0 = CF(0,1,0)*ANGLES(RAD(0),RAD(0),RAD(0))
  947. NECK.C1 = CF(0,-0.5,0)*ANGLES(RAD(0),RAD(0),RAD(0))
  948. RJ.C1 = CF(0,-1,0)*ANGLES(RAD(0),RAD(0),RAD(0))
  949. RJ.C0 = CF(0,0,0)*ANGLES(RAD(0),RAD(0),RAD(0))
  950. RS.C1 = CF(0,0.5,0)*ANGLES(RAD(0),RAD(0),RAD(0))
  951. LS.C1 = CF(0,0.5,0)*ANGLES(RAD(0),RAD(0),RAD(0))
  952. RH.C1 = CF(0,1,0)*ANGLES(RAD(0),RAD(0),RAD(0))
  953. LH.C1 = CF(0,1,0)*ANGLES(RAD(0),RAD(0),RAD(0))
  954. RH.C0 = CF(0,0,0)*ANGLES(RAD(0),RAD(0),RAD(0))
  955. LH.C0 = CF(0,0,0)*ANGLES(RAD(0),RAD(0),RAD(0))
  956. RS.C0 = CF(0,0,0)*ANGLES(RAD(0),RAD(0),RAD(0))
  957. LS.C0 = CF(0,0,0)*ANGLES(RAD(0),RAD(0),RAD(0))
  958.  
  959. -- for modes u can go in this link : https://Nexo.notxeneon15.repl.co/nexo/modes.lua
  960.  
  961. coroutine.wrap(function()
  962. while true do -- anim changer
  963. if HumanDied then break end
  964. sine = sine + speed
  965. local rlegray = Ray.new(reanim["Right Leg"].Position + Vector3.new(0, 0.5, 0), Vector3.new(0, -2, 0))
  966. local rlegpart, rlegendPoint = workspace:FindPartOnRay(rlegray, char)
  967. local llegray = Ray.new(reanim["Left Leg"].Position + Vector3.new(0, 0.5, 0), Vector3.new(0, -2, 0))
  968. local llegpart, llegendPoint = workspace:FindPartOnRay(llegray, char)
  969. local rightvector = (Root.Velocity * Root.CFrame.rightVector).X + (Root.Velocity * Root.CFrame.rightVector).Z
  970. local lookvector = (Root.Velocity * Root.CFrame.lookVector).X + (Root.Velocity * Root.CFrame.lookVector).Z
  971. if lookvector > reanim.Humanoid.WalkSpeed then
  972. lookvector = reanim.Humanoid.WalkSpeed
  973. end
  974. if lookvector < -reanim.Humanoid.WalkSpeed then
  975. lookvector = -reanim.Humanoid.WalkSpeed
  976. end
  977. if rightvector > reanim.Humanoid.WalkSpeed then
  978. rightvector = reanim.Humanoid.WalkSpeed
  979. end
  980. if rightvector < -reanim.Humanoid.WalkSpeed then
  981. rightvector = -reanim.Humanoid.WalkSpeed
  982. end
  983. local lookvel = lookvector / reanim.Humanoid.WalkSpeed
  984. local rightvel = rightvector / reanim.Humanoid.WalkSpeed
  985. if Mode == 'normal' or Mode == 'Normal' then
  986. if reanim.Humanoid.Jump then -- jump
  987.  
  988.  
  989.  
  990. ---NECK.C0=NECK.C0:Lerp(CFrame.new(0+0*math.cos(sine/10),1+0*math.cos(sine/10),0+0*math.cos(sine/10))*CFrame.Angles(math.rad(0+0*math.cos(sine/10)),math.rad(0+0*math.cos(sine/10)),math.rad(0+0*math.cos(sine/10))),.2)
  991. RJ.C0=RJ.C0:Lerp(CFrame.new(0+0*math.cos(sine/10),-1+0*math.cos(sine/19),0+0*math.cos(sine/10))*CFrame.Angles(math.rad(0+0*math.cos(sine/19)),math.rad(0+0*math.cos(sine/10)),math.rad(0+0*math.cos(sine/10))),.2)
  992. RS.C0=RS.C0:Lerp(CFrame.new(1.5+0*math.cos(sine/10),-0+0.1*math.cos(sine/26),0+0*math.cos(sine/10))*CFrame.Angles(math.rad(72+0*math.cos(sine/26)),math.rad(0+0*math.cos(sine/10)),math.rad(35+0*math.cos(sine/10))),.2)
  993. LS.C0=LS.C0:Lerp(CFrame.new(-1.5+0*math.cos(sine/10),-0+-0.1*math.cos(sine/26),0+0*math.cos(sine/10))*CFrame.Angles(math.rad(72+0*math.cos(sine/26)),math.rad(0+0*math.cos(sine/10)),math.rad(-32+0*math.cos(sine/10))),.2)
  994. RH.C0=RH.C0:Lerp(CFrame.new(0.82+0*math.cos(sine/10),325+0*math.cos(sine/10),0+0*math.cos(sine/10))*CFrame.Angles(math.rad(0+0*math.cos(sine/10)),math.rad(0+0*math.cos(sine/10)),math.rad(0+0*math.cos(sine/10))),.2)
  995. LH.C0=LH.C0:Lerp(CFrame.new(-0.5+0*math.cos(sine/10),325+0*math.cos(sine/10),-0+0*math.cos(sine/10))*CFrame.Angles(math.rad(0+0*math.cos(sine/10)),math.rad(0+0*math.cos(sine/10)),math.rad(0+0*math.cos(sine/10))),.2)
  996.  
  997. elseif Root.Velocity.y < -1 and reanim.Humanoid.Jump then -- fall
  998.  
  999.  
  1000.  
  1001. ---NECK.C0=NECK.C0:Lerp(CFrame.new(0+0*math.cos(sine/10),1+0*math.cos(sine/10),0+0*math.cos(sine/10))*CFrame.Angles(math.rad(0+0*math.cos(sine/10)),math.rad(0+0*math.cos(sine/10)),math.rad(0+0*math.cos(sine/10))),.2)
  1002. RJ.C0=RJ.C0:Lerp(CFrame.new(0+0*math.cos(sine/10),-1+0*math.cos(sine/19),0+0*math.cos(sine/10))*CFrame.Angles(math.rad(0+0*math.cos(sine/19)),math.rad(0+0*math.cos(sine/10)),math.rad(0+0*math.cos(sine/10))),.2)
  1003. RS.C0=RS.C0:Lerp(CFrame.new(1.5+0*math.cos(sine/10),-0+0.1*math.cos(sine/26),0+0*math.cos(sine/10))*CFrame.Angles(math.rad(112+0*math.cos(sine/10)),math.rad(0+0*math.cos(sine/10)),math.rad(23+0*math.cos(sine/10))),.2)
  1004. LS.C0=LS.C0:Lerp(CFrame.new(-1.5+0*math.cos(sine/10),-0+-0.1*math.cos(sine/26),0+0*math.cos(sine/10))*CFrame.Angles(math.rad(112+0*math.cos(sine/10)),math.rad(0+0*math.cos(sine/10)),math.rad(0+0*math.cos(sine/10))),.2)
  1005. RH.C0=RH.C0:Lerp(CFrame.new(0.82+0*math.cos(sine/10),325+0*math.cos(sine/10),0+0*math.cos(sine/10))*CFrame.Angles(math.rad(0+0*math.cos(sine/10)),math.rad(0+0*math.cos(sine/10)),math.rad(0+0*math.cos(sine/10))),.2)
  1006. LH.C0=LH.C0:Lerp(CFrame.new(-0.5+0*math.cos(sine/10),325+0*math.cos(sine/10),-0+0*math.cos(sine/10))*CFrame.Angles(math.rad(0+0*math.cos(sine/10)),math.rad(0+0*math.cos(sine/10)),math.rad(0+0*math.cos(sine/10))),.2)
  1007.  
  1008. elseif Root.Velocity.Magnitude < 2 then -- idle
  1009.  
  1010.  
  1011.  
  1012. ---NECK.C0=NECK.C0:Lerp(CFrame.new(0+0*math.cos(sine/10),1+0*math.cos(sine/10),0+0*math.cos(sine/10))*CFrame.Angles(math.rad(0+0*math.cos(sine/10)),math.rad(0+0*math.cos(sine/10)),math.rad(0+0*math.cos(sine/10))),.2)
  1013. RJ.C0=RJ.C0:Lerp(CFrame.new(0+0*math.cos(sine/10),-2.8+0*math.cos(sine/19),0+0*math.cos(sine/10))*CFrame.Angles(math.rad(0+0*math.cos(sine/19)),math.rad(0+0*math.cos(sine/10)),math.rad(0+0*math.cos(sine/10))),.2)
  1014. RS.C0=RS.C0:Lerp(CFrame.new(1.5+0*math.cos(sine/10),-0+0*math.cos(sine/10),0+0*math.cos(sine/10))*CFrame.Angles(math.rad(65+0*math.cos(sine/10)),math.rad(0+0*math.cos(sine/10)),math.rad(0+0*math.cos(sine/10))),.2)
  1015. LS.C0=LS.C0:Lerp(CFrame.new(-1.5+0*math.cos(sine/10),-0+0*math.cos(sine/10),0+0*math.cos(sine/10))*CFrame.Angles(math.rad(65+0*math.cos(sine/10)),math.rad(0+0*math.cos(sine/10)),math.rad(0+0*math.cos(sine/10))),.2)
  1016. RH.C0=RH.C0:Lerp(CFrame.new(0.82+0*math.cos(sine/10),250+0*math.cos(sine/10),0+0*math.cos(sine/10))*CFrame.Angles(math.rad(0+0*math.cos(sine/10)),math.rad(0+0*math.cos(sine/10)),math.rad(0+0*math.cos(sine/10))),.2)
  1017. LH.C0=LH.C0:Lerp(CFrame.new(-0.5+0*math.cos(sine/10),250+0*math.cos(sine/10),-0+0*math.cos(sine/10))*CFrame.Angles(math.rad(0+0*math.cos(sine/10)),math.rad(0+0*math.cos(sine/10)),math.rad(0+0*math.cos(sine/10))),.2)
  1018. elseif Root.Velocity.Magnitude < 20 then -- walk
  1019.  
  1020.  
  1021.  
  1022. ---NECK.C0=NECK.C0:Lerp(CFrame.new(0+0*math.cos(sine/10),1+0*math.cos(sine/10),0+0*math.cos(sine/10))*CFrame.Angles(math.rad(0+0*math.cos(sine/10)),math.rad(0+0*math.cos(sine/10)),math.rad(0+0*math.cos(sine/10))),.2)
  1023. RJ.C0=RJ.C0:Lerp(CFrame.new(0+0*math.cos(sine/10),-1+0*math.cos(sine/19),0+0*math.cos(sine/10))*CFrame.Angles(math.rad(0+0*math.cos(sine/19)),math.rad(0+0*math.cos(sine/10)),math.rad(0+0*math.cos(sine/10))),.2)
  1024. RS.C0=RS.C0:Lerp(CFrame.new(1.5+0*math.cos(sine/10),-0+0.1*math.cos(sine/26),0+0*math.cos(sine/10))*CFrame.Angles(math.rad(0+-68*math.cos(sine/10)),math.rad(0+0*math.cos(sine/10)),math.rad(0+0*math.cos(sine/10))),.2)
  1025. LS.C0=LS.C0:Lerp(CFrame.new(-1.5+0*math.cos(sine/10),-0+-0.1*math.cos(sine/26),0+0*math.cos(sine/10))*CFrame.Angles(math.rad(0+68*math.cos(sine/10)),math.rad(0+0*math.cos(sine/10)),math.rad(0+0*math.cos(sine/10))),.2)
  1026. RH.C0=RH.C0:Lerp(CFrame.new(0.82+0*math.cos(sine/10),325+0*math.cos(sine/10),0+0*math.cos(sine/10))*CFrame.Angles(math.rad(0+0*math.cos(sine/10)),math.rad(0+0*math.cos(sine/10)),math.rad(0+0*math.cos(sine/10))),.2)
  1027. LH.C0=LH.C0:Lerp(CFrame.new(-0.5+0*math.cos(sine/10),325+0*math.cos(sine/10),-0+0*math.cos(sine/10))*CFrame.Angles(math.rad(0+0*math.cos(sine/10)),math.rad(0+0*math.cos(sine/10)),math.rad(0+0*math.cos(sine/10))),.2)
  1028. elseif Root.Velocity.Magnitude > 20 then -- run
  1029.  
  1030.  
  1031.  
  1032. ---NECK.C0=NECK.C0:Lerp(CFrame.new(0+0*math.cos(sine/10),1+0*math.cos(sine/10),0+0*math.cos(sine/10))*CFrame.Angles(math.rad(0+0*math.cos(sine/10)),math.rad(0+0*math.cos(sine/10)),math.rad(0+0*math.cos(sine/10))),.2)
  1033. RJ.C0=RJ.C0:Lerp(CFrame.new(0+0*math.cos(sine/10),-1+0*math.cos(sine/19),0+0*math.cos(sine/10))*CFrame.Angles(math.rad(0+0*math.cos(sine/19)),math.rad(0+0*math.cos(sine/10)),math.rad(0+0*math.cos(sine/10))),.2)
  1034. RS.C0=RS.C0:Lerp(CFrame.new(1.5+0*math.cos(sine/10),-0+0.1*math.cos(sine/26),0+0*math.cos(sine/10))*CFrame.Angles(math.rad(0+-68*math.cos(sine/7)),math.rad(0+0*math.cos(sine/10)),math.rad(0+0*math.cos(sine/10))),.2)
  1035. LS.C0=LS.C0:Lerp(CFrame.new(-1.5+0*math.cos(sine/10),-0+-0.1*math.cos(sine/26),0+0*math.cos(sine/10))*CFrame.Angles(math.rad(0+68*math.cos(sine/7)),math.rad(0+0*math.cos(sine/10)),math.rad(0+0*math.cos(sine/10))),.2)
  1036. RH.C0=RH.C0:Lerp(CFrame.new(0.82+0*math.cos(sine/10),325+0*math.cos(sine/10),0+0*math.cos(sine/10))*CFrame.Angles(math.rad(0+0*math.cos(sine/10)),math.rad(0+0*math.cos(sine/10)),math.rad(0+0*math.cos(sine/10))),.2)
  1037. LH.C0=LH.C0:Lerp(CFrame.new(-0.5+0*math.cos(sine/10),325+0*math.cos(sine/10),-0+0*math.cos(sine/10))*CFrame.Angles(math.rad(0+0*math.cos(sine/10)),math.rad(0+0*math.cos(sine/10)),math.rad(0+0*math.cos(sine/10))),.2)
  1038.  
  1039.  
  1040. end
  1041. end
  1042. srv.RenderStepped:Wait()
  1043. end
  1044. end)()
  1045.  
  1046. Mode = 'Normal'
  1047. mode=m.KeyDown:Connect(function(a)
  1048. if a == 'z' then
  1049. Mode = 'normal'
  1050. end
  1051. if a == 'q' then
  1052. Mode = 'normal man'
  1053. end
  1054. if a == 'x' then
  1055. Mode = 'hug man'
  1056. end
  1057. end)
  1058.  
  1059. coroutine.wrap(function()
  1060. while true do -- anim changer
  1061. if HumanDied then mode:Disconnect() break end
  1062. sine = sine + speed
  1063. local rlegray = Ray.new(reanim["Right Leg"].Position + Vector3.new(0, 0.5, 0), Vector3.new(0, -2, 0))
  1064. local rlegpart, rlegendPoint = workspace:FindPartOnRay(rlegray, char)
  1065. local llegray = Ray.new(reanim["Left Leg"].Position + Vector3.new(0, 0.5, 0), Vector3.new(0, -2, 0))
  1066. local llegpart, llegendPoint = workspace:FindPartOnRay(llegray, char)
  1067. local rightvector = (Root.Velocity * Root.CFrame.rightVector).X + (Root.Velocity * Root.CFrame.rightVector).Z
  1068. local lookvector = (Root.Velocity * Root.CFrame.lookVector).X + (Root.Velocity * Root.CFrame.lookVector).Z
  1069. if lookvector > reanim.Humanoid.WalkSpeed then
  1070. lookvector = reanim.Humanoid.WalkSpeed
  1071. end
  1072. if lookvector < -reanim.Humanoid.WalkSpeed then
  1073. lookvector = -reanim.Humanoid.WalkSpeed
  1074. end
  1075. if rightvector > reanim.Humanoid.WalkSpeed then
  1076. rightvector = reanim.Humanoid.WalkSpeed
  1077. end
  1078. if rightvector < -reanim.Humanoid.WalkSpeed then
  1079. rightvector = -reanim.Humanoid.WalkSpeed
  1080. end
  1081. local lookvel = lookvector / reanim.Humanoid.WalkSpeed
  1082. local rightvel = rightvector / reanim.Humanoid.WalkSpeed
  1083. if Mode == 'normal man' then
  1084. --First Mode--
  1085. if reanim.Humanoid.Jump then -- jump
  1086. --jump clerp here
  1087. elseif Root.Velocity.y < -1 and reanim.Humanoid.Jump then -- fall
  1088. --fall clerp here
  1089. elseif Root.Velocity.Magnitude < 2 then -- idle
  1090.  
  1091.  
  1092.  
  1093. NECK.C0=NECK.C0:Lerp(CFrame.new(0+0*math.cos(sine/10),1+0*math.cos(sine/10),0+0*math.cos(sine/10))*CFrame.Angles(math.rad(0+0*math.cos(sine/10)),math.rad(0+0*math.cos(sine/10)),math.rad(0+0*math.cos(sine/10))),.2)
  1094. RJ.C0=RJ.C0:Lerp(CFrame.new(0+0*math.cos(sine/10),-9+0.1*math.cos(sine/19),0+0*math.cos(sine/10))*CFrame.Angles(math.rad(0+0*math.cos(sine/19)),math.rad(0+0*math.cos(sine/10)),math.rad(0+0*math.cos(sine/10))),.2)
  1095. RS.C0=RS.C0:Lerp(CFrame.new(1.5+0*math.cos(sine/10),-0+0*math.cos(sine/10),0+0*math.cos(sine/10))*CFrame.Angles(math.rad(0+0*math.cos(sine/10)),math.rad(0+0*math.cos(sine/10)),math.rad(0+0*math.cos(sine/10))),.2)
  1096. LS.C0=LS.C0:Lerp(CFrame.new(-1.5+0*math.cos(sine/10),-0+0*math.cos(sine/10),0+0*math.cos(sine/10))*CFrame.Angles(math.rad(0+0*math.cos(sine/10)),math.rad(0+0*math.cos(sine/10)),math.rad(0+0*math.cos(sine/10))),.2)
  1097. RH.C0=RH.C0:Lerp(CFrame.new(0.82+0*math.cos(sine/10),-0+0*math.cos(sine/10),0+0*math.cos(sine/10))*CFrame.Angles(math.rad(0+0*math.cos(sine/10)),math.rad(0+0*math.cos(sine/10)),math.rad(0+0*math.cos(sine/10))),.2)
  1098. LH.C0=LH.C0:Lerp(CFrame.new(-0.5+0*math.cos(sine/10),-0+0*math.cos(sine/10),-0+0*math.cos(sine/10))*CFrame.Angles(math.rad(0+0*math.cos(sine/10)),math.rad(0+0*math.cos(sine/10)),math.rad(0+0*math.cos(sine/10))),.2)
  1099. elseif Root.Velocity.Magnitude < 20 then -- walk
  1100.  
  1101.  
  1102. NECK.C0=NECK.C0:Lerp(CFrame.new(0+0*math.cos(sine/10),1+0*math.cos(sine/10),0+0*math.cos(sine/10))*CFrame.Angles(math.rad(0+0*math.cos(sine/10)),math.rad(0+0*math.cos(sine/10)),math.rad(0+0*math.cos(sine/10))),.2)
  1103. RJ.C0=RJ.C0:Lerp(CFrame.new(0+0*math.cos(sine/10),-9+0.1*math.cos(sine/19),0+0*math.cos(sine/10))*CFrame.Angles(math.rad(0+0*math.cos(sine/19)),math.rad(0+0*math.cos(sine/10)),math.rad(0+0*math.cos(sine/10))),.2)
  1104. RS.C0=RS.C0:Lerp(CFrame.new(1.5+0*math.cos(sine/10),-0+0*math.cos(sine/10),0+0*math.cos(sine/10))*CFrame.Angles(math.rad(0+0*math.cos(sine/10)),math.rad(0+0*math.cos(sine/10)),math.rad(0+0*math.cos(sine/10))),.2)
  1105. LS.C0=LS.C0:Lerp(CFrame.new(-1.5+0*math.cos(sine/10),-0+0*math.cos(sine/10),0+0*math.cos(sine/10))*CFrame.Angles(math.rad(0+0*math.cos(sine/10)),math.rad(0+0*math.cos(sine/10)),math.rad(0+0*math.cos(sine/10))),.2)
  1106. RH.C0=RH.C0:Lerp(CFrame.new(0.82+0*math.cos(sine/10),-0+0*math.cos(sine/10),0+0*math.cos(sine/10))*CFrame.Angles(math.rad(0+0*math.cos(sine/10)),math.rad(0+0*math.cos(sine/10)),math.rad(0+0*math.cos(sine/10))),.2)
  1107. LH.C0=LH.C0:Lerp(CFrame.new(-0.5+0*math.cos(sine/10),-0+0*math.cos(sine/10),-0+0*math.cos(sine/10))*CFrame.Angles(math.rad(0+0*math.cos(sine/10)),math.rad(0+0*math.cos(sine/10)),math.rad(0+0*math.cos(sine/10))),.2)
  1108. elseif Root.Velocity.Magnitude > 20 then -- run
  1109. --run clerp here
  1110.  
  1111. end
  1112. --------------
  1113. end
  1114. srv.RenderStepped:Wait()
  1115. end
  1116. end)()
  1117.  
  1118.  
  1119. game.Players.LocalPlayer.Character.Humanoid.JumpPower = 109
  1120.  
  1121. for i, v in pairs(game.Players.LocalPlayer.Character:GetChildren()) do
  1122. if v:IsA("Accessory") then
  1123. if v.Handle:FindFirstChildOfClass("Mesh") or v.Handle:FindFirstChildOfClass("SpecialMesh") then
  1124. if v.Handle:FindFirstChildOfClass("SpecialMesh") then
  1125. v.Handle:FindFirstChildOfClass("SpecialMesh"):Remove()
  1126. end
  1127. end
  1128. end
  1129. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement