Advertisement
samuelrichter66

Mlg sunglasses

Jun 17th, 2019
157
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 13.10 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,game,owner = owner,game
  4. local RealPlayer = Player
  5. do
  6. print("FE Compatibility code V2 by Mokiros")
  7. local RealPlayer = RealPlayer
  8. script.Parent = RealPlayer.Character
  9.  
  10. --Fake event to make stuff like Mouse.KeyDown work
  11. local Disconnect_Function = function(this)
  12. this[1].Functions[this[2]] = nil
  13. end
  14. local Disconnect_Metatable = {__index={disconnect=Disconnect_Function,Disconnect=Disconnect_Function}}
  15. local FakeEvent_Metatable = {__index={
  16. Connect = function(this,f)
  17. local i = tostring(math.random(0,10000))
  18. while this.Functions[i] do
  19. i = tostring(math.random(0,10000))
  20. end
  21. this.Functions[i] = f
  22. return setmetatable({this,i},Disconnect_Metatable)
  23. end
  24. }}
  25. FakeEvent_Metatable.__index.connect = FakeEvent_Metatable.__index.Connect
  26. local function fakeEvent()
  27. return setmetatable({Functions={}},FakeEvent_Metatable)
  28. end
  29.  
  30. --Creating fake input objects with fake variables
  31. local FakeMouse = {Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent(),Button2Up=fakeEvent(),Button2Down=fakeEvent()}
  32. FakeMouse.keyUp = FakeMouse.KeyUp
  33. FakeMouse.keyDown = FakeMouse.KeyDown
  34. local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
  35. local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
  36. CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
  37. end}
  38. --Merged 2 functions into one by checking amount of arguments
  39. CAS.UnbindAction = CAS.BindAction
  40.  
  41. --This function will trigger the events that have been :Connect()'ed
  42. local function TriggerEvent(self,ev,...)
  43. for _,f in pairs(self[ev].Functions) do
  44. f(...)
  45. end
  46. end
  47. FakeMouse.TriggerEvent = TriggerEvent
  48. UIS.TriggerEvent = TriggerEvent
  49.  
  50. --Client communication
  51. local Event = Instance.new("RemoteEvent")
  52. Event.Name = "UserInput_Event"
  53. Event.OnServerEvent:Connect(function(plr,io)
  54. if plr~=RealPlayer then return end
  55. FakeMouse.Target = io.Target
  56. FakeMouse.Hit = io.Hit
  57. if not io.isMouse then
  58. local b = io.UserInputState == Enum.UserInputState.Begin
  59. if io.UserInputType == Enum.UserInputType.MouseButton1 then
  60. return FakeMouse:TriggerEvent(b and "Button1Down" or "Button1Up")
  61. end
  62. if io.UserInputType == Enum.UserInputType.MouseButton2 then
  63. return FakeMouse:TriggerEvent(b and "Button2Down" or "Button2Up")
  64. end
  65. for _,t in pairs(CAS.Actions) do
  66. for _,k in pairs(t.Keys) do
  67. if k==io.KeyCode then
  68. t.Function(t.Name,io.UserInputState,io)
  69. end
  70. end
  71. end
  72. FakeMouse:TriggerEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
  73. UIS:TriggerEvent(b and "InputBegan" or "InputEnded",io,false)
  74. end
  75. end)
  76. Event.Parent = NLS([==[local Event = script:WaitForChild("UserInput_Event")
  77. local Mouse = owner:GetMouse()
  78. local UIS = game:GetService("UserInputService")
  79. local input = function(io,RobloxHandled)
  80. if RobloxHandled then return end
  81. --Since InputObject is a client-side instance, we create and pass table instead
  82. Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState,Hit=Mouse.Hit,Target=Mouse.Target})
  83. end
  84. UIS.InputBegan:Connect(input)
  85. UIS.InputEnded:Connect(input)
  86.  
  87. local h,t
  88. --Give the server mouse data every second frame, but only if the values changed
  89. --If player is not moving their mouse, client won't fire events
  90. local HB = game:GetService("RunService").Heartbeat
  91. while true do
  92. if h~=Mouse.Hit or t~=Mouse.Target then
  93. h,t=Mouse.Hit,Mouse.Target
  94. Event:FireServer({isMouse=true,Target=t,Hit=h})
  95. end
  96. --Wait 2 frames
  97. for i=1,2 do
  98. HB:Wait()
  99. end
  100. end]==],script)
  101.  
  102. ----Sandboxed game object that allows the usage of client-side methods and services
  103. --Real game object
  104. local RealGame = game
  105.  
  106. --Metatable for fake service
  107. local FakeService_Metatable = {
  108. __index = function(self,k)
  109. local s = rawget(self,"_RealService")
  110. if s then
  111. return typeof(s[k])=="function"
  112. and function(_,...)return s[k](s,...)end or s[k]
  113. end
  114. end,
  115. __newindex = function(self,k,v)
  116. local s = rawget(self,"_RealService")
  117. if s then s[k]=v end
  118. end
  119. }
  120. local function FakeService(t,RealService)
  121. t._RealService = typeof(RealService)=="string" and RealGame:GetService(RealService) or RealService
  122. return setmetatable(t,FakeService_Metatable)
  123. end
  124.  
  125. --Fake game object
  126. local FakeGame = {
  127. GetService = function(self,s)
  128. return rawget(self,s) or RealGame:GetService(s)
  129. end,
  130. Players = FakeService({
  131. LocalPlayer = FakeService({GetMouse=function(self)return FakeMouse end},Player)
  132. },"Players"),
  133. UserInputService = FakeService(UIS,"UserInputService"),
  134. ContextActionService = FakeService(CAS,"ContextActionService"),
  135. RunService = FakeService({
  136. _btrs = {},
  137. RenderStepped = RealGame:GetService("RunService").Heartbeat,
  138. BindToRenderStep = function(self,name,_,fun)
  139. self._btrs[name] = self.Heartbeat:Connect(fun)
  140. end,
  141. UnbindFromRenderStep = function(self,name)
  142. self._btrs[name]:Disconnect()
  143. end,
  144. },"RunService")
  145. }
  146. rawset(FakeGame.Players,"localPlayer",FakeGame.Players.LocalPlayer)
  147. FakeGame.service = FakeGame.GetService
  148. FakeService(FakeGame,game)
  149. --Changing owner to fake player object to support owner:GetMouse()
  150. game,owner = FakeGame,FakeGame.Players.LocalPlayer
  151. end
  152.  
  153.  
  154.  
  155.  
  156.  
  157.  
  158. --SCP-035 [OBJECT CLASS: KETER]
  159.  
  160. ply = game.Players.LocalPlayer
  161. mouse = ply:GetMouse()
  162. char = ply.Character
  163. cam = game.Workspace.CurrentCamera
  164. minicooldown = 0
  165.  
  166. repeat wait() until ply and char and cam and mouse
  167. state = nil
  168. function create()
  169. tool = Instance.new("Tool", workspace)
  170. tool.Name = "MLG shades"
  171. tool.GripPos = Vector3.new(0, 0, .2)
  172. tool.CanBeDropped = false
  173. handle = Instance.new("Part", tool)
  174. handle.Name = "Handle"
  175. handle.Size = Vector3.new(.5, .5, .5)
  176. handle.CanCollide = true
  177. handle.Anchored = false
  178. handle.CFrame = char.Torso.CFrame
  179. specmesh = Instance.new("SpecialMesh", handle)
  180. specmesh.MeshId = "rbxassetid://121910245"
  181. specmesh.TextureId = "rbxassetid://121947422"
  182. specmesh.Scale = Vector3.new(0.8,0.8,0.8)
  183. bgui = Instance.new("BillboardGui", handle)
  184. bgui.Active = false
  185. bgui.AlwaysOnTop = true
  186. bgui.Enabled = true
  187. bgui.MaxDistance = 100
  188. bgui.Size = UDim2.new(0.5, 0, 0.5, 0)
  189. bgui.SizeOffset = Vector2.new(-20, 5)
  190. bgui.Name = "FrameHolder"
  191. bgui.Adornee = handle
  192. frame = Instance.new("Frame", bgui)
  193. frame.Active = false
  194. frame.BackgroundTransparency = 1
  195. frame.Size = UDim2.new(42, 0, 4, 0)
  196. frame.Name = "Frame"
  197. text = Instance.new("TextLabel", frame)
  198. text.Active = false
  199. text.BackgroundTransparency = 1
  200. text.Size = UDim2.new(1, 0, 1, 0)
  201. text.Visible = true
  202. text.Font = "Antique"
  203. text.TextScaled = true
  204. text.TextSize = 14
  205. text.TextColor3 = Color3.new(255/255, 0/255, 0/255)
  206. text.TextTransparency = 0.5
  207. text.Text = ""
  208.  
  209. cam.CameraSubject = handle
  210. cam.CameraType = "Custom"
  211. char.Parent = nil
  212.  
  213. end
  214.  
  215. create()
  216.  
  217.  
  218. tool.Handle.Touched:connect(function(hit)
  219. print(hit.Parent)
  220. end)
  221.  
  222. store = {}
  223.  
  224. function lerp(a, b, t)
  225. return a:lerp(b, t)
  226. end
  227.  
  228. mouse.KeyDown:connect(function(key)
  229. if key == "f" and tool.Parent:FindFirstChild("Humanoid") then
  230. dir = tool.Parent
  231. if dir.Torso["Right Shoulder"] and state ~= "Possessing" then
  232. minicooldown = 1
  233. state = "Possessing"
  234. handle.Transparency = 1
  235. mask = Instance.new("Part", dir)
  236. mask.Anchored = false
  237. mask.CanCollide = false
  238. mask.Size = Vector3.new(.5, .5, .5)
  239. local mesh = Instance.new("SpecialMesh", mask)
  240. mesh.MeshId = "rbxassetid://121910245"
  241. mesh.TextureId = "rbxassetid://121947422"
  242. mesh.Scale = Vector3.new(0.8,0.8,0.8)
  243. local weldpart = Instance.new("Weld", mask)
  244. weldpart.Part0 = mask
  245. weldpart.Part1 = dir["Right Arm"]
  246. weldpart.C0 = CFrame.new(0, .48, 0) *CFrame.Angles(0, math.rad(25), 0)
  247. weld = Instance.new("Weld", dir.Torso)
  248. weld.Part0 = dir.Torso["Right Shoulder"].Part0
  249. weld.Part1 = dir.Torso["Right Shoulder"].Part1
  250. weld.Name = dir.Torso["Right Shoulder"].Name
  251. weld.C0 = dir.Torso["Right Shoulder"].C0
  252. weld.C1 = dir.Torso["Right Shoulder"].C1
  253. table.insert(store, dir.Torso["Right Shoulder"])
  254. dir.Torso["Right Shoulder"]:Remove()
  255. print(dir.Torso["Right Shoulder"].C0)
  256. for i = 0, 1, .1 do
  257. wait()
  258. weld.C0 = lerp(weld.C0, CFrame.new(1, 0.5, 0, 0, 0, 1, 0, 1, -0, -1, 0, 0) *CFrame.Angles(math.rad(-10), math.rad(85), math.rad(-195)), i)
  259. end
  260. mask2 = Instance.new("Part", dir)
  261. mask2.Anchored = false
  262. mask2.CanCollide = false
  263. mask2.Size = Vector3.new(.5, .5, .5)
  264. local mesh = Instance.new("SpecialMesh", mask2)
  265. mesh.MeshId = "rbxassetid://121910245"
  266. mesh.TextureId = "rbxassetid://121947422"
  267. mesh.Scale = Vector3.new(0.8,0.8,0.8)
  268. local weldparts = Instance.new("Weld", mask2)
  269. weldparts.Part0 = mask2
  270. weldparts.Part1 = dir["Head"]
  271. weldparts.C0 = CFrame.new(0, 0, 0)
  272. mask.Transparency = 1
  273. for i = 0, 1, .1 do
  274. wait()
  275. weld.C0 = lerp(weld.C0, store[1].C0, .1)
  276. end
  277. mask:Remove()
  278. store[1].Parent = weld.Parent
  279. weld:Remove()
  280. store = {}
  281. bgui2 = Instance.new("BillboardGui", mask2)
  282. bgui2.Active = false
  283. bgui2.AlwaysOnTop = true
  284. bgui2.Enabled = true
  285. bgui2.MaxDistance = 100
  286. bgui2.Size = UDim2.new(0.5, 0, 0.5, 0)
  287. bgui2.SizeOffset = Vector2.new(-20, 5)
  288. bgui2.Name = "FrameHolder"
  289. bgui2.Adornee = dir.Head
  290. frame2 = Instance.new("Frame", bgui2)
  291. frame2.Active = false
  292. frame2.BackgroundTransparency = 1
  293. frame2.Size = UDim2.new(42, 0, 4, 0)
  294. frame2.Name = "Frame"
  295. text2 = Instance.new("TextLabel", frame2)
  296. text2.Active = false
  297. text2.BackgroundTransparency = 1
  298. text2.Size = UDim2.new(1, 0, 1, 0)
  299. text2.Visible = true
  300. text2.Font = "Antique"
  301. text2.TextScaled = true
  302. text2.TextSize = 14
  303. text2.TextColor3 = Color3.new(255/255, 0/255, 0/255)
  304. text2.TextTransparency = 0.5
  305. text2.Text = ""
  306. tool.Parent = nil
  307. cam.CameraSubject = dir.Humanoid
  308. dir.Humanoid.MaxHealth = math.huge
  309. char.Parent = workspace
  310. for i, v in pairs(char:GetChildren()) do
  311. if v:IsA("Part") or v:IsA("MeshPart") then
  312. v.Transparency = 1
  313. end
  314. end
  315.  
  316. dir.Humanoid.WalkSpeed = 0
  317. dir.Humanoid.JumpPower = 0
  318. dir.Humanoid.PlatformStand = true
  319. weld1 = Instance.new("Weld", char.Torso)
  320. weld1.Part0 = char.Torso
  321. weld1.Part1 = dir.Torso
  322. weld1.C0 = CFrame.new(0, 0, 0)
  323. weld2 = Instance.new("Weld", char.Torso)
  324. weld2.Part0 = char["Right Arm"]
  325. weld2.Part1 = dir["Right Arm"]
  326. weld2.C0 = CFrame.new(0, 0, 0)
  327. weld3 = Instance.new("Weld", char.Torso)
  328. weld3.Part0 = char["Left Arm"]
  329. weld3.Part1 = dir["Left Arm"]
  330. weld3.C0 = CFrame.new(0, 0, 0)
  331. weld4 = Instance.new("Weld", char.Torso)
  332. weld4.Part0 = char["Left Leg"]
  333. weld4.Part1 = dir["Left Leg"]
  334. weld4.C0 = CFrame.new(0, 0, 0)
  335. weld5 = Instance.new("Weld", char.Torso)
  336. weld5.Part0 = char["Right Leg"]
  337. weld5.Part1 = dir["Right Leg"]
  338. weld5.C0 = CFrame.new(0, 0, 0)
  339. weld5 = Instance.new("Weld", char.Torso)
  340. weld5.Part0 = char.Head
  341. weld5.Part1 = dir.Head
  342. weld5.C0 = CFrame.new(0, 0, 0)
  343. if dir:FindFirstChild("HumanoidRootPart") ~= nil then
  344. weld6 = Instance.new("Weld", char.Torso)
  345. weld6.Part0 = char.HumanoidRootPart
  346. weld6.Part1 = dir.HumanoidRootPart
  347. weld6.C0 = CFrame.new(0, 0, 0)
  348. end
  349. for i, v in pairs(dir:GetChildren()) do
  350. if v:IsA("Part") or v:IsA("MeshPart") then
  351. v.CanCollide = false
  352. end
  353. end
  354. char.Humanoid.MaxHealth = math.huge
  355. minicooldown = 2
  356. end
  357. elseif key == "g" and state == "Possessing" and minicooldown == 2 then
  358. state = nil
  359. weld1:Remove()
  360. weld2:Remove()
  361. weld3:Remove()
  362. weld4:Remove()
  363. weld5:Remove()
  364. if weld6 ~= nil then
  365. weld6:Remove()
  366. end
  367. tool.Parent = workspace
  368. tool.Handle.CanCollide = true
  369. tool.Handle.Transparency = 0
  370. tool.Handle.CFrame = char.Torso.CFrame *CFrame.new(0, 0, -3)
  371. cam.CameraSubject = tool.Handle
  372. local pos = char.Torso.CFrame
  373. char.Parent = nil
  374. minicooldown = 0
  375. for i, v in pairs(dir:GetChildren()) do
  376. if v:IsA("Part") or v:IsA("MeshPart") then
  377. v.BrickColor = BrickColor.new("Really black")
  378. end
  379. end
  380. dir:BreakJoints()
  381. local blackblood = Instance.new("Part", dir)
  382. blackblood.Anchored = true
  383. blackblood.BrickColor = BrickColor.new("Really black")
  384. blackblood.Size = Vector3.new(0.05, 1, 1)
  385. blackblood.Shape = "Cylinder"
  386. blackblood.CanCollide = false
  387. blackblood.CFrame = CFrame.new(pos.X, pos.Y-2.95, pos.Z)
  388. blackblood.Orientation = Vector3.new(0, 90, 90)
  389. for i = 1, 100 do
  390. wait()
  391. blackblood.Orientation = Vector3.new(0, 90, 90)
  392. blackblood.Size = blackblood.Size +Vector3.new(0, .1, .1)
  393. end
  394. end
  395. end)
  396.  
  397.  
  398. ply.Chatted:connect(function(msg)
  399. if msg and state ~= "Possessing" then
  400. for i = 1, string.len(msg) do
  401. wait()
  402. text.Text = string.sub(msg, 1, i)
  403. end
  404. wait(2)
  405. text.Text = ""
  406. elseif msg and state == "Possessing" then
  407. for i = 1, string.len(msg) do
  408. wait()
  409. text2.Text = string.sub(msg, 1, i)
  410. end
  411. wait(2)
  412. text2.Text = ""
  413. end
  414. end)
  415.  
  416. game:GetService("RunService").RenderStepped:connect(function()
  417. end)
  418.  
  419. game.Players.PlayerRemoving:connect(function(playr)
  420. if playr.Name == "w3w123ALT" then
  421. tool:Remove()
  422. end
  423. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement