AugusTH

Fe Floppa Script

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