SebTDZ

Info

Jul 9th, 2019
119
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 1.61 KB | None | 0 0
  1. owner = game.Players.LocalPlayer
  2. -- Instances:
  3. local Gui = Instance.new("ScreenGui")
  4. local Text = Instance.new("TextBox")
  5. --Properties:
  6. for i,gui in pairs(owner:WaitForChild("PlayerGui"):GetChildren()) do
  7.     if gui.Name == "Gui" then
  8.         gui:Remove()
  9.     end
  10. end
  11. Gui.Name = "Gui"
  12. Gui.Parent = owner:WaitForChild("PlayerGui")
  13. Gui.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
  14.  
  15. Text.Name = "Text"
  16. Text.Text = ""
  17. Text.Parent = Gui
  18. Text.BackgroundColor3 = Color3.new(0.384314, 0.384314, 0.384314)
  19. Text.BackgroundTransparency = 0.55000001192093
  20. Text.BorderSizePixel = 0
  21. Text.Position = UDim2.new(0.1, 0, 0, 0)
  22. Text.Size = UDim2.new(0.8, 0, 0.1, 0)
  23. Text.Font = Enum.Font.SciFi
  24. Text.TextColor3 = Color3.new(0, 0, 0)
  25. Text.TextScaled = true
  26.  
  27. Text.FocusLost:Connect(function(FocusLost)
  28.     if FocusLost then
  29.         Run(Text.Text)
  30.         Text.Text = ""
  31.     end
  32. end)
  33.  
  34. function Run(cmd)
  35.     local cmdLow = string.lower(cmd)
  36.     if cmdLow:sub(1,3) == "to " then
  37.         local TargetPlayer = FindPlayer(cmdLow:sub(4))
  38.         local TPH = game.Players:FindFirstChild(TargetPlayer)
  39.         if TPH.Character:WaitForChild('HumanoidRootPart') then
  40.             owner.Character:WaitForChild('HumanoidRootPart').CFrame = TPH.Character:WaitForChild('HumanoidRootPart').CFrame
  41.         end
  42.     end
  43. end
  44.  
  45. function FindPlayer(FindUser)
  46.     local findUser = string.lower(FindUser)
  47.     local inputsize = string.len(findUser)
  48.     for i, v in pairs(game.Players:GetChildren()) do
  49.         local NameLow = string.lower(v.Name)
  50.         if NameLow:sub(1, inputsize) == findUser:sub(1, inputsize) then
  51.             return v.Name
  52.         end
  53.     end
  54. end
  55.  
  56. --https://pastebin.com/raw/BSMDqb0q
Add Comment
Please, Sign In to add comment