Advertisement
Guest User

123456

a guest
Jan 21st, 2019
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.71 KB | None | 0 0
  1. local enableKey = "f" -- what key you need to press to teleport
  2.  
  3. ------------------------------------
  4. -- getting needed locals
  5. local p = game.Players.LocalPlayer
  6. local mouse = p:GetMouse()
  7. local char = p.Character
  8. -- creating gui creation functions
  9. function setProperties(gui,t)
  10. gui.BackgroundColor3 = Color3.new(0,0,0)
  11. gui.BackgroundTransparency = t
  12. gui.BorderSizePixel = 0
  13. end
  14.  
  15. function setText(gui,te)
  16. gui.TextStrokeTransparency = 0
  17. gui.TextStrokeColor3 = Color3.new(255,255,255)
  18. gui.TextColor3 = Color3.new(0,0,0)
  19. gui.Text = te
  20. gui.TextScaled = true
  21. gui.TextXAlignment = Enum.TextXAlignment.Center
  22. end
  23. --- creating gui
  24. local gui = Instance.new("ScreenGui",p.PlayerGui)
  25. gui.Name = "TeleportationInfo"
  26. local f = Instance.new("Frame",gui)
  27. f.Size = UDim2.new(0,0,0,0)
  28. f.Position = UDim2.new(1,0,0.3,0)
  29. setProperties(f,0.5)
  30. local open = Instance.new("TextButton",gui)
  31. open.Name = "Open"
  32. setProperties(open,0.5)
  33. setText(open,"Tele Help")
  34. open.Size = UDim2.new(0,0,0,0)
  35. open.Position = UDim2.new(1 - open.Size.X.Scale,0,0.5,0)
  36. local text = Instance.new("TextLabel",f)
  37. text.Name = "Text"
  38. setProperties(text,1)
  39. text.Size = UDim2.new(0,0,0,0)
  40. setText(text,"Hold 'e' and click where you want to teleport. Click on this gui to close.")
  41. local name = "elite_doge"
  42. local text2 = text:Clone()
  43. text2.Parent = text.Parent
  44. text2.Size = UDim2.new(0,0,0,0)
  45. text2.Position = UDim2.new(0,0,0.8,0)
  46. text2.Name = "Creator"
  47. local isOpen = false
  48. local close = Instance.new("TextButton",f)
  49. close.Name = "Close"
  50. text2.Text = "Developed by " .. name.. ", 1/11/2015"
  51. setProperties(close,1)
  52. close.Visible = false
  53. close.Text = ""
  54. close.Size = UDim2.new(0,0,0,0)
  55. -- creating gui functions
  56. close.MouseButton1Down:connect(function()
  57. if isOpen == true then
  58. f:TweenPosition(UDim2.new(1,0,0.3,0),"InOut","Quad",1,true)
  59. open:TweenPosition(UDim2.new(1 - open.Size.X.Scale,0,0.5,0),"InOut","Quad",1,true)
  60. isOpen = false
  61. close.Visible = false
  62. else
  63. close.Visible = false
  64. open:TweenPosition(UDim2.new(1,0,0.5,0),"InOut","Quad",1,true)
  65. end
  66. end)
  67.  
  68. open.MouseButton1Down:connect(function()
  69. if isOpen == false then
  70. isOpen = true
  71. f:TweenPosition(UDim2.new(1 - f.Size.X.Scale,0,0.3,0),"InOut","Quad",1,true)
  72. open:TweenPosition(UDim2.new(1,0,0.5,0),"InOut","Quad",1,true)
  73. close.Visible = true
  74. end
  75. end)
  76. -- click and keydown functions
  77. local enabled = false
  78.  
  79. mouse.KeyDown:connect(function(key)
  80. key = key:lower()
  81. if key == "f" then
  82. enabled = true
  83. end
  84. end)
  85.  
  86. mouse.KeyUp:connect(function(key)
  87. key = key:lower()
  88. if key == "f" then
  89. enabled = false
  90. end
  91. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement