Advertisement
AsukaOS

Fe Hanger

Sep 21st, 2018
297
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 16.49 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 by Mokiros")
  7. local rp = RealPlayer
  8. script.Parent = rp.Character
  9.  
  10. --RemoteEvent for communicating
  11. local Event = Instance.new("RemoteEvent")
  12. Event.Name = "UserInput_Event"
  13.  
  14. --Fake event to make stuff like Mouse.KeyDown work
  15. local function fakeEvent()
  16. local t = {_fakeEvent=true,Functions={},Connect=function(self,f)table.insert(self.Functions,f) end}
  17. t.connect = t.Connect
  18. return t
  19. end
  20.  
  21. --Creating fake input objects with fake variables
  22. local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent(),Button2Up=fakeEvent(),Button2Down=fakeEvent()}
  23. local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
  24. local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
  25. CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
  26. end}
  27. --Merged 2 functions into one by checking amount of arguments
  28. CAS.UnbindAction = CAS.BindAction
  29.  
  30. --This function will trigger the events that have been :Connect()'ed
  31. local function te(self,ev,...)
  32. local t = m[ev]
  33. if t and t._fakeEvent then
  34. for _,f in pairs(t.Functions) do
  35. f(...)
  36. end
  37. end
  38. end
  39. m.TrigEvent = te
  40. UIS.TrigEvent = te
  41.  
  42. Event.OnServerEvent:Connect(function(plr,io)
  43. if plr~=rp then return end
  44. m.Target = io.Target
  45. m.Hit = io.Hit
  46. if not io.isMouse then
  47. local b = io.UserInputState == Enum.UserInputState.Begin
  48. if io.UserInputType == Enum.UserInputType.MouseButton1 then
  49. return m:TrigEvent(b and "Button1Down" or "Button1Up")
  50. end
  51. if io.UserInputType == Enum.UserInputType.MouseButton2 then
  52. return m:TrigEvent(b and "Button2Down" or "Button2Up")
  53. end
  54. for _,t in pairs(CAS.Actions) do
  55. for _,k in pairs(t.Keys) do
  56. if k==io.KeyCode then
  57. t.Function(t.Name,io.UserInputState,io)
  58. end
  59. end
  60. end
  61. m:TrigEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
  62. UIS:TrigEvent(b and "InputBegan" or "InputEnded",io,false)
  63. end
  64. end)
  65. Event.Parent = NLS([==[
  66. local Player = game:GetService("Players").LocalPlayer
  67. local Event = script:WaitForChild("UserInput_Event")
  68.  
  69. local Mouse = Player:GetMouse()
  70. local UIS = game:GetService("UserInputService")
  71. local input = function(io,a)
  72. if a then return end
  73. --Since InputObject is a client-side instance, we create and pass table instead
  74. Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState,Hit=Mouse.Hit,Target=Mouse.Target})
  75. end
  76. UIS.InputBegan:Connect(input)
  77. UIS.InputEnded:Connect(input)
  78.  
  79. local h,t
  80. --Give the server mouse data 30 times every second, but only if the values changed
  81. --If player is not moving their mouse, client won't fire events
  82. while wait(1/30) do
  83. if h~=Mouse.Hit or t~=Mouse.Target then
  84. h,t=Mouse.Hit,Mouse.Target
  85. Event:FireServer({isMouse=true,Target=t,Hit=h})
  86. end
  87. end]==],Player.Character)
  88.  
  89. ----Sandboxed game object that allows the usage of client-side methods and services
  90. --Real game object
  91. local _rg = game
  92.  
  93. --Metatable for fake service
  94. local fsmt = {
  95. __index = function(self,k)
  96. local s = rawget(self,"_RealService")
  97. if s then
  98. return typeof(s[k])=="function"
  99. and function(_,...)return s[k](s,...)end or s[k]
  100. end
  101. end,
  102. __newindex = function(self,k,v)
  103. local s = rawget(self,"_RealService")
  104. if s then s[k]=v end
  105. end
  106. }
  107. local function FakeService(t,RealService)
  108. t._RealService = typeof(RealService)=="string" and _rg:GetService(RealService) or RealService
  109. return setmetatable(t,fsmt)
  110. end
  111.  
  112. --Fake game object
  113. local g = {
  114. GetService = function(self,s)
  115. return rawget(self,s) or _rg:GetService(s)
  116. end,
  117. Players = FakeService({
  118. LocalPlayer = FakeService({GetMouse=function(self)return m end},Player)
  119. },"Players"),
  120. UserInputService = FakeService(UIS,"UserInputService"),
  121. ContextActionService = FakeService(CAS,"ContextActionService"),
  122. RunService = FakeService({
  123. _btrs = {},
  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. rawset(g.Players,"localPlayer",g.Players.LocalPlayer)
  134. g.service = g.GetService
  135. FakeService(g,game)
  136. --Changing owner to fake player object to support owner:GetMouse()
  137. game,owner = g,g.Players.LocalPlayer
  138. end
  139. --By Rufus14 lolol
  140. --Converted with ttyyuu12345's model to script plugin v4
  141. function sandbox(var,func)
  142. local env = getfenv(func)
  143. local newenv = setmetatable({},{
  144. __index = function(self,k)
  145. if k=="script" then
  146. return var
  147. else
  148. return env[k]
  149. end
  150. end,
  151. })
  152. setfenv(func,newenv)
  153. return func
  154. end
  155. cors = {}
  156. mas = Instance.new("Model",game:GetService("Lighting"))
  157. Part0 = Instance.new("Part")
  158. Sound1 = Instance.new("Sound")
  159. Attachment2 = Instance.new("Attachment")
  160. RopeConstraint3 = Instance.new("RopeConstraint")
  161. Part4 = Instance.new("Part")
  162. SpecialMesh5 = Instance.new("SpecialMesh")
  163. Attachment6 = Instance.new("Attachment")
  164. RopeConstraint7 = Instance.new("RopeConstraint")
  165. RopeConstraint8 = Instance.new("RopeConstraint")
  166. Part0.Parent = mas
  167. Part0.BrickColor = BrickColor.new("Pearl")
  168. Part0.Anchored = true
  169. Part0.Size = Vector3.new(9.97000027, 0.720000267, 7.03999949)
  170. Part0.CFrame = CFrame.new(16.7149887, 13.7606668, 36.7299957, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  171. Part0.BottomSurface = Enum.SurfaceType.Smooth
  172. Part0.TopSurface = Enum.SurfaceType.Smooth
  173. Part0.Color = Color3.new(0.905882, 0.905882, 0.92549)
  174. Part0.Position = Vector3.new(16.7149887, 13.7606668, 36.7299957)
  175. Part0.Color = Color3.new(0.905882, 0.905882, 0.92549)
  176. Sound1.Parent = Part0
  177. Sound1.SoundId = "rbxassetid://1205183071"
  178. Attachment6.Parent = Part0
  179. Attachment6.Visible = true
  180. RopeConstraint8.Parent = Attachment6
  181. RopeConstraint8.Color = BrickColor.new("Maroon")
  182. RopeConstraint8.Visible = true
  183. RopeConstraint8.Attachment0 = nil
  184. RopeConstraint8.Attachment1 = Attachment6
  185. RopeConstraint8.Color = BrickColor.new("Maroon")
  186. RopeConstraint8.Length = 7.5
  187. RopeConstraint8.Thickness = 0.20000000298023
  188. RopeConstraint8.Restitution = 0.10000000149012
  189. Part4.Parent = mas
  190. Part4.Size = Vector3.new(3.6299994, 2.9199996, 2.94999957)
  191. Part4.CFrame = CFrame.new(16.4487038, 1.47368073, 36.9643707, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  192. Part4.BottomSurface = Enum.SurfaceType.Smooth
  193. Part4.TopSurface = Enum.SurfaceType.Smooth
  194. Part4.Position = Vector3.new(16.4487038, 1.47368073, 36.9643707)
  195. SpecialMesh5.Parent = Part4
  196. SpecialMesh5.MeshId = "http://www.roblox.com/asset/?id=112335925"
  197. SpecialMesh5.Scale = Vector3.new(3, 3, 3)
  198. SpecialMesh5.TextureId = "http://www.roblox.com/asset/?id=112335881"
  199. SpecialMesh5.MeshType = Enum.MeshType.FileMesh
  200. SpecialMesh5.Scale = Vector3.new(3, 3, 3)
  201. Attachment6.Parent = Part0
  202. Attachment6.Visible = true
  203. RopeConstraint8.Parent = Attachment6
  204. RopeConstraint8.Color = BrickColor.new("Maroon")
  205. RopeConstraint8.Visible = true
  206. RopeConstraint8.Length = 7.5
  207. RopeConstraint8.Thickness = 0.20000000298023
  208. RopeConstraint8.Restitution = 0
  209. for i,v in pairs(mas:GetChildren()) do
  210. v.Parent = game:GetService("Players").LocalPlayer.Character
  211. pcall(function() v:MakeJoints() end)
  212. end
  213. mas:Destroy()
  214. for i,v in pairs(cors) do
  215. spawn(function()
  216. pcall(v)
  217. end)
  218. end
  219. Part0.CFrame = game.Players.LocalPlayer.Character.Head.CFrame * CFrame.new(0,7.5,0)
  220. game.Players.LocalPlayer.Character.Torso.CFrame = game.Players.LocalPlayer.Character.Torso.CFrame * CFrame.new(0,2,0)
  221. Part4.CFrame = game.Players.LocalPlayer.Character.Torso.CFrame * CFrame.new(0,-3,0)
  222. RopeConstraint8.Attachment0 = game.Players.LocalPlayer.Character.Torso.NeckAttachment
  223. RopeConstraint8.Attachment1 = Attachment6
  224. RopeConstraint8.Visible = true
  225. game.Players.LocalPlayer.Character.Humanoid.WalkSpeed = 0
  226. game.Players.LocalPlayer.Character.Humanoid.JumpPower = 0
  227. -- Objects
  228.  
  229. local ScreenGui = Instance.new("ScreenGui")
  230. local TextButton = Instance.new("TextButton")
  231.  
  232. -- Properties
  233.  
  234. ScreenGui.Parent = game.Players.LocalPlayer.PlayerGui
  235.  
  236. TextButton.Parent = ScreenGui
  237. TextButton.BackgroundColor3 = Color3.new(1, 1, 1)
  238. TextButton.Position = UDim2.new(0.318378747, 0, 0.816154361, 0)
  239. TextButton.Size = UDim2.new(0, 496, 0, 135)
  240. TextButton.Style = Enum.ButtonStyle.RobloxRoundDefaultButton
  241. TextButton.Font = Enum.Font.SourceSans
  242. TextButton.FontSize = Enum.FontSize.Size14
  243. TextButton.Text = "Suicide"
  244. TextButton.TextColor3 = Color3.new(0.454902, 0, 0)
  245. TextButton.TextScaled = true
  246. TextButton.TextSize = 14
  247. TextButton.TextWrapped = true
  248. function kys()
  249. ScreenGui:destroy()
  250. local bodyvel = Instance.new("BodyVelocity", Part4)
  251. bodyvel.Velocity = game.Players.LocalPlayer.Character.Torso.CFrame.lookVector * 45
  252. local death = Instance.new("Sound", game.Players.LocalPlayer.Character.Head)
  253. death.Volume = 10
  254. death.SoundId = "rbxassetid://12222242"
  255. wait(0.2)
  256. death:Play()
  257. bodyvel:destroy()
  258. game.Players.LocalPlayer.Character.Humanoid.PlatformStand = true
  259. if game.Players.LocalPlayer.Character:findFirstChild("Torso") then
  260. game.Players.LocalPlayer.Character.Torso.Velocity = game.Players.LocalPlayer.Character.Torso.CFrame.lookVector * 10
  261. for i,v in pairs(game.Players.LocalPlayer.Character.Torso:GetChildren()) do
  262. if v.ClassName == "Motor6D" then
  263. if v.Name == "Neck" then
  264.  
  265. else
  266. v:destroy()
  267. end
  268. end
  269. end
  270. end
  271. if game.Players.LocalPlayer.Character:findFirstChild("Right Arm") then
  272. local attachment = Instance.new("Attachment", game.Players.LocalPlayer.Character.Torso)
  273. attachment.Position = Vector3.new(1, 1, 0)
  274. local ball = Instance.new("BallSocketConstraint", game.Players.LocalPlayer.Character)
  275. ball.Attachment0 = game.Players.LocalPlayer.Character["Right Arm"].RightShoulderAttachment
  276. ball.Attachment1 = attachment
  277. local collidepartofleftleg = Instance.new("Part", game.Players.LocalPlayer.Character.Torso)
  278. collidepartofleftleg.Name = "Bone"
  279. collidepartofleftleg.Size = Vector3.new(0.8,1.4,0.8)
  280. collidepartofleftleg.Transparency = 1
  281. collidepartofleftleg:BreakJoints()
  282. local weeld = Instance.new("Weld", collidepartofleftleg)
  283. weeld.Part0 = game.Players.LocalPlayer.Character["Right Arm"]
  284. weeld.Part1 = collidepartofleftleg
  285. weeld.C0 = weeld.C0 * CFrame.new(0,-0.3,0)
  286. end
  287. if game.Players.LocalPlayer.Character:findFirstChild("Left Arm") then
  288. local attachment = Instance.new("Attachment", game.Players.LocalPlayer.Character.Torso)
  289. attachment.Position = Vector3.new(-1, 1, 0)
  290. local ball = Instance.new("BallSocketConstraint", game.Players.LocalPlayer.Character)
  291. ball.Attachment0 = attachment
  292. ball.Attachment1 = game.Players.LocalPlayer.Character["Left Arm"].LeftShoulderAttachment
  293. local collidepartofleftleg = Instance.new("Part", game.Players.LocalPlayer.Character.Torso)
  294. collidepartofleftleg.Name = "Bone"
  295. collidepartofleftleg.Size = Vector3.new(0.8,1.4,0.8)
  296. collidepartofleftleg.Transparency = 1
  297. collidepartofleftleg:BreakJoints()
  298. local weeld = Instance.new("Weld", collidepartofleftleg)
  299. weeld.Part0 = game.Players.LocalPlayer.Character["Left Arm"]
  300. weeld.Part1 = collidepartofleftleg
  301. weeld.C0 = weeld.C0 * CFrame.new(0,-0.3,0)
  302. end
  303. if game.Players.LocalPlayer.Character:findFirstChild("Right Leg") then
  304. local attachment = Instance.new("Attachment", game.Players.LocalPlayer.Character.Torso)
  305. attachment.Position = Vector3.new(0.5, -1, 0)
  306. local ball = Instance.new("BallSocketConstraint", game.Players.LocalPlayer.Character)
  307. ball.Attachment0 = game.Players.LocalPlayer.Character["Right Leg"].RightFootAttachment
  308. ball.Attachment1 = attachment
  309. game.Players.LocalPlayer.Character["Right Leg"].RightFootAttachment.Position = Vector3.new(0, 1, 0)
  310. local collidepartofleftleg = Instance.new("Part", game.Players.LocalPlayer.Character.Torso)
  311. collidepartofleftleg.Name = "Bone"
  312. collidepartofleftleg.Size = Vector3.new(0.8,1.4,0.8)
  313. collidepartofleftleg.Transparency = 1
  314. collidepartofleftleg:BreakJoints()
  315. local weeld = Instance.new("Weld", collidepartofleftleg)
  316. weeld.Part0 = game.Players.LocalPlayer.Character["Right Leg"]
  317. weeld.Part1 = collidepartofleftleg
  318. weeld.C0 = weeld.C0 * CFrame.new(0,-0.3,0)
  319. end
  320. if game.Players.LocalPlayer.Character:findFirstChild("Left Leg") then
  321. local attachment = Instance.new("Attachment", game.Players.LocalPlayer.Character.Torso)
  322. attachment.Position = Vector3.new(-0.5, -1, 0)
  323. local ball = Instance.new("BallSocketConstraint", game.Players.LocalPlayer.Character)
  324. ball.Attachment0 = game.Players.LocalPlayer.Character["Left Leg"].LeftFootAttachment
  325. ball.Attachment1 = attachment
  326. game.Players.LocalPlayer.Character["Left Leg"].LeftFootAttachment.Position = Vector3.new(0, 1, 0)
  327. local collidepartofleftleg = Instance.new("Part", game.Players.LocalPlayer.Character.Torso)
  328. collidepartofleftleg.Name = "Bone"
  329. collidepartofleftleg.Size = Vector3.new(0.8,1.4,0.8)
  330. collidepartofleftleg.Transparency = 1
  331. collidepartofleftleg:BreakJoints()
  332. local weeld = Instance.new("Weld", collidepartofleftleg)
  333. weeld.Part0 = game.Players.LocalPlayer.Character["Left Leg"]
  334. weeld.Part1 = collidepartofleftleg
  335. weeld.C0 = weeld.C0 * CFrame.new(0,-0.3,0)
  336. end
  337. if game.Players.LocalPlayer.Character:findFirstChild("Head") then
  338. local attachment = Instance.new("Attachment", game.Players.LocalPlayer.Character.Head)
  339. attachment.Position = Vector3.new(0, -0.5, 0)
  340. attachment.Name = "lol"
  341. attachment.Visible = false
  342. game.Players.LocalPlayer.Character.Torso.NeckAttachment.Visible = false
  343. game.Players.LocalPlayer.Character.Torso.NeckAttachment.Position = game.Players.LocalPlayer.Character.Torso.NeckAttachment.Position + Vector3.new(0,0,0)
  344. local ball = Instance.new("BallSocketConstraint", game.Players.LocalPlayer.Character)
  345. ball.Attachment0 = game.Players.LocalPlayer.Character.Torso.NeckAttachment
  346. ball.Attachment1 = attachment
  347. ball.LimitsEnabled = true
  348. ball.TwistLimitsEnabled = true
  349. ball.UpperAngle = 90
  350. ball.Restitution = 0.5
  351. ball.TwistUpperAngle = 180
  352. ball.TwistLowerAngle = -180
  353. local collidepartofleftleg = Instance.new("Part", game.Players.LocalPlayer.Character.Torso)
  354. collidepartofleftleg.Name = "Bone"
  355. collidepartofleftleg.Size = Vector3.new(0.7,0.7,0.7)
  356. collidepartofleftleg.Transparency = 1
  357. collidepartofleftleg:BreakJoints()
  358. local weeld = Instance.new("Weld", collidepartofleftleg)
  359. weeld.Part0 = collidepartofleftleg
  360. weeld.Part1 = game.Players.LocalPlayer.Character["Head"]
  361. if game.Players.LocalPlayer.Character.Torso:findFirstChild("Neck") then
  362. game.Players.LocalPlayer.Character.Torso.Neck:destroy()
  363. end
  364. if game.Players.LocalPlayer.Character.Head:findFirstChild("face") then
  365. game.Players.LocalPlayer.Character.Head.face.Texture = "http://www.roblox.com/asset/?id=810245460"
  366. end
  367. end
  368. game.Players.LocalPlayer.Character.Humanoid:SetStateEnabled(Enum.HumanoidStateType.Dead, false)
  369. game.Players.LocalPlayer.Character.Humanoid.Health = 0.1
  370. game.Players.LocalPlayer.Character.Humanoid.WalkSpeed = 0
  371. game.Players.LocalPlayer.Character.Humanoid.JumpPower = 0
  372. local dead = Instance.new("Sound", game.Players.LocalPlayer.Character.Head)
  373. dead.Volume = 10
  374. dead.SoundId = "rbxassetid://1248405065"
  375. dead:Play()
  376. dead.Looped = true
  377. while true do
  378. game.Players.LocalPlayer.Character.Humanoid.Health = 0.1
  379. game.Players.LocalPlayer.Character.Humanoid.PlatformStand = true
  380. wait()
  381. end
  382. end
  383. TextButton.MouseButton1Click:connect(kys)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement