Advertisement
samuelrichter66

flying orb

Jun 29th, 2019
189
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 68.96 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.  
  153.  
  154. local armmovments = false
  155. local plr = game:GetService('Players').LocalPlayer
  156. local chr = plr.Character
  157. local maus = plr:GetMouse()
  158. local PGui=plr.PlayerGui
  159. local lleg = chr["Left Leg"]
  160. local rleg = chr["Right Leg"]
  161. local larm = chr["Left Arm"]
  162. local rarm = chr["Right Arm"]
  163. local hed = chr.Head
  164. local rutprt = chr.HumanoidRootPart
  165. local torso = chr.Torso
  166. local otheranims=false
  167. local swimming=false
  168. chr.Animate.Disabled=true
  169. local fldb={['w']=false,['a']=false,['s']=false,['d']=false}
  170. local RunSpeed=50
  171. local WlkSpeed=30
  172. local SwimSpeed=14
  173. local SwimDashSpeed=28
  174. local anim = "Idling"
  175. local lastanim = "Idling"
  176. local val = 0
  177. local syne = 0
  178. local num = 0
  179. local runtime = 0
  180. local pseudohead=hed:Clone()
  181. for i,x in pairs(pseudohead:GetChildren()) do if not x.ClassName:find('Mesh') then x:Destroy() end end
  182. pseudohead.Name='PseudoHead'
  183. pseudohead.Parent=chr.Head
  184. local pseudoweld=Instance.new('Weld',torso)
  185. pseudoweld.Part0=hed
  186. pseudoweld.Name='PseudoHedWld'
  187. pseudoweld.Part1=pseudohead
  188. hed.Transparency=1
  189. local Player = game:GetService('Players').LocalPlayer
  190. local Character = Player.Character
  191. local Mouse = Player:GetMouse()
  192. local LeftArm = Character:WaitForChild("Left Arm")
  193. local RightArm = Character:WaitForChild("Right Arm")
  194. local LeftLeg = Character:WaitForChild("Left Leg")
  195. local RightLeg = Character:WaitForChild("Right Leg")
  196. local Head = Character:WaitForChild("Head")
  197. local Torso = Character:WaitForChild("Torso")
  198. z = Instance.new("Sound", torso)
  199. z.SoundId = "rbxassetid://" -- Put Music ID Here.
  200. z.Looped = true
  201. z.Pitch = 0.82
  202. z.Volume = 1
  203. wait(.1)
  204. z:Play()
  205. local RootPart = Character:WaitForChild("HumanoidRootPart")
  206. local Humanoid = Character:WaitForChild("Humanoid")
  207. local LeftShoulder = Torso:WaitForChild("Left Shoulder")
  208. local RightShoulder = Torso:WaitForChild("Right Shoulder")
  209. local LeftHip = Torso:WaitForChild("Left Hip")
  210. local RightHip = Torso:WaitForChild("Right Hip")
  211. local Neck = Torso:WaitForChild("Neck")
  212. local RootJoint = RootPart:WaitForChild("RootJoint")
  213. local Camera = workspace.CurrentCamera
  214. local FLeftShoulder, FRightShoulder = Instance.new("Weld", Torso), Instance.new("Weld", Torso)
  215. FLeftShoulder.Name = "LS"
  216. FRightShoulder.Name = "RS"
  217. local FLeftHip, FRightHip = Instance.new("Weld", Torso), Instance.new("Weld", Torso)
  218. FLeftHip.Name = "LH"
  219. FRightHip.Name = "RH"
  220. local FRootJoint = Instance.new("Weld", RootPart)
  221. FRootJoint.Name = "RJ"
  222. local F1, F2, F3 = Instance.new("Folder", Character), Instance.new("Folder"), Instance.new("Folder")
  223. F1.Name = "Parts Folder"
  224. F2.Parent = F1
  225. F2.Name = "Effects"
  226. F3.Parent = F1
  227. F3.Name = "Extra Parts"
  228. local Drag_To_Part = Instance.new("Part", F3)
  229. Drag_To_Part.Transparency = 1
  230. Drag_To_Part.Name = "Drag-to-part"
  231. Drag_To_Part.Size = Vector3.new(0.2, 0.2, 0.2)
  232. Drag_To_Part.Anchored = false
  233. Drag_To_Part.CanCollide = false
  234. Drag_To_Part.Locked = true
  235. local DTPWeld = Instance.new("Weld", Drag_To_Part)
  236. DTPWeld.Part0 = RootPart
  237. DTPWeld.Part1 = Drag_To_Part
  238. local WepWeld, WepWeld2, WepWeld3, SheWeld = nil, nil, nil, nil
  239. local NLSC0 = LeftShoulder.C0
  240. local NLSC1 = LeftShoulder.C1
  241. local NRSC0 = RightShoulder.C0
  242. local NRSC1 = RightShoulder.C1
  243. local NLHC0 = LeftHip.C0
  244. local NLHC1 = LeftHip.C1
  245. local NRHC0 = RightHip.C0
  246. local NRHC1 = RightHip.C1
  247. local NNC0 = Neck.C0
  248. local NNC1 = Neck.C1
  249. local NRJC0 = RootJoint.C0
  250. local NRJC1 = RootJoint.C1
  251. local Handle, Hit_Box, Handle2, Hit_Box2, TEHandle, TESHandle, TEHit_Box, CEP = nil, nil, nil, nil, nil, nil, nil, nil
  252. local chatServ = game:GetService("Chat")
  253. local runServ = game:GetService("RunService")
  254. local debServ = game:GetService("Debris")
  255. local CurrentSpeed = 16
  256. local Current_Anim = "Idle"
  257. local Attack_Num = 1
  258. local Damage_Buff = 0
  259. local Max_Health = 400
  260. local Last_Health = Max_Health
  261. local idle = 1
  262. local idlenum = 1
  263. local idlenum2 = 1
  264. local walk = 1
  265. local walknum = 1
  266. local walknum2 = 1
  267. local Effects = {}
  268. local DragTable = {}
  269. local InputTable = {}
  270. local InputFrameTable = {}
  271. local TEBladeP = {}
  272. local TEBEffect, c1, c2 = nil, nil, nil
  273. local RGyro = Instance.new("BodyGyro")
  274. RGyro.MaxTorque = Vector3.new(0, 0, 0)
  275. RGyro.P = 2000
  276. local LLCF = CFrame.new()
  277. local SWP = Instance.new("BoolValue")
  278. local ControlScript = Player.PlayerScripts:WaitForChild("ControlScript")
  279. local Z_Pressed = false
  280. local Debounces = {Equipped = false, Equipping = false, HasWep = false, DuelWielding = false, Attacking = false, Locked_On = false, Can_Double_Jump = false, AnimOverride = false, Guarding = false, Crouching = false, JumpAnim = false, DoubleJumpAnim = false, KeyStrokeEnabled = false, Successful_KeyStroke = false, KeyStroke_CoolDown = false, UIAction = false, ZeroGravity = false, DoubleJumping = false, Charging_Erupt = false, Guarding = false, Transformed = false, DisableJump = false, Dashing = false, Hovering = false, TEWield = false, TESWield = false, CanGuard = true, SpedUp = false, HurrSlash = false, Stompped = false}
  281. local rad = math.rad
  282. local huge = math.huge
  283. local rand = math.random
  284. local Vec = Vector3.new
  285. local Cf = CFrame.new
  286. local Euler = CFrame.fromEulerAnglesXYZ
  287. local BC = BrickColor.new
  288. local Col3 = Color3.new
  289. local Inst = Instance.new
  290. local Ud2 = UDim2.new
  291.  
  292.  
  293.  
  294. local FONT = "SourceSansLight"
  295.  
  296.  
  297. MakeText = function(text, font, duration, tcr, tcg, tcb, scr, scg, scb, cFrame)
  298. local tpart = Instance.new("Part")
  299. tpart.Parent = F2
  300. tpart.Transparency = 1
  301. tpart.Name = "hoi hoi"
  302. tpart.Anchored = true
  303. tpart.CanCollide = false
  304. tpart.Locked = true
  305. tpart.Size = Vector3.new(0.2, 0.2, 0.2)
  306. tpart.CFrame = cFrame * CFrame.new(math.random(-2, 2), 0, math.random(-2, 2))
  307. local bill = Instance.new("BillboardGui")
  308. bill.Parent = tpart
  309. bill.AlwaysOnTop = true
  310. bill.Name = "HUHHHHHNAAAA"
  311. bill.Size = UDim2.new(4, 0, 4, 0)
  312. bill.StudsOffset = Vector3.new(0, 1, 0)
  313. local counter = 0
  314. local textl = Instance.new("TextLabel")
  315. textl.Parent = bill
  316. textl.Name = "WHYYYYYYYY"
  317. textl.BackgroundTransparency = 1
  318. textl.Size = UDim2.new(1, 0, 1, 0)
  319. textl.Font = font
  320. textl.Text = text
  321. textl.TextColor3 = Color3.new(tcr / 255, tcg / 255, tcb / 255)
  322. textl.TextScaled = true
  323. textl.TextStrokeColor3 = Color3.new(scr / 255, scg / 255, scb / 255)
  324. textl.TextStrokeTransparency = 0
  325. coroutine.resume(coroutine.create(function()
  326. while textl.TextTransparency < 1 do
  327. swait()
  328. if bill.StudsOffset.Y >= 5 then
  329. if duration <= counter then
  330. textl.TextTransparency = textl.TextTransparency + 0.15
  331. textl.TextStrokeTransparency = textl.TextStrokeTransparency + 0.15
  332. end
  333. end
  334. counter = counter + 0.1
  335. bill.StudsOffset = Vector3.new(0, bill.StudsOffset.Y + 0.15, 0)
  336. end
  337. debServ:AddItem(bill, 0)
  338. debServ:AddItem(textl, 0)
  339. debServ:AddItem(tpart, 0)
  340. end))
  341. end
  342.  
  343. Apply_Buff = function(amount, duration)
  344.  
  345. coroutine.resume(coroutine.create(function()
  346.  
  347. if amount > 0 and duration > 0 then
  348. Damage_Buff = Damage_Buff + amount
  349. MakeText("+" .. amount .. " Damage", FONT, 0.3, 255, 0, 0, 0, 0, 0, RootPart.CFrame)
  350. wait(duration)
  351. Damage_Buff = Damage_Buff - amount
  352. MakeText("-" .. amount .. " Damage", FONT, 0.3, 255, 0, 0, 0, 0, 0, RootPart.CFrame)
  353. end
  354. end
  355. ))
  356. end
  357.  
  358. Apply_Health_Buff = function(amount, duration)
  359.  
  360. coroutine.resume(coroutine.create(function()
  361.  
  362. if amount > 0 and duration > 0 then
  363. Max_Health = Max_Health + amount
  364. coroutine.resume(coroutine.create(function()
  365.  
  366. wait()
  367. Humanoid.Health = Humanoid.Health + amount
  368. end
  369. ))
  370. MakeText("+" .. amount .. " Max Health", FONT, 0.3, 255, 170, 0, 0, 0, 0, RootPart.CFrame)
  371. wait(duration)
  372. Max_Health = Max_Health - amount
  373. MakeText("-" .. amount .. " Max Health", FONT, 0.3, 255, 170, 0, 0, 0, 0, RootPart.CFrame)
  374. end
  375. end
  376. ))
  377. end
  378.  
  379.  
  380. FindHum = function(parent)
  381.  
  382. local hm = nil
  383. for _,HM in pairs(parent:GetChildren()) do
  384. if HM:IsA("Humanoid") then
  385. hm = HM
  386. end
  387. end
  388. return hm
  389. end
  390.  
  391.  
  392. ArtificialHB = Instance.new("BindableEvent", script)
  393. ArtificialHB.Name = "Heartbeat"
  394. script:WaitForChild("Heartbeat")
  395. frame = 0.033333333333333
  396. tf = 0
  397. allowframeloss = false
  398. tossremainder = false
  399. lastframe = tick()
  400. script.Heartbeat:Fire()
  401. game:GetService("RunService").Heartbeat:connect(function(s, p)
  402. tf = tf + s
  403. if frame <= tf then
  404. if allowframeloss then
  405. script.Heartbeat:Fire()
  406. lastframe = tick()
  407. else
  408. for i = 1, math.floor(tf / frame) do
  409. script.Heartbeat:Fire()
  410. end
  411. lastframe = tick()
  412. end
  413. if tossremainder then
  414. tf = 0
  415. else
  416. tf = tf - frame * math.floor(tf / frame)
  417. end
  418. end
  419. end
  420. )
  421. swait = function(num)
  422. if num == 0 or num == nil then
  423. ArtificialHB.Event:wait()
  424. else
  425. for i = 0, num do
  426. ArtificialHB.Event:wait()
  427. end
  428. end
  429. end
  430.  
  431. local DamageFunction = function(Hit, IsRan, MinDam, MaxDam, HKB, Knockback, DamType, Property, Duration, HDrag, DragDuration, SoEff, SoID, SoPit, SoVol)
  432.  
  433. local humanoid = FindHum(Hit.Parent)
  434. if humanoid and humanoid ~= Humanoid then
  435. local IsSafe = true
  436. local Deb = humanoid:FindFirstChild("ChaosDebounce")
  437. if Deb then
  438. local Cre = Deb:FindFirstChild("Creator")
  439. if Cre and Cre.Value == Player.UserId then
  440. IsSafe = false
  441. end
  442. end
  443. if IsSafe then
  444. local deb = Inst("BoolValue", humanoid)
  445. deb.Name = "ChaosDebounce"
  446. local cre = Inst("NumberValue", deb)
  447. cre.Name = "Creator"
  448. cre.Value = Player.UserId
  449. debServ:AddItem(deb, Duration)
  450. debServ:AddItem(cre, Duration)
  451. local Damage = 1
  452. if IsRan then
  453. Damage = rand(MinDam, MaxDam)
  454. else
  455. Damage = MaxDam
  456. end
  457. local this_nigga_had_op_health = false
  458. if SoEff then
  459. local HitSound = Sound(Hit, "http://roblox.com/asset/?id=" .. SoID .. "", SoVol, SoPit, false)
  460. debServ:AddItem(HitSound, 6)
  461. end
  462. -- DECOMPILER ERROR at PC100: Unhandled construct in 'MakeBoolean' P1
  463.  
  464. if (DamType == "Compensate" or string.sub(DamType, 1, 10) == "Compensate") and (humanoid.MaxHealth >= 100000 or humanoid.MaxHealth == 0) then
  465. if humanoid.MaxHealth >= 1000000000 or humanoid.MaxHealth == 0 then
  466. humanoid.MaxHealth = 100
  467. this_nigga_had_op_health = true
  468. end
  469. Damage = Damage * (humanoid.MaxHealth / 100)
  470. end
  471. if humanoid.MaxHealth >= 100000000 or humanoid.MaxHealth == 0 then
  472. this_nigga_had_op_health = true
  473. humanoid.MaxHealth = 100
  474. end
  475. if Damage_Buff > 0 then
  476. Damage = Damage * Damage_Buff
  477. end
  478. humanoid.Health = humanoid.Health - Damage
  479. if humanoid.MaxHealth / 4 <= Damage then
  480. MakeText("-" .. Damage .. "", "SourceSansBold", 0.3, 170, 0, 0, 255, 85, 0, Hit.CFrame)
  481. else
  482. local mtc = BrickColor.new("Really black").Color
  483. MakeText("-" .. Damage .. "", FONT, 0.3, mtc.r * 255, mtc.g * 255, mtc.b * 255, 0, 0, 0, Hit.CFrame)
  484. end
  485. do
  486. if HKB and (DamType ~= "SkyRocket" or DamType ~= "Compensate-SkyRocket") then
  487. if Property.Name ~= "Point" then
  488. humanoid:ChangeState(Enum.HumanoidStateType.FallingDown)
  489. local KBCF = Cf(Hit.Position, Property.Position)
  490. Hit.Velocity = KBCF.lookVector * -Knockback
  491. else
  492. do
  493. Hit.Velocity = Property.CFrame.lookVector * Knockback
  494. if (DamType == "Normal" and DamType == "Stun") or DamType == "Compensate-Stun" then
  495. MakeText("Stunned", FONT, 0.3, 255, 255, 0, 0, 0, 0, Hit.CFrame)
  496. humanoid:ChangeState(Enum.HumanoidStateType.FallingDown)
  497. local pos = Inst("BodyPosition", Hit)
  498. pos.MaxForce = Vec(huge, huge, huge)
  499. pos.Position = Hit.Position
  500. debServ:AddItem(pos, Duration * 10)
  501. else
  502. do
  503. if DamType == "LifeSteal" or DamType == "Compensate-LifeSteal" then
  504. Humanoid.Health = Humanoid.Health + Damage / 2
  505. MakeText("+" .. Damage / 2, FONT, 0.4, 0, 0, 0, 0, 255, 0, RootPart.CFrame)
  506. else
  507. if DamType == "MomentumStopper" or DamType == "Compensate-MomentumStopper" then
  508. local vel = Inst("BodyVelocity", Hit)
  509. vel.Name = "MomentumStopper"
  510. vel.MaxForce = Vec(huge, huge, huge)
  511. vel.Velocity = Vec(0, 0, 0)
  512. debServ:AddItem(vel, 3)
  513. else
  514. do
  515. if DamType == "Knockdown" or DamType == "Compensate-Knockdown" then
  516. humanoid:ChangeState(Enum.HumanoidStateType.FallingDown)
  517. else
  518. if DamType == "SkyRocket" or DamType == "Compensate-SkyRocket" then
  519. humanoid:ChangeState(Enum.HumanoidStateType.FallingDown)
  520. Hit.Velocity = Vec(0, Knockback, 0)
  521. if rand(1, 4) == 1 then
  522. local Twista = Inst("BodyAngularVelocity", Hit)
  523. Twista.MaxTorque = Vec(1000000, 1000000, 1000000)
  524. Twista.AngularVelocity = Vec(rand(-2, 2) * (Knockback / 2), rand(-2, 2) * (Knockback / 2), rand(-2, 2) * (Knockback / 2))
  525. debServ:AddItem(Twista, 0.01)
  526. end
  527. else
  528. do
  529. if DamType == "FreezeStun" or DamType == "Compensate-FreezeStun" then
  530. MakeText("Stunned", FONT, 0.3, 0, 0, 0, 255, 170, 0, Hit.CFrame)
  531. coroutine.resume(coroutine.create(function()
  532.  
  533. local ti = 0
  534. local hHead = Hit.Parent:FindFirstChild("Head")
  535. if hHead then
  536. hHead = Hit
  537. local h = Inst("Part", F2)
  538. h.Size = Vec(0.2, 0.2, 0.2)
  539. h.CanCollide = false
  540. h.Transparency = 1
  541. h.Position = hHead.Position
  542. local hWELD = Inst("Weld", h)
  543. hWELD.Part0 = hHead
  544. hWELD.Part1 = h
  545. hWELD.C0 = Cf(0, -4, 0)
  546. repeat
  547. ti = ti + 0.1
  548. for _,p in pairs(humanoid.Parent:GetChildren()) do
  549. if p:IsA("BasePart") then
  550. p.Anchored = true
  551. end
  552. end
  553. swait()
  554. humanoid:ChangeState(Enum.HumanoidStateType.FallingDown)
  555. local p1 = hHead.Position + Vec(rand(-200, 200) / 100, -(hHead.Size.y * 1.5), rand(-200, 200) / 100)
  556. local p0 = h.Position
  557. Lightning(p0, p1, 5, 3, "Deep orange", "Neon", 0.1, 0.2, 0.2)
  558. until Duration * 12 <= ti
  559. for _,p in pairs(humanoid.Parent:GetChildren()) do
  560. if p:IsA("BasePart") then
  561. p.Anchored = false
  562. end
  563. end
  564. debServ:AddItem(h, 0)
  565. end
  566. end
  567. ))
  568. else
  569. if DamType == "KnockDownFreezeStun" or DamType == "Compensate-KnockDownFreezeStun" then
  570. MakeText("Stunned", FONT, 0.3, 0, 0, 0, 255, 64, 0, Hit.CFrame)
  571. coroutine.resume(coroutine.create(function()
  572.  
  573. local ti = 0
  574. local scf = nil
  575. local h = Inst("Part", F2)
  576. h.Size = Vec(0.2, 0.2, 0.2)
  577. h.CanCollide = false
  578. h.Anchored = true
  579. h.Transparency = 1
  580. h.Position = Hit.Position
  581. h.CFrame = h.CFrame * Euler(rad(-90), 0, 0)
  582. local IL = {Character, Hit.Parent}
  583. local Ground, Pos = workspace:FindPartOnRayWithIgnoreList(Ray.new(h.Position, h.CFrame.lookVector.Unit * 999), IL, true, true)
  584. if Ground then
  585. Hit.CFrame = Cf(Pos) * Euler(rad(-90), 0, 0)
  586. scf = Cf(Pos) * Euler(rad(-90), 0, 0)
  587. end
  588. repeat
  589. ti = ti + 0.1
  590. for _,p in pairs(humanoid.Parent:GetChildren()) do
  591. if p:IsA("BasePart") then
  592. p.Anchored = true
  593. end
  594. end
  595. Hit.CFrame = scf
  596. swait()
  597. humanoid:ChangeState(Enum.HumanoidStateType.FallingDown)
  598. until Duration * 7 <= ti
  599. for _,p in pairs(humanoid.Parent:GetChildren()) do
  600. if p:IsA("BasePart") then
  601. p.Anchored = false
  602. end
  603. end
  604. debServ:AddItem(h, 0)
  605. end
  606. ))
  607. end
  608. end
  609. if HDrag then
  610. humanoid:ChangeState(Enum.HumanoidStateType.FallingDown)
  611. local pos = Inst("BodyPosition", Hit)
  612. pos.MaxForce = Vec(huge, huge, huge)
  613. pos.Position = Drag_To_Part.Position
  614. local d = Inst("NumberValue", pos)
  615. d.Name = "Duration"
  616. d.Value = DragDuration
  617. table.insert(DragTable, pos)
  618. end
  619. do
  620. if this_nigga_had_op_health then
  621. coroutine.resume(coroutine.create(function()
  622.  
  623. swait()
  624. Damage = Damage * 2
  625. humanoid.Health = humanoid.Health - Damage
  626. MakeText("-" .. Damage .. "", FONT, 0.4, 0, 0, 0, 0, 0, 91, Hit.CFrame)
  627. end
  628. ))
  629. end
  630. end
  631. end
  632. end
  633. end
  634. end
  635. end
  636. end
  637. end
  638. end
  639. end
  640. end
  641. end
  642. end
  643. end
  644. end
  645. end
  646.  
  647. MagniDamage = function(Part, range, isRan, mindam, maxdam, hkb, knock, DType, dur, hd, dd, soe, soid, sopit, sovol)
  648.  
  649. for _,c in pairs(workspace:GetChildren()) do
  650. local hum = FindHum(c)
  651. if hum and hum ~= Humanoid then
  652. local head = c:FindFirstChild("Head")
  653. local tor = c:FindFirstChild("Torso")
  654. local larm = c:FindFirstChild("Left Arm")
  655. local rarm = c:FindFirstChild("Right Arm")
  656. local lleg = c:FindFirstChild("Left Leg")
  657. local rleg = c:FindFirstChild("Right Leg")
  658. local Dis = range
  659. local Par = nil
  660. if head then
  661. local Mag = (head.Position - Part.Position).magnitude
  662. if Mag <= Dis then
  663. Dis = Mag
  664. Par = head
  665. end
  666. end
  667. if tor then
  668. local Mag = (tor.Position - Part.Position).magnitude
  669. if Mag <= Dis then
  670. Dis = Mag
  671. Par = tor
  672. end
  673. end
  674. if rarm then
  675. local Mag = (rarm.Position - Part.Position).magnitude
  676. if Mag <= Dis then
  677. Dis = Mag
  678. Par = rarm
  679. end
  680. end
  681. if larm then
  682. local Mag = (larm.Position - Part.Position).magnitude
  683. if Mag <= Dis then
  684. Dis = Mag
  685. Par = larm
  686. end
  687. end
  688. if rleg then
  689. local Mag = (rleg.Position - Part.Position).magnitude
  690. if Mag <= Dis then
  691. Dis = Mag
  692. Par = rleg
  693. end
  694. end
  695. if lleg then
  696. local Mag = (lleg.Position - Part.Position).magnitude
  697. if Mag <= Dis then
  698. Dis = Mag
  699. Par = lleg
  700. end
  701. end
  702. if Par then
  703. DamageFunction(Par, isRan, mindam, maxdam, hkb, knock, DType, Part, dur, hd, dd, soe, soid, sopit, sovol)
  704. end
  705. -- DECOMPILER ERROR at PC113: LeaveBlock: unexpected jumping out DO_STMT
  706.  
  707. -- DECOMPILER ERROR at PC113: LeaveBlock: unexpected jumping out DO_STMT
  708.  
  709. -- DECOMPILER ERROR at PC113: LeaveBlock: unexpected jumping out DO_STMT
  710.  
  711. -- DECOMPILER ERROR at PC113: LeaveBlock: unexpected jumping out DO_STMT
  712.  
  713. -- DECOMPILER ERROR at PC113: LeaveBlock: unexpected jumping out DO_STMT
  714.  
  715. -- DECOMPILER ERROR at PC113: LeaveBlock: unexpected jumping out DO_STMT
  716.  
  717. -- DECOMPILER ERROR at PC113: LeaveBlock: unexpected jumping out IF_THEN_STMT
  718.  
  719. -- DECOMPILER ERROR at PC113: LeaveBlock: unexpected jumping out IF_STMT
  720.  
  721. end
  722. end
  723. end
  724.  
  725.  
  726.  
  727.  
  728.  
  729.  
  730. CreatePart = function(className, parent, Brickcolor, Material, Transparency, Reflectance, Name, Size, Position, Rotation, MeshClass, MeshScale, MeshId, MeshType)
  731.  
  732. local Part = Instance.new(className, parent)
  733. Part.BrickColor = BrickColor.new(Brickcolor)
  734. Part.Transparency = Transparency
  735. Part.Reflectance = Reflectance
  736. Part.Material = Material
  737. Part.Name = Name
  738. Part.Anchored = true
  739. Part.CanCollide = false
  740. Part.Locked = true
  741. Part.Size = Size
  742. Part.Position = Position
  743. Part.Rotation = Rotation
  744. Part.TopSurface = "SmoothNoOutlines"
  745. Part.BottomSurface = "SmoothNoOutlines"
  746. Part.FrontSurface = "SmoothNoOutlines"
  747. Part.BackSurface = "SmoothNoOutlines"
  748. Part.RightSurface = "SmoothNoOutlines"
  749. Part.LeftSurface = "SmoothNoOutlines"
  750. local Mesh = Instance.new(MeshClass, Part)
  751. Mesh.Scale = MeshScale
  752. if MeshClass == "SpecialMesh" then
  753. Mesh.MeshId = MeshId
  754. Mesh.MeshType = MeshType
  755. end
  756. return Part
  757. end
  758.  
  759.  
  760.  
  761. rayCast = function(Pos, Dir, Max, Ignore)
  762.  
  763. return game:service("Workspace"):FindPartOnRay(Ray.new(Pos, Dir.unit * (Max or 999.999)), Ignore)
  764. end
  765.  
  766. local Point = Torso.CFrame * Cf(0, Torso.Size.Y, 0)
  767. LastPoint = Point
  768. effect = function(Color, Ref, LP, P1, returnn)
  769.  
  770. local effectsmsh = Instance.new("CylinderMesh")
  771. effectsmsh.Scale = Vector3.new(0.2, 1, 0.2)
  772. effectsmsh.Name = "Mesh"
  773. local effectsg = Instance.new("Part")
  774. effectsg.formFactor = 3
  775. effectsg.CanCollide = false
  776. effectsg.Name = "Eff"
  777. effectsg.Locked = true
  778. effectsg.Anchored = true
  779. effectsg.Size = Vector3.new(0.5, 1, 0.5)
  780. effectsg.Parent = F2
  781. effectsmsh.Parent = effectsg
  782. effectsg.BrickColor = BrickColor.new(Color)
  783. effectsg.Reflectance = Ref
  784. local point1 = P1
  785. local mg = (LP.p - point1.p).magnitude
  786. effectsg.Size = Vector3.new(0.5, mg, 0.5)
  787. effectsg.CFrame = Cf((LP.p + point1.p) / 2, point1.p) * CFrame.Angles(math.rad(90), 0, 0)
  788. effectsmsh.Scale = Vector3.new(0.2, 1, 0.2)
  789. game:GetService("Debris"):AddItem(effectsg, 2)
  790. if returnn then
  791. return effectsg
  792. end
  793. coroutine.resume(coroutine.create(function(Part, Mesh)
  794.  
  795. if not returnn then
  796. for i = 0, 1, 0.05 do
  797. swait()
  798. Part.Transparency = 1 * i
  799. Mesh.Scale = Vector3.new(0.5 - 0.5 * i, 1, 0.5 - 0.5 * i)
  800. end
  801. Part.Parent = nil
  802. end
  803. end
  804. ), effectsg, effectsmsh)
  805. end
  806.  
  807. local CFrameFromTopBack = function(at, top, back)
  808.  
  809. local right = top:Cross(back)
  810. return CFrame.new(at.x, at.y, at.z, right.x, top.x, back.x, right.y, top.y, back.y, right.z, top.z, back.z)
  811. end
  812.  
  813. NoOutline = function(Part)
  814.  
  815. Part.TopSurface = 10
  816. end
  817.  
  818. pert = function(parent, reflectance, transparency, brickcolor, name, size, material)
  819.  
  820. local fp = Inst("Part")
  821. fp.Parent = parent
  822. fp.Reflectance = reflectance
  823. fp.Transparency = transparency
  824. fp.CanCollide = false
  825. fp.Locked = true
  826. fp.BrickColor = brickcolor
  827. fp.Name = name
  828. fp.Size = size
  829. fp.Position = Torso.Position
  830. NoOutline(fp)
  831. fp.Material = material
  832. fp:BreakJoints()
  833. return fp
  834. end
  835.  
  836. mesh = function(Mesh, part, meshtype, meshid, offset, scale)
  837.  
  838. local mesh = Inst(Mesh)
  839. mesh.Parent = part
  840. if Mesh == "SpecialMesh" then
  841. mesh.MeshType = meshtype
  842. mesh.MeshId = meshid
  843. end
  844. mesh.Offset = offset
  845. mesh.Scale = scale
  846. return mesh
  847. end
  848.  
  849. MagicBlock = function(brickcolor, material, cframe, x1, y1, z1, x3, y3, z3, Delay)
  850.  
  851. local prt = pert(F2, 0, 0, brickcolor, "Effect", Vec(), material)
  852. prt.Anchored = true
  853. prt.CFrame = cframe
  854. local msh = mesh("BlockMesh", prt, "", "", Vec(0, 0, 0), Vec(x1, y1, z1))
  855. game:GetService("Debris"):AddItem(prt, 5)
  856. table.insert(Effects, {prt, "Block1", Delay, x3, y3, z3})
  857. end
  858.  
  859. MagicBlock2 = function(brickcolor, material, cframe, x1, y1, z1, x3, y3, z3, Delay)
  860.  
  861. local prt = pert(F2, 0, 0, brickcolor, "Effect", Vec(), material)
  862. prt.Anchored = true
  863. prt.CFrame = cframe
  864. local msh = mesh("BlockMesh", prt, "", "", Vec(0, 0, 0), Vec(x1, y1, z1))
  865. game:GetService("Debris"):AddItem(prt, 5)
  866. table.insert(Effects, {prt, "Disappear", Delay, x3, y3, z3})
  867. end
  868.  
  869. MagicSpikeBall = function(brickcolor, material, cframe, x1, y1, z1, x3, y3, z3, Delay)
  870.  
  871. local prt = pert(F2, 0, 0, brickcolor, "Effect", Vec(), material)
  872. prt.Anchored = true
  873. prt.CFrame = cframe
  874. local msh = mesh("SpecialMesh", prt, "FileMesh", "http://www.roblox.com/Asset/?id=9982590", Vec(0, 0, 0), Vec(x1, y1, z1))
  875. game:GetService("Debris"):AddItem(prt, 5)
  876. table.insert(Effects, {prt, "Block1", Delay, x3, y3, z3})
  877. end
  878.  
  879. MagicCircle = function(brickcolor, material, cframe, x1, y1, z1, x3, y3, z3, Delay)
  880.  
  881. local prt = pert(F2, 0, 0, brickcolor, "Effect", Vec(), material)
  882. prt.Anchored = true
  883. prt.CFrame = cframe
  884. local msh = mesh("SpecialMesh", prt, "Sphere", "", Vec(0, 0, 0), Vec(x1, y1, z1))
  885. game:GetService("Debris"):AddItem(prt, 5)
  886. table.insert(Effects, {prt, "Cylinder", Delay, x3, y3, z3})
  887. end
  888.  
  889. MagicWave = function(brickcolor, material, cframe, x1, y1, z1, x3, y3, z3, Delay)
  890.  
  891. local prt = pert(F2, 0, 0, brickcolor, "Effect", Vec(), material)
  892. prt.Anchored = true
  893. prt.CFrame = cframe
  894. local msh = mesh("SpecialMesh", prt, "FileMesh", "http://www.roblox.com/asset/?id=20329976", Vec(0, 0, 0), Vec(x1, y1, z1))
  895. game:GetService("Debris"):AddItem(prt, 5)
  896. table.insert(Effects, {prt, "Cylinder", Delay, x3, y3, z3})
  897. end
  898.  
  899. MagicWave2 = function(brickcolor, material, cframe, x1, y1, z1, x3, y3, z3, Delay)
  900.  
  901. local prt = pert(F2, 0, 0, brickcolor, "Effect", Vec(), material)
  902. prt.Anchored = true
  903. prt.CFrame = cframe
  904. local msh = mesh("SpecialMesh", prt, "FileMesh", "http://www.roblox.com/asset/?id=20329976", Vec(0, 0, 0), Vec(x1, y1, z1))
  905. game:GetService("Debris"):AddItem(prt, 5)
  906. table.insert(Effects, {prt, "Wave", Delay, x3, y3, z3})
  907. end
  908.  
  909. MagicCylinder = function(brickcolor, material, cframe, x1, y1, z1, x3, y3, z3, Delay)
  910.  
  911. local prt = pert(F2, 0, 0, brickcolor, "Effect", Vec(0.2, 0.2, 0.2), material)
  912. prt.Anchored = true
  913. prt.CFrame = cframe
  914. local msh = mesh("SpecialMesh", prt, "Head", "", Vec(0, 0, 0), Vec(x1, y1, z1))
  915. game:GetService("Debris"):AddItem(prt, 5)
  916. Effects[#Effects + 1] = {prt, "Cylinder", Delay, x3, y3, z3}
  917. end
  918.  
  919. MagicCylinder2 = function(brickcolor, material, cframe, x1, y1, z1, x3, y3, z3, Delay)
  920.  
  921. local prt = pert(F2, 0, 0, brickcolor, "Effect", Vec(0.2, 0.2, 0.2), material)
  922. prt.Anchored = true
  923. prt.CFrame = cframe
  924. local msh = mesh("CylinderMesh", prt, "", "", Vec(0, 0, 0), Vec(x1, y1, z1))
  925. game:GetService("Debris"):AddItem(prt, 5)
  926. Effects[#Effects + 1] = {prt, "Cylinder", Delay, x3, y3, z3}
  927. end
  928.  
  929. MagicBlood = function(brickcolor, material, cframe, x1, y1, z1, x3, y3, z3, Delay)
  930.  
  931. local prt = pert(F2, 0, 0, brickcolor, "Effect", Vec(), material)
  932. prt.Anchored = true
  933. prt.CFrame = cframe
  934. local msh = mesh("SpecialMesh", prt, "Sphere", "", Vec(0, 0, 0), Vec(x1, y1, z1))
  935. game:GetService("Debris"):AddItem(prt, 5)
  936. table.insert(Effects, {prt, "Blood", Delay, x3, y3, z3})
  937. end
  938.  
  939. MagicRing = function(brickcolor, material, cframe, x1, y1, z1, x3, y3, z3, Delay)
  940.  
  941. local prt = pert(F2, 0, 0, brickcolor, "Effect", Vec(), material)
  942. prt.Anchored = true
  943. prt.CFrame = cframe
  944. local msh = mesh("SpecialMesh", prt, "FileMesh", "http://www.roblox.com/asset/?id=3270017", Vec(0, 0, 0), Vec(x1, y1, z1))
  945. game:GetService("Debris"):AddItem(prt, 5)
  946. table.insert(Effects, {prt, "Cylinder", Delay, x3, y3, z3})
  947. end
  948.  
  949. MagicRing2 = function(brickcolor, material, cframe, x1, y1, z1, x3, y3, z3, Delay)
  950.  
  951. local prt = pert(F2, 0, 0, brickcolor, "Effect", Vec(), material)
  952. prt.Anchored = true
  953. prt.CFrame = cframe
  954. local msh = mesh("SpecialMesh", prt, "FileMesh", "http://www.roblox.com/asset/?id=3270017", Vec(0, 0, 0), Vec(x1, y1, z1))
  955. game:GetService("Debris"):AddItem(prt, 5)
  956. table.insert(Effects, {prt, "Blood", Delay, x3, y3, z3})
  957. end
  958.  
  959. ElecEffect = function(brickCol, Mat, cff, x, y, z)
  960.  
  961. local prt = pert(F2, 0, 0, brickCol, "Part", Vec(1, 1, 1), Mat)
  962. prt.Anchored = true
  963. prt.CFrame = cff * Cf(rand(-x, x), rand(-y, y), rand(-z, z))
  964. prt.CFrame = Cf(prt.Position)
  965. debServ:AddItem(prt, 2)
  966. local xval = math.random() / 2
  967. local yval = math.random() / 2
  968. local zval = math.random() / 2
  969. local msh = mesh("BlockMesh", prt, "", "", Vec(0, 0, 0), Vec(xval, yval, zval))
  970. Effects[#Effects + 1] = {prt, "Elec", 0.1, x, y, z, xval, yval, zval}
  971. end
  972.  
  973. Lightning = function(p0, p1, tym, ofs, col, mat, th, tra, last)
  974.  
  975. local magz = (p0 - p1).magnitude
  976. local curpos = p0
  977. local trz = {-ofs, ofs}
  978. for i = 1, tym do
  979. local li = Instance.new("Part", F2)
  980. li.TopSurface = 0
  981. li.BottomSurface = 0
  982. li.Anchored = true
  983. li.Transparency = tra or 0.4
  984. li.BrickColor = BrickColor.new(col)
  985. li.Material = mat
  986. li.Material = "Neon"
  987. li.formFactor = "Custom"
  988. li.CanCollide = false
  989. li.Size = Vector3.new(th, th, magz / tym)
  990. local ofz = Vector3.new(trz[math.random(1, 2)], trz[math.random(1, 2)], trz[math.random(1, 2)])
  991. local trolpos = CFrame.new(curpos, p1) * CFrame.new(0, 0, magz / tym).p + ofz
  992. if tym == i then
  993. local magz2 = (curpos - p1).magnitude
  994. li.Size = Vector3.new(th, th, magz2)
  995. li.CFrame = CFrame.new(curpos, p1) * CFrame.new(0, 0, -magz2 / 2)
  996. game:GetService("Debris"):AddItem(li, last)
  997. else
  998. li.CFrame = CFrame.new(curpos, trolpos) * CFrame.new(0, 0, magz / tym / 2)
  999. curpos = li.CFrame * CFrame.new(0, 0, magz / tym / 2).p
  1000. game:GetService("Debris"):AddItem(li, last)
  1001. end
  1002. end
  1003. end
  1004.  
  1005. Triangle = function(a, b, c, tcol, tmat)
  1006.  
  1007. local edg1 = (c-a):Dot((b-a).unit)
  1008. local edg2 = (a-b):Dot((c-b).unit)
  1009. local edg3 = (b-c):Dot((a-c).unit)
  1010. if edg1 <= (b - a).magnitude and edg1 >= 0 then
  1011. a = a
  1012. elseif edg2 <= (c - b).magnitude and edg2 >= 0 then
  1013. a = b
  1014. elseif edg3 <= (a - c).magnitude and edg3 >= 0 then
  1015. a = c
  1016. else
  1017. return
  1018. end
  1019. local len1 = (c-a):Dot((b-a).unit)
  1020. local len2 = (b-a).magnitude - len1
  1021. local width = (a + (b-a).unit*len1 - c).magnitude
  1022. local maincf = CFrameFromTopBack(a, (b-a):Cross(c-b).unit, -(b-a).unit)
  1023. local list = {}
  1024. if len1 > 0.01 then
  1025. local w1 = Inst("WedgePart", F2)
  1026. w1.Material = tmat
  1027. w1.BrickColor = BC(tcol)
  1028. w1.Transparency = 0
  1029. w1.Reflectance = 0
  1030. w1.CanCollide = false
  1031. NoOutline(w1)
  1032. local sz = Vec(0.2, width, len1)
  1033. w1.Size = sz
  1034. local sp = Inst("SpecialMesh", w1)
  1035. sp.MeshType = "Wedge"
  1036. sp.Scale = Vec(0, 1, 1) * sz / w1.Size
  1037. w1:BreakJoints()
  1038. w1.Anchored = true
  1039. w1.Transparency = 0.7
  1040. debServ:AddItem(w1, 25)
  1041. table.insert(Effects, {w1, "Disappear", 0.045})
  1042. w1.CFrame = maincf * CFrame.Angles(math.pi, 0, math.pi / 2) * CFrame.new(0, width / 2, len1 / 2)
  1043. table.insert(list, w1)
  1044. end
  1045. if len2 > 0.01 then
  1046. local w2 = Inst("WedgePart", F2)
  1047. w2.Material = tmat
  1048. w2.BrickColor = BC(tcol)
  1049. w2.Transparency = 0
  1050. w2.Reflectance = 0
  1051. w2.CanCollide = false
  1052. NoOutline(w2)
  1053. local sz = Vec(0.2, width, len2)
  1054. w2.Size = sz
  1055. local sp = Inst("SpecialMesh", w2)
  1056. sp.MeshType = "Wedge"
  1057. sp.Scale = Vec(0, 1, 1) * sz / w2.Size
  1058. w2:BreakJoints()
  1059. w2.Anchored = true
  1060. w2.Transparency = 0.7
  1061. debServ:AddItem(w2, 25)
  1062. table.insert(Effects, {w2, "Disappear", 0.045})
  1063. w2.CFrame = maincf * CFrame.Angles(math.pi, math.pi, -math.pi / 2) * CFrame.new(0, width / 2, -len1 - len2 / 2)
  1064. table.insert(list, w2)
  1065. end
  1066. return unpack(list)
  1067. end
  1068.  
  1069.  
  1070. runServ.RenderStepped:connect(function()
  1071. if #Effects > 0 then
  1072. for e = 1, #Effects do
  1073. if Effects[e] ~= nil then
  1074. local Thing = Effects[e]
  1075. if Thing ~= nil then
  1076. local Part = Thing[1]
  1077. local Mode = Thing[2]
  1078. local Delay = Thing[3]
  1079. local IncX = Thing[4]
  1080. local IncY = Thing[5]
  1081. local IncZ = Thing[6]
  1082. if Thing[1].Transparency <= 1 then
  1083. if Thing[2] == "Block1" then
  1084. Thing[1].CFrame = Thing[1].CFrame * Euler(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50))
  1085. Mesh = Thing[1]:FindFirstChild("Mesh")
  1086. if not Mesh then
  1087. Mesh = Instance.new("BlockMesh")
  1088. end
  1089. Mesh.Scale = Mesh.Scale + Vec(Thing[4], Thing[5], Thing[6])
  1090. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  1091. elseif Thing[2] == "Wave" then
  1092. Thing[1].CFrame = Thing[1].CFrame * CFrame.Angles(0, rad(10), 0)
  1093. Mesh = Thing[1]:FindFirstChild("Mesh")
  1094. if not Mesh then
  1095. Mesh = Instance.new("BlockMesh")
  1096. end
  1097. Mesh.Scale = Mesh.Scale + Vec(Thing[4], Thing[5], Thing[6])
  1098. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  1099. elseif Thing[2] == "Cylinder" then
  1100. Mesh = Thing[1]:FindFirstChild("Mesh")
  1101. if not Mesh then
  1102. Mesh = Instance.new("BlockMesh")
  1103. end
  1104. Mesh.Scale = Mesh.Scale + Vec(Thing[4], Thing[5], Thing[6])
  1105. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  1106. elseif Thing[2] == "Blood" then
  1107. Mesh = Thing[1]:FindFirstChild("Mesh")
  1108. if not Mesh then
  1109. Mesh = Instance.new("BlockMesh")
  1110. end
  1111. Thing[1].CFrame = Thing[1].CFrame * Cf(0, 0.5, 0)
  1112. Mesh.Scale = Mesh.Scale + Vec(Thing[4], Thing[5], Thing[6])
  1113. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  1114. elseif Thing[2] == "Elec" then
  1115. Mesh = Thing[1]:FindFirstChild("Mesh")
  1116. if not Mesh then
  1117. Mesh = Instance.new("BlockMesh")
  1118. end
  1119. Mesh.Scale = Mesh.Scale + Vec(Thing[7], Thing[8], Thing[9])
  1120. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  1121. elseif Thing[2] == "Disappear" then
  1122. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  1123. end
  1124. else
  1125. Part.Parent = nil
  1126. debServ:AddItem(Part, 0)
  1127. table.remove(Effects, e)
  1128. end
  1129. end
  1130. end
  1131. end
  1132. end
  1133. end)
  1134.  
  1135.  
  1136.  
  1137.  
  1138.  
  1139.  
  1140. maus.KeyDown:connect(function(kei)
  1141. if string.byte(kei)==48 and not otheranims then
  1142. runnin=true
  1143. end
  1144. if kei=='w' then fldb.w=true end
  1145. if kei=='a' then fldb.a=true end
  1146. if kei=='s' then fldb.s=true end
  1147. if kei=='d' then fldb.d=true end
  1148. end)
  1149. maus.KeyUp:connect(function(kei)
  1150. if string.byte(kei)==48 and not otheranims then
  1151. runnin=false
  1152. end
  1153. if kei=='w' then fldb.w=false end
  1154. if kei=='a' then fldb.a=false end
  1155. if kei=='s' then fldb.s=false end
  1156. if kei=='d' then fldb.d=false end
  1157. end)
  1158.  
  1159.  
  1160.  
  1161. maus.KeyDown:connect(function(kei)
  1162. if kei=='z' and attack ~= "false" then
  1163.  
  1164. attackone()
  1165.  
  1166. elseif kei=='x' and attack ~= "false" then
  1167.  
  1168. attacktwo()
  1169.  
  1170. elseif kei=='c' and attack ~= "false" then
  1171.  
  1172. attackthree()
  1173.  
  1174. elseif kei=='v' and attack ~= "false" then
  1175.  
  1176. Untimatum()
  1177.  
  1178. end
  1179. end)
  1180.  
  1181.  
  1182.  
  1183.  
  1184.  
  1185. coroutine.wrap(function()
  1186. for i,x in pairs(hed:GetChildren()) do if x:IsA('Sound') then x:Destroy() end end end)()
  1187. function Lerp(a, b, i)
  1188. local com1 = {a.X, a.Y, a.Z, a:toEulerAnglesXYZ()}
  1189. local com2 = {b.X, b.Y, b.Z, b:toEulerAnglesXYZ()}
  1190. local calx = com1[1] + (com2[1] - com1[1]) * i
  1191. local caly = com1[2] + (com2[2] - com1[2]) * i
  1192. local calz = com1[3] + (com2[3] - com1[3]) * i
  1193. local cala = com1[4] + (com2[4] - com1[4]) * i
  1194. local calb = com1[5] + (com2[5] - com1[5]) * i
  1195. local calc = com1[6] + (com2[6] - com1[6]) * i
  1196. return CFrame.new(calx, caly, calz) * CFrame.Angles(cala, calb, calc)
  1197. end
  1198. function TwnSingleNumber(s,f,m)
  1199. local wot=s+(f-s)*m
  1200. return wot
  1201. end
  1202. function TwnVector3(q,w,e)
  1203. local begin={q.x,q.y,q.z}
  1204. local ending={w.x,w.y,w.z}
  1205. local bgx=begin[1]+(ending[1]-begin[1])*e
  1206. local bgy=begin[2]+(ending[2]-begin[2])*e
  1207. local bgz=begin[3]+(ending[3]-begin[3])*e
  1208. return Vector3.new(bgx,bgy,bgz)
  1209. end
  1210. newWeld = function(wld, wp0, wp1, wc0x, wc0y, wc0z)
  1211. wld = Instance.new("Weld", wp1)
  1212. wld.Part0 = wp0
  1213. wld.Part1 = wp1
  1214. wld.C0 = CFrame.new(wc0x, wc0y, wc0z)
  1215. end
  1216. newWeld(law, torso, larm, -1.5, 0.5, 0)
  1217. newWeld(raw, torso, rarm, 1.5, 0.5, 0)
  1218. newWeld(llw, torso, lleg, -.5, -2, 0)
  1219. newWeld(rlw, torso, rleg, .5, -2, 0)
  1220. newWeld(hw, torso, hed, 0, 1.5, 0)
  1221. local rutwald=Instance.new('Weld',rutprt)
  1222. rutwald.Part0=rutprt
  1223. rutwald.Part1=torso
  1224. rutprt.Weld.C1=CFrame.new(0,0,0)*CFrame.Angles(math.rad(0),math.rad(0),0)
  1225. larm.Weld.C1 = CFrame.new(0, 0.5, 0)*CFrame.Angles(math.rad(0),0,0)
  1226. rarm.Weld.C1 = CFrame.new(0, 0.5, 0)*CFrame.Angles(math.rad(0),0,0)
  1227. rleg.Weld.C1=CFrame.new(0,0,0)*CFrame.Angles(math.rad(0),0,0)
  1228. lleg.Weld.C1=CFrame.new(0,0,0)*CFrame.Angles(math.rad(0),0,0)
  1229.  
  1230. local function setupPart(part)
  1231. part.Anchored = true
  1232. part.FormFactor = 'Custom'
  1233. part.CanCollide = false
  1234. part.BrickColor = BrickColor.new("Dark indigo")
  1235. part.Material = "Neon"
  1236. part.TopSurface = 'SmoothNoOutlines'
  1237. part.BottomSurface = 'SmoothNoOutlines'
  1238. part.FrontSurface = 'SmoothNoOutlines'
  1239. part.BackSurface = 'SmoothNoOutlines'
  1240. part.LeftSurface = 'SmoothNoOutlines'
  1241. part.RightSurface = 'SmoothNoOutlines'
  1242. end
  1243.  
  1244. function CFrameFromTopBack(at, top, back)
  1245. local right = top:Cross(back)
  1246. return CFrame.new(at.x, at.y, at.z, right.x, top.x, back.x, right.y, top.y, back.y, right.z, top.z, back.z)
  1247. end
  1248.  
  1249. function CreateTriangle(parent, a, b, c)
  1250. local this = {}
  1251. local mPart1 = Instance.new('WedgePart')
  1252. setupPart(mPart1)
  1253. local mPart2 = Instance.new('WedgePart')
  1254. setupPart(mPart2)
  1255. function this:Set(a, b, c) --[[ edg1 A ------|------>B --. '\ | / \ \part1|part2/ | \ cut / / Direction edges point in: edg3 \ / edg2 / (clockwise) \ / |/ \<- / ` \ / C --]]
  1256. local ab, bc, ca = b-a, c-b, a-c local abm, bcm, cam = ab.magnitude, bc.magnitude, ca.magnitude
  1257. local edg1 = math.abs(0.5 + ca:Dot(ab)/(abm*abm))
  1258. local edg2 = math.abs(0.5 + ab:Dot(bc)/(bcm*bcm))
  1259. local edg3 = math.abs(0.5 + bc:Dot(ca)/(cam*cam))
  1260. if edg1 < edg2 then
  1261. if edg1 < edg3 then
  1262. -- nothing to change
  1263. else
  1264. a, b, c = c, a, b
  1265. ab, bc, ca = ca, ab, bc
  1266. abm = cam
  1267. end
  1268. else
  1269. if edg2 < edg3 then
  1270. a, b, c = b, c, a
  1271. ab, bc, ca = bc, ca, ab
  1272. abm = bcm
  1273. else
  1274. a, b, c = c, a, b
  1275. ab, bc, ca = ca, ab, bc
  1276. abm = cam
  1277. end
  1278. end
  1279.  
  1280. local len1 = -ca:Dot(ab)/abm local len2 = abm - len1 local width = (ca + ab.unit*len1).magnitude
  1281. local maincf = CFrameFromTopBack(a, ab:Cross(bc).unit, -ab.unit)
  1282.  
  1283. mPart1.Parent = parent
  1284. mPart1.Size = Vector3.new(1,1,1)
  1285. mPart1.CFrame = maincf*CFrame.Angles(math.pi,0,math.pi/2)*CFrame.new(0,width/2,len1/2)
  1286. local Mesh = Instance.new("SpecialMesh",mPart1)
  1287. Mesh.MeshType = "Wedge"
  1288. Mesh.Scale = Vector3.new(0.005, width, len1)
  1289.  
  1290. mPart2.Parent = parent
  1291. mPart2.Size = Vector3.new(1,1,1)
  1292. mPart2.CFrame = maincf*CFrame.Angles(math.pi,math.pi,-math.pi/2)*CFrame.new(0,width/2,-len1 - len2/2)
  1293. local Mesh = Instance.new("SpecialMesh",mPart2)
  1294. Mesh.MeshType = "Wedge"
  1295. Mesh.Scale = Vector3.new(0.005, width, len2)
  1296. end
  1297.  
  1298. function this:SetProperty(prop, value)
  1299. mPart1[prop] = value
  1300. mPart2[prop] = value
  1301. end
  1302.  
  1303. function this:GetProperty(prop)
  1304. return mPart1[prop]
  1305. end
  1306.  
  1307. this:Set(a, b, c)
  1308. function this:Destroy()
  1309. mPart1:Destroy()
  1310. mPart2:Destroy()
  1311. end
  1312. return this
  1313. end
  1314. function CreateTrail(Adornee, Axis)
  1315. local Axis = Axis or "X"
  1316.  
  1317. local trail = {}
  1318. trail.Triangles = {}
  1319. trail.Adornee = Adornee
  1320. trail.Axis = Axis
  1321.  
  1322. local L1, L2
  1323.  
  1324. function trail:Fade(speed)
  1325. local speed = speed or 0.01
  1326.  
  1327. for n, v in pairs(trail.Triangles) do
  1328. v:SetProperty("Transparency", v:GetProperty("Transparency") + speed)
  1329. if v:GetProperty("Transparency") >= 1 then
  1330. v:Destroy()
  1331.  
  1332. table.remove(trail.Triangles, n)
  1333. end
  1334. end
  1335. end
  1336.  
  1337. function trail:Update()
  1338. local adornee = trail.Adornee
  1339.  
  1340. local axis = trail.Axis
  1341. local Size = Vector3.new((axis == "X" and adornee.Size.X or 0), (axis == "Y" and adornee.Size.Y or 0), (axis == "Z" and adornee.Size.Z or 0))
  1342. local P1 = adornee.CFrame * CFrame.new(Size / 2)
  1343. local P2 = adornee.CFrame * CFrame.new(Size / -2)
  1344.  
  1345. if L1 and L2 then
  1346. table.insert(trail.Triangles, CreateTriangle(adornee, L1.p, L2.p, P1.p))
  1347. table.insert(trail.Triangles, CreateTriangle(adornee, P1.p, P2.p, L2.p))
  1348. end
  1349.  
  1350. L1, L2 = P1, P2
  1351. end
  1352.  
  1353. return trail
  1354. end
  1355.  
  1356.  
  1357.  
  1358.  
  1359.  
  1360.  
  1361. Player=game:GetService('Players').LocalPlayer
  1362. Character=Player.Character
  1363. Mouse=Player:GetMouse()
  1364. m=Instance.new('Model',Character)
  1365.  
  1366.  
  1367. local function weldBetween(a, b)
  1368. local weldd = Instance.new("ManualWeld")
  1369. weldd.Part0 = a
  1370. weldd.Part1 = b
  1371. weldd.C0 = CFrame.new()
  1372. weldd.C1 = b.CFrame:inverse() * a.CFrame
  1373. weldd.Parent = a
  1374. return weldd
  1375. end
  1376.  
  1377. it=Instance.new
  1378.  
  1379. function nooutline(part)
  1380. part.TopSurface,part.BottomSurface,part.LeftSurface,part.RightSurface,part.FrontSurface,part.BackSurface = 10,10,10,10,10,10
  1381. end
  1382.  
  1383. function part(formfactor,parent,material,reflectance,transparency,brickcolor,name,size)
  1384. local fp=it("Part")
  1385. fp.Shape=formfactor
  1386. fp.Parent=parent
  1387. fp.Reflectance=reflectance
  1388. fp.Transparency=transparency
  1389. fp.CanCollide=false
  1390. fp.Locked=true
  1391. fp.BrickColor=BrickColor.new(tostring(brickcolor))
  1392. fp.Name=name
  1393. fp.Size=size
  1394. fp.Position=torso.Position
  1395. nooutline(fp)
  1396. fp.Material=material
  1397. fp:BreakJoints()
  1398. return fp
  1399. end
  1400.  
  1401.  
  1402. function mesh(Mesh,part,meshtype,meshid,offset,scale)
  1403. local mesh=it(Mesh)
  1404. mesh.Parent=part
  1405. if Mesh=="SpecialMesh" then
  1406. mesh.MeshType=meshtype
  1407. mesh.MeshId=meshid
  1408. end
  1409. mesh.Offset=offset
  1410. mesh.Scale=scale
  1411. return mesh
  1412. end
  1413.  
  1414. function weld(parent,part0,part1,c0,c1)
  1415. local weld=it("Weld")
  1416. weld.Parent=parent
  1417. weld.Part0=part0
  1418. weld.Part1=part1
  1419. weld.C0=c0
  1420. weld.C1=c1
  1421. return weld
  1422. end
  1423.  
  1424. local Spheres = it("Model")
  1425. Spheres.Parent=Character
  1426.  
  1427.  
  1428. Main_Head=part(Enum.PartType.Ball,m,Enum.Material.Neon,0,0.4099999666214,"Mulberry","Handle",Vector3.new(2.96000004, 2.96000004, 2.96000004))
  1429. Main_Headweld=weld(m,Character["Torso"],Main_Head,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-0.00997161865, 0.0349311829, -4.91999435, 1, 0, 0, 0, 0, -1, 0, 1, 0))
  1430. MainH_Part=part(Enum.PartType.Ball,Spheres,Enum.Material.Neon,0,0,"Really black","MainH_Part",Vector3.new(1.7518369, 1.7518369, 1.7518369))
  1431. MainH_Partweld=weld(m,Main_Head,MainH_Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0, -0.0603561401, 1.62124634e-005, 1, 0, 0, 0, 1, 0, 0, 0, 1))
  1432.  
  1433.  
  1434. Main_RH=part(Enum.PartType.Cylinder,m,Enum.Material.Marble,0,0,"Eggplant","Handle",Vector3.new(0.200000003, 0.929999948, 0.929999948))
  1435. Main_RHweld=weld(m,Character["Right Leg"],Main_RH,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0.959936023, 0.0700092316, -0.0149731636, 0, 0.999999881, 0, -1, 0, 0, 0, 0, 1))
  1436. Part=part(Enum.PartType.Block,m,Enum.Material.Marble,0,0,"Eggplant","Part",Vector3.new(2.08000016, 0.200000003, 0.200000003))
  1437. Partweld=weld(m,Main_RH,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-0.950025678, -0.479959488, 0, 0.999999762, 0, 0, 0, 1, 0, 0, 0, 1))
  1438. Part=part(Enum.PartType.Block,m,Enum.Material.Marble,0,0,"Eggplant","Part",Vector3.new(2.08000016, 0.200000003, 0.200000003))
  1439. Partweld=weld(m,Main_RH,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-0.950011849, 0.410047531, 0, 0.999999762, 0, 0, 0, 1, 0, 0, 0, 1))
  1440. Sphere_RH1=part(Enum.PartType.Ball,Spheres,Enum.Material.Neon,0,0,"Institutional white","Sphere_RH1",Vector3.new(0.559999943, 0.559999943, 0.559999943))
  1441. Sphere_RH1weld=weld(m,Main_RH,Sphere_RH1,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0, 0.190037251, 0, 0, -1, 0, 0.999999762, 0, 0, 0, 0, 1))
  1442.  
  1443.  
  1444. TrailThingy1 = CreateTrail(Sphere_RH1,"Y")
  1445.  
  1446.  
  1447.  
  1448. Main_LH=part(Enum.PartType.Cylinder,m,Enum.Material.Marble,0,0,"Eggplant","Handle",Vector3.new(0.200000003, 0.929999948, 0.929999948))
  1449. Main_LHweld=weld(m,Character["Left Leg"],Main_LH,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0.954887033, -7.62939453e-006, -0.0149731636, 0, 0.999999881, 0, -1, 0, 0, 0, 0, 1))
  1450. Part=part(Enum.PartType.Block,m,Enum.Material.Marble,0,0,"Eggplant","Part",Vector3.new(2.08000016, 0.200000003, 0.200000003))
  1451. Partweld=weld(m,Main_LH,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-0.95002377, -0.479957581, 0, 0.999999762, 0, 0, 0, 1, 0, 0, 0, 1))
  1452. Part=part(Enum.PartType.Block,m,Enum.Material.Marble,0,0,"Eggplant","Part",Vector3.new(2.08000016, 0.200000003, 0.200000003))
  1453. Partweld=weld(m,Main_LH,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-0.950009704, 0.410041809, 0, 0.999999762, 0, 0, 0, 1, 0, 0, 0, 1))
  1454. Sphere_LH1=part(Enum.PartType.Ball,Spheres,Enum.Material.Neon,0,0,"Institutional white","Sphere_LH1",Vector3.new(0.559999943, 0.559999943, 0.559999943))
  1455. Sphere_LH1weld=weld(m,Main_LH,Sphere_LH1,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0, 0.190037251, 0, 0, -1, 0, 0.999999762, 0, 0, 0, 0, 1))
  1456.  
  1457. TrailThingy2 = CreateTrail(Sphere_LH1,"Y")
  1458.  
  1459.  
  1460. Main_RW=part(Enum.PartType.Cylinder,m,Enum.Material.Marble,0,0,"Eggplant","Handle",Vector3.new(0.200000003, 0.929999948, 0.929999948))
  1461. Main_RWweld=weld(m,Character["Right Arm"],Main_RW,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0.964890003, -0.0200252533, -0.0149731636, 0, 0.999999881, 0, -1, 0, 0, 0, 0, 1))
  1462. Part=part(Enum.PartType.Block,m,Enum.Material.Marble,0,0,"Eggplant","Part",Vector3.new(2.08000016, 0.200000003, 0.200000003))
  1463. Partweld=weld(m,Main_RW,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-0.950019598, -0.479948044, 0, 0.999999762, 0, 0, 0, 1, 0, 0, 0, 1))
  1464. Part=part(Enum.PartType.Block,m,Enum.Material.Marble,0,0,"Eggplant","Part",Vector3.new(2.08000016, 0.200000003, 0.200000003))
  1465. Partweld=weld(m,Main_RW,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-0.950009584, 0.460039902, 0, 0.999999762, 0, 0, 0, 1, 0, 0, 0, 1))
  1466. Sphere_RW2=part(Enum.PartType.Ball,Spheres,Enum.Material.Neon,0,0,"Really black","Sphere_LW2",Vector3.new(0.559999943, 0.559999943, 0.559999943))
  1467. Sphere_RW2weld=weld(m,Main_RW,Sphere_RW2,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0, -1.94488883, 0, 0, -1, 0, 0.999999762, 0, 0, 0, 0, 1))
  1468. Sphere_RW1=part(Enum.PartType.Ball,Spheres,Enum.Material.Neon,0,0,"Really black","Sphere_LW1",Vector3.new(0.559999943, 0.559999943, 0.559999943))
  1469. Sphere_RW1weld=weld(m,Main_RW,Sphere_RW1,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0, 0.190035343, 0, 0, -1, 0, 0.999999762, 0, 0, 0, 0, 1))
  1470.  
  1471.  
  1472. TrailThingy3 = CreateTrail(Sphere_RW1,"Y")
  1473.  
  1474.  
  1475. Main_LW=part(Enum.PartType.Cylinder,m,Enum.Material.Marble,0,0,"Eggplant","Handle",Vector3.new(0.200000003, 0.929999948, 0.929999948))
  1476. Main_LWweld=weld(m,Character["Left Arm"],Main_LW,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0.974956036, 0.0399856567, -0.0149731636, 0, 0.999999881, 0, -1, 0, 0, 0, 0, 1))
  1477. Part=part(Enum.PartType.Block,m,Enum.Material.Marble,0,0,"Eggplant","Part",Vector3.new(2.08000016, 0.200000003, 0.200000003))
  1478. Partweld=weld(m,Main_LW,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-0.950020552, -0.479957581, 0, 0.999999762, 0, 0, 0, 1, 0, 0, 0, 1))
  1479. Sphere_LW1=part(Enum.PartType.Ball,Spheres,Enum.Material.Neon,0,0,"Really black","Sphere_LW1",Vector3.new(0.559999943, 0.559999943, 0.559999943))
  1480. Sphere_LW1weld=weld(m,Main_LW,Sphere_LW1,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-1.52587891e-005, 0.190036297, 0, 0, -1, 0, 0.999999762, 0, 0, 0, 0, 1))
  1481. Sphere_LW2=part(Enum.PartType.Ball,Spheres,Enum.Material.Neon,0,0,"Really black","Sphere_LW2",Vector3.new(0.559999943, 0.559999943, 0.559999943))
  1482. Sphere_LW2weld=weld(m,Main_LW,Sphere_LW2,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-1.52587891e-005, -1.98496461, 0, 0, -1, 0, 0.999999762, 0, 0, 0, 0, 1))
  1483. Part=part(Enum.PartType.Block,m,Enum.Material.Marble,0,0,"Eggplant","Part",Vector3.new(2.08000016, 0.200000003, 0.200000003))
  1484. Partweld=weld(m,Main_LW,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-0.950009584, 0.410041809, 0, 0.999999762, 0, 0, 0, 1, 0, 0, 0, 1))
  1485.  
  1486. TrailThingy5 = CreateTrail(Sphere_LW1,"Y")
  1487.  
  1488.  
  1489. local particleemitter = Instance.new("ParticleEmitter", MainH_Part)
  1490. PARSI = .5
  1491. particleemitter.Lifetime = NumberRange.new(0.2)
  1492. particleemitter.Speed = NumberRange.new(0)
  1493.  
  1494. game:service'RunService'.RenderStepped:connect(function()
  1495. particleemitter.Size = NumberSequence.new({NumberSequenceKeypoint.new(0, PARSI), NumberSequenceKeypoint.new(1, PARSI)})
  1496. end)
  1497.  
  1498. particleemitter.Rate = 1000
  1499. particleemitter.Rotation = NumberRange.new(0, 360)
  1500. particleemitter.LightEmission = 1
  1501. particleemitter.Color = ColorSequence.new(Color3.new(0.639216, 0.227451, 1), Color3.new(0.639216, 0.227451, 1))
  1502. particleemitter.Texture = "http://www.roblox.com/asset/?id=243098098"
  1503. particleemitter.LockedToPart = true
  1504.  
  1505. local particleemitter = Instance.new("ParticleEmitter", MainH_Part)
  1506.  
  1507. particleemitter.Lifetime = NumberRange.new(0.2)
  1508. particleemitter.Speed = NumberRange.new(0)
  1509.  
  1510. game:service'RunService'.RenderStepped:connect(function()
  1511. particleemitter.Size = NumberSequence.new({NumberSequenceKeypoint.new(0, PARSI), NumberSequenceKeypoint.new(1, PARSI)})
  1512. end)
  1513.  
  1514. particleemitter.Rate = 1000
  1515. particleemitter.Rotation = NumberRange.new(0, 360)
  1516. particleemitter.LightEmission = 1
  1517. particleemitter.Color = ColorSequence.new(Color3.new(0.639216, 0.227451, 1), Color3.new(0.639216, 0.227451, 1))
  1518. particleemitter.Texture = "http://www.roblox.com/asset/?id=243098098"
  1519. particleemitter.LockedToPart = true
  1520.  
  1521.  
  1522. local particleemitter = Instance.new("ParticleEmitter", MainH_Part)
  1523.  
  1524. particleemitter.Lifetime = NumberRange.new(0.2)
  1525. particleemitter.Speed = NumberRange.new(0)
  1526.  
  1527. game:service'RunService'.RenderStepped:connect(function()
  1528. particleemitter.Size = NumberSequence.new({NumberSequenceKeypoint.new(0, PARSI), NumberSequenceKeypoint.new(1, PARSI)})
  1529. end)
  1530.  
  1531. particleemitter.Rate = 1000
  1532. particleemitter.Rotation = NumberRange.new(0, 360)
  1533. particleemitter.LightEmission = 1
  1534. particleemitter.Color = ColorSequence.new(Color3.new(0.639216, 0.227451, 1), Color3.new(0.639216, 0.227451, 1))
  1535. particleemitter.Texture = "http://www.roblox.com/asset/?id=243098098"
  1536. particleemitter.LockedToPart = true
  1537.  
  1538.  
  1539. local particleemitterglow = Instance.new("ParticleEmitter", MainH_Part)
  1540.  
  1541. particleemitterglow.Lifetime = NumberRange.new(1)
  1542. particleemitterglow.Speed = NumberRange.new(0)
  1543. particleemitterglow.Size = NumberSequence.new({NumberSequenceKeypoint.new(0, 10), NumberSequenceKeypoint.new(0.102, 1), NumberSequenceKeypoint.new(0.353, 8.063), NumberSequenceKeypoint.new(0.56, 2.938), NumberSequenceKeypoint.new(0.703, 8.563), NumberSequenceKeypoint.new(1, 0)})
  1544. particleemitterglow.Rate = 5
  1545. particleemitterglow.Transparency = NumberSequence.new({NumberSequenceKeypoint.new(0, 1), NumberSequenceKeypoint.new(0.1, 0.5), NumberSequenceKeypoint.new(0.8, 0.5), NumberSequenceKeypoint.new(1, 1)})
  1546. particleemitterglow.Name = "ParticleEmitterGlow"
  1547. particleemitterglow.LightEmission = 1
  1548. particleemitterglow.Color = ColorSequence.new(Color3.new(0.333333, 0, 0), Color3.new(0.333333, 0, 0))
  1549. particleemitterglow.Texture = "http://www.roblox.com/asset/?id=243660373"
  1550. particleemitterglow.LockedToPart = true
  1551.  
  1552.  
  1553.  
  1554.  
  1555.  
  1556. game:service'RunService'.RenderStepped:connect(function()
  1557.  
  1558. if anim == "Sprinting" then
  1559. TrailThingy3:Update()
  1560. TrailThingy3:Fade(0.2)
  1561. TrailThingy5:Update()
  1562. TrailThingy5:Fade(0.2)
  1563. TrailThingy1:Update()
  1564. TrailThingy1:Fade(0.2)
  1565. TrailThingy2:Update()
  1566. TrailThingy2:Fade(0.2)
  1567. end
  1568.  
  1569. if anim ~= "Sprinting" then
  1570. TrailThingy3:Update()
  1571. TrailThingy3:Fade(1)
  1572. TrailThingy5:Update()
  1573. TrailThingy5:Fade(1)
  1574. TrailThingy1:Update()
  1575. TrailThingy1:Fade(1)
  1576. TrailThingy2:Update()
  1577. TrailThingy2:Fade(1)
  1578. end
  1579.  
  1580. if anim~=lastanim then
  1581. runtime=0
  1582. end
  1583. lastanim=anim
  1584. chr.Humanoid.CameraOffset=(rutprt.CFrame:toObjectSpace(hed.CFrame)).p+Vector3.new(0,-1.25,0)
  1585. syne=syne+.95
  1586. if not otheranims and not swimming then
  1587. if (torso.Velocity*Vector3.new(1, 0, 1)).magnitude < 1 and not chr.Humanoid.Jump then-- and torso.Velocity.y<5 and torso.Velocity.y>-5
  1588. anim="Idling"
  1589. elseif (rutprt.Velocity*Vector3.new(1, 0, 1)).magnitude > 1 and (rutprt.Velocity*Vector3.new(1, 0, 1)).magnitude < RunSpeed-10 and not chr.Humanoid.Jump then-- and torso.Velocity.y<5 and torso.Velocity.y>-5
  1590. anim="Walking"
  1591. elseif (torso.Velocity*Vector3.new(1, 0, 1)).magnitude > RunSpeed-10 and not chr.Humanoid.Jump then-- and torso.Velocity.y<5 and torso.Velocity.y>-5
  1592. anim="Sprinting"
  1593. elseif torso.Velocity.y>5 and chr.Humanoid.Jump then
  1594. anim='Jumping'
  1595. elseif (torso.Velocity.y < -5) and chr.Humanoid.Jump then
  1596. anim='Falling'
  1597. end
  1598. end
  1599.  
  1600. if otheranims then return end
  1601. if anim=="Idling" then
  1602. idlesineinc=35
  1603. rutprt.Weld.C0=Lerp(rutprt.Weld.C0,CFrame.new(0,3-1*math.cos(syne/10),0)*CFrame.Angles(math.rad(0),math.rad(0),math.rad(0)),.1)
  1604.  
  1605. if not armmovments then
  1606. rarm.Weld.C0=Lerp(rarm.Weld.C0,CFrame.new(1.5,.525+math.cos(syne/idlesineinc)/25,0)*CFrame.Angles(0,0,math.rad(3)),.1)
  1607. larm.Weld.C0=Lerp(larm.Weld.C0,CFrame.new(-1.5,.525+math.cos(syne/idlesineinc)/25,0)*CFrame.Angles(0,0,math.rad(-3)),.1)
  1608. end
  1609.  
  1610. lleg.Weld.C0 = Lerp(lleg.Weld.C0, CFrame.new(-0.55, -1.4-0.1*math.cos(syne/10), -0.55) * CFrame.Angles(math.rad(-10+1*math.cos(syne/10)), math.rad(10), math.rad(-0-2*math.cos(syne/10))), 0.4)
  1611. rleg.Weld.C0 = Lerp(rleg.Weld.C0, CFrame.new(0.55, -2-0.1*math.cos(syne/10), 0) * CFrame.Angles(0, math.rad(-10), math.rad(0+2*math.cos(syne/10))), 0.4)
  1612. hed.Weld.C0=Lerp(hed.Weld.C0,CFrame.new(0,1.5+math.cos(syne/idlesineinc)/50,0)*CFrame.Angles(math.cos(syne/idlesineinc)/40,0,0),.1)
  1613. end
  1614.  
  1615. if anim=="Walking" then
  1616.  
  1617. if not armmovments then
  1618. rarm.Weld.C0=Lerp(rarm.Weld.C0,CFrame.new(1.5,.525,0) * CFrame.Angles(math.rad(-30), math.rad(0), math.rad(-40)), 0.3)
  1619. larm.Weld.C0=Lerp(larm.Weld.C0,CFrame.new(-1.5,.525,0)* CFrame.Angles(math.rad(-30), math.rad(0), math.rad(40)), 0.3)
  1620. end
  1621.  
  1622. lleg.Weld.C0=Lerp(lleg.Weld.C0,CFrame.new(-.55,-1.9-math.cos(syne/6)/10,-(math.cos(syne/6)/1.125))*CFrame.Angles(math.cos(syne/6)/1.125,0,math.rad(-2.5)),.1)
  1623. rleg.Weld.C0=Lerp(rleg.Weld.C0,CFrame.new(.55,-1.9-math.cos(syne/6)/10,math.cos(syne/6)/1.125)*CFrame.Angles(-(math.cos(syne/6)/1.125),0,math.rad(2.5)),.1)
  1624. hed.Weld.C0=Lerp(hed.Weld.C0,CFrame.new(0,1.55+math.cos(syne/20)/50,0)*CFrame.Angles(-math.cos(syne/2.5)/10+math.rad(20),0,0),.1)
  1625. rutprt.Weld.C0=Lerp(rutprt.Weld.C0,CFrame.new(0,3+math.cos(syne/2.5)/15,math.cos(syne/2.5))*CFrame.Angles(math.cos(syne/2.5)/10+math.rad(-25),math.cos(syne/2.5)/10,math.cos(syne/4)/20+math.sin(rutprt.RotVelocity.y/2)/4),.1)
  1626. end
  1627.  
  1628. if anim=="Sprinting" then
  1629. ArmsTrail = true
  1630.  
  1631. if not armmovments then
  1632. rarm.Weld.C0=Lerp(rarm.Weld.C0,CFrame.new(1.5,.525,0)*CFrame.Angles(-math.cos(syne/2.5)/10+math.rad(-55),0,math.rad(12.5)),.1)
  1633. larm.Weld.C0=Lerp(larm.Weld.C0,CFrame.new(-1.5,.525,0)*CFrame.Angles(-math.cos(syne/2.5)/10+math.rad(-55),0,math.rad(-12.5)),.1)
  1634. end
  1635.  
  1636. lleg.Weld.C0=Lerp(lleg.Weld.C0,CFrame.new(-.55,-1.6-math.cos(syne/4)/4,-(math.cos(syne/4)*2)-math.rad(10))*CFrame.Angles(math.cos(syne/4)*2+math.rad(10),0,math.rad(-2.5)),.1)
  1637. rleg.Weld.C0=Lerp(rleg.Weld.C0,CFrame.new(.55,-1.6-math.cos(syne/4)/4,math.cos(syne/4)*2-math.rad(10))*CFrame.Angles(-(math.cos(syne/4)*2)+math.rad(10),0,math.rad(2.5)),.1)
  1638. hed.Weld.C0=Lerp(hed.Weld.C0,CFrame.new(0,1.55+math.cos(syne/20)/50,0)*CFrame.Angles(-math.cos(syne/2.5)/10+math.rad(20),0,0),.1)
  1639. rutprt.Weld.C0=Lerp(rutprt.Weld.C0,CFrame.new(0,3+math.cos(syne/2.5)/15,math.cos(syne/2.5))*CFrame.Angles(math.cos(syne/3)/15+math.rad(-40),math.cos(syne/2.5)/10,math.cos(syne/4)/20+math.sin(rutprt.RotVelocity.y/2)/4),.1)
  1640. ArmsTrail = false
  1641. end
  1642.  
  1643. if anim=="Jumping" then
  1644.  
  1645. if not armmovments then
  1646. rarm.Weld.C0=Lerp(rarm.Weld.C0,CFrame.new(1.5,.525,0)*CFrame.Angles(math.rad(10),0,math.rad(50)),.1)
  1647. larm.Weld.C0=Lerp(larm.Weld.C0,CFrame.new(-1.5,.525,0)*CFrame.Angles(math.rad(10),0,math.rad(-50)),.1)
  1648. end
  1649.  
  1650. lleg.Weld.C0=Lerp(lleg.Weld.C0,CFrame.new(-.55,-1.4,0)*CFrame.Angles(math.rad(-17.5),0,math.rad(-2.5)),.1)
  1651. rleg.Weld.C0=Lerp(rleg.Weld.C0,CFrame.new(.55,-1.1,-.1)*CFrame.Angles(math.rad(-17.5),0,math.rad(2.5)),.1)
  1652. hed.Weld.C0=Lerp(hed.Weld.C0,CFrame.new(0,1.5+math.cos(syne/20)/50,0)*CFrame.Angles(math.cos(syne/20)/40,0,0),.1)
  1653. rutprt.Weld.C0=Lerp(rutprt.Weld.C0,CFrame.new(0,-.1+math.cos(syne/20)/20,0)*CFrame.Angles(math.rad(-15),math.rad(0),math.rad(0)),.1)
  1654. end
  1655.  
  1656. if anim=="Falling" then
  1657.  
  1658. if not armmovments then
  1659. rarm.Weld.C0=Lerp(rarm.Weld.C0,CFrame.new(1.5,.525,0)*CFrame.Angles(math.rad(10),0,math.rad(70)),.035)
  1660. larm.Weld.C0=Lerp(larm.Weld.C0,CFrame.new(-1.5,.525,0)*CFrame.Angles(math.rad(10),0,math.rad(-70)),.035)
  1661. end
  1662.  
  1663. lleg.Weld.C0=Lerp(lleg.Weld.C0,CFrame.new(-.55,-1.2,0)*CFrame.Angles(math.rad(-14),0,math.rad(-2.5)),.035)
  1664. rleg.Weld.C0=Lerp(rleg.Weld.C0,CFrame.new(.55,-1.9,0)*CFrame.Angles(math.rad(0),0,math.rad(2.5)),.035)
  1665. hed.Weld.C0=Lerp(hed.Weld.C0,CFrame.new(0,1.5,-.3)*CFrame.Angles(math.rad(-40),0,0),.035)
  1666. rutprt.Weld.C0=Lerp(rutprt.Weld.C0,CFrame.new(0,-.1+math.cos(syne/20)/20,0)*CFrame.Angles(math.rad(10),math.rad(0),math.rad(0)),.035)
  1667. end
  1668.  
  1669.  
  1670.  
  1671.  
  1672. if runnin and not otheranims and not swimming then
  1673. chr.Humanoid.WalkSpeed=RunSpeed
  1674. elseif not runnin and not otheranims and not swimming then
  1675. chr.Humanoid.WalkSpeed=WlkSpeed
  1676. end
  1677. end)
  1678.  
  1679.  
  1680. --[[]]----[[Moves]]----[[]]--
  1681. attackone = function()
  1682.  
  1683. attack = true
  1684. armmovments=true
  1685.  
  1686. for i = 0, 1, 0.13 do
  1687. swait()
  1688. rarm.Weld.C0=Lerp(rarm.Weld.C0,CFrame.new(1.5,.525,0) * CFrame.Angles(math.rad(160), math.rad(0), math.rad(-40)), 0.3)
  1689. larm.Weld.C0=Lerp(larm.Weld.C0,CFrame.new(-1.5,.525,0)* CFrame.Angles(math.rad(160), math.rad(0), math.rad(40)), 0.3)
  1690. PARSI = PARSI + i/2--i + i/.5
  1691. end
  1692. wait(1)
  1693. for i = 0, 1, 0.13 do
  1694. swait()
  1695. PARSI = PARSI - i/2--i + i/.5
  1696. end
  1697.  
  1698. attack = false
  1699. armmovments=false
  1700. end
  1701.  
  1702.  
  1703.  
  1704.  
  1705. attacktwo = function()
  1706. attack = true
  1707. armmovments=true
  1708.  
  1709. for i = 0, 20, 0.13 do
  1710. swait()
  1711. rarm.Weld.C0=Lerp(rarm.Weld.C0,CFrame.new(1.5,.525,0) * CFrame.Angles(math.rad(180), math.rad(0), math.rad(0)), 0.3)
  1712. MagniDamage(RootPart, 12, true, 1, 2, true, 10, "Compensate-Knockdown", 0.01, false, 0, false, _, "", "")
  1713. local rnum = 20
  1714. local Rand1, Rand2, Rand3, Rand4 = {rand(-rnum, rnum), rand(-rnum, rnum), rand(-rnum, rnum)}, {rand(-rnum, rnum), rand(-rnum, rnum), rand(-rnum, rnum)}, {rand(-360, 360), rand(-360, 360), rand(-360, 360)}, {rand(-rnum, rnum), rand(-rnum, rnum), rand(-rnum, rnum)}
  1715. MagicSpikeBall(BrickColor.new("Royal purple"), "Neon", rarm.CFrame + Vector3.new(0,15,0), 0, 0, 0, 0.3, 0.3, 0.3, 0.1)
  1716. MagicCircle(BrickColor.new("Really black"), "Neon", rarm.CFrame + Vector3.new(0,15,0), 0, 0, 0, 0.3, 0.3, 0.3, 0.1)
  1717. end
  1718.  
  1719. for i = 0, 1, 0.1 do
  1720. swait()
  1721.  
  1722. end
  1723.  
  1724. attack = false
  1725. armmovments=false
  1726. end
  1727.  
  1728.  
  1729.  
  1730.  
  1731.  
  1732. attackthree = function()
  1733.  
  1734. attack = true
  1735. otheranims=true
  1736.  
  1737. for i = 0, 1, 0.13 do
  1738. swait()
  1739.  
  1740. end
  1741.  
  1742. for i = 0, 1, 0.1 do
  1743. swait()
  1744.  
  1745. end
  1746. otheranims=false
  1747. attack = false
  1748.  
  1749. end
  1750.  
  1751.  
  1752.  
  1753.  
  1754. Untimatum = function()
  1755.  
  1756. attack = true
  1757. otheranims=true
  1758.  
  1759.  
  1760.  
  1761. otheranims=false
  1762. attack = false
  1763. end
  1764. --[[]]----[[Moves]]----[[]]--
  1765.  
  1766.  
  1767. for i = 0, 1, 0.1 do
  1768. swait()
  1769. MagicBlock(BrickColor.new("Really black"), "Neon", RootPart.CFrame * Cf(0, -1.15, 0), 0, 0, 0, 0.7, 0.7, 0.7, 0.2)
  1770. MagicBlock(BrickColor.new("Really black"), "Neon", RootPart.CFrame * Cf(0, -1.15, 0), 0, 0, 0, 0.7, 0.7, 0.7, 0.2)
  1771. MagicBlock(BrickColor.new("Really black"), "Neon", RootPart.CFrame * Cf(0, -1.15, 0), 0, 0, 0, 0.7, 0.7, 0.7, 0.2)
  1772.  
  1773. MagicBlock(BrickColor.new("Royal purple"), "Neon", RootPart.CFrame * Cf(0, -1.15, 0), 0, 0, 0, 0.7, 0.7, 0.7, 0.2)
  1774. MagicCircle(BrickColor.new("Royal purple"), "Neon", RootPart.CFrame, 0, 0, 0, 0.7, 0.7, 0.7, 0.2)
  1775. MagicCircle(BrickColor.new("Royal purple"), "Neon", RootPart.CFrame, 0, 0, 0, 0.7, 0.7, 0.7, 0.2)
  1776. MagicCircle(BrickColor.new("Royal purple"), "Neon", RootPart.CFrame, 0, 0, 0, 0.7, 0.7, 0.7, 0.2)
  1777. MagicCircle(BrickColor.new("Royal purple"), "Neon", RootPart.CFrame, 0, 0, 0, 0.7, 0.7, 0.7, 0.2)
  1778.  
  1779. MagicBlock(BrickColor.new("Royal purple"), "SmoothPlastic", RootPart.CFrame, 0, 0, 0, 0.7, 0.7, 0.7, 0.2)
  1780. MagicBlock(BrickColor.new("Royal purple"), "Neon", RootPart.CFrame, 0, 0, 0, 0.7, 0.7, 0.7, 0.02)
  1781.  
  1782. MagicSpikeBall(BrickColor.new("Royal purple"), "Neon", RootPart.CFrame, 0, 0, 0, 0.7, 0.7, 0.7, 0.2)
  1783. MagicSpikeBall(BrickColor.new("Royal purple"), "Neon", RootPart.CFrame, 0, 0, 0, 0.7, 0.7, 0.7, 0.2)
  1784.  
  1785. MagicCircle(BrickColor.new("Really black"), "Neon", RootPart.CFrame, 0, 0, 0, 0.7, 0.7, 0.7, 0.2)
  1786. MagicCircle(BrickColor.new("Really black"), "Neon", RootPart.CFrame, 0, 0, 0, 0.7, 0.7, 0.7, 0.2)
  1787. end
  1788.  
  1789. function Lightning(Part0,Part1,Times,Offset,Color,Thickness,Trans)
  1790. local magz = (Part0 - Part1).magnitude
  1791. local curpos = Part0
  1792. local trz = {-Offset,Offset}
  1793. for i=1,Times do
  1794. local li = Instance.new("Part", torso)
  1795. li.Name = "Lightning"
  1796. li.TopSurface =0
  1797. li.Material = "Neon"
  1798. li.BottomSurface = 0
  1799. li.Anchored = true
  1800. li.Locked = true
  1801. li.Transparency = Trans or 0.4
  1802. li.BrickColor = BrickColor.new(Color)
  1803. li.formFactor = "Custom"
  1804. li.CanCollide = false
  1805. li.Size = Vector3.new(Thickness,Thickness,magz/Times)
  1806. local Offzet = Vector3.new(trz[math.random(1,2)],trz[math.random(1,2)],trz[math.random(1,2)])
  1807. local trolpos = CFrame.new(curpos,Part1)*CFrame.new(0,0,magz/Times).p+Offzet
  1808. if Times == i then
  1809. local magz2 = (curpos - Part1).magnitude
  1810. li.Size = Vector3.new(Thickness,Thickness,magz2)
  1811. li.CFrame = CFrame.new(curpos,Part1)*CFrame.new(0,0,-magz2/2)
  1812. else
  1813. li.CFrame = CFrame.new(curpos,trolpos)*CFrame.new(0,0,magz/Times/2)
  1814. end
  1815. curpos = li.CFrame*CFrame.new(0,0,magz/Times/2).p
  1816. game.Debris:AddItem(li,.1)
  1817. end
  1818. end
  1819.  
  1820. BodyParts = {} -- Parts to emit lightning effects from
  1821. for _, v in pairs(Spheres:GetChildren()) do
  1822. if v:IsA("Part") then
  1823. table.insert(BodyParts, v)
  1824. end
  1825. end
  1826.  
  1827. Bounding = {} -- Calculate the bounding boxes
  1828. for _, v in pairs(BodyParts) do
  1829. local temp = {X=nil, Y=nil, Z=nil}
  1830. temp.X = v.Size.X/2 * 10
  1831. temp.Y = v.Size.Y/2 * 10
  1832. temp.Z = v.Size.Z/2 * 10
  1833. Bounding[v.Name] = temp
  1834. --table.insert(Bounding, v.Name, temp)
  1835. end
  1836.  
  1837. while wait(math.random(1,10)/10) do -- Emit the Lightning effects randomly
  1838. local Body1 = BodyParts[math.random(#BodyParts)]
  1839. local Body2 = BodyParts[math.random(#BodyParts)]
  1840. local Pos1 = Vector3.new(
  1841. math.random(-Bounding[Body1.Name].X, Bounding[Body1.Name].X)/10,
  1842. math.random(-Bounding[Body1.Name].Y, Bounding[Body1.Name].Y)/10,
  1843. math.random(-Bounding[Body1.Name].Z, Bounding[Body1.Name].Z)/10
  1844. )
  1845. local Pos2 = Vector3.new(
  1846. math.random(-Bounding[Body2.Name].X, Bounding[Body2.Name].X)/10,
  1847. math.random(-Bounding[Body2.Name].Y, Bounding[Body2.Name].Y)/10,
  1848. math.random(-Bounding[Body2.Name].Z, Bounding[Body2.Name].Z)/10
  1849. )
  1850. local SPos1 = Body1.Position + Pos1
  1851. local SPos2 = Body2.Position + Pos2
  1852. Lightning(SPos1, SPos2, 6, 5, "Dark indigo", .03, .56)
  1853. end
  1854.  
  1855.  
  1856. if #Effects > 0 then
  1857. for e = 1, #Effects do
  1858. if Effects[e] ~= nil then
  1859. local Thing = Effects[e]
  1860. if Thing ~= nil then
  1861. local Part = Thing[1]
  1862. local Mode = Thing[2]
  1863. local Delay = Thing[3]
  1864. local IncX = Thing[4]
  1865. local IncY = Thing[5]
  1866. local IncZ = Thing[6]
  1867. if Thing[1].Transparency <= 1 then
  1868. if Thing[2] == "Block1" then
  1869. Thing[1].CFrame = Thing[1].CFrame * CFrame.fromEulerAnglesXYZ(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50))
  1870. Mesh = Thing[1].Mesh
  1871. Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6])
  1872. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  1873. elseif Thing[2] == "Block2" then
  1874. Thing[1].CFrame = Thing[1].CFrame
  1875. Mesh = Thing[7]
  1876. Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6])
  1877. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  1878. elseif Thing[2] == "Cylinder" then
  1879. Mesh = Thing[1].Mesh
  1880. Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6])
  1881. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  1882. elseif Thing[2] == "Blood" then
  1883. Mesh = Thing[7]
  1884. Thing[1].CFrame = Thing[1].CFrame * Vector3.new(0, .5, 0)
  1885. Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6])
  1886. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  1887. elseif Thing[2] == "Elec" then
  1888. Mesh = Thing[1].Mesh
  1889. Mesh.Scale = Mesh.Scale + Vector3.new(Thing[7], Thing[8], Thing[9])
  1890. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  1891. elseif Thing[2] == "Disappear" then
  1892. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  1893. elseif Thing[2] == "Shatter" then
  1894. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  1895. Thing[4] = Thing[4] * CFrame.new(0, Thing[7], 0)
  1896. Thing[1].CFrame = Thing[4] * CFrame.fromEulerAnglesXYZ(Thing[6], 0, 0)
  1897. Thing[6] = Thing[6] + Thing[5]
  1898. end
  1899. else
  1900. Part.Parent = nil
  1901. table.remove(Effects, e)
  1902. end
  1903. end
  1904. end
  1905. end
  1906. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement