Advertisement
WagnerJunio07

Suicide Gun FE TEST

May 9th, 2019
368
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.69 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 = game:GetService("Players").LocalPlayer
  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 = Player:GetMouse()
  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.  
  87. --Windows95/FR34KY
  88.  
  89. --my scripting sux
  90.  
  91. --also vouch pls
  92.  
  93. --Edited to be more fe
  94.  
  95. --ragdoll sometimes does not work
  96. debounce = 0;
  97.  
  98.  
  99.  
  100.  
  101. local player = owner
  102. repeat wait() until player.Character.Humanoid
  103. local humanoid = owner.Character.Humanoid
  104. --owner.Character.Shirt.ShirtTemplate='rbxassetid://473465498'
  105. local player=owner;
  106. local char=owner.Character;
  107. local humanoid = player.Character.Humanoid;
  108. Tool=Instance.new('Tool', owner.Backpack);
  109. Tool.GripRight=Vector3.new(-0.816, 0, 0.577);
  110. Tool.GripUp=Vector3.new(-0.027, 0.996, -0.089);
  111. Tool.GripPos=Vector3.new(-0.3, -0.4, 0.4);
  112. Tool.GripForward=Vector3.new(-1, 0, -0); --0.485, 0.14, -0.863
  113. Tool.Name='Suicide';
  114. Handle=Instance.new('Part', Tool);
  115. Handle.Name = 'Handle';
  116. Handle.BrickColor=BrickColor.new('Really black')
  117. Handle.Size=Vector3.new(0.26, 1.11, 4.85);
  118. Handle.Position=Vector3.new(-18.53, 0.555, -16.825)
  119. gunfire=Instance.new('Part', Tool)
  120. gunfire.Name='GunFire'
  121. gunfire.Size=Vector3.new(0.2, 0.2, 0.2)
  122. gunfire.Transparency=1
  123. gunfire.Position=Vector3.new(-18.56, 1.1, -19.35)
  124. gunfirefx=Instance.new('BillboardGui', gunfire)
  125. gunfirefx.Enabled=false
  126. gunfirefx.Adornee = gunfire
  127. gunfirefx.Size=UDim2.new(1.1, 0, 1.1, 0)
  128. gunfirefx2=Instance.new('ImageLabel', gunfirefx)
  129. gunfirefx2.Image='http://www.roblox.com/asset/?id=117472237'
  130. gunfirefx2.BackgroundTransparency=1
  131. gunfirefx2.Size=UDim2.new(1.2, 0, 1.2, 0)
  132.  
  133. shootsound=Instance.new('Sound', char.Torso)
  134. shootsound.Volume=8
  135. shootsound.SoundId='rbxassetid://230622620'
  136. c4mesh=Instance.new('SpecialMesh', Handle);
  137. c4mesh.MeshType = 'FileMesh';
  138. c4mesh.MeshId='http://www.roblox.com/asset/?id=95356090';
  139. c4mesh.TextureId='http://www.roblox.com/asset/?id=95387789';
  140. c4mesh.Scale=Vector3.new(1.8, 1.8, 1.8);
  141.  
  142. local anim5 = Instance.new("Animation", player.Character)
  143. anim5.AnimationId = "http://www.roblox.com/asset/?id=95383474"
  144. local playAnim10 = humanoid:LoadAnimation(anim5)
  145.  
  146. Tool.GripRight=Vector3.new(-0.816, 0, 0.577)
  147.  
  148. function equipped()
  149. wait()
  150. playAnim10:Play()
  151. end
  152.  
  153. function unequipped()
  154. wait()
  155. playAnim10:Stop()
  156. end
  157.  
  158. Tool.Equipped:connect(equipped)
  159. Tool.Unequipped:connect(unequipped)
  160.  
  161. light=Instance.new('PointLight', Handle);
  162. light.Color = Color3.new(255, 255, 0)
  163. light.Range=10;
  164. light.Enabled=false;
  165.  
  166.  
  167. function Shoot()
  168. --Credit to CyclicaIIy for this amazing script
  169. LocalPlayer = owner
  170. --owner.Character.Humanoid:MoveTo(owner.Character.HumanoidRootPart.Position + owner.Character.HumanoidRootPart.CFrame.lookVector * 10)
  171. --owner.Character.Humanoid.Jump = true
  172. wait(0.5)
  173. owner.Character.Head.Splash.Playing = true shootsound:Play()
  174. owner.Character.Humanoid.PlatformStand = true
  175. if owner.Character.Torso then
  176. local bambam = Instance.new("BodyThrust")
  177. bambam.Parent = owner.Character.HumanoidRootPart
  178. bambam.Force = Vector3.new(0, 1300, 0)
  179. bambam.Location = owner.Character.HumanoidRootPart.Position
  180. else
  181. local bambamm = Instance.new("BodyThrust")
  182. bambamm.Parent = owner.Character.HumanoidRootPart
  183. bambamm.Force = Vector3.new(0, 1300, 0)
  184. bambamm.Location = owner.Character.HumanoidRootPart.Position
  185. wait(0.1)
  186. bambamm:Destroy()
  187. wait(5)
  188. owner.Character.Humanoid.Health = 0
  189. end
  190.  
  191. function Iterate(instance, func)
  192. for i, v in next, instance:GetChildren() do
  193. func(v)
  194. end
  195. end
  196. limbs = {
  197. ["Right Leg"] = true;
  198. ["Right Arm"] = true;
  199. ["Left Leg"] = true;
  200. ["Left Arm"] = true;
  201. }
  202. Iterate(owner.Character, function(v)
  203. if v:IsA("BasePart") then
  204. local attachment = Instance.new("Attachment")
  205. attachment.Parent = v
  206. attachment.Name = (v.Name .. "[Attachment]")
  207. if limbs[v.Name] then
  208. attachment.Position = Vector3.new(0, v.Size.Y/2, 0)
  209. elseif v.Name == "Head" then
  210. attachment.Position = Vector3.new(0, -v.Size.Y/2, 0)
  211. attachment.Rotation = Vector3.new(0, 0, -90)
  212. end
  213. end
  214. end)
  215. local leftLegAttachment = Instance.new("Attachment")
  216. leftLegAttachment.Position = Vector3.new(-.5, -1, 0)
  217. leftLegAttachment.Rotation = Vector3.new(0, -90, 0)
  218. local rightLegAttachment = Instance.new("Attachment")
  219. rightLegAttachment.Position = Vector3.new(.5, -1, 0)
  220. rightLegAttachment.Rotation = Vector3.new(0, -90, 0)
  221. rightLegAttachment.Parent, leftLegAttachment.Parent = owner.Character.Torso, owner.Character.Torso
  222. jointAttachments = {
  223. ['Head'] = {
  224. ['Attachment0'] = owner.Character.Torso['NeckAttachment'];
  225. ['Attachment1'] = owner.Character.Head['Head[Attachment]'];
  226. };
  227. ['Left Arm'] = {
  228. ['Attachment0'] = owner.Character.Torso['LeftCollarAttachment'];
  229. ['Attachment1'] = owner.Character['Left Arm']['Left Arm[Attachment]'];
  230. };
  231. ['Right Arm'] = {
  232. ['Attachment0'] = owner.Character.Torso['RightCollarAttachment'];
  233. ['Attachment1'] = owner.Character['Right Arm']['Right Arm[Attachment]'];
  234. };
  235. ['Left Leg'] = {
  236. ['Attachment0'] = leftLegAttachment;
  237. ['Attachment1'] = owner.Character['Left Leg']['Left Leg[Attachment]'];
  238. };
  239. ['Right Leg'] = {
  240. ['Attachment0'] = rightLegAttachment;
  241. ['Attachment1'] = owner.Character['Right Leg']['Right Leg[Attachment]'];
  242. };
  243. }
  244. owner.Character.Humanoid.PlatformStand = true
  245. Iterate(owner.Character, function(v)
  246. if v:IsA("BasePart") then
  247. if jointAttachments[v.Name] then
  248. local ballSocketJoint = Instance.new("BallSocketConstraint")
  249. ballSocketJoint.Parent = v
  250. ballSocketJoint.Radius = 0.15
  251. ballSocketJoint.Attachment0, ballSocketJoint.Attachment1 = jointAttachments[v.Name]['Attachment0'], jointAttachments[v.Name]['Attachment1']
  252. end
  253. end
  254. end)
  255. Iterate(owner.Character.Torso, function(v)
  256. if v:IsA("Motor") then
  257. v:Remove()
  258. end
  259. end)
  260. end
  261. Tool.Activated:connect(Shoot)
  262.  
  263. --ragdoll
  264.  
  265. print("XDXDXD")
  266. --You don't need to edit this!
  267.  
  268. Character = player.Character
  269. Humanoid = Character.Humanoid
  270. Torso = Character.Torso
  271. mode = Instance.new("Model")
  272. mode.Name = ""
  273. mode.Parent = game.Workspace
  274.  
  275. function OnDeath()
  276.  
  277. print("Death Suicide")
  278.  
  279. end
  280.  
  281. Humanoid.Died:connect(OnDeath)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement