Advertisement
nguyenminhnghia

cách làm pro gui

Feb 12th, 2019
286
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.40 KB | None | 0 0
  1. -- Farewell Infortality.
  2. -- Version: 2.82
  3. -- Instances:
  4. local ScreenGui = Instance.new("ScreenGui")
  5. local Main = Instance.new("Frame")
  6. local TextButton = Instance.new("TextButton")
  7. local Open = Instance.new("Frame")
  8. local OpenGUI = Instance.new("TextButton")
  9. local Dino = Instance.new("TextLabel")
  10. --Properties:
  11. ScreenGui.Parent = game.Players.LocalPlayer:WaitForChild("PlayerGui")
  12.  
  13. Main.Name = "Main"
  14. Main.Parent = ScreenGui
  15. Main.BackgroundColor3 = Color3.new(1, 1, 1)
  16. Main.Position = UDim2.new(0.430536449, 0, 0.262499988, 0)
  17. Main.Size = UDim2.new(0, 220, 0, 133)
  18. Main.Visible = false
  19.  
  20. TextButton.Parent = Main
  21. TextButton.BackgroundColor3 = Color3.new(1, 1, 1)
  22. TextButton.Position = UDim2.new(0.672727287, 0, 0, 0)
  23. TextButton.Size = UDim2.new(0, 72, 0, 31)
  24. TextButton.Font = Enum.Font.SourceSans
  25. TextButton.Text = "X"
  26. TextButton.TextColor3 = Color3.new(0, 0, 0)
  27. TextButton.TextSize = 14
  28. TextButton.MouseButton1Down:connect(function()
  29. Main:TweenPosition(UDim2.new(0.345, 0,2.204, 0), 'Out', 'Bounce', 1)
  30. wait(1)
  31. Main.Visible = false
  32. end)
  33.  
  34. Open.Name = "Open"
  35. Open.Parent = ScreenGui
  36. Open.BackgroundColor3 = Color3.new(1, 1, 1)
  37. Open.Position = UDim2.new(0.466299862, 0, 0.0416666642, 0)
  38. Open.Size = UDim2.new(0, 100, 0, 50)
  39.  
  40. OpenGUI.Name = "OpenGUI"
  41. OpenGUI.Parent = Open
  42. OpenGUI.BackgroundColor3 = Color3.new(1, 1, 1)
  43. OpenGUI.Size = UDim2.new(0, 100, 0, 50)
  44. OpenGUI.Font = Enum.Font.SourceSans
  45. OpenGUI.Text = "OPEN"
  46. OpenGUI.TextColor3 = Color3.new(0, 0, 0)
  47. OpenGUI.TextSize = 14
  48. OpenGUI.MouseButton1Down:connect(function()
  49. Main.Visible = true
  50.  
  51. Main:TweenPosition(UDim2.new(0.345, 0,0.204, 0), 'Out', 'Bounce', 3)
  52. end)
  53.  
  54. Dino.Name = "Rz"
  55. Dino.Parent = ScreenGui
  56. Dino.BackgroundColor3 = Color3.new(1, 1, 1)
  57. Dino.BackgroundTransparency = 4
  58. Dino.Position = UDim2.new(0.361760646, 0, 0.327083319, 0)
  59. Dino.Size = UDim2.new(0, 320, 0, 50)
  60. Dino.Visible = false
  61. Dino.Font = Enum.Font.SourceSans
  62. Dino.Text = "Gui made by Rz"
  63. Dino.TextColor3 = Color3.new(0, 0, 0)
  64. Dino.TextScaled = true
  65. Dino.TextSize = 14
  66. Dino.TextWrapped = true
  67.  
  68. wait(0.5)
  69. Dino.Visible = true
  70. Dino.TextTransparency = 0.8
  71. Dino.TextStrokeTransparency = 0.8
  72. wait(0.1)
  73. Dino.TextTransparency = 0.7
  74. Dino.TextStrokeTransparency = 0.7
  75. wait(0.1)
  76. Dino.TextTransparency = 0.6
  77. Dino.TextStrokeTransparency = 0.6
  78. wait(0.1)
  79. Dino.TextTransparency = 0.5
  80. Dino.TextStrokeTransparency = 0.5
  81. wait(0.1)
  82. Dino.TextTransparency = 0.4
  83. Dino.TextStrokeTransparency = 0.4
  84. wait(0.1)
  85. Dino.TextTransparency = 0.3
  86. Dino.TextStrokeTransparency = 0.3
  87. wait(0.1)
  88. Dino.TextTransparency = 0.2
  89. Dino.TextStrokeTransparency = 0.2
  90. wait(0.1)
  91. Dino.TextTransparency = 0.1
  92. Dino.TextStrokeTransparency = 0.1
  93.  
  94. wait(5)
  95.  
  96. Dino.TextTransparency = 0.1
  97. Dino.TextStrokeTransparency = 0.1
  98. wait(0.1)
  99. Dino.TextTransparency = 0.2
  100. Dino.TextStrokeTransparency = 0.2
  101. wait(0.1)
  102. Dino.TextTransparency = 0.3
  103. Dino.TextStrokeTransparency = 0.3
  104. wait(0.1)
  105. Dino.TextTransparency = 0.4
  106. Dino.TextStrokeTransparency = 0.4
  107. wait(0.1)
  108. Dino.TextTransparency = 0.5
  109. Dino.TextStrokeTransparency = 0.5
  110. wait(0.1)
  111. Dino.TextTransparency = 0.6
  112. Dino.TextStrokeTransparency = 0.6
  113. wait(0.1)
  114. Dino.TextTransparency = 0.7
  115. Dino.TextStrokeTransparency = 0.7
  116. wait(0.1)
  117. Dino.TextTransparency = 0.8
  118. Dino.TextStrokeTransparency = 0.8
  119. wait(0.1)
  120. Dino.Visible = false
  121. -- Scripts:
  122. function dragify(Main)
  123. dragToggle = nil
  124. dragSpeed = .20 -- You can edit this.
  125. dragInput = nil
  126. dragStart = nil
  127. dragPos = nil
  128.  
  129. function updateInput(input)
  130. Delta = input.Position - dragStart
  131. Position = UDim2.new(startPos.X.Scale, startPos.X.Offset + Delta.X, startPos.Y.Scale, startPos.Y.Offset + Delta.Y)
  132. game:GetService("TweenService"):Create(Main, TweenInfo.new(.25), {Position = Position}):Play()
  133. end
  134.  
  135. Main.InputBegan:Connect(function(input)
  136. if (input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch) then
  137. dragToggle = true
  138. dragStart = input.Position
  139. startPos = Main.Position
  140. input.Changed:Connect(function()
  141. if (input.UserInputState == Enum.UserInputState.End) then
  142. dragToggle = false
  143. end
  144. end)
  145. end
  146. end)
  147.  
  148. Main.InputChanged:Connect(function(input)
  149. if (input.UserInputType == Enum.UserInputType.MouseMovement or input.UserInputType == Enum.UserInputType.Touch) then
  150. dragInput = input
  151. end
  152. end)
  153.  
  154. game:GetService("UserInputService").InputChanged:Connect(function(input)
  155. if (input == dragInput and dragToggle) then
  156. updateInput(input)
  157. end
  158. end)
  159. end
  160.  
  161. dragify(Main)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement