JacksoMykalJunior

TEST BANISH OR ANOTHER?

Mar 8th, 2019
142
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.05 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,Mouse,mouse,UserInputService,ContextActionService = owner
  3. do
  4. print("FE Covered By Red_Jack142 | FE Made By Red_Jack142")
  5. print("Have Fun!")
  6. script.Parent = Player.Character
  7.  
  8. --RemoteEvent for communicating
  9. local Event = Instance.new("RemoteEvent")
  10. Event.Name = "UserInput_Event"
  11.  
  12. --Fake event to make stuff like Mouse.KeyDown work
  13. local function fakeEvent()
  14. local t = {_fakeEvent=true,Connect=function(self,f)self.Function=f end}
  15. t.connect = t.Connect
  16. return t
  17. end
  18.  
  19. --Creating fake input objects with fake variables
  20. local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent()}
  21. local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
  22. local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
  23. CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
  24. end}
  25. --Merged 2 functions into one by checking amount of arguments
  26. CAS.UnbindAction = CAS.BindAction
  27.  
  28. --This function will trigger the events that have been :Connect()'ed
  29. local function te(self,ev,...)
  30. local t = m[ev]
  31. if t and t._fakeEvent and t.Function then
  32. t.Function(...)
  33. end
  34. end
  35. m.TrigEvent = te
  36. UIS.TrigEvent = te
  37.  
  38. Event.OnServerEvent:Connect(function(plr,io)
  39. if plr~=Player then return end
  40. if io.isMouse then
  41. m.Target = io.Target
  42. m.Hit = io.Hit
  43. else
  44. local b = io.UserInputState == Enum.UserInputState.Begin
  45. if io.UserInputType == Enum.UserInputType.MouseButton1 then
  46. return m:TrigEvent(b and "Button1Down" or "Button1Up")
  47. end
  48. for _,t in pairs(CAS.Actions) do
  49. for _,k in pairs(t.Keys) do
  50. if k==io.KeyCode then
  51. t.Function(t.Name,io.UserInputState,io)
  52. end
  53. end
  54. end
  55. m:TrigEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
  56. UIS:TrigEvent(b and "InputBegan" or "InputEnded",io,false)
  57. end
  58. end)
  59. Event.Parent = NLS([==[
  60. local Player = owner
  61. local Event = script:WaitForChild("UserInput_Event")
  62.  
  63. local UIS = game:GetService("UserInputService")
  64. local input = function(io,a)
  65. if a then return end
  66. --Since InputObject is a client-side instance, we create and pass table instead
  67. Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState})
  68. end
  69. UIS.InputBegan:Connect(input)
  70. UIS.InputEnded:Connect(input)
  71.  
  72. local Mouse = Player:GetMouse()
  73. local h,t
  74. --Give the server mouse data 30 times every second, but only if the values changed
  75. --If player is not moving their mouse, client won't fire events
  76. while wait(1/30) do
  77. if h~=Mouse.Hit or t~=Mouse.Target then
  78. h,t=Mouse.Hit,Mouse.Target
  79. Event:FireServer({isMouse=true,Target=t,Hit=h})
  80. end
  81. end]==],Player.Character)
  82. Mouse,mouse,UserInputService,ContextActionService = m,m,UIS,CAS
  83. end
  84.  
  85.  
  86. ----------------------------------------
  87. -- Originally made by Alfederate :D --
  88. ----------------------------------------
  89.  
  90. -- there's no time to explain! --
  91.  
  92. local new=Instance.new
  93. local rad=math.rad
  94. local cf=CFrame.new
  95. local v3=Vector3.new
  96. local ang=function(x,y,z)
  97. return CFrame.Angles(rad(x),rad(y),rad(z))
  98. end
  99. local player=owner
  100. local char=player.Character
  101. local cam=workspace.Camera
  102. local weld=function(a,b,c0,c1)
  103. m=Instance.new('Motor',a)
  104. m.Part0=a
  105. m.Part1=b
  106. m.C0=c0
  107. m.C1=c1
  108. return m
  109. end
  110.  
  111. start='rbxassetid://592555095'
  112. snd='rbxassetid://594472043'
  113. beamm=Instance.new('Model',workspace)
  114. beamm.Name='beam'
  115.  
  116. laser=false
  117.  
  118. rs=Instance.new('Part',char)
  119. rs.Transparency=1
  120. rs.CanCollide=false
  121. rs.TopSurface,rs.BottomSurface=0,0
  122. rs.FormFactor=3
  123. rs.Size=Vector3.new(.5,.5,.5)
  124.  
  125. ls=rs:Clone()
  126. ls.Parent=char
  127.  
  128. rsw=weld(rs,char.Torso,cf(-1,-.5,0),cf())
  129. lsw=weld(ls,char.Torso,cf(1,-.5,0),cf())
  130. raw=weld(char['Right Arm'],rs,cf(-.5,.6,-.14),ang(90,0,-8))
  131. law=weld(char['Left Arm'],ls,cf(-.3,1.5,-.14),ang(90,0,43))
  132.  
  133. vol=1
  134.  
  135. s1=Instance.new('Sound',char)
  136. s1.Volume=vol
  137. s1.Pitch=1
  138. s1.Looped=true
  139. s1.SoundId=snd
  140.  
  141. s2=Instance.new('Sound',char)
  142. s2.Volume=vol
  143. s2.Pitch=1
  144. s2.Looped=true
  145. s2.SoundId=start
  146.  
  147. s2:play()
  148.  
  149. particles={}
  150.  
  151. local wep=new('Part',char)
  152. wep.FormFactor=3
  153. wep.CanCollide=false
  154. wep.Size=v3(1,3,1)
  155. wep.TopSurface,wep.BottomSurface=0,0
  156. local wepw=weld(wep,char['Right Arm'],cf(.26,.4,.7),ang(0,0,8))
  157.  
  158. local beam=wep:Clone()
  159. beam:ClearAllChildren()
  160. beam.Material='Neon'
  161. beam.BrickColor=BrickColor.new('Electric blue')
  162. beam.Size=Vector3.new(3,3,1)
  163. beam.Transparency=.5
  164. beam.Anchored=true
  165. local ms=Instance.new('BlockMesh',beam)
  166. local inner=beam:Clone()
  167. inner.Transparency=0
  168. inner.Material='SmoothPlastic'
  169. inner.BrickColor=BrickColor.new('Green')
  170. local ms2=inner.Mesh
  171.  
  172. local expl=inner:Clone()
  173. expl.Mesh:Destroy()
  174. expl.Material='Neon'
  175. expl.BrickColor=BrickColor.new('Really red')
  176. expl.Size=Vector3.new(11,11,11)
  177. expl.Transparency=.55
  178. pl=Instance.new('PointLight',expl)
  179. pl.Color=expl.BrickColor.Color
  180. pl.Range=pl.Range*2
  181. pl.Name='light'
  182. local br=pl.Range
  183.  
  184. local exa=expl:Clone()
  185. exa.Size=Vector3.new(4,4,4)
  186. pl2=exa.light
  187.  
  188. local part=exa:Clone()
  189. part.Size=Vector3.new(1.5,1.5,1.5)
  190. pl3=part.light
  191. pms=Instance.new('BlockMesh',part)
  192.  
  193. char.Humanoid.Died:connect(function()
  194. laser=false
  195. beam.Parent=nil
  196. inner.Parent=nil
  197. expl.Parent=nil
  198. exa.Parent=nil
  199. s2:stop()
  200. s1:stop()
  201. end)
  202.  
  203. mouse.Button1Down:connect(function() if char.Humanoid.Health~=0 then
  204. laser=true
  205. s1:play()
  206. s2:stop()
  207. end end)
  208. mouse.Button1Up:connect(function()
  209. laser=false
  210. beam.Parent=nil
  211. inner.Parent=nil
  212. expl.Parent=nil
  213. exa.Parent=nil
  214. s1:stop()
  215. s2:play()
  216. end)
  217.  
  218. parti=0
  219. game:service'RunService'.Stepped:connect(function()
  220. parti=parti+1
  221. for i,v in pairs(particles) do
  222. v.CFrame=v.CFrame*CFrame.new(0,0,-.3)
  223. v.Transparency=v.Transparency+.08
  224. if v.Transparency >= 1 then
  225. v:Destroy()
  226. table.remove(particles,i)
  227. else
  228. v.Parent=beamm
  229. end
  230. end
  231. a=cam.CoordinateFrame.p
  232. b=mouse.Hit.p
  233. mhitr=Ray.new(a,(b-a).unit*999)
  234. mhit,ps=workspace:FindPartOnRayWithIgnoreList(mhitr,{char,beamm})
  235. raw.C1=ang(90+(mouse.Hit.lookVector.y*90),0,-8)
  236. law.C1=ang(90+(mouse.Hit.lookVector.y*90),0,43)
  237. if not char.Humanoid.Sit and not char.Humanoid.PlatformStand then
  238. char.Torso.CFrame=CFrame.new(char.Torso.CFrame.p,Vector3.new(ps.x,char.Torso.CFrame.p.y,ps.z))
  239. end
  240. if laser then
  241. beamm.Parent=workspace
  242. beam.Parent=beamm
  243. inner.Parent=beamm
  244. expl.Parent=beamm
  245. exa.Parent=beamm
  246. s1.Volume=s1.Volume-.0
  247.  
  248. ray=Ray.new((wep.CFrame*cf(0,-1.5,0)).p,((wep.CFrame*cf(0,-10,0)).p-(wep.CFrame*cf(0,-1.5,0)).p).unit*999)
  249. hit,pos=workspace:FindPartOnRayWithIgnoreList(ray,{char,beamm})
  250.  
  251. if hit and hit.Parent:findFirstChild('Humanoid') and s1.Volume > .3 and parti/8==math.floor(parti/8) then
  252. Instance.new('Explosion',workspace).Position=pos
  253. end
  254. if hit and hit.Parent==workspace.Terrain or hit==workspace.Terrain and parti/8==math.floor(parti/8) then
  255. e=Instance.new('Explosion',workspace)
  256. e.Position=pos
  257. e.BlastRadius=14
  258. e.BlastPressure=1e4
  259. end
  260. if hit and not hit.Anchored and not (hit:GetMass()>1e4) then
  261. hit.Velocity=hit.Velocity+beam.CFrame.lookVector*(1*s1.Volume*hit:GetMass())
  262. end
  263.  
  264. if parti==math.floor(parti) then
  265. par=part:Clone()
  266. table.insert(particles,par)
  267. par.Parent=beamm
  268. par.Transparency=1-s1.Volume
  269. par.light.Range=br*s1.Volume
  270. par.CFrame=cf(pos)*ang(math.random(-180,180),math.random(-180,180),math.random(-180,180))*cf(0,0,-10)
  271. end
  272.  
  273. mag=((wep.CFrame*cf(0,-1.5,0)).p-pos).magnitude
  274. ms.Scale=v3(s1.Volume,s1.Volume,mag)
  275. ms2.Scale=v3(ms.Scale.x/2,ms.Scale.y/2,mag-(.1/mag))
  276. beam.CFrame=cf((wep.CFrame*cf(0,-1.5,0)).p,pos)*cf(0,0,-mag/2)*ang(0,0,math.random(0,180))
  277. inner.CFrame=beam.CFrame
  278. pl.Range=br*s1.Volume
  279. pl2.Range=br*s1.Volume
  280. expl.Size=v3(math.random(9,13),math.random(9,13),math.random(9,13))*s1.Volume
  281. expl.Transparency=math.random(40,60)/100
  282. expl.CFrame=cf(pos)*ang(math.random(0,180),math.random(0,180),math.random(0,180))
  283. exa.Size=v3(4,4,4)*s1.Volume
  284. exa.CFrame=wep.CFrame*cf(0,-1.5,0)*ang(math.random(0,180),math.random(0,180),math.random(0,180))
  285. char.Torso.Velocity=char.Torso.Velocity-beam.CFrame.lookVector*(7*s1.Volume)
  286. end
  287. end)
Add Comment
Please, Sign In to add comment