Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local CustamizationFolder = game:GetService("ReplicatedStorage"):WaitForChild("Customaztion")
- local CustomGui = script.Parent.Parent
- local FinishedButton = CustomGui.Finished
- local ShirtSetection = CustomGui.Shirt
- local ShirtCurrent = ShirtSetection.Current
- local PantsSelection = CustomGui.Pants
- local PantsCurrent = PantsSelection.Current
- if not Character:FindFirstChild("Shirt") then
- local Shirt = Instance.new("Shirt", Character)
- Shirt.Name = "Shirt"
- end
- if not Character:FindFirstChild("Pants") then
- local Pants = Instance.new("Pants", Character)
- Pants.Name = "Pants"
- end
- Rig.HumanoidRootPart.CFrame = RigLocation.CFrame * CFrame.new(0,3.5,0)
- Rig.HumanoidRootPart.Anchored = true
- Rig.Parent = workspace
- ------Shirts
- local AllShirts = CustamizationFolder:WaitForChild("Shirts"):GetChildren()
- ShirtCurrent.Value = 1
- local ShirtNextButton = ShirtSetection.Next
- local ShirtPreviousButton = ShirtSetection.Previous
- ShirtNextButton.MouseButton1Click:Connect(function()
- ShirtCurrent.Value += 1
- if ShirtCurrent.Value > #AllShirts then
- ShirtCurrent.Value = 1
- end
- Rig:WaitForChild("Shirt").ShirtTemplate = AllShirts[ShirtCurrent.Value].ShirtTemplate
- print(ShirtCurrent.Value)
- end)
- ShirtPreviousButton.MouseButton1Click:Connect(function()
- ShirtCurrent.Value -= 1
- if ShirtCurrent.Value < 1 then
- ShirtCurrent.Value = #AllShirts
- end
- Rig:WaitForChild("Shirt").ShirtTemplate = AllShirts[ShirtCurrent.Value].ShirtTemplate
- print(ShirtCurrent.Value)
- end)
- ------Pants
- local AllPants = CustamizationFolder:WaitForChild("Pants"):GetChildren()
- Rig:WaitForChild("Pants").PantsTemplate = AllPants[1].PantsTemplate
- PantsCurrent.Value = 1
- local PantsNextButton = PantsSelection.Next
- local PantsPreviousButton = PantsSelection.Previous
- PantsNextButton.MouseButton1Click:Connect(function()
- PantsCurrent.Value += 1
- if PantsCurrent.Value > #AllPants then
- PantsCurrent.Value = 1
- end
- Rig:WaitForChild("Pants").PantsTemplate = AllPants[PantsCurrent.Value].PantsTemplate
- print(PantsCurrent.Value)
- end)
- PantsPreviousButton.MouseButton1Click:Connect(function()
- PantsCurrent.Value -= 1
- if PantsCurrent.Value < 1 then
- PantsCurrent.Value = #AllPants
- end
- Rig:WaitForChild("Pants").PantsTemplate = AllPants[PantsCurrent.Value].PantsTemplate
- print(PantsCurrent.Value)
- end)
- ----------- Finished
- FinishedButton.MouseButton1Click:Connect(function()
- CustomRemote:FireServer(Rig.Shirt.ShirtTemplate, Rig.Pants.PantsTemplate)
- Character.Shirt.ShirtTemplate = Rig.Shirt.ShirtTemplate
- Character.Pants.PantsTemplate = Rig.Pants.PantsTemplate
- CustomGui.Enabled = false
- repeat Camera.CameraType = Enum.CameraType.Custom until
- Camera.CameraType == Enum.CameraType.Custom
- Rig:Destroy()
- end)
- -------------
- repeat Camera.CameraType = Enum.CameraType.Scriptable
- task.wait()
- until
- Camera.CameraType == Enum.CameraType.Scriptable
- Camera.CFrame = CamPart.CFrame
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement