Advertisement
DangerRedile

Void Boss Rean

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