Advertisement
DarkScriptZEditors

Gan gan Gands

Dec 20th, 2018
254
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 12.96 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(),Button2Up=fakeEvent(),Button2Down=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. if io.UserInputType == Enum.UserInputType.MouseButton2 then
  51. return m:TrigEvent(b and "Button2Down" or "Button2Up")
  52. end
  53. for _,t in pairs(CAS.Actions) do
  54. for _,k in pairs(t.Keys) do
  55. if k==io.KeyCode then
  56. t.Function(t.Name,io.UserInputState,io)
  57. end
  58. end
  59. end
  60. m:TrigEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
  61. UIS:TrigEvent(b and "InputBegan" or "InputEnded",io,false)
  62. end
  63. end)
  64. Event.Parent = NLS([==[
  65. local Player = game:GetService("Players").LocalPlayer
  66. local Event = script:WaitForChild("UserInput_Event")
  67. local Mouse = Player:GetMouse()
  68. local UIS = game:GetService("UserInputService")
  69. local input = function(io,a)
  70. if a then return end
  71. --Since InputObject is a client-side instance, we create and pass table instead
  72. Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState,Hit=Mouse.Hit,Target=Mouse.Target})
  73. end
  74. UIS.InputBegan:Connect(input)
  75. UIS.InputEnded:Connect(input)
  76. local h,t
  77. --Give the server mouse data 30 times every second, but only if the values changed
  78. --If player is not moving their mouse, client won't fire events
  79. while wait(1/30) do
  80. if h~=Mouse.Hit or t~=Mouse.Target then
  81. h,t=Mouse.Hit,Mouse.Target
  82. Event:FireServer({isMouse=true,Target=t,Hit=h})
  83. end
  84. end]==],Player.Character)
  85.  
  86. ----Sandboxed game object that allows the usage of client-side methods and services
  87. --Real game object
  88. local _rg = game
  89.  
  90. --Metatable for fake service
  91. local fsmt = {
  92. __index = function(self,k)
  93. local s = rawget(self,"_RealService")
  94. if s then
  95. return typeof(s[k])=="function"
  96. and function(_,...)return s[k](s,...)end or s[k]
  97. end
  98. end,
  99. __newindex = function(self,k,v)
  100. local s = rawget(self,"_RealService")
  101. if s then s[k]=v 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 rawget(self,s) or _rg:GetService(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. RunService = FakeService({
  120. _btrs = {},
  121. RenderStepped = _rg:GetService("RunService").Heartbeat,
  122. BindToRenderStep = function(self,name,_,fun)
  123. self._btrs[name] = self.Heartbeat:Connect(fun)
  124. end,
  125. UnbindFromRenderStep = function(self,name)
  126. self._btrs[name]:Disconnect()
  127. end,
  128. },"RunService")
  129. }
  130. rawset(g.Players,"localPlayer",g.Players.LocalPlayer)
  131. g.service = g.GetService
  132. FakeService(g,game)
  133. --Changing owner to fake player object to support owner:GetMouse()
  134. game,owner = g,g.Players.LocalPlayer
  135. end
  136. --By Rufus14
  137. mouse = game.Players.LocalPlayer:GetMouse()
  138. gun = Instance.new("Part", game.Players.LocalPlayer.Character)
  139. gun.Size = Vector3.new(0.5, 1, 2)
  140. gun.CanCollide = false
  141. gun:BreakJoints()
  142. weld = Instance.new("Weld", gun)
  143. weld.Part0 = game.Players.LocalPlayer.Character["Right Arm"]
  144. weld.Part1 = gun
  145. weld.C0 = weld.C0 * CFrame.new(-0.2,-1.7,-0.25) * CFrame.Angles(0,1.6,-1.53)
  146. mesh = Instance.new("SpecialMesh", gun)
  147. mesh.MeshId = "rbxassetid://623102664"
  148. mesh.TextureId = "rbxassetid://623102879"
  149. mesh.Scale = Vector3.new(0.01,0.01,0.01)
  150. local rhandweld = Instance.new("Weld", game.Players.LocalPlayer.Character.Torso)
  151. rhandweld.Part0 = game.Players.LocalPlayer.Character.Torso
  152. rhandweld.Part1 = game.Players.LocalPlayer.Character["Right Arm"]
  153. rhandweld.C0 = CFrame.new(1.5, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)
  154. rhandweld.C1 = CFrame.new(0, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)
  155. shooting = false
  156. for i = 1,2 do
  157. wait()
  158. rhandweld.C0 = rhandweld.C0 * CFrame.Angles(0,0,0.03)
  159. end
  160. for i = 1,2 do
  161. wait()
  162. rhandweld.C0 = rhandweld.C0 * CFrame.Angles(0,0,0.07)
  163. end
  164. for i = 1,7 do
  165. wait()
  166. rhandweld.C0 = rhandweld.C0 * CFrame.Angles(0,0,0.17)
  167. end
  168. for i = 1,2 do
  169. wait()
  170. rhandweld.C0 = rhandweld.C0 * CFrame.Angles(0,0,0.07)
  171. end
  172. for i = 1,2 do
  173. wait()
  174. rhandweld.C0 = rhandweld.C0 * CFrame.Angles(0,0,0.03)
  175. end
  176. function shoot()
  177. if not shooting then
  178. shooting = true
  179. local shotsound = Instance.new("Sound", gun)
  180. shotsound.EmitterSize = 1
  181. shotsound.SoundId = "rbxassetid://139593133"
  182. shotsound.Volume = 3
  183. shotsound:Play()
  184. local missle = Instance.new("Part", workspace)
  185. missle.Size = Vector3.new(0.05,0.05,0.05)
  186. missle.BrickColor = BrickColor.new("New Yeller")
  187. missle:BreakJoints()
  188. missle.CFrame = gun.CFrame
  189. local velo = Instance.new("BodyVelocity", missle)
  190. velo.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
  191. velo.Velocity = mouse.Hit.lookVector * 190
  192. for i = 1,2 do
  193. weld.C0 = weld.C0 * CFrame.Angles(0,0,0.14)
  194. rhandweld.C0 = rhandweld.C0 * CFrame.Angles(0,0,0.14)
  195. end
  196. for i = 1,2 do
  197. wait()
  198. weld.C0 = weld.C0 * CFrame.Angles(0,0,-0.07)
  199. rhandweld.C0 = rhandweld.C0 * CFrame.Angles(0,0,-0.07)
  200. end
  201. local function kill(part)
  202. local hum = part.Parent:findFirstChild("Humanoid")
  203. local torso = part.Parent:findFirstChild("Torso")
  204. local larm = part.Parent:findFirstChild("Left Arm")
  205. local rarm = part.Parent:findFirstChild("Right Arm")
  206. local lleg = part.Parent:findFirstChild("Left Leg")
  207. local rleg = part.Parent:findFirstChild("Right Leg")
  208. missle:destroy()
  209. if hum ~= nil then
  210. if torso then
  211. hum.Health = hum.Health - math.random(25,68)
  212. local shotsound1 = Instance.new("Sound", torso)
  213. shotsound1:Play()
  214. shotsound1.EmitterSize = 1
  215. shotsound1.SoundId = "rbxassetid://144884872"
  216. shotsound1.Volume = 2
  217. shotsound1:Play()
  218. local shotsound1 = Instance.new("Sound", torso)
  219. shotsound1:Play()
  220. shotsound1.EmitterSize = 1
  221. shotsound1.SoundId = "rbxassetid://175272131"
  222. shotsound1.Volume = 2
  223. shotsound1:Play()
  224. using = false
  225. hit = Instance.new("Sound", torso)
  226. hit.SoundId = "rbxassetid://260430060"
  227. hit.Volume = 5
  228. hit1 = Instance.new("Sound", torso)
  229. hit1.SoundId = "rbxassetid://138087186"
  230. hit1.Volume = 5
  231. hit2 = Instance.new("Sound", torso)
  232. hit2.SoundId = "rbxassetid://131237241"
  233. hit2.Volume = 5
  234. hit3 = Instance.new("Sound", torso)
  235. hit3.SoundId = "rbxassetid://278062209"
  236. hit3.Volume = 5
  237. hit3.TimePosition = 0.33
  238. print("You killed "..hum.Parent.Name)
  239. hum.PlatformStand = true
  240. ----------
  241. local lhip = torso:findFirstChild("Left Hip")
  242. if lhip then
  243. ---
  244. torso["Left Hip"]:destroy()
  245. local head = game.Players.LocalPlayer.Character.Head
  246. local glue = Instance.new("Glue", torso)
  247. glue.Part0 = torso
  248. glue.Part1 = torso.Parent["Left Leg"]
  249. glue.Name = "Left leg"
  250. local collider = Instance.new("Part", torso.Parent["Left Leg"])
  251. collider.Position = Vector3.new(0,999,0)
  252. collider.Size = Vector3.new(1.7, 1, 1)
  253. collider.Shape = "Cylinder"
  254. local weld = Instance.new("Weld", collider)
  255. weld.Part0 = torso.Parent["Left Leg"]
  256. weld.Part1 = collider
  257. weld.C0 = CFrame.Angles(0, 0, 80)
  258. collider.TopSurface = "Smooth"
  259. collider.BottomSurface = "Smooth"
  260. collider.formFactor = "Symmetric"
  261. glue.C0 = CFrame.new(-0.5, -1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
  262. glue.C1 = CFrame.new(-0, 1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
  263. collider.Transparency = 1
  264. end
  265. local rhip = torso:findFirstChild("Right Hip")
  266. if rhip then
  267. ------------
  268. torso["Right Hip"]:destroy()
  269. local glue1 = Instance.new("Glue", torso)
  270. glue1.Part0 = torso
  271. glue1.Part1 = torso.Parent["Right Leg"]
  272. glue1.Name = "Right leg"
  273. local collider1 = Instance.new("Part", torso.Parent["Right Leg"])
  274. collider1.Position = Vector3.new(0,9999,0)
  275. collider1.Size = Vector3.new(1.7, 1, 1)
  276. collider1.Shape = "Cylinder"
  277. local weld1 = Instance.new("Weld", collider1)
  278. weld1.Part0 = torso.Parent["Right Leg"]
  279. weld1.Part1 = collider1
  280. weld1.C0 = CFrame.Angles(0, 0, 80)
  281. collider1.TopSurface = "Smooth"
  282. collider1.BottomSurface = "Smooth"
  283. collider1.formFactor = "Symmetric"
  284. glue1.C0 = CFrame.new(0.5, -1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  285. glue1.C1 = CFrame.new(0, 1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  286. collider1.Transparency = 1
  287. end
  288. ------------
  289. local rshoulder = torso:findFirstChild("Right Shoulder")
  290. if rshoulder then
  291. torso["Right Shoulder"]:destroy()
  292. local glue11 = Instance.new("Glue", torso)
  293. glue11.Part0 = torso
  294. glue11.Part1 = torso.Parent["Right Arm"]
  295. glue11.Name = "Right shoulder"
  296. local collider11 = Instance.new("Part", torso.Parent["Right Arm"])
  297. collider11.Position = Vector3.new(0,9999,0)
  298. collider11.Size = Vector3.new(1.8,1,1)
  299. collider11.Shape = "Cylinder"
  300. local weld11 = Instance.new("Weld", collider11)
  301. weld11.Part0 = torso.Parent["Right Arm"]
  302. weld11.Part1 = collider11
  303. weld11.C0 = CFrame.Angles(0, 0, 80)
  304. collider11.TopSurface = "Smooth"
  305. collider11.BottomSurface = "Smooth"
  306. collider11.formFactor = "Symmetric"
  307. glue11.C0 = CFrame.new(1.5, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)
  308. glue11.C1 = CFrame.new(0, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)
  309. collider11.Transparency = 1
  310. end
  311. ------------
  312. local lshoulder = torso:findFirstChild("Left Shoulder")
  313. if lshoulder then
  314. torso["Left Shoulder"]:destroy()
  315. local glue111 = Instance.new("Glue", torso)
  316. glue111.Part0 = torso
  317. glue111.Part1 = torso.Parent["Left Arm"]
  318. glue111.Name = "Left shoulder"
  319. local collider111 = Instance.new("Part", torso.Parent["Left Arm"])
  320. collider111.Position = Vector3.new(0,9999,0)
  321. collider111.Size = Vector3.new(1.8,1,1)
  322. collider111.Shape = "Cylinder"
  323. local weld111 = Instance.new("Weld", collider111)
  324. weld111.Part0 = torso.Parent["Left Arm"]
  325. weld111.Part1 = collider111
  326. weld111.C0 = CFrame.Angles(0, 0, 80)
  327. collider111.TopSurface = "Smooth"
  328. collider111.BottomSurface = "Smooth"
  329. collider111.formFactor = "Symmetric"
  330. glue111.C0 = CFrame.new(-1.5, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  331. glue111.C1 = CFrame.new(0, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  332. collider111.Transparency = 1
  333. end
  334. -----------------
  335. local sensoring = Instance.new("Part", torso)
  336. sensoring.Size = Vector3.new(1.2,1.1,0.8)
  337. sensoring.CanCollide = false
  338. sensoring.Position = torso.Position
  339. local welder = Instance.new("Weld", sensoring)
  340. welder.Part0 = torso
  341. welder.Part1 = sensoring
  342. welder.C0 = welder.C0 * CFrame.new(0,0,1.05)
  343. sensoring.Transparency = 1
  344. -----------------
  345. local sensoring1 = Instance.new("Part", torso)
  346. sensoring1.Size = Vector3.new(1.2,1.1,0.8)
  347. sensoring1.CanCollide = false
  348. sensoring1.Position = torso.Position
  349. local welder1 = Instance.new("Weld", sensoring)
  350. welder1.Part0 = torso
  351. welder1.Part1 = sensoring1
  352. welder1.C0 = welder1.C0 * CFrame.new(0,0,-1.05)
  353. sensoring1.Transparency = 1
  354. local function touch()
  355. if not using then
  356. using = true
  357. local Math = math.random(1,4)
  358. if Math == 1 then
  359. hit:Play()
  360. end
  361. if Math == 2 then
  362. hit1:Play()
  363. end
  364. if Math == 3 then
  365. hit2:Play()
  366. end
  367. if Math == 4 then
  368. hit3:Play()
  369. end
  370. wait(0.1)
  371. using = false
  372. end
  373. end
  374. sensoring.Touched:connect(touch)
  375. sensoring1.Touched:connect(touch)
  376. while true do
  377. wait(0.3)
  378. hum.PlatformStand = true
  379. end
  380.  
  381. --di ent
  382. end
  383. end
  384. end
  385. missle.Touched:connect(kill)
  386. for i = 1,2 do
  387. wait()
  388. weld.C0 = weld.C0 * CFrame.Angles(0,0,-0.07)
  389. rhandweld.C0 = rhandweld.C0 * CFrame.Angles(0,0,-0.07)
  390. end
  391. shooting = false
  392. wait(3)
  393. shotsound:destroy()
  394. end
  395. end
  396. mouse.Button1Down:connect(shoot)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement