Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local UIS=game:GetService'UserInputService'
- getgenv().KeyBind="E"
- UIS.InputBegan:Connect(function(Key)
- if Key.KeyCode==Enum.KeyCode[getgenv().KeyBind] and not UIS:GetFocusedTextBox() then
- while wait() do
- local toolamount = 2
- local LocalPlayer = game:GetService("Players").LocalPlayer
- local runservice = game:GetService("RunService")
- LocalPlayer.Character:FindFirstChildOfClass("Humanoid"):UnequipTools()
- local currentamount = #LocalPlayer.Backpack:GetChildren()
- LocalPlayer.Character.Archivable = true
- local tempchar = LocalPlayer.Character:Clone()
- local lastchar = nil
- tempchar.Parent = workspace
- local savepos = LocalPlayer.Character:FindFirstChild("HumanoidRootPart").CFrame
- local heartbeat = runservice.Heartbeat:Connect(function()
- workspace.CurrentCamera.CameraSubject = tempchar:FindFirstChildOfClass("Humanoid")
- local tbl = LocalPlayer.Backpack:GetChildren()
- for i = 1, #tbl do local tool = tbl[i]
- if tool.ClassName == "Tool" then
- tool.Parent = LocalPlayer
- end
- end
- LocalPlayer.Character:ClearAllChildren()
- local char = Instance.new("Model", workspace)
- Instance.new("Humanoid", char)
- LocalPlayer.Character = char
- if lastchar ~= nil then
- lastchar:Destroy()
- end
- repeat runservice.Heartbeat:Wait() until LocalPlayer.Character ~= nil
- lastchar = char
- end)
- repeat runservice.Heartbeat:Wait() until #LocalPlayer:GetChildren() - 3 - currentamount >= toolamount
- heartbeat:Disconnect()
- repeat runservice.Heartbeat:Wait() until LocalPlayer.Character:FindFirstChild("HumanoidRootPart") ~= nil
- lastchar:Destroy()
- local tbs = LocalPlayer:GetChildren()
- for i = 1, #tbs do local tool = tbs[i]
- if tool.ClassName == "Tool" then
- tool.Parent = LocalPlayer.Backpack
- end
- end
- LocalPlayer.Character:FindFirstChild("HumanoidRootPart").CFrame = savepos
- tempchar:Destroy()
- for i, v in pairs(game.Players.LocalPlayer.Backpack:GetChildren()) do
- if v:IsA("Tool") then
- v.GripPos = Vector3.new(math.random(18, 93), math.random(-40, 40), 0)
- end
- end
- wait()
- for i, v in pairs(game.Players.LocalPlayer.Backpack:GetChildren()) do
- if v:IsA("Tool") then
- v.Parent = game.Players.LocalPlayer.Character
- end
- end
- wait()
- for i, v in pairs(game.Players.LocalPlayer.Character:GetChildren()) do
- if v:IsA("Tool") then
- v.Parent = game.Workspace.Terrain
- end
- end
- local oh1 = CFrame.new(-47.8986206, 3.9000001, 59.7871552)
- local oh2 = game:GetService("Players")
- local oh3 = oh2.LocalPlayer.Character.HumanoidRootPart
- oh3.CFrame = oh1
- wait(1)
- game:GetService("Players").LocalPlayer.Character.Humanoid.Health = 0
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement