Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --https://github.com/Mokiros/roblox-FE-compatibility
- if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
- local Player,game,owner = owner,game
- local RealPlayer = Player
- do
- print("FE Compatibility code V2 by Mokiros")
- local RealPlayer = RealPlayer
- script.Parent = RealPlayer.Character
- --Fake event to make stuff like Mouse.KeyDown work
- local Disconnect_Function = function(this)
- this[1].Functions[this[2]] = nil
- end
- local Disconnect_Metatable = {__index={disconnect=Disconnect_Function,Disconnect=Disconnect_Function}}
- local FakeEvent_Metatable = {__index={
- Connect = function(this,f)
- local i = tostring(math.random(0,10000))
- while this.Functions[i] do
- i = tostring(math.random(0,10000))
- end
- this.Functions[i] = f
- return setmetatable({this,i},Disconnect_Metatable)
- end
- }}
- FakeEvent_Metatable.__index.connect = FakeEvent_Metatable.__index.Connect
- local function fakeEvent()
- return setmetatable({Functions={}},FakeEvent_Metatable)
- end
- --Creating fake input objects with fake variables
- local FakeMouse = {Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent(),Button2Up=fakeEvent(),Button2Down=fakeEvent()}
- FakeMouse.keyUp = FakeMouse.KeyUp
- FakeMouse.keyDown = FakeMouse.KeyDown
- local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
- local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
- CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
- end}
- --Merged 2 functions into one by checking amount of arguments
- CAS.UnbindAction = CAS.BindAction
- --This function will trigger the events that have been :Connect()'ed
- local function TriggerEvent(self,ev,...)
- for _,f in pairs(self[ev].Functions) do
- f(...)
- end
- end
- FakeMouse.TriggerEvent = TriggerEvent
- UIS.TriggerEvent = TriggerEvent
- --Client communication
- local Event = Instance.new("RemoteEvent")
- Event.Name = "UserInput_Event"
- Event.OnServerEvent:Connect(function(plr,io)
- if plr~=RealPlayer then return end
- FakeMouse.Target = io.Target
- FakeMouse.Hit = io.Hit
- if not io.isMouse then
- local b = io.UserInputState == Enum.UserInputState.Begin
- if io.UserInputType == Enum.UserInputType.MouseButton1 then
- return FakeMouse:TriggerEvent(b and "Button1Down" or "Button1Up")
- end
- if io.UserInputType == Enum.UserInputType.MouseButton2 then
- return FakeMouse:TriggerEvent(b and "Button2Down" or "Button2Up")
- end
- for _,t in pairs(CAS.Actions) do
- for _,k in pairs(t.Keys) do
- if k==io.KeyCode then
- t.Function(t.Name,io.UserInputState,io)
- end
- end
- end
- FakeMouse:TriggerEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
- UIS:TriggerEvent(b and "InputBegan" or "InputEnded",io,false)
- end
- end)
- Event.Parent = NLS([==[local Event = script:WaitForChild("UserInput_Event")
- local Mouse = owner:GetMouse()
- local UIS = game:GetService("UserInputService")
- local input = function(io,RobloxHandled)
- if RobloxHandled then return end
- --Since InputObject is a client-side instance, we create and pass table instead
- Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState,Hit=Mouse.Hit,Target=Mouse.Target})
- end
- UIS.InputBegan:Connect(input)
- UIS.InputEnded:Connect(input)
- local h,t
- --Give the server mouse data every second frame, but only if the values changed
- --If player is not moving their mouse, client won't fire events
- local HB = game:GetService("RunService").Heartbeat
- while true do
- if h~=Mouse.Hit or t~=Mouse.Target then
- h,t=Mouse.Hit,Mouse.Target
- Event:FireServer({isMouse=true,Target=t,Hit=h})
- end
- --Wait 2 frames
- for i=1,2 do
- HB:Wait()
- end
- end]==],script)
- ----Sandboxed game object that allows the usage of client-side methods and services
- --Real game object
- local RealGame = game
- --Metatable for fake service
- local FakeService_Metatable = {
- __index = function(self,k)
- local s = rawget(self,"_RealService")
- if s then
- return typeof(s[k])=="function"
- and function(_,...)return s[k](s,...)end or s[k]
- end
- end,
- __newindex = function(self,k,v)
- local s = rawget(self,"_RealService")
- if s then s[k]=v end
- end
- }
- local function FakeService(t,RealService)
- t._RealService = typeof(RealService)=="string" and RealGame:GetService(RealService) or RealService
- return setmetatable(t,FakeService_Metatable)
- end
- --Fake game object
- local FakeGame = {
- GetService = function(self,s)
- return rawget(self,s) or RealGame:GetService(s)
- end,
- Players = FakeService({
- LocalPlayer = FakeService({GetMouse=function(self)return FakeMouse end},Player)
- },"Players"),
- UserInputService = FakeService(UIS,"UserInputService"),
- ContextActionService = FakeService(CAS,"ContextActionService"),
- RunService = FakeService({
- _btrs = {},
- RenderStepped = RealGame:GetService("RunService").Heartbeat,
- BindToRenderStep = function(self,name,_,fun)
- self._btrs[name] = self.Heartbeat:Connect(fun)
- end,
- UnbindFromRenderStep = function(self,name)
- self._btrs[name]:Disconnect()
- end,
- },"RunService")
- }
- rawset(FakeGame.Players,"localPlayer",FakeGame.Players.LocalPlayer)
- FakeGame.service = FakeGame.GetService
- FakeService(FakeGame,game)
- --Changing owner to fake player object to support owner:GetMouse()
- game,owner = FakeGame,FakeGame.Players.LocalPlayer
- end
- -- Made by gabkiu1 C: --
- local plr = game.Players.LocalPlayer
- function welcomeOut(we)
- we:TweenPosition(UDim2.new(0.5, -120,-2,0), "Out", "Bounce",2)
- wait(2)
- we.Visible = false
- end
- local wea = Instance.new("ScreenGui")
- wea.Parent = plr.PlayerGui
- local Welcome = Instance.new("TextLabel")
- Welcome.Parent = wea
- Welcome.BackgroundColor3 = Color3.new(0.0705882, 0.0705882, 0.0705882)
- Welcome.BorderColor3 = Color3.new(0, 0, 0)
- Welcome.BorderSizePixel = 2
- Welcome.TextColor3 = Color3.new(255, 255, 255)
- Welcome.Text = 'Welcome, Made by "gabkiu1", ENJOY!'
- Welcome.TextScaled = true
- Welcome.Size = UDim2.new(0, 250, 0, 45)
- Welcome.Position = UDim2.new(0.5, -125,0.5,-22)
- wait(4)
- welcomeOut(Welcome)
- function newgui()
- local hasKicked = nil
- local plr = game.Players.LocalPlayer
- local ScreenGui = Instance.new("ScreenGui")
- local Frame = Instance.new("Frame")
- local cKick = Instance.new("TextButton")
- local victime = Instance.new("TextBox")
- local Kicked = Instance.new("TextLabel")
- local tReason = Instance.new("TextBox")
- local rGui = Instance.new("ScreenGui")
- ScreenGui.Parent = plr.PlayerGui
- Frame.Parent = ScreenGui
- Frame.BackgroundColor3 = Color3.new(0.14902, 0.14902, 0.14902)
- Frame.BorderColor3 = Color3.new(0.109804, 0.109804, 0.109804)
- Frame.BorderSizePixel = 2
- Frame.Position = UDim2.new(0.915912032, -100, 1, -65)
- Frame.Size = UDim2.new(0, 165, 0, 65)
- tReason.Name = "tReason"
- tReason.Parent = ScreenGui.Frame
- tReason.BackgroundColor3 = Color3.new(0.0705882, 0.0705882, 0.0705882)
- tReason.BorderColor3 = Color3.new(0, 0, 0)
- tReason.BorderSizePixel = 2
- tReason.Position = UDim2.new(0, 0, -0.338461548, 0)
- tReason.Size = UDim2.new(0, 165, 0, 20)
- tReason.Font = Enum.Font.Fantasy
- tReason.PlaceholderColor3 = Color3.new(0.698039, 0.698039, 0.698039)
- tReason.Text = "Reason(Optional)"
- tReason.TextColor3 = Color3.new(1, 1, 1)
- tReason.TextSize = 14
- cKick.Name = "cKick"
- cKick.Parent = Frame
- cKick.BackgroundColor3 = Color3.new(0.109804, 0.109804, 0.109804)
- cKick.BorderColor3 = Color3.new(0.0705882, 0.0705882, 0.0705882)
- cKick.BorderSizePixel = 2
- cKick.Position = UDim2.new(0.109090912, 0, 0.55384618, 0)
- cKick.Size = UDim2.new(0, 60, 0, 17)
- cKick.Font = Enum.Font.Fantasy
- cKick.Text = "Kick"
- cKick.TextColor3 = Color3.new(1, 1, 1)
- cKick.TextSize = 14
- local cBan = cKick:Clone()
- cBan.Parent = Frame
- cBan.Text = "Ban"
- cBan.Position = UDim2.new(0.539090912, 0, 0.55384618, 0)
- victime.Name = "victime"
- victime.Parent = Frame
- victime.BackgroundColor3 = Color3.new(0.917647, 0.917647, 0.917647)
- victime.BorderColor3 = Color3.new(0.0705882, 0.0705882, 0.0705882)
- victime.BorderSizePixel = 2
- victime.Position = UDim2.new(0.0606060624, 0, 0.123076923, 0)
- victime.Size = UDim2.new(0, 148, 0, 16)
- victime.Font = Enum.Font.Fantasy
- victime.PlaceholderColor3 = Color3.new(1, 1, 1)
- victime.Text = "Player Name"
- victime.TextColor3 = Color3.new(0, 0, 0)
- victime.TextScaled = true
- victime.TextSize = 14
- victime.TextWrapped = true
- Kicked.Name = "Kicked"
- Kicked.Parent = ScreenGui
- Kicked.BackgroundColor3 = Color3.new(0.14902, 0.14902, 0.14902)
- Kicked.BorderColor3 = Color3.new(0.109804, 0.109804, 0.109804)
- Kicked.BorderSizePixel = 2
- Kicked.Position = UDim2.new(0.5, -120, 0, 0)
- Kicked.Size = UDim2.new(0, 239, 0, 38)
- Kicked.Visible = false
- Kicked.Font = Enum.Font.Fantasy
- Kicked.Text = ""
- Kicked.TextColor3 = Color3.new(1, 1, 1)
- Kicked.TextScaled = true
- Kicked.TextSize = 14
- Kicked.TextWrapped = true
- function plrReason(victim,reason)
- local victimReason = Instance.new("TextLabel")
- rGui.Parent = victim.PlayerGui
- victimReason.Name = "victimReason"
- victimReason.Parent = rGui
- victimReason.BorderSizePixel = 2
- victimReason.BackgroundColor3 = Color3.new(0.109804, 0.109804, 0.109804)
- victimReason.BorderColor3 = Color3.new(0.0705882, 0.0705882, 0.0705882)
- victimReason.Size = UDim2.new(1,0,1,0)
- victimReason.Font = Enum.Font.Fantasy
- victimReason.Text = reason
- victimReason.TextColor3 = Color3.new(1, 1, 1)
- victimReason.TextScaled = true
- end
- function Kick(PLAYER)
- if PLAYER.Character and PLAYER.Character:FindFirstChild('HumanoidRootPart') and PLAYER.Character:FindFirstChild('Torso') then
- PLAYER.Character.HumanoidRootPart.Position = Vector3.new(math.random(999000, 1001000), 10000, 0)
- local Plat = Instance.new('SkateboardPlatform', PLAYER.Character) Plat.Position = PLAYER.Character.HumanoidRootPart.Position
- Plat.Name = 'IYkick'
- Plat.Size = Vector3.new(100, 1, 100)
- local PART = Instance.new('Part', PLAYER.Character)
- PART.Position = Plat.Position - Vector3.new(0, 3, 0)
- PART.Size = Vector3.new(100, 1, 100)
- PART.Anchored = true
- PART.Transparency = 1
- Plat.Transparency = 1
- repeat wait(1)
- if PLAYER.Character and PLAYER.Character:FindFirstChild('HumanoidRootPart') then
- Plat.Position = PLAYER.Character.HumanoidRootPart.Position
- end
- Kick(PLAYER)
- until not game.Players:findFirstChild(PLAYER)
- end
- end
- function EKick(plrName)
- if game.Players:FindFirstChild(plrName) then
- if tReason.Text ~= "Reason(Optional)" then
- plrReason(game.Players:FindFirstChild(plrName),tReason.Text)
- end
- wait()
- Kick(game.Players:FindFirstChild(plrName))
- wait(2.25)
- if game.Players:FindFirstChild(plrName) then
- Kicked.Text = "Something hanpped, ... error..."
- Kicked.Visible = true
- wait(6)
- Kicked.Visible = false
- else
- Kicked.Text = "Kicked " .. plrName .. " Successful, Made By gabkiu1"
- Kicked.Visible = true
- wait(6)
- Kicked.Visible = false
- end
- end
- end
- function RKick(plrName)
- local plrexist = game.Players:FindFirstChild(plrName)
- if not plrexist then
- return false
- end
- if game.Players:FindFirstChild(plrName) then
- if tReason.Text ~= "Reason(Optional)" then
- plrReason(game.Players:FindFirstChild(plrName),tReason.Text)
- end
- wait()
- Kick(game.Players:FindFirstChild(plrName))
- wait(2.25)
- if not game.Players:FindFirstChild(plrName) then
- wait(1)
- Kicked.Text = "Kicked " .. plrName .. " Successful, Made By gabkiu1"
- Kicked.Visible = true
- wait(6)
- Kicked.Visible = false
- else
- Kicked.Text = "Something hanpped... error..."
- Kicked.Visible = true
- wait(6)
- end
- end
- end
- function eBan(plrName)
- if game.Players:FindFirstChild(plrName) then
- if tReason.Text ~= "Reason(Optional)" then
- plrReason(game.Players:FindFirstChild(plrName),tReason.Text)
- end
- wait()
- Kick(game.Players:FindFirstChild(plrName))
- wait(2.25)
- if game.Players:FindFirstChild(plrName) then
- Kicked.Text = "Something hanpped, ... error..."
- Kicked.Visible = true
- wait(6)
- Kicked.Visible = false
- end
- if not game.Players:FindFirstChild(plrName) then
- wait(1)
- Kicked.Text = "Banned " .. plrName .. " Successful, Made By gabkiu1"
- Kicked.Visible = true
- wait(6)
- Kicked.Visible = false
- while true do
- Kick(game.Players:WaitForChild(plrName))
- wait(1)
- end
- end
- end
- end
- function rBan(plrName)
- if not game.Players:FindFirstChild(plrName) then
- return false
- end
- if game.Players:FindFirstChild(plrName) then
- Kick(game.Players:FindFirstChild(plrName))
- wait(2.3)
- if game.Players:FindFirstChild(plrName) then
- Kicked.Text = "Something hanpped, ... error..."
- Kicked.Visible = true
- wait(6)
- Kicked.Visible = false
- end
- if not game.Players:FindFirstChild(plrName) then
- if tReason.Text ~= "Reason(Optional)" then
- plrReason(game.Players:FindFirstChild(plrName),tReason.Text)
- end
- Kicked.Text = "Banned " .. plrName .. " Successful, Made By gabkiu1"
- Kicked.Visible = true
- wait(6)
- Kicked.Visible = false
- while true do
- Kick(game.Players:WaitForChild(plrName))
- wait(2)
- end
- end
- end
- end
- cBan.MouseButton1Click:connect(function()
- if not rBan(victime.Text) then
- local letters = string.len(victime.Text)
- for i,v in pairs(game.Players:GetChildren()) do
- local ple = string.lower(string.sub(v.Name,1,letters))
- if ple == string.lower(victime.Text) then
- eBan(v.Name)
- end
- end
- end
- end)
- cKick.MouseButton1Click:connect(function()
- if string.lower(victime.Text) == "all" then
- for i,v in pairs(game.Players:GetChildren()) do
- if v.Name ~= game.Players.LocalPlayer.Name then
- Kick(v)
- end
- end
- elseif string.lower(victime.Text) == "others" then
- for i,v in pairs(game.Players:GetChildren()) do
- if v.Name ~= game.Players.LocalPlayer.Name then
- Kick(v)
- end
- end
- else
- if not RKick(victime.Text) then
- local letters = string.len(victime.Text)
- for i,v in pairs(game.Players:GetChildren()) do
- local ple = string.lower(string.sub(v.Name,1,letters))
- if ple == string.lower(victime.Text) then
- EKick(v.Name)
- end
- end
- end
- end
- end)
- end
- newgui()
- game.Players.LocalPlayer.CharacterAdded:connect(function()
- newgui()
- end)
Add Comment
Please, Sign In to add comment