hecknes

Wave kame

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