Advertisement
scriptingtales

Ban Gui

Mar 24th, 2021
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.08 KB | None | 0 0
  1. -- Gui to Lua
  2. -- Version: 3.2
  3.  
  4. -- Instances:
  5.  
  6. local ScreenGui = Instance.new("ScreenGui")
  7. local Frame = Instance.new("Frame")
  8. local Ban = Instance.new("TextButton")
  9. local Reason = Instance.new("TextBox")
  10. local Player = Instance.new("TextBox")
  11. local Error = Instance.new("TextLabel")
  12. local Title = Instance.new("TextLabel")
  13. local Toggle = Instance.new("TextButton")
  14.  
  15. --Properties:
  16.  
  17. ScreenGui.Parent = game.Players.LocalPlayer:WaitForChild("PlayerGui")
  18. ScreenGui.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
  19.  
  20. Frame.Parent = ScreenGui
  21. Frame.BackgroundColor3 = Color3.fromRGB(16, 134, 255)
  22. Frame.Position = UDim2.new(0.301990449, 0, 0.292010993, 0)
  23. Frame.Size = UDim2.new(0, 631, 0, 372)
  24.  
  25. Ban.Name = "Ban"
  26. Ban.Parent = Frame
  27. Ban.BackgroundColor3 = Color3.fromRGB(31, 247, 255)
  28. Ban.Position = UDim2.new(0.340728998, 0, 0.798387051, 0)
  29. Ban.Size = UDim2.new(0, 200, 0, 50)
  30. Ban.Font = Enum.Font.SciFi
  31. Ban.Text = "Ban Player"
  32. Ban.TextColor3 = Color3.fromRGB(252, 0, 6)
  33. Ban.TextSize = 45.000
  34.  
  35. Reason.Name = "Reason"
  36. Reason.Parent = Frame
  37. Reason.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  38. Reason.Position = UDim2.new(0.217115685, 0, 0.427419364, 0)
  39. Reason.Size = UDim2.new(0, 359, 0, 119)
  40. Reason.Font = Enum.Font.SourceSans
  41. Reason.Text = "Reason"
  42. Reason.TextColor3 = Color3.fromRGB(0, 0, 0)
  43. Reason.TextSize = 19.000
  44. Reason.TextXAlignment = Enum.TextXAlignment.Left
  45. Reason.TextYAlignment = Enum.TextYAlignment.Top
  46.  
  47. Player.Name = "Player"
  48. Player.Parent = Frame
  49. Player.BackgroundColor3 = Color3.fromRGB(25, 201, 255)
  50. Player.Position = UDim2.new(0.216076076, 0, 0.265951276, 0)
  51. Player.Size = UDim2.new(0, 359, 0, 50)
  52. Player.Font = Enum.Font.SourceSans
  53. Player.Text = "Enter Player Name"
  54. Player.TextColor3 = Color3.fromRGB(0, 0, 255)
  55. Player.TextSize = 24.000
  56.  
  57. Error.Name = "Error"
  58. Error.Parent = Frame
  59. Error.BackgroundColor3 = Color3.fromRGB(16, 134, 255)
  60. Error.BorderColor3 = Color3.fromRGB(16, 134, 255)
  61. Error.Position = UDim2.new(0.0935023725, 0, 0.153225809, 0)
  62. Error.Size = UDim2.new(0, 530, 0, 34)
  63. Error.Visible = false
  64. Error.Font = Enum.Font.SourceSans
  65. Error.Text = "Player does not exist"
  66. Error.TextColor3 = Color3.fromRGB(253, 138, 8)
  67. Error.TextScaled = true
  68. Error.TextSize = 44.000
  69. Error.TextStrokeTransparency = 2.000
  70. Error.TextWrapped = true
  71.  
  72. Title.Name = "Title"
  73. Title.Parent = Frame
  74. Title.BackgroundColor3 = Color3.fromRGB(2, 60, 255)
  75. Title.Position = UDim2.new(0.00158478611, 0, 0, 0)
  76. Title.Size = UDim2.new(0, 631, 0, 50)
  77. Title.Font = Enum.Font.SourceSans
  78. Title.Text = "Ban GUI"
  79. Title.TextColor3 = Color3.fromRGB(252, 0, 245)
  80. Title.TextSize = 45.000
  81.  
  82. Toggle.Name = "Toggle"
  83. Toggle.Parent = ScreenGui
  84. Toggle.BackgroundColor3 = Color3.fromRGB(21, 170, 255)
  85. Toggle.Position = UDim2.new(0, 0, 0.479338855, 0)
  86. Toggle.Size = UDim2.new(0, 272, 0, 85)
  87. Toggle.Font = Enum.Font.SciFi
  88. Toggle.Text = "Toggle GUI"
  89. Toggle.TextColor3 = Color3.fromRGB(252, 0, 16)
  90. Toggle.TextSize = 56.000
  91.  
  92. -- Scripts:
  93.  
  94. local function MMRZ_fake_script() -- Ban.LocalScript
  95. local script = Instance.new('LocalScript', Ban)
  96.  
  97. script.Parent.MouseButton1Click:Connect(function()
  98. game.ReplicatedStorage.Ban:FireServer(script.Parent.Parent.Player.Text,script.Parent.Parent.Reason.Text,script.Parent.Parent.Error)
  99. end)
  100. end
  101. coroutine.wrap(MMRZ_fake_script)()
  102. local function ZIZYDJH_fake_script() -- Frame.LocalScript
  103. local script = Instance.new('LocalScript', Frame)
  104.  
  105. local UIS = game:GetService("UserInputService")
  106. function dragify(Frame)
  107. dragToggle = nil
  108. local dragSpeed = 0
  109. dragInput = nil
  110. dragStart = nil
  111. local dragPos = nil
  112. function updateInput(input)
  113. local Delta = input.Position - dragStart
  114. local Position = UDim2.new(startPos.X.Scale, startPos.X.Offset + Delta.X, startPos.Y.Scale, startPos.Y.Offset + Delta.Y)
  115. game:GetService("TweenService"):Create(Frame, TweenInfo.new(0.25), {Position = Position}):Play()
  116. end
  117. Frame.InputBegan:Connect(function(input)
  118. if (input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch) and UIS:GetFocusedTextBox() == nil then
  119. dragToggle = true
  120. dragStart = input.Position
  121. startPos = Frame.Position
  122. input.Changed:Connect(function()
  123. if input.UserInputState == Enum.UserInputState.End then
  124. dragToggle = false
  125. end
  126. end)
  127. end
  128. end)
  129. Frame.InputChanged:Connect(function(input)
  130. if input.UserInputType == Enum.UserInputType.MouseMovement or input.UserInputType == Enum.UserInputType.Touch then
  131. dragInput = input
  132. end
  133. end)
  134. game:GetService("UserInputService").InputChanged:Connect(function(input)
  135. if input == dragInput and dragToggle then
  136. updateInput(input)
  137. end
  138. end)
  139. end
  140.  
  141. dragify(script.Parent)
  142. end
  143. coroutine.wrap(ZIZYDJH_fake_script)()
  144. local function DEPDD_fake_script() -- Toggle.LocalScript
  145. local script = Instance.new('LocalScript', Toggle)
  146.  
  147. script.Parent.MouseButton1Click:Connect(function()
  148. if script.Parent.Parent.Frame.Visible == true then
  149. script.Parent.Parent.Frame.Visible = false
  150. else
  151. script.Parent.Parent.Frame.Visible = true
  152. end
  153. end)
  154. end
  155. coroutine.wrap(DEPDD_fake_script)()
  156.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement