Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local function Weld(Char,Model)
- local ClonedModel = Model:Clone()
- ClonedModel.Parent = Char
- local ModelDescendants = ClonedModel:GetChildren()
- for i=1, #ModelDescendants do
- local W = Instance.new("Weld")
- W.Part0 = ClonedModel.Middle
- W.Part1 = ModelDescendants[i]
- local CJ = CFrame.new(ClonedModel.Middle.Position)
- local C0 = ClonedModel.Middle.CFrame:inverse()*CJ
- local C1 = ModelDescendants[i].CFrame:inverse()*CJ
- W.C0 = C0
- W.C1 = C1
- W.Parent = ClonedModel.Middle
- ClonedModel.Middle.Transparency = 1
- ----------------------Belt------------------- 1
- if Model.Name == "Belt" then
- local Y = Instance.new("Weld")
- Y.Part0 = Char.LowerTorso
- Y.Part1 = ClonedModel.Middle
- Y.C0 = CFrame.new(0, 0, 0)
- Y.Parent = Y.Part0
- end
- -----------------------------------------------------------
- ----------------------LeftLowerLeg------------------- 2
- if Model.Name == "LeftLowerLeg" then
- local Y = Instance.new("Weld")
- Y.Part0 = Char.LeftLowerLeg
- Y.Part1 = ClonedModel.Middle
- Y.C0 = CFrame.new(0, 0, 0)
- Y.Parent = Y.Part0
- end
- ----------------------RightUpperLeg------------------- 3
- if Model.Name == "RightUpperLeg" then
- local Y = Instance.new("Weld")
- Y.Part0 = Char.RightUpperLeg
- Y.Part1 = ClonedModel.Middle
- Y.C0 = CFrame.new(0, 0, 0)
- Y.Parent = Y.Part0
- end
- -----------------------------------------------------------
- ----------------------RightLowerLeg------------------- 4
- if Model.Name == "RightLowerLeg" then
- local Y = Instance.new("Weld")
- Y.Part0 = Char.RightLowerLeg
- Y.Part1 = ClonedModel.Middle
- Y.C0 = CFrame.new(0, 0, 0)
- Y.Parent = Y.Part0
- end
- -----------------------------------------------------------
- ----------------------LeftUpperLeg------------------- 5
- if Model.Name == "LeftUpperLeg" then
- local Y = Instance.new("Weld")
- Y.Part0 = Char.LeftUpperLeg
- Y.Part1 = ClonedModel.Middle
- Y.C0 = CFrame.new(0, 0, 0)
- Y.Parent = Y.Part0
- end
- ----------------------RightLowerArm------------------- 6
- if Model.Name == "RightLowerArm" then
- local Y = Instance.new("Weld")
- Y.Part0 = Char.RightLowerArm
- Y.Part1 = ClonedModel.Middle
- Y.C0 = CFrame.new(0, 0, 0)
- Y.Parent = Y.Part0
- end
- -----------------------------------------------------------
- ----------------------RightUpperArm------------------- 7
- if Model.Name == "RightUpperArm" then
- local Y = Instance.new("Weld")
- Y.Part0 = Char.RightUpperArm
- Y.Part1 = ClonedModel.Middle
- Y.C0 = CFrame.new(0, 0, 0)
- Y.Parent = Y.Part0
- end
- -----------------------------------------------------------
- ----------------------LeftUpperArm------------------- 8
- if Model.Name == "LeftUpperArm" then
- local Y = Instance.new("Weld")
- Y.Part0 = Char.LeftUpperArm
- Y.Part1 = ClonedModel.Middle
- Y.C0 = CFrame.new(0, 0, 0)
- Y.Parent = Y.Part0
- end
- -----------------------------------------------------------
- ----------------------LeftLowerArm------------------- 9
- if Model.Name == "LeftLowerArm" then
- local Y = Instance.new("Weld")
- Y.Part0 = Char.LeftLowerArm
- Y.Part1 = ClonedModel.Middle
- Y.C0 = CFrame.new(0, 0, 0)
- Y.Parent = Y.Part0
- end
- -----------------------------------------------------------
- ----------------------Torso------------------- 10
- if Model.Name == "Torso" then
- local Y = Instance.new("Weld")
- Y.Part0 = Char.UpperTorso
- Y.Part1 = ClonedModel.Middle
- Y.C0 = CFrame.new(0, 0, 0)
- Y.Parent = Y.Part0
- end
- -----------------------------------------------------------
- ----------------------WhitePart------------------- 11
- if Model.Name == "WhitePart" then
- local Y = Instance.new("Weld")
- Y.Part0 = Char.UpperTorso
- Y.Part1 = ClonedModel.Middle
- Y.C0 = CFrame.new(0, 0, 0)
- Y.Parent = Y.Part0
- end
- -----------------------------------------------------------
- local Finalize = ClonedModel:GetChildren()
- for i = 1,#Finalize do
- Finalize[i].Anchored = false
- Finalize[i].CanCollide = false
- end
- end
- end
- game.Players.PlayerAdded:Connect(function(Player)
- Player.CharacterAdded:Connect(function(Character)
- if Character then Weld(Character, game:GetService("ReplicatedStorage").Haori.HI1.Belt) --1
- -- Weld(Character, game:GetService("ReplicatedStorage").Haori.HI1.Belt) ---- 2
- Weld(Character, game:GetService("ReplicatedStorage").Haori.HI1.RightUpperLeg) ---- 2
- Weld(Character, game:GetService("ReplicatedStorage").Haori.HI1.RightLowerLeg) ---- 3
- Weld(Character, game:GetService("ReplicatedStorage").Haori.HI1.LeftUpperLeg) ---- 4
- Weld(Character, game:GetService("ReplicatedStorage").Haori.HI1.LeftLowerLeg) ---- 5
- --Weld(Character, game:GetService("ReplicatedStorage").Haori.HI1.BeltStrap) ---- 6
- Weld(Character, game:GetService("ReplicatedStorage").Haori.HI1.WhitePart) ---- 6
- Weld(Character, game:GetService("ReplicatedStorage").Haori.HI1.Torso) ---- 7
- Weld(Character, game:GetService("ReplicatedStorage").Haori.HI1.RightUpperArm) ---- 8
- Weld(Character, game:GetService("ReplicatedStorage").Haori.HI1.RightLowerArm) ---- 9
- Weld(Character, game:GetService("ReplicatedStorage").Haori.HI1.LeftUpperArm) ---- 10
- Weld(Character, game:GetService("ReplicatedStorage").Haori.HI1.LeftLowerArm) ---- 11
- end
- end)
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement