Advertisement
lafur

Untitled

Sep 20th, 2018
163
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 13.98 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,Mouse,mouse,UserInputService,ContextActionService = owner
  4. local RealPlayer = Player
  5. do print("FE Compatibility code by Mokiros")local a=RealPlayer;script.Parent=a.Character;local b=Instance.new("RemoteEvent")b.Name="UserInput_Event"local function c()local d={_fakeEvent=true,Functions={},Connect=function(self,e)table.insert(self.Functions,e)end}d.connect=d.Connect;return d end;local f={Target=nil,Hit=CFrame.new(),KeyUp=c(),KeyDown=c(),Button1Up=c(),Button1Down=c(),Button2Up=c(),Button2Down=c()}local g={InputBegan=c(),InputEnded=c()}local CAS={Actions={},BindAction=function(self,h,i,j,...)CAS.Actions[h]=i and{Name=h,Function=i,Keys={...}}or nil end}CAS.UnbindAction=CAS.BindAction;local function k(self,l,...)local d=f[l]if d and d._fakeEvent then for m,e in pairs(d.Functions)do e(...)end end end;f.TrigEvent=k;g.TrigEvent=k;b.OnServerEvent:Connect(function(n,o)if n~=a then return end;f.Target=o.Target;f.Hit=o.Hit;if not o.isMouse then local p=o.UserInputState==Enum.UserInputState.Begin;if o.UserInputType==Enum.UserInputType.MouseButton1 then return f:TrigEvent(p and"Button1Down"or"Button1Up")end;if o.UserInputType==Enum.UserInputType.MouseButton2 then return f:TrigEvent(p and"Button2Down"or"Button2Up")end;for m,d in pairs(CAS.Actions)do for m,q in pairs(d.Keys)do if q==o.KeyCode then d.Function(d.Name,o.UserInputState,o)end end end;f:TrigEvent(p and"KeyDown"or"KeyUp",o.KeyCode.Name:lower())g:TrigEvent(p and"InputBegan"or"InputEnded",o,false)end end)b.Parent=NLS([==[local a=game:GetService("Players").LocalPlayer;local b=script:WaitForChild("UserInput_Event")local c=a:GetMouse()local d=game:GetService("UserInputService")local e=function(f,g)if g then return end;b:FireServer({KeyCode=f.KeyCode,UserInputType=f.UserInputType,UserInputState=f.UserInputState,Hit=c.Hit,Target=c.Target})end;d.InputBegan:Connect(e)d.InputEnded:Connect(e)local h,i;while wait(1/30)do if h~=c.Hit or i~=c.Target then h,i=c.Hit,c.Target;b:FireServer({isMouse=true,Target=i,Hit=h})end end]==],Player.Character)local r=game;local s={__index=function(self,q)local t=rawget(self,"_RealService")if t then return typeof(t[q])=="function"and function(m,...)return t[q](t,...)end or t[q]end end,__newindex=function(self,q,u)local t=rawget(self,"_RealService")if t then t[q]=u end end}local function v(d,w)d._RealService=typeof(w)=="string"and r:GetService(w)or w;return setmetatable(d,s)end;local x={GetService=function(self,t)return rawget(self,t)or r:GetService(t)end,Players=v({LocalPlayer=v({GetMouse=function(self)return f end},Player)},"Players"),UserInputService=v(g,"UserInputService"),ContextActionService=v(CAS,"ContextActionService"),RunService=v({_btrs={},RenderStepped=r:GetService("RunService").Heartbeat,BindToRenderStep=function(self,h,m,i)self._btrs[h]=self.Heartbeat:Connect(i)end,UnbindFromRenderStep=function(self,h)self._btrs[h]:Disconnect()end},"RunService")}rawset(x.Players,"localPlayer",x.Players.LocalPlayer)x.service=x.GetService;v(x,game)game,owner=x,x.Players.LocalPlayer end --Converted with ttyyuu12345's model to script plugin v4
  6. --By Rufus14
  7. mouse = game.Players.LocalPlayer:GetMouse()
  8. game.Players.LocalPlayer.Character.Humanoid.MaxHealth = math.huge
  9. game.Players.LocalPlayer.Character.Humanoid.Health = math.huge
  10. function sandbox(var,func)
  11. local env = getfenv(func)
  12. local newenv = setmetatable({},{
  13. __index = function(self,k)
  14. if k=="script" then
  15. return var
  16. else
  17. return env[k]
  18. end
  19. end,
  20. })
  21. setfenv(func,newenv)
  22. return func
  23. end
  24. cors = {}
  25. mas = Instance.new("Model",game:GetService("Lighting"))
  26. Part0 = Instance.new("Part")
  27. SpecialMesh1 = Instance.new("SpecialMesh")
  28. Part0.Name = "Gun"
  29. Part0.Parent = mas
  30. Part0.CanCollide = false
  31. Part0.Size = Vector3.new(0.970000505, 2.46999931, 0.380000055)
  32. Part0.CFrame = CFrame.new(-211.74501, 2.6168952, 37.920002, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  33. Part0.Position = Vector3.new(-211.74501, 2.6168952, 37.920002)
  34. SpecialMesh1.Parent = Part0
  35. SpecialMesh1.MeshId = "rbxassetid://505563629"
  36. SpecialMesh1.Scale = Vector3.new(0.00499999989, 0.00499999989, 0.00499999989)
  37. SpecialMesh1.TextureId = "rbxassetid://505563636"
  38. SpecialMesh1.MeshType = Enum.MeshType.FileMesh
  39. SpecialMesh1.Scale = Vector3.new(0.00499999989, 0.00499999989, 0.00499999989)
  40. for i,v in pairs(mas:GetChildren()) do
  41. v.Parent = game:GetService("Players").LocalPlayer.Character
  42. pcall(function() v:MakeJoints() end)
  43. end
  44. mas:Destroy()
  45. for i,v in pairs(cors) do
  46. spawn(function()
  47. pcall(v)
  48. end)
  49. end
  50. cankys = true
  51. weld = Instance.new("Weld", Part0)
  52. weld.Part0 = game.Players.LocalPlayer.Character["Left Arm"]
  53. weld.Part1 = Part0
  54. weld.C0 = CFrame.new(0.158004761, -1.63815379, -1.00455856, -5.79879307e-22, 9.29214533e-23, 1, -0.587791622, -0.809012473, -2.65673535e-22, 0.809012473, -0.587791622, 5.23747954e-22)
  55. function killyourself(key)
  56. if cankys then
  57. cankys = false
  58. if game.Players.LocalPlayer.Character.Head:findFirstChild("face") then
  59. game.Players.LocalPlayer.Character.Head.face.Texture = "rbxassetid://1148787155"
  60. end
  61. local rhandweld = Instance.new("Weld", game.Players.LocalPlayer.Character.Torso)
  62. rhandweld.Part0 = game.Players.LocalPlayer.Character.Torso
  63. rhandweld.Part1 = game.Players.LocalPlayer.Character["Right Arm"]
  64. rhandweld.C0 = CFrame.new(1.5, 0, 0, 1, -1.6395192e-43, 0, -1.6395192e-43, 1, 0, 0, 0, 1)
  65. local lhandweld = Instance.new("Weld", game.Players.LocalPlayer.Character.Torso)
  66. lhandweld.Part0 = game.Players.LocalPlayer.Character.Torso
  67. lhandweld.Part1 = game.Players.LocalPlayer.Character["Left Arm"]
  68. lhandweld.C0 = CFrame.new(-1.5, 0, 0, 1, -1.6395192e-43, 0, -1.6395192e-43, 1, 0, 0, 0, 1)
  69. for i = 0,2 , 0.02 do
  70. weld.C0 = weld.C0:lerp(CFrame.new(0.720336914, -0.258590698, -0.514060974, 0.409927189, 0.572569966, -0.710018694, 0.0567400455, 0.760912359, 0.646370947, 0.910354853, -0.305250764, 0.279430419),i)
  71. lhandweld.C0 = lhandweld.C0:lerp(CFrame.new(-0.832244873, 0.405325174, -1.44667816, 0.719340205, -0.634600103, -0.28254649, -0.214658037, 0.183768019, -0.959245205, 0.660660148, 0.750674427, -0.00403028121),i)
  72. rhandweld.C0 = rhandweld.C0:lerp(CFrame.new(0.921920776, 0.294008493, -1.1861496, 0.88295126, 0.469464868, 6.12843053e-07, -0.0490720123, 0.0922940373, -0.994521856, -0.466893107, 0.878114343, 0.104528703),i)
  73. game:GetService("RunService").RenderStepped:wait()
  74. end
  75. script.Parent = nil
  76. function ragdoll()
  77. game.Players.LocalPlayer.Character.Archivable = true
  78. clone = game.Players.LocalPlayer.Character:Clone()
  79. clone.Parent = workspace
  80. for i,v in pairs(clone:GetChildren()) do
  81. if v.ClassName == "Script" or v.ClassName == "LocalScript" then
  82. v:destroy()
  83. end
  84. for i,p in pairs(v:GetChildren()) do
  85. if p.ClassName == "Weld" or p.ClassName == "Motor6D" or p.ClassName == "BodyVelocity" then
  86. p:destroy()
  87. end
  88. end
  89. end
  90. for i,t in pairs(game.Players.LocalPlayer.Character:GetChildren()) do
  91. if t.ClassName == "Accessory" or t.ClassName == "ForceField" then
  92. t:destroy()
  93. end
  94. end
  95. vel = Instance.new("BodyVelocity", clone.Torso)
  96. vel.Velocity = clone.Torso.CFrame.lookVector * -5
  97. vel.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
  98. clone.Head.face.Texture = "http://www.roblox.com/asset/?id=305296807"
  99. using = false
  100. hit = Instance.new("Sound", clone.Torso)
  101. hit.SoundId = "rbxassetid://260430060"
  102. hit.Volume = 0
  103. hit1 = Instance.new("Sound", clone.Torso)
  104. hit1.SoundId = "rbxassetid://138087186"
  105. hit1.Volume = 0
  106. hit2 = Instance.new("Sound", clone.Torso)
  107. hit2.SoundId = "rbxassetid://131237241"
  108. hit2.Volume = 0
  109. hit3 = Instance.new("Sound", clone.Torso)
  110. hit3.SoundId = "rbxassetid://278062209"
  111. hit3.Volume = 0
  112. hit3.TimePosition = 0.33
  113. ded = Instance.new("Sound", clone.Torso)
  114. ded.SoundId = "rbxassetid://304679846"
  115. ded.Volume = 10
  116. local leftarm = clone:findFirstChild("Left Arm")
  117. local rightrm = clone:findFirstChild("Right Arm")
  118. local leftleg = clone:findFirstChild("Left Leg")
  119. local rightleg = clone:findFirstChild("Right Leg")
  120. local head = clone:findFirstChild("Head")
  121. for i, g in pairs(game.Players.LocalPlayer.Character:GetChildren()) do
  122. if g.ClassName == "Part" then
  123. g:destroy()
  124. end
  125. end
  126. for i, h in pairs(game.Players.LocalPlayer.Character:GetChildren()) do
  127. if h.ClassName == "Accesory" then
  128. h:destroy()
  129. end
  130. end
  131. game.Workspace.CurrentCamera.CameraSubject = head
  132. if head then
  133. local attachment = Instance.new("Attachment", clone.Head)
  134. attachment.Position = Vector3.new(0, -0.5, 0)
  135. attachment.Name = "lol"
  136. attachment.Visible = false
  137. clone.Torso.NeckAttachment.Visible = false
  138. clone.Torso.NeckAttachment.Position = clone.Torso.NeckAttachment.Position + Vector3.new(0,0,0)
  139. local ball = Instance.new("BallSocketConstraint", clone)
  140. ball.Attachment0 = clone.Torso.NeckAttachment
  141. ball.Attachment1 = attachment
  142. ball.LimitsEnabled = true
  143. ball.TwistLimitsEnabled = true
  144. ball.UpperAngle = 90
  145. ball.Restitution = 0.5
  146. ball.TwistUpperAngle = 90
  147. ball.TwistLowerAngle = -90
  148. local collidepartofleftleg = Instance.new("Part", clone.Torso)
  149. collidepartofleftleg.Name = "Bone"
  150. collidepartofleftleg.Size = Vector3.new(0.7,0.7,0.7)
  151. collidepartofleftleg.Transparency = 1
  152. collidepartofleftleg:BreakJoints()
  153. local weeld = Instance.new("Weld", collidepartofleftleg)
  154. weeld.Part0 = collidepartofleftleg
  155. weeld.Part1 = clone["Head"]
  156. end
  157. if leftleg ~= nil then
  158. local glue = Instance.new("Glue", clone.Torso)
  159. glue.Part0 = clone.Torso
  160. glue.Part1 = leftleg
  161. glue.Name = "Left leg"
  162. local collider = Instance.new("Part", leftleg)
  163. collider.Position = Vector3.new(0,999,0)
  164. collider.Size = Vector3.new(1.5, 1, 1)
  165. collider.Shape = "Cylinder"
  166. local weld = Instance.new("Weld", collider)
  167. weld.Part0 = leftleg
  168. weld.Part1 = collider
  169. weld.C0 = CFrame.new(0,-0.2,0) * CFrame.fromEulerAnglesXYZ(0, 0, math.pi/2)
  170. collider.TopSurface = "Smooth"
  171. collider.BottomSurface = "Smooth"
  172. collider.formFactor = "Symmetric"
  173. glue.C0 = CFrame.new(-0.5, -1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
  174. glue.C1 = CFrame.new(-0, 1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
  175. collider.Transparency = 1
  176. end
  177. ------------
  178. if rightleg ~= nil then
  179. local glue1 = Instance.new("Glue", clone.Torso)
  180. glue1.Part0 = clone.Torso
  181. glue1.Part1 = rightleg
  182. glue1.Name = "Right leg"
  183. local collider1 = Instance.new("Part", rightleg)
  184. collider1.Position = Vector3.new(0,999,0)
  185. collider1.Size = Vector3.new(1.5, 1, 1)
  186. collider1.Shape = "Cylinder"
  187. local weld1 = Instance.new("Weld", collider1)
  188. weld1.Part0 = rightleg
  189. weld1.Part1 = collider1
  190. weld1.C0 = CFrame.new(0,-0.2,0) * CFrame.fromEulerAnglesXYZ(0, 0, math.pi/2)
  191. collider1.TopSurface = "Smooth"
  192. collider1.BottomSurface = "Smooth"
  193. collider1.formFactor = "Symmetric"
  194. glue1.C0 = CFrame.new(0.5, -1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  195. glue1.C1 = CFrame.new(0, 1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  196. collider1.Transparency = 1
  197. end
  198. ------------
  199. if rightrm ~= nil then
  200. local glue11 = Instance.new("Glue", clone.Torso)
  201. glue11.Part0 = clone.Torso
  202. glue11.Part1 = rightrm
  203. glue11.Name = "Right shoulder"
  204. local collider11 = Instance.new("Part", rightrm)
  205. collider11.Position = Vector3.new(0,9999,0)
  206. collider11.Size = Vector3.new(1.5,1,1)
  207. collider11.Shape = "Cylinder"
  208. local weld11 = Instance.new("Weld", collider11)
  209. weld11.Part0 = rightrm
  210. weld11.Part1 = collider11
  211. weld11.C0 = CFrame.new(0,-0.2,0) * CFrame.fromEulerAnglesXYZ(0, 0, math.pi/2)
  212. collider11.TopSurface = "Smooth"
  213. collider11.BottomSurface = "Smooth"
  214. collider11.formFactor = "Symmetric"
  215. glue11.C0 = CFrame.new(1.5, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)
  216. glue11.C1 = CFrame.new(0, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)
  217. collider11.Transparency = 1
  218. end
  219. ------------
  220. if leftarm ~= nil then
  221. local glue111 = Instance.new("Glue", clone.Torso)
  222. glue111.Part0 = clone.Torso
  223. glue111.Part1 = leftarm
  224. glue111.Name = "Left shoulder"
  225. local collider111 = Instance.new("Part", leftarm)
  226. collider111.Position = Vector3.new(0,9999,0)
  227. collider111.Size = Vector3.new(1.5,1,1)
  228. collider111.Shape = "Cylinder"
  229. local weld111 = Instance.new("Weld", collider111)
  230. weld111.Part0 = leftarm
  231. weld111.Part1 = collider111
  232. weld111.C0 = CFrame.new(0,-0.2,0) * CFrame.fromEulerAnglesXYZ(0, 0, math.pi/2)
  233. collider111.TopSurface = "Smooth"
  234. collider111.BottomSurface = "Smooth"
  235. collider111.formFactor = "Symmetric"
  236. glue111.C0 = CFrame.new(-1.5, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  237. glue111.C1 = CFrame.new(0, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  238. collider111.Transparency = 1
  239. ----------------
  240. sensoring = Instance.new("Part", clone.Torso)
  241. sensoring.Size = Vector3.new(1.2,1.1,0.8)
  242. sensoring.CanCollide = false
  243. sensoring.Position = clone.Torso.Position
  244. local welder = Instance.new("Weld", sensoring)
  245. welder.Part0 = clone.Torso
  246. welder.Part1 = sensoring
  247. welder.C0 = welder.C0 * CFrame.new(0,0,1.05)
  248. sensoring.Transparency = 1
  249. -----------------
  250. sensoring1 = Instance.new("Part", clone.Torso)
  251. sensoring1.Size = Vector3.new(1.2,1.1,0.8)
  252. sensoring1.CanCollide = false
  253. sensoring1.Position = clone.Torso.Position
  254. local welder1 = Instance.new("Weld", sensoring)
  255. welder1.Part0 = clone.Torso
  256. welder1.Part1 = sensoring1
  257. welder1.C0 = welder1.C0 * CFrame.new(0,0,-1.05)
  258. sensoring1.Transparency = 1
  259. end
  260. clone.Name = game.Players.LocalPlayer.Character.Name.." (Suicide)"
  261. ded:Play()
  262. vel:destroy()
  263. wait(0.5)
  264. local function touch()
  265. if not using then
  266. using = true
  267. local Math = math.random(1,4)
  268. if Math == 1 then
  269. hit:Play()
  270. end
  271. if Math == 2 then
  272. hit1:Play()
  273. end
  274. if Math == 3 then
  275. hit2:Play()
  276. end
  277. if Math == 4 then
  278. hit3:Play()
  279. end
  280. wait(0.1)
  281. using = false
  282. end
  283. end
  284. sensoring.Touched:connect(touch)
  285. sensoring1.Touched:connect(touch)
  286. while true do
  287. clone.Head.CanCollide = false
  288. game:GetService("RunService").Stepped:wait()
  289. end
  290. end
  291.  
  292. game.Players.LocalPlayer.Character.Humanoid.Died:connect(ragdoll)
  293.  
  294. --di ent
  295. game.Players.LocalPlayer.Character.Humanoid.Health = 0
  296. end
  297. end
  298. mouse.Button1Down:connect(killyourself)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement