Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- wait(0.1)
- script:Destroy()
- math.randomseed(tick())
- local Player = game.Players.LocalPlayer
- local Character = (Player.Character or Player.CharacterAdded:wait())
- Character.Archivable = true
- local CharacterClone = Character:Clone()
- CharacterClone.Name = "0x420"
- Player.Parent = nil
- local Camera = workspace.CurrentCamera
- local CurrentCharacter
- local SetupCharacter
- local function Reset()
- CharacterClone:Destroy()
- wait(2.5)
- CurrentCharacter = SetupCharacter()
- end
- function SetupCharacter()
- local Humanoid = CharacterClone:Clone():WaitForChild("Humanoid")
- Humanoid.Name = "Human"
- Humanoid.MaxHealth = math.huge
- Humanoid.Health = math.huge
- Humanoid:WaitForChild("Animator"):Destroy()
- local Head = CharacterClone:WaitForChild("Head")
- Head:WaitForChild("face").Name = "Face"
- Head:WaitForChild("Mesh").Name = "HeadMesh"
- for Index, Object in next, Head:GetChildren() do
- if Object:IsA("Sound") then
- Object:Destroy()
- end
- end
- CharacterClone:WaitForChild("Torso").roblox:Destroy()
- CharacterClone:WaitForChild("Animate"):Destroy()
- CharacterClone:WaitForChild("Health"):Destroy()
- CharacterClone:WaitForChild("Sound"):Destroy()
- CharacterClone:WaitForChild("Body Colors"):Destroy()
- for Index, Object in next, CharacterClone:GetChildren() do
- if Object:IsA("BasePart") then
- Object.BrickColor = BrickColor.new("Pastel brown")
- Object.Material = Enum.Material.SmoothPlastic
- Object.TopSurface = Enum.SurfaceType.SmoothNoOutlines
- Object.BottomSurface = Enum.SurfaceType.SmoothNoOutlines
- Object.FrontSurface = Enum.SurfaceType.SmoothNoOutlines
- Object.BackSurface = Enum.SurfaceType.SmoothNoOutlines
- Object.RightSurface = Enum.SurfaceType.SmoothNoOutlines
- Object.LeftSurface = Enum.SurfaceType.SmoothNoOutlines
- end
- end
- CharacterClone.Parent = workspace
- CharacterClone:MakeJoints()
- Camera.CameraType = Enum.CameraType.Follow
- Camera.CameraSubject = CharacterClone
- Humanoid.Died:connect(Reset)
- workspace.ChildAdded:connect(function(Child)
- if (Child.Name == "0x420") then
- Reset()
- end
- end)
- return CharacterClone
- end
- local UserInputService = game:GetService("UserInputService")
- local Keys = {}
- UserInputService.InputBegan:connect(function(InputObject, GameProcessedEvent)
- if (not GameProcessedEvent) then
- if (InputObject.UserInputType == Enum.UserInputType.Keyboard) then
- Keys[InputObject.KeyCode.Name] = true
- end
- end
- end)
- UserInputService.InputEnded:connect(function(InputObject, GameProcessedEvent)
- if (not GameProcessedEvent) then
- if (InputObject.UserInputType == Enum.UserInputType.Keyboard) then
- Keys[InputObject.KeyCode.Name] = false
- end
- end
- end)
- game:GetService("RunService").RenderStepped:connect(function()
- if (CurrentCharacter and (CurrentCharacter.Parent == workspace)) then
- if Keys.Space then
- local Humanoid = CurrentCharacter:FindFirstChild("Humanoid")
- if Humanoid then
- Humanoid.Jump = true
- end
- end
- if (Keys.A or Keys.D) then
- local Torso = CurrentCharacter:FindFirstChild("Torso")
- if Torso then
- Torso.CFrame = (Torso.CFrame * CFrame.Angles(0, math.rad(Keys.A and 2 or Keys.D and -2), 0))
- end
- end
- local Humanoid = CurrentCharacter:FindFirstChild("Humanoid")
- if Humanoid then
- Humanoid:Move(Vector3.new(0, 0, (Keys.W and -1 or Keys.D and 1)), true)
- else
- Humanoid:Move(Vector3.new(0, 0, 0), true)
- end
- end
- end)
- CurrentCharacter = SetupCharacter()
- Player.Chatted:connect(function(Message)
- if (CurrentCharacter and (CurrentCharacter.Parent == workspace)) then
- local Head = CurrentCharacter:FindFirstChild("Head")
- if Head then
- game.Chat:Chat(Head, Message, math.random(0, 2))
- end
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement