LUA   87
Arceus X Become a Floppa script lt
Guest on 14th May 2022 03:52:07 AM


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

Raw Paste

Login or Register to edit or fork this paste. It's free.