Advertisement
KrYn0MoRe

r15 to r6 fake rig

Aug 25th, 2022
1,055
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.65 KB | None | 0 0
  1. local plr = owner
  2. local char = plr.Character
  3. local hum = char:FindFirstChildOfClass("Humanoid")
  4. if hum.RigType == Enum.HumanoidRigType.R15 then else
  5.     error('not r15 rigtype')
  6. end
  7.  
  8. local t = {}
  9.  
  10. pcall(function()
  11.     game:GetService("PhysicsService"):CreateCollisionGroup('asd')
  12.     game:GetService("PhysicsService"):CollisionGroupSetCollidable('asd','asd',false)
  13. end)
  14.  
  15. function create_part(p1,p2,size,c0)
  16.     p1 = char:FindFirstChild(p1)
  17.    
  18.     local p = Instance.new("Part")
  19.     p.Size = size
  20.     p.Name = p2
  21.     p.Color = p1.Color
  22.     p.Material = p1.Material
  23.     p.Anchored = false
  24.     p.Massless = false
  25.     p.CanCollide = false
  26.     p.Parent = char
  27.    
  28.     game:GetService("PhysicsService"):SetPartCollisionGroup(p,'asd')
  29.     game:GetService("PhysicsService"):SetPartCollisionGroup(p1,'asd')
  30.    
  31.     local weld = Instance.new("Weld")
  32.     weld.Part0 = p1
  33.     weld.Part1 = p
  34.     weld.C0 = c0
  35.     weld.Parent = p
  36.    
  37.     t[p] = 1
  38.    
  39.     return p
  40. end
  41.  
  42. create_part('UpperTorso','Torso',Vector3.new(2,2,1),CFrame.new(0,-0.2,0))
  43. create_part('LeftUpperArm','Left Arm',Vector3.new(1,2,1),CFrame.new(0,-0.4,0))
  44. create_part('RightUpperArm','Right Arm',Vector3.new(1,2,1),CFrame.new(0,-0.4,0))
  45. create_part('LeftLowerLeg','Left Leg',Vector3.new(1,2,1),CFrame.new(0,0.2,0))
  46. create_part('RightLowerLeg','Right Leg',Vector3.new(1,2,1),CFrame.new(0,0.2,0))
  47.  
  48. hum.BreakJointsOnDeath = false
  49. hum.RequiresNeck = false
  50. hum.RigType = Enum.HumanoidRigType.R6
  51. hum.AutomaticScalingEnabled = false
  52. hum.HipHeight = 0
  53.  
  54. wait()
  55.  
  56. for i,v in pairs(char:GetChildren()) do
  57.     if v:IsA("BasePart") and not t[v] and v.Name ~= 'Head' then
  58.         v.Transparency = 1
  59.         v.CanCollide = false
  60.         v.Anchored = false
  61.         v.Massless = true
  62.     end
  63. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement