Advertisement
Guest User

Untitled

a guest
Jun 16th, 2019
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.92 KB | None | 0 0
  1. -- Objects
  2.  
  3. local ScreenGui = Instance.new("ScreenGui")
  4. local TextBox = Instance.new("TextBox")
  5.  
  6. -- Properties
  7.  
  8. ScreenGui.Parent = game.CoreGui
  9.  
  10. TextBox.Parent = ScreenGui
  11. TextBox.BackgroundColor3 = Color3.new(0.333333, 0.333333, 0.333333)
  12. TextBox.Position = UDim2.new(0, 0, 1, -25)
  13. TextBox.Size = UDim2.new(0, 150, 0, 25)
  14. TextBox.Font = Enum.Font.SourceSans
  15. TextBox.Text = "Insert Player Name"
  16. TextBox.TextColor3 = Color3.new(1, 1, 1)
  17. TextBox.TextScaled = true
  18. TextBox.TextSize = 14
  19. TextBox.TextWrapped = true
  20.  
  21. -- Scripts
  22.  
  23.  
  24.  
  25. game:GetService("UserInputService").InputBegan:connect(function(key)
  26. if key.KeyCode == Enum.KeyCode.E then --Replace E with the key you would like to be pressed
  27. local ooooooof = TextBox.Text
  28. local plr1 = game.Players.LocalPlayer.Character
  29. local plr2 = game.Workspace:FindFirstChild(ooooooof)
  30. plr1.HumanoidRootPart.CFrame = plr2.HumanoidRootPart.CFrame * CFrame.new(0,2,0)
  31. end
  32. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement