Advertisement
PixelDerpIsUber2

Untitled

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