Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- owner = game.Players.LocalPlayer
- -- Instances:
- local Gui = Instance.new("ScreenGui")
- local Text = Instance.new("TextBox")
- --Properties:
- for i,gui in pairs(owner:WaitForChild("PlayerGui"):GetChildren()) do
- if gui.Name == "Gui" then
- gui:Remove()
- end
- end
- Gui.Name = "Gui"
- Gui.Parent = owner:WaitForChild("PlayerGui")
- Gui.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
- Text.Name = "Text"
- Text.Text = ""
- Text.Parent = Gui
- Text.BackgroundColor3 = Color3.new(0.384314, 0.384314, 0.384314)
- Text.BackgroundTransparency = 0.55000001192093
- Text.BorderSizePixel = 0
- Text.Position = UDim2.new(0.1, 0, 0, 0)
- Text.Size = UDim2.new(0.8, 0, 0.1, 0)
- Text.Font = Enum.Font.SciFi
- Text.TextColor3 = Color3.new(0, 0, 0)
- Text.TextScaled = true
- Text.FocusLost:Connect(function(FocusLost)
- if FocusLost then
- Run(Text.Text)
- Text.Text = ""
- end
- end)
- function Run(cmd)
- local cmdLow = string.lower(cmd)
- if cmdLow:sub(1,3) == "to " then
- local TargetPlayer = FindPlayer(cmdLow:sub(4))
- local TPH = game.Players:FindFirstChild(TargetPlayer)
- if TPH.Character:WaitForChild('HumanoidRootPart') then
- owner.Character:WaitForChild('HumanoidRootPart').CFrame = TPH.Character:WaitForChild('HumanoidRootPart').CFrame
- end
- end
- end
- function FindPlayer(FindUser)
- local findUser = string.lower(FindUser)
- local inputsize = string.len(findUser)
- for i, v in pairs(game.Players:GetChildren()) do
- local NameLow = string.lower(v.Name)
- if NameLow:sub(1, inputsize) == findUser:sub(1, inputsize) then
- return v.Name
- end
- end
- end
- --https://pastebin.com/raw/BSMDqb0q
Add Comment
Please, Sign In to add comment