SHOW:
|
|
- or go back to the newest paste.
1 | local player = game.Players.LocalPlayer | |
2 | local mouse = player:GetMouse() | |
3 | ||
4 | - | m1 = Instance.new("Model") |
4 | + | local container = Instance.new("Model") |
5 | - | m1.Parent = nil |
5 | + | container.Parent = lighting |
6 | ||
7 | - | print(script.Name) |
7 | + | local hc = Instance.new("Model") |
8 | hc.Parent = player.Character | |
9 | ||
10 | function onKeyPress(inputObject, gameProcessedEvent) | |
11 | print("Key") | |
12 | local key = inputObject.KeyCode | |
13 | if key == Enum.KeyCode.E then | |
14 | print("E") | |
15 | local target = mouse.Target | |
16 | - | print("Switch") |
16 | + | |
17 | - | |
17 | + | target.Parent.Parent = container |
18 | - | for i,v in pairs(player.Character:GetChildren()) do |
18 | + | if target.Parent:FindFirstChild("Humanoid") ~= nil then |
19 | - | if v.Name ~= ("b") then |
19 | + | target.Parent.Humanoid.Name = (target.Parent.Name) |
20 | - | v.Parent = m1 |
20 | + | target.Parent.Humanoid.Parent = hc |
21 | - | end |
21 | + | |
22 | end | |
23 | - | |
23 | + | |
24 | - | for i,v in pairs(target.Parent:GetChildren()) do |
24 | + | |
25 | - | v.Parent = player.Character |
25 | + | |
26 | game:GetService("UserInputService").InputBegan:connect(onKeyPress) | |
27 | - | --for i,v in pairs(m1:GetChildren()) do |
27 | + | |
28 | - | -- v.Parent = target.Parent |
28 | + | |
29 | - | --end |
29 | + | |
30 | - | player.Character.Humanoid.NameDisplayDistance = 0 |
30 | + | |
31 | - | game.Workspace.Camera.CameraSubject = player.Character.Humanoid |
31 | + | |
32 | for i,v in pairs(container:GetChildren()) do | |
33 | print("Release") | |
34 | v.HumanoidRootPart.CFrame = mouse.Hit | |
35 | v.Parent = game.Workspace | |
36 | end | |
37 | wait(0.02) | |
38 | for i,v in pairs(hc:GetChildren()) do | |
39 | v.Parent = game.Workspace:FindFirstChild(v.Name) | |
40 | v.Name = ("Humanoid") | |
41 | end | |
42 | - | print("Q") |
42 | + | |
43 | - | m = Instance.new("Model") |
43 | + | print(core.Parent.Name) |
44 | - | m.Parent = game.Workspace |
44 | + | |
45 | - | h = Instance.new("Humanoid") |
45 | + | |
46 | - | h.Parent = m |
46 | + |