Guest User

ban/kick gui FE!! for roblox

a guest
Jul 26th, 2019
27,218
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. -- This script has been converted to FE by iPxter
  2.  
  3.  
  4. if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
  5. local Player,Mouse,mouse,UserInputService,ContextActionService = owner
  6. do
  7. print("FE Compatibility code by Mokiros | Translated to FE by iPxter")
  8. script.Parent = Player.Character
  9.  
  10. --RemoteEvent for communicating
  11. local Event = Instance.new("RemoteEvent")
  12. Event.Name = "UserInput_Event"
  13.  
  14. --Fake event to make stuff like Mouse.KeyDown work
  15. local function fakeEvent()
  16. local t = {_fakeEvent=true,Connect=function(self,f)self.Function=f end}
  17. t.connect = t.Connect
  18. return t
  19. end
  20.  
  21. --Creating fake input objects with fake variables
  22. local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent()}
  23. local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
  24. local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
  25. CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
  26. end}
  27. --Merged 2 functions into one by checking amount of arguments
  28. CAS.UnbindAction = CAS.BindAction
  29.  
  30. --This function will trigger the events that have been :Connect()'ed
  31. local function te(self,ev,...)
  32. local t = m[ev]
  33. if t and t._fakeEvent and t.Function then
  34. t.Function(...)
  35. end
  36. end
  37. m.TrigEvent = te
  38. UIS.TrigEvent = te
  39.  
  40. Event.OnServerEvent:Connect(function(plr,io)
  41. if plr~=Player then return end
  42. if io.isMouse then
  43. m.Target = io.Target
  44. m.Hit = io.Hit
  45. else
  46. local b = io.UserInputState == Enum.UserInputState.Begin
  47. if io.UserInputType == Enum.UserInputType.MouseButton1 then
  48. return m:TrigEvent(b and "Button1Down" or "Button1Up")
  49. end
  50. for _,t in pairs(CAS.Actions) do
  51. for _,k in pairs(t.Keys) do
  52. if k==io.KeyCode then
  53. t.Function(t.Name,io.UserInputState,io)
  54. end
  55. end
  56. end
  57. m:TrigEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
  58. UIS:TrigEvent(b and "InputBegan" or "InputEnded",io,false)
  59. end
  60. end)
  61. Event.Parent = NLS([==[
  62. local Player = game:GetService("Players").LocalPlayer
  63. local Event = script:WaitForChild("UserInput_Event")
  64.  
  65. local UIS = game:GetService("UserInputService")
  66. local input = function(io,a)
  67. if a then return end
  68. --Since InputObject is a client-side instance, we create and pass table instead
  69. Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState})
  70. end
  71. UIS.InputBegan:Connect(input)
  72. UIS.InputEnded:Connect(input)
  73.  
  74. local Mouse = Player:GetMouse()
  75. local h,t
  76. --Give the server mouse data 30 times every second, but only if the values changed
  77. --If player is not moving their mouse, client won't fire events
  78. while wait(1/30) do
  79. if h~=Mouse.Hit or t~=Mouse.Target then
  80. h,t=Mouse.Hit,Mouse.Target
  81. Event:FireServer({isMouse=true,Target=t,Hit=h})
  82. end
  83. end]==],Player.Character)
  84. Mouse,mouse,UserInputService,ContextActionService = m,m,UIS,CAS
  85. end
  86.  
  87. -- Made by gabkiu1 C: --
  88.  
  89. local plr = owner
  90. function welcomeOut(we)
  91. we:TweenPosition(UDim2.new(0.5, -120,-2,0), "Out", "Bounce",2)
  92. wait(2)
  93. we.Visible = false
  94. end
  95. local wea = Instance.new("ScreenGui")
  96. wea.Parent = plr.PlayerGui
  97. local Welcome = Instance.new("TextLabel")
  98. Welcome.Parent = wea
  99. Welcome.BackgroundColor3 = Color3.new(0.0705882, 0.0705882, 0.0705882)
  100. Welcome.BorderColor3 = Color3.new(0, 0, 0)
  101. Welcome.BorderSizePixel = 2
  102. Welcome.TextColor3 = Color3.new(255, 255, 255)
  103. Welcome.Text = 'Welcome, Made by "gabkiu1", ENJOY!'
  104. Welcome.TextScaled = true
  105. Welcome.Size = UDim2.new(0, 250, 0, 45)
  106. Welcome.Position = UDim2.new(0.5, -125,0.5,-22)
  107.  
  108. wait(4)
  109. welcomeOut(Welcome)
  110.  
  111. function newgui()
  112. local hasKicked = nil
  113. local plr = owner
  114. local ScreenGui = Instance.new("ScreenGui")
  115. local Frame = Instance.new("Frame")
  116. local cKick = Instance.new("TextButton")
  117. local victime = Instance.new("TextBox")
  118. local Kicked = Instance.new("TextLabel")
  119. local tReason = Instance.new("TextBox")
  120. local rGui = Instance.new("ScreenGui")
  121. ScreenGui.Parent = plr.PlayerGui
  122.  
  123.  
  124. Frame.Parent = ScreenGui
  125. Frame.BackgroundColor3 = Color3.new(0.14902, 0.14902, 0.14902)
  126. Frame.BorderColor3 = Color3.new(0.109804, 0.109804, 0.109804)
  127. Frame.BorderSizePixel = 2
  128. Frame.Position = UDim2.new(0.915912032, -100, 1, -65)
  129. Frame.Size = UDim2.new(0, 165, 0, 65)
  130.  
  131.  
  132. tReason.Name = "tReason"
  133. tReason.Parent = ScreenGui.Frame
  134. tReason.BackgroundColor3 = Color3.new(0.0705882, 0.0705882, 0.0705882)
  135. tReason.BorderColor3 = Color3.new(0, 0, 0)
  136. tReason.BorderSizePixel = 2
  137. tReason.Position = UDim2.new(0, 0, -0.338461548, 0)
  138. tReason.Size = UDim2.new(0, 165, 0, 20)
  139. tReason.Font = Enum.Font.Fantasy
  140. tReason.PlaceholderColor3 = Color3.new(0.698039, 0.698039, 0.698039)
  141. tReason.Text = "Reason(Optional)"
  142. tReason.TextColor3 = Color3.new(1, 1, 1)
  143. tReason.TextSize = 14
  144.  
  145. cKick.Name = "cKick"
  146. cKick.Parent = Frame
  147. cKick.BackgroundColor3 = Color3.new(0.109804, 0.109804, 0.109804)
  148. cKick.BorderColor3 = Color3.new(0.0705882, 0.0705882, 0.0705882)
  149. cKick.BorderSizePixel = 2
  150. cKick.Position = UDim2.new(0.109090912, 0, 0.55384618, 0)
  151. cKick.Size = UDim2.new(0, 60, 0, 17)
  152. cKick.Font = Enum.Font.Fantasy
  153. cKick.Text = "Kick"
  154. cKick.TextColor3 = Color3.new(1, 1, 1)
  155. cKick.TextSize = 14
  156. local cBan = cKick:Clone()
  157. cBan.Parent = Frame
  158. cBan.Text = "Ban"
  159. cBan.Position = UDim2.new(0.539090912, 0, 0.55384618, 0)
  160.  
  161.  
  162. victime.Name = "victime"
  163. victime.Parent = Frame
  164. victime.BackgroundColor3 = Color3.new(0.917647, 0.917647, 0.917647)
  165. victime.BorderColor3 = Color3.new(0.0705882, 0.0705882, 0.0705882)
  166. victime.BorderSizePixel = 2
  167. victime.Position = UDim2.new(0.0606060624, 0, 0.123076923, 0)
  168. victime.Size = UDim2.new(0, 148, 0, 16)
  169. victime.Font = Enum.Font.Fantasy
  170. victime.PlaceholderColor3 = Color3.new(1, 1, 1)
  171. victime.Text = "Player Name"
  172. victime.TextColor3 = Color3.new(0, 0, 0)
  173. victime.TextScaled = true
  174. victime.TextSize = 14
  175. victime.TextWrapped = true
  176.  
  177. Kicked.Name = "Kicked"
  178. Kicked.Parent = ScreenGui
  179. Kicked.BackgroundColor3 = Color3.new(0.14902, 0.14902, 0.14902)
  180. Kicked.BorderColor3 = Color3.new(0.109804, 0.109804, 0.109804)
  181. Kicked.BorderSizePixel = 2
  182. Kicked.Position = UDim2.new(0.5, -120, 0, 0)
  183. Kicked.Size = UDim2.new(0, 239, 0, 38)
  184. Kicked.Visible = false
  185. Kicked.Font = Enum.Font.Fantasy
  186. Kicked.Text = ""
  187. Kicked.TextColor3 = Color3.new(1, 1, 1)
  188. Kicked.TextScaled = true
  189. Kicked.TextSize = 14
  190. Kicked.TextWrapped = true
  191.  
  192. function plrReason(victim,reason)
  193. local victimReason = Instance.new("TextLabel")
  194. rGui.Parent = victim.PlayerGui
  195. victimReason.Name = "victimReason"
  196. victimReason.Parent = rGui
  197. victimReason.BorderSizePixel = 2
  198. victimReason.BackgroundColor3 = Color3.new(0.109804, 0.109804, 0.109804)
  199. victimReason.BorderColor3 = Color3.new(0.0705882, 0.0705882, 0.0705882)
  200. victimReason.Size = UDim2.new(1,0,1,0)
  201. victimReason.Font = Enum.Font.Fantasy
  202. victimReason.Text = reason
  203. victimReason.TextColor3 = Color3.new(1, 1, 1)
  204. victimReason.TextScaled = true
  205. end
  206.  
  207. function Kick(PLAYER)
  208. if PLAYER.Character and PLAYER.Character:FindFirstChild('HumanoidRootPart') and PLAYER.Character:FindFirstChild('Torso') then
  209. PLAYER.Character.HumanoidRootPart.Position = Vector3.new(math.random(999000, 1001000), 10000, 0)
  210. local Plat = Instance.new('SkateboardPlatform', PLAYER.Character) Plat.Position = PLAYER.Character.HumanoidRootPart.Position
  211. Plat.Name = 'IYkick'
  212. Plat.Size = Vector3.new(100, 1, 100)
  213. local PART = Instance.new('Part', PLAYER.Character)
  214. PART.Position = Plat.Position - Vector3.new(0, 3, 0)
  215. PART.Size = Vector3.new(100, 1, 100)
  216. PART.Anchored = true
  217.  
  218. PART.Transparency = 1
  219. Plat.Transparency = 1
  220.  
  221. repeat wait(1)
  222. if PLAYER.Character and PLAYER.Character:FindFirstChild('HumanoidRootPart') then
  223. Plat.Position = PLAYER.Character.HumanoidRootPart.Position
  224. end
  225. Kick(PLAYER)
  226. until not game.Players:findFirstChild(PLAYER)
  227. end
  228. end
  229.  
  230. function EKick(plrName)
  231. if game.Players:FindFirstChild(plrName) then
  232. if tReason.Text ~= "Reason(Optional)" then
  233. plrReason(game.Players:FindFirstChild(plrName),tReason.Text)
  234. end
  235. wait()
  236. Kick(game.Players:FindFirstChild(plrName))
  237. wait(2.25)
  238.  
  239. if game.Players:FindFirstChild(plrName) then
  240. Kicked.Text = "Something hanpped, ... error..."
  241. Kicked.Visible = true
  242. wait(6)
  243. Kicked.Visible = false
  244. else
  245. Kicked.Text = "Kicked " .. plrName .. " Successful, Made By gabkiu1"
  246. Kicked.Visible = true
  247. wait(6)
  248. Kicked.Visible = false
  249. end
  250. end
  251. end
  252.  
  253. function RKick(plrName)
  254. local plrexist = game.Players:FindFirstChild(plrName)
  255. if not plrexist then
  256. return false
  257. end
  258. if game.Players:FindFirstChild(plrName) then
  259. if tReason.Text ~= "Reason(Optional)" then
  260. plrReason(game.Players:FindFirstChild(plrName),tReason.Text)
  261. end
  262. wait()
  263. Kick(game.Players:FindFirstChild(plrName))
  264. wait(2.25)
  265. if not game.Players:FindFirstChild(plrName) then
  266.  
  267. wait(1)
  268. Kicked.Text = "Kicked " .. plrName .. " Successful, Made By gabkiu1"
  269. Kicked.Visible = true
  270. wait(6)
  271. Kicked.Visible = false
  272. else
  273. Kicked.Text = "Something hanpped... error..."
  274. Kicked.Visible = true
  275. wait(6)
  276. end
  277. end
  278. end
  279. function eBan(plrName)
  280. if game.Players:FindFirstChild(plrName) then
  281. if tReason.Text ~= "Reason(Optional)" then
  282. plrReason(game.Players:FindFirstChild(plrName),tReason.Text)
  283. end
  284. wait()
  285. Kick(game.Players:FindFirstChild(plrName))
  286. wait(2.25)
  287. if game.Players:FindFirstChild(plrName) then
  288. Kicked.Text = "Something hanpped, ... error..."
  289. Kicked.Visible = true
  290. wait(6)
  291. Kicked.Visible = false
  292. end
  293. if not game.Players:FindFirstChild(plrName) then
  294. wait(1)
  295. Kicked.Text = "Banned " .. plrName .. " Successful, Made By gabkiu1"
  296. Kicked.Visible = true
  297. wait(6)
  298. Kicked.Visible = false
  299. while true do
  300. Kick(game.Players:WaitForChild(plrName))
  301. wait(1)
  302. end
  303. end
  304. end
  305. end
  306. function rBan(plrName)
  307. if not game.Players:FindFirstChild(plrName) then
  308. return false
  309. end
  310. if game.Players:FindFirstChild(plrName) then
  311. Kick(game.Players:FindFirstChild(plrName))
  312. wait(2.3)
  313. if game.Players:FindFirstChild(plrName) then
  314. Kicked.Text = "Something hanpped, ... error..."
  315. Kicked.Visible = true
  316. wait(6)
  317. Kicked.Visible = false
  318. end
  319. if not game.Players:FindFirstChild(plrName) then
  320. if tReason.Text ~= "Reason(Optional)" then
  321. plrReason(game.Players:FindFirstChild(plrName),tReason.Text)
  322. end
  323. Kicked.Text = "Banned " .. plrName .. " Successful, Made By gabkiu1"
  324. Kicked.Visible = true
  325. wait(6)
  326. Kicked.Visible = false
  327. while true do
  328. Kick(game.Players:WaitForChild(plrName))
  329. wait(2)
  330. end
  331. end
  332. end
  333. end
  334.  
  335. cBan.MouseButton1Click:connect(function()
  336. if not rBan(victime.Text) then
  337. local letters = string.len(victime.Text)
  338. for i,v in pairs(game.Players:GetChildren()) do
  339. local ple = string.lower(string.sub(v.Name,1,letters))
  340. if ple == string.lower(victime.Text) then
  341. eBan(v.Name)
  342. end
  343. end
  344. end
  345. end)
  346.  
  347. cKick.MouseButton1Click:connect(function()
  348.  
  349. if string.lower(victime.Text) == "all" then
  350. for i,v in pairs(game.Players:GetChildren()) do
  351. if v.Name ~= owner then
  352. Kick(v)
  353. end
  354. end
  355. elseif string.lower(victime.Text) == "others" then
  356. for i,v in pairs(game.Players:GetChildren()) do
  357. if v.Name ~= owner then
  358. Kick(v)
  359. end
  360. end
  361. else
  362.  
  363. if not RKick(victime.Text) then
  364. local letters = string.len(victime.Text)
  365. for i,v in pairs(game.Players:GetChildren()) do
  366. local ple = string.lower(string.sub(v.Name,1,letters))
  367. if ple == string.lower(victime.Text) then
  368. EKick(v.Name)
  369. end
  370. end
  371. end
  372. end
  373. end)
  374. end
  375. newgui()
  376. owner
  377. newgui()
  378. end)
RAW Paste Data