Advertisement
memberhero

Lighting Powers

Aug 30th, 2018
598
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 30.65 KB | None | 0 0
  1. if game:GetService("RunService"):IsClient()then error("Please run as a server script. Use h/ instead of hl/.")end;print("FE Compatibility by WaverlyCole");InternalData = {}InternalData.RealOwner = owner;InternalData.Version = "v1.0.0"
  2. do
  3. script.Parent = InternalData.RealOwner.Character
  4. local Event = Instance.new("RemoteEvent");Event.Name = "UserInput"
  5. local function createObject (connections, index)
  6. local proxy = newproxy (true);local meta = getmetatable (proxy);
  7. local runbind = function (self, i, ...) connections[i]:Fire (...); end;
  8. while (#connections > 0) do connections [table.remove (connections, 1)] = Instance.new ('BindableEvent');end;
  9. meta.__index = function (self, i)
  10. if (i == 'TriggerEvent') then return runbind end;
  11. return connections[i] and connections[i].Event or index[i];
  12. end;
  13. meta.__newindex = index;meta.__metatable = false;return proxy
  14. end;
  15. local Mouse = createObject({"KeyUp","KeyDown","Button1Down","Button1Up"},{["Target"] = nil;["Hit"] = CFrame.new()})
  16. local UserInputService = createObject({"InputBegan","InputEnded"},{})
  17. local ContextActionService = {Actions={},BindAction = function(self,actionName,Func,touch,...)
  18. self.Actions[actionName] = Func and {Name=actionName,Function=Func,Keys={...}} or nil
  19. end};ContextActionService.UnBindAction = ContextActionService.BindAction
  20. Event.OnServerEvent:Connect(function(FiredBy,Input)
  21. if FiredBy.Name ~= InternalData.RealOwner.Name then return end
  22. if Input.MouseEvent then
  23. Mouse.Target = Input.Target;Mouse.Hit = Input.Hit
  24. else
  25. local Begin = Input.UserInputState == Enum.UserInputState.Begin
  26. if Input.UserInputType == Enum.UserInputType.MouseButton1 then return Mouse:TriggerEvent(Begin and "Button1Down" or "Button1Up") end
  27. for _,Action in pairs(ContextActionService.Actions) do
  28. for _,Key in pairs(Action.Keys) do if Key==Input.KeyCode then Action.Function(Action.Name,Input.UserInputState,Input) end end
  29. end
  30. Mouse:TriggerEvent(Begin and "KeyDown" or "KeyUp",Input.KeyCode.Name:lower());UserInputService:TriggerEvent(Begin and "InputBegan" or "InputEnded",Input,false)
  31. end
  32. end)
  33. InternalData["Mouse"] = Mouse;InternalData["ContextActionService"] = ContextActionService;InternalData["UserInputService"] = UserInputService
  34. Event.Parent = NLS([[
  35. local Player = owner;
  36. local Event = script:WaitForChild("UserInput");
  37. local UserInputService = game:GetService("UserInputService");
  38. local Mouse = Player:GetMouse();
  39. local Input = function(Input,gameProcessedEvent)
  40. if gameProcessedEvent then return end
  41. Event:FireServer({KeyCode=Input.KeyCode,UserInputType=Input.UserInputType,UserInputState=Input.UserInputState})
  42. end
  43. UserInputService.InputBegan:Connect(Input);UserInputService.InputEnded:Connect(Input)
  44. local Hit,Target
  45. while wait(1/60) do
  46. if Hit ~= Mouse.Hit or Target ~= Mouse.Target then
  47. Hit = Mouse.Hit;Target = Mouse.Target;
  48. Event:FireServer({["MouseEvent"]=true,["Target"]=Target,["Hit"]=Hit})
  49. end
  50. end
  51. ]],InternalData.RealOwner.Character)
  52. end
  53. InternalData.RealInstance = Instance;Instance = setmetatable({},{
  54. __index = function (self,Index)
  55. if Index:lower() == 'new' then
  56. return function (Type, Parent)
  57. local Real = InternalData.RealInstance.new(Type,Parent)
  58. if not Type then return end
  59. if Type == "BillboardGui" then
  60. return setmetatable({},{
  61. __index = function (self,Index)
  62. return Real[Index]
  63. end;
  64. __newindex = function (self,Index,Value)
  65. if Index:lower() == "playertohidefrom" then
  66. if Value.Name == owner.Name then Real[Index] = InternalData.RealOwner else Real[Index] = Value end
  67. else
  68. Real[Index] = Value
  69. end
  70. end;
  71. __tostring = function(self) return tostring(Real) end;
  72. })
  73. end
  74. return Real
  75. end
  76. end
  77. return InternalData.RealInstance[Index]
  78. end;
  79. __tostring = function(self) return tostring(InternalData.RealInstance) end;
  80. });
  81. InternalData.RealGame = game;game = setmetatable({},{
  82. __index = function (self,Index)
  83. local Sandbox = function (Thing)
  84. if Thing:IsA("Player") then
  85. local RealPlayer = Thing
  86. return setmetatable({},{
  87. __index = function (self,Index)
  88. local Type = type(RealPlayer[Index])
  89. if Type == "function" then
  90. if Index:lower() == "getmouse" or Index:lower() == "mouse" then
  91. return function (self)return InternalData["Mouse"] end
  92. end
  93. return function (self,...)return RealPlayer[Index](RealPlayer,...) end
  94. elseif Index == "FakePlayer" then
  95. return true
  96. end
  97. return RealPlayer[Index]
  98. end;
  99. __tostring = function(self) return tostring(RealPlayer) end
  100. })
  101. end
  102. end
  103. if InternalData.RealGame[Index] then
  104. local Type = type(InternalData.RealGame[Index])
  105. if Type == "function" then
  106. if Index:lower() == "getservice" or Index:lower() == "service" then
  107. return function (self,Service)
  108. local FakeServices = {
  109. ["players"] = function()
  110. return setmetatable({},{
  111. __index = function (self2,Index2)
  112. local RealService = InternalData.RealGame:GetService(Service)
  113. local Type2 = type(Index2)
  114. if Type2 == "function" then
  115. return function (self,...) return RealService[Index2](RealService,...)end
  116. else
  117. if Index2:lower() == "localplayer" then return Sandbox(InternalData.RealOwner) end
  118. return RealService[Index2]
  119. end
  120. end;
  121. __tostring = function(self) return tostring(InternalData.RealGame:GetService(Service)) end
  122. })
  123. end;
  124. ["contextactionservice"] = function() return InternalData["ContextActionService"] end;
  125. ["userinputservice"] = function() return InternalData["UserInputService"] end;
  126. ["runservice"] = function()
  127. return setmetatable({},{
  128. __index = function(self2,Index2)
  129. local RealService = InternalData.RealGame:GetService(Service)
  130. local Type2 = type(Index2)
  131. if Type2 == "function" then
  132. return function (self,...) return RealService[Index2](RealService,...) end
  133. else
  134. local RunServices = {
  135. ["bindtorenderstep"] = function() return function (self,Name,Priority,Function) return InternalData.RealGame:GetService("RunService").Stepped:Connect(Function) end end;
  136. ["renderstepped"] = function() return RealService["Stepped"] end
  137. }
  138. if RunServices[Index2:lower()] then return RunServices[Index2:lower()]() end
  139. return RealService[Index2]
  140. end
  141. end;
  142. __tostring = function(self) return tostring(InternalData.RealGame:GetService("RunService")) end
  143. })
  144. end
  145. }
  146. if FakeServices[Service:lower()] then return FakeServices[Service:lower()]() end
  147. return InternalData.RealGame:GetService(Service)
  148. end
  149. end
  150. return function (self,...) return InternalData.RealGame[Index](InternalData.RealGame,...) end
  151. else
  152. if game:GetService(Index) then return game:GetService(Index) end
  153. return InternalData.RealGame[Index]
  154. end
  155. end
  156. return nil
  157. end;
  158. __tostring = function(self) return tostring(InternalData.game) end
  159. });Game = game;owner = game:GetService("Players").LocalPlayer;script = Instance.new("Script");print("Complete!")
  160.  
  161. --//Paste script below this line.
  162. wait()
  163. if game.Players.LocalPlayer.Character.Animate.Disabled==false then
  164. game.Players.LocalPlayer.Character.Animate.Disabled=true
  165. end
  166. if game.Players.LocalPlayer.Character.Humanoid.Animator then
  167. game.Players.LocalPlayer.Character.Humanoid.Animator:Destroy()
  168. end
  169. wait()
  170. local Player=game.Players.LocalPlayer
  171. repeat wait()
  172. until Player
  173. local Char=Player.Character
  174. repeat wait()
  175. until Char
  176. local CurrentEffects={}
  177. local CurrentDamages={}
  178. local Human=Char.Humanoid
  179. local LArm=Char["Left Arm"]
  180. local RArm=Char["Right Arm"]
  181. local LLeg=Char["Left Leg"]
  182. local RLeg=Char["Right Leg"]
  183. local Torso=Char.Torso
  184. local RS=Torso["Right Shoulder"]
  185. local LS=Torso["Left Shoulder"]
  186. local RH=Torso["Right Hip"]
  187. local LH=Torso["Left Hip"]
  188. local Head=Char.Head
  189. local Neck=Torso.Neck
  190. local RootPart=Char.HumanoidRootPart
  191. local RootJoint=RootPart.RootJoint
  192. local equipped=false
  193. local Debounce=false
  194. local Anim="Idle"
  195. local chat = game:GetService("Chat")
  196. local Mouse=Player:GetMouse()
  197. local Lighting=game.Lighting
  198. local cam=workspace.CurrentCamera
  199. local cf=CFrame.new
  200. local v3=Vector3.new
  201. local c3=Color3.new
  202. local it=Instance.new
  203. local angles=CFrame.Angles
  204. local rad=math.rad
  205. local ran=math.random
  206. local huge=math.huge
  207. local attacking=false
  208. local attacktype=1
  209. local Sheathed=true
  210. Tool=script.Parent
  211. Equipped=false
  212. op=false
  213. necko=cf(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
  214. LHC0=cf(-1,-1,0,-0,-0,-1,0,1,0,1,0,0)
  215. LSC0=cf(-1, 0.5, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
  216. RHC0=cf(1,-1,0,0,0,1,0,1,0,-1,-0,-0)
  217. RSC0=cf(1, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  218. ROOTC0 = cf(0, 0, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
  219. RHC01=cf(1, -1, 0, 0, -0.087155737, 0.99619472, 0, 0.99619472, 0.087155737, -1, 0, 0)
  220. LHC01=cf(-1, -1, 0, 0, 0.087155737, -0.99619472, 0, 0.99619472, 0.087155737, 1, 0, 0)
  221. RSC01=cf(1, 0.5, 0, 0, -0.173648179, 0.98480773, 0, 0.98480773, 0.173648179, -1, 0, 0)
  222. LSC01=cf(-1, 0.5, 0, 0, 0.173648179, -0.98480773, 0, 0.98480773, 0.173648179, 1, 0, 0)
  223. ROOTC01=cf(0, 0, 0, -0.939692616, 0.342020124, 0, 0, 0, 1, 0.342020124, 0.939692616, 0)
  224. NECKC01=cf(0, 1, 0, -0.939692616, -0.342020124, 0, -0.0593911707, 0.163175911, 0.98480773, -0.336824059, 0.925416529, -0.173648179)
  225. Joints={RH.C0,LH.C0,RS.C0,LS.C0,RootJoint.C0,Neck.C0}
  226. --why do people label stuff with comments, y.
  227. r=game:service'RunService'.RenderStepped
  228. clerp=function(a,b,t)
  229. return a:lerp(b,t)
  230. end
  231. Combo=0
  232. TotalDamage=0
  233. Damage=0
  234. ComboMoves={}
  235. Inputs={}
  236. CurrentTarget=""
  237. Inp=Player:GetChildren()
  238. LastAnim=""
  239.  
  240. print(cam.CameraType)
  241. Human.WalkSpeed=30
  242. Human.JumpPower=50
  243.  
  244. for i=1,#Inp do
  245. if Inp[i]:IsA('Sound') then Inp[i]:Remove() end
  246. end
  247.  
  248. --Functions
  249.  
  250. function FindDist(a,b)
  251. return math.sqrt((b.p.x-a.p.x)^2+(b.p.y-a.p.y)^2+(b.p.z-a.p.z)^2)
  252. end
  253.  
  254. Round=function(Num)
  255. local mid=math.ceil(Num)
  256. mid=mid-.5
  257. if Num>=mid then
  258. return math.ceil(Num)
  259. else return math.floor(Num)
  260. end
  261. end
  262.  
  263. SFX=function(id,name,vol)
  264. local s=it("Sound",Sounds)
  265. s.SoundId=id
  266. s.Name=name
  267. s.Volume=vol
  268. end
  269.  
  270. gui = function(GuiType, parent, text, backtrans, backcol, pos, size)
  271. local gui = Instance.new(GuiType)
  272. gui.Parent = parent
  273. gui.Text = text
  274. gui.BackgroundTransparency = backtrans
  275. gui.BackgroundColor3 = backcol
  276. gui.SizeConstraint = "RelativeXY"
  277. gui.TextXAlignment = "Center"
  278. gui.TextYAlignment = "Center"
  279. gui.Position = pos
  280. gui.Size = size
  281. gui.Font = "Cartoon"
  282. gui.FontSize = "Size60"
  283. gui.TextWrapped = false
  284. gui.TextStrokeTransparency = 0
  285. gui.TextColor = BrickColor.new("Pastal white")
  286. return gui
  287. end
  288.  
  289. Torso.Anchored=false
  290.  
  291.  
  292.  
  293. function rayCast(Position, Direction, Range, Ignore)
  294. return game:service("Workspace"):FindPartOnRay(Ray.new(Position, Direction.unit * (Range or 999.999)), Ignore)
  295. end
  296. --Damage function
  297. function Damage(part,min,max,range,font)
  298. for i,v in pairs(workspace:GetChildren()) do
  299. if v:FindFirstChild('Humanoid') and v:FindFirstChild('Torso') and v.ClassName=="Model" and FindDist(part,v.Torso.CFrame)<=range and v.Name~= Player.Name then
  300. local dmg=Round(math.random(min,max))
  301. local bil=Instance.new("BillboardGui",v:FindFirstChild("Torso"))
  302. bil.Adornee=v:FindFirstChild("Torso")
  303. bil.Size=UDim2.new(0, 500, 0, 500)
  304. bil.ExtentsOffset=Vector3.new(ran(-3,3),ran(-3,3),ran(-3,3))
  305. local tx=Instance.new("TextLabel",bil)
  306. tx.Text=""..dmg..""
  307. tx.Font="Cartoon"
  308. tx.FontSize="Size60"
  309. tx.TextWrapped = false
  310. tx.TextStrokeTransparency = 0
  311. tx.TextColor = BrickColor.new("Pastel white")
  312. tx.TextXAlignment = "Center"
  313. tx.TextYAlignment = "Center"
  314. tx.TextWrapped = false
  315. tx.SizeConstraint = "RelativeXY"
  316. v:FindFirstChild('Humanoid'):TakeDamage(math.random(min,max))
  317. spawn(function()
  318. for ii=1,10 do r:wait()
  319. tx.TextTransparency=ii/10 end
  320. bil:Destroy() end)
  321. end end end
  322.  
  323. sine=1
  324. change=1
  325.  
  326. --Detect State
  327.  
  328. detect_state = function()
  329. local Torsovelocity = (RootPart.Velocity * Vector3.new(1, 0, 1)).magnitude
  330. local velocity = RootPart.Velocity.y
  331. sine = sine + change
  332. local hit, pos = rayCast(RootPart.Position, (CFrame.new(RootPart.Position, RootPart.Position - Vector3.new(0, 1, 0))).lookVector, 4, Char)
  333. if attacking==false then
  334. if RootPart.Velocity.y > 1 and hit == nil and attacking==false then
  335. Anim = "Jump"--print(Anim)
  336. Neck.C0=clerp(Neck.C0,necko*angles(rad(-15),rad(0),rad(0)),.3)
  337. RH.C0=clerp(RH.C0,RHC0*angles(rad(-10),rad(0),rad(0)),.3)
  338. LH.C0=clerp(LH.C0,LHC0*angles(rad(-10),rad(0),rad(0)),.3)
  339. RS.C0=clerp(RS.C0,RSC0*angles(rad(-20),rad(0),rad(-20)),.3)
  340. LS.C0=clerp(LS.C0,LSC0*angles(rad(-20),rad(0),rad(20)),.3)
  341. elseif RootPart.Velocity.y < -1 and hit == nil and attacking==false then
  342. Anim = "Fall"--print(Anim)
  343. Neck.C0=clerp(Neck.C0,necko*angles(rad(35),rad(0),rad(0)),.3)
  344. RH.C0=clerp(RH.C0,RHC01*angles(rad(0),rad(0),rad(-5)),.3)
  345. LH.C0=clerp(LH.C0,LHC01*angles(rad(0),rad(0),rad(20)),.3)
  346. RS.C0=clerp(RS.C0,RSC0*angles(rad(-100),rad(0),rad(0)),.3)
  347. LS.C0=clerp(LS.C0,LSC0*angles(rad(-100),rad(0),rad(0)),.3)
  348. LastAnim="Fall"
  349. elseif Torsovelocity < 1 and hit ~= nil and Equipped==false and attacking==false then
  350. Anim = "Idle"--print(Anim)
  351. change=1
  352. if LastAnim~="Idle" then LastAnim="Idle"
  353. for i=1,16 do r:wait()
  354. RS.C0=RS.C0:lerp(RSC01,.3)
  355. LS.C0=LS.C0:lerp(LSC01,.3)
  356. RH.C0=RH.C0:lerp(RHC01,.3)
  357. LH.C0=LH.C0:lerp(LHC01,.3)
  358. RootJoint.C0=RootJoint.C0:lerp(ROOTC01,.3)
  359. Neck.C0=Neck.C0:lerp(NECKC01,.3)
  360. end
  361. end
  362. r:wait() RS.C0=RS.C0*cf(0,(math.cos(sine/15))/200,0)*angles(0,(math.cos(sine/-15))/-300,0)
  363. LS.C0=LS.C0*cf(0,(math.cos(sine/15))/200,0)*angles(0,(math.cos(sine/15))/300,0)
  364. Neck.C0=Neck.C0*angles((math.cos(sine/15))/300,0,0)
  365. RH.C0=RH.C0*cf((math.cos(sine/-15))/500,0,0)
  366. LH.C0=LH.C0*cf((math.cos(sine/-15))/500,0,0)
  367. RootJoint.C0=RootJoint.C0*cf(0,0,(math.cos(sine/15))/500)
  368. elseif Torsovelocity > 2 and hit ~= nil and attacking==false then
  369. Anim = "Walk" --print(Anim)
  370. r:wait()
  371. change=3
  372. Neck.C0=clerp(Neck.C0,necko*angles(rad(0),0,0),.3)
  373. RootJoint.C0 = clerp(RootJoint.C0, ROOTC0 * cf(0, 0, 0) * angles(math.rad(10 + 1 * math.cos(sine / 15)), math.rad(0), 0), .3)
  374. RH.C0 = clerp(RH.C0, cf(0, 0, 0 - 0.5 * math.cos(sine / 10) / 2) * RHC0 * angles(math.rad(-3), math.rad(10), math.rad(30 * math.cos(sine / 10))), .3)
  375. LH.C0 = clerp(LH.C0, cf(0, 0, 0 + 0.5 * math.cos(sine / 10) / 2) * LHC0 * angles(math.rad(-3), math.rad(10), math.rad(30 * math.cos(sine / 10))), .3)
  376. RS.C0 = clerp(RS.C0, RSC0 * angles(math.rad(-10), math.rad(10), math.rad(-20)),.3)
  377. LS.C0 = clerp(LS.C0, LSC0 * angles(math.rad(-10), math.rad(10), math.rad(20)),.3)
  378. LastAnim="Walk"
  379. end
  380. end
  381. end
  382.  
  383. --Folders+More functions
  384.  
  385. Effects=Instance.new("Folder",Char)
  386. Effects.Name="Effects"
  387. Welds=Instance.new("Folder",Char)
  388. Welds.Name="Welds"
  389. Sounds=Instance.new("Folder",Char)
  390. Sounds.Name="Sounds"
  391. part=function(parent,anchored,cancollide,size,cframe,col3,material,trans)
  392. local p=it("Part",parent)
  393. p.Anchored=anchored
  394. p.CanCollide=cancollide
  395. p.Size=size
  396. p.CFrame=cframe
  397. p.Color=col3
  398. p.Material=material
  399. p.Transparency=trans
  400. return p
  401. end
  402.  
  403. mesh=function(parent,ttype,scale)
  404. local m=it("SpecialMesh",parent)
  405. m.MeshType=ttype
  406. m.Scale=scale
  407. return m
  408. end
  409.  
  410. spmesh=function(parent,id,scale)
  411. local m=it("SpecialMesh",parent)
  412. m.MeshId=id
  413. m.Scale=scale
  414. return m
  415. end
  416.  
  417. local Smooth=function(Table)
  418. for _, v in pairs(Table) do
  419. if v.ClassName=="Part" then
  420. v.TopSurface,v.BottomSurface,v.BackSurface,v.FrontSurface,v.LeftSurface,v.RightSurface=10,10,10,10,10,10 end end
  421. end
  422.  
  423. local function PowerGlow(Parent,Cframe,Col1,Col2,Material,Size)spawn(function()
  424. local Colours = {BrickColor.new(Col1),BrickColor.new(Col2)}
  425. local Power1 = Instance.new("Part", Parent)
  426. Power1.CFrame = Cframe
  427. Power1.Size = Vector3.new(0,0,0)
  428. Power1.TopSurface = 0
  429. Power1.BottomSurface = 0
  430. Power1.CanCollide = false
  431. Power1.Anchored = true
  432. Power1.Material = Material
  433. Power1.BrickColor = Colours[math.random(1,#Colours)]
  434. local m = Instance.new("SpecialMesh", Power1)
  435. m.MeshType = "Sphere"
  436. m.Scale = Vector3.new(Size*.3,Size*.3,Size*.3)
  437. local a = Size/30
  438. local b = Size/30
  439. local c = (Size/3)*13.25999999
  440. Power1.CFrame = Power1.CFrame*CFrame.Angles(rad(90),0,0)
  441. for i = 1,10 do
  442. m.Scale = m.Scale+Vector3.new(a,b,c/2)
  443. Power1.Transparency = i/10
  444. game:service'RunService'.RenderStepped:wait()
  445. end
  446. m:Destroy()
  447. Power1:Destroy()end)
  448. end
  449.  
  450. Lightning = function(Start,End,Times,Offset,Color,Thickness)
  451.  
  452. local magz = (Start - End).magnitude local curpos = Start local trz = {-Offset,Offset}
  453.  
  454. for i=1,Times do
  455.  
  456. local li = Instance.new("Part",Char) li.TopSurface =0 li.BottomSurface = 0 li.Anchored = true
  457.  
  458. li.Material = "Neon"
  459.  
  460. li:BreakJoints()
  461.  
  462. li.Transparency = 0 li.BrickColor = Color
  463.  
  464. li.formFactor = "Custom" li.CanCollide = false
  465.  
  466. li.Size = Vector3.new(Thickness,Thickness,magz/Times)
  467.  
  468. local ofz = Vector3.new(trz[math.random(1,2)],trz[math.random(1,2)],trz[math.random(1,2)])
  469.  
  470. local trolpos = CFrame.new(curpos,End)*CFrame.new(0,0,magz/Times).p+ofz
  471.  
  472. if Times == i then
  473.  
  474. local magz2 = (curpos - End).magnitude li.Size = Vector3.new(Thickness,Thickness,magz2)
  475.  
  476. li.CFrame = CFrame.new(curpos,End)*CFrame.new(0,0,-magz2/2)
  477.  
  478. else
  479.  
  480. li.CFrame = CFrame.new(curpos,trolpos)*CFrame.new(0,0,magz/Times/2)
  481.  
  482. end
  483.  
  484. curpos = li.CFrame*CFrame.new(0,0,magz/Times/2).p spawn(function() wait() li:Destroy() end)
  485.  
  486.  
  487.  
  488. end
  489.  
  490. end
  491.  
  492. --Feet Welds
  493.  
  494. RightFoot=part(Char,false,false,v3(0,0,0),cf(0,0,0),c3(-1,0,0),"Neon",1)
  495. LeftFoot=part(Char,false,false,v3(0,0,0),cf(0,0,0),c3(-1,0,0),"Neon",1)
  496. RF=it("Weld",Welds)
  497. RF.Name="RF"
  498. RF.Part0=RightFoot
  499. RF.Part1=RLeg
  500. RF.C0=RF.C0*cf(0,1,0)
  501. LF=it("Weld",Welds)
  502. LF.Name="LF"
  503. LF.Part0=LeftFoot
  504. LF.Part1=LLeg
  505. LF.C0=LF.C0*cf(0,1,0)
  506.  
  507. --Click Combo
  508.  
  509. --[[Mouse.Button1Down:connect(function()
  510. if attacking== false and attacktype == 1 and Equipped==false then print"RAWR"
  511. attackone()
  512. attacktype = 2
  513. elseif attacking== false and attacktype == 1 and Equipped==true then print"Swish"
  514. attackfour()
  515. attacktype=2
  516. else
  517. if attacking == false and attacktype == 2 and Equipped==false then print"XD"
  518. attacktwo()
  519. attacktype = 3
  520. elseif attacking == false and attacktype == 2 and Equipped==true then print"Swash"
  521. attackfive()
  522. attacktype=3
  523. else
  524. if attacking == false and attacktype == 3 and Equipped==false then print"DAI"
  525. attackthree()
  526. attacktype = 1
  527. elseif attacking == false and attacktype == 3 and Equipped==true then print"STEB"
  528. attacksix()
  529. attacktype=1
  530. end
  531. end
  532. end
  533. end)]]
  534.  
  535. --Sounds
  536.  
  537. local Draw=Instance.new("Sound",Sounds)
  538. Draw.Name="Draw"
  539. Draw.SoundId="rbxassetid://188779478"
  540. Draw.Volume=18
  541. local poo=it('Sound',Sounds)
  542. poo.Name="JumpEffect"
  543. poo.SoundId="rbxassetid://231917987"
  544. poo.Volume=.3
  545. SFX("rbxassetid://320557487","BasicAttackOne",1)
  546.  
  547. --Key Input Detection
  548.  
  549. Input=""
  550.  
  551. Mouse.KeyDown:connect(function(key) Input=Input..key wait() Input ="" end)
  552. spawn(function()while r:wait() do
  553. if Input=="z" and attacking==false then print(Input)
  554. Input ="" Z()Input=""
  555. elseif Input=="x" and attacking==false then print(Input)
  556. Input="" X()Input=""
  557. elseif Input=="c" and attacking==false then print(Input)
  558. Input=""C()Input=""
  559. elseif Input=="v" and attacking==false then print(Input)
  560. Input=""V()Input=""
  561. end
  562. end end)
  563.  
  564. --Moves
  565.  
  566. Z=function()
  567. RH.C0=clerp(RH.C0,RHC0*angles(rad(-5),rad(0),rad(0)),1)
  568. LH.C0=clerp(LH.C0,LHC0*angles(rad(-5),rad(0),rad(0)),1)
  569. RS.C0=clerp(RS.C0,RSC0*angles(rad(-10),rad(0),rad(0)),1)
  570. LS.C0=clerp(LS.C0,LSC0*angles(rad(-10),rad(0),rad(0)),1)
  571. Neck.C0=clerp(Neck.C0,necko*angles(rad(10),rad(0),rad(-20)),1)
  572. RootJoint.C0=RootJoint.C0:lerp(ROOTC0*angles(rad(0),rad(0),rad(20)),1)
  573.  
  574. print(RH.C0)
  575. print(LH.C0)
  576. print(RS.C0)
  577. print(LS.C0)
  578. print(RootJoint.C0)
  579. print(Neck.C0)
  580. end
  581.  
  582. X=function()
  583. attacking=true
  584. math.randomseed(tick())
  585. math.random()
  586. local ids={"rbxassetid://327264499","rbxassetid://327264897","rbxassetid://331196652","rbxassetid://298947115"}
  587. local Li = Instance.new("BillboardGui",Char)
  588. Li.Size = UDim2.new(0,100,0,40)
  589. Li.StudsOffset = Vector3.new(0,3,0)
  590. Li.Adornee = Torso
  591. Li.Size=UDim2.new(5,0,5,0)
  592. local img=it("ImageLabel",Li)
  593. img.Image=ids[math.random(1,#ids)]
  594. img.BackgroundTransparency=1
  595. img.Size=UDim2.new(1,0,1,0)
  596. for i=1,200000000000000 do r:wait()
  597. img.Image=ids[math.random(1,#ids)]
  598. img.Rotation=math.random(1,360)
  599. end
  600. attacking=false
  601. end
  602. li=function()
  603. local ids={"rbxassetid://327264499","rbxassetid://327264897","rbxassetid://331196652","rbxassetid://298947115"}
  604. local Li = Instance.new("BillboardGui",Torso)
  605. Li.Size = UDim2.new(0,300,0,120)
  606. Li.StudsOffset = Vector3.new(0,0,0)
  607. Li.Adornee = Torso
  608. Li.Size=UDim2.new(5,0,5,0)
  609. local img=it("ImageLabel",Li)
  610. img.Image=ids[math.random(1,#ids)]
  611. img.BackgroundTransparency=1
  612. img.Size=UDim2.new(1,0,1,0) spawn(function()
  613. while op==true do r:wait()
  614. img.Image=ids[math.random(1,#ids)]
  615. img.Rotation=math.random(1,360)
  616. end
  617. Li:Destroy()
  618. end)
  619. end
  620. C=function()
  621. attacking=true
  622. local bv=it("BodyVelocity")
  623. bv.maxForce=v3(huge,huge,huge)
  624.  
  625. for i=1,40 do r:wait()
  626. RootJoint.C0=clerp(RootJoint.C0,ROOTC0*angles(0,0,rad(-90)),.3)
  627. Neck.C0=clerp(Neck.C0,necko*angles(0,0,rad(90)),.3)
  628. RS.C0=clerp(RS.C0,RSC0*angles(rad(-90),0,0),.3)
  629. end
  630. bv.Velocity=((Head.CFrame*angles(0,0,rad(90)).p-Head.CFrame*angles(0,0,rad(90))*cf(0,0,-1).p)*-1).unit*80
  631. local ball=part(Effects,true,false,v3(.2,.2,.2),RArm.CFrame*cf(0,-1.5,0),BrickColor.new('Cyan').Color,"Neon",0)
  632. local bm=mesh(ball,"Sphere",v3(1,1,1))
  633. ball.Shape="Ball"
  634. for i=1,50 do r:wait()
  635. bm.Scale=bm.Scale+v3(.1,.1,.1)
  636. PowerGlow(Effects,RArm.CFrame*cf(0,-1.5,0)*angles(ran(-math.pi,math.pi),ran(-math.pi,math.pi),ran(-math.pi,math.pi)),BrickColor.new('Cyan').Color,'Pastel white',"Neon",i/20)
  637. end
  638. bv.Parent=Torso
  639. spawn(function()
  640. repeat r:wait()
  641. ball.CFrame=RArm.CFrame*cf(0,-1.5,0)
  642. until attacking==false
  643. ball:Destroy()
  644. end)
  645. for i=1,30 do r:wait()
  646. RootJoint.C0=clerp(RootJoint.C0,ROOTC0*angles(rad(45),0,0)*cf(0,0,-.6),.3)
  647. Neck.C0=clerp(Neck.C0,necko*angles(rad(5),0,0),.3)
  648. RS.C0=clerp(RS.C0,RSC0*angles(0,0,rad(90))*cf(.3,0,0),.3)
  649. RH.C0=clerp(RH.C0,RHC0*angles(0,0,rad(-45)),.3)
  650. LH.C0=clerp(LH.C0,LHC0*angles(0,0,rad(-45)),.3)
  651. end
  652. bv:Destroy()
  653. wait(.455)
  654. local fg=Ray.new(RArm.Position+v3(0,-1.5,0),v3(0,-5,0))
  655. local par,pos=workspace:FindPartOnRayWithIgnoreList(fg,Char:children(),false,true)
  656. if par and pos then
  657. local bem=part(Effects,true,false,v3(1,1,1),cf(pos)*angles(0,0,rad(-90)),BrickColor.new("Cyan").Color,"Neon",0)
  658. local beem=mesh(bem,"Cylinder",v3(400,2,400))
  659. local cirs={}
  660. for i=1,3 do r:wait()
  661. local c=part(Effects,true,false,v3(0,0,0),cf(pos)*angles(rad(-90),0,0),BrickColor.new("Cyan").Color,"Neon",0)
  662. local cm=spmesh(c,"rbxassetid://3270017",v3((i*8)+5,(i*8)+5,(i*2)+18))
  663. table.insert(cirs,c)
  664.  
  665. end
  666. for i=1,60 do r:wait()
  667. beem.Scale=beem.Scale+v3(.5,.5,.5)
  668. bem.Transparency=i/180
  669. for _,v in pairs(cirs) do
  670. spawn(function()
  671. v.Transparency=i/60
  672. --- v.Mesh.Scale=v.Mesh.Scale+v3(.5,.5,.1)
  673. end)
  674. end
  675. end
  676. bem:Destroy()
  677. for _,v in pairs(cirs) do
  678. v:Destroy()
  679. end
  680. end
  681. attacking=false
  682. end
  683. function mhands(cframe)
  684. spawn(function()
  685. l=BrickColor.new('Cyan')
  686. local h=part(Effects,true,false,v3(0,0,0),cframe*angles(ran(-10,10),ran(-10,10),ran(-10,10)),l.Color,"Neon",0)
  687. local hm=mesh(h,"Brick",v3(7*3,7*3,7*3))
  688. for i=1,40 do r:wait()
  689. h.Transparency=i/40
  690. end
  691. h:Destroy()
  692. end)
  693. end
  694. function circles(cfr)
  695. spawn(function()
  696. local cir=part(Effects,true,false,v3(0,0,0),cfr,BrickColor.new('Cyan').Color,"Neon",0)
  697. local cm=spmesh(cir,"rbxassetid://3270017",v3(4,4,2))
  698. for i=1,180 do r:wait()
  699. cm.Scale=cm.Scale+v3(2,2,2)
  700. cir.Transparency=i/10
  701. end
  702. cir:Destroy()
  703. end)
  704. end
  705. V=function()
  706. attacking=true
  707. Human.WalkSpeed=0
  708. Human.JumpPower=0
  709. li()
  710. function sw(t) spawn(function()
  711. local c=part(Effects,true,false,v3(0,0,0),Torso.CFrame*cf(0,-1.3,0),l.Color,"Neon",.9)
  712. local cm=spmesh(c,"rbxassetid://20329976",v3(6,2,6))
  713. for i=1,100 do r:wait()
  714. cm.Scale=cm.Scale:Lerp(cm.Scale+Vector3.new(4,-.021,4),1)
  715. if t==true then
  716. c.CFrame=c.CFrame*angles(0,rad(i),0)
  717. elseif t==false then
  718. c.CFrame=c.CFrame*angles(0,rad(i*-1),0)
  719. end
  720. c.Transparency=.9+i/100
  721. end
  722. c:Destroy() end)
  723. end
  724. for i=1,100 do r:wait()
  725. if i%3==0 then
  726. mhands(RArm.CFrame*cf(0,-1.5,0))
  727. mhands(LArm.CFrame*cf(0,-1.5,0))
  728. sw(true)
  729. end
  730. if i%4==0 then
  731. Lightning(RArm.CFrame*cf(0,-1.5,0).p,RArm.CFrame*cf(0,-30,0).p,7,3,BrickColor.new('Cyan'),.2)
  732. Lightning(LArm.CFrame*cf(0,-1.5,0).p,LArm.CFrame*cf(0,-30,0).p,7,3,BrickColor.new('Cyan'),.2)
  733. circles(Torso.CFrame*cf(-30,0,0)*angles(0,math.pi/2,0))
  734. circles(Torso.CFrame*cf(30,0,0)*angles(0,math.pi/2,0))
  735. sw(false)
  736. end
  737. Damage(Torso.CFrame,.5,1,30)
  738. PowerGlow(Effects,Torso.CFrame*cf(ran(-10,10),-1.3,ran(-10,10)),BrickColor.new('Cyan').Color,'Pastel white',"Neon",3)
  739. RH.C0=clerp(RH.C0,RHC0*angles(rad(0),rad(0),rad(0))*cf(0,0,0),.3)
  740. LH.C0=clerp(LH.C0,LHC0*angles(rad(0),rad(0),rad(0))*cf(0,0,0),.3)
  741. RS.C0=clerp(RS.C0,RSC0*angles(rad(-90),rad(0),rad(0))*cf(0,0,0),.3)
  742. LS.C0=clerp(LS.C0,LSC0*angles(rad(-90),rad(0),rad(10)),.3)
  743. Neck.C0=clerp(Neck.C0,necko*angles(rad(-15),rad(0),rad(0)),.3)
  744. RootJoint.C0=RootJoint.C0:lerp(ROOTC0*angles(rad(0),rad(0),rad(0)),.3)
  745. end
  746. Lightning(Torso.Position,Torso.Position+v3(0,200,0),18,3,BrickColor.new('Cyan'),4)
  747. ---local cc=it("ColorCorrectionEffect",game.Lighting)
  748. ---cc.Brightness=1
  749. local p=part(Effects,true,false,v3(0,0,0),Torso.CFrame,BrickColor.new('Cyan').Color,"Neon",0)
  750. local pm=mesh(p,"Sphere",v3(1,1,1))
  751. spawn(function()
  752. for i=50,1,-1 do r:wait()
  753. ---cc.Brightness=i/50
  754. end
  755. ---cc:Destroy()
  756. end)
  757. spawn(function()for c=1,25 do r:wait()
  758. pm.Scale=pm.Scale+v3(3,3,3)
  759. p.Transparency=c/25
  760.  
  761. end
  762. local EyePart=part(Char,false,false,v3(.3,.3,.3),Torso.CFrame,BrickColor.new('Cyan').Color,"Neon",0)
  763. EyePart.Name="EyePart"
  764. EyePart.Shape="Ball"
  765. local EyePart2=EyePart:Clone()
  766. EyePart2.Parent=Char
  767. local EyeWeld=it("Weld",Char)
  768. EyeWeld.Part0=EyePart
  769. EyeWeld.Part1=Head
  770. EyeWeld.C0=EyeWeld.C0*cf(.2,-.25,.578)
  771. local EyeWeld2=it("Weld",Char)
  772. EyeWeld2.Part0=EyePart2
  773. EyeWeld2.Part1=Head
  774. EyeWeld2.C0=EyeWeld2.C0*cf(-.2,-.25,.578)
  775. local EyeSizes={
  776. NumberSequenceKeypoint.new(0,.4,0),
  777. NumberSequenceKeypoint.new(1,0,0)
  778. }
  779. local EyeTrans={
  780. NumberSequenceKeypoint.new(0,0,0),
  781. NumberSequenceKeypoint.new(1,1,0)
  782. }
  783. local PE=it("ParticleEmitter",EyePart)
  784. PE.LightEmission=1
  785. PE.LockedToPart=false
  786. PE.Size=NumberSequence.new(EyeSizes)
  787. PE.Transparency=NumberSequence.new(EyeTrans)
  788. --PE.Acceleration=v3(2,0,0)
  789. PE.Lifetime=NumberRange.new(2,2,2)
  790. PE.Rate=34958349053045
  791. PE.Speed=NumberRange.new(2,2,2)
  792. PE.Texture="rbxassetid://253188606"
  793. local PE2=PE:Clone()
  794. PE2.Parent=EyePart2
  795. while r:wait() do
  796. PE.Acceleration=v3(math.sin(tick()),0,math.sin(tick()))
  797. PE2.Acceleration=v3(math.cos(tick()),0,math.cos(tick()))
  798. end
  799. end)
  800. for i=1,10 do r:wait() spawn(function()
  801. local c=part(Effects,true,false,v3(1,1,1),Head.CFrame,BrickColor.new("Cyan").Color,"Neon",.4)
  802. local c2=part(Effects,true,false,v3(1,1,1),Head.CFrame,BrickColor.new("Cyan").Color,"Neon",.4)
  803. local cm=spmesh(c,"rbxassetid://3270017",v3(1,1,.4))
  804. local cm2=spmesh(c2,"rbxassetid://3270017",v3(1,1,.4))
  805. for ii=1,60 do r:wait()
  806. c.CFrame=c.CFrame*angles(ran(-math.pi,math.pi),ran(-math.pi,math.pi),ran(-math.pi,math.pi))
  807. c2.CFrame=c2.CFrame*angles(ran(-math.pi,math.pi),ran(-math.pi,math.pi),ran(-math.pi,math.pi))
  808. cm.Scale=cm.Scale+v3(4,4,0)
  809. cm2.Scale=cm2.Scale+v3(4,4,0)
  810. c.Transparency=.4+ii/50
  811. c2.Transparency=.4+ii/50
  812. Damage(Torso.CFrame,8,20,35)
  813. end
  814. end) wait()
  815. end
  816. wait(.75)
  817. li()
  818. p:Destroy()
  819. Human.WalkSpeed=20
  820. Human.JumpPower=50
  821. attacking=false
  822. op=true
  823. for _,v in pairs(Effects:GetChildren()) do
  824. v:Destroy()
  825. end
  826. for i=1,40 do r:wait()
  827. if attacking==true then break end
  828. RH.C0=clerp(RH.C0,RHC01,.3)
  829. LH.C0=clerp(LH.C0,LHC01,.3)
  830. RS.C0=clerp(RS.C0,RSC01,.3)
  831. LS.C0=clerp(LS.C0,LSC01,.3)
  832. Neck.C0=clerp(Neck.C0,NECKC01,.3)
  833. RootJoint.C0=clerp(RootJoint.C0,ROOTC01,.3)
  834. end
  835. end
  836.  
  837. spawn(function()
  838. for i=1,huge do r:wait()
  839. if op==true then
  840. if i%5 ==0 then
  841. sw(true)
  842. sw(false)
  843. mhands(RArm.CFrame*cf(0,-1.5,0))
  844. mhands(LArm.CFrame*cf(0,-1.5,0))
  845. end
  846. if i%40==0 then
  847. Lightning(Torso.CFrame*cf(ran(-10,10),ran(-3,10),ran(-10,10)).p,Torso.CFrame*cf(ran(-10,10),ran(-3,10),ran(-10,10)).p,4,3,BrickColor.new('Cyan'),.2)
  848. end
  849. end
  850. end
  851. end)
  852. while r:wait() do detect_state() end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement