Advertisement
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)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement