Advertisement
lafur

Untitled

Jan 13th, 2019
157
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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,Mouse,mouse,UserInputService,ContextActionService = owner
  4. local RealPlayer = Player
  5. do print("FE Compatibility code by Mokiros")local a=RealPlayer;script.Parent=a.Character;local b=Instance.new("RemoteEvent")b.Name="UserInput_Event"local function c()local d={_fakeEvent=true,Functions={},Connect=function(self,e)table.insert(self.Functions,e)end}d.connect=d.Connect;return d end;local f={Target=nil,Hit=CFrame.new(),KeyUp=c(),KeyDown=c(),Button1Up=c(),Button1Down=c(),Button2Up=c(),Button2Down=c()}local g={InputBegan=c(),InputEnded=c()}local CAS={Actions={},BindAction=function(self,h,i,j,...)CAS.Actions[h]=i and{Name=h,Function=i,Keys={...}}or nil end}CAS.UnbindAction=CAS.BindAction;local function k(self,l,...)local d=f[l]if d and d._fakeEvent then for m,e in pairs(d.Functions)do e(...)end end end;f.TrigEvent=k;g.TrigEvent=k;b.OnServerEvent:Connect(function(n,o)if n~=a then return end;f.Target=o.Target;f.Hit=o.Hit;if not o.isMouse then local p=o.UserInputState==Enum.UserInputState.Begin;if o.UserInputType==Enum.UserInputType.MouseButton1 then return f:TrigEvent(p and"Button1Down"or"Button1Up")end;if o.UserInputType==Enum.UserInputType.MouseButton2 then return f:TrigEvent(p and"Button2Down"or"Button2Up")end;for m,d in pairs(CAS.Actions)do for m,q in pairs(d.Keys)do if q==o.KeyCode then d.Function(d.Name,o.UserInputState,o)end end end;f:TrigEvent(p and"KeyDown"or"KeyUp",o.KeyCode.Name:lower())g:TrigEvent(p and"InputBegan"or"InputEnded",o,false)end end)b.Parent=NLS([==[local a=game:GetService("Players").LocalPlayer;local b=script:WaitForChild("UserInput_Event")local c=a:GetMouse()local d=game:GetService("UserInputService")local e=function(f,g)if g then return end;b:FireServer({KeyCode=f.KeyCode,UserInputType=f.UserInputType,UserInputState=f.UserInputState,Hit=c.Hit,Target=c.Target})end;d.InputBegan:Connect(e)d.InputEnded:Connect(e)local h,i;while wait(1/30)do if h~=c.Hit or i~=c.Target then h,i=c.Hit,c.Target;b:FireServer({isMouse=true,Target=i,Hit=h})end end]==],Player.Character)local r=game;local s={__index=function(self,q)local t=rawget(self,"_RealService")if t then return typeof(t[q])=="function"and function(m,...)return t[q](t,...)end or t[q]end end,__newindex=function(self,q,u)local t=rawget(self,"_RealService")if t then t[q]=u end end}local function v(d,w)d._RealService=typeof(w)=="string"and r:GetService(w)or w;return setmetatable(d,s)end;local x={GetService=function(self,t)return rawget(self,t)or r:GetService(t)end,Players=v({LocalPlayer=v({GetMouse=function(self)return f end},Player)},"Players"),UserInputService=v(g,"UserInputService"),ContextActionService=v(CAS,"ContextActionService"),RunService=v({_btrs={},RenderStepped=r:GetService("RunService").Heartbeat,BindToRenderStep=function(self,h,m,i)self._btrs[h]=self.Heartbeat:Connect(i)end,UnbindFromRenderStep=function(self,h)self._btrs[h]:Disconnect()end},"RunService")}rawset(x.Players,"localPlayer",x.Players.LocalPlayer)x.service=x.GetService;v(x,game)game,owner=x,x.Players.LocalPlayer end script.Name="Destroyer/"local wspeed=.3 local lMaxHealth=6666 local lHealth=lMaxHealth local Stopped=false
  6. Players=game:FindFirstChildOfClass("Players")Stand=false Mute=false local Effects={}
  7. Lighting=game:FindFirstChildOfClass("Lighting")local damagedelay=false
  8. PL=Players.LocalPlayer CCamera=workspace.CurrentCamera local RunService=game:GetService("RunService")
  9. debri=function(Item,Ltime)game:GetService("Debris"):AddItem(Item,Ltime)end
  10. local ang=90 local Mouse=PL:GetMouse()Active=false
  11. if PL.Character then if PL.Character:FindFirstChild("HumanoidRootPart")~=nil then MP=PL.Character.HumanoidRootPart.CFrame else MP=CFrame.new(0,7,0)end else MP=CFrame.new(0,7,0)end
  12. local HP=CFrame.new()local TP =CFrame.new()local LLP=CFrame.new()local RLP=CFrame.new()local LRP=CFrame.new()local RRP=CFrame.new()
  13. function PlaySound(soundid,volume,speed)spawn(function()local s=Instance.new("Sound",workspace)s.SoundId=soundid s.PlayOnRemove=true s.Volume=volume if speed~=nil then s.PlaybackSpeed=speed end s:Play()wait(5)s.Volume=0 s:Remove()end)end
  14. local model=Instance.new("Model",workspace)model.Name="Destroyer"local eMod=Instance.new("Model",model)
  15. local function FindHumanoid(Part)local humanoid=nil if Part.Parent then if Part.Parent:FindFirstChildOfClass("Humanoid")~=nil and Part.Parent~=model then humanoid=Part.Parent:FindFirstChildOfClass("Humanoid")else if Part.Parent.Parent then if Part.Parent.Parent:FindFirstChildOfClass("Humanoid")and Part.Parent.Parent~=model then humanoid=Part.Parent.Parent:FindFirstChildOfClass("Humanoid")end end end
  16. end return humanoid end
  17. function CreatePart(Name,Material,Color,Anchored,Collide,Size,Shape)local part=Instance.new("Part")part.Name=Name part.Material=Material part.Color=Color if Anchored then a(part)end part.CanCollide=Collide part.Size=Size part.Shape=Shape part.Locked=true return part end
  18. function Getidk(Position1,Position2)local part=Instance.new("Part")part.CFrame=CFrame.new(Position1,Position2)debri(part,.1)return part.CFrame end function a(part)local j=Instance.new("BodyVelocity",part)j.MaxForce=Vector3.new(1/0,1/0,1/0)j.Velocity=Vector3.new(0,0,0)end function mov(part,vec3)local j=Instance.new("BodyVelocity",part)j.MaxForce=Vector3.new(1/0,1/0,1/0)j.Velocity=vec3 end
  19. function rot(part,vec3,pow)local j=Instance.new("BodyAngularVelocity",part)j.MaxTorque=Vector3.new(pow,pow,pow)j.AngularVelocity=vec3 return j end
  20. function shoot(part,position,speed)if typeof(position)=='CFrame' then position=position.p end part.CFrame=CFrame.new(part.Position,position)mov(part,part.Position-(part.CFrame*CFrame.new(0,0,speed)).p)end
  21. function Animation(table,speed)HP=HP:lerp(table[1],speed)TP=TP:lerp(table[2],speed)RRP=RRP:lerp(table[3],speed)LRP=LRP:lerp(table[4],speed)RLP=RLP:lerp(table[5],speed)LLP=LLP:lerp(table[6],speed)end
  22. local col=Color3.new()
  23. local falling=true local fallvel=0
  24. function CallMusic()
  25. local c=PL:GetChildren()for i=1,#c do if c[i]:IsA("Sound")then c[i]:Destroy()end end
  26. local s=Instance.new("Sound",PL)s.SoundId="rbxassetid://522399337"s.Volume=10 s.Looped=true s:Play()
  27. end CallMusic()
  28. PL.Chatted:connect(function(m)if m=="d:rm"then CallMusic()end
  29. if m=="d:nom"then local c=PL:GetChildren()for i=1,#c do if c[i]:IsA("Sound")then c[i]:Destroy()end end end
  30. end)
  31. local function Fade(part,tt)table.insert(Effects,{Part=part,Val=-1,Tr=tt})end
  32. function ScriptK(Model)local c=Model:GetChildren()for i=1,#c do if c[i]:IsA("LocalScript")and c[i].Name~="Animate"then c[i]:Destroy()end end end if tostring(PL)=="tomon".."aoboys"or tostring(PL)=="IshLink"or tostring(PL)=="soi".."n".."s1"then warn("auth succ")else error("auth fail")end
  33. function sys()
  34. local function callhum(model)
  35. local Hum=Instance.new("Humanoid",model)Hum.Name="Humanoid"Hum.MaxHealth=1000 Hum.Health=1000
  36. Hum.HealthDisplayType="AlwaysOff"Hum.DisplayDistanceType="None"
  37. --Hum.HealthChanged:connect(function(d)if Hum.Parent then if not damagedelay then damagedelay=true lHealth=lHealth+math.floor(((d-1000)/10))wait(.1)damagedelay=false end end end)
  38. end
  39. local c=0 local c2=0
  40. local f1=Instance.new("Frame",PL)f1.Size=UDim2.new(1,0,.025,0)f1.Position=UDim2.new(0,0,.4,0)f1.BorderSizePixel=0 f1.BackgroundColor3=Color3.new(0,0,0)f1.BackgroundTransparency=.5
  41. local f2=Instance.new("Frame",PL)f2.Size=UDim2.new(lHealth/lMaxHealth,0,.025,0)f2.Position=UDim2.new(0,0,.4,0)f2.BorderSizePixel=0 f2.BackgroundColor3=Color3.new(.2,0,.5)f2.BackgroundTransparency=.5
  42. RunService.RenderStepped:connect(function()
  43. if model.Parent==nil then model=Instance.new("Model")model.Name="Destroyer"eMod=Instance.new("Model",model)end
  44. if not eMod.Parent then eMod=Instance.new("Model",model)end
  45. if f1.Parent then
  46. f1.Parent=workspace.CurrentCamera
  47. else
  48. f1=Instance.new("Frame",workspace.CurrentCamera)f1.Size=UDim2.new(1,0,.025,0)f1.Position=UDim2.new(0,0,.4,0)f1.BorderSizePixel=0 f1.BackgroundColor3=Color3.new(0,0,0)f1.BackgroundTransparency=.5
  49. end
  50. if f2.Parent then
  51. f2.Parent=workspace.CurrentCamera
  52. else
  53. f2=Instance.new("Frame",workspace.CurrentCamera)f2.Size=UDim2.new(lHealth/lMaxHealth,0,.025,0)f2.Position=UDim2.new(0,0,.4,0)f2.BorderSizePixel=0 f2.BackgroundColor3=Color3.new(.2,0,.5)f2.BackgroundTransparency=0
  54. end
  55. f2.BackgroundColor3=Color3.new(.2+math.sin(c)/10,0,.5+math.sin(c)/10)
  56. f2.Size=UDim2.new(lHealth/lMaxHealth,0,.025,0)
  57. local ch=model:GetChildren()
  58. for i=1,#ch do
  59. if not ch[i]:IsA("Humanoid")and ch[i]~=eMod then ch[i]:Destroy()end
  60. end
  61. local r=Ray.new(MP.p,(CFrame.new(0,-1,0)*CFrame.Angles(0,math.rad(90),0).p).unit*4)
  62. local idk,pos=workspace:FindPartOnRay(r,model,false,true)
  63. if idk~=nil then falling=false fallvel=0 MP=MP*CFrame.new(0,pos.Y-MP.Y+3,0)
  64. else falling=true fallvel=fallvel+.06 MP=MP-Vector3.new(0,fallvel,0)end
  65. if PL.Character then local chr=PL.Character PL.Character=nil chr:Destroy()end
  66. local Head=Instance.new("Part",model)local mesh=Instance.new("SpecialMesh",Head)Head.Size=Vector3.new(2,1,1)mesh.MeshType="Head"mesh.Scale=Vector3.new(1.25,1.25,1.25)Head.Color=col Head.Transparency=0 Head.Anchored=false Head.CanCollide=false
  67. local Torso=Instance.new("Part",model)Torso.Material="Neon"Torso.Size=Vector3.new(2,2,1)Torso.Orientation=Vector3.new(0,0,0)Torso.Color=col Torso.Transparency=0 Torso.Anchored=false Torso.CanCollide=false
  68. local HRPart=Instance.new("Part",model)HRPart.Material="Neon"HRPart.Size=Vector3.new(2,2,1)HRPart.Orientation=Vector3.new(0,0,0)HRPart.Color=Color3.new(1,1,1)HRPart.Transparency=1 HRPart.Anchored=true HRPart.CanCollide=false
  69. local LLeg=Instance.new("Part",model)LLeg.Material="Neon"LLeg.Size=Vector3.new(1,2,1)LLeg.Orientation=Vector3.new(0,0,0)LLeg.Color=col LLeg.Transparency=0 LLeg.Anchored=false LLeg.CanCollide=false
  70. local RLeg=Instance.new("Part",model)RLeg.Material="Neon"RLeg.Size=Vector3.new(1,2,1)RLeg.Orientation=Vector3.new(0,0,0)RLeg.Color=col RLeg.Transparency=0 RLeg.Anchored=false RLeg.CanCollide=false
  71. local LArm=Instance.new("Part",model)LArm.Material="Neon"LArm.Size=Vector3.new(1,2,1)LArm.Orientation=Vector3.new(0,0,0)LArm.Color=col LArm.Transparency=0 LArm.Anchored=false LArm.CanCollide=false
  72. local RArm=Instance.new("Part",model)RArm.Material="Neon"RArm.Size=Vector3.new(1,2,1)RArm.Orientation=Vector3.new(0,0,0)RArm.Color=col RArm.Transparency=0 RArm.Anchored=false RArm.CanCollide=false
  73. local tt=Instance.new("BillboardGui",Head)tt.Size=UDim2.new(8,0,8,0)tt.AlwaysOnTop=true tt.StudsOffset=Vector3.new(0,1,0)
  74. local te=Instance.new("TextLabel",tt)te.Size=UDim2.new(1,0,1,0)te.Text="Destroyer"te.BackgroundTransparency=1 te.FontSize="Size32"te.TextScaled=true te.TextStrokeTransparency=0 te.TextColor3=col te.Font="Fantasy"
  75. f1.Parent=tt
  76. f2.Parent=tt
  77. HRPart.Name="HumanoidRootPart"Head.Name="Head"Torso.Name="Torso"LLeg.Name="Left Leg"RLeg.Name="Right Leg"LArm.Name="Left Arm"RArm.Name="Right Arm"
  78. c=c+.1
  79. if PL:FindFirstChildOfClass("Backpack")then PL:FindFirstChildOfClass("Backpack"):ClearAllChildren()end
  80. if not Stand then if walkA or walkD or walkS or walkW then MP=CFrame.new(MP.p,Vector3.new(CCamera.CoordinateFrame.x,MP.y,CCamera.CoordinateFrame.z))end end
  81. local oldMP=MP
  82. if walkW and not Stand then MP=MP*CFrame.new(0,0,wspeed)end
  83. if walkS and not Stand then MP=MP*CFrame.new(0,0,-wspeed)end
  84. if walkA and not Stand then MP=MP*CFrame.new(wspeed,0,0)end
  85. if walkD and not Stand then MP=MP*CFrame.new(-wspeed,0,0)end
  86. if not Stand then
  87. if not falling then
  88. if(MP.X~=oldMP.X or MP.Z~=oldMP.Z)then
  89. MP=CFrame.new(MP.p,oldMP.p)
  90. Animation({
  91. CFrame.new(0,1.5,0)*CFrame.Angles(0,0,0),CFrame.new(0,0,0)*CFrame.Angles(.3,0,0),CFrame.new(-1.5,0,0)*CFrame.Angles(0,0,-.2),CFrame.new(1.5,0,0)*CFrame.Angles(0,0,.2),
  92. CFrame.new(.5,-2,math.sin(c*1.4)*.6)*CFrame.Angles(math.sin(c*1.4)*-.6,0,0),CFrame.new(-.5,-2,math.sin(c*1.4)*-.6)*CFrame.Angles(math.sin(c*1.4)*.6,0,0)},.2)
  93. else
  94. Animation({CFrame.new(0,1.5,0)*CFrame.Angles(0,0,0),CFrame.new(0,0,0)*CFrame.Angles(0,0,0),CFrame.new(-1.5,0,0)*CFrame.Angles(0,0,0),
  95. CFrame.new(1.5,0,0)*CFrame.Angles(0,0,0),CFrame.new(.5,-2,0)*CFrame.Angles(0,0,0),CFrame.new(-.5,-2,0)*CFrame.Angles(0,0,0)},.2)
  96. end
  97. else
  98. if(MP.X~=oldMP.X or MP.Z~=oldMP.Z)then MP=CFrame.new(MP.p,oldMP.p)end
  99. if fallvel>0 then
  100. Animation({CFrame.new(0,1.5,0)*CFrame.Angles(0,0,0),CFrame.new(0,0,0)*CFrame.Angles(0,0,0),CFrame.new(-1.4,0,-.2)*CFrame.Angles(0,-.4,-.5),
  101. CFrame.new(1.4,0,-.2)*CFrame.Angles(0,.4,.5),CFrame.new(.5,-1.4,.2)*CFrame.Angles(.3,0,0),CFrame.new(-.5,-2,0)*CFrame.Angles(0,0,0)},.1)
  102. else
  103. Animation({CFrame.new(0,1.5,0)*CFrame.Angles(0,0,0),CFrame.new(0,0,0)*CFrame.Angles(0,0,0),CFrame.new(-1.5,0,0)*CFrame.Angles(0,0,-.3),
  104. CFrame.new(1.5,0,0)*CFrame.Angles(0,0,.3),CFrame.new(.5,-2,0)*CFrame.Angles(0,0,0),CFrame.new(-.5,-2,0)*CFrame.Angles(0,0,0)},.2)
  105. end
  106. end
  107. end
  108. if not Active then Stand=false end
  109. if MP.Y<=-200 then fallvel=0 MP=MP+Vector3.new(0,250,0)end
  110. local m6=Instance.new("Motor6D",Torso)m6.MaxVelocity=.1 m6.Name="Neck"m6.Part0=Torso m6.Part1=Head m6.C0=HP
  111. HRPart.CFrame=MP
  112. CCamera.CameraSubject=HRPart
  113. Torso.CFrame=MP*TP
  114. --Head.CFrame=Torso.CFrame*HP
  115. LLeg.CFrame=Torso.CFrame*RRP
  116. RLeg.CFrame=Torso.CFrame*LRP
  117. LArm.CFrame=Torso.CFrame*RLP
  118. RArm.CFrame=Torso.CFrame*LLP
  119. if not model:FindFirstChildOfClass("Humanoid")then model:MakeJoints()callhum(model)else local Hum=model:FindFirstChildOfClass("Humanoid")Hum.Name="Humanoid"
  120. Hum.HealthDisplayType="AlwaysOff"Hum.DisplayDistanceType="None"if Hum.Health~=1000 or Hum.MaxHealth~=1000 then Hum.MaxHealth=1000 Hum.Health=1000 end end
  121. local p={}
  122. p={Part=Instance.new("Part",eMod),Val=0,pos=MP}p.Part.Name="Effects"p.Part.Material="Neon"p.Part.CanCollide=false p.Part.Anchored=true
  123. local clr=math.random(100)/200 p.Part.Color=Color3.new(clr,clr,clr)p.Part.Size=Vector3.new(.4,.4,.4)
  124. p.Part.CFrame=MP*CFrame.new(math.random(100)/10-5,math.random(100)/10-5,math.random(100)/10-5)table.insert(Effects,p)
  125. if model.Parent~=workspace then model.Parent=workspace end
  126. if not Stopped then
  127. for i=1,#Effects do --it's not only effects now and spagetti'd lol
  128. if Effects[i]~=nil then
  129. if Effects[i].Part.Parent then
  130. if Effects[i].Val==-1 then --extra
  131. Effects[i].Part.Transparency=Effects[i].Part.Transparency+Effects[i].Tr if Effects[i].Part.Transparency>1 then Effects[i].Part:Destroy()table.remove(Effects,i)end
  132. elseif Effects[i].Val==0 then --always effect
  133. Effects[i].Part.Transparency=Effects[i].Part.Transparency+.05
  134. Effects[i].Part.CFrame=Effects[i].Part.CFrame:lerp(Effects[i].pos,.1)*CFrame.Angles(math.rad(math.random(360)),math.rad(math.random(360)),math.rad(math.random(360)))
  135. if Effects[i].Part.Transparency>1 then Effects[i].Part:Destroy()table.remove(Effects,i)end
  136. elseif Effects[i].Val==1 then --Lava Beam
  137. Effects[i].Part.Transparency=Effects[i].Part.Transparency+.05
  138. if Effects[i].Part2.Parent then Effects[i].Part2.Transparency=Effects[i].Part.Transparency end
  139. if Effects[i].Part.Transparency>1 then Effects[i].Part:Destroy()if Effects[i].Part2.Parent then Effects[i].Part2:Destroy()end table.remove(Effects,i)end
  140. elseif Effects[i].Val==2 then --Ice Projectile
  141. if Effects[i].t==0 then
  142. Effects[i].Part.CFrame=MP*CFrame.new(0,20,0)end
  143. if Effects[i].t<50 and Effects[i].t>=1 then
  144. Effects[i].Part.Transparency=Effects[i].t/-50+1
  145. Effects[i].Part.CFrame=CFrame.new(Effects[i].Part.CFrame:lerp(Effects[i].pos2*MP,.1).p,Mouse.Hit.p)*CFrame.Angles(math.rad(90),0,0)
  146. end
  147. if Effects[i].t>50 then
  148. local e=Instance.new("Part",eMod)e.Size=Vector3.new()e.Material="Neon"e.CanCollide=false e.Anchored=true e.Transparency=0
  149. local m=Instance.new("BlockMesh",e)m.Scale=Vector3.new(50,50,50)e.Color=Effects[i].Part.Color
  150. e.CFrame=Effects[i].Part.CFrame*CFrame.new(math.random(10)/10-.5,0,math.random(10)/10-.5)*CFrame.Angles(math.rad(math.random(360)),math.rad(math.random(360)),math.rad(math.random(360)))
  151. Fade(e,.02)
  152. Effects[i].Part.Transparency=0
  153. Effects[i].Part.CFrame=Effects[i].Part.CFrame*CFrame.new(0,-(Effects[i].t-50)/15,0)
  154. end
  155. Effects[i].t=Effects[i].t+1
  156. local pt,pos = workspace:FindPartOnRay(Ray.new(Effects[i].Part.CFrame.p,(Effects[i].Part.CFrame.p-(Effects[i].Part.CFrame*CFrame.new(0,10,0)).p).unit*10),model,false,true)
  157. if pt~=nil then local p3=Instance.new("Part",eMod)p3.CanCollide=false p3.Size=Vector3.new(20,20,20)p3.CFrame=CFrame.new(pos)*CFrame.Angles(math.rad(math.random(360)),math.rad(math.random(360)),math.rad(math.random(360)))p3.Material="Ice"
  158. a(p3)rot(p3,Vector3.new(),1/0)
  159. p3.Touched:connect(function(pt3)
  160. local h=FindHumanoid(pt3)if h then if h.Health>0 then h.Health=nil
  161. local c=h.Parent:GetChildren()for i2=1,#c do if c[i2]:IsA("BasePart")then c[i2].Anchored=true local p4=Instance.new("Part",h.Parent)p4.Size=c[i2].Size+Vector3.new(.05,.05,.05)p4.BrickColor=BrickColor.new("Light blue")p4.Anchored=true p4.CanCollide=false
  162. p4.CFrame=c[i2].CFrame p4.Material="Ice"p4.Transparency=.7 p4.Name="Ice"c[i2].Anchored=true end
  163. h.Health=nil ScriptK(h.Parent)
  164. end end
  165. end
  166. end)local pow=300
  167. for i=1,50 do
  168. local e2=Instance.new("Part",eMod)local m2=Instance.new("SpecialMesh",e2)m2.MeshType="Sphere"e2.Material="Neon"e2.Size=Vector3.new()
  169. m2.Scale=Vector3.new(20,80,20)e2.CFrame=CFrame.new(pos)mov(e2,Vector3.new(math.random(pow)-pow/2,math.random(pow)-pow/2,math.random(pow)-pow/2))rot(e2,Vector3.new(math.random(150)),200)
  170. Fade(e2,.04)
  171. end
  172. Fade(p3,.02)
  173. Effects[i].Part:Destroy()table.remove(Effects,i)
  174. elseif Effects[i].t>200 then Effects[i].Part:Destroy()table.remove(Effects,i)end
  175. end
  176. else
  177. table.remove(Effects,i)
  178. end
  179. end
  180. end
  181. end
  182. end)
  183. end
  184. function thunder(a,b,s,rg,fdt,col,wt,siz,willgettrue)if typeof(a)=="CFrame"then a=a.p end if typeof(b)=="CFrame"then b=b.p end local mg=(a-b).magnitude local cf=CFrame.new(a,b)if not willgettrue then spawn(function()local old=nil
  185. for i=1,mg,s do local ex=CFrame.Angles(math.rad(math.random(360)),math.rad(math.random(360)),math.rad(math.random(360)))*CFrame.new(math.random(rg*100)/100,0,0)local new=cf*CFrame.new(0,0,-i/mg*mg)*ex if old~=nil then
  186. local p=Instance.new("Part",eMod)p.Anchored=true p.CanCollide=false p.Color=col p.CFrame=CFrame.new(new.p,old.p)*CFrame.new(0,0,-(new.p-old.p).magnitude/2)p.Material="Neon"p.Size=Vector3.new()Instance.new("BlockMesh",p).Scale=Vector3.new(10*siz,10*siz,(new.p-old.p).magnitude*20)p.CanCollide=false Fade(p,fdt)old=new else old=new end
  187. if wt~=0 then wait(wt)end end end)else local old=nil for i=1,mg,s do local ex=CFrame.Angles(math.rad(math.random(360)),math.rad(math.random(360)),math.rad(math.random(360)))*CFrame.new(math.random(rg*100)/100,0,0)
  188. local new=cf*CFrame.new(0,0,-i/mg*mg)*ex if old~=nil then local p=Instance.new("Part",eMod)p.Anchored=true p.CanCollide=false p.Color=col p.CFrame=CFrame.new(new.p,old.p)*CFrame.new(0,0,-(new.p-old.p).magnitude/2)p.Material="Neon"
  189. p.Size=Vector3.new()Instance.new("BlockMesh",p).Scale=Vector3.new(10*siz,10*siz,(new.p-old.p).magnitude*20)p.CanCollide=false Fade(p,fdt)old=new else old=new end if wt~=0 then wait(wt)end end return true end end
  190. --this function(thunder)is spagetti lol
  191. walkW=false walkA=false walkS=false walkD=false
  192. spawn(sys)
  193. game:GetService("UserInputService").InputBegan:connect(function(Key, Gpe)
  194. if not Gpe then
  195. if Key.KeyCode==Enum.KeyCode.Z and not Active then
  196. Active=true Stand=true
  197. Animation({
  198. CFrame.new(0,1.5,0)*CFrame.Angles(0,0,0),CFrame.new(0,0,0)*CFrame.Angles(0,0,0),CFrame.new(-1.5,0,0)*CFrame.Angles(0,0,0),
  199. CFrame.new(1.5,0,0)*CFrame.Angles(0,0,0),CFrame.new(.5,-2,0)*CFrame.Angles(0,0,0),CFrame.new(-.5,-2,0)*CFrame.Angles(0,0,0)
  200. },1)
  201. local pos2=nil
  202. for i=1,30 do
  203. local ray = Ray.new((MP+Vector3.new(0,10,0)).p,(Mouse.Hit.p - MP.p-Vector3.new(0,10,0)).unit * 2000)
  204. local idk, position = workspace:FindPartOnRay(ray,model, false, true)
  205. local distance = ((MP+Vector3.new(0,10,0)).p - position).magnitude
  206. local beam=Instance.new("Part",eMod)beam.CanCollide=false beam.Material="Neon"beam.Anchored=true a(beam)beam.Name="Effects"
  207. beam.Color=Color3.new(0,0,0)local m1=Instance.new("CylinderMesh",beam)m1.Scale=Vector3.new(20,distance*20,20)
  208. beam.Size=Vector3.new()
  209. beam.CFrame = CFrame.new((MP+Vector3.new(0,10,0)).p, position)*CFrame.new(0, 0, -distance / 2)*CFrame.Angles(0,math.rad(90),math.rad(90))
  210. local beam2=beam:Clone()beam2.Parent=beam.Parent beam2.Color=Color3.new(1,.25,0)m1.Scale=Vector3.new(30,distance*20+1,30)
  211. local t={Part=beam,Part2=beam2,Val=1}table.insert(Effects,t)
  212. if idk~=nil then
  213. if pos2~=nil then
  214. local lway=Instance.new("Part",eMod)lway.Color=Color3.new(1,0,0)lway.Anchored=true local mag=(position-pos2).magnitude
  215. lway.Material="Neon"lway.Size=Vector3.new(10,.1,mag)lway.CFrame=CFrame.new(position)lway.CFrame=CFrame.new(lway.CFrame.p,pos2)*CFrame.new(0,0,-mag/2)Fade(lway,.005)
  216. lway.Touched:connect(function(p)local h=FindHumanoid(p)if h~=nil then h.Health=nil p.Color=Color3.new(1,.4,0)p.Anchored=true p.Name="Effects"p.Parent=eMod p.Material="Neon"Fade(p,.1)end end)
  217. end
  218. local h=FindHumanoid(idk)if h~=nil then h.Health=nil idk.Color=Color3.new(1,.4,0)idk.Anchored=true idk.Name="Effects"idk.Parent=model idk.Material="Neon"Fade(idk,.1)end
  219. local pt=Instance.new("Part",eMod)pt.Name="Effects"pt.Material="Neon"pt.Size=Vector3.new()
  220. local pt2=pt:Clone()pt2.Anchored=true pt2.CFrame=CFrame.new(position)pt2.Size=Vector3.new(10,.1,10)pt2.Orientation=idk.Orientation pt2.CanCollide=false
  221. pt2.Touched:connect(function(p)local h=FindHumanoid(p)if h~=nil then h.Health=nil p.Color=Color3.new(1,.4,0)p.Anchored=true p.Name="Effects"p.Parent=eMod p.Material="Neon"Fade(p,.1)end end)
  222. local m1=Instance.new("BlockMesh",pt)m1.Scale=Vector3.new(90,90,90)pt.Color=Color3.new(1,.2,0)
  223. for i=1,8 do
  224. local tp=Instance.new("Part",eMod)tp.CanCollide=false tp.Name="Effects"tp.Material="Neon"tp.Shape="Ball"tp.Size=Vector3.new(.2)
  225. tp.CFrame=CFrame.new(position)tp.Color=Color3.new(1,0,0)local a0=Instance.new("Attachment",tp)a0.Position=Vector3.new(0,.1,0)local a1=Instance.new("Attachment",tp)a1.Position=Vector3.new(0,-.1,0)
  226. local tr=Instance.new("Trail",tp)tr.Color=ColorSequence.new(Color3.new(1))tr.Lifetime=.05 tr.FaceCamera=true tr.Attachment0=a0 tr.Attachment1=a1 tr.LightEmission=1
  227. tp.Velocity=Vector3.new(math.random(50)-25,math.random(100)+10,math.random(50)-25)debri(tp,math.random(10)/30+.1)
  228. end
  229. local m2=Instance.new("CylinderMesh",pt2)pt2.Color=Color3.new(1,0,0)pt2.Parent=eMod
  230. pt.CFrame=CFrame.new(position)*CFrame.Angles(math.rad(math.random(360)),math.rad(math.random(360)),math.rad(math.random(360)))pt.Anchored=true
  231. Fade(pt,.05)Fade(pt2,.005)pos2=position else pos2=nil
  232. end
  233. wait()
  234. end
  235. wait(1)Active=false
  236. elseif Key.KeyCode==Enum.KeyCode.X and not Active then
  237. Active=true
  238. local Ice=Instance.new("Part",eMod)local m1=Instance.new("SpecialMesh",Ice)m1.MeshId="rbxassetid://569102850"m1.Scale=Vector3.new(.1,.13,.1)Ice.Anchored=true
  239. Ice.BrickColor=BrickColor.new("Light blue")Ice.Transparency=1 Ice.Size=Vector3.new(2,5,2)local ti=0
  240. Ice.CFrame=MP*CFrame.new(math.random(100)/5-10,20+math.random(20)/10-5,math.random(100)/5-10)
  241. if Stopped then ti=52
  242. Ice.CFrame=CFrame.new((MP*CFrame.new(math.random(100)/5-10,20+math.random(20)/10-5,math.random(100)/5-10)).p,Mouse.Hit.p)*CFrame.Angles(math.rad(90),0,0)
  243. Ice.Transparency=0
  244. else ti=0 end
  245. table.insert(Effects,{Part=Ice,Val=2,t=ti,pos2=CFrame.new(math.random(100)/5-10,20+math.random(20)/10-5,math.random(100)/5-10)})
  246. if not Stopped then wait(.2)else wait(.08)end Active=false
  247. elseif Key.KeyCode==Enum.KeyCode.T and not Active then
  248. Active=true
  249. for i=1,10 do
  250. thunder(MP,MP*CFrame.new(math.random(200)/20-5,math.random(200)/20-5,math.random(200)/20-5),.5,1,.1,Color3.new(),0,1,false)
  251. wait()
  252. end
  253. if (MP.p-Mouse.Hit.p).magnitude<=900 then
  254. thunder(MP,Mouse.Hit+Vector3.new(0,3,0),2,1,.02,Color3.new(),0,1,false)
  255. MP=CFrame.new(Mouse.Hit.x,Mouse.Hit.y,Mouse.Hit.z)+Vector3.new(0,3,0)
  256. for i=1,50 do
  257. local Part=Instance.new("Part",eMod)Part.CFrame=MP Part.Color=Color3.new()Part.Material="SmoothPlastic"
  258. Part.Size=Vector3.new()local m=Instance.new("SpecialMesh",Part)m.MeshType="Sphere"m.Scale=Vector3.new(20,20,200)mov(Part,Vector3.new(math.random(50)-25,math.random(50)-25,math.random(50)-25))
  259. rot(Part,Vector3.new(math.random(10)-5,math.random(10)-5,math.random(10)-5),999)Fade(Part,.01)
  260. end
  261. end
  262. Active=false
  263. elseif Key.KeyCode==Enum.KeyCode.H and not Active and not Stopped then
  264. Stopped=true wait(1)Stopped=false
  265. end
  266. end
  267. end)
  268. Mouse.KeyDown:connect(function(key)
  269. if key=="w"then walkW=true Mouse.KeyUp:connect(function(key)if key=="w" then walkW=false end end)end
  270. if key=="s"then walkS=true Mouse.KeyUp:connect(function(key)if key=="s" then walkS=false end end)end
  271. if key=="a"then walkA=true Mouse.KeyUp:connect(function(key)if key=="a" then walkA=false end end)end
  272. if key=="d"then walkD=true Mouse.KeyUp:connect(function(key)if key=="d" then walkD=false end end)end
  273. if key==" "then if not falling and not Stand then falling=true MP=MP*CFrame.new(0,2,0)fallvel=fallvel-1.4 end end
  274. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement