yoyo74456

Fake Hacking Gui

Sep 3rd, 2018
126
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.59 KB | None | 0 0
  1. --https://github.com/Mokiros/roblox-FE-compatibility
  2. if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
  3. local Player,Mouse,mouse,UserInputService,ContextActionService = owner
  4. local RealPlayer = Player
  5. do local a=RealPlayer;script.Parent=a.Character;local b=Instance.new("RemoteEvent")b.Name="UserInput_Event"local function c()local d={_fakeEvent=true,Functions={},Connect=function(self,e)table.insert(self.Functions,e)end}d.connect=d.Connect;return d end;local f={Target=nil,Hit=CFrame.new(),KeyUp=c(),KeyDown=c(),Button1Up=c(),Button1Down=c(),Button2Up=c(),Button2Down=c()}local g={InputBegan=c(),InputEnded=c()}local CAS={Actions={},BindAction=function(self,h,i,j,...)CAS.Actions[h]=i and{Name=h,Function=i,Keys={...}}or nil end}CAS.UnbindAction=CAS.BindAction;local function k(self,l,...)local d=f[l]if d and d._fakeEvent then for m,e in pairs(d.Functions)do e(...)end end end;f.TrigEvent=k;g.TrigEvent=k;b.OnServerEvent:Connect(function(n,o)if n~=a then return end;f.Target=o.Target;f.Hit=o.Hit;if not o.isMouse then local p=o.UserInputState==Enum.UserInputState.Begin;if o.UserInputType==Enum.UserInputType.MouseButton1 then return f:TrigEvent(p and"Button1Down"or"Button1Up")end;if o.UserInputType==Enum.UserInputType.MouseButton2 then return f:TrigEvent(p and"Button2Down"or"Button2Up")end;for m,d in pairs(CAS.Actions)do for m,q in pairs(d.Keys)do if q==o.KeyCode then d.Function(d.Name,o.UserInputState,o)end end end;f:TrigEvent(p and"KeyDown"or"KeyUp",o.KeyCode.Name:lower())g:TrigEvent(p and"InputBegan"or"InputEnded",o,false)end end)b.Parent=NLS([==[local a=game:GetService("Players").LocalPlayer;local b=script:WaitForChild("UserInput_Event")local c=a:GetMouse()local d=game:GetService("UserInputService")local e=function(f,g)if g then return end;b:FireServer({KeyCode=f.KeyCode,UserInputType=f.UserInputType,UserInputState=f.UserInputState,Hit=c.Hit,Target=c.Target})end;d.InputBegan:Connect(e)d.InputEnded:Connect(e)local h,i;while wait(1/30)do if h~=c.Hit or i~=c.Target then h,i=c.Hit,c.Target;b:FireServer({isMouse=true,Target=i,Hit=h})end end]==],Player.Character)local r=game;local s={__index=function(self,q)local t=rawget(self,"_RealService")if t then return typeof(t[q])=="function"and function(m,...)return t[q](t,...)end or t[q]end end,__newindex=function(self,q,u)local t=rawget(self,"_RealService")if t then t[q]=u end end}local function v(d,w)d._RealService=typeof(w)=="string"and r:GetService(w)or w;return setmetatable(d,s)end;local x={GetService=function(self,t)return rawget(self,t)or r:GetService(t)end,Players=v({LocalPlayer=v({GetMouse=function(self)return f end},Player)},"Players"),UserInputService=v(g,"UserInputService"),ContextActionService=v(CAS,"ContextActionService"),RunService=v({_btrs={},RenderStepped=r:GetService("RunService").Heartbeat,BindToRenderStep=function(self,h,m,i)self._btrs[h]=self.Heartbeat:Connect(i)end,UnbindFromRenderStep=function(self,h)self._btrs[h]:Disconnect()end},"RunService")}rawset(x.Players,"localPlayer",x.Players.LocalPlayer)x.service=x.GetService;v(x,game)game,owner=x,x.Players.LocalPlayer end
  6. -----------------------------------------------
  7. Player = game:GetService("Players").LocalPlayer
  8. Char = Player.Character
  9. print("Script Done")
  10. Whitelisted = {
  11. "HANdsum"
  12. }
  13. -----------------------------------------------
  14. Player.Chatted:Connect(function(message)
  15. if Player.Name == Player.Name then
  16. if message:sub(1, 2) == "m/" then
  17. local Player = message:sub(3)
  18. if game.workspace:FindFirstChild(Player) ~= nil then
  19. print(message:sub(3).." recieved the message.")
  20. local SG = Instance.new("ScreenGui", game.Players:FindFirstChild(Player).PlayerGui)
  21. local F = Instance.new("Frame", SG)
  22. F.Position = UDim2.new(0.5, -200, 0.5, -75)
  23. F.Size = UDim2.new(0,400,0,150)
  24. F.BackgroundTransparency = 0.5
  25. F.BorderSizePixel = 0
  26. F.BackgroundColor3 = Color3.fromRGB(108, 108, 108)
  27. local TL = Instance.new("TextLabel", F)
  28. TL.Position = UDim2.new(0.5,-100,0.5,-25)
  29. TL.Size = UDim2.new(0,200,0,50)
  30. TL.TextScaled = true
  31. TL.Text = "Loading."
  32. TL.TextColor3 = Color3.fromRGB(0,0,0)
  33. TL.Font = "Code"
  34. TL.BackgroundTransparency = 1
  35. local F2 = Instance.new("Frame", F)
  36. F2.Size = UDim2.new(1,0,0.1,0)
  37. F2.BorderSizePixel = 0
  38. F2.BackgroundColor3 = Color3.fromRGB(0,0,0)
  39. local TL2 = Instance.new("TextLabel", F2)
  40. TL2.BackgroundTransparency = 1
  41. TL2.TextScaled = true
  42. TL2.Text = "HGui V0.2"
  43. TL2.TextColor3 = Color3.fromRGB(255,255,255)
  44. TL2.Font = "Code"
  45. TL2.Size = UDim2.new(0,50,1,0)
  46. local TB = Instance.new("TextButton", F2)
  47. TB.BackgroundColor3 = Color3.fromRGB(108,108,108)
  48. TB.BackgroundTransparency = 0.5
  49. TB.BorderSizePixel = 0
  50. TB.Position = UDim2.new(1,-20,0,0)
  51. TB.Size = UDim2.new(0,20,1,0)
  52. TB.Font = "Code"
  53. TB.Text = "X"
  54. TB.TextColor3 = Color3.fromRGB(0,0,0)
  55. TB.TextScaled = true
  56. local TL3 = Instance.new("TextLabel", F)
  57. TL3.BackgroundTransparency = 1
  58. TL3.Position = UDim2.new(1,-81,1,-10)
  59. TL3.Size = UDim2.new(0,80,0,10)
  60. TL3.Font = "Code"
  61. if message:sub(3) ~= Whitelisted then
  62. TL3.Text = "User blacklisted"
  63. else
  64. TL3.Text = "User whitelisted"
  65. end
  66. TL3.TextScaled = true
  67.  
  68. wait(math.random(10))
  69. F:TweenPosition(UDim2.new(0.5,-200,1.5,-75), 'Out', 'Bounce', 1)
  70. print(message:sub(3).."'s gui has been closed")
  71.  
  72. TB.MouseButton1Click:connect(function()
  73. SG.Enabled = false
  74. print(message:sub(3).." has closed the gui")
  75. end)
  76. end
  77. end
  78. --
  79. end
  80. end)
Add Comment
Please, Sign In to add comment