Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local Camera = Instance.new('Camera')
- local HUD = script.Parent:WaitForChild('HUD')
- local RunService = game:GetService('RunService')
- local RenderPriority = Enum.RenderPriority.Last.Value
- local partsToUpdate = {['Sword']=true}
- local Angles = CFrame.Angles
- local NewCFrame = CFrame.new()
- local Rad = math.rad
- local Viewport = HUD:WaitForChild('PlayerView')
- Camera.Parent = HUD
- Viewport.CurrentCamera = Camera
- print(Camera)
- local player = game.Players.LocalPlayer
- local character = player.Character or player.CharacterAdded:Wait()
- character.Archivable = true
- character:WaitForChild('HumanoidRootPart')
- wait(1)
- local newchar = character:Clone()
- local mainPos = newchar.PrimaryPart.CFrame
- local RotationInc = 0
- character.Archivable = false
- newchar.Parent = Viewport
- local newhum = newchar.Humanoid
- newhum.HealthDisplayDistance = 0
- newhum.NameDisplayDistance = 0
- newchar.Name = ''
- Camera.CFrame = (newchar:WaitForChild('HumanoidRootPart').CFrame * NewCFrame(0,0,-6.5)) * Angles(0,math.pi,0)
- function updateCharacter()
- print('UPDATING CHARACTER')
- character.Archivable = true
- newchar:Destroy()
- newchar = character:Clone()
- newchar:SetPrimaryPartCFrame(mainPos)
- local newhum = newchar.Humanoid
- newhum.HealthDisplayDistance = 0
- newhum.NameDisplayDistance = 0
- newchar.Name = ''
- newchar.Parent = Viewport
- character.Archivable = false
- end
- character.ChildAdded:Connect(updateCharacter)
- character.ChildRemoved:Connect(updateCharacter)
- while wait() do
- if character.Humanoid.Health > 0 then
- newchar.Parent = workspace
- RotationInc = RotationInc < 360 and RotationInc + 1 or 0
- newchar:SetPrimaryPartCFrame(mainPos*Angles(0,Rad(RotationInc),0))
- newchar.Parent = Viewport
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement