Advertisement
ghostteen14

Untitled

Jun 13th, 2019
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 13.39 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. Script made by ???
  154. Edit by weepinggamer
  155. weeping's discord: Nick Senpai#7972
  156.  
  157. If you found this by searching on paste plz check out my
  158. channel "ColapyXD" for more of this content
  159.  
  160. Thank you
  161. ---------------------------------------------------
  162.  
  163. --SCP-035 [OBJECT CLASS: KETER]
  164.  
  165. ply = game.Players.LocalPlayer
  166. mouse = ply:GetMouse()
  167. char = ply.Character
  168. cam = game.Workspace.CurrentCamera
  169. minicooldown = 0
  170.  
  171. repeat wait() until ply and char and cam and mouse
  172. state = nil
  173. function create()
  174. tool = Instance.new("Tool", workspace)
  175. tool.Name = "MLG shades"
  176. tool.GripPos = Vector3.new(0, 0, .2)
  177. tool.CanBeDropped = false
  178. handle = Instance.new("Part", tool)
  179. handle.Name = "Handle"
  180. handle.Size = Vector3.new(.5, .5, .5)
  181. handle.CanCollide = true
  182. handle.Anchored = false
  183. handle.CFrame = char.Torso.CFrame
  184. specmesh = Instance.new("SpecialMesh", handle)
  185. specmesh.MeshId = "rbxassetid://121910245"
  186. specmesh.TextureId = "rbxassetid://121947422"
  187. specmesh.Scale = Vector3.new(0.8,0.8,0.8)
  188. bgui = Instance.new("BillboardGui", handle)
  189. bgui.Active = false
  190. bgui.AlwaysOnTop = true
  191. bgui.Enabled = true
  192. bgui.MaxDistance = 100
  193. bgui.Size = UDim2.new(0.5, 0, 0.5, 0)
  194. bgui.SizeOffset = Vector2.new(-20, 5)
  195. bgui.Name = "FrameHolder"
  196. bgui.Adornee = handle
  197. frame = Instance.new("Frame", bgui)
  198. frame.Active = false
  199. frame.BackgroundTransparency = 1
  200. frame.Size = UDim2.new(42, 0, 4, 0)
  201. frame.Name = "Frame"
  202. text = Instance.new("TextLabel", frame)
  203. text.Active = false
  204. text.BackgroundTransparency = 1
  205. text.Size = UDim2.new(1, 0, 1, 0)
  206. text.Visible = true
  207. text.Font = "Antique"
  208. text.TextScaled = true
  209. text.TextSize = 14
  210. text.TextColor3 = Color3.new(255/255, 0/255, 0/255)
  211. text.TextTransparency = 0.5
  212. text.Text = ""
  213.  
  214. cam.CameraSubject = handle
  215. cam.CameraType = "Custom"
  216. char.Parent = nil
  217.  
  218. end
  219.  
  220. create()
  221.  
  222.  
  223. tool.Handle.Touched:connect(function(hit)
  224. print(hit.Parent)
  225. end)
  226.  
  227. store = {}
  228.  
  229. function lerp(a, b, t)
  230. return a:lerp(b, t)
  231. end
  232.  
  233. mouse.KeyDown:connect(function(key)
  234. if key == "f" and tool.Parent:FindFirstChild("Humanoid") then
  235. dir = tool.Parent
  236. if dir.Torso["Right Shoulder"] and state ~= "Possessing" then
  237. minicooldown = 1
  238. state = "Possessing"
  239. handle.Transparency = 1
  240. mask = Instance.new("Part", dir)
  241. mask.Anchored = false
  242. mask.CanCollide = false
  243. mask.Size = Vector3.new(.5, .5, .5)
  244. local mesh = Instance.new("SpecialMesh", mask)
  245. mesh.MeshId = "rbxassetid://121910245"
  246. mesh.TextureId = "rbxassetid://121947422"
  247. mesh.Scale = Vector3.new(0.8,0.8,0.8)
  248. local weldpart = Instance.new("Weld", mask)
  249. weldpart.Part0 = mask
  250. weldpart.Part1 = dir["Right Arm"]
  251. weldpart.C0 = CFrame.new(0, .48, 0) *CFrame.Angles(0, math.rad(25), 0)
  252. weld = Instance.new("Weld", dir.Torso)
  253. weld.Part0 = dir.Torso["Right Shoulder"].Part0
  254. weld.Part1 = dir.Torso["Right Shoulder"].Part1
  255. weld.Name = dir.Torso["Right Shoulder"].Name
  256. weld.C0 = dir.Torso["Right Shoulder"].C0
  257. weld.C1 = dir.Torso["Right Shoulder"].C1
  258. table.insert(store, dir.Torso["Right Shoulder"])
  259. dir.Torso["Right Shoulder"]:Remove()
  260. print(dir.Torso["Right Shoulder"].C0)
  261. for i = 0, 1, .1 do
  262. wait()
  263. 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)
  264. end
  265. mask2 = Instance.new("Part", dir)
  266. mask2.Anchored = false
  267. mask2.CanCollide = false
  268. mask2.Size = Vector3.new(.5, .5, .5)
  269. local mesh = Instance.new("SpecialMesh", mask2)
  270. mesh.MeshId = "rbxassetid://121910245"
  271. mesh.TextureId = "rbxassetid://121947422"
  272. mesh.Scale = Vector3.new(0.8,0.8,0.8)
  273. local weldparts = Instance.new("Weld", mask2)
  274. weldparts.Part0 = mask2
  275. weldparts.Part1 = dir["Head"]
  276. weldparts.C0 = CFrame.new(0, 0, 0)
  277. mask.Transparency = 1
  278. for i = 0, 1, .1 do
  279. wait()
  280. weld.C0 = lerp(weld.C0, store[1].C0, .1)
  281. end
  282. mask:Remove()
  283. store[1].Parent = weld.Parent
  284. weld:Remove()
  285. store = {}
  286. bgui2 = Instance.new("BillboardGui", mask2)
  287. bgui2.Active = false
  288. bgui2.AlwaysOnTop = true
  289. bgui2.Enabled = true
  290. bgui2.MaxDistance = 100
  291. bgui2.Size = UDim2.new(0.5, 0, 0.5, 0)
  292. bgui2.SizeOffset = Vector2.new(-20, 5)
  293. bgui2.Name = "FrameHolder"
  294. bgui2.Adornee = dir.Head
  295. frame2 = Instance.new("Frame", bgui2)
  296. frame2.Active = false
  297. frame2.BackgroundTransparency = 1
  298. frame2.Size = UDim2.new(42, 0, 4, 0)
  299. frame2.Name = "Frame"
  300. text2 = Instance.new("TextLabel", frame2)
  301. text2.Active = false
  302. text2.BackgroundTransparency = 1
  303. text2.Size = UDim2.new(1, 0, 1, 0)
  304. text2.Visible = true
  305. text2.Font = "Antique"
  306. text2.TextScaled = true
  307. text2.TextSize = 14
  308. text2.TextColor3 = Color3.new(255/255, 0/255, 0/255)
  309. text2.TextTransparency = 0.5
  310. text2.Text = ""
  311. tool.Parent = nil
  312. cam.CameraSubject = dir.Humanoid
  313. dir.Humanoid.MaxHealth = math.huge
  314. char.Parent = workspace
  315. for i, v in pairs(char:GetChildren()) do
  316. if v:IsA("Part") or v:IsA("MeshPart") then
  317. v.Transparency = 1
  318. end
  319. end
  320.  
  321. dir.Humanoid.WalkSpeed = 0
  322. dir.Humanoid.JumpPower = 0
  323. dir.Humanoid.PlatformStand = true
  324. weld1 = Instance.new("Weld", char.Torso)
  325. weld1.Part0 = char.Torso
  326. weld1.Part1 = dir.Torso
  327. weld1.C0 = CFrame.new(0, 0, 0)
  328. weld2 = Instance.new("Weld", char.Torso)
  329. weld2.Part0 = char["Right Arm"]
  330. weld2.Part1 = dir["Right Arm"]
  331. weld2.C0 = CFrame.new(0, 0, 0)
  332. weld3 = Instance.new("Weld", char.Torso)
  333. weld3.Part0 = char["Left Arm"]
  334. weld3.Part1 = dir["Left Arm"]
  335. weld3.C0 = CFrame.new(0, 0, 0)
  336. weld4 = Instance.new("Weld", char.Torso)
  337. weld4.Part0 = char["Left Leg"]
  338. weld4.Part1 = dir["Left Leg"]
  339. weld4.C0 = CFrame.new(0, 0, 0)
  340. weld5 = Instance.new("Weld", char.Torso)
  341. weld5.Part0 = char["Right Leg"]
  342. weld5.Part1 = dir["Right Leg"]
  343. weld5.C0 = CFrame.new(0, 0, 0)
  344. weld5 = Instance.new("Weld", char.Torso)
  345. weld5.Part0 = char.Head
  346. weld5.Part1 = dir.Head
  347. weld5.C0 = CFrame.new(0, 0, 0)
  348. if dir:FindFirstChild("HumanoidRootPart") ~= nil then
  349. weld6 = Instance.new("Weld", char.Torso)
  350. weld6.Part0 = char.HumanoidRootPart
  351. weld6.Part1 = dir.HumanoidRootPart
  352. weld6.C0 = CFrame.new(0, 0, 0)
  353. end
  354. for i, v in pairs(dir:GetChildren()) do
  355. if v:IsA("Part") or v:IsA("MeshPart") then
  356. v.CanCollide = false
  357. end
  358. end
  359. char.Humanoid.MaxHealth = math.huge
  360. minicooldown = 2
  361. end
  362. elseif key == "g" and state == "Possessing" and minicooldown == 2 then
  363. state = nil
  364. weld1:Remove()
  365. weld2:Remove()
  366. weld3:Remove()
  367. weld4:Remove()
  368. weld5:Remove()
  369. if weld6 ~= nil then
  370. weld6:Remove()
  371. end
  372. tool.Parent = workspace
  373. tool.Handle.CanCollide = true
  374. tool.Handle.Transparency = 0
  375. tool.Handle.CFrame = char.Torso.CFrame *CFrame.new(0, 0, -3)
  376. cam.CameraSubject = tool.Handle
  377. local pos = char.Torso.CFrame
  378. char.Parent = nil
  379. minicooldown = 0
  380. for i, v in pairs(dir:GetChildren()) do
  381. if v:IsA("Part") or v:IsA("MeshPart") then
  382. v.BrickColor = BrickColor.new("Really black")
  383. end
  384. end
  385. dir:BreakJoints()
  386. local blackblood = Instance.new("Part", dir)
  387. blackblood.Anchored = true
  388. blackblood.BrickColor = BrickColor.new("Really black")
  389. blackblood.Size = Vector3.new(0.05, 1, 1)
  390. blackblood.Shape = "Cylinder"
  391. blackblood.CanCollide = false
  392. blackblood.CFrame = CFrame.new(pos.X, pos.Y-2.95, pos.Z)
  393. blackblood.Orientation = Vector3.new(0, 90, 90)
  394. for i = 1, 100 do
  395. wait()
  396. blackblood.Orientation = Vector3.new(0, 90, 90)
  397. blackblood.Size = blackblood.Size +Vector3.new(0, .1, .1)
  398. end
  399. end
  400. end)
  401.  
  402.  
  403. ply.Chatted:connect(function(msg)
  404. if msg and state ~= "Possessing" then
  405. for i = 1, string.len(msg) do
  406. wait()
  407. text.Text = string.sub(msg, 1, i)
  408. end
  409. wait(2)
  410. text.Text = ""
  411. elseif msg and state == "Possessing" then
  412. for i = 1, string.len(msg) do
  413. wait()
  414. text2.Text = string.sub(msg, 1, i)
  415. end
  416. wait(2)
  417. text2.Text = ""
  418. end
  419. end)
  420.  
  421. game:GetService("RunService").RenderStepped:connect(function()
  422. end)
  423.  
  424. game.Players.PlayerRemoving:connect(function(playr)
  425. if playr.Name == "w3w123ALT" then
  426. tool:Remove()
  427. end
  428. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement