Advertisement
Manaphy2100idk

Untitled

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