Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local player = game.Players.LocalPlayer
- local mouse = player:GetMouse()
- m1 = Instance.new("Model")
- m1.Parent = nil
- print(script.Name)
- function onKeyPress(inputObject, gameProcessedEvent)
- print("Key")
- local key = inputObject.KeyCode
- if key == Enum.KeyCode.E then
- print("E")
- local target = mouse.Target
- if target.Parent:FindFirstChild("HumanoidRootPart") ~= nil then
- print("Switch")
- for i,v in pairs(player.Character:GetChildren()) do
- if v.Name ~= ("b") then
- v.Parent = m1
- end
- end
- for i,v in pairs(target.Parent:GetChildren()) do
- v.Parent = player.Character
- end
- --for i,v in pairs(m1:GetChildren()) do
- -- v.Parent = target.Parent
- --end
- player.Character.Humanoid.NameDisplayDistance = 0
- game.Workspace.Camera.CameraSubject = player.Character.Humanoid
- end
- end
- end
- game:GetService("UserInputService").InputBegan:connect(onKeyPress)
- function onKeyPress(inputObject, gameProcessedEvent)
- print("Key")
- local key = inputObject.KeyCode
- if key == Enum.KeyCode.Q then
- print("Q")
- m = Instance.new("Model")
- m.Parent = game.Workspace
- h = Instance.new("Humanoid")
- h.Parent = m
- for i,v in pairs(player.Character:GetChildren()) do
- if v ~= script then
- if v.ClassName == ("Part") then
- local c = Instance.new("Part")
- c.CFrame = v.CFrame
- c.Position = v.Position + Vector3.new(0,10,0)
- c.Parent = m
- c.Size = v.Size
- c.Color = v.Color
- c.Name = v.Name
- end
- end
- end
- end
- end
- game:GetService("UserInputService").InputBegan:connect(onKeyPress)
Add Comment
Please, Sign In to add comment