Advertisement
UtgGiver

Max reanimate

Apr 23rd, 2023 (edited)
21
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 23.78 KB | None | 0 0
  1. --Back_AccAccessory
  2. game.Players.LocalPlayer.Character["Hat1"].Handle.Mesh:Destroy()
  3. game.Players.LocalPlayer.Character["Pal Hair"].Handle.Mesh:Destroy() --Pink Hair
  4. game.Players.LocalPlayer.Character["Pink Hair"].Handle.Mesh:Destroy()
  5. game.Players.LocalPlayer.Character["Kate Hair"].Handle.Mesh:Destroy() --LavanderHair
  6. game.Players.LocalPlayer.Character["LavanderHair"].Handle.Mesh:Destroy()
  7. game.Players.LocalPlayer.Character["Robloxclassicred"].Handle.Mesh:Destroy()
  8. --game.Players.LocalPlayer.Character["Surfboard"].Handle.Handle:Destroy()
  9. game.Players.LocalPlayer.Character["PlaneModel"].Handle.Mesh:Destroy() --aslo you can change this in the line 795
  10.  
  11. local c = game.Players.LocalPlayer.Character
  12. for i, v in pairs({"Right Arm", "Left Arm"}) do
  13. local arm = c[v]
  14. arm.Parent = nil
  15. arm.Transparency = 1
  16. arm.Parent = c
  17. end
  18.  
  19. local c = game.Players.LocalPlayer.Character
  20. for i, v in pairs({"Right Leg", "Left Leg"}) do
  21. local Leg = c[v]
  22. Leg.Parent = nil
  23. Leg.Transparency = 1
  24. Leg.Parent = c
  25. end
  26.  
  27. local v3_net, v3_808 = Vector3.new(0, 25.1, 0), Vector3.new(8, 0, 8)
  28. local function getNetlessVelocity(realPartVelocity)
  29. local mag = realPartVelocity.Magnitude
  30. if mag > 1 then
  31. local unit = realPartVelocity.Unit
  32. if (unit.Y > 0.25) or (unit.Y < -0.75) then
  33. return unit * (25.1 / unit.Y)
  34. end
  35. end
  36. return v3_net + realPartVelocity * v3_808
  37. end
  38. local simradius = "shp" --simulation radius (net bypass) method
  39. --simulation radius (net bypass) method
  40. --"shp" - sethiddenproperty
  41. --"ssr" - setsimulationradius
  42. --false - disable
  43. local antiragdoll = true --removes hingeConstraints and ballSocketConstraints from your character
  44. local newanimate = true --disables the animate script and enables after reanimation
  45. local discharscripts = true --disables all localScripts parented to your character before reanimation
  46. local R15toR6 = true --tries to convert your character to r6 if its r15
  47. local hatcollide = true --makes hats cancollide (only method 0)
  48. local humState16 = true --enables collisions for limbs before the humanoid dies (using hum:ChangeState)
  49. local addtools = false --puts all tools from backpack to character and lets you hold them after reanimation
  50. local hedafterneck = false --disable aligns for head and enable after neck is removed
  51. local loadtime = game:GetService("Players").RespawnTime + 0.5 --anti respawn delay
  52. local method = 0 --reanimation method
  53. --methods:
  54. --0 - breakJoints (takes [loadtime] seconds to laod)
  55. --1 - limbs
  56. --2 - limbs + anti respawn
  57. --3 - limbs + breakJoints after [loadtime] seconds
  58. --4 - remove humanoid + breakJoints
  59. --5 - remove humanoid + limbs
  60. local alignmode = 3 --AlignPosition mode
  61. --modes:
  62. --1 - AlignPosition rigidity enabled true
  63. --2 - 2 AlignPositions rigidity enabled both true and false
  64. --3 - AlignPosition rigidity enabled false
  65.  
  66. healthHide = healthHide and ((method == 0) or (method == 2) or (method == 000)) and gp(c, "Head", "BasePart")
  67.  
  68. local lp = game:GetService("Players").LocalPlayer
  69. local rs = game:GetService("RunService")
  70. local stepped = rs.Stepped
  71. local heartbeat = rs.Heartbeat
  72. local renderstepped = rs.RenderStepped
  73. local sg = game:GetService("StarterGui")
  74. local ws = game:GetService("Workspace")
  75. local cf = CFrame.new
  76. local v3 = Vector3.new
  77. local v3_0 = v3(0, 0, 0)
  78. local inf = math.huge
  79.  
  80. local c = lp.Character
  81.  
  82. if not (c and c.Parent) then
  83. return
  84. end
  85.  
  86. c.Destroying:Connect(function()
  87. c = nil
  88. end)
  89.  
  90. local function gp(parent, name, className)
  91. if typeof(parent) == "Instance" then
  92. for i, v in pairs(parent:GetChildren()) do
  93. if (v.Name == name) and v:IsA(className) then
  94. return v
  95. end
  96. end
  97. end
  98. return nil
  99. end
  100.  
  101. local function align(Part0, Part1)
  102. Part0.CustomPhysicalProperties = PhysicalProperties.new(0.0001, 0.0001, 0.0001, 0.0001, 0.0001)
  103.  
  104. local att0 = Instance.new("Attachment", Part0)
  105. att0.Orientation = v3_0
  106. att0.Position = v3_0
  107. att0.Name = "att0_" .. Part0.Name
  108. local att1 = Instance.new("Attachment", Part1)
  109. att1.Orientation = v3_0
  110. att1.Position = v3_0
  111. att1.Name = "att1_" .. Part1.Name
  112.  
  113. if (alignmode == 1) or (alignmode == 2) then
  114. local ape = Instance.new("AlignPosition", att0)
  115. ape.ApplyAtCenterOfMass = false
  116. ape.MaxForce = inf
  117. ape.MaxVelocity = inf
  118. ape.ReactionForceEnabled = false
  119. ape.Responsiveness = 200
  120. ape.Attachment1 = att1
  121. ape.Attachment0 = att0
  122. ape.Name = "AlignPositionRtrue"
  123. ape.RigidityEnabled = true
  124. end
  125.  
  126. if (alignmode == 2) or (alignmode == 3) then
  127. local apd = Instance.new("AlignPosition", att0)
  128. apd.ApplyAtCenterOfMass = false
  129. apd.MaxForce = inf
  130. apd.MaxVelocity = inf
  131. apd.ReactionForceEnabled = false
  132. apd.Responsiveness = 200
  133. apd.Attachment1 = att1
  134. apd.Attachment0 = att0
  135. apd.Name = "AlignPositionRfalse"
  136. apd.RigidityEnabled = false
  137. end
  138.  
  139. local ao = Instance.new("AlignOrientation", att0)
  140. ao.MaxAngularVelocity = inf
  141. ao.MaxTorque = inf
  142. ao.PrimaryAxisOnly = false
  143. ao.ReactionTorqueEnabled = false
  144. ao.Responsiveness = 200
  145. ao.Attachment1 = att1
  146. ao.Attachment0 = att0
  147. ao.RigidityEnabled = false
  148.  
  149. if type(getNetlessVelocity) == "function" then
  150. local realVelocity = v3_0
  151. local steppedcon = stepped:Connect(function()
  152. Part0.Velocity = realVelocity
  153. end)
  154. local heartbeatcon = heartbeat:Connect(function()
  155. realVelocity = Part0.Velocity
  156. Part0.Velocity = getNetlessVelocity(realVelocity)
  157. end)
  158. Part0.Destroying:Connect(function()
  159. Part0 = nil
  160. steppedcon:Disconnect()
  161. heartbeatcon:Disconnect()
  162. end)
  163. end
  164. end
  165.  
  166. local function respawnrequest()
  167. local ccfr = ws.CurrentCamera.CFrame
  168. local c = lp.Character
  169. lp.Character = nil
  170. lp.Character = c
  171. local con = nil
  172. con = ws.CurrentCamera.Changed:Connect(function(prop)
  173. if (prop ~= "Parent") and (prop ~= "CFrame") then
  174. return
  175. end
  176. ws.CurrentCamera.CFrame = ccfr
  177. con:Disconnect()
  178. end)
  179. end
  180.  
  181. local destroyhum = (method == 4) or (method == 5)
  182. local breakjoints = (method == 0) or (method == 4)
  183. local antirespawn = (method == 0) or (method == 2) or (method == 3)
  184.  
  185. hatcollide = hatcollide and (method == 0)
  186.  
  187. addtools = addtools and gp(lp, "Backpack", "Backpack")
  188.  
  189. local fenv = getfenv()
  190. local shp = fenv.sethiddenproperty or fenv.set_hidden_property or fenv.set_hidden_prop or fenv.sethiddenprop
  191. 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
  192.  
  193. if shp and (simradius == "shp") then
  194. spawn(function()
  195. while c and heartbeat:Wait() do
  196. shp(lp, "SimulationRadius", inf)
  197. end
  198. end)
  199. elseif ssr and (simradius == "ssr") then
  200. spawn(function()
  201. while c and heartbeat:Wait() do
  202. ssr(inf)
  203. end
  204. end)
  205. end
  206.  
  207. antiragdoll = antiragdoll and function(v)
  208. if v:IsA("HingeConstraint") or v:IsA("BallSocketConstraint") then
  209. v.Parent = nil
  210. end
  211. end
  212.  
  213. if antiragdoll then
  214. for i, v in pairs(c:GetDescendants()) do
  215. antiragdoll(v)
  216. end
  217. c.DescendantAdded:Connect(antiragdoll)
  218. end
  219.  
  220. if antirespawn then
  221. respawnrequest()
  222. end
  223.  
  224. if method == 0 then
  225. wait(loadtime)
  226. if not c then
  227. return
  228. end
  229. end
  230.  
  231. if discharscripts then
  232. for i, v in pairs(c:GetChildren()) do
  233. if v:IsA("LocalScript") then
  234. v.Disabled = true
  235. end
  236. end
  237. elseif newanimate then
  238. local animate = gp(c, "Animate", "LocalScript")
  239. if animate and (not animate.Disabled) then
  240. animate.Disabled = true
  241. else
  242. newanimate = false
  243. end
  244. end
  245.  
  246. if addtools then
  247. for i, v in pairs(addtools:GetChildren()) do
  248. if v:IsA("Tool") then
  249. v.Parent = c
  250. end
  251. end
  252. end
  253.  
  254. pcall(function()
  255. settings().Physics.AllowSleep = false
  256. settings().Physics.PhysicsEnvironmentalThrottle = Enum.EnviromentalPhysicsThrottle.Disabled
  257. end)
  258.  
  259. local OLDscripts = {}
  260.  
  261. for i, v in pairs(c:GetDescendants()) do
  262. if v.ClassName == "Script" then
  263. table.insert(OLDscripts, v)
  264. end
  265. end
  266.  
  267. local scriptNames = {}
  268.  
  269. for i, v in pairs(c:GetDescendants()) do
  270. if v:IsA("BasePart") then
  271. local newName = tostring(i)
  272. local exists = true
  273. while exists do
  274. exists = false
  275. for i, v in pairs(OLDscripts) do
  276. if v.Name == newName then
  277. exists = true
  278. end
  279. end
  280. if exists then
  281. newName = newName .. "_"
  282. end
  283. end
  284. table.insert(scriptNames, newName)
  285. Instance.new("Script", v).Name = newName
  286. end
  287. end
  288.  
  289. c.Archivable = true
  290. local hum = c:FindFirstChildOfClass("Humanoid")
  291. if hum then
  292. for i, v in pairs(hum:GetPlayingAnimationTracks()) do
  293. v:Stop()
  294. end
  295. end
  296. local cl = c:Clone()
  297. if hum and humState16 then
  298. hum:ChangeState(Enum.HumanoidStateType.Physics)
  299. if destroyhum then
  300. wait(1.6)
  301. end
  302. end
  303. if hum and hum.Parent and destroyhum then
  304. hum:Destroy()
  305. end
  306.  
  307. if not c then
  308. return
  309. end
  310.  
  311. local head = gp(c, "Head", "BasePart")
  312. local torso = gp(c, "Torso", "BasePart") or gp(c, "UpperTorso", "BasePart")
  313. local root = gp(c, "HumanoidRootPart", "BasePart")
  314. if hatcollide and c:FindFirstChildOfClass("Accessory") then
  315. local anything = c:FindFirstChildOfClass("BodyColors") or gp(c, "Health", "Script")
  316. if not (torso and root and anything) then
  317. return
  318. end
  319. torso:Destroy()
  320. root:Destroy()
  321. if shp then
  322. for i,v in pairs(c:GetChildren()) do
  323. if v:IsA("Accessory") then
  324. shp(v, "BackendAccoutrementState", 0)
  325. end
  326. end
  327. end
  328. anything:Destroy()
  329. if head then
  330. head:Destroy()
  331. end
  332. end
  333.  
  334. for i, v in pairs(cl:GetDescendants()) do
  335. if v:IsA("BasePart") then
  336. v.Transparency = 1
  337. v.Anchored = false
  338. end
  339. end
  340.  
  341. local model = Instance.new("Model", c)
  342. model.Name = model.ClassName
  343.  
  344. model.Destroying:Connect(function()
  345. model = nil
  346. end)
  347.  
  348. for i, v in pairs(c:GetChildren()) do
  349. if v ~= model then
  350. if addtools and v:IsA("Tool") then
  351. for i1, v1 in pairs(v:GetDescendants()) do
  352. if v1 and v1.Parent and v1:IsA("BasePart") then
  353. local bv = Instance.new("BodyVelocity", v1)
  354. bv.Velocity = v3_0
  355. bv.MaxForce = v3(1000, 1000, 1000)
  356. bv.P = 1250
  357. bv.Name = "bv_" .. v.Name
  358. end
  359. end
  360. end
  361. v.Parent = model
  362. end
  363. end
  364.  
  365. if breakjoints then
  366. model:BreakJoints()
  367. else
  368. if head and torso then
  369. for i, v in pairs(model:GetDescendants()) do
  370. if v:IsA("Weld") or v:IsA("Snap") or v:IsA("Glue") or v:IsA("Motor") or v:IsA("Motor6D") then
  371. local save = false
  372. if (v.Part0 == torso) and (v.Part1 == head) then
  373. save = true
  374. end
  375. if (v.Part0 == head) and (v.Part1 == torso) then
  376. save = true
  377. end
  378. if save then
  379. if hedafterneck then
  380. hedafterneck = v
  381. end
  382. else
  383. v:Destroy()
  384. end
  385. end
  386. end
  387. end
  388. if method == 3 then
  389. spawn(function()
  390. wait(loadtime)
  391. if model then
  392. model:BreakJoints()
  393. end
  394. end)
  395. end
  396. end
  397.  
  398. cl.Parent = c
  399. for i, v in pairs(cl:GetChildren()) do
  400. v.Parent = c
  401. end
  402. cl:Destroy()
  403.  
  404. local modelDes = {}
  405. for i, v in pairs(model:GetDescendants()) do
  406. if v:IsA("BasePart") then
  407. i = tostring(i)
  408. v.Destroying:Connect(function()
  409. modelDes[i] = nil
  410. end)
  411. modelDes[i] = v
  412. end
  413. end
  414. local modelcolcon = nil
  415. local function modelcolf()
  416. if model then
  417. for i, v in pairs(modelDes) do
  418. v.CanCollide = false
  419. end
  420. else
  421. modelcolcon:Disconnect()
  422. end
  423. end
  424. modelcolcon = stepped:Connect(modelcolf)
  425. modelcolf()
  426.  
  427. for i, scr in pairs(model:GetDescendants()) do
  428. if (scr.ClassName == "Script") and table.find(scriptNames, scr.Name) then
  429. local Part0 = scr.Parent
  430. if Part0:IsA("BasePart") then
  431. for i1, scr1 in pairs(c:GetDescendants()) do
  432. if (scr1.ClassName == "Script") and (scr1.Name == scr.Name) and (not scr1:IsDescendantOf(model)) then
  433. local Part1 = scr1.Parent
  434. if (Part1.ClassName == Part0.ClassName) and (Part1.Name == Part0.Name) then
  435. align(Part0, Part1)
  436. break
  437. end
  438. end
  439. end
  440. end
  441. end
  442. end
  443.  
  444. if (typeof(hedafterneck) == "Instance") and head then
  445. local aligns = {}
  446. local con = nil
  447. con = hedafterneck.Changed:Connect(function(prop)
  448. if (prop == "Parent") and not hedafterneck.Parent then
  449. con:Disconnect()
  450. for i, v in pairs(aligns) do
  451. v.Enabled = true
  452. end
  453. end
  454. end)
  455. for i, v in pairs(head:GetDescendants()) do
  456. if v:IsA("AlignPosition") or v:IsA("AlignOrientation") then
  457. i = tostring(i)
  458. aligns[i] = v
  459. v.Destroying:Connect(function()
  460. aligns[i] = nil
  461. end)
  462. v.Enabled = false
  463. end
  464. end
  465. end
  466.  
  467. for i, v in pairs(c:GetDescendants()) do
  468. if v and v.Parent then
  469. if v.ClassName == "Script" then
  470. if table.find(scriptNames, v.Name) then
  471. v:Destroy()
  472. end
  473. elseif not v:IsDescendantOf(model) then
  474. if v:IsA("Decal") then
  475. v.Transparency = 1
  476. elseif v:IsA("ForceField") then
  477. v.Visible = false
  478. elseif v:IsA("Sound") then
  479. v.Playing = false
  480. 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
  481. v.Enabled = false
  482. end
  483. end
  484. end
  485. end
  486.  
  487. if newanimate then
  488. local animate = gp(c, "Animate", "LocalScript")
  489. if animate then
  490. animate.Disabled = false
  491. end
  492. end
  493.  
  494. if addtools then
  495. for i, v in pairs(c:GetChildren()) do
  496. if v:IsA("Tool") then
  497. v.Parent = addtools
  498. end
  499. end
  500. end
  501.  
  502. local hum0 = model:FindFirstChildOfClass("Humanoid")
  503. if hum0 then
  504. hum0.Destroying:Connect(function()
  505. hum0 = nil
  506. end)
  507. end
  508.  
  509. local hum1 = c:FindFirstChildOfClass("Humanoid")
  510. if hum1 then
  511. hum1.Destroying:Connect(function()
  512. hum1 = nil
  513. end)
  514. end
  515.  
  516. if hum1 then
  517. ws.CurrentCamera.CameraSubject = hum1
  518. local camSubCon = nil
  519. local function camSubFunc()
  520. camSubCon:Disconnect()
  521. if c and hum1 then
  522. ws.CurrentCamera.CameraSubject = hum1
  523. end
  524. end
  525. camSubCon = renderstepped:Connect(camSubFunc)
  526. if hum0 then
  527. hum0.Changed:Connect(function(prop)
  528. if hum1 and (prop == "Jump") then
  529. hum1.Jump = hum0.Jump
  530. end
  531. end)
  532. else
  533. respawnrequest()
  534. end
  535. end
  536.  
  537. local rb = Instance.new("BindableEvent", c)
  538. rb.Event:Connect(function()
  539. rb:Destroy()
  540. sg:SetCore("ResetButtonCallback", true)
  541. if destroyhum then
  542. c:BreakJoints()
  543. return
  544. end
  545. if hum0 and (hum0.Health > 0) then
  546. model:BreakJoints()
  547. hum0.Health = 0
  548. end
  549. if antirespawn then
  550. respawnrequest()
  551. end
  552. end)
  553. sg:SetCore("ResetButtonCallback", rb)
  554.  
  555. spawn(function()
  556. while c do
  557. if hum0 and hum1 then
  558. hum1.Jump = hum0.Jump
  559. end
  560. wait()
  561. end
  562. sg:SetCore("ResetButtonCallback", true)
  563. end)
  564.  
  565. R15toR6 = R15toR6 and hum1 and (hum1.RigType == Enum.HumanoidRigType.R15)
  566. if R15toR6 then
  567. 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")
  568. if part then
  569. local cfr = part.CFrame
  570. local R6parts = {
  571. head = {
  572. Name = "Head",
  573. Size = v3(2, 1, 1),
  574. R15 = {
  575. Head = 0
  576. }
  577. },
  578. torso = {
  579. Name = "Torso",
  580. Size = v3(2, 2, 1),
  581. R15 = {
  582. UpperTorso = 0.2,
  583. LowerTorso = -100
  584. }
  585. },
  586. root = {
  587. Name = "HumanoidRootPart",
  588. Size = v3(2, 2, 1),
  589. R15 = {
  590. HumanoidRootPart = 0
  591. }
  592. },
  593. leftArm = {
  594. Name = "Left Arm",
  595. Size = v3(1, 2, 1),
  596. R15 = {
  597. LeftHand = -0.73,
  598. LeftLowerArm = -0.2,
  599. LeftUpperArm = 0.4
  600. }
  601. },
  602. rightArm = {
  603. Name = "Right Arm",
  604. Size = v3(1, 2, 1),
  605. R15 = {
  606. RightHand = -0.73,
  607. RightLowerArm = -0.2,
  608. RightUpperArm = 0.4
  609. }
  610. },
  611. leftLeg = {
  612. Name = "Left Leg",
  613. Size = v3(1, 2, 1),
  614. R15 = {
  615. LeftFoot = -0.73,
  616. LeftLowerLeg = -0.15,
  617. LeftUpperLeg = 0.6
  618. }
  619. },
  620. rightLeg = {
  621. Name = "Right Leg",
  622. Size = v3(1, 2, 1),
  623. R15 = {
  624. RightFoot = -0.73,
  625. RightLowerLeg = -0.15,
  626. RightUpperLeg = 0.6
  627. }
  628. }
  629. }
  630. for i, v in pairs(c:GetChildren()) do
  631. if v:IsA("BasePart") then
  632. for i1, v1 in pairs(v:GetChildren()) do
  633. if v1:IsA("Motor6D") then
  634. v1.Part0 = nil
  635. end
  636. end
  637. end
  638. end
  639. part.Archivable = true
  640. for i, v in pairs(R6parts) do
  641. local part = part:Clone()
  642. part:ClearAllChildren()
  643. part.Name = v.Name
  644. part.Size = v.Size
  645. part.CFrame = cfr
  646. part.Anchored = false
  647. part.Transparency = 1
  648. part.CanCollide = false
  649. for i1, v1 in pairs(v.R15) do
  650. local R15part = gp(c, i1, "BasePart")
  651. local att = gp(R15part, "att1_" .. i1, "Attachment")
  652. if R15part then
  653. local weld = Instance.new("Weld", R15part)
  654. weld.Name = "Weld_" .. i1
  655. weld.Part0 = part
  656. weld.Part1 = R15part
  657. weld.C0 = cf(0, v1, 0)
  658. weld.C1 = cf(0, 0, 0)
  659. R15part.Massless = true
  660. R15part.Name = "R15_" .. i1
  661. R15part.Parent = part
  662. if att then
  663. att.Parent = part
  664. att.Position = v3(0, v1, 0)
  665. end
  666. end
  667. end
  668. part.Parent = c
  669. R6parts[i] = part
  670. end
  671. local R6joints = {
  672. neck = {
  673. Parent = Scarf,
  674. Name = "Neck",
  675. Part0 = Scarf, --R6parts.torso
  676. Part1 = Scarf, --R6parts.head
  677. C0 = cf(0, 1, 0, -1, 0, 0, 0, 0, 1, 0, 1, -0),
  678. C1 = cf(0, -0.5, 0, -1, 0, 0, 0, 0, 1, 0, 1, -0)
  679. },
  680. rootJoint = {
  681. Parent = R6parts.root,
  682. Name = "RootJoint" ,
  683. Part0 = R6parts.root,
  684. Part1 = R6parts.torso,
  685. C0 = cf(0, 0, 0, -1, 0, 0, 0, 0, 1, 0, 1, -0),
  686. C1 = cf(0, 0, 0, -1, 0, 0, 0, 0, 1, 0, 1, -0)
  687. },
  688. rightShoulder = {
  689. Parent = R6parts.torso,
  690. Name = "Right Shoulder",
  691. Part0 = R6parts.torso,
  692. Part1 = R6parts.rightArm,
  693. C0 = cf(1, 0.5, 0, 0, 0, 1, 0, 1, -0, -1, 0, 0),
  694. C1 = cf(-0.5, 0.5, 0, 0, 0, 1, 0, 1, -0, -1, 0, 0)
  695. },
  696. leftShoulder = {
  697. Parent = R6parts.torso,
  698. Name = "Left Shoulder",
  699. Part0 = R6parts.torso,
  700. Part1 = R6parts.leftArm,
  701. C0 = cf(-1, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0),
  702. C1 = cf(0.5, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  703. },
  704. rightHip = {
  705. Parent = R6parts.torso,
  706. Name = "Right Hip",
  707. Part0 = R6parts.torso,
  708. Part1 = R6parts.rightLeg,
  709. C0 = cf(1, -1, 0, 0, 0, 1, 0, 1, -0, -1, 0, 0),
  710. C1 = cf(0.5, 1, 0, 0, 0, 1, 0, 1, -0, -1, 0, 0)
  711. },
  712. leftHip = {
  713. Parent = R6parts.torso,
  714. Name = "Left Hip" ,
  715. Part0 = R6parts.torso,
  716. Part1 = R6parts.leftLeg,
  717. C0 = cf(-1, -1, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0),
  718. C1 = cf(-0.5, 1, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  719. }
  720. }
  721. for i, v in pairs(R6joints) do
  722. local joint = Instance.new("Motor6D")
  723. for prop, val in pairs(v) do
  724. joint[prop] = val
  725. end
  726. R6joints[i] = joint
  727. end
  728. hum1.RigType = Enum.HumanoidRigType.R6
  729. hum1.HipHeight = 0
  730. end
  731. end
  732.  
  733.  
  734.  
  735. --find rig joints
  736.  
  737. local function fakemotor()
  738. return {C0=cf(), C1=cf()}
  739. end
  740.  
  741. local torso = gp(c, "Torso", "BasePart")
  742. local root = gp(c, "HumanoidRootPart", "BasePart")
  743.  
  744. local neck = gp(torso, "Neck", "Motor6D")
  745. neck = neck or fakemotor()
  746.  
  747. local rootJoint = gp(root, "RootJoint", "Motor6D")
  748. rootJoint = rootJoint or fakemotor()
  749.  
  750. local leftShoulder = gp(torso, "Left Shoulder", "Motor6D")
  751. leftShoulder = leftShoulder or fakemotor()
  752.  
  753. local rightShoulder = gp(torso, "Right Shoulder", "Motor6D")
  754. rightShoulder = rightShoulder or fakemotor()
  755.  
  756. local leftHip = gp(torso, "Left Hip", "Motor6D")
  757. leftHip = leftHip or fakemotor()
  758.  
  759. local rightHip = gp(torso, "Right Hip", "Motor6D")
  760. rightHip = rightHip or fakemotor()
  761.  
  762. --120 fps
  763.  
  764. local fps = 0
  765. local event = Instance.new("BindableEvent", c)
  766. event.Name = "120 fps"
  767. local floor = math.floor
  768. fps = 1 / fps
  769. local tf = 0
  770. local con = nil
  771. con = game:GetService("RunService").RenderStepped:Connect(function(s)
  772. if not c then
  773. con:Disconnect()
  774. return
  775. end
  776. --tf += s
  777. if tf >= fps then
  778. for i=1, floor(tf / fps) do
  779. event:Fire(c)
  780. end
  781. tf = 0
  782. end
  783. end)
  784. local event = event.Event
  785.  
  786. local hedrot = v3(0, 5, 0)
  787.  
  788. local uis = game:GetService("UserInputService")
  789. local function isPressed(key)
  790. return (not uis:GetFocusedTextBox()) and uis:IsKeyDown(Enum.KeyCode[key])
  791. end
  792.  
  793. local biggesthandle = nil
  794. for i, v in pairs(c:GetChildren()) do
  795. if v:IsA("Accessory") and v.Name == "PlaneModel" then
  796. local handle = gp(v, "Handle", "BasePart")
  797. if biggesthandle then
  798. if biggesthandle.Size.Magnitude < handle.Size.Magnitude then
  799. biggesthandle = Handle
  800. end
  801. else
  802. biggesthandle = gp(v, "Handle", "BasePart")
  803. end
  804. end
  805. end
  806.  
  807. if not biggesthandle then
  808. return
  809. end
  810.  
  811. local handle1 = gp(gp(model, biggesthandle.Parent.Name, "Accessory"), "Handle", "BasePart")
  812. if not handle1 then
  813. return
  814. end
  815.  
  816. handle1.Destroying:Connect(function()
  817. handle1 = nil
  818. end)
  819. biggesthandle.Destroying:Connect(function()
  820. biggesthandle = nil
  821. end)
  822.  
  823. --iggesthandle:BreakJoints()
  824. --biggesthandle.Anchored = true
  825.  
  826. for i, v in pairs(handle1:GetDescendants()) do
  827. if v:IsA("AlignOrientation") then
  828. v.Enabled = false
  829. end
  830. end
  831.  
  832. local mouse = lp:GetMouse()
  833. local fling = false
  834. mouse.Button1Down:Connect(function()
  835. fling = true
  836. end)
  837. mouse.Button1Up:Connect(function()
  838. fling = false
  839. end)
  840. local function doForSignal(signal, vel)
  841. spawn(function()
  842. while signal:Wait() and c and handle1 and biggesthandle do
  843. if fling and mouse.Target then
  844. biggesthandle.Position = mouse.Hit.Position
  845. end
  846. handle1.RotVelocity = vel
  847. end
  848. end)
  849. end
  850. doForSignal(stepped, v3(10000, 10000, 10000))
  851. doForSignal(renderstepped, v3(10000, 10000, 10000))
  852. doForSignal(heartbeat, v3(200000000000000, 200000000000000, 200000000000000))
  853.  
  854. local lp = game:GetService("Players").LocalPlayer
  855. local rs = game:GetService("RunService")
  856. local stepped = rs.Stepped
  857. local heartbeat = rs.Heartbeat
  858. local renderstepped = rs.RenderStepped
  859. local sg = game:GetService("StarterGui")
  860. local ws = game:GetService("Workspace")
  861. local cf = CFrame.new
  862. local v3 = Vector3.new
  863. local v3_0 = Vector3.zero
  864. local inf = math.huge
  865.  
  866. local cplayer = lp.Character
  867.  
  868. local v3 = Vector3.new
  869.  
  870. local function gp(parent, name, className)
  871. if typeof(parent) == "Instance" then
  872. for i, v in pairs(parent:GetChildren()) do
  873. if (v.Name == name) and v:IsA(className) then
  874. return v
  875. end
  876. end
  877. end
  878. return nil
  879. end
  880.  
  881. local hat2 = gp(cplayer, "Hat1", "Accessory")
  882. local handle2 = gp(hat2, "Handle", "BasePart")
  883. local att2 = gp(handle2, "att1_Handle", "Attachment")
  884. att2.Parent = cplayer["Torso"]
  885. att2.Position = Vector3.new(0.5, -0, 0)
  886. att2.Rotation = Vector3.new(90, 0, 0)
  887.  
  888. local hat2 = gp(cplayer, "Pal Hair", "Accessory")
  889. local handle2 = gp(hat2, "Handle", "BasePart")
  890. local att2 = gp(handle2, "att1_Handle", "Attachment")
  891. att2.Parent = cplayer["Torso"]
  892. att2.Position = Vector3.new(-0.5, -0, 0)
  893. att2.Rotation = Vector3.new(90, 0, 0)
  894.  
  895. local hat2 = gp(cplayer, "Pink Hair", "Accessory")
  896. local handle2 = gp(hat2, "Handle", "BasePart")
  897. local att2 = gp(handle2, "att1_Handle", "Attachment")
  898. att2.Parent = cplayer["Left Arm"]
  899. att2.Position = Vector3.new(0, -0, 0)
  900. att2.Rotation = Vector3.new(90, 0, 0)
  901.  
  902. local hat2 = gp(cplayer, "Kate Hair", "Accessory")
  903. local handle2 = gp(hat2, "Handle", "BasePart")
  904. local att2 = gp(handle2, "att1_Handle", "Attachment")
  905. att2.Parent = cplayer["Right Arm"]
  906. att2.Position = Vector3.new(-0, -0, 0)
  907. att2.Rotation = Vector3.new(90, 0, 0) --LavanderHair
  908.  
  909. local hat2 = gp(cplayer, "LavanderHair", "Accessory")
  910. local handle2 = gp(hat2, "Handle", "BasePart")
  911. local att2 = gp(handle2, "att1_Handle", "Attachment")
  912. att2.Parent = cplayer["Right Leg"]
  913. att2.Position = Vector3.new(0, 0, 0) --Robloxclassicred
  914. att2.Rotation = Vector3.new(90, 0, 0)
  915.  
  916. local hat2 = gp(cplayer, "Robloxclassicred", "Accessory")
  917. local handle2 = gp(hat2, "Handle", "BasePart")
  918. local att2 = gp(handle2, "att1_Handle", "Attachment")
  919. att2.Parent = cplayer["Left Leg"]
  920. att2.Position = Vector3.new(-0, 0, 0)
  921. att2.Rotation = Vector3.new(90, 0, 0)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement