Advertisement
Christoffer07700Extr

edit random

Jul 7th, 2019
167
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 70.83 KB | None | 0 0
  1. --//====================================================\\--
  2. --|| CREATED BY SHACKLUSTER
  3. --\\====================================================//--
  4.  
  5. if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
  6. local Player,game,owner = owner,game
  7. local RealPlayer = Player
  8. do
  9. print("FE Compatibility code by Mokiros")
  10. local rp = RealPlayer
  11. script.Parent = rp.Character
  12.  
  13. --RemoteEvent for communicating
  14. local Event = Instance.new("RemoteEvent")
  15. Event.Name = "UserInput_Event"
  16.  
  17. --Fake event to make stuff like Mouse.KeyDown work
  18. local function fakeEvent()
  19. local t = {_fakeEvent=true,Functions={},Connect=function(self,f)table.insert(self.Functions,f) end}
  20. t.connect = t.Connect
  21. return t
  22. end
  23.  
  24. --Creating fake input objects with fake variables
  25. local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent()}
  26. local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
  27. local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
  28. CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
  29. end}
  30. --Merged 2 functions into one by checking amount of arguments
  31. CAS.UnbindAction = CAS.BindAction
  32.  
  33. --This function will trigger the events that have been :Connect()'ed
  34. local function te(self,ev,...)
  35. local t = m[ev]
  36. if t and t._fakeEvent then
  37. for _,f in pairs(t.Functions) do
  38. f(...)
  39. end
  40. end
  41. end
  42. m.TrigEvent = te
  43. UIS.TrigEvent = te
  44.  
  45. Event.OnServerEvent:Connect(function(plr,io)
  46. if plr~=rp then return end
  47. m.Target = io.Target
  48. m.Hit = io.Hit
  49. if not io.isMouse then
  50. local b = io.UserInputState == Enum.UserInputState.Begin
  51. if io.UserInputType == Enum.UserInputType.MouseButton1 then
  52. return m:TrigEvent(b and "Button1Down" or "Button1Up")
  53. end
  54. for _,t in pairs(CAS.Actions) do
  55. for _,k in pairs(t.Keys) do
  56. if k==io.KeyCode then
  57. t.Function(t.Name,io.UserInputState,io)
  58. end
  59. end
  60. end
  61. m:TrigEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
  62. UIS:TrigEvent(b and "InputBegan" or "InputEnded",io,false)
  63. end
  64. end)
  65. Event.Parent = NLS([==[
  66. local Player = game:GetService("Players").LocalPlayer
  67. local Event = script:WaitForChild("UserInput_Event")
  68.  
  69. local Mouse = Player:GetMouse()
  70. local UIS = game:GetService("UserInputService")
  71. local input = function(io,a)
  72. if a then return end
  73. --Since InputObject is a client-side instance, we create and pass table instead
  74. Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState,Hit=Mouse.Hit,Target=Mouse.Target})
  75. end
  76. UIS.InputBegan:Connect(input)
  77. UIS.InputEnded:Connect(input)
  78.  
  79. local h,t
  80. --Give the server mouse data 30 times every second, but only if the values changed
  81. --If player is not moving their mouse, client won't fire events
  82. while wait(1/30) do
  83. if h~=Mouse.Hit or t~=Mouse.Target then
  84. h,t=Mouse.Hit,Mouse.Target
  85. Event:FireServer({isMouse=true,Target=t,Hit=h})
  86. end
  87. end]==],Player.Character)
  88.  
  89. ----Sandboxed game object that allows the usage of client-side methods and services
  90. --Real game object
  91. local _rg = game
  92.  
  93. --Metatable for fake service
  94. local fsmt = {
  95. __index = function(self,k)
  96. local s = rawget(self,"_RealService")
  97. if s then return s[k] end
  98. end,
  99. __newindex = function(self,k,v)
  100. local s = rawget(self,"_RealService")
  101. if s then s[k]=v end
  102. end,
  103. __call = function(self,...)
  104. local s = rawget(self,"_RealService")
  105. if s then return s(...) end
  106. end
  107. }
  108. local function FakeService(t,RealService)
  109. t._RealService = typeof(RealService)=="string" and _rg:GetService(RealService) or RealService
  110. return setmetatable(t,fsmt)
  111. end
  112.  
  113. --Fake game object
  114. local g = {
  115. GetService = function(self,s)
  116. return self[s]
  117. end,
  118. Players = FakeService({
  119. LocalPlayer = FakeService({GetMouse=function(self)return m end},Player)
  120. },"Players"),
  121. UserInputService = FakeService(UIS,"UserInputService"),
  122. ContextActionService = FakeService(CAS,"ContextActionService"),
  123. }
  124. rawset(g.Players,"localPlayer",g.Players.LocalPlayer)
  125. g.service = g.GetService
  126.  
  127. g.RunService = FakeService({
  128. RenderStepped = _rg:GetService("RunService").Heartbeat,
  129. BindToRenderStep = function(self,name,_,fun)
  130. self._btrs[name] = self.Heartbeat:Connect(fun)
  131. end,
  132. UnbindFromRenderStep = function(self,name)
  133. self._btrs[name]:Disconnect()
  134. end,
  135. },"RunService")
  136.  
  137. setmetatable(g,{
  138. __index=function(self,s)
  139. return _rg:GetService(s) or typeof(_rg[s])=="function"
  140. and function(_,...)return _rg[s](_rg,...)end or _rg[s]
  141. end,
  142. __newindex = fsmt.__newindex,
  143. __call = fsmt.__call
  144. })
  145. --Changing owner to fake player object to support owner:GetMouse()
  146. game,owner = g,g.Players.LocalPlayer
  147. end
  148. print("VengefulProgram is sexy from dreamer no homo")
  149. Player = game:GetService("Players").LocalPlayer
  150. PlayerGui = Player.PlayerGui
  151. Cam = workspace.CurrentCamera
  152. Backpack = Player.Backpack
  153. Character = Player.Character
  154. Humanoid = Character.Humanoid
  155. Mouse = Player:GetMouse()
  156. RootPart = Character["HumanoidRootPart"]
  157. Torso = Character["Torso"]
  158. Head = Character["Head"]
  159. RightArm = Character["Right Arm"]
  160. LeftArm = Character["Left Arm"]
  161. RightLeg = Character["Right Leg"]
  162. LeftLeg = Character["Left Leg"]
  163. RootJoint = RootPart["RootJoint"]
  164. Neck = Torso["Neck"]
  165. RightShoulder = Torso["Right Shoulder"]
  166. LeftShoulder = Torso["Left Shoulder"]
  167. RightHip = Torso["Right Hip"]
  168. LeftHip = Torso["Left Hip"]
  169.  
  170. IT = Instance.new
  171. CF = CFrame.new
  172. VT = Vector3.new
  173. RAD = math.rad
  174. C3 = Color3.new
  175. UD2 = UDim2.new
  176. BRICKC = BrickColor.new
  177. ANGLES = CFrame.Angles
  178. EULER = CFrame.fromEulerAnglesXYZ
  179. COS = math.cos
  180. ACOS = math.acos
  181. SIN = math.sin
  182. ASIN = math.asin
  183. ABS = math.abs
  184. MRANDOM = math.random
  185. FLOOR = math.floor
  186.  
  187. --//=================================\\
  188. --|| USEFUL VALUES
  189. --\\=================================//
  190.  
  191. Animation_Speed = 3
  192. Frame_Speed = 1 / 60 -- (1 / 30) OR (1 / 60)
  193. local Speed = 16
  194. local ROOTC0 = CF(0, 0, 0) * ANGLES(RAD(-90), RAD(0), RAD(180))
  195. local NECKC0 = CF(0, 1, 0) * ANGLES(RAD(-90), RAD(0), RAD(180))
  196. local RIGHTSHOULDERC0 = CF(-0.5, 0, 0) * ANGLES(RAD(0), RAD(90), RAD(0))
  197. local LEFTSHOULDERC0 = CF(0.5, 0, 0) * ANGLES(RAD(0), RAD(-90), RAD(0))
  198. local DAMAGEMULTIPLIER = 1
  199. local ANIM = "Idle"
  200. local ATTACK = false
  201. local EQUIPPED = false
  202. local HOLD = false
  203. local COMBO = 1
  204. local Rooted = false
  205. local SINE = 0
  206. local KEYHOLD = false
  207. local CHANGE = 2 / Animation_Speed
  208. local WALKINGANIM = false
  209. local VALUE1 = false
  210. local VALUE2 = false
  211. local ROBLOXIDLEANIMATION = IT("Animation")
  212. ROBLOXIDLEANIMATION.Name = "Roblox Idle Animation"
  213. ROBLOXIDLEANIMATION.AnimationId = "http://www.roblox.com/asset/?id=180435571"
  214. --ROBLOXIDLEANIMATION.Parent = Humanoid
  215. local WEAPONGUI = IT("ScreenGui", PlayerGui)
  216. WEAPONGUI.Name = "Weapon GUI"
  217. local Effects = IT("Folder", Character)
  218. Effects.Name = "Effects"
  219. local ANIMATOR = Humanoid.Animator
  220. local ANIMATE = Character.Animate
  221. local UNANCHOR = true
  222. local CUSTOMANGLES = true
  223.  
  224. --//=================================\\
  225. --\\=================================//
  226.  
  227.  
  228. --//=================================\\
  229. --|| SAZERENOS' ARTIFICIAL HEARTBEAT
  230. --\\=================================//
  231.  
  232. ArtificialHB = Instance.new("BindableEvent", script)
  233. ArtificialHB.Name = "ArtificialHB"
  234.  
  235. script:WaitForChild("ArtificialHB")
  236.  
  237. frame = Frame_Speed
  238. tf = 0
  239. allowframeloss = false
  240. tossremainder = false
  241. lastframe = tick()
  242. script.ArtificialHB:Fire()
  243.  
  244. game:GetService("RunService").Heartbeat:connect(function(s, p)
  245. tf = tf + s
  246. if tf >= frame then
  247. if allowframeloss then
  248. ArtificialHB:Fire()
  249. lastframe = tick()
  250. else
  251. for i = 1, math.floor(tf / frame) do
  252. ArtificialHB:Fire()
  253. end
  254. lastframe = tick()
  255. end
  256. if tossremainder then
  257. tf = 0
  258. else
  259. tf = tf - frame * math.floor(tf / frame)
  260. end
  261. end
  262. end)
  263.  
  264. --//=================================\\
  265. --\\=================================//
  266.  
  267. --//=================================\\
  268. --|| SOME FUNCTIONS
  269. --\\=================================//
  270.  
  271. function Raycast(POSITION, DIRECTION, RANGE, IGNOREDECENDANTS)
  272. return workspace:FindPartOnRay(Ray.new(POSITION, DIRECTION.unit * RANGE), IGNOREDECENDANTS)
  273. end
  274.  
  275. function PositiveAngle(NUMBER)
  276. if NUMBER >= 0 then
  277. NUMBER = 0
  278. end
  279. return NUMBER
  280. end
  281.  
  282. function NegativeAngle(NUMBER)
  283. if NUMBER <= 0 then
  284. NUMBER = 0
  285. end
  286. return NUMBER
  287. end
  288.  
  289. function Swait(NUMBER)
  290. if NUMBER == 0 or NUMBER == nil then
  291. ArtificialHB.Event:wait()
  292. else
  293. for i = 1, NUMBER do
  294. ArtificialHB.Event:wait()
  295. end
  296. end
  297. end
  298.  
  299. function CreateMesh(MESH, PARENT, MESHTYPE, MESHID, TEXTUREID, SCALE, OFFSET)
  300. local NEWMESH = IT(MESH)
  301. if MESH == "SpecialMesh" then
  302. NEWMESH.MeshType = MESHTYPE
  303. if MESHID ~= "nil" and MESHID ~= "" then
  304. NEWMESH.MeshId = "http://www.roblox.com/asset/?id="..MESHID
  305. end
  306. if TEXTUREID ~= "nil" and TEXTUREID ~= "" then
  307. NEWMESH.TextureId = "http://www.roblox.com/asset/?id="..TEXTUREID
  308. end
  309. end
  310. NEWMESH.Offset = OFFSET or VT(0, 0, 0)
  311. NEWMESH.Scale = SCALE
  312. NEWMESH.Parent = PARENT
  313. return NEWMESH
  314. end
  315.  
  316. function CreatePart(FORMFACTOR, PARENT, MATERIAL, REFLECTANCE, TRANSPARENCY, BRICKCOLOR, NAME, SIZE, ANCHOR)
  317. local NEWPART = IT("Part")
  318. NEWPART.formFactor = FORMFACTOR
  319. NEWPART.Reflectance = REFLECTANCE
  320. NEWPART.Transparency = TRANSPARENCY
  321. NEWPART.CanCollide = false
  322. NEWPART.Locked = true
  323. NEWPART.Anchored = true
  324. if ANCHOR == false then
  325. NEWPART.Anchored = false
  326. end
  327. NEWPART.BrickColor = BRICKC(tostring(BRICKCOLOR))
  328. NEWPART.Name = NAME
  329. NEWPART.Size = SIZE
  330. NEWPART.Position = Torso.Position
  331. NEWPART.Material = MATERIAL
  332. NEWPART:BreakJoints()
  333. NEWPART.Parent = PARENT
  334. return NEWPART
  335. end
  336.  
  337. local function weldBetween(a, b)
  338. local weldd = Instance.new("ManualWeld")
  339. weldd.Part0 = a
  340. weldd.Part1 = b
  341. weldd.C0 = CFrame.new()
  342. weldd.C1 = b.CFrame:inverse() * a.CFrame
  343. weldd.Parent = a
  344. return weldd
  345. end
  346.  
  347.  
  348. function QuaternionFromCFrame(cf)
  349. local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components()
  350. local trace = m00 + m11 + m22
  351. if trace > 0 then
  352. local s = math.sqrt(1 + trace)
  353. local recip = 0.5 / s
  354. return (m21 - m12) * recip, (m02 - m20) * recip, (m10 - m01) * recip, s * 0.5
  355. else
  356. local i = 0
  357. if m11 > m00 then
  358. i = 1
  359. end
  360. if m22 > (i == 0 and m00 or m11) then
  361. i = 2
  362. end
  363. if i == 0 then
  364. local s = math.sqrt(m00 - m11 - m22 + 1)
  365. local recip = 0.5 / s
  366. return 0.5 * s, (m10 + m01) * recip, (m20 + m02) * recip, (m21 - m12) * recip
  367. elseif i == 1 then
  368. local s = math.sqrt(m11 - m22 - m00 + 1)
  369. local recip = 0.5 / s
  370. return (m01 + m10) * recip, 0.5 * s, (m21 + m12) * recip, (m02 - m20) * recip
  371. elseif i == 2 then
  372. local s = math.sqrt(m22 - m00 - m11 + 1)
  373. local recip = 0.5 / s return (m02 + m20) * recip, (m12 + m21) * recip, 0.5 * s, (m10 - m01) * recip
  374. end
  375. end
  376. end
  377.  
  378. function QuaternionToCFrame(px, py, pz, x, y, z, w)
  379. local xs, ys, zs = x + x, y + y, z + z
  380. local wx, wy, wz = w * xs, w * ys, w * zs
  381. local xx = x * xs
  382. local xy = x * ys
  383. local xz = x * zs
  384. local yy = y * ys
  385. local yz = y * zs
  386. local zz = z * zs
  387. return CFrame.new(px, py, pz, 1 - (yy + zz), xy - wz, xz + wy, xy + wz, 1 - (xx + zz), yz - wx, xz - wy, yz + wx, 1 - (xx + yy))
  388. end
  389.  
  390. function QuaternionSlerp(a, b, t)
  391. local cosTheta = a[1] * b[1] + a[2] * b[2] + a[3] * b[3] + a[4] * b[4]
  392. local startInterp, finishInterp;
  393. if cosTheta >= 0.0001 then
  394. if (1 - cosTheta) > 0.0001 then
  395. local theta = ACOS(cosTheta)
  396. local invSinTheta = 1 / SIN(theta)
  397. startInterp = SIN((1 - t) * theta) * invSinTheta
  398. finishInterp = SIN(t * theta) * invSinTheta
  399. else
  400. startInterp = 1 - t
  401. finishInterp = t
  402. end
  403. else
  404. if (1 + cosTheta) > 0.0001 then
  405. local theta = ACOS(-cosTheta)
  406. local invSinTheta = 1 / SIN(theta)
  407. startInterp = SIN((t - 1) * theta) * invSinTheta
  408. finishInterp = SIN(t * theta) * invSinTheta
  409. else
  410. startInterp = t - 1
  411. finishInterp = t
  412. end
  413. end
  414. return a[1] * startInterp + b[1] * finishInterp, a[2] * startInterp + b[2] * finishInterp, a[3] * startInterp + b[3] * finishInterp, a[4] * startInterp + b[4] * finishInterp
  415. end
  416.  
  417. function Clerp(a, b, t)
  418. local qa = {QuaternionFromCFrame(a)}
  419. local qb = {QuaternionFromCFrame(b)}
  420. local ax, ay, az = a.x, a.y, a.z
  421. local bx, by, bz = b.x, b.y, b.z
  422. local _t = 1 - t
  423. return QuaternionToCFrame(_t * ax + t * bx, _t * ay + t * by, _t * az + t * bz, QuaternionSlerp(qa, qb, t))
  424. end
  425.  
  426. function CreateFrame(PARENT, TRANSPARENCY, BORDERSIZEPIXEL, POSITION, SIZE, COLOR, BORDERCOLOR, NAME)
  427. local frame = IT("Frame")
  428. frame.BackgroundTransparency = TRANSPARENCY
  429. frame.BorderSizePixel = BORDERSIZEPIXEL
  430. frame.Position = POSITION
  431. frame.Size = SIZE
  432. frame.BackgroundColor3 = COLOR
  433. frame.BorderColor3 = BORDERCOLOR
  434. frame.Name = NAME
  435. frame.Parent = PARENT
  436. return frame
  437. end
  438.  
  439. function CreateLabel(PARENT, TEXT, TEXTCOLOR, TEXTFONTSIZE, TEXTFONT, TRANSPARENCY, BORDERSIZEPIXEL, STROKETRANSPARENCY, NAME)
  440. local label = IT("TextLabel")
  441. label.BackgroundTransparency = 1
  442. label.Size = UD2(1, 0, 1, 0)
  443. label.Position = UD2(0, 0, 0, 0)
  444. label.TextColor3 = TEXTCOLOR
  445. label.TextStrokeTransparency = STROKETRANSPARENCY
  446. label.TextTransparency = TRANSPARENCY
  447. label.FontSize = TEXTFONTSIZE
  448. label.Font = TEXTFONT
  449. label.BorderSizePixel = BORDERSIZEPIXEL
  450. label.TextScaled = false
  451. label.Text = TEXT
  452. label.Name = NAME
  453. label.Parent = PARENT
  454. return label
  455. end
  456.  
  457. function NoOutlines(PART)
  458. PART.TopSurface, PART.BottomSurface, PART.LeftSurface, PART.RightSurface, PART.FrontSurface, PART.BackSurface = 10, 10, 10, 10, 10, 10
  459. end
  460.  
  461. function CreateWeldOrSnapOrMotor(TYPE, PARENT, PART0, PART1, C0, C1)
  462. local NEWWELD = IT(TYPE)
  463. NEWWELD.Part0 = PART0
  464. NEWWELD.Part1 = PART1
  465. NEWWELD.C0 = C0
  466. NEWWELD.C1 = C1
  467. NEWWELD.Parent = PARENT
  468. return NEWWELD
  469. end
  470.  
  471. local S = IT("Sound")
  472. function CreateSound(ID, PARENT, VOLUME, PITCH, DOESLOOP)
  473. local NEWSOUND = nil
  474. coroutine.resume(coroutine.create(function()
  475. NEWSOUND = S:Clone()
  476. NEWSOUND.Parent = PARENT
  477. NEWSOUND.Volume = VOLUME
  478. NEWSOUND.Pitch = PITCH
  479. NEWSOUND.SoundId = "rbxassetid://"..ID
  480. NEWSOUND:play()
  481. if DOESLOOP == true then
  482. NEWSOUND.Looped = true
  483. else
  484. repeat wait(1) until NEWSOUND.Playing == false
  485. NEWSOUND:remove()
  486. end
  487. end))
  488. return NEWSOUND
  489. end
  490.  
  491. function CFrameFromTopBack(at, top, back)
  492. local right = top:Cross(back)
  493. return CF(at.x, at.y, at.z, right.x, top.x, back.x, right.y, top.y, back.y, right.z, top.z, back.z)
  494. end
  495.  
  496. --WACKYEFFECT({EffectType = "", Size = VT(1,1,1), Size2 = VT(0,0,0), Transparency = 0, Transparency2 = 1, CFrame = CF(), MoveToPos = nil, RotationX = 0, RotationY = 0, RotationZ = 0, Material = "Neon", Color = C3(1,1,1), SoundID = nil, SoundPitch = nil, SoundVolume = nil, UseBoomerangMath = false, Boomerang = 0, SizeBoomerang = 0})
  497. function WACKYEFFECT(Table)
  498. local TYPE = (Table.EffectType or "Sphere")
  499. local SIZE = (Table.Size or VT(1,1,1))
  500. local ENDSIZE = (Table.Size2 or VT(0,0,0))
  501. local TRANSPARENCY = (Table.Transparency or 0)
  502. local ENDTRANSPARENCY = (Table.Transparency2 or 1)
  503. local CFRAME = (Table.CFrame or Torso.CFrame)
  504. local MOVEDIRECTION = (Table.MoveToPos or nil)
  505. local ROTATION1 = (Table.RotationX or 0)
  506. local ROTATION2 = (Table.RotationY or 0)
  507. local ROTATION3 = (Table.RotationZ or 0)
  508. local MATERIAL = (Table.Material or "Neon")
  509. local COLOR = (Table.Color or C3(1,1,1))
  510. local TIME = (Table.Time or 45)
  511. local SOUNDID = (Table.SoundID or nil)
  512. local SOUNDPITCH = (Table.SoundPitch or nil)
  513. local SOUNDVOLUME = (Table.SoundVolume or nil)
  514. local USEBOOMERANGMATH = (Table.UseBoomerangMath or false)
  515. local BOOMERANG = (Table.Boomerang or 0)
  516. local SIZEBOOMERANG = (Table.SizeBoomerang or 0)
  517. coroutine.resume(coroutine.create(function()
  518. local PLAYSSOUND = false
  519. local SOUND = nil
  520. local EFFECT = CreatePart(3, Effects, MATERIAL, 0, TRANSPARENCY, BRICKC("Pearl"), "Effect", VT(1,1,1), true)
  521. if SOUNDID ~= nil and SOUNDPITCH ~= nil and SOUNDVOLUME ~= nil then
  522. PLAYSSOUND = true
  523. SOUND = CreateSound(SOUNDID, EFFECT, SOUNDVOLUME, SOUNDPITCH, false)
  524. end
  525. EFFECT.Color = COLOR
  526. local MSH = nil
  527. if TYPE == "Sphere" then
  528. MSH = CreateMesh("SpecialMesh", EFFECT, "Sphere", "", "", SIZE, VT(0,0,0))
  529. elseif TYPE == "Block" or TYPE == "Box" then
  530. MSH = IT("BlockMesh",EFFECT)
  531. MSH.Scale = SIZE
  532. elseif TYPE == "Wave" then
  533. MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "20329976", "", SIZE, VT(0,0,-SIZE.X/8))
  534. elseif TYPE == "Ring" then
  535. MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "559831844", "", VT(SIZE.X,SIZE.X,0.1), VT(0,0,0))
  536. elseif TYPE == "Slash" then
  537. MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "662586858", "", VT(SIZE.X/10,0,SIZE.X/10), VT(0,0,0))
  538. elseif TYPE == "Round Slash" then
  539. MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "662585058", "", VT(SIZE.X/10,0,SIZE.X/10), VT(0,0,0))
  540. elseif TYPE == "Swirl" then
  541. MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "168892432", "", SIZE, VT(0,0,0))
  542. elseif TYPE == "Skull" then
  543. MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "4770583", "", SIZE, VT(0,0,0))
  544. elseif TYPE == "Crystal" then
  545. MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "9756362", "", SIZE, VT(0,0,0))
  546. end
  547. if MSH ~= nil then
  548. local BOOMR1 = 1+BOOMERANG/50
  549. local BOOMR2 = 1+SIZEBOOMERANG/50
  550. local MOVESPEED = nil
  551. if MOVEDIRECTION ~= nil then
  552. if USEBOOMERANGMATH == true then
  553. MOVESPEED = ((CFRAME.p - MOVEDIRECTION).Magnitude/TIME)*BOOMR1
  554. else
  555. MOVESPEED = ((CFRAME.p - MOVEDIRECTION).Magnitude/TIME)
  556. end
  557. end
  558. local GROWTH = nil
  559. if USEBOOMERANGMATH == true then
  560. GROWTH = (SIZE - ENDSIZE)*(BOOMR2+1)
  561. else
  562. GROWTH = (SIZE - ENDSIZE)
  563. end
  564. local TRANS = TRANSPARENCY - ENDTRANSPARENCY
  565. if TYPE == "Block" then
  566. EFFECT.CFrame = CFRAME*ANGLES(RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)))
  567. else
  568. EFFECT.CFrame = CFRAME
  569. end
  570. if USEBOOMERANGMATH == true then
  571. for LOOP = 1, TIME+1 do
  572. Swait()
  573. MSH.Scale = MSH.Scale - (VT((GROWTH.X)*((1 - (LOOP/TIME)*BOOMR2)),(GROWTH.Y)*((1 - (LOOP/TIME)*BOOMR2)),(GROWTH.Z)*((1 - (LOOP/TIME)*BOOMR2)))*BOOMR2)/TIME
  574. if TYPE == "Wave" then
  575. MSH.Offset = VT(0,0,-MSH.Scale.Z/8)
  576. end
  577. EFFECT.Transparency = EFFECT.Transparency - TRANS/TIME
  578. if TYPE == "Block" then
  579. EFFECT.CFrame = CFRAME*ANGLES(RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)))
  580. else
  581. EFFECT.CFrame = EFFECT.CFrame*ANGLES(RAD(ROTATION1),RAD(ROTATION2),RAD(ROTATION3))
  582. end
  583. if MOVEDIRECTION ~= nil then
  584. local ORI = EFFECT.Orientation
  585. EFFECT.CFrame = CF(EFFECT.Position,MOVEDIRECTION)*CF(0,0,-(MOVESPEED)*((1 - (LOOP/TIME)*BOOMR1)))
  586. EFFECT.CFrame = CF(EFFECT.Position)*ANGLES(RAD(ORI.X),RAD(ORI.Y),RAD(ORI.Z))
  587. end
  588. end
  589. else
  590. for LOOP = 1, TIME+1 do
  591. Swait()
  592. MSH.Scale = MSH.Scale - GROWTH/TIME
  593. if TYPE == "Wave" then
  594. MSH.Offset = VT(0,0,-MSH.Scale.Z/8)
  595. end
  596. EFFECT.Transparency = EFFECT.Transparency - TRANS/TIME
  597. if TYPE == "Block" then
  598. EFFECT.CFrame = CFRAME*ANGLES(RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)))
  599. else
  600. EFFECT.CFrame = EFFECT.CFrame*ANGLES(RAD(ROTATION1),RAD(ROTATION2),RAD(ROTATION3))
  601. end
  602. if MOVEDIRECTION ~= nil then
  603. local ORI = EFFECT.Orientation
  604. EFFECT.CFrame = CF(EFFECT.Position,MOVEDIRECTION)*CF(0,0,-MOVESPEED)
  605. EFFECT.CFrame = CF(EFFECT.Position)*ANGLES(RAD(ORI.X),RAD(ORI.Y),RAD(ORI.Z))
  606. end
  607. end
  608. end
  609. EFFECT.Transparency = 1
  610. if PLAYSSOUND == false then
  611. EFFECT:remove()
  612. else
  613. repeat Swait() until EFFECT:FindFirstChildOfClass("Sound") == nil
  614. EFFECT:remove()
  615. end
  616. else
  617. if PLAYSSOUND == false then
  618. EFFECT:remove()
  619. else
  620. repeat Swait() until EFFECT:FindFirstChildOfClass("Sound") == nil
  621. EFFECT:remove()
  622. end
  623. end
  624. end))
  625. end
  626.  
  627. function MakeForm(PART,TYPE)
  628. if TYPE == "Cyl" then
  629. local MSH = IT("CylinderMesh",PART)
  630. elseif TYPE == "Ball" then
  631. local MSH = IT("SpecialMesh",PART)
  632. MSH.MeshType = "Sphere"
  633. elseif TYPE == "Wedge" then
  634. local MSH = IT("SpecialMesh",PART)
  635. MSH.MeshType = "Wedge"
  636. end
  637. end
  638.  
  639. Debris = game:GetService("Debris")
  640.  
  641. function CastProperRay(StartPos, EndPos, Distance, Ignore)
  642. local DIRECTION = CF(StartPos,EndPos).lookVector
  643. local Ignore = ((type(Ignore) == "table" and Ignore) or {Ignore})
  644. return game:GetService("Workspace"):FindPartOnRayWithIgnoreList(Ray.new(StartPos, DIRECTION * Distance), Ignore)
  645. end
  646.  
  647. local Particle = IT("ParticleEmitter",nil)
  648. Particle.Enabled = false
  649. Particle.LightEmission = 0.8
  650. Particle.Rate = 150
  651. Particle.ZOffset = 1
  652. Particle.Rotation = NumberRange.new(-180, 180)
  653.  
  654. --ParticleEmitter({Speed = 2, RotSpeed = NumberRange.new(-5, 5), Drag = 0, Size1 = 1, Size2 = 0, Lifetime1 = 1, Lifetime2 = 0, Parent = Torso, Emit = 10, Offset = 360, Enabled = false, Color1 = C3(1,1,1), Color2 = C3(1,1,1), Texture = ""})
  655. function ParticleEmitter(Table)
  656. local PRTCL = Particle:Clone()
  657. local Color1 = Table.Color1 or C3(1,1,1)
  658. local Color2 = Table.Color2 or C3(1,1,1)
  659. local Speed = Table.Speed or 5
  660. local Drag = Table.Drag or 0
  661. local Size1 = Table.Size1 or 1
  662. local Size2 = Table.Size2 or 5
  663. local Lifetime1 = Table.Lifetime1 or 1
  664. local Lifetime2 = Table.Lifetime2 or 1.5
  665. local Parent = Table.Parent or Torso
  666. local Emit = Table.Emit or 100
  667. local Offset = Table.Offset or 360
  668. local Acel = Table.Acel or VT(0,0,0)
  669. local Enabled = Table.Enabled or false
  670. local Texture = Table.Texture or "281983280"
  671. local RotS = Table.RotSpeed or NumberRange.new(-15, 15)
  672. local Trans1 = Table.Transparency1 or 0
  673. local Trans2 = Table.Transparency2 or 0
  674. PRTCL.Parent = Parent
  675. PRTCL.RotSpeed = RotS
  676. PRTCL.Transparency = NumberSequence.new({NumberSequenceKeypoint.new(0,Trans1),NumberSequenceKeypoint.new(1,Trans2)})
  677. PRTCL.Texture = "http://www.roblox.com/asset/?id="..Texture
  678. PRTCL.Color = ColorSequence.new(Color1,Color2)
  679. PRTCL.Size = NumberSequence.new(Size1,Size2)
  680. PRTCL.Lifetime = NumberRange.new(Lifetime1,Lifetime2)
  681. PRTCL.Speed = NumberRange.new(Speed)
  682. PRTCL.VelocitySpread = Offset
  683. PRTCL.Drag = Drag
  684. PRTCL.Acceleration = Acel
  685. if Enabled == false then
  686. PRTCL:Emit(Emit)
  687. Debris:AddItem(PRTCL,Lifetime2)
  688. else
  689. PRTCL.Enabled = true
  690. end
  691. return PRTCL
  692. end
  693.  
  694. function AttackGyro()
  695. local GYRO = IT("BodyGyro",RootPart)
  696. GYRO.D = 15
  697. GYRO.P = 200000
  698. GYRO.MaxTorque = VT(0,4000000,0)
  699. GYRO.CFrame = CF(RootPart.Position,Mouse.Hit.p)
  700. coroutine.resume(coroutine.create(function()
  701. repeat
  702. Swait()
  703. GYRO.CFrame = CF(RootPart.Position,Mouse.Hit.p)
  704. until ATTACK == false
  705. GYRO:Remove()
  706. end))
  707. end
  708.  
  709. --//=================================\\
  710. --|| GUIS AND MISC
  711. --\\=================================//
  712.  
  713. local Particle = IT("ParticleEmitter",nil)
  714. Particle.Enabled = false
  715. Particle.Transparency = NumberSequence.new({NumberSequenceKeypoint.new(0,0.3),NumberSequenceKeypoint.new(0.3,0),NumberSequenceKeypoint.new(1,1)})
  716. Particle.LightEmission = 0.5
  717. Particle.Rate = 150
  718. Particle.ZOffset = 0.2
  719. Particle.Rotation = NumberRange.new(-180, 180)
  720. Particle.RotSpeed = NumberRange.new(-180, 180)
  721. Particle.Texture = "http://www.roblox.com/asset/?id=304437537"
  722. Particle.Color = ColorSequence.new(C3(1,0,0),C3(0.4,0,0))
  723.  
  724. --ParticleEmitter({Speed = 5, Drag = 0, Size1 = 1, Size2 = 5, Lifetime1 = 1, Lifetime2 = 1.5, Parent = Torso, Emit = 100, Offset = 360, Enabled = false})
  725. function ParticleEmitter(Table)
  726. local PRTCL = Particle:Clone()
  727. local Speed = Table.Speed or 5
  728. local Drag = Table.Drag or 0
  729. local Size1 = Table.Size1 or 1
  730. local Size2 = Table.Size2 or 5
  731. local Lifetime1 = Table.Lifetime1 or 1
  732. local Lifetime2 = Table.Lifetime2 or 1.5
  733. local Parent = Table.Parent or Torso
  734. local Emit = Table.Emit or 100
  735. local Offset = Table.Offset or 360
  736. local Acel = Table.Acel or VT(0,0,0)
  737. local Enabled = Table.Enabled or false
  738. PRTCL.Parent = Parent
  739. PRTCL.Size = NumberSequence.new(Size1,Size2)
  740. PRTCL.Lifetime = NumberRange.new(Lifetime1,Lifetime2)
  741. PRTCL.Speed = NumberRange.new(Speed)
  742. PRTCL.VelocitySpread = Offset
  743. PRTCL.Drag = Drag
  744. PRTCL.Acceleration = Acel
  745. if Enabled == false then
  746. PRTCL:Emit(Emit)
  747. Debris:AddItem(PRTCL,Lifetime2)
  748. else
  749. PRTCL.Enabled = true
  750. end
  751. return PRTCL
  752. end
  753.  
  754. local Handle = CreatePart(3, Weapon, "Metal", 0, 0, "Brown", "Part", VT(0.2,0.6,0.2),false)
  755. local RightArmGrasp = CreateWeldOrSnapOrMotor("Weld", Handle, RightArm, Handle, CF(0,-1, 0) * ANGLES(RAD(90), RAD(0), RAD(0)), CF(0, 0.21, 0))
  756. local Part = CreatePart(3, Weapon, "Metal", 0, 0, "Brown", "Part", VT(0.2,0.5,0.2),false)
  757. MakeForm(Part,"Wedge")
  758. CreateWeldOrSnapOrMotor("Weld", Handle, Handle, Part, CF(0, -0.3, 0.2) * ANGLES(RAD(0), RAD(180), RAD(0)), CF(0, 0, 0))
  759. local Part = CreatePart(3, Weapon, "Metal", 0, 0, "Brown", "Part", VT(0.2,0.3,0.2),false)
  760. MakeForm(Part,"Wedge")
  761. CreateWeldOrSnapOrMotor("Weld", Handle, Handle, Part, CF(0, -0.4, 0) * ANGLES(RAD(0), RAD(0), RAD(180)), CF(0, 0, 0))
  762. local Part = CreatePart(3, Weapon, "Metal", 0, 0, "Brown", "Part", VT(0.3,0.3,0.3),false)
  763. CreateWeldOrSnapOrMotor("Weld", Handle, Handle, Part, CF(0, -0.5, 0.2) * ANGLES(RAD(0), RAD(0), RAD(0)), CF(0, 0, 0))
  764. local Part = CreatePart(3, Weapon, "Metal", 0, 0, "Brown", "Part", VT(0.3,0.5,0.5),false)
  765. CreateWeldOrSnapOrMotor("Weld", Handle, Handle, Part, CF(0, -0.6, 0.5) * ANGLES(RAD(0), RAD(0), RAD(0)), CF(0, 0, 0))
  766. local Part = CreatePart(3, Weapon, "Metal", 0, 0, "Brown", "Part", VT(0.4,0.4,0.4),false)
  767. MakeForm(Part,"Cyl")
  768. CreateWeldOrSnapOrMotor("Weld", Handle, Handle, Part, CF(0, -0.6, 0.5) * ANGLES(RAD(90), RAD(0), RAD(0)), CF(0, 0, 0))
  769. for i = 1, 8 do
  770. local Piece = CreatePart(3, Weapon, "Metal", 0, 0, "Brown", "Eye", VT(0,0.35,0.41),false)
  771. CreateWeldOrSnapOrMotor("Weld", Handle, Part, Piece, CF(0, 0, 0) * ANGLES(RAD(0), RAD((360/8)*i), RAD(0)), CF(0, 0, 0))
  772. end
  773. local Part = CreatePart(3, Weapon, "Metal", 0, 0, "Brown", "Eye", VT(0.38,0.41,0.38),false)
  774. MakeForm(Part,"Cyl")
  775. CreateWeldOrSnapOrMotor("Weld", Handle, Handle, Part, CF(0, -0.6, 0.5) * ANGLES(RAD(90), RAD(0), RAD(0)), CF(0, 0, 0))
  776. local Part = CreatePart(3, Weapon, "Metal", 0, 0, "Brown", "Part", VT(0.37,0.5,0.37),false)
  777. MakeForm(Part,"Ball")
  778. CreateWeldOrSnapOrMotor("Weld", Handle, Handle, Part, CF(0, -0.6, 0.3) * ANGLES(RAD(90), RAD(0), RAD(0)), CF(0, 0, 0))
  779. local Part = CreatePart(3, Weapon, "Metal", 0, 0, "Brown", "Part", VT(0.2,0.7,0.4),false)
  780. MakeForm(Part,"Wedge")
  781. CreateWeldOrSnapOrMotor("Weld", Handle, Handle, Part, CF(0, -0.7, 0.5) * ANGLES(RAD(90), RAD(180), RAD(180)), CF(0, 0, 0))
  782. local Part = CreatePart(3, Weapon, "Metal", 0, 0, "Brown", "Part", VT(0.3,0.4,0.2),false)
  783. CreateWeldOrSnapOrMotor("Weld", Handle, Handle, Part, CF(0, -0.6, 0.7) * ANGLES(RAD(0), RAD(0), RAD(0)), CF(0, 0, 0))
  784. local Part = CreatePart(3, Weapon, "Metal", 0, 0, "Brown", "Part", VT(0.35,0.35,0.35),false)
  785. MakeForm(Part,"Cyl")
  786. CreateWeldOrSnapOrMotor("Weld", Handle, Handle, Part, CF(0, -0.6, 0.7) * ANGLES(RAD(90), RAD(0), RAD(0)), CF(0, 0, 0))
  787. local Part = CreatePart(3, Weapon, "Metal", 0, 0, "Brown", "Part", VT(0.5,0.1,0.5),false)
  788. MakeForm(Part,"Cyl")
  789. CreateWeldOrSnapOrMotor("Weld", Handle, Handle, Part, CF(0, -0.6, 1) * ANGLES(RAD(90), RAD(0), RAD(0)), CF(0, 0, 0))
  790. local Part = CreatePart(3, Weapon, "Metal", 0, 0, "Brown", "Part", VT(0.5,0.1,0.45),false)
  791. MakeForm(Part,"Cyl")
  792. CreateWeldOrSnapOrMotor("Weld", Handle, Handle, Part, CF(0, -0.6, 1.1) * ANGLES(RAD(90), RAD(0), RAD(0)), CF(0, 0, 0))
  793. local Part = CreatePart(3, Weapon, "Metal", 0, 0, "Brown", "Part", VT(0.2,0.5,0.2),false)
  794. MakeForm(Part,"Wedge")
  795. CreateWeldOrSnapOrMotor("Weld", Handle, Handle, Part, CF(0, -0.55, 0.2) * ANGLES(RAD(-135), RAD(0), RAD(0)), CF(0, -0.3, 0))
  796. local LASTPART = Handle
  797. for i = 1, 10 do
  798. if LASTPART == Handle then
  799. local Part = CreatePart(3, Weapon, "Metal", 0, 0, "Brown", "Part", VT(0.1,0.2,0),false)
  800. LASTPART = Part
  801. CreateWeldOrSnapOrMotor("Weld", Handle, Handle, Part, CF(0, -0.1, 0.2) * ANGLES(RAD(90), RAD(0), RAD(0)), CF(0, 0, 0))
  802. else
  803. local Part = CreatePart(3, Weapon, "Metal", 0, 0, "Brown", "Part", VT(0.1,0.05,0),false)
  804. CreateWeldOrSnapOrMotor("Weld", Handle, LASTPART, Part, CF(0, 0.025, 0) * ANGLES(RAD(8), RAD(0), RAD(0)), CF(0, -0.025, 0))
  805. LASTPART = Part
  806. end
  807. end
  808.  
  809. local Barrel = CreatePart(3, Weapon, "Metal", 0, 0, "Brown", "Part", VT(0.15,2,0.15),false)
  810. MakeForm(Barrel,"Cyl")
  811. CreateWeldOrSnapOrMotor("Weld", Handle, Handle, Barrel, CF(0, -0.6, 1.8) * ANGLES(RAD(90), RAD(0), RAD(0)), CF(0, 0, 0))
  812. local Part = CreatePart(3, Weapon, "Metal", 0, 0, "Brown", "Part", VT(0.25,1,0.25),false)
  813. MakeForm(Part,"Cyl")
  814. CreateWeldOrSnapOrMotor("Weld", Handle, Barrel, Part, CF(0, -0.6, 0), CF(0, 0, 0))
  815. local Part = CreatePart(3, Weapon, "Metal", 0, 0, "Brown", "Part", VT(0,0.1,0.2),false)
  816. MakeForm(Part,"Wedge")
  817. CreateWeldOrSnapOrMotor("Weld", Handle, Barrel, Part, CF(0, 0.945, 0.1) * ANGLES(RAD(180), RAD(0), RAD(0)), CF(0, 0, 0))
  818. local Hole = CreatePart(3, Weapon, "Metal", 0, 0, "Brown", "Eye", VT(0.125,0,0.125),false)
  819. MakeForm(Hole,"Cyl")
  820. CreateWeldOrSnapOrMotor("Weld", Handle, Barrel, Hole, CF(0, 0.98, 0), CF(0, 0, 0))
  821. local Part = CreatePart(3, Weapon, "Metal", 0, 0, "Brown", "Part", VT(0,0,0),false)
  822. local GEARWELD = CreateWeldOrSnapOrMotor("Weld", Handle, Handle, Part, CF(0, -0.6, 0.7), CF(0, 0, 0))
  823. CreateMesh("SpecialMesh", Part, "FileMesh", 156292343, "", VT(0.8,0.8,1.5), VT(0,0,0.2))
  824. local Part = CreatePart(3, Weapon, "Metal", 0, 0.5, "Brown", "Eye", VT(0,0,0),false)
  825. local GEARWELD2 = CreateWeldOrSnapOrMotor("Weld", Handle, Handle, Part, CF(0, -0.6, 0.7), CF(0, 0, 0))
  826. CreateMesh("SpecialMesh", Part, "FileMesh", 156292343, "", VT(0.9,0.9,0.3), VT(0,0,0.2))
  827. coroutine.resume(coroutine.create(function()
  828. while wait() do
  829. GEARWELD.C0 = GEARWELD.C0 * ANGLES(RAD(0), RAD(0), RAD(5))
  830. GEARWELD2.C0 = GEARWELD2.C0 * ANGLES(RAD(0), RAD(0), RAD(-5))
  831. end
  832. end))
  833.  
  834. ParticleEmitter({Speed = 0.2, Drag = 0, Size1 = 0.1, Size2 = 0, Lifetime1 = 0.3, Lifetime2 = 0.5, Parent = Hole, Emit = 100, Offset = 360, Enabled = true, Acel = VT(0,5,0)})
  835. --ParticleEmitter({Speed = 0.5, Drag = 0, Size1 = 0.2, Size2 = 0, Lifetime1 = 0.3, Lifetime2 = 0.7, Parent = Dangle, Emit = 100, Offset = 360, Enabled = true, Acel = VT(0,5,0)})
  836.  
  837. for _, c in pairs(Weapon:GetDescendants()) do
  838. if c.ClassName == "Part" and c.Name ~= "Eye" and c.Parent ~= Effects and c.Parent.Parent ~= Effects then
  839. c.Material = "Glass"
  840. c.Color = C3(0,0,0)
  841. elseif c.ClassName == "Part" and c.Name == "Eye" then
  842. c.Color = C3(1,0,0)
  843. c.Material = "Neon"
  844. end
  845. end
  846.  
  847. Weapon.Parent = Character
  848. for _, c in pairs(Weapon:GetChildren()) do
  849. if c.ClassName == "Part" then
  850. c.CustomPhysicalProperties = PhysicalProperties.new(0, 0, 0, 0, 0)
  851. end
  852. end
  853.  
  854. local CAMTYPE = Cam.CameraType
  855. Cam.CameraType = Enum.CameraType.Scriptable
  856.  
  857. local ATTACKS = {2035463713,2035463980,2035464212,2035464495}
  858.  
  859. local BMUSIC = IT("Sound",RootPart)
  860. local VOLUME = 4.5
  861. local PITCH = 1.15
  862. local SONGID = 904882921
  863. local INTROD = false
  864. local SUN = CreatePart(3, nil, "Neon", 0, 0, BRICKC("Really Red"), "Sun", VT(17,17,17), true)
  865. MakeForm(SUN,"Ball")
  866. local SUNFLOAT = true
  867. local CUSTOMCAM = true
  868.  
  869. --//=================================\\
  870. --|| DAMAGING
  871. --\\=================================//
  872.  
  873. function ApplyAoE(POSITION,RANGE,FLING,KILLME)
  874. for index, CHILD in pairs(workspace:GetDescendants()) do
  875. if CHILD.ClassName == "Model" and CHILD ~= Character then
  876. local HUM = CHILD:FindFirstChildOfClass("Humanoid")
  877. if HUM then
  878. local TORSO = CHILD:FindFirstChild("Torso") or CHILD:FindFirstChild("UpperTorso")
  879. if TORSO and HUM.Health > 0 then
  880. if (TORSO.Position - POSITION).Magnitude <= RANGE then
  881. CHILD:BreakJoints()
  882. local HED = CHILD:FindFirstChild("Head")
  883. if HED and MRANDOM(1,15) == 1 then
  884. CreateSound(527749592, HED, 4, MRANDOM(9,11)/10, false)
  885. end
  886. if FLING > 0 then
  887. for _, c in pairs(CHILD:GetChildren()) do
  888. if c:IsA("BasePart") then
  889. local bv = Instance.new("BodyVelocity")
  890. bv.maxForce = Vector3.new(1e9, 1e9, 1e9)
  891. bv.velocity = CF(POSITION,TORSO.Position).lookVector*FLING
  892. bv.Parent = c
  893. Debris:AddItem(bv,0.05)
  894. end
  895. end
  896. end
  897. end
  898. end
  899. end
  900. end
  901. end
  902. if KILLME == true then
  903. Character:BreakJoints()
  904. for _, c in pairs(Character:GetChildren()) do
  905. if c:IsA("BasePart") then
  906. local bv = Instance.new("BodyVelocity")
  907. bv.maxForce = Vector3.new(1e9, 1e9, 1e9)
  908. bv.velocity = CF(POSITION,c.Position).lookVector*FLING
  909. bv.Parent = c
  910. Debris:AddItem(bv,0.05)
  911. end
  912. end
  913. end
  914. end
  915.  
  916. --//=================================\\
  917. --|| ATTACK FUNCTIONS AND STUFF
  918. --\\=================================//
  919.  
  920. function Intro()
  921. ATTACK = true
  922. Rooted = true
  923. Humanoid.WalkSpeed = 0
  924. Disable_Jump = true
  925. local INTROSOUND = CreateSound(862484466, Effects, 6, 1, false)
  926. coroutine.resume(coroutine.create(function()
  927. repeat
  928. Swait()
  929. if CUSTOMANGLES == true then
  930. Cam.CFrame = Clerp(Cam.CFrame, Head.CFrame * CF(0,0,-4) * ANGLES(RAD(0), RAD(180), RAD(0)), 0.2)
  931. end
  932. RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, -0.1 + 0.05 * COS(SINE / 12)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed)
  933. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(15 - 2.5 * SIN(SINE / 12)), RAD(0), RAD(0)), 1 / Animation_Speed)
  934. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5 + 0.05 * SIN(SINE / 12), 0) * ANGLES(RAD(0), RAD(0), RAD(5)) * RIGHTSHOULDERC0, 1 / Animation_Speed)
  935. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5 + 0.05 * SIN(SINE / 12), 0) * ANGLES(RAD(0), RAD(0), RAD(-5)) * LEFTSHOULDERC0, 1 / Animation_Speed)
  936. RightHip.C0 = Clerp(RightHip.C0, CF(1, -1 - 0.05 * COS(SINE / 12), 0) * ANGLES(RAD(0), RAD(60), RAD(0)) * ANGLES(RAD(-11), RAD(0), RAD(0)), 1 / Animation_Speed)
  937. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1 - 0.05 * COS(SINE / 12), 0) * ANGLES(RAD(0), RAD(-60), RAD(0)) * ANGLES(RAD(-11), RAD(0), RAD(0)), 1 / Animation_Speed)
  938. until INTROSOUND.TimePosition >= 2.15
  939. SUN.Parent = Effects
  940. local CORE = IT("Attachment",SUN)
  941. SUN.Color = C3(1,85/255,0)
  942. SUN.CFrame = RootPart.CFrame*CF(0,-14,11)
  943. local P = ParticleEmitter({Transparency1 = 1, Transparency2 = 1, Speed = 1, Acel = VT(0,0,0), RotSpeed = NumberRange.new(-5, 5), Drag = 0.1, Size1 = 3, Size2 = 5, Lifetime1 = 0.1, Lifetime2 = 0.2, Parent = CORE, Emit = 10, Offset = 180, Enabled = true, Color1 = C3(1,85/255,0), Color2 = C3(1,85/255,0), Texture = 296874871})
  944. P.LockedToPart = true
  945. P.Rate = 12
  946. local P = ParticleEmitter({Transparency1 = 1, Transparency2 = 1, Speed = 1, Acel = VT(0,0,0), RotSpeed = NumberRange.new(-5, 5), Drag = 0.1, Size1 = 3, Size2 = 5, Lifetime1 = 0.1, Lifetime2 = 0.2, Parent = CORE, Emit = 10, Offset = 180, Enabled = true, Color1 = C3(1,85/255,0), Color2 = C3(1,85/255,0), Texture = 296874871})
  947. P.Rate = 12
  948. repeat
  949. Swait()
  950. SUN.CFrame = Clerp(SUN.CFrame,RootPart.CFrame*CF(0,14,11),0.04)
  951. local HITFLOOR,SUNPOS = Raycast(SUN.Position, (CF(RootPart.Position, RootPart.Position + VT(0, -1, 0))).lookVector, 23, Character)
  952. if HITFLOOR then
  953. local DISTANCE = (SUNPOS - SUN.Position).Magnitude
  954. local SIZE = (23 - DISTANCE)*2
  955. end
  956. if CUSTOMANGLES == true then
  957. Cam.CFrame = Clerp(Cam.CFrame, Head.CFrame * CF(0,5,-15) * ANGLES(RAD(5), RAD(180), RAD(0)), 0.2)
  958. end
  959. RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, -0.03 + 0.05 * COS(SINE / 12)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed)
  960. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(-35 - 2.5 * SIN(SINE / 12)), RAD(0), RAD(0)), 1 / Animation_Speed)
  961. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5 + 0.05 * SIN(SINE / 12), 0) * ANGLES(RAD(150), RAD(0), RAD(15)) * RIGHTSHOULDERC0, 1 / Animation_Speed)
  962. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5 + 0.05 * SIN(SINE / 12), 0) * ANGLES(RAD(150), RAD(0), RAD(-15)) * LEFTSHOULDERC0, 1 / Animation_Speed)
  963. RightHip.C0 = Clerp(RightHip.C0, CF(1, -1 - 0.05 * COS(SINE / 12), 0) * ANGLES(RAD(0), RAD(85), RAD(0)) * ANGLES(RAD(-12), RAD(0), RAD(0)), 1 / Animation_Speed)
  964. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1 - 0.05 * COS(SINE / 12), 0) * ANGLES(RAD(0), RAD(-85), RAD(0)) * ANGLES(RAD(-12), RAD(0), RAD(0)), 1 / Animation_Speed)
  965. until ATTACK == false
  966. CUSTOMCAM = false
  967. for i = 1, #ATTACKS do
  968. local SKILLFRAME = CreateFrame(WEAPONGUI, 1, 2, UD2(0.65, 0, 0.95-(0.17*i), 0), UD2(0.26, 0, 0.17, 0), C3(0,0,0), C3(0, 0, 0), "Skill Frame")
  969. local IMAGE = IT("ImageLabel",SKILLFRAME)
  970. IMAGE.Size = UD2(1,0,1,0)
  971. IMAGE.Image = "rbxassetid://"..ATTACKS[i]
  972. IMAGE.BackgroundTransparency = 1
  973. IMAGE.ImageTransparency = 1
  974. for i = 1, 10 do
  975. Swait()
  976. IMAGE.ImageTransparency = IMAGE.ImageTransparency - 1/10
  977. end
  978. end
  979. end))
  980. repeat
  981. Swait()
  982. INTROSOUND.Parent = Effects
  983. until INTROSOUND.Playing == false
  984. INTROSOUND:Destroy()
  985. ATTACK = false
  986. Rooted = false
  987. end
  988. function DeadlyLaser()
  989. CreateSound(811841430, SUN, 8, MRANDOM(7,13)/10, false)
  990. local HIT,POS = CastProperRay(SUN.Position,Mouse.Hit.p,1000,Character)
  991. local BEAM = CreatePart(3, Effects, "Neon", 0, 0, BRICKC("Gold"), "Beam", VT(0,0,0), true)
  992. BEAM.Color = SUN.Color
  993. MakeForm(BEAM,"Cyl")
  994. local DIST = (SUN.Position - POS).Magnitude
  995. BEAM.Size = VT(0,DIST,0)
  996. BEAM.CFrame = CF(SUN.Position,POS)*CF(0,0,-DIST/2) * ANGLES(RAD(90), RAD(0), RAD(0))
  997. if HIT ~= nil then
  998. if HIT.Parent.ClassName == "Model" then
  999. if HIT.Parent:FindFirstChildOfClass("Humanoid") then
  1000. if HIT.Parent:FindFirstChildOfClass("Humanoid").Health > 0 then
  1001. local HED = HIT.Parent:FindFirstChild("Head")
  1002. if HED and MRANDOM(1,15) == 1 then
  1003. CreateSound(527749592, HED, 4, MRANDOM(9,11)/10, false)
  1004. end
  1005. HIT.Parent:BreakJoints()
  1006. end
  1007. end
  1008. end
  1009. end
  1010. for i = 1, 15 do
  1011. Swait()
  1012. BEAM.Size = BEAM.Size + VT(0.25,0,0.25)
  1013. BEAM.Transparency = BEAM.Transparency + 1/15
  1014. end
  1015. BEAM:remove()
  1016. end
  1017. function SolarFlares()
  1018. ATTACK = true
  1019. Rooted = true
  1020. SUNFLOAT = false
  1021. CUSTOMCAM = true
  1022. for i=0, 1, 0.1 / Animation_Speed do
  1023. Swait()
  1024. if CUSTOMANGLES == true then
  1025. Cam.CFrame = Clerp(Cam.CFrame, RootPart.CFrame * ANGLES(RAD(-45), RAD(0), RAD(0))*CF(0,0,65), 0.1)
  1026. end
  1027. SUN.CFrame = Clerp(SUN.CFrame,RootPart.CFrame*CF(0,18 + 4 * SIN(SINE / 12),0),0.035)
  1028. RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, -0.03 + 0.05 * COS(SINE / 12)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed)
  1029. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(-35 - 2.5 * SIN(SINE / 12)), RAD(0), RAD(0)), 1 / Animation_Speed)
  1030. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5 + 0.05 * SIN(SINE / 12), 0) * ANGLES(RAD(150), RAD(0), RAD(15)) * RIGHTSHOULDERC0, 1 / Animation_Speed)
  1031. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5 + 0.05 * SIN(SINE / 12), 0) * ANGLES(RAD(150), RAD(0), RAD(-15)) * LEFTSHOULDERC0, 1 / Animation_Speed)
  1032. RightHip.C0 = Clerp(RightHip.C0, CF(1, -1 - 0.05 * COS(SINE / 12), 0) * ANGLES(RAD(0), RAD(85), RAD(0)) * ANGLES(RAD(-12), RAD(0), RAD(0)), 1 / Animation_Speed)
  1033. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1 - 0.05 * COS(SINE / 12), 0) * ANGLES(RAD(0), RAD(-85), RAD(0)) * ANGLES(RAD(-12), RAD(0), RAD(0)), 1 / Animation_Speed)
  1034. end
  1035. local CFRAME = RootPart.CFrame * ANGLES(RAD(-90), RAD(0), RAD(0))*CF(0,0,125)
  1036. coroutine.resume(coroutine.create(function()
  1037. repeat
  1038. Swait()
  1039. if CUSTOMANGLES == true then
  1040. Cam.CFrame = Clerp(Cam.CFrame, CFRAME, 0.1)
  1041. end
  1042. SUN.CFrame = Clerp(SUN.CFrame,RootPart.CFrame*CF(0,18 + 4 * SIN(SINE / 12),0),0.035)
  1043. RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, -0.03 + 0.05 * COS(SINE / 12)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed)
  1044. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(0 - 2.5 * SIN(SINE / 12)), RAD(0), RAD(0)), 1 / Animation_Speed)
  1045. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.25, 0.45 + 0.05 * SIN(SINE / 12), -0.45) * ANGLES(RAD(90), RAD(0), RAD(-15)) * RIGHTSHOULDERC0, 1 / Animation_Speed)
  1046. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.25, 0.45 + 0.05 * SIN(SINE / 12), -0.45) * ANGLES(RAD(90), RAD(0), RAD(15)) * LEFTSHOULDERC0, 1 / Animation_Speed)
  1047. RightHip.C0 = Clerp(RightHip.C0, CF(1, -1 - 0.05 * COS(SINE / 12), 0) * ANGLES(RAD(0), RAD(85), RAD(0)) * ANGLES(RAD(-12), RAD(0), RAD(0)), 1 / Animation_Speed)
  1048. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1 - 0.05 * COS(SINE / 12), 0) * ANGLES(RAD(0), RAD(-85), RAD(0)) * ANGLES(RAD(-12), RAD(0), RAD(0)), 1 / Animation_Speed)
  1049. until ATTACK == false
  1050. end))
  1051. AttackGyro()
  1052. wait(0.2)
  1053. for i = 1, 15 do
  1054. Swait()
  1055. coroutine.resume(coroutine.create(function()
  1056. local SPEED = MRANDOM(5,32)/10
  1057. local FLARE = CreatePart(3, Effects, "Neon", 0, 0, SUN.BrickColor, "Sun", VT(5,5,5), true)
  1058. FLARE.Color = C3(1,85/255,0)
  1059. MakeForm(FLARE,"Ball")
  1060. CreateSound(463598785, FLARE, 1.2, MRANDOM(7,13)/8, false)
  1061. FLARE.CFrame = CF(SUN.Position,Mouse.Hit.p) * ANGLES(RAD(MRANDOM(-5,5)*2), RAD(MRANDOM(-5,5)*2), RAD(0))
  1062. local P = ParticleEmitter({Transparency1 = 1, Transparency2 = 1, Speed = 1, Acel = VT(0,0,0), RotSpeed = NumberRange.new(-5, 5), Drag = 0.1, Size1 = 3, Size2 = 5, Lifetime1 = 0.1, Lifetime2 = 0.2, Parent = CORE, Emit = 10, Offset = 180, Enabled = true, Color1 = C3(1,85/255,0), Color2 = C3(1,85/255,0), Texture = 296874871})
  1063. for i = 1, 500 do
  1064. Swait()
  1065. P.Enabled = true
  1066. local HIT,HITPOS = Raycast(FLARE.Position, FLARE.CFrame.lookVector, FLARE.Size.Z/2, Character)
  1067. if HIT then
  1068. break
  1069. else
  1070. FLARE.CFrame = FLARE.CFrame*CF(0,0,-SPEED)
  1071. if MRANDOM(1,3) == 1 then
  1072. WACKYEFFECT({Time = 25, EffectType = "Round Slash", Size = VT(0,0,0), Size2 = VT(0.025,0,0.025), Transparency = 0.85, Transparency2 = 1, CFrame = FLARE.CFrame*CF(0,0,-FLARE.Size.X/1.5) * ANGLES(RAD(90), RAD(MRANDOM(0,360)), RAD(0)) * ANGLES(RAD(MRANDOM(-15,15)), RAD(MRANDOM(0,360)), RAD(0)), MoveToPos = nil, RotationX = 0.1, RotationY = 0, RotationZ = 0, Material = "Neon", Color = C3(1,1,1), SoundID = nil, SoundPitch = MRANDOM(9,11)/10, SoundVolume = MRANDOM(9,11)/2, UseBoomerangMath = true, Boomerang = 0, SizeBoomerang = 45})
  1073. end
  1074. end
  1075. end
  1076. CreateSound(165970126, FLARE, 0.8, MRANDOM(7,13)/8, false)
  1077. CreateSound(174580476, FLARE, 1.6, MRANDOM(7,13)/10, false)
  1078. P.Enabled = false
  1079. ApplyAoE(FLARE.Position,14,125)
  1080. Debris:AddItem(FLARE,5)
  1081. FLARE.Transparency = 1
  1082. WACKYEFFECT({EffectType = "Sphere", Size = FLARE.Size, Size2 = VT(25,25,25), Transparency = 0, Transparency2 = 1, CFrame = CF(FLARE.Position), MoveToPos = nil, RotationX = 0, RotationY = 0, RotationZ = 0, Material = "Neon", Color = FLARE.Color, SoundID = nil, SoundPitch = nil, SoundVolume = nil, UseBoomerangMath = false, Boomerang = 0, SizeBoomerang = 0})
  1083. ParticleEmitter({Transparency1 = 1, Transparency2 = 1, Speed = 1, Acel = VT(0,0,0), RotSpeed = NumberRange.new(-5, 5), Drag = 0.1, Size1 = 3, Size2 = 5, Lifetime1 = 0.1, Lifetime2 = 0.2, Parent = CORE, Emit = 10, Offset = 180, Enabled = true, Color1 = C3(1,85/255,0), Color2 = C3(1,85/255,0), Texture = 296874871})
  1084. end))
  1085. end
  1086. wait(0.1)
  1087. CUSTOMCAM = false
  1088. SUNFLOAT = true
  1089. ATTACK = false
  1090. Rooted = false
  1091. end
  1092. function SolarSmash()
  1093. local HITFLOOR = Raycast(RootPart.Position, (CF(RootPart.Position, RootPart.Position + VT(0, -1, 0))).lookVector, 4, Character)
  1094. if HITFLOOR then
  1095. ATTACK = true
  1096. Rooted = false
  1097. CUSTOMCAM = true
  1098. SUNFLOAT = false
  1099. for i=0, 0.2, 0.1 / Animation_Speed do
  1100. Swait()
  1101. if CUSTOMANGLES == true then
  1102. Cam.CFrame = Clerp(Cam.CFrame, RootPart.CFrame * ANGLES(RAD(-45), RAD(0), RAD(0))*CF(0,0,65), 0.1)
  1103. end
  1104. SUN.CFrame = Clerp(SUN.CFrame,RootPart.CFrame*CF(0,18 + 4 * SIN(SINE / 12),6),0.035)
  1105. RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, -0.03 + 0.05 * COS(SINE / 12)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed)
  1106. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(-35 - 2.5 * SIN(SINE / 12)), RAD(0), RAD(0)), 1 / Animation_Speed)
  1107. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5 + 0.05 * SIN(SINE / 12), 0) * ANGLES(RAD(150), RAD(0), RAD(15)) * RIGHTSHOULDERC0, 1 / Animation_Speed)
  1108. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5 + 0.05 * SIN(SINE / 12), 0) * ANGLES(RAD(150), RAD(0), RAD(-15)) * LEFTSHOULDERC0, 1 / Animation_Speed)
  1109. RightHip.C0 = Clerp(RightHip.C0, CF(1, -1 - 0.05 * COS(SINE / 12), 0) * ANGLES(RAD(0), RAD(85), RAD(0)) * ANGLES(RAD(-12), RAD(0), RAD(0)), 1 / Animation_Speed)
  1110. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1 - 0.05 * COS(SINE / 12), 0) * ANGLES(RAD(0), RAD(-85), RAD(0)) * ANGLES(RAD(-12), RAD(0), RAD(0)), 1 / Animation_Speed)
  1111. end
  1112. coroutine.resume(coroutine.create(function()
  1113. repeat
  1114. Swait()
  1115. if CUSTOMANGLES == true then
  1116. Cam.CFrame = Clerp(Cam.CFrame, RootPart.CFrame * ANGLES(RAD(-75), RAD(0), RAD(0))*CF(0,6,65), 0.1)
  1117. end
  1118. RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, -0.03 + 0.05 * COS(SINE / 12)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed)
  1119. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(0 - 2.5 * SIN(SINE / 12)), RAD(0), RAD(0)), 1 / Animation_Speed)
  1120. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.25, 0.45 + 0.05 * SIN(SINE / 12), -0.45) * ANGLES(RAD(35), RAD(0), RAD(-15)) * RIGHTSHOULDERC0, 1 / Animation_Speed)
  1121. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.25, 0.45 + 0.05 * SIN(SINE / 12), -0.45) * ANGLES(RAD(35), RAD(0), RAD(15)) * LEFTSHOULDERC0, 1 / Animation_Speed)
  1122. RightHip.C0 = Clerp(RightHip.C0, CF(1, -1 - 0.05 * COS(SINE / 12), 0) * ANGLES(RAD(0), RAD(85), RAD(0)) * ANGLES(RAD(-12), RAD(0), RAD(0)), 1 / Animation_Speed)
  1123. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1 - 0.05 * COS(SINE / 12), 0) * ANGLES(RAD(0), RAD(-85), RAD(0)) * ANGLES(RAD(-12), RAD(0), RAD(0)), 1 / Animation_Speed)
  1124. until ATTACK == false
  1125. end))
  1126. local CFRAME = RootPart.CFrame*CF(0,-2,-17)
  1127. for i = 1, 10 do
  1128. Swait()
  1129. SUN.CFrame = Clerp(SUN.CFrame,CFRAME, 0.25)
  1130. end
  1131. ApplyAoE(SUN.Position,65,225)
  1132. ParticleEmitter({Transparency1 = 1, Transparency2 = 1, Speed = 1, Acel = VT(0,0,0), RotSpeed = NumberRange.new(-5, 5), Drag = 0.1, Size1 = 3, Size2 = 5, Lifetime1 = 0.1, Lifetime2 = 0.2, Parent = CORE, Emit = 10, Offset = 180, Enabled = true, Color1 = C3(1,85/255,0), Color2 = C3(1,85/255,0), Texture = 296874871})
  1133. for i = 1, 8 do
  1134. WACKYEFFECT({Time = 30+(i*25), EffectType = "Wave", Size = VT(15,0,15), Size2 = VT(120,0,120), Transparency = 0.6, Transparency2 = 1, CFrame = CF(SUN.Position-VT(0,5,0)) * ANGLES(RAD(0), RAD(MRANDOM(0,360)), RAD(0)) * ANGLES(RAD(MRANDOM(-15,15)), RAD(MRANDOM(0,360)), RAD(0)), MoveToPos = nil, RotationX = 0.1, RotationY = 0, RotationZ = 0, Material = "Neon", Color = SUN.Color, SoundID = nil, SoundPitch = MRANDOM(9,11)/10, SoundVolume = MRANDOM(9,11)/2, UseBoomerangMath = true, Boomerang = 0, SizeBoomerang = 22})
  1135. end
  1136. for i = 1, 5 do
  1137. WACKYEFFECT({Time = 50+(i*25), EffectType = "Round Slash", Size = VT(0,0,0), Size2 = VT(1.5,0,1.5), Transparency = 0, Transparency2 = 1, CFrame = CF(SUN.Position-VT(0,5,0)) * ANGLES(RAD(0), RAD(MRANDOM(0,360)), RAD(0)) * ANGLES(RAD(MRANDOM(-15,15)), RAD(MRANDOM(0,360)), RAD(0)), MoveToPos = nil, RotationX = 0.1, RotationY = 0, RotationZ = 0, Material = "Neon", Color = C3(1,1,1), SoundID = nil, SoundPitch = MRANDOM(9,11)/10, SoundVolume = MRANDOM(9,11)/2, UseBoomerangMath = true, Boomerang = 0, SizeBoomerang = 3})
  1138. end
  1139. WACKYEFFECT({Time = 75, EffectType = "Sphere", Size = SUN.Size, Size2 = SUN.Size*6, Transparency = 0, Transparency2 = 1, CFrame = CF(SUN.Position), MoveToPos = nil, RotationX = 0, RotationY = 0, RotationZ = 0, Material = "Neon", Color = SUN.Color, SoundID = 168513088, SoundPitch = 1, SoundVolume = 5, UseBoomerangMath = true, Boomerang = 0, SizeBoomerang = 3})
  1140. WACKYEFFECT({Time = 65, EffectType = "Sphere", Size = SUN.Size, Size2 = SUN.Size*5.5, Transparency = 0, Transparency2 = 1, CFrame = CF(SUN.Position), MoveToPos = nil, RotationX = 0, RotationY = 0, RotationZ = 0, Material = "Neon", Color = SUN.Color, SoundID = 201858144, SoundPitch = 1, SoundVolume = 3, UseBoomerangMath = false, Boomerang = 0, SizeBoomerang = 0})
  1141. local bv = Instance.new("BodyVelocity")
  1142. bv.maxForce = Vector3.new(1e9, 1e9, 1e9)
  1143. bv.velocity = CF(CFRAME.p-VT(0,12,0),RootPart.Position).lookVector*125
  1144. bv.Parent = RootPart
  1145. Debris:AddItem(bv,0.02)
  1146. CUSTOMCAM = false
  1147. for i = 1, 5 do
  1148. Swait()
  1149. SUN.CFrame = Clerp(SUN.CFrame,CFRAME, 0.1)
  1150. end
  1151. SUNFLOAT = true
  1152. ATTACK = false
  1153. Rooted = false
  1154. end
  1155. end
  1156. function SolarEruption()
  1157. ATTACK = true
  1158. Rooted = true
  1159. CUSTOMCAM = true
  1160. local ANIMA = "HoldUp"
  1161. coroutine.resume(coroutine.create(function()
  1162. repeat
  1163. Swait()
  1164. if ANIMA == "HoldUp" then
  1165. if CUSTOMANGLES == true then
  1166. Cam.CFrame = Clerp(Cam.CFrame, RootPart.CFrame * ANGLES(RAD(-45), RAD(0), RAD(0))*CF(0,0,65), 0.1)
  1167. end
  1168. SUN.CFrame = Clerp(SUN.CFrame,RootPart.CFrame*CF(0,28 + 4 * SIN(SINE / 12),6),0.035)
  1169. RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, -0.03 + 0.05 * COS(SINE / 12)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed)
  1170. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(-15 - 2.5 * SIN(SINE / 12)), RAD(0), RAD(0)), 1 / Animation_Speed)
  1171. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1, 0.85 + 0.05 * SIN(SINE / 12), 0) * ANGLES(RAD(160 + 3 * SIN(SINE / 12)), RAD(5), RAD(-15 + 3 * COS(SINE / 12))) * RIGHTSHOULDERC0, 1 / Animation_Speed)
  1172. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-0.75, 0.35 + 0.05 * SIN(SINE / 12), -0.6) * ANGLES(RAD(0), RAD(0), RAD(92)) * ANGLES(RAD(0), RAD(0), RAD(0)) * LEFTSHOULDERC0, 1 / Animation_Speed)
  1173. RightHip.C0 = Clerp(RightHip.C0, CF(1, -1 - 0.05 * COS(SINE / 12), 0) * ANGLES(RAD(0), RAD(70), RAD(0)) * ANGLES(RAD(-11), RAD(0), RAD(0)), 1 / Animation_Speed)
  1174. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1 - 0.05 * COS(SINE / 12), 0) * ANGLES(RAD(0), RAD(-70), RAD(0)) * ANGLES(RAD(-11), RAD(0), RAD(0)), 1 / Animation_Speed)
  1175. elseif ANIMA == "Fire" then
  1176. if CUSTOMANGLES == true then
  1177. Cam.CFrame = Clerp(Cam.CFrame, RootPart.CFrame * CF(0,135,0) * ANGLES(RAD(-90), RAD(0), RAD(0)), 0.2)
  1178. end
  1179. SUN.CFrame = Clerp(SUN.CFrame,RootPart.CFrame*CF(0,35,0),0.2)
  1180. RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, -0.03 + 0.05 * COS(SINE / 12)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed)
  1181. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(-25 - 2.5 * SIN(SINE / 12)), RAD(0), RAD(0)), 1 / Animation_Speed)
  1182. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.25, 0.65 + 0.05 * SIN(SINE / 12), 0) * ANGLES(RAD(170), RAD(5), RAD(15)) * RIGHTSHOULDERC0, 1 / Animation_Speed)
  1183. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.25, 0.65 + 0.05 * SIN(SINE / 12), 0) * ANGLES(RAD(170), RAD(-5), RAD(-15)) * LEFTSHOULDERC0, 1 / Animation_Speed)
  1184. RightHip.C0 = Clerp(RightHip.C0, CF(1, -1 - 0.05 * COS(SINE / 12), 0) * ANGLES(RAD(-25), RAD(85), RAD(0)) * ANGLES(RAD(-12), RAD(0), RAD(0)), 1 / Animation_Speed)
  1185. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1 - 0.05 * COS(SINE / 12), 0) * ANGLES(RAD(-25), RAD(-85), RAD(0)) * ANGLES(RAD(-12), RAD(0), RAD(0)), 1 / Animation_Speed)
  1186. end
  1187. until ATTACK == false
  1188. end))
  1189. CreateSound(201858045, SUN, 1.8, MRANDOM(7,13)/10, false)
  1190. CreateSound(278641993, SUN, 3, MRANDOM(7,13)/10, false)
  1191. CreateSound(278641993, SUN, 2.5, MRANDOM(7,13)/10, false)
  1192. for i = 1, 150 do
  1193. Swait()
  1194. WACKYEFFECT({Time = 15, EffectType = "Wave", Size = VT(85,0,85), Size2 = VT(0,0,0), Transparency = 1, Transparency2 = 0.8, CFrame = CF(SUN.Position)*ANGLES(RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360))), MoveToPos = nil, RotationX = 0, RotationY = 0, RotationZ = 0, Material = "Neon", Color = SUN.Color, SoundID = nil, SoundPitch = nil, SoundVolume = nil, UseBoomerangMath = false, Boomerang = 0, SizeBoomerang = 0})
  1195. WACKYEFFECT({Time = 15, EffectType = "Sphere", Size = VT(45,45,45), Size2 = VT(0,0,0), Transparency = 0.95, Transparency2 = 1, CFrame = CF(SUN.Position), MoveToPos = nil, RotationX = 0, RotationY = 0, RotationZ = 0, Material = "Neon", Color = SUN.Color, SoundID = nil, SoundPitch = nil, SoundVolume = nil, UseBoomerangMath = false, Boomerang = 0, SizeBoomerang = 0})
  1196. end
  1197. wait(0.1)
  1198. UNANCHOR = false
  1199. ANIMA = "Fire"
  1200. wait(0.4)
  1201. ApplyAoE(SUN.Position,25,75)
  1202. WACKYEFFECT({Time = 45, EffectType = "Sphere", Size = SUN.Size, Size2 = SUN.Size*4, Transparency = 0, Transparency2 = 1, CFrame = CF(SUN.Position), MoveToPos = nil, RotationX = 0, RotationY = 0, RotationZ = 0, Material = "Neon", Color = SUN.Color, SoundID = nil, SoundPitch = 1, SoundVolume = 5, UseBoomerangMath = true, Boomerang = 0, SizeBoomerang = 3})
  1203. WACKYEFFECT({Time = 35, EffectType = "Sphere", Size = SUN.Size, Size2 = SUN.Size*3.5, Transparency = 0, Transparency2 = 1, CFrame = CF(SUN.Position), MoveToPos = nil, RotationX = 0, RotationY = 0, RotationZ = 0, Material = "Neon", Color = SUN.Color, SoundID = 401056199, SoundPitch = 1, SoundVolume = 7, UseBoomerangMath = false, Boomerang = 0, SizeBoomerang = 0})
  1204. coroutine.resume(coroutine.create(function()
  1205. for i = 1, 32 do
  1206. Swait()
  1207. coroutine.resume(coroutine.create(function()
  1208. local FLARE = CreatePart(3, Effects, "Neon", 0, 0, SUN.BrickColor, "Sun", VT(5,5,5), false)
  1209. FLARE.CanCollide = true
  1210. FLARE.Color = C3(1,85/255,0)
  1211. MakeForm(FLARE,"Ball")
  1212. Debris:AddItem(FLARE,10)
  1213. CreateSound(463598785, FLARE, 1.2, MRANDOM(7,13)/8, false)
  1214. local P = ParticleEmitter({Transparency1 = 1, Transparency2 = 1, Speed = 1, Acel = VT(0,0,0), RotSpeed = NumberRange.new(-5, 5), Drag = 0.1, Size1 = 3, Size2 = 5, Lifetime1 = 0.1, Lifetime2 = 0.2, Parent = CORE, Emit = 10, Offset = 180, Enabled = true, Color1 = C3(1,85/255,0), Color2 = C3(1,85/255,0), Texture = 296874871})
  1215. FLARE.CFrame = CF(SUN.Position)*ANGLES(RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)))
  1216. FLARE.Velocity = CF(SUN.Position,CF(SUN.Position)*ANGLES(RAD(0),RAD(MRANDOM(0,360)),RAD(0))*CF(MRANDOM(-60,60),25,MRANDOM(-60,60)).p).lookVector*MRANDOM(25,250)
  1217. TOUCH = FLARE.Touched:Connect(function(TOC)
  1218. if TOC.Parent ~= Character and TOC.Parent.Parent ~= Character then
  1219. FLARE.Anchored = true
  1220. FLARE:ClearAllChildren()
  1221. CreateSound(165970126, FLARE, 0.8, MRANDOM(7,13)/8, false)
  1222. CreateSound(174580476, FLARE, 1.6, MRANDOM(7,13)/10, false)
  1223. FLARE.CanCollide = false
  1224. ApplyAoE(FLARE.Position,14,125)
  1225. FLARE.Transparency = 1
  1226. WACKYEFFECT({EffectType = "Sphere", Size = FLARE.Size, Size2 = VT(25,25,25), Transparency = 0, Transparency2 = 1, CFrame = CF(FLARE.Position), MoveToPos = nil, RotationX = 0, RotationY = 0, RotationZ = 0, Material = "Neon", Color = FLARE.Color, SoundID = nil, SoundPitch = nil, SoundVolume = nil, UseBoomerangMath = false, Boomerang = 0, SizeBoomerang = 0})
  1227. ParticleEmitter({Transparency1 = 1, Transparency2 = 1, Speed = 1, Acel = VT(0,0,0), RotSpeed = NumberRange.new(-5, 5), Drag = 0.1, Size1 = 3, Size2 = 5, Lifetime1 = 0.1, Lifetime2 = 0.2, Parent = CORE, Emit = 10, Offset = 180, Enabled = true, Color1 = C3(1,85/255,0), Color2 = C3(1,85/255,0), Texture = 296874871})
  1228. TOUCH:Disconnect()
  1229. end
  1230. end)
  1231. end))
  1232. end
  1233. end))
  1234. wait(1.5)
  1235. UNANCHOR = true
  1236. CUSTOMCAM = false
  1237. ATTACK = false
  1238. Rooted = false
  1239. end
  1240. function Nebula()
  1241. ATTACK = true
  1242. Rooted = false
  1243. CUSTOMCAM = true
  1244. local DEAD = false
  1245. coroutine.resume(coroutine.create(function()
  1246. while true do
  1247. Swait()
  1248. if DEAD == false then
  1249. if CUSTOMANGLES == true then
  1250. Cam.CFrame = Clerp(Cam.CFrame, RootPart.CFrame * CF(0,435,0) * ANGLES(RAD(-90), RAD(0), RAD(0)), 0.01)
  1251. end
  1252. SUN.CFrame = Clerp(SUN.CFrame,RootPart.CFrame*CF(0,35,0),0.2)
  1253. end
  1254. RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 1 + 0.05 * COS(SINE / 12)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed)
  1255. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(0 - 2.5 * SIN(SINE / 12)), RAD(0), RAD(0)), 1 / Animation_Speed)
  1256. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1, 0.85 + 0.05 * SIN(SINE / 12), 0) * ANGLES(RAD(160), RAD(5), RAD(-15)) * ANGLES(RAD(5), RAD(0), RAD(0)) * RIGHTSHOULDERC0, 1 / Animation_Speed)
  1257. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-0.75, 0.35 + 0.05 * SIN(SINE / 12), -0.6) * ANGLES(RAD(0), RAD(0), RAD(92)) * ANGLES(RAD(0), RAD(0), RAD(0)) * LEFTSHOULDERC0, 1 / Animation_Speed)
  1258. RightHip.C0 = Clerp(RightHip.C0, CF(1, -1 - 0.05 * COS(SINE / 12), 0) * ANGLES(RAD(0), RAD(85), RAD(0)) * ANGLES(RAD(-12), RAD(0), RAD(0)), 1 / Animation_Speed)
  1259. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1 - 0.05 * COS(SINE / 12), 0) * ANGLES(RAD(0), RAD(-85), RAD(0)) * ANGLES(RAD(-12), RAD(0), RAD(0)), 1 / Animation_Speed)
  1260. end
  1261. end))
  1262. wait(1)
  1263. CreateSound(201858045, SUN, 1.8, MRANDOM(7,13)/10, false)
  1264. CreateSound(278641993, SUN, 3, MRANDOM(7,13)/10, false)
  1265. CreateSound(278641993, SUN, 2.5, MRANDOM(7,13)/10, false)
  1266. for i = 1, 250 do
  1267. Swait()
  1268. WACKYEFFECT({Time = 15, EffectType = "Wave", Size = VT(2,0,2), Size2 = VT(32,2.5,32), Transparency = 0.75, Transparency2 = 1, CFrame = CF(RootPart.CFrame*CF(0,-4,0).p) * ANGLES(RAD(0), RAD(MRANDOM(0,360)), RAD(0)), MoveToPos = nil, RotationX = 1, RotationY = 0, RotationZ = 0, Material = "Neon", Color = C3(1,1,1), SoundID = nil, SoundPitch = MRANDOM(9,11)/10, SoundVolume = MRANDOM(9,11)/2, UseBoomerangMath = true, Boomerang = 0, SizeBoomerang = 22})
  1269. WACKYEFFECT({Time = 15, EffectType = "Wave", Size = VT(85,0,85), Size2 = VT(0,0,0), Transparency = 1, Transparency2 = 0.8, CFrame = CF(SUN.Position)*ANGLES(RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360))), MoveToPos = nil, RotationX = 0, RotationY = 0, RotationZ = 0, Material = "Neon", Color = SUN.Color, SoundID = nil, SoundPitch = nil, SoundVolume = nil, UseBoomerangMath = false, Boomerang = 0, SizeBoomerang = 0})
  1270. WACKYEFFECT({Time = 15, EffectType = "Sphere", Size = VT(45,45,45), Size2 = VT(0,0,0), Transparency = 0.95, Transparency2 = 1, CFrame = CF(SUN.Position), MoveToPos = nil, RotationX = 0, RotationY = 0, RotationZ = 0, Material = "Neon", Color = SUN.Color, SoundID = nil, SoundPitch = nil, SoundVolume = nil, UseBoomerangMath = false, Boomerang = 0, SizeBoomerang = 0})
  1271. end
  1272. wait(1)
  1273. for i = 1, 3 do
  1274. wait(0.65)
  1275. WACKYEFFECT({Time = 35, EffectType = "Sphere", Size = SUN.Size, Size2 = VT(250,250,250), Transparency = 0.5, Transparency2 = 1, CFrame = CF(SUN.Position), MoveToPos = nil, RotationX = 0, RotationY = 0, RotationZ = 0, Material = "Neon", Color = SUN.Color, SoundID = 852135845, SoundPitch = 1-(i/10), SoundVolume = 5, UseBoomerangMath = false, Boomerang = 0, SizeBoomerang = 0})
  1276. end
  1277. wait(0.65)
  1278. ApplyAoE(SUN.Position,9999999999999999,125,true)
  1279. SUN:ClearAllChildren()
  1280. SUN.Transparency = 1
  1281. CreateSound(385545047, Effects, 2.5, 1.4, false)
  1282. CreateSound(385545047, Effects, 2.5, 1, false)
  1283. CreateSound(435742675, Effects, 2.5, 1.5, false)
  1284. CreateSound(231917744, Effects, 2.5, 1.5, false)
  1285. CreateSound(401056199, Effects, 2.5, 1, false)
  1286. ParticleEmitter({Transparency1 = 1, Transparency2 = 1, Speed = 25, Acel = VT(0,0,0), RotSpeed = NumberRange.new(5, 5), Drag = -1, Size1 = 5, Size2 = 6, Lifetime1 = 0.1, Lifetime2 = 1, Parent = SUN, Emit = 20, Offset = 180, Enabled = false, Color1 = C3(1,85/255,0), Color2 = BRICKC"Royal purple".Color, Texture = 296874871})
  1287. for i = 1, 3 do
  1288. WACKYEFFECT({Time = 175, EffectType = "Sphere", Size = SUN.Size, Size2 = VT(250,250,250)+(VT(i,i,i)*180), Transparency = 0.5, Transparency2 = 1, CFrame = CF(SUN.Position), MoveToPos = nil, RotationX = 0, RotationY = 0, RotationZ = 0, Material = "Neon", Color = BRICKC"Royal purple".Color, SoundID = nil, SoundPitch = 1-(i/10), SoundVolume = 5, UseBoomerangMath = false, Boomerang = 0, SizeBoomerang = 0})
  1289. end
  1290. for i = 1, 15 do
  1291. WACKYEFFECT({Time = 100+(i*35), EffectType = "Wave", Size = VT(15,0,15), Size2 = VT(120,5,120)+(VT(i,0,i)*70), Transparency = 0.6, Transparency2 = 1, CFrame = CF(SUN.Position) * ANGLES(RAD(0), RAD(MRANDOM(0,360)), RAD(0)) * ANGLES(RAD(MRANDOM(-15,15)), RAD(MRANDOM(0,360)), RAD(0)), MoveToPos = nil, RotationX = 1, RotationY = 0, RotationZ = 0, Material = "Neon", Color = BRICKC"Pink".Color, SoundID = nil, SoundPitch = MRANDOM(9,11)/10, SoundVolume = MRANDOM(9,11)/2, UseBoomerangMath = true, Boomerang = 0, SizeBoomerang = 22})
  1292. end
  1293. DEAD = true
  1294. Cam.CameraType = CAMTYPE
  1295. Cam.CameraSubject = Humanoid
  1296. INTROD = false
  1297. end
  1298. function Taunt()
  1299. ATTACK = true
  1300. Rooted = true
  1301. CUSTOMCAM = true
  1302. CreateSound(160212768, Head, 10, 1, false)
  1303. for i=0, 3, 0.1 / Animation_Speed do
  1304. Swait()
  1305. if CUSTOMANGLES == true then
  1306. Cam.CFrame = Clerp(Cam.CFrame, RootPart.CFrame * CF(7,1.5,6) * ANGLES(RAD(-4), RAD(15), RAD(0)), 0.2)
  1307. end
  1308. RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, -0.03 + 0.05 * COS(SINE / 12)) * ANGLES(RAD(0), RAD(0), RAD(-35)), 1 / Animation_Speed)
  1309. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(15 - 2.5 * SIN(SINE / 12)), RAD(0), RAD(35)), 1 / Animation_Speed)
  1310. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(0.75, 0.5 + 0.05 * SIN(SINE / 12), -0.7) * ANGLES(RAD(0), RAD(0), RAD(-95)) * ANGLES(RAD(5), RAD(0), RAD(0)) * RIGHTSHOULDERC0, 1 / Animation_Speed)
  1311. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.3, 0.5 + 0.05 * SIN(SINE / 12), -0.3) * ANGLES(RAD(90), RAD(0), RAD(-35)) * LEFTSHOULDERC0, 1 / Animation_Speed)
  1312. RightHip.C0 = Clerp(RightHip.C0, CF(1, -1 - 0.05 * COS(SINE / 12), 0) * ANGLES(RAD(0), RAD(95), RAD(0)) * ANGLES(RAD(-15), RAD(0), RAD(0)), 1 / Animation_Speed)
  1313. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1 - 0.05 * COS(SINE / 12), 0) * ANGLES(RAD(0), RAD(-55), RAD(0)) * ANGLES(RAD(-12), RAD(0), RAD(0)), 1 / Animation_Speed)
  1314. end
  1315. CUSTOMCAM = false
  1316. ATTACK = false
  1317. Rooted = false
  1318. end
  1319.  
  1320. --//=================================\\
  1321. --|| ASSIGN THINGS TO KEYS
  1322. --\\=================================//
  1323.  
  1324. function MouseDown(Mouse)
  1325. if ATTACK == false then
  1326. DeadlyLaser()
  1327. end
  1328. end
  1329.  
  1330. function MouseUp(Mouse)
  1331. HOLD = false
  1332. end
  1333.  
  1334. function KeyDown(Key)
  1335. KEYHOLD = true
  1336. if Key == "z" and ATTACK == false then
  1337. SolarFlares()
  1338. end
  1339.  
  1340. if Key == "c" and ATTACK == false then
  1341. SolarSmash()
  1342. end
  1343.  
  1344. if Key == "v" and ATTACK == false then
  1345. SolarEruption()
  1346. end
  1347.  
  1348. if Key == "x" and ATTACK == false then
  1349. Nebula()
  1350. end
  1351.  
  1352. if Key == "t" and ATTACK == false then
  1353. Taunt()
  1354. end
  1355.  
  1356. if Key == "q" and ATTACK == false then
  1357. if CUSTOMANGLES == true then
  1358. CUSTOMANGLES = false
  1359. Cam.CameraSubject = Humanoid
  1360. else
  1361. CUSTOMANGLES = true
  1362. end
  1363. end
  1364. end
  1365.  
  1366. function KeyUp(Key)
  1367. KEYHOLD = false
  1368. end
  1369.  
  1370. Mouse.Button1Down:connect(function(NEWKEY)
  1371. MouseDown(NEWKEY)
  1372. end)
  1373. Mouse.Button1Up:connect(function(NEWKEY)
  1374. MouseUp(NEWKEY)
  1375. end)
  1376. Mouse.KeyDown:connect(function(NEWKEY)
  1377. KeyDown(NEWKEY)
  1378. end)
  1379. Mouse.KeyUp:connect(function(NEWKEY)
  1380. KeyUp(NEWKEY)
  1381. end)
  1382.  
  1383. --//=================================\\
  1384. --\\=================================//
  1385.  
  1386. function unanchor()
  1387. for _, c in pairs(Character:GetChildren()) do
  1388. if c:IsA("BasePart") and c ~= RootPart then
  1389. c.Anchored = false
  1390. end
  1391. end
  1392. if UNANCHOR == true then
  1393. RootPart.Anchored = false
  1394. else
  1395. RootPart.Anchored = true
  1396. end
  1397. end
  1398.  
  1399. --//=================================\\
  1400. --|| WRAP THE WHOLE SCRIPT UP
  1401. --\\=================================//
  1402.  
  1403. Humanoid.Changed:connect(function(Jump)
  1404. if Jump == "Jump" and (Disable_Jump == true) then
  1405. Humanoid.Jump = false
  1406. end
  1407. end)
  1408.  
  1409. while true do
  1410. Swait()
  1411. script.Parent = WEAPONGUI
  1412. ANIMATE.Parent = nil
  1413. for _,v in next, Humanoid:GetPlayingAnimationTracks() do
  1414. v:Stop();
  1415. end
  1416. SINE = SINE + CHANGE
  1417. local TORSOVELOCITY = (RootPart.Velocity * VT(1, 0, 1)).magnitude
  1418. local TORSOVERTICALVELOCITY = RootPart.Velocity.y
  1419. local HITFLOOR = Raycast(RootPart.Position, (CF(RootPart.Position, RootPart.Position + VT(0, -1, 0))).lookVector, 4, Character)
  1420. local WALKSPEEDVALUE = 8 / (Humanoid.WalkSpeed / 16)
  1421. if ANIM == "Walk" and TORSOVELOCITY > 1 then
  1422. RootJoint.C1 = Clerp(RootJoint.C1, ROOTC0 * CF(0, 0, 0.1 * COS(SINE / (WALKSPEEDVALUE/2))) * ANGLES(RAD(0), RAD(0), RAD(0)), 2 * (Humanoid.WalkSpeed / 16) / Animation_Speed)
  1423. Neck.C1 = Clerp(Neck.C1, CF(0, -0.5, 0) * ANGLES(RAD(-90), RAD(0), RAD(180)) * ANGLES(RAD(0), RAD(0), RAD(0) - Head.RotVelocity.Y / 30), 0.2 * (Humanoid.WalkSpeed / 16) / Animation_Speed)
  1424. RightHip.C1 = Clerp(RightHip.C1, CF(0.5, 0.875 - 0.125 * SIN(SINE / WALKSPEEDVALUE) - 0.15 * COS(SINE / WALKSPEEDVALUE*2), 0.25 * SIN(SINE / WALKSPEEDVALUE)) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(10+50 * COS(SINE / WALKSPEEDVALUE))), 0.6 / Animation_Speed)
  1425. LeftHip.C1 = Clerp(LeftHip.C1, CF(-0.5, 0.875 + 0.125 * SIN(SINE / WALKSPEEDVALUE) - 0.15 * COS(SINE / WALKSPEEDVALUE*2), -0.25 * SIN(SINE / WALKSPEEDVALUE)) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(-10+50 * COS(SINE / WALKSPEEDVALUE))), 0.6 / Animation_Speed)
  1426. elseif (ANIM ~= "Walk") or (TORSOVELOCITY < 1) then
  1427. RootJoint.C1 = Clerp(RootJoint.C1, ROOTC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed)
  1428. Neck.C1 = Clerp(Neck.C1, CF(0, -0.5, 0) * ANGLES(RAD(-90), RAD(0), RAD(180)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed)
  1429. RightHip.C1 = Clerp(RightHip.C1, CF(0.5, 1, 0) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.7 / Animation_Speed)
  1430. LeftHip.C1 = Clerp(LeftHip.C1, CF(-0.5, 1, 0) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.7 / Animation_Speed)
  1431. end
  1432. if TORSOVERTICALVELOCITY > 1 and HITFLOOR == nil then
  1433. ANIM = "Jump"
  1434. if ATTACK == false then
  1435. RootJoint.C0 = Clerp(RootJoint.C0, ROOTC0 * CF(0, 0, 0 ) * ANGLES(RAD(-5), RAD(0), RAD(0)), 1 / Animation_Speed)
  1436. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0 , 0 + ((1) - 1)) * ANGLES(RAD(-25), RAD(0), RAD(0)), 1 / Animation_Speed)
  1437. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(-35), RAD(0), RAD(25 + 10 * COS(SINE / 12))) * RIGHTSHOULDERC0, 1 / Animation_Speed)
  1438. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(-35), RAD(0), RAD(-25 - 10 * COS(SINE / 12))) * LEFTSHOULDERC0, 1 / Animation_Speed)
  1439. RightHip.C0 = Clerp(RightHip.C0, CF(1, -0.4, -0.6) * ANGLES(RAD(1), RAD(90), RAD(0)) * ANGLES(RAD(-1 * SIN(SINE / 6)), RAD(0), RAD(0)), 1 / Animation_Speed)
  1440. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, 0) * ANGLES(RAD(0), RAD(-85), RAD(0)) * ANGLES(RAD(-1 * SIN(SINE / 6)), RAD(0), RAD(0)), 1 / Animation_Speed)
  1441. end
  1442. elseif TORSOVERTICALVELOCITY < -1 and HITFLOOR == nil then
  1443. ANIM = "Fall"
  1444. if ATTACK == false then
  1445. RootJoint.C0 = Clerp(RootJoint.C0, ROOTC0 * CF(0, 0, 0 ) * ANGLES(RAD(15), RAD(0), RAD(0)), 1 / Animation_Speed)
  1446. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0 , 0 + ((1) - 1)) * ANGLES(RAD(15), RAD(0), RAD(0)), 1 / Animation_Speed)
  1447. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(35 - 4 * COS(SINE / 6)), RAD(0), RAD(45 + 10 * COS(SINE / 12))) * RIGHTSHOULDERC0, 1 / Animation_Speed)
  1448. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(35 - 4 * COS(SINE / 6)), RAD(0), RAD(-45 - 10 * COS(SINE / 12))) * LEFTSHOULDERC0, 1 / Animation_Speed)
  1449. RightHip.C0 = Clerp(RightHip.C0, CF(1, -0.3, -0.7) * ANGLES(RAD(-25 + 5 * SIN(SINE / 12)), RAD(90), RAD(0)) * ANGLES(RAD(-1 * SIN(SINE / 6)), RAD(0), RAD(0)), 1 / Animation_Speed)
  1450. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -0.8, -0.3) * ANGLES(RAD(-10), RAD(-80), RAD(0)) * ANGLES(RAD(-1 * SIN(SINE / 6)), RAD(0), RAD(0)), 1 / Animation_Speed)
  1451. end
  1452. elseif TORSOVELOCITY < 1 and HITFLOOR ~= nil then
  1453. ANIM = "Idle"
  1454. if ATTACK == false then
  1455. RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, -0.03 + 0.05 * COS(SINE / 12)) * ANGLES(RAD(0), RAD(0), RAD(-35)), 1 / Animation_Speed)
  1456. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(0 - 2.5 * SIN(SINE / 12)), RAD(0), RAD(35)), 1 / Animation_Speed)
  1457. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(0.75, 0.5 + 0.05 * SIN(SINE / 12), -0.7) * ANGLES(RAD(0), RAD(0), RAD(-95)) * ANGLES(RAD(5), RAD(0), RAD(0)) * RIGHTSHOULDERC0, 1 / Animation_Speed)
  1458. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-0.75, 0.35 + 0.05 * SIN(SINE / 12), -0.6) * ANGLES(RAD(0), RAD(0), RAD(92)) * ANGLES(RAD(0), RAD(0), RAD(0)) * LEFTSHOULDERC0, 1 / Animation_Speed)
  1459. RightHip.C0 = Clerp(RightHip.C0, CF(1, -1 - 0.05 * COS(SINE / 12), 0) * ANGLES(RAD(0), RAD(95), RAD(0)) * ANGLES(RAD(-15), RAD(0), RAD(0)), 1 / Animation_Speed)
  1460. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1 - 0.05 * COS(SINE / 12), 0) * ANGLES(RAD(0), RAD(-55), RAD(0)) * ANGLES(RAD(-12), RAD(0), RAD(0)), 1 / Animation_Speed)
  1461. end
  1462. elseif TORSOVELOCITY > 1 and HITFLOOR ~= nil then
  1463. ANIM = "Walk"
  1464. if ATTACK == false then
  1465. RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, -0.05) * ANGLES(RAD(5), RAD(0), RAD(-15-7 * COS(SINE / (WALKSPEEDVALUE)))), 1 / Animation_Speed)
  1466. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(5 - 1 * SIN(SINE / (WALKSPEEDVALUE / 2))), RAD(0), RAD(15+7 * COS(SINE / (WALKSPEEDVALUE)))), 1 / Animation_Speed)
  1467. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(0.75, 0.5 + 0.05 * SIN(SINE / 12), -0.7) * ANGLES(RAD(0), RAD(0), RAD(-95)) * ANGLES(RAD(5), RAD(0), RAD(0)) * RIGHTSHOULDERC0, 1 / Animation_Speed)
  1468. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-0.75, 0.35 + 0.05 * SIN(SINE / 12), -0.6) * ANGLES(RAD(0), RAD(0), RAD(92)) * ANGLES(RAD(0), RAD(0), RAD(0)) * LEFTSHOULDERC0, 1 / Animation_Speed)
  1469. RightHip.C0 = Clerp(RightHip.C0, CF(1 , -1, 0) * ANGLES(RAD(0), RAD(105), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 2 / Animation_Speed)
  1470. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, 0) * ANGLES(RAD(0), RAD(-75), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 2 / Animation_Speed)
  1471. end
  1472. end
  1473. unanchor()
  1474. if INTROD == true then
  1475. if SUNFLOAT == true then
  1476. SUN.CFrame = Clerp(SUN.CFrame,Torso.CFrame*CF(0,14 + 4 * SIN(SINE / 12),11),0.035)
  1477. end
  1478. local HITFLOOR,SUNPOS = Raycast(SUN.Position, (CF(RootPart.Position, RootPart.Position + VT(0, -1, 0))).lookVector, 23, Character)
  1479. if HITFLOOR then
  1480. local DISTANCE = (SUNPOS - SUN.Position).Magnitude
  1481. local SIZE = (23 - DISTANCE)*2
  1482. end
  1483. end
  1484. Humanoid.MaxHealth = 500
  1485. Humanoid.Health = 500
  1486. if Rooted == false then
  1487. Disable_Jump = false
  1488. Humanoid.WalkSpeed = Speed
  1489. elseif Rooted == true then
  1490. Disable_Jump = true
  1491. Humanoid.WalkSpeed = 0
  1492. end
  1493. BMUSIC.SoundId = "rbxassetid://"..SONGID
  1494. BMUSIC.Looped = true
  1495. BMUSIC.Pitch = PITCH
  1496. BMUSIC.Volume = VOLUME
  1497. BMUSIC.Playing = INTROD
  1498. if BMUSIC.Parent ~= RootPart then
  1499. BMUSIC = IT("Sound",RootPart)
  1500. end
  1501. Humanoid.Name = "THE_SUN_IS_A_DEADLY_LASER"
  1502. if INTROD == false and ATTACK == false then
  1503. Intro()
  1504. INTROD = true
  1505. end
  1506. local VELOC = -RootPart.RotVelocity.Y
  1507. if VELOC < -35 then
  1508. VELOC = -35
  1509. elseif VELOC > 35 then
  1510. VELOC = 35
  1511. end
  1512. if CUSTOMANGLES == true then
  1513. Cam.CameraType = Enum.CameraType.Scriptable
  1514. if CUSTOMCAM == false then
  1515. Cam.CFrame = Clerp(Cam.CFrame, RootPart.CFrame * ANGLES(RAD(-5), RAD(0), RAD(VELOC)) * CF(12,7,25), 0.15)
  1516. end
  1517. else
  1518. Cam.CameraType = CAMTYPE
  1519. end
  1520. end
  1521.  
  1522. --//=================================\\
  1523. --\\=================================//
  1524.  
  1525.  
  1526.  
  1527.  
  1528.  
  1529. --//====================================================\\--
  1530. --|| END OF SCRIPT
  1531. --\\====================================================//--
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement