Advertisement
kostik228

xd

Nov 24th, 2018
197
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 13.73 KB | None | 0 0
  1. -- This script has been converted to FE by iPxter
  2.  
  3.  
  4. if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
  5. local Player,Mouse,mouse,UserInputService,ContextActionService = owner
  6. do
  7. print("FE Compatibility code by Mokiros | Translated to FE by iPxter")
  8. script.Parent = Player.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,Connect=function(self,f)self.Function=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()}
  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 and t.Function then
  34. t.Function(...)
  35. end
  36. end
  37. m.TrigEvent = te
  38. UIS.TrigEvent = te
  39.  
  40. Event.OnServerEvent:Connect(function(plr,io)
  41. if plr~=Player then return end
  42. if io.isMouse then
  43. m.Target = io.Target
  44. m.Hit = io.Hit
  45. else
  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 = owner
  63. local Event = script:WaitForChild("UserInput_Event")
  64.  
  65. local UIS = game:GetService("UserInputService")
  66. local input = function(io,a)
  67. if a then return end
  68. --Since InputObject is a client-side instance, we create and pass table instead
  69. Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState})
  70. end
  71. UIS.InputBegan:Connect(input)
  72. UIS.InputEnded:Connect(input)
  73.  
  74. local Mouse = owner
  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. Mouse,mouse,UserInputService,ContextActionService = m,m,UIS,CAS
  85. end
  86. --Converted with ttyyuu12345's model to script plugin v4
  87. --By Rufus14
  88. mouse = owner
  89. game.Players.LocalPlayer.Character.Humanoid.MaxHealth = math.huge
  90. game.Players.LocalPlayer.Character.Humanoid.Health = math.huge
  91. function sandbox(var,func)
  92. local env = getfenv(func)
  93. local newenv = setmetatable({},{
  94. __index = function(self,k)
  95. if k=="script" then
  96. return var
  97. else
  98. return env[k]
  99. end
  100. end,
  101. })
  102. setfenv(func,newenv)
  103. return func
  104. end
  105. cors = {}
  106. mas = Instance.new("Model",game:GetService("Lighting"))
  107. Part0 = Instance.new("Part")
  108. SpecialMesh1 = Instance.new("SpecialMesh")
  109. Part0.Name = "Gun"
  110. Part0.Parent = mas
  111. Part0.CanCollide = false
  112. Part0.Size = Vector3.new(0.970000505, 2.46999931, 0.380000055)
  113. Part0.CFrame = CFrame.new(-211.74501, 2.6168952, 37.920002, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  114. Part0.Position = Vector3.new(-211.74501, 2.6168952, 37.920002)
  115. SpecialMesh1.Parent = Part0
  116. SpecialMesh1.MeshId = "rbxassetid://505563629"
  117. SpecialMesh1.Scale = Vector3.new(0.00499999989, 0.00499999989, 0.00499999989)
  118. SpecialMesh1.TextureId = "rbxassetid://505563636"
  119. SpecialMesh1.MeshType = Enum.MeshType.FileMesh
  120. SpecialMesh1.Scale = Vector3.new(0.00499999989, 0.00499999989, 0.00499999989)
  121. for i,v in pairs(mas:GetChildren()) do
  122. v.Parent = owner
  123. pcall(function() v:MakeJoints() end)
  124. end
  125. mas:Destroy()
  126. for i,v in pairs(cors) do
  127. spawn(function()
  128. pcall(v)
  129. end)
  130. end
  131. cankys = true
  132. weld = Instance.new("Weld", Part0)
  133. weld.Part0 = game.Players.LocalPlayer.Character["Left Arm"]
  134. weld.Part1 = Part0
  135. 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)
  136. function killyourself(key)
  137. if cankys then
  138. cankys = false
  139. if game.Players.LocalPlayer.Character.Head:findFirstChild("face") then
  140. game.Players.LocalPlayer.Character.Head.face.Texture = "rbxassetid://1148787155"
  141. end
  142. local rhandweld = Instance.new("Weld", game.Players.LocalPlayer.Character.Torso)
  143. rhandweld.Part0 = game.Players.LocalPlayer.Character.Torso
  144. rhandweld.Part1 = game.Players.LocalPlayer.Character["Right Arm"]
  145. rhandweld.C0 = CFrame.new(1.5, 0, 0, 1, -1.6395192e-43, 0, -1.6395192e-43, 1, 0, 0, 0, 1)
  146. local lhandweld = Instance.new("Weld", game.Players.LocalPlayer.Character.Torso)
  147. lhandweld.Part0 = game.Players.LocalPlayer.Character.Torso
  148. lhandweld.Part1 = game.Players.LocalPlayer.Character["Left Arm"]
  149. lhandweld.C0 = CFrame.new(-1.5, 0, 0, 1, -1.6395192e-43, 0, -1.6395192e-43, 1, 0, 0, 0, 1)
  150. for i = 0,2 , 0.02 do
  151. 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)
  152. 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)
  153. 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)
  154. game:GetService("RunService").RenderStepped:wait()
  155. end
  156. script.Parent = nil
  157. function ragdoll()
  158. game.Players.LocalPlayer.Character.Archivable = true
  159. clone = game.Players.LocalPlayer.Character:Clone()
  160. clone.Parent = workspace
  161. for i,v in pairs(clone:GetChildren()) do
  162. if v.ClassName == "Script" or v.ClassName == "LocalScript" then
  163. v:destroy()
  164. end
  165. for i,p in pairs(v:GetChildren()) do
  166. if p.ClassName == "Weld" or p.ClassName == "Motor6D" or p.ClassName == "BodyVelocity" then
  167. p:destroy()
  168. end
  169. end
  170. end
  171. for i,t in pairs(game.Players.LocalPlayer.Character:GetChildren()) do
  172. if t.ClassName == "Accessory" or t.ClassName == "ForceField" then
  173. t:destroy()
  174. end
  175. end
  176. vel = Instance.new("BodyVelocity", clone.Torso)
  177. vel.Velocity = clone.Torso.CFrame.lookVector * -5
  178. vel.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
  179. clone.Head.face.Texture = "http://www.roblox.com/asset/?id=305296807"
  180. using = false
  181. hit = Instance.new("Sound", clone.Torso)
  182. hit.SoundId = "rbxassetid://260430060"
  183. hit.Volume = 0
  184. hit1 = Instance.new("Sound", clone.Torso)
  185. hit1.SoundId = "rbxassetid://138087186"
  186. hit1.Volume = 0
  187. hit2 = Instance.new("Sound", clone.Torso)
  188. hit2.SoundId = "rbxassetid://131237241"
  189. hit2.Volume = 0
  190. hit3 = Instance.new("Sound", clone.Torso)
  191. hit3.SoundId = "rbxassetid://278062209"
  192. hit3.Volume = 0
  193. hit3.TimePosition = 0.33
  194. ded = Instance.new("Sound", clone.Torso)
  195. ded.SoundId = "rbxassetid://304679846"
  196. ded.Volume = 10
  197. local leftarm = clone:findFirstChild("Left Arm")
  198. local rightrm = clone:findFirstChild("Right Arm")
  199. local leftleg = clone:findFirstChild("Left Leg")
  200. local rightleg = clone:findFirstChild("Right Leg")
  201. local head = clone:findFirstChild("Head")
  202. for i, g in pairs(game.Players.LocalPlayer.Character:GetChildren()) do
  203. if g.ClassName == "Part" then
  204. g:destroy()
  205. end
  206. end
  207. for i, h in pairs(game.Players.LocalPlayer.Character:GetChildren()) do
  208. if h.ClassName == "Accesory" then
  209. h:destroy()
  210. end
  211. end
  212. game.Workspace.CurrentCamera.CameraSubject = head
  213. if head then
  214. local attachment = Instance.new("Attachment", clone.Head)
  215. attachment.Position = Vector3.new(0, -0.5, 0)
  216. attachment.Name = "lol"
  217. attachment.Visible = false
  218. clone.Torso.NeckAttachment.Visible = false
  219. clone.Torso.NeckAttachment.Position = clone.Torso.NeckAttachment.Position + Vector3.new(0,0,0)
  220. local ball = Instance.new("BallSocketConstraint", clone)
  221. ball.Attachment0 = clone.Torso.NeckAttachment
  222. ball.Attachment1 = attachment
  223. ball.LimitsEnabled = true
  224. ball.TwistLimitsEnabled = true
  225. ball.UpperAngle = 90
  226. ball.Restitution = 0.5
  227. ball.TwistUpperAngle = 90
  228. ball.TwistLowerAngle = -90
  229. local collidepartofleftleg = Instance.new("Part", clone.Torso)
  230. collidepartofleftleg.Name = "Bone"
  231. collidepartofleftleg.Size = Vector3.new(0.7,0.7,0.7)
  232. collidepartofleftleg.Transparency = 1
  233. collidepartofleftleg:BreakJoints()
  234. local weeld = Instance.new("Weld", collidepartofleftleg)
  235. weeld.Part0 = collidepartofleftleg
  236. weeld.Part1 = clone["Head"]
  237. end
  238. if leftleg ~= nil then
  239. local glue = Instance.new("Glue", clone.Torso)
  240. glue.Part0 = clone.Torso
  241. glue.Part1 = leftleg
  242. glue.Name = "Left leg"
  243. local collider = Instance.new("Part", leftleg)
  244. collider.Position = Vector3.new(0,999,0)
  245. collider.Size = Vector3.new(1.5, 1, 1)
  246. collider.Shape = "Cylinder"
  247. local weld = Instance.new("Weld", collider)
  248. weld.Part0 = leftleg
  249. weld.Part1 = collider
  250. weld.C0 = CFrame.new(0,-0.2,0) * CFrame.fromEulerAnglesXYZ(0, 0, math.pi/2)
  251. collider.TopSurface = "Smooth"
  252. collider.BottomSurface = "Smooth"
  253. collider.formFactor = "Symmetric"
  254. glue.C0 = CFrame.new(-0.5, -1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
  255. glue.C1 = CFrame.new(-0, 1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
  256. collider.Transparency = 1
  257. end
  258. ------------
  259. if rightleg ~= nil then
  260. local glue1 = Instance.new("Glue", clone.Torso)
  261. glue1.Part0 = clone.Torso
  262. glue1.Part1 = rightleg
  263. glue1.Name = "Right leg"
  264. local collider1 = Instance.new("Part", rightleg)
  265. collider1.Position = Vector3.new(0,999,0)
  266. collider1.Size = Vector3.new(1.5, 1, 1)
  267. collider1.Shape = "Cylinder"
  268. local weld1 = Instance.new("Weld", collider1)
  269. weld1.Part0 = rightleg
  270. weld1.Part1 = collider1
  271. weld1.C0 = CFrame.new(0,-0.2,0) * CFrame.fromEulerAnglesXYZ(0, 0, math.pi/2)
  272. collider1.TopSurface = "Smooth"
  273. collider1.BottomSurface = "Smooth"
  274. collider1.formFactor = "Symmetric"
  275. glue1.C0 = CFrame.new(0.5, -1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  276. glue1.C1 = CFrame.new(0, 1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  277. collider1.Transparency = 1
  278. end
  279. ------------
  280. if rightrm ~= nil then
  281. local glue11 = Instance.new("Glue", clone.Torso)
  282. glue11.Part0 = clone.Torso
  283. glue11.Part1 = rightrm
  284. glue11.Name = "Right shoulder"
  285. local collider11 = Instance.new("Part", rightrm)
  286. collider11.Position = Vector3.new(0,9999,0)
  287. collider11.Size = Vector3.new(1.5,1,1)
  288. collider11.Shape = "Cylinder"
  289. local weld11 = Instance.new("Weld", collider11)
  290. weld11.Part0 = rightrm
  291. weld11.Part1 = collider11
  292. weld11.C0 = CFrame.new(0,-0.2,0) * CFrame.fromEulerAnglesXYZ(0, 0, math.pi/2)
  293. collider11.TopSurface = "Smooth"
  294. collider11.BottomSurface = "Smooth"
  295. collider11.formFactor = "Symmetric"
  296. glue11.C0 = CFrame.new(1.5, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)
  297. glue11.C1 = CFrame.new(0, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)
  298. collider11.Transparency = 1
  299. end
  300. ------------
  301. if leftarm ~= nil then
  302. local glue111 = Instance.new("Glue", clone.Torso)
  303. glue111.Part0 = clone.Torso
  304. glue111.Part1 = leftarm
  305. glue111.Name = "Left shoulder"
  306. local collider111 = Instance.new("Part", leftarm)
  307. collider111.Position = Vector3.new(0,9999,0)
  308. collider111.Size = Vector3.new(1.5,1,1)
  309. collider111.Shape = "Cylinder"
  310. local weld111 = Instance.new("Weld", collider111)
  311. weld111.Part0 = leftarm
  312. weld111.Part1 = collider111
  313. weld111.C0 = CFrame.new(0,-0.2,0) * CFrame.fromEulerAnglesXYZ(0, 0, math.pi/2)
  314. collider111.TopSurface = "Smooth"
  315. collider111.BottomSurface = "Smooth"
  316. collider111.formFactor = "Symmetric"
  317. glue111.C0 = CFrame.new(-1.5, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  318. glue111.C1 = CFrame.new(0, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  319. collider111.Transparency = 1
  320. ----------------
  321. sensoring = Instance.new("Part", clone.Torso)
  322. sensoring.Size = Vector3.new(1.2,1.1,0.8)
  323. sensoring.CanCollide = false
  324. sensoring.Position = clone.Torso.Position
  325. local welder = Instance.new("Weld", sensoring)
  326. welder.Part0 = clone.Torso
  327. welder.Part1 = sensoring
  328. welder.C0 = welder.C0 * CFrame.new(0,0,1.05)
  329. sensoring.Transparency = 1
  330. -----------------
  331. sensoring1 = Instance.new("Part", clone.Torso)
  332. sensoring1.Size = Vector3.new(1.2,1.1,0.8)
  333. sensoring1.CanCollide = false
  334. sensoring1.Position = clone.Torso.Position
  335. local welder1 = Instance.new("Weld", sensoring)
  336. welder1.Part0 = clone.Torso
  337. welder1.Part1 = sensoring1
  338. welder1.C0 = welder1.C0 * CFrame.new(0,0,-1.05)
  339. sensoring1.Transparency = 1
  340. end
  341. clone.Name = game.Players.LocalPlayer.Character.Name.." (Suicide)"
  342. ded:Play()
  343. vel:destroy()
  344. wait(0.5)
  345. local function touch()
  346. if not using then
  347. using = true
  348. local Math = math.random(1,4)
  349. if Math == 1 then
  350. hit:Play()
  351. end
  352. if Math == 2 then
  353. hit1:Play()
  354. end
  355. if Math == 3 then
  356. hit2:Play()
  357. end
  358. if Math == 4 then
  359. hit3:Play()
  360. end
  361. wait(0.1)
  362. using = false
  363. end
  364. end
  365. sensoring.Touched:connect(touch)
  366. sensoring1.Touched:connect(touch)
  367. while true do
  368. clone.Head.CanCollide = false
  369. game:GetService("RunService").Stepped:wait()
  370. end
  371. end
  372.  
  373. game.Players.LocalPlayer.Character.Humanoid.Died:connect(ragdoll)
  374.  
  375. --di ent
  376. game.Players.LocalPlayer.Character.Humanoid.Health = 0
  377. end
  378. end
  379. mouse.Button1Down:connect(killyourself)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement