Advertisement
Meliodas0_0

Teleport Script Generator

Jul 22nd, 2019
149
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.14 KB | None | 0 0
  1. local Settings = {};
  2. Settings.Copy = {
  3. ['Enabled'] = true;
  4. ['scriptify'] = true;
  5. ['func'] = print;
  6. };
  7.  
  8. local Coords = Instance.new("ScreenGui")
  9. local MainFrame = Instance.new("Frame")
  10. local Label = Instance.new("TextLabel")
  11. local Coordinates = Instance.new("TextLabel")
  12. local Copy = Instance.new("TextButton")
  13.  
  14. Coords.Name = "Coords"
  15. Coords.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
  16.  
  17. MainFrame.Name = "MainFrame"
  18. MainFrame.Parent = Coords
  19. MainFrame.BackgroundColor3 = Color3.new(0.129412, 0.129412, 0.129412)
  20. MainFrame.BackgroundTransparency = 0.5
  21. MainFrame.BorderSizePixel = 0
  22. MainFrame.Position = UDim2.new(0, 5, 0, 5)
  23. MainFrame.Size = UDim2.new(0, 160, 0, 30)
  24.  
  25. Label.Name = "Label"
  26. Label.Parent = MainFrame
  27. Label.BackgroundColor3 = Color3.new(1, 1, 1)
  28. Label.BackgroundTransparency = 1
  29. Label.Position = UDim2.new(0, 5, 0, 5)
  30. Label.Size = UDim2.new(0, 60, 1, -10)
  31. Label.Font = Enum.Font.GothamBold
  32. Label.Text = "Coords:"
  33. Label.TextColor3 = Color3.new(1, 1, 1)
  34. Label.TextSize = 14
  35. Label.TextStrokeColor3 = Color3.new(0.0509804, 0.0509804, 0.0509804)
  36. Label.TextStrokeTransparency = 0.99000000953674
  37. Label.TextXAlignment = Enum.TextXAlignment.Left
  38.  
  39. Coordinates.Name = "Coordinates"
  40. Coordinates.Parent = Label
  41. Coordinates.BackgroundColor3 = Color3.new(1, 1, 1)
  42. Coordinates.BackgroundTransparency = 1
  43. Coordinates.Position = UDim2.new(1, 0, 0, 3)
  44. Coordinates.Size = UDim2.new(0, 100, 1, -6)
  45. Coordinates.Font = Enum.Font.Gotham
  46. Coordinates.Text = "0, 0, 0"
  47. Coordinates.TextColor3 = Color3.new(1, 1, 1)
  48. Coordinates.TextSize = 14
  49. Coordinates.TextStrokeColor3 = Color3.new(0.0509804, 0.0509804, 0.0509804)
  50. Coordinates.TextStrokeTransparency = 0.99000000953674
  51. Coordinates.TextXAlignment = Enum.TextXAlignment.Left
  52.  
  53. Copy.Name = "Copy"
  54. Copy.Parent = MainFrame
  55. Copy.BackgroundColor3 = Color3.new(0.129412, 0.129412, 0.129412)
  56. Copy.Size = UDim2.new(1, 0, 1, 0)
  57. Copy.Font = Enum.Font.GothamBold
  58. Copy.Text = "Copy"
  59. Copy.BorderSizePixel = 0;
  60. Copy.TextColor3 = Color3.new(1, 1, 0.717647)
  61. Copy.TextSize = 14
  62. Copy.BackgroundTransparency = .2;
  63. Copy.Visible = false;
  64.  
  65. local RunService = game:GetService('RunService');
  66. local LP = game:GetService('Players').LocalPlayer;
  67.  
  68. local getRoot = function()
  69. if LP.Character then
  70. return LP.Character:FindFirstChild'HumanoidRootPart';
  71. end;
  72. end;
  73.  
  74. local CopyOnClick = function()
  75. if Settings.Copy.Enabled then
  76. local format = ('Vector3.new('.. tostring(getRoot().Position) ..')');
  77.  
  78. if Settings.Copy.scriptify then
  79. format = ('game:GetService\'Players\'.LocalPlayer.Character:MoveTo(%s)'):format(format);
  80. end;
  81.  
  82. if format then
  83. Settings.Copy.func(format);
  84. end;
  85. end;
  86. end;
  87.  
  88. local updateCoords = function()
  89. local root = getRoot();
  90.  
  91. if root then
  92. Coordinates.Text = tostring(Vector3.new(math.floor(root.Position.X), math.floor(root.Position.Y), math.floor(root.Position.Z)));
  93. end;
  94. end;
  95.  
  96.  
  97. local hideButton = function()
  98. Copy.Visible = false;
  99. end;
  100.  
  101. local showButton = function()
  102. Copy.Visible = true;
  103. end;
  104.  
  105. RunService.Heartbeat:Connect(updateCoords);
  106.  
  107. MainFrame.MouseEnter:Connect(showButton);
  108. Copy.MouseLeave:Connect(hideButton);
  109. Copy.MouseButton1Click:Connect(CopyOnClick);
  110.  
  111. Coords.Parent = game.CoreGui;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement