Advertisement
scriptingtales

Kick GUI test

Mar 25th, 2021
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.19 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 Title = Instance.new("TextLabel")
  9. local Username = Instance.new("TextBox")
  10. local Error = Instance.new("TextLabel")
  11. local Reason = Instance.new("TextBox")
  12. local Kick = Instance.new("TextButton")
  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(255, 255, 255)
  22. Frame.Position = UDim2.new(0.309090912, 0, 0.252066135, 0)
  23. Frame.Size = UDim2.new(0, 629, 0, 387)
  24. Frame.Visible = false
  25.  
  26. Title.Name = "Title"
  27. Title.Parent = Frame
  28. Title.BackgroundColor3 = Color3.fromRGB(0, 0, 0)
  29. Title.Size = UDim2.new(0, 629, 0, 50)
  30. Title.Font = Enum.Font.Sarpanch
  31. Title.Text = "Kick GUI"
  32. Title.TextColor3 = Color3.fromRGB(255, 255, 255)
  33. Title.TextScaled = true
  34. Title.TextSize = 14.000
  35. Title.TextWrapped = true
  36.  
  37. Username.Name = "Username"
  38. Username.Parent = Frame
  39. Username.BackgroundColor3 = Color3.fromRGB(0, 0, 0)
  40. Username.Position = UDim2.new(0.246422887, 0, 0.263565898, 0)
  41. Username.Size = UDim2.new(0, 318, 0, 40)
  42. Username.Font = Enum.Font.SciFi
  43. Username.Text = "Enter Username"
  44. Username.TextColor3 = Color3.fromRGB(252, 255, 255)
  45. Username.TextSize = 23.000
  46.  
  47. Error.Name = "Error"
  48. Error.Parent = Frame
  49. Error.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  50. Error.BorderColor3 = Color3.fromRGB(254, 254, 253)
  51. Error.Position = UDim2.new(0.217806041, 0, 0.149870798, 0)
  52. Error.Size = UDim2.new(0, 354, 0, 38)
  53. Error.Visible = false
  54. Error.Font = Enum.Font.SourceSans
  55. Error.Text = "Player does not exist"
  56. Error.TextColor3 = Color3.fromRGB(0, 0, 0)
  57. Error.TextSize = 25.000
  58.  
  59. Reason.Name = "Reason"
  60. Reason.Parent = Frame
  61. Reason.BackgroundColor3 = Color3.fromRGB(9, 2, 1)
  62. Reason.Position = UDim2.new(0.217806041, 0, 0.400516808, 0)
  63. Reason.Size = UDim2.new(0, 354, 0, 148)
  64. Reason.Font = Enum.Font.SourceSans
  65. Reason.Text = "Reason"
  66. Reason.TextColor3 = Color3.fromRGB(253, 253, 254)
  67. Reason.TextSize = 19.000
  68. Reason.TextXAlignment = Enum.TextXAlignment.Left
  69. Reason.TextYAlignment = Enum.TextYAlignment.Top
  70.  
  71. Kick.Name = "Kick"
  72. Kick.Parent = Frame
  73. Kick.BackgroundColor3 = Color3.fromRGB(0, 0, 0)
  74. Kick.BorderColor3 = Color3.fromRGB(27, 42, 53)
  75. Kick.Position = UDim2.new(0.340222567, 0, 0.81653744, 0)
  76. Kick.Size = UDim2.new(0, 200, 0, 50)
  77. Kick.Font = Enum.Font.Sarpanch
  78. Kick.Text = "Kick Player"
  79. Kick.TextColor3 = Color3.fromRGB(253, 254, 254)
  80. Kick.TextScaled = true
  81. Kick.TextSize = 14.000
  82. Kick.TextWrapped = true
  83.  
  84. Toggle.Name = "Toggle"
  85. Toggle.Parent = ScreenGui
  86. Toggle.BackgroundColor3 = Color3.fromRGB(0, 0, 0)
  87. Toggle.Position = UDim2.new(0, 0, 0.484848499, 0)
  88. Toggle.Size = UDim2.new(0, 200, 0, 50)
  89. Toggle.Font = Enum.Font.GothamBlack
  90. Toggle.Text = "Toggle GUI"
  91. Toggle.TextColor3 = Color3.fromRGB(255, 255, 255)
  92. Toggle.TextScaled = true
  93. Toggle.TextSize = 14.000
  94. Toggle.TextWrapped = true
  95.  
  96. -- Scripts:
  97.  
  98. local function QAFSHO_fake_script() -- Kick.LocalScript
  99. local script = Instance.new('LocalScript', Kick)
  100.  
  101. script.Parent.MouseButton1Click:Connect(function()
  102. game.ReplicatedStorage.Kick:FireServer(script.Parent.Parent.Username.Text,script.Parent.Parent.Reason.Text,script.Parent.Parent.Error)
  103. end)
  104. end
  105. coroutine.wrap(QAFSHO_fake_script)()
  106. local function DIYV_fake_script() -- Frame.LocalScript
  107. local script = Instance.new('LocalScript', Frame)
  108.  
  109. local UIS = game:GetService("UserInputService")
  110. function dragify(Frame)
  111. dragToggle = nil
  112. local dragSpeed = 0
  113. dragInput = nil
  114. dragStart = nil
  115. local dragPos = nil
  116. function updateInput(input)
  117. local Delta = input.Position - dragStart
  118. local Position = UDim2.new(startPos.X.Scale, startPos.X.Offset + Delta.X, startPos.Y.Scale, startPos.Y.Offset + Delta.Y)
  119. game:GetService("TweenService"):Create(Frame, TweenInfo.new(0.25), {Position = Position}):Play()
  120. end
  121. Frame.InputBegan:Connect(function(input)
  122. if (input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch) and UIS:GetFocusedTextBox() == nil then
  123. dragToggle = true
  124. dragStart = input.Position
  125. startPos = Frame.Position
  126. input.Changed:Connect(function()
  127. if input.UserInputState == Enum.UserInputState.End then
  128. dragToggle = false
  129. end
  130. end)
  131. end
  132. end)
  133. Frame.InputChanged:Connect(function(input)
  134. if input.UserInputType == Enum.UserInputType.MouseMovement or input.UserInputType == Enum.UserInputType.Touch then
  135. dragInput = input
  136. end
  137. end)
  138. game:GetService("UserInputService").InputChanged:Connect(function(input)
  139. if input == dragInput and dragToggle then
  140. updateInput(input)
  141. end
  142. end)
  143. end
  144.  
  145. dragify(script.Parent)
  146. end
  147. coroutine.wrap(DIYV_fake_script)()
  148. local function TIIEQE_fake_script() -- Toggle.LocalScript
  149. local script = Instance.new('LocalScript', Toggle)
  150.  
  151. script.Parent.MouseButton1Click:Connect(function()
  152. if script.Parent.Parent.Frame.Visible == true then
  153. script.Parent.Parent.Frame.Visible = false
  154. else
  155. script.Parent.Parent.Frame.Visible = true
  156. end
  157. end)
  158.  
  159. end
  160. coroutine.wrap(TIIEQE_fake_script)()
  161.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement