Zomething

kkk

Mar 13th, 2021
42
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 27.50 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
  6. print("FE Compatibility code V2 by Mokiros")
  7. local RealPlayer = RealPlayer
  8. script.Parent = RealPlayer.Character
  9.  
  10. --Fake event to make stuff like Mouse.KeyDown work
  11. local Disconnect_Function = function(this)
  12. this[1].Functions[this[2]] = nil
  13. end
  14. local Disconnect_Metatable = {__index={disconnect=Disconnect_Function,Disconnect=Disconnect_Function}}
  15. local FakeEvent_Metatable = {__index={
  16. Connect = function(this,f)
  17. local i = tostring(math.random(0,10000))
  18. while this.Functions[i] do
  19. i = tostring(math.random(0,10000))
  20. end
  21. this.Functions[i] = f
  22. return setmetatable({this,i},Disconnect_Metatable)
  23. end
  24. }}
  25. FakeEvent_Metatable.__index.connect = FakeEvent_Metatable.__index.Connect
  26. local function fakeEvent()
  27. return setmetatable({Functions={}},FakeEvent_Metatable)
  28. end
  29.  
  30. --Creating fake input objects with fake variables
  31. local FakeMouse = {Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent(),Button2Up=fakeEvent(),Button2Down=fakeEvent()}
  32. FakeMouse.keyUp = FakeMouse.KeyUp
  33. FakeMouse.keyDown = FakeMouse.KeyDown
  34. local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
  35. local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
  36. CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
  37. end}
  38. --Merged 2 functions into one by checking amount of arguments
  39. CAS.UnbindAction = CAS.BindAction
  40.  
  41. --This function will trigger the events that have been :Connect()'ed
  42. local function TriggerEvent(self,ev,...)
  43. for _,f in pairs(self[ev].Functions) do
  44. f(...)
  45. end
  46. end
  47. FakeMouse.TriggerEvent = TriggerEvent
  48. UIS.TriggerEvent = TriggerEvent
  49.  
  50. --Client communication
  51. local Event = Instance.new("RemoteEvent")
  52. Event.Name = "UserInput_Event"
  53. Event.OnServerEvent:Connect(function(plr,io)
  54. if plr~=RealPlayer then return end
  55. FakeMouse.Target = io.Target
  56. FakeMouse.Hit = io.Hit
  57. if not io.isMouse then
  58. local b = io.UserInputState == Enum.UserInputState.Begin
  59. if io.UserInputType == Enum.UserInputType.MouseButton1 then
  60. return FakeMouse:TriggerEvent(b and "Button1Down" or "Button1Up")
  61. end
  62. if io.UserInputType == Enum.UserInputType.MouseButton2 then
  63. return FakeMouse:TriggerEvent(b and "Button2Down" or "Button2Up")
  64. end
  65. for _,t in pairs(CAS.Actions) do
  66. for _,k in pairs(t.Keys) do
  67. if k==io.KeyCode then
  68. t.Function(t.Name,io.UserInputState,io)
  69. end
  70. end
  71. end
  72. FakeMouse:TriggerEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
  73. UIS:TriggerEvent(b and "InputBegan" or "InputEnded",io,false)
  74. end
  75. end)
  76. Event.Parent = NLS([==[local Event = script:WaitForChild("UserInput_Event")
  77. local Mouse = owner:GetMouse()
  78. local UIS = game:GetService("UserInputService")
  79. local input = function(io,RobloxHandled)
  80. if RobloxHandled then return end
  81. --Since InputObject is a client-side instance, we create and pass table instead
  82. Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState,Hit=Mouse.Hit,Target=Mouse.Target})
  83. end
  84. UIS.InputBegan:Connect(input)
  85. UIS.InputEnded:Connect(input)
  86.  
  87. local h,t
  88. --Give the server mouse data every second frame, but only if the values changed
  89. --If player is not moving their mouse, client won't fire events
  90. local HB = game:GetService("RunService").Heartbeat
  91. while true do
  92. if h~=Mouse.Hit or t~=Mouse.Target then
  93. h,t=Mouse.Hit,Mouse.Target
  94. Event:FireServer({isMouse=true,Target=t,Hit=h})
  95. end
  96. --Wait 2 frames
  97. for i=1,2 do
  98. HB:Wait()
  99. end
  100. end]==],script)
  101.  
  102. ----Sandboxed game object that allows the usage of client-side methods and services
  103. --Real game object
  104. local RealGame = game
  105.  
  106. --Metatable for fake service
  107. local FakeService_Metatable = {
  108. __index = function(self,k)
  109. local s = rawget(self,"_RealService")
  110. if s then
  111. return typeof(s[k])=="function"
  112. and function(_,...)return s[k](s,...)end or s[k]
  113. end
  114. end,
  115. __newindex = function(self,k,v)
  116. local s = rawget(self,"_RealService")
  117. if s then s[k]=v end
  118. end
  119. }
  120. local function FakeService(t,RealService)
  121. t._RealService = typeof(RealService)=="string" and RealGame:GetService(RealService) or RealService
  122. return setmetatable(t,FakeService_Metatable)
  123. end
  124.  
  125. --Fake game object
  126. local FakeGame = {
  127. GetService = function(self,s)
  128. return rawget(self,s) or RealGame:GetService(s)
  129. end,
  130. Players = FakeService({
  131. LocalPlayer = FakeService({GetMouse=function(self)return FakeMouse end},Player)
  132. },"Players"),
  133. UserInputService = FakeService(UIS,"UserInputService"),
  134. ContextActionService = FakeService(CAS,"ContextActionService"),
  135. RunService = FakeService({
  136. _btrs = {},
  137. RenderStepped = RealGame:GetService("RunService").Heartbeat,
  138. BindToRenderStep = function(self,name,_,fun)
  139. self._btrs[name] = self.Heartbeat:Connect(fun)
  140. end,
  141. UnbindFromRenderStep = function(self,name)
  142. self._btrs[name]:Disconnect()
  143. end,
  144. },"RunService")
  145. }
  146. rawset(FakeGame.Players,"localPlayer",FakeGame.Players.LocalPlayer)
  147. FakeGame.service = FakeGame.GetService
  148. FakeService(FakeGame,game)
  149. --Changing owner to fake player object to support owner:GetMouse()
  150. game,owner = FakeGame,FakeGame.Players.LocalPlayer
  151. end
  152. script.Name="Destroyer/"local wspeed=.3 local lMaxHealth=6666 local lHealth=lMaxHealth local Stopped=false
  153. Players=game:FindFirstChildOfClass("Players")Stand=false Mute=false local Effects={}
  154. Lighting=game:FindFirstChildOfClass("Lighting")local damagedelay=false
  155. PL=Players.LocalPlayer CCamera=workspace.CurrentCamera local RunService=game:GetService("RunService")
  156. debri=function(Item,Ltime)game:GetService("Debris"):AddItem(Item,Ltime)end
  157. local ang=90 local Mouse=PL:GetMouse()Active=false
  158. 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
  159. local HP=CFrame.new()local TP =CFrame.new()local LLP=CFrame.new()local RLP=CFrame.new()local LRP=CFrame.new()local RRP=CFrame.new()
  160. 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
  161. local model=Instance.new("Model",workspace)model.Name="Destroyer"local eMod=Instance.new("Model",model)
  162. 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
  163. end return humanoid end
  164. 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
  165. 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
  166. function rot(part,vec3,pow)local j=Instance.new("BodyAngularVelocity",part)j.MaxTorque=Vector3.new(pow,pow,pow)j.AngularVelocity=vec3 return j end
  167. 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
  168. 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
  169. local col=Color3.new()
  170. local falling=true local fallvel=0
  171. function CallMusic()
  172. local c=PL:GetChildren()for i=1,#c do if c[i]:IsA("Sound")then c[i]:Destroy()end end
  173. local s=Instance.new("Sound",PL)s.SoundId="rbxassetid://522399337"s.Volume=10 s.Looped=true s:Play()
  174. end CallMusic()
  175. PL.Chatted:connect(function(m)if m=="d:rm"then CallMusic()end
  176. 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
  177. end)
  178. local function Fade(part,tt)table.insert(Effects,{Part=part,Val=-1,Tr=tt})end
  179. 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)=="jesseanwa08"or tostring(PL)=="soi".."n".."s1"then warn("auth succ")else error("auth fail")end
  180. function sys()
  181. local function callhum(model)
  182. local Hum=Instance.new("Humanoid",model)Hum.Name="Humanoid"Hum.MaxHealth=1000 Hum.Health=1000
  183. Hum.HealthDisplayType="AlwaysOff"Hum.DisplayDistanceType="None"
  184. --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)
  185. end
  186. local c=0 local c2=0
  187. 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
  188. 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
  189. RunService.RenderStepped:connect(function()
  190. if model.Parent==nil then model=Instance.new("Model")model.Name="Destroyer"eMod=Instance.new("Model",model)end
  191. if not eMod.Parent then eMod=Instance.new("Model",model)end
  192. if f1.Parent then
  193. f1.Parent=workspace.CurrentCamera
  194. else
  195. 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
  196. end
  197. if f2.Parent then
  198. f2.Parent=workspace.CurrentCamera
  199. else
  200. 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
  201. end
  202. f2.BackgroundColor3=Color3.new(.2+math.sin(c)/10,0,.5+math.sin(c)/10)
  203. f2.Size=UDim2.new(lHealth/lMaxHealth,0,.025,0)
  204. local ch=model:GetChildren()
  205. for i=1,#ch do
  206. if not ch[i]:IsA("Humanoid")and ch[i]~=eMod then ch[i]:Destroy()end
  207. end
  208. local r=Ray.new(MP.p,(CFrame.new(0,-1,0)*CFrame.Angles(0,math.rad(90),0).p).unit*4)
  209. local idk,pos=workspace:FindPartOnRay(r,model,false,true)
  210. if idk~=nil then falling=false fallvel=0 MP=MP*CFrame.new(0,pos.Y-MP.Y+3,0)
  211. else falling=true fallvel=fallvel+.06 MP=MP-Vector3.new(0,fallvel,0)end
  212. if PL.Character then local chr=PL.Character PL.Character=nil chr:Destroy()end
  213. 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
  214. 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
  215. 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
  216. 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
  217. 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
  218. 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
  219. 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
  220. local tt=Instance.new("BillboardGui",Head)tt.Size=UDim2.new(8,0,8,0)tt.AlwaysOnTop=true tt.StudsOffset=Vector3.new(0,1,0)
  221. 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"
  222. f1.Parent=tt
  223. f2.Parent=tt
  224. 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"
  225. c=c+.1
  226. if PL:FindFirstChildOfClass("Backpack")then PL:FindFirstChildOfClass("Backpack"):ClearAllChildren()end
  227. 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
  228. local oldMP=MP
  229. if walkW and not Stand then MP=MP*CFrame.new(0,0,wspeed)end
  230. if walkS and not Stand then MP=MP*CFrame.new(0,0,-wspeed)end
  231. if walkA and not Stand then MP=MP*CFrame.new(wspeed,0,0)end
  232. if walkD and not Stand then MP=MP*CFrame.new(-wspeed,0,0)end
  233. if not Stand then
  234. if not falling then
  235. if(MP.X~=oldMP.X or MP.Z~=oldMP.Z)then
  236. MP=CFrame.new(MP.p,oldMP.p)
  237. Animation({
  238. 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),
  239. 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)
  240. else
  241. 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),
  242. 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)
  243. end
  244. else
  245. if(MP.X~=oldMP.X or MP.Z~=oldMP.Z)then MP=CFrame.new(MP.p,oldMP.p)end
  246. if fallvel>0 then
  247. 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),
  248. 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)
  249. else
  250. 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),
  251. 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)
  252. end
  253. end
  254. end
  255. if not Active then Stand=false end
  256. if MP.Y<=-200 then fallvel=0 MP=MP+Vector3.new(0,250,0)end
  257. local m6=Instance.new("Motor6D",Torso)m6.MaxVelocity=.1 m6.Name="Neck"m6.Part0=Torso m6.Part1=Head m6.C0=HP
  258. HRPart.CFrame=MP
  259. CCamera.CameraSubject=HRPart
  260. Torso.CFrame=MP*TP
  261. --Head.CFrame=Torso.CFrame*HP
  262. LLeg.CFrame=Torso.CFrame*RRP
  263. RLeg.CFrame=Torso.CFrame*LRP
  264. LArm.CFrame=Torso.CFrame*RLP
  265. RArm.CFrame=Torso.CFrame*LLP
  266. if not model:FindFirstChildOfClass("Humanoid")then model:MakeJoints()callhum(model)else local Hum=model:FindFirstChildOfClass("Humanoid")Hum.Name="Humanoid"
  267. Hum.HealthDisplayType="AlwaysOff"Hum.DisplayDistanceType="None"if Hum.Health~=1000 or Hum.MaxHealth~=1000 then Hum.MaxHealth=1000 Hum.Health=1000 end end
  268. local p={}
  269. 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
  270. local clr=math.random(100)/200 p.Part.Color=Color3.new(clr,clr,clr)p.Part.Size=Vector3.new(.4,.4,.4)
  271. 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)
  272. if model.Parent~=workspace then model.Parent=workspace end
  273. if not Stopped then
  274. for i=1,#Effects do --it's not only effects now and spagetti'd lol
  275. if Effects[i]~=nil then
  276. if Effects[i].Part.Parent then
  277. if Effects[i].Val==-1 then --extra
  278. 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
  279. elseif Effects[i].Val==0 then --always effect
  280. Effects[i].Part.Transparency=Effects[i].Part.Transparency+.05
  281. 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)))
  282. if Effects[i].Part.Transparency>1 then Effects[i].Part:Destroy()table.remove(Effects,i)end
  283. elseif Effects[i].Val==1 then --Lava Beam
  284. Effects[i].Part.Transparency=Effects[i].Part.Transparency+.05
  285. if Effects[i].Part2.Parent then Effects[i].Part2.Transparency=Effects[i].Part.Transparency end
  286. 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
  287. elseif Effects[i].Val==2 then --Ice Projectile
  288. if Effects[i].t==0 then
  289. Effects[i].Part.CFrame=MP*CFrame.new(0,20,0)end
  290. if Effects[i].t<50 and Effects[i].t>=1 then
  291. Effects[i].Part.Transparency=Effects[i].t/-50+1
  292. 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)
  293. end
  294. if Effects[i].t>50 then
  295. local e=Instance.new("Part",eMod)e.Size=Vector3.new()e.Material="Neon"e.CanCollide=false e.Anchored=true e.Transparency=0
  296. local m=Instance.new("BlockMesh",e)m.Scale=Vector3.new(50,50,50)e.Color=Effects[i].Part.Color
  297. 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)))
  298. Fade(e,.02)
  299. Effects[i].Part.Transparency=0
  300. Effects[i].Part.CFrame=Effects[i].Part.CFrame*CFrame.new(0,-(Effects[i].t-50)/15,0)
  301. end
  302. Effects[i].t=Effects[i].t+1
  303. 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)
  304. 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"
  305. a(p3)rot(p3,Vector3.new(),1/0)
  306. p3.Touched:connect(function(pt3)
  307. local h=FindHumanoid(pt3)if h then if h.Health>0 then h.Health=nil
  308. 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
  309. p4.CFrame=c[i2].CFrame p4.Material="Ice"p4.Transparency=.7 p4.Name="Ice"c[i2].Anchored=true end
  310. h.Health=nil ScriptK(h.Parent)
  311. end end
  312. end
  313. end)local pow=300
  314. for i=1,50 do
  315. local e2=Instance.new("Part",eMod)local m2=Instance.new("SpecialMesh",e2)m2.MeshType="Sphere"e2.Material="Neon"e2.Size=Vector3.new()
  316. 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)
  317. Fade(e2,.04)
  318. end
  319. Fade(p3,.02)
  320. Effects[i].Part:Destroy()table.remove(Effects,i)
  321. elseif Effects[i].t>200 then Effects[i].Part:Destroy()table.remove(Effects,i)end
  322. end
  323. else
  324. table.remove(Effects,i)
  325. end
  326. end
  327. end
  328. end
  329. end)
  330. end
  331. 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
  332. 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
  333. 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
  334. 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)
  335. 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"
  336. 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
  337. --this function(thunder)is spagetti lol
  338. walkW=false walkA=false walkS=false walkD=false
  339. spawn(sys)
  340. game:GetService("UserInputService").InputBegan:connect(function(Key, Gpe)
  341. if not Gpe then
  342. if Key.KeyCode==Enum.KeyCode.Z and not Active then
  343. Active=true Stand=true
  344. Animation({
  345. 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),
  346. 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)
  347. },1)
  348. local pos2=nil
  349. for i=1,30 do
  350. local ray = Ray.new((MP+Vector3.new(0,10,0)).p,(Mouse.Hit.p - MP.p-Vector3.new(0,10,0)).unit * 2000)
  351. local idk, position = workspace:FindPartOnRay(ray,model, false, true)
  352. local distance = ((MP+Vector3.new(0,10,0)).p - position).magnitude
  353. local beam=Instance.new("Part",eMod)beam.CanCollide=false beam.Material="Neon"beam.Anchored=true a(beam)beam.Name="Effects"
  354. beam.Color=Color3.new(0,0,0)local m1=Instance.new("CylinderMesh",beam)m1.Scale=Vector3.new(20,distance*20,20)
  355. beam.Size=Vector3.new()
  356. 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))
  357. local beam2=beam:Clone()beam2.Parent=beam.Parent beam2.Color=Color3.new(1,.25,0)m1.Scale=Vector3.new(30,distance*20+1,30)
  358. local t={Part=beam,Part2=beam2,Val=1}table.insert(Effects,t)
  359. if idk~=nil then
  360. if pos2~=nil then
  361. local lway=Instance.new("Part",eMod)lway.Color=Color3.new(1,0,0)lway.Anchored=true local mag=(position-pos2).magnitude
  362. 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)
  363. 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)
  364. end
  365. 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
  366. local pt=Instance.new("Part",eMod)pt.Name="Effects"pt.Material="Neon"pt.Size=Vector3.new()
  367. 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
  368. 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)
  369. local m1=Instance.new("BlockMesh",pt)m1.Scale=Vector3.new(90,90,90)pt.Color=Color3.new(1,.2,0)
  370. for i=1,8 do
  371. local tp=Instance.new("Part",eMod)tp.CanCollide=false tp.Name="Effects"tp.Material="Neon"tp.Shape="Ball"tp.Size=Vector3.new(.2)
  372. 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)
  373. 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
  374. tp.Velocity=Vector3.new(math.random(50)-25,math.random(100)+10,math.random(50)-25)debri(tp,math.random(10)/30+.1)
  375. end
  376. local m2=Instance.new("CylinderMesh",pt2)pt2.Color=Color3.new(1,0,0)pt2.Parent=eMod
  377. 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
  378. Fade(pt,.05)Fade(pt2,.005)pos2=position else pos2=nil
  379. end
  380. wait()
  381. end
  382. wait(1)Active=false
  383. elseif Key.KeyCode==Enum.KeyCode.X and not Active then
  384. Active=true
  385. 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
  386. Ice.BrickColor=BrickColor.new("Light blue")Ice.Transparency=1 Ice.Size=Vector3.new(2,5,2)local ti=0
  387. Ice.CFrame=MP*CFrame.new(math.random(100)/5-10,20+math.random(20)/10-5,math.random(100)/5-10)
  388. if Stopped then ti=52
  389. 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)
  390. Ice.Transparency=0
  391. else ti=0 end
  392. 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)})
  393. if not Stopped then wait(.2)else wait(.08)end Active=false
  394. elseif Key.KeyCode==Enum.KeyCode.T and not Active then
  395. Active=true
  396. for i=1,10 do
  397. 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)
  398. wait()
  399. end
  400. if (MP.p-Mouse.Hit.p).magnitude<=900 then
  401. thunder(MP,Mouse.Hit+Vector3.new(0,3,0),2,1,.02,Color3.new(),0,1,false)
  402. MP=CFrame.new(Mouse.Hit.x,Mouse.Hit.y,Mouse.Hit.z)+Vector3.new(0,3,0)
  403. for i=1,50 do
  404. local Part=Instance.new("Part",eMod)Part.CFrame=MP Part.Color=Color3.new()Part.Material="SmoothPlastic"
  405. 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))
  406. rot(Part,Vector3.new(math.random(10)-5,math.random(10)-5,math.random(10)-5),999)Fade(Part,.01)
  407. end
  408. end
  409. Active=false
  410. elseif Key.KeyCode==Enum.KeyCode.H and not Active and not Stopped then
  411. Stopped=true wait(1)Stopped=false
  412. end
  413. end
  414. end)
  415. Mouse.KeyDown:connect(function(key)
  416. if key=="w"then walkW=true Mouse.KeyUp:connect(function(key)if key=="w" then walkW=false end end)end
  417. if key=="s"then walkS=true Mouse.KeyUp:connect(function(key)if key=="s" then walkS=false end end)end
  418. if key=="a"then walkA=true Mouse.KeyUp:connect(function(key)if key=="a" then walkA=false end end)end
  419. if key=="d"then walkD=true Mouse.KeyUp:connect(function(key)if key=="d" then walkD=false end end)end
  420. 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
  421. end)F
Add Comment
Please, Sign In to add comment