Advertisement
Deyer

Untitled

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