sawgamer1

Untitled

Apr 9th, 2019
162
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 11.46 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. --By Rufus14
  7. mouse = game.Players.LocalPlayer:GetMouse()
  8. gun = Instance.new("Part", game.Players.LocalPlayer.Character)
  9. gun.Size = Vector3.new(0.5, 1, 2)
  10. gun.CanCollide = false
  11. gun:BreakJoints()
  12. weld = Instance.new("Weld", gun)
  13. weld.Part0 = game.Players.LocalPlayer.Character["Right Arm"]
  14. weld.Part1 = gun
  15. weld.C0 = weld.C0 * CFrame.new(-0.2,-1.7,-0.25) * CFrame.Angles(0,1.6,-1.53)
  16. mesh = Instance.new("SpecialMesh", gun)
  17. mesh.MeshId = "rbxassetid://623102664"
  18. mesh.TextureId = "rbxassetid://623102879"
  19. mesh.Scale = Vector3.new(0.01,0.01,0.01)
  20. local rhandweld = Instance.new("Weld", game.Players.LocalPlayer.Character.Torso)
  21. rhandweld.Part0 = game.Players.LocalPlayer.Character.Torso
  22. rhandweld.Part1 = game.Players.LocalPlayer.Character["Right Arm"]
  23. rhandweld.C0 = CFrame.new(1.5, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)
  24. rhandweld.C1 = CFrame.new(0, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)
  25. shooting = false
  26. for i = 1,2 do
  27. wait()
  28. rhandweld.C0 = rhandweld.C0 * CFrame.Angles(0,0,0.03)
  29. end
  30. for i = 1,2 do
  31. wait()
  32. rhandweld.C0 = rhandweld.C0 * CFrame.Angles(0,0,0.07)
  33. end
  34. for i = 1,7 do
  35. wait()
  36. rhandweld.C0 = rhandweld.C0 * CFrame.Angles(0,0,0.17)
  37. end
  38. for i = 1,2 do
  39. wait()
  40. rhandweld.C0 = rhandweld.C0 * CFrame.Angles(0,0,0.07)
  41. end
  42. for i = 1,2 do
  43. wait()
  44. rhandweld.C0 = rhandweld.C0 * CFrame.Angles(0,0,0.03)
  45. end
  46. function shoot()
  47. if not shooting then
  48. shooting = true
  49. local shotsound = Instance.new("Sound", gun)
  50. shotsound.EmitterSize = 1
  51. shotsound.SoundId = "rbxassetid://139593133"
  52. shotsound.Volume = 3
  53. shotsound:Play()
  54. local missle = Instance.new("Part", workspace)
  55. missle.Size = Vector3.new(0.05,0.05,0.05)
  56. missle.BrickColor = BrickColor.new("New Yeller")
  57. missle:BreakJoints()
  58. missle.CFrame = gun.CFrame
  59. local velo = Instance.new("BodyVelocity", missle)
  60. velo.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
  61. velo.Velocity = mouse.Hit.lookVector * 190
  62. for i = 1,2 do
  63. weld.C0 = weld.C0 * CFrame.Angles(0,0,0.14)
  64. rhandweld.C0 = rhandweld.C0 * CFrame.Angles(0,0,0.14)
  65. end
  66. for i = 1,2 do
  67. wait()
  68. weld.C0 = weld.C0 * CFrame.Angles(0,0,-0.07)
  69. rhandweld.C0 = rhandweld.C0 * CFrame.Angles(0,0,-0.07)
  70. end
  71. local function kill(part)
  72. local hum = part.Parent:findFirstChild("Humanoid")
  73. local torso = part.Parent:findFirstChild("Torso")
  74. local larm = part.Parent:findFirstChild("Left Arm")
  75. local rarm = part.Parent:findFirstChild("Right Arm")
  76. local lleg = part.Parent:findFirstChild("Left Leg")
  77. local rleg = part.Parent:findFirstChild("Right Leg")
  78. missle:destroy()
  79. if hum ~= nil then
  80. if torso then
  81. hum.Health = hum.Health - math.random(25,68)
  82. local shotsound1 = Instance.new("Sound", torso)
  83. shotsound1:Play()
  84. shotsound1.EmitterSize = 1
  85. shotsound1.SoundId = "rbxassetid://144884872"
  86. shotsound1.Volume = 2
  87. shotsound1:Play()
  88. local shotsound1 = Instance.new("Sound", torso)
  89. shotsound1:Play()
  90. shotsound1.EmitterSize = 1
  91. shotsound1.SoundId = "rbxassetid://175272131"
  92. shotsound1.Volume = 2
  93. shotsound1:Play()
  94. using = false
  95. hit = Instance.new("Sound", torso)
  96. hit.SoundId = "rbxassetid://260430060"
  97. hit.Volume = 5
  98. hit1 = Instance.new("Sound", torso)
  99. hit1.SoundId = "rbxassetid://138087186"
  100. hit1.Volume = 5
  101. hit2 = Instance.new("Sound", torso)
  102. hit2.SoundId = "rbxassetid://131237241"
  103. hit2.Volume = 5
  104. hit3 = Instance.new("Sound", torso)
  105. hit3.SoundId = "rbxassetid://278062209"
  106. hit3.Volume = 5
  107. hit3.TimePosition = 0.33
  108. print("You killed "..hum.Parent.Name)
  109. hum.PlatformStand = true
  110. ----------
  111. local lhip = torso:findFirstChild("Left Hip")
  112. if lhip then
  113. ---
  114. torso["Left Hip"]:destroy()
  115. local head = game.Players.LocalPlayer.Character.Head
  116. local glue = Instance.new("Glue", torso)
  117. glue.Part0 = torso
  118. glue.Part1 = torso.Parent["Left Leg"]
  119. glue.Name = "Left leg"
  120. local collider = Instance.new("Part", torso.Parent["Left Leg"])
  121. collider.Position = Vector3.new(0,999,0)
  122. collider.Size = Vector3.new(1.7, 1, 1)
  123. collider.Shape = "Cylinder"
  124. local weld = Instance.new("Weld", collider)
  125. weld.Part0 = torso.Parent["Left Leg"]
  126. weld.Part1 = collider
  127. weld.C0 = CFrame.Angles(0, 0, 80)
  128. collider.TopSurface = "Smooth"
  129. collider.BottomSurface = "Smooth"
  130. collider.formFactor = "Symmetric"
  131. glue.C0 = CFrame.new(-0.5, -1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
  132. glue.C1 = CFrame.new(-0, 1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
  133. collider.Transparency = 1
  134. end
  135. local rhip = torso:findFirstChild("Right Hip")
  136. if rhip then
  137. ------------
  138. torso["Right Hip"]:destroy()
  139. local glue1 = Instance.new("Glue", torso)
  140. glue1.Part0 = torso
  141. glue1.Part1 = torso.Parent["Right Leg"]
  142. glue1.Name = "Right leg"
  143. local collider1 = Instance.new("Part", torso.Parent["Right Leg"])
  144. collider1.Position = Vector3.new(0,9999,0)
  145. collider1.Size = Vector3.new(1.7, 1, 1)
  146. collider1.Shape = "Cylinder"
  147. local weld1 = Instance.new("Weld", collider1)
  148. weld1.Part0 = torso.Parent["Right Leg"]
  149. weld1.Part1 = collider1
  150. weld1.C0 = CFrame.Angles(0, 0, 80)
  151. collider1.TopSurface = "Smooth"
  152. collider1.BottomSurface = "Smooth"
  153. collider1.formFactor = "Symmetric"
  154. glue1.C0 = CFrame.new(0.5, -1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  155. glue1.C1 = CFrame.new(0, 1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  156. collider1.Transparency = 1
  157. end
  158. ------------
  159. local rshoulder = torso:findFirstChild("Right Shoulder")
  160. if rshoulder then
  161. torso["Right Shoulder"]:destroy()
  162. local glue11 = Instance.new("Glue", torso)
  163. glue11.Part0 = torso
  164. glue11.Part1 = torso.Parent["Right Arm"]
  165. glue11.Name = "Right shoulder"
  166. local collider11 = Instance.new("Part", torso.Parent["Right Arm"])
  167. collider11.Position = Vector3.new(0,9999,0)
  168. collider11.Size = Vector3.new(1.8,1,1)
  169. collider11.Shape = "Cylinder"
  170. local weld11 = Instance.new("Weld", collider11)
  171. weld11.Part0 = torso.Parent["Right Arm"]
  172. weld11.Part1 = collider11
  173. weld11.C0 = CFrame.Angles(0, 0, 80)
  174. collider11.TopSurface = "Smooth"
  175. collider11.BottomSurface = "Smooth"
  176. collider11.formFactor = "Symmetric"
  177. glue11.C0 = CFrame.new(1.5, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)
  178. glue11.C1 = CFrame.new(0, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)
  179. collider11.Transparency = 1
  180. end
  181. ------------
  182. local lshoulder = torso:findFirstChild("Left Shoulder")
  183. if lshoulder then
  184. torso["Left Shoulder"]:destroy()
  185. local glue111 = Instance.new("Glue", torso)
  186. glue111.Part0 = torso
  187. glue111.Part1 = torso.Parent["Left Arm"]
  188. glue111.Name = "Left shoulder"
  189. local collider111 = Instance.new("Part", torso.Parent["Left Arm"])
  190. collider111.Position = Vector3.new(0,9999,0)
  191. collider111.Size = Vector3.new(1.8,1,1)
  192. collider111.Shape = "Cylinder"
  193. local weld111 = Instance.new("Weld", collider111)
  194. weld111.Part0 = torso.Parent["Left Arm"]
  195. weld111.Part1 = collider111
  196. weld111.C0 = CFrame.Angles(0, 0, 80)
  197. collider111.TopSurface = "Smooth"
  198. collider111.BottomSurface = "Smooth"
  199. collider111.formFactor = "Symmetric"
  200. glue111.C0 = CFrame.new(-1.5, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  201. glue111.C1 = CFrame.new(0, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  202. collider111.Transparency = 1
  203. end
  204. -----------------
  205. local sensoring = Instance.new("Part", torso)
  206. sensoring.Size = Vector3.new(1.2,1.1,0.8)
  207. sensoring.CanCollide = false
  208. sensoring.Position = torso.Position
  209. local welder = Instance.new("Weld", sensoring)
  210. welder.Part0 = torso
  211. welder.Part1 = sensoring
  212. welder.C0 = welder.C0 * CFrame.new(0,0,1.05)
  213. sensoring.Transparency = 1
  214. -----------------
  215. local sensoring1 = Instance.new("Part", torso)
  216. sensoring1.Size = Vector3.new(1.2,1.1,0.8)
  217. sensoring1.CanCollide = false
  218. sensoring1.Position = torso.Position
  219. local welder1 = Instance.new("Weld", sensoring)
  220. welder1.Part0 = torso
  221. welder1.Part1 = sensoring1
  222. welder1.C0 = welder1.C0 * CFrame.new(0,0,-1.05)
  223. sensoring1.Transparency = 1
  224. local function touch()
  225. if not using then
  226. using = true
  227. local Math = math.random(1,4)
  228. if Math == 1 then
  229. hit:Play()
  230. end
  231. if Math == 2 then
  232. hit1:Play()
  233. end
  234. if Math == 3 then
  235. hit2:Play()
  236. end
  237. if Math == 4 then
  238. hit3:Play()
  239. end
  240. wait(0.1)
  241. using = false
  242. end
  243. end
  244. sensoring.Touched:connect(touch)
  245. sensoring1.Touched:connect(touch)
  246. while true do
  247. wait(0.3)
  248. hum.PlatformStand = true
  249. end
  250.  
  251. --di ent
  252. end
  253. end
  254. end
  255. missle.Touched:connect(kill)
  256. for i = 1,2 do
  257. wait()
  258. weld.C0 = weld.C0 * CFrame.Angles(0,0,-0.07)
  259. rhandweld.C0 = rhandweld.C0 * CFrame.Angles(0,0,-0.07)
  260. end
  261. shooting = false
  262. wait(3)
  263. shotsound:destroy()
  264. end
  265. end
  266. mouse.Button1Down:connect(shoot)
Advertisement
Add Comment
Please, Sign In to add comment