Advertisement
Christoffer07700Extr

FE Suicide Gun v4

Jun 4th, 2019
181
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 17.43 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,game,owner = owner,game
  3. local RealPlayer = Player
  4. do
  5. print("FE Compatibility code by Mokiros")
  6. local rp = RealPlayer
  7. script.Parent = rp.Character
  8.  
  9. --RemoteEvent for communicating
  10. local Event = Instance.new("RemoteEvent")
  11. Event.Name = "UserInput_Event"
  12.  
  13. --Fake event to make stuff like Mouse.KeyDown work
  14. local function fakeEvent()
  15. local t = {_fakeEvent=true,Functions={},Connect=function(self,f)table.insert(self.Functions,f) end}
  16. t.connect = t.Connect
  17. return t
  18. end
  19.  
  20. --Creating fake input objects with fake variables
  21. local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent()}
  22. local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
  23. local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
  24. CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
  25. end}
  26. --Merged 2 functions into one by checking amount of arguments
  27. CAS.UnbindAction = CAS.BindAction
  28.  
  29. --This function will trigger the events that have been :Connect()'ed
  30. local function te(self,ev,...)
  31. local t = m[ev]
  32. if t and t._fakeEvent then
  33. for _,f in pairs(t.Functions) do
  34. f(...)
  35. end
  36. end
  37. end
  38. m.TrigEvent = te
  39. UIS.TrigEvent = te
  40.  
  41. Event.OnServerEvent:Connect(function(plr,io)
  42. if plr~=rp then return end
  43. m.Target = io.Target
  44. m.Hit = io.Hit
  45. if not io.isMouse then
  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 = game:GetService("Players").LocalPlayer
  63. local Event = script:WaitForChild("UserInput_Event")
  64.  
  65. local Mouse = Player:GetMouse()
  66. local UIS = game:GetService("UserInputService")
  67. local input = function(io,a)
  68. if a then return end
  69. --Since InputObject is a client-side instance, we create and pass table instead
  70. Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState,Hit=Mouse.Hit,Target=Mouse.Target})
  71. end
  72. UIS.InputBegan:Connect(input)
  73. UIS.InputEnded:Connect(input)
  74.  
  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.  
  85. ----Sandboxed game object that allows the usage of client-side methods and services
  86. --Real game object
  87. local _rg = game
  88.  
  89. --Metatable for fake service
  90. local fsmt = {
  91. __index = function(self,k)
  92. local s = rawget(self,"_RealService")
  93. if s then return s[k] end
  94. end,
  95. __newindex = function(self,k,v)
  96. local s = rawget(self,"_RealService")
  97. if s then s[k]=v end
  98. end,
  99. __call = function(self,...)
  100. local s = rawget(self,"_RealService")
  101. if s then return s(...) end
  102. end
  103. }
  104. local function FakeService(t,RealService)
  105. t._RealService = typeof(RealService)=="string" and _rg:GetService(RealService) or RealService
  106. return setmetatable(t,fsmt)
  107. end
  108.  
  109. --Fake game object
  110. local g = {
  111. GetService = function(self,s)
  112. return self[s]
  113. end,
  114. Players = FakeService({
  115. LocalPlayer = FakeService({GetMouse=function(self)return m end},Player)
  116. },"Players"),
  117. UserInputService = FakeService(UIS,"UserInputService"),
  118. ContextActionService = FakeService(CAS,"ContextActionService"),
  119. }
  120. rawset(g.Players,"localPlayer",g.Players.LocalPlayer)
  121. g.service = g.GetService
  122.  
  123. g.RunService = FakeService({
  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. setmetatable(g,{
  134. __index=function(self,s)
  135. return _rg:GetService(s) or typeof(_rg[s])=="function"
  136. and function(_,...)return _rg[s](_rg,...)end or _rg[s]
  137. end,
  138. __newindex = fsmt.__newindex,
  139. __call = fsmt.__call
  140. })
  141. --Changing owner to fake player object to support owner:GetMouse()
  142. game,owner = g,g.Players.LocalPlayer
  143. end
  144.  
  145. --By Rufus14, first script on my new Pastebin account.
  146. --Converted with ttyyuu12345's model to script plugin v4
  147. mouse = game.Players.LocalPlayer:GetMouse()
  148. function sandbox(var,func)
  149. local env = getfenv(func)
  150. local newenv = setmetatable({},{
  151. __index = function(self,k)
  152. if k=="script" then
  153. return var
  154. else
  155. return env[k]
  156. end
  157. end,
  158. })
  159. setfenv(func,newenv)
  160. return func
  161. end
  162. cors = {}
  163. mas = Instance.new("Model",game:GetService("Lighting"))
  164. Part0 = Instance.new("Part")
  165. SpecialMesh1 = Instance.new("SpecialMesh")
  166. Part0.Name = "your end of life"
  167. Part0.Parent = mas
  168. Part0.CanCollide = false
  169. Part0.Size = Vector3.new(1, 1, 1)
  170. Part0.CFrame = CFrame.new(64.5, 1.5, -24.5, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  171. Part0.BottomSurface = Enum.SurfaceType.Smooth
  172. Part0.TopSurface = Enum.SurfaceType.Smooth
  173. Part0.Position = Vector3.new(64.5, 1.5, -24.5)
  174. SpecialMesh1.Parent = Part0
  175. SpecialMesh1.MeshId = "rbxassetid://476920625"
  176. SpecialMesh1.Scale = Vector3.new(0.0500000007, 0.0500000007, 0.0500000007)
  177. SpecialMesh1.TextureId = "rbxassetid://476920703"
  178. SpecialMesh1.MeshType = Enum.MeshType.FileMesh
  179. SpecialMesh1.Scale = Vector3.new(0.0500000007, 0.0500000007, 0.0500000007)
  180. for i,v in pairs(mas:GetChildren()) do
  181. v.Parent = game:GetService("Players").LocalPlayer.Character
  182. pcall(function() v:MakeJoints() end)
  183. end
  184. mas:Destroy()
  185. for i,v in pairs(cors) do
  186. spawn(function()
  187. pcall(v)
  188. end)
  189. end
  190. Part0:BreakJoints()
  191. gunweld = Instance.new("Weld", Part0)
  192. gunweld.Part0 = game.Players.LocalPlayer.Character["Right Arm"]
  193. gunweld.Part1 = Part0
  194. gunweld.C0 = CFrame.fromEulerAnglesXYZ(-math.pi/2,0,0) * CFrame.new(0,0,-1.5)
  195. enditall = false
  196. function endit()
  197. if not enditall then
  198. enditall = true
  199. if game.Players.LocalPlayer.Character.Head:findFirstChild("face") then
  200. game.Players.LocalPlayer.Character.Head.face.Texture = "rbxassetid://1148787155"
  201. end
  202. local rhandclone = game.Players.LocalPlayer.Character.Torso["Right Shoulder"]:Clone()
  203. local rhandweld = Instance.new("Weld", game.Players.LocalPlayer.Character.Torso)
  204. rhandweld.Part0 = game.Players.LocalPlayer.Character.Torso
  205. rhandweld.Part1 = game.Players.LocalPlayer.Character["Right Arm"]
  206. rhandweld.C0 = CFrame.new(1.5, 0, 0, 1, -1.6395192e-43, 0, -1.6395192e-43, 1, 0, 0, 0, 1)
  207. local lhandclone = game.Players.LocalPlayer.Character.Torso["Left Shoulder"]:Clone()
  208. local lhandweld = Instance.new("Weld", game.Players.LocalPlayer.Character.Torso)
  209. lhandweld.Part0 = game.Players.LocalPlayer.Character.Torso
  210. lhandweld.Part1 = game.Players.LocalPlayer.Character["Left Arm"]
  211. canshake = true
  212. lhandweld.C0 = CFrame.new(-1.5, 0, 0, 1, -1.6395192e-43, 0, -1.6395192e-43, 1, 0, 0, 0, 1)
  213. local function shake()
  214. if canshake then
  215. local lhandweldcoord = lhandweld.C0
  216. local rhandweldcoord = rhandweld.C0
  217. lhandweld.C0 = lhandweld.C0 * CFrame.fromEulerAnglesXYZ(math.random(-1,1) / 90,math.random(-1,1) / 90,math.random(-1,1) / 90)
  218. rhandweld.C0 = rhandweld.C0 * CFrame.fromEulerAnglesXYZ(math.random(-1,1) / 90,math.random(-1,1) / 90,math.random(-1,1) / 90)
  219. game:GetService("RunService").RenderStepped:wait()
  220. lhandweld.C0 = lhandweldcoord
  221. rhandweld.C0 = rhandweldcoord
  222. end
  223. end
  224. game:GetService("RunService").RenderStepped:connect(shake)
  225. for i = 0,0.2, 0.003 do
  226. lhandweld.C0 = lhandweld.C0:lerp(CFrame.new(-1.024086, 0.326375008, -0.685035706, 0.725385964, -0.677214801, 0.123269573, 0.252294838, 0.0949550942, -0.962980211, 0.640439332, 0.729632616, 0.23973687),i)
  227. rhandweld.C0 = rhandweld.C0:lerp(CFrame.new(0.996749878, 0.362232208, -0.693548203, 0.696461976, 0.702955902, -0.144200265, -0.238405854, 0.0371298455, -0.970455587, -0.676833391, 0.71026361, 0.193448365),i)
  228. gunweld.C0 = gunweld.C0:lerp(CFrame.new(-0.603973389, -0.884958267, -0.402515411, 0.696461976, -0.592066884, 0.405459702, 0.702955902, 0.676452041, -0.219694391, -0.144200265, 0.43802911, 0.887320042),i)
  229. game:GetService("RunService").RenderStepped:wait()
  230. end
  231. wait(math.random(0,3))
  232. local aaa = Instance.new("Sound", game.Players.LocalPlayer.Character.Head)
  233. aaa.SoundId = "rbxassetid://1764781073"
  234. aaa:Play()
  235. aaa.Volume = 10
  236. while aaa.PlaybackLoudness < 1 do
  237. wait()
  238. end
  239. if game.Players.LocalPlayer.Character.Head:findFirstChild("face") then
  240. game.Players.LocalPlayer.Character.Head.face.Texture = "http://www.roblox.com/asset/?id=982264415"
  241. game.Players.LocalPlayer.Character.Head.face.Color3 = Color3.fromRGB(255,0,0)
  242. end
  243. workspace.CurrentCamera.CameraSubject = game.Players.LocalPlayer.Character.Head
  244. gunweld:destroy()
  245. Part0.CanCollide = true
  246. local bloodyhell = Instance.new("Decal", game.Players.LocalPlayer.Character.Head)
  247. bloodyhell.Texture = "http://www.roblox.com/asset/?id=305296807"
  248. bloodyhell.Face = "Front"
  249. local huum = game.Players.LocalPlayer.Character:findFirstChildOfClass("Humanoid")
  250. huum:SetStateEnabled("Dead", false)
  251. local function hp()
  252. huum.Health = .001
  253. huum.WalkSpeed = 0
  254. huum.JumpPower = 0
  255. end
  256. game:GetService("RunService").RenderStepped:connect(hp)
  257. huum.Name = "Dead"
  258. local llegclone = game.Players.LocalPlayer.Character.Torso["Left Hip"]:Clone()
  259. game.Players.LocalPlayer.Character.Torso["Left Hip"]:Remove()
  260. local llegweld = Instance.new("Weld", game.Players.LocalPlayer.Character.Torso)
  261. llegweld.Part0 = game.Players.LocalPlayer.Character.Torso
  262. llegweld.Part1 = game.Players.LocalPlayer.Character["Left Leg"]
  263. llegweld.C0 = CFrame.new(-0.5,-2,0)
  264. local rlegclone = game.Players.LocalPlayer.Character.Torso["Right Hip"]:Clone()
  265. game.Players.LocalPlayer.Character.Torso["Right Hip"]:Remove()
  266. local rlegweld = Instance.new("Weld", game.Players.LocalPlayer.Character.Torso)
  267. rlegweld.Part0 = game.Players.LocalPlayer.Character.Torso
  268. rlegweld.Part1 = game.Players.LocalPlayer.Character["Right Leg"]
  269. rlegweld.C0 = CFrame.new(0.5,-2,0)
  270. local rootjointclone = game.Players.LocalPlayer.Character.HumanoidRootPart.RootJoint:Clone()
  271. game.Players.LocalPlayer.Character.HumanoidRootPart.RootJoint:Remove()
  272. local humanoidrootpart = Instance.new("Weld", game.Players.LocalPlayer.Character.Torso)
  273. humanoidrootpart.Part0 = game.Players.LocalPlayer.Character.HumanoidRootPart
  274. humanoidrootpart.Part1 = game.Players.LocalPlayer.Character.Torso
  275. local heed = game.Players.LocalPlayer.Character.Torso["Neck"]:Clone()
  276. local headweld = Instance.new("Weld", game.Players.LocalPlayer.Character.Torso)
  277. headweld.Part0 = game.Players.LocalPlayer.Character.Torso
  278. headweld.Part1 = game.Players.LocalPlayer.Character.Head
  279. headweld.C0 = headweld.C0 * CFrame.new(0,1.5,0)
  280. game.Players.LocalPlayer.Character.Torso.Neck:Remove()
  281. canshake = false
  282. for i = 0,0.4, 0.035 do
  283. humanoidrootpart.C0 = humanoidrootpart.C0:lerp(CFrame.new(0, -1.39999413, 0, 1, 0, 0, 0, 0.999995947, 0, 0, 0, 1),i)
  284. headweld.C0 = headweld.C0:lerp(CFrame.new(0, 1.48110318, -0.136140823, 1, 0, 0, 0, 0.962214053, 0.272279114, 0, -0.272280246, 0.962217987),i)
  285. rlegweld.C0 = rlegweld.C0:lerp(CFrame.new(0.5, -0.661647677, -0.778150558, 1, 0, 0, 0, 0.930413663, 0.366499782, 0, -0.366501302, 0.930417538),i)
  286. llegweld.C0 = llegweld.C0:lerp(CFrame.new(-0.5, -0.642013013, -0.875328064, 1, 0, 0, 0, 0.980951071, 0.194233701, 0, -0.19423449, 0.980955064),i)
  287. lhandweld.C0 = lhandweld.C0:lerp(CFrame.new(-1.5, 0.216077328, -0.411567688, 1, 0, 0, 0, 0.567841351, -0.823132992, 0, 0.823136389, 0.567843676),i)
  288. rhandweld.C0 = rhandweld.C0:lerp(CFrame.new(1.5, 0.171311736, -0.376781464, 1, 0, 0, 0, 0.657372534, -0.753560245, 0, 0.753563404, 0.657375216),i)
  289. game:GetService("RunService").RenderStepped:wait()
  290. end
  291. for i = 0,0.8, 0.02 do
  292. humanoidrootpart.C0 = humanoidrootpart.C0:lerp(CFrame.new(0, -2.59475183, 3.00209045, 1, 0, 0, 0, 0.00174529164, -0.999994397, 0, 0.99999845, 0.00174529862),i)
  293. headweld.C0 = headweld.C0:lerp(CFrame.new(0, 1.49978065, 0.0148329735, 1, 0, 0, 0, 0.99955982, -0.0296660569, 0, 0.0296659507, 0.999555767),i)
  294. rlegweld.C0 = rlegweld.C0:lerp(CFrame.new(0.5, -1.87047195, -0.0771479011, 1, 0, 0, 0, 0.983254671, 0.182235599, 0, -0.182234854, 0.983250797),i)
  295. llegweld.C0 = llegweld.C0:lerp(CFrame.new(-0.5, -1.87277603, 0.0985991359, 1, 0, 0, 0, 0.993767738, 0.11146906, 0, -0.111468606, 0.993763745),i)
  296. lhandweld.C0 = lhandweld.C0:lerp(CFrame.new(-1.78730774, 0.153375626, 0.000604957342, 0.859852254, 0.510542929, 0, -0.510542095, 0.859850943, 0.00174532051, 0.000891050149, -0.00150069932, 0.999994397),i)
  297. rhandweld.C0 = rhandweld.C0:lerp(CFrame.new(1.53527832, 0.0379638672, -0.00161281228, 0.997314453, -0.0732381865, 0, 0.0732377395, 0.997308135, -0.00349061936, 0.000255646679, 0.00348124537, 0.999989748),i)
  298. game:GetService("RunService").RenderStepped:wait()
  299. end
  300. wait(3)
  301. local aaa = Instance.new("Sound", game.Players.LocalPlayer.PlayerGui)
  302. aaa:Play()
  303. aaa.Volume = 10
  304. local songmath = math.random(1,2)
  305. if songmath == 1 then
  306. aaa.SoundId = "rbxassetid://169815500"
  307. end
  308. if songmath == 2 then
  309. aaa.SoundId = "rbxassetid://165679204"
  310. end
  311. -- Farewell infortality
  312. -- Revamp by ImFrostic, Version 2.8
  313.  
  314. -- Objects
  315.  
  316. local TextButton = Instance.new("TextButton")
  317. local ScreenGui = Instance.new("ScreenGui")
  318.  
  319. -- Properties
  320.  
  321. ScreenGui.Parent = game.Players.LocalPlayer.PlayerGui
  322. TextButton.Parent = ScreenGui
  323. TextButton.BackgroundTransparency = 1
  324. TextButton.BackgroundColor3 = Color3.new(1, 1, 1)
  325. TextButton.Position = UDim2.new(0.35810867, 0, 0.874884784, 0)
  326. TextButton.Size = UDim2.new(0, 388, 0, 96)
  327. TextButton.Font = Enum.Font.SourceSansBold
  328. TextButton.Text = "Respawn"
  329. TextButton.TextColor3 = Color3.fromRGB(0, 0, 0)
  330. TextButton.TextScaled = true
  331. TextButton.TextSize = 14
  332. TextButton.TextTransparency = 1
  333. TextButton.TextWrapped = true
  334. -- Scripts
  335. for i = 1,200 do
  336. TextButton.TextTransparency = TextButton.TextTransparency - 0.005
  337. TextButton.BackgroundTransparency = TextButton.BackgroundTransparency - 0.005
  338. game:GetService("RunService").RenderStepped:wait()
  339. end
  340. local function respawn()
  341. ScreenGui:destroy()
  342. game.Players.LocalPlayer.Character.Archivable = true
  343. local clone = game.Players.LocalPlayer.Character:Clone()
  344. huum:SetStateEnabled("Dead", true)
  345. clone.Parent = workspace
  346. for i,v in pairs(game.Players.LocalPlayer.Character:GetChildren()) do
  347. if v.ClassName == "Part" or v.ClassName == "MeshPart" or v.ClassName == "Accesssory" or v.ClassName == "Hat" then
  348. v:destroy()
  349. end
  350. end
  351. for z,x in pairs(clone:GetChildren()) do
  352. if x.ClassName == "Accessory" then
  353. local handle = x:findFirstChild("Handle")
  354. if handle then
  355. local attachment = handle:findFirstChildOfClass("Attachment")
  356. if attachment then
  357. for q,w in pairs(clone:GetChildren()) do
  358. if w.Name == "Torso" or w.Name == "Head" then
  359. local anotherone = w:findFirstChild(attachment.Name)
  360. if attachment and anotherone then
  361. local constraint = Instance.new("HingeConstraint", clone) --making fake weld
  362. constraint.Attachment0 = attachment
  363. constraint.Attachment1 = anotherone
  364. constraint.LimitsEnabled = true
  365. constraint.LowerAngle = 0
  366. constraint.UpperAngle = 0
  367. end
  368. end
  369. end
  370. end
  371. end
  372. end
  373. end
  374. for i = 1,100 do
  375. aaa.Volume = aaa.Volume - 0.1
  376. game:GetService("RunService").RenderStepped:wait()
  377. end
  378.  
  379. end
  380. TextButton.MouseButton1Click:connect(respawn)
  381.  
  382. end
  383. end
  384. mouse.Button1Down:connect(endit)
  385. --Just fucking kill me already.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement