scriptshocasereditor

Untitled

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