Advertisement
Guest User

spell caster

a guest
Jun 2nd, 2019
704
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 99.38 KB | None | 0 0
  1. --//====================================================\\--
  2. --|| 7_qz's Spellcaster.
  3. --\\====================================================//--
  4.  
  5. wait(0.2)
  6. local RealPlayer = game:GetService("Players"):GetPlayerFromCharacter(script.Parent)
  7. local FakeMouse = script.FakeMouse:Clone();
  8. FakeMouse.Parent = RealPlayer.Character;
  9. script.FakeMouse:Destroy()
  10. do
  11. local GUID = {}
  12. do
  13. GUID.IDs = {};
  14. function GUID:new(len)
  15. local id;
  16. if(not len)then
  17. id = (tostring(function() end))
  18. id = id:gsub("function: ","")
  19. else
  20. local function genID(len)
  21. local newID = ""
  22. for i = 1,len do
  23. newID = newID..string.char(math.random(48,90))
  24. end
  25. return newID
  26. end
  27. repeat id = genID(len) until not GUID.IDs[id]
  28. local oid = id;
  29. id = {Trash=function() GUID.IDs[oid]=nil; end;Get=function() return oid; end}
  30. GUID.IDs[oid]=true;
  31. end
  32. return id
  33. end
  34. end
  35.  
  36. local AHB = Instance.new("BindableEvent")
  37.  
  38. local FPS = 30
  39.  
  40. local TimeFrame = 0
  41.  
  42. local LastFrame = tick()
  43. local Frame = 1/FPS
  44.  
  45. game:service'RunService'.Heartbeat:connect(function(s,p)
  46. TimeFrame = TimeFrame + s
  47. if(TimeFrame >= Frame)then
  48. for i = 1,math.floor(TimeFrame/Frame) do
  49. AHB:Fire()
  50. end
  51. LastFrame=tick()
  52. TimeFrame=TimeFrame-Frame*math.floor(TimeFrame/Frame)
  53. end
  54. end)
  55.  
  56.  
  57. function swait(dur)
  58. if(dur == 0 or typeof(dur) ~= 'number')then
  59. AHB.Event:wait()
  60. else
  61. for i = 1, dur*FPS do
  62. AHB.Event:wait()
  63. end
  64. end
  65. end
  66.  
  67. local oPlayer = RealPlayer
  68. local Player = oPlayer
  69.  
  70. local loudnesses={}
  71. script.Parent = Player.Character
  72. local CoAS = {Actions={}}
  73. local Event = Instance.new("RemoteEvent")
  74. Event.Name = "UserInputEvent"
  75. Event.Parent = Player.Character
  76. local Func = Instance.new("RemoteFunction")
  77. Func.Name = "GetClientProperty"
  78. Func.Parent = Player.Character
  79. local fakeEvent = function()
  80. local t = {_fakeEvent=true,Waited={},Connected={}}
  81. t.Connect = function(self,f)
  82. local ft={}
  83. ft={Disconnected=false;disconnect=function(s) if(self.Function==ft)then self.Function=nil end s.Disconnected=true end}
  84. ft.Disconnect=ft.disconnect
  85.  
  86. ft.Func=function(...)
  87. for id,_ in next, t.Waited do
  88. t.Waited[id] = true
  89. end
  90. return f(...)
  91. end;
  92.  
  93. table.insert(self.Connected,ft)
  94. return ft;
  95. end
  96. t.connect = t.Connect
  97. t.Wait = function()
  98. local guid = GUID:new(25)
  99. local waitingId = guid:Get()
  100. t.Waited[waitingId]=false
  101. repeat swait() until t.Waited[waitingId]==true
  102. t.Waited[waitingId]=nil;
  103. guid:Trash()
  104. end
  105. t.wait = t.Wait
  106. return t
  107. end
  108. local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent()}
  109. local UsIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
  110. local Run = {RenderStepped=fakeEvent()}
  111.  
  112. function CoAS:BindAction(name,fun,touch,...)
  113. CoAS.Actions[name] = {Name=name,Function=fun,Keys={...}}
  114. end
  115. function CoAS:UnbindAction(name)
  116. CoAS.Actions[name] = nil
  117. end
  118. local function te(self,ev,...)
  119. local t = self[ev]
  120. if t and t._fakeEvent and t.Connected then
  121. for i,v in next, t.Connected do
  122. if(v.Func and not v.Disconnected)then
  123. v.Func(...)
  124. else
  125. t.Connected[i]=nil
  126. end
  127. end
  128. end
  129. end
  130. m.TrigEvent = te
  131. UsIS.TrigEvent = te
  132. Run.TrigEvent = te
  133. Event.OnServerEvent:Connect(function(plr,io)
  134. if plr~=Player then return end
  135. --[[table.foreach(io,print)
  136. print'---']]
  137. if io.Mouse then
  138. m.Target = io.Target
  139. m.Hit = io.Hit
  140. elseif io.KeyEvent then
  141. m:TrigEvent('Key'..io.KeyEvent,io.Key)
  142. elseif io.UserInputType == Enum.UserInputType.MouseButton1 then
  143. if io.UserInputState == Enum.UserInputState.Begin then
  144. m:TrigEvent("Button1Down")
  145. else
  146. m:TrigEvent("Button1Up")
  147. end
  148. end
  149. if(not io.KeyEvent and not io.Mouse)then
  150.  
  151. for n,t in pairs(CoAS.Actions) do
  152. for _,k in pairs(t.Keys) do
  153. if k==io.KeyCode then
  154. t.Function(t.Name,io.UserInputState,io)
  155. end
  156. end
  157. end
  158. if io.UserInputState == Enum.UserInputState.Begin then
  159. UsIS:TrigEvent("InputBegan",io,false)
  160. else
  161. UsIS:TrigEvent("InputEnded",io,false)
  162. end
  163. end
  164. end)
  165.  
  166. Func.OnServerInvoke = function(plr,inst,play)
  167. if plr~=Player then return end
  168. if(inst and typeof(inst) == 'Instance' and inst:IsA'Sound')then
  169. loudnesses[inst]=play
  170. end
  171. end
  172.  
  173. function GetClientProperty(inst,prop)
  174. if(prop == 'PlaybackLoudness' and loudnesses[inst])then
  175. return loudnesses[inst]
  176. elseif(prop == 'PlaybackLoudness')then
  177. return Func:InvokeClient(Player,'RegSound',inst)
  178. end
  179. return Func:InvokeClient(Player,inst,prop)
  180. end
  181. local oldGame = game;
  182. local oldPlayer = Player;
  183. local fakePlayer = newproxy(true)
  184. getmetatable(fakePlayer).__index = function(s,i)
  185. if(i == 'GetMouse')then
  186. return function() return m; end
  187. end
  188. return Player[i]
  189. end
  190. getmetatable(fakePlayer).__newindex = function(s,i,v)
  191. Player[i]=v
  192. end
  193. getmetatable(fakePlayer).__call=function(self,...)
  194. if(self == fakePlayer)then self = Player end
  195. local wh = {...}
  196. local name = table.remove(wh,1)
  197. for i,v in next, wh do
  198. wh[i]=v
  199. end
  200. if(name == 'GetMouse')then
  201. return m;
  202. end
  203. return self(name,unpack(wh))
  204. end
  205. getmetatable(fakePlayer).__namecall=function(self,...)
  206. if(self == fakePlayer)then self = Player end
  207. local tuple={...}
  208. local name = table.remove(tuple,#tuple)
  209.  
  210. if(name == 'GetMouse')then
  211. return m;
  212. else
  213. return self[name](self,unpack(tuple))
  214. end
  215. end
  216. local oll = LoadLibrary;
  217. function LoadLibrary(libtard)
  218. local libtarddestroyed=oll(libtard)
  219. if(libtard=='RbxUtility')then
  220. local library={Create=function(obj)
  221. local inst = Instance.new(obj)
  222. return function(props)
  223. for prop,valu in next, props do
  224. inst[prop]=valu
  225. end
  226. return inst
  227. end
  228. end}
  229. setmetatable(library,{__index=libtarddestroyed,__newindex=function(s,i,v) libtarddestroyed[i]=v end})
  230.  
  231. return library
  232. else
  233. return libtarddestroyed
  234. end
  235. end
  236. local function GetService(s,i)
  237. local service = s:GetService(i)
  238. if(i == 'Players')then
  239. local oldService = service;
  240. local fakeService = newproxy(true)
  241. getmetatable(fakeService).__index = function(s,i)
  242. if(s == fakeService)then s=oldService end
  243. if(i == 'LocalPlayer' or i == 'localPlayer')then
  244. return fakePlayer
  245. elseif(i == 'oPlayer')then
  246. return oPlayer
  247. else
  248. return s[i]
  249. end
  250. end
  251. getmetatable(fakeService).__newindex = function(s,i,v)
  252. if(s == fakeService)then s=oldService end
  253. s[i]=v
  254. end
  255. getmetatable(fakeService).__call=function(self,...)
  256. if(self == fakeService)then self = oldService end
  257. local wh = {...}
  258. local name = table.remove(wh,1)
  259. for i,v in next, wh do
  260. wh[i]=v
  261. end
  262. return self(name,unpack(wh))
  263. end
  264. getmetatable(fakeService).__namecall=function(self,...)
  265. if(self == fakeService)then self = oldService end
  266. local tuple={...}
  267. local name = table.remove(tuple,#tuple)
  268.  
  269. return self[name](self,unpack(tuple))
  270. end
  271. getmetatable(fakeService).__metatable = 'gay'
  272. return fakeService
  273. elseif(i == 'RunService')then
  274. local oldService = service;
  275. local fakeService = newproxy(true)
  276. getmetatable(fakeService).__index = function(s,i)
  277. if(s == fakeService)then s=oldService end
  278. return Run[i] or s[i]
  279. end
  280. getmetatable(fakeService).__newindex = function(s,i,v)
  281. if(s == fakeService)then s=oldService end
  282. s[i]=v
  283. end
  284. getmetatable(fakeService).__call=function(self,...)
  285. if(self == fakeService)then self = oldService end
  286. local wh = {...}
  287. local name = table.remove(wh,1)
  288. for i,v in next, wh do
  289. wh[i]=v
  290. end
  291. return self(name,unpack(wh))
  292. end
  293. getmetatable(fakeService).__namecall=function(self,...)
  294. if(self == fakeService)then self = oldService end
  295. local tuple={...}
  296. local name = table.remove(tuple,#tuple)
  297.  
  298. return self[name](self,unpack(tuple))
  299. end
  300. getmetatable(fakeService).__metatable = 'gay'
  301. return fakeService
  302. elseif(i == 'UserInputService')then
  303. return UsIS
  304. elseif(i == 'ContextActionService')then
  305. return CoAS;
  306. else
  307. return service
  308. end
  309. end
  310.  
  311. local new = Instance.new;
  312. Instance = {}
  313. Instance.new = function(inst,obje)
  314. local lp = GetService(oldGame,'Players').localPlayer
  315. local instance = new(inst)
  316. if(inst=='ObjectValue')then
  317. local fake = newproxy(true)
  318. getmetatable(fake).__index=function(self,index)
  319. if(self==fake)then self=instance end
  320. return self[index]
  321. end
  322. getmetatable(fake).__newindex=function(self,index,value)
  323. if(self==fake)then self=instance end
  324. if(index=='Value' and typeof(value)~='Instance' and value==fakePlayer)then
  325. self[index]=oPlayer
  326. else
  327. self[index]=value
  328. end
  329. end
  330. getmetatable(fake).__call=function(self,...)
  331. if(self == fake)then self = instance end
  332. local wh = {...}
  333. local name = table.remove(wh,1)
  334. for i,v in next, wh do
  335. if(v == fake)then v = instance end
  336. wh[i]=v
  337. end
  338. return self(name,unpack(wh))
  339. end
  340. getmetatable(fake). __namecall=function(self,...)
  341. if(self == fake)then self = instance end
  342. local tuple={...}
  343. local name = table.remove(tuple,#tuple)
  344. return self[name](self,unpack(tuple))
  345. end
  346. return fake
  347. else
  348. instance.Parent = obje
  349. return instance;
  350. end
  351.  
  352. end
  353. local serviceFunctions={
  354. service=true,
  355. GetService=true,
  356. }
  357. local fakeGame = newproxy(true)
  358. getmetatable(fakeGame).__index = function(s,i)
  359. if(s == fakeGame)then s=oldGame end
  360. local serv = GetService(oldGame,i)
  361. if serviceFunctions[i] then
  362. return GetService
  363. elseif(serv)then
  364. return serv
  365. else
  366. return s[i]
  367. end
  368. end
  369. getmetatable(fakeGame).__newindex = function(s,i,v)
  370. if(s == fakeGame)then s=oldGame end
  371. s[i]=v
  372. end
  373. getmetatable(fakeGame).__call=function(self,...)
  374. if(self == fakeGame)then self = oldGame end
  375. local wh = {...}
  376. local name = table.remove(wh,1)
  377. for i,v in next, wh do
  378. if(v == fakeGame)then v = oldGame end
  379. wh[i]=v
  380. end
  381. if serviceFunctions[name] then
  382. return GetService(self,unpack(wh))
  383. else
  384. return self(name,unpack(wh))
  385. end
  386. end
  387. getmetatable(fakeGame). __namecall=function(self,...)
  388. if(self == fakeGame)then self = oldGame end
  389. local tuple={...}
  390. local name = table.remove(tuple,#tuple)
  391.  
  392. local funcToCall=self[name]
  393.  
  394. if serviceFunctions[name] then
  395. return GetService(self,unpack(tuple))
  396. else
  397. return self[name](self,unpack(tuple))
  398. end
  399. end
  400. getmetatable(fakeGame).__metatable = 'gay'
  401.  
  402. coroutine.wrap(function()
  403. while true do
  404. Run:TrigEvent('RenderStepped')
  405. swait()
  406. end
  407. end)()
  408. game=fakeGame
  409. UserInputService,ContextActionService = UsIS,CoAS
  410. end
  411.  
  412. wait(1)
  413.  
  414. -- Script --
  415.  
  416. plr = game:GetService("Players").LocalPlayer
  417. Player = plr
  418. char = plr.Character
  419. hum = char.Humanoid
  420. mouse = plr:GetMouse()
  421. local cam = game.Workspace.CurrentCamera
  422. Camera = cam
  423. local CamInterrupt = false
  424. local TwoD = false
  425. local TargetInfo = {nil, nil}
  426. cam.CameraType = "Custom"
  427. t = char.Torso
  428. h = char.Head
  429. ra = char["Right Arm"]
  430. la = char["Left Arm"]
  431. rl = char["Right Leg"]
  432. ll = char["Left Leg"]
  433. tors = char.Torso
  434. lleg = char["Left Leg"]
  435. root = char.HumanoidRootPart
  436. hed = char.Head
  437. rleg = char["Right Leg"]
  438. rarm = char["Right Arm"]
  439. larm = char["Left Arm"]
  440. radian = math.rad
  441. random = math.random
  442. Vec3 = Vector3.new
  443. Inst = Instance.new
  444. cFrame = CFrame.new
  445. Euler = CFrame.fromEulerAnglesXYZ
  446. vt = Vector3.new
  447. bc = BrickColor.new
  448. br = BrickColor.random
  449. it = Instance.new
  450. cf = CFrame.new
  451. local Player_Size = 0
  452. cam = game.Workspace.CurrentCamera
  453. CF = CFrame.new
  454. angles = CFrame.Angles
  455. attack = false
  456. Euler = CFrame.fromEulerAnglesXYZ
  457. Rad = math.rad
  458. IT = Instance.new
  459. BrickC = BrickColor.new
  460. Cos = math.cos
  461. Acos = math.acos
  462. Sin = math.sin
  463. Asin = math.asin
  464. Abs = math.abs
  465. Mrandom = math.random
  466. Floor = math.floor
  467. IT = Instance.new
  468. CF = CFrame.new
  469. VT = Vector3.new
  470. RAD = math.rad
  471. C3 = Color3.new
  472. UD2 = UDim2.new
  473. BRICKC = BrickColor.new
  474. ANGLES = CFrame.Angles
  475. EULER = CFrame.fromEulerAnglesXYZ
  476. COS = math.cos
  477. ACOS = math.acos
  478. SIN = math.sin
  479. ASIN = math.asin
  480. ABS = math.abs
  481. MRANDOM = math.random
  482. FLOOR = math.floor
  483. local SINE = 0
  484. local RootCF = CFrame.fromEulerAnglesXYZ(-1.57, 0, 3.14)
  485. local RHCF = CFrame.fromEulerAnglesXYZ(0, 1.6, 0)
  486. local LHCF = CFrame.fromEulerAnglesXYZ(0, -1.6, 0)
  487. local ModeOfGlitch = 1
  488. CF = CFrame.new
  489. local hed = char.Head
  490. local root = char.HumanoidRootPart
  491. local rootj = root.RootJoint
  492. local tors = char.Torso
  493. local musics = script.Sounds.Song:Clone()
  494. musics.Parent = char
  495. musics.Volume = 3.5
  496. musics:Play()
  497. local Anim = "Idle"
  498. LeftArm=char["Left Arm"]
  499. LeftLeg=char["Left Leg"]
  500. RightArm=char["Right Arm"]
  501. RightLeg=char["Right Leg"]
  502. LS=tors["Left Shoulder"]
  503. LH=tors["Left Hip"]
  504. RS=tors["Right Shoulder"]
  505. RH=tors["Right Hip"]
  506. necko = cf(0, 1, 0, -1, 0, 0, 0, 0, 1, 0, 1, 0)
  507. necko2 = cf(0, -0.5, 0, -1, 0, 0, 0, 0, 1, 0, 1, 0)
  508. LHC0 = cf(-1, -1, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  509. LHC1 = cf(-0.5, 1, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  510. RHC0 = cf(1, -1, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)
  511. RHC1 = cf(0.5, 1, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)
  512. RootPart = char.HumanoidRootPart
  513. RootJoint = RootPart.RootJoint
  514. RootCF = EULER(-1.57, 0, 3.14)
  515. local Character = char
  516. local Torso = tors
  517. local book1 = script.Books.earthbook
  518. local book2 = script.Books.firebook
  519. local book3 = script.Books.thunderbook
  520. local book4 = script.Books.icebook
  521. local book5 = script.Books.darkbook
  522. local book6 = script.Books.lightbook
  523. local book7 = script.Books.lunarbook
  524.  
  525.  
  526. selected = "fire"
  527. --save shoulders
  528. RSH, LSH=nil, nil
  529. --welds
  530. RW, LW=Instance.new("Weld"), Instance.new("Weld")
  531. RW.Name="Right Shoulder" LW.Name="Left Shoulder"
  532. LH=Torso["Left Hip"]
  533. RH=Torso["Right Hip"]
  534. TorsoColor=Torso.BrickColor
  535. function NoOutline(Part)
  536. Part.TopSurface,Part.BottomSurface,Part.LeftSurface,Part.RightSurface,Part.FrontSurface,Part.BackSurface = 10,10,10,10,10,10
  537. end
  538. ch=Character
  539. RSH=ch.Torso["Right Shoulder"]
  540. LSH=ch.Torso["Left Shoulder"]
  541. --
  542. RSH.Parent=nil
  543. LSH.Parent=nil
  544. --
  545. RW.Name="Right Shoulder"
  546. RW.Part0=ch.Torso
  547. RW.C0=cf(1.5, 0.5, 0) --* CFrame.fromEulerAnglesXYZ(1.3, 0, -0.5)
  548. RW.C1=cf(0, 0.5, 0)
  549. RW.Part1=ch["Right Arm"]
  550. RW.Parent=ch.Torso
  551. --
  552. LW.Name="Left Shoulder"
  553. LW.Part0=ch.Torso
  554. LW.C0=cf(-1.5, 0.5, 0) --* CFrame.fromEulerAnglesXYZ(1.7, 0, 0.8)
  555. LW.C1=cf(0, 0.5, 0)
  556. LW.Part1=ch["Left Arm"]
  557. LW.Parent=ch.Torso
  558.  
  559. -------------------------------------
  560.  
  561. if hum:findFirstChild("Animator")~=nil then
  562. hum:findFirstChild("Animator").Parent=nil
  563. end
  564.  
  565. if char:findFirstChild("Animate")~=nil then
  566. char:findFirstChild("Animate").Parent=nil
  567. end
  568. -------------------------------------
  569.  
  570. -- Needed Functions --
  571.  
  572. ------------------
  573. function swait(num)
  574. function swait(num)
  575. if num==0 or num==nil then
  576. game:service'RunService'.Stepped:wait(0)
  577. else
  578. for i=0,num do
  579. game:service'RunService'.Stepped:wait(0)
  580. end
  581. end
  582. end
  583. end
  584.  
  585. so = function(id,par,vol,pit)
  586. coroutine.resume(coroutine.create(function()
  587. local sou = Instance.new("Sound",par or workspace)
  588. sou.Volume=vol
  589. sou.Pitch=pit or 1
  590. sou.SoundId=id
  591. swait()
  592. sou:play()
  593. game:GetService("Debris"):AddItem(sou,6)
  594. end))
  595. end
  596.  
  597. function clerp(a,b,t)
  598. local qa = {QuaternionFromCFrame(a)}
  599. local qb = {QuaternionFromCFrame(b)}
  600. local ax, ay, az = a.x, a.y, a.z
  601. local bx, by, bz = b.x, b.y, b.z
  602. local _t = 1-t
  603. return QuaternionToCFrame(_t*ax + t*bx, _t*ay + t*by, _t*az + t*bz,QuaternionSlerp(qa, qb, t))
  604. end
  605.  
  606. function QuaternionFromCFrame(cf)
  607. local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components()
  608. local trace = m00 + m11 + m22
  609. if trace > 0 then
  610. local s = math.sqrt(1 + trace)
  611. local recip = 0.5/s
  612. return (m21-m12)*recip, (m02-m20)*recip, (m10-m01)*recip, s*0.5
  613. else
  614. local i = 0
  615. if m11 > m00 then
  616. i = 1
  617. end
  618. if m22 > (i == 0 and m00 or m11) then
  619. i = 2
  620. end
  621. if i == 0 then
  622. local s = math.sqrt(m00-m11-m22+1)
  623. local recip = 0.5/s
  624. return 0.5*s, (m10+m01)*recip, (m20+m02)*recip, (m21-m12)*recip
  625. elseif i == 1 then
  626. local s = math.sqrt(m11-m22-m00+1)
  627. local recip = 0.5/s
  628. return (m01+m10)*recip, 0.5*s, (m21+m12)*recip, (m02-m20)*recip
  629. elseif i == 2 then
  630. local s = math.sqrt(m22-m00-m11+1)
  631. local recip = 0.5/s return (m02+m20)*recip, (m12+m21)*recip, 0.5*s, (m10-m01)*recip
  632. end
  633. end
  634. end
  635.  
  636. function QuaternionToCFrame(px, py, pz, x, y, z, w)
  637. local xs, ys, zs = x + x, y + y, z + z
  638. local wx, wy, wz = w*xs, w*ys, w*zs
  639. local xx = x*xs
  640. local xy = x*ys
  641. local xz = x*zs
  642. local yy = y*ys
  643. local yz = y*zs
  644. local zz = z*zs
  645. 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))
  646. end
  647.  
  648. function QuaternionSlerp(a, b, t)
  649. local cosTheta = a[1]*b[1] + a[2]*b[2] + a[3]*b[3] + a[4]*b[4]
  650. local startInterp, finishInterp;
  651. if cosTheta >= 0.0001 then
  652. if (1 - cosTheta) > 0.0001 then
  653. local theta = math.acos(cosTheta)
  654. local invSinTheta = 1/math.sin(theta)
  655. startInterp = math.sin((1-t)*theta)*invSinTheta
  656. finishInterp = math.sin(t*theta)*invSinTheta
  657. else
  658. startInterp = 1-t
  659. finishInterp = t
  660. end
  661. else
  662. if (1+cosTheta) > 0.0001 then
  663. local theta = math.acos(-cosTheta)
  664. local invSinTheta = 1/math.sin(theta)
  665. startInterp = math.sin((t-1)*theta)*invSinTheta
  666. finishInterp = math.sin(t*theta)*invSinTheta
  667. else
  668. startInterp = t-1
  669. finishInterp = t
  670. end
  671. end
  672. 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
  673. end
  674.  
  675. function rayCast(Pos, Dir, Max, Ignore) -- Origin Position , Direction, MaxDistance , IgnoreDescendants
  676. return game:service("Workspace"):FindPartOnRay(Ray.new(Pos, Dir.unit * (Max or 999.999)), Ignore)
  677. end
  678.  
  679. function aclerp(startCF,endCF,alpha)
  680. return startCF:lerp(endCF, alpha)
  681. end
  682.  
  683. -- Effect Functions --
  684.  
  685. function CreateParta(parent,transparency,reflectance,material,brickcolor)
  686. local p = Instance.new("Part")
  687. p.TopSurface = 0
  688. p.BottomSurface = 0
  689. p.Parent = parent
  690. p.Size = Vector3.new(0.1,0.1,0.1)
  691. p.Transparency = transparency
  692. p.Reflectance = reflectance
  693. p.CanCollide = false
  694. p.Locked = true
  695. p.BrickColor = brickcolor
  696. p.Material = material
  697. return p
  698. end
  699.  
  700. local Create = LoadLibrary("RbxUtility").Create
  701.  
  702. CFuncs = {
  703. ["Part"] = {
  704. Create = function(Parent, Material, Reflectance, Transparency, BColor, Name, Size)
  705. local Part = Create("Part"){
  706. Parent = Parent,
  707. Reflectance = Reflectance,
  708. Transparency = Transparency,
  709. CanCollide = false,
  710. Locked = true,
  711. BrickColor = BrickColor.new(tostring(BColor)),
  712. Name = Name,
  713. Size = Size,
  714. Material = Material,
  715. }
  716. RemoveOutlines(Part)
  717. return Part
  718. end;
  719. };
  720.  
  721. ["Mesh"] = {
  722. Create = function(Mesh, Part, MeshType, MeshId, OffSet, Scale)
  723. local Msh = Create(Mesh){
  724. Parent = Part,
  725. Offset = OffSet,
  726. Scale = Scale,
  727. }
  728. if Mesh == "SpecialMesh" then
  729. Msh.MeshType = MeshType
  730. Msh.MeshId = MeshId
  731. end
  732. return Msh
  733. end;
  734. };
  735.  
  736. ["Mesh"] = {
  737. Create = function(Mesh, Part, MeshType, MeshId, OffSet, Scale)
  738. local Msh = Create(Mesh){
  739. Parent = Part,
  740. Offset = OffSet,
  741. Scale = Scale,
  742. }
  743. if Mesh == "SpecialMesh" then
  744. Msh.MeshType = MeshType
  745. Msh.MeshId = MeshId
  746. end
  747. return Msh
  748. end;
  749. };
  750.  
  751. ["Weld"] = {
  752. Create = function(Parent, Part0, Part1, C0, C1)
  753. local Weld = Create("Weld"){
  754. Parent = Parent,
  755. Part0 = Part0,
  756. Part1 = Part1,
  757. C0 = C0,
  758. C1 = C1,
  759. }
  760. return Weld
  761. end;
  762. };
  763.  
  764. ["Sound"] = {
  765. Create = function(id, par, vol, pit)
  766. local S = Create("Sound"){
  767. Volume = vol,
  768. Name = "EffectSoundo",
  769. Pitch = pit or 1,
  770. SoundId = id,
  771. Parent = par or workspace,
  772. }
  773. S:play()
  774. game:GetService("Debris"):AddItem(S, 10)
  775. end;
  776. };
  777.  
  778. ["TimeSound"] = {
  779. Create = function(id, par, vol, pit, timepos)
  780. local S = Create("Sound"){
  781. Volume = vol,
  782. Name = "EffectSoundo",
  783. Pitch = pit or 1,
  784. SoundId = id,
  785. TimePosition = timepos,
  786. Parent = par or workspace,
  787. }
  788. wait()
  789. S:play()
  790. game:GetService("Debris"):AddItem(S, 10)
  791. end;
  792. };
  793. ["EchoSound"] = {
  794. Create = function(id, par, vol, pit, timepos,delays,echodelay,fedb,dryl)
  795. local Sas = Create("Sound"){
  796. Volume = vol,
  797. Name = "EffectSoundo",
  798. Pitch = pit or 1,
  799. SoundId = id,
  800. TimePosition = timepos,
  801. Parent = par or workspace,
  802. }
  803. local E = Create("EchoSoundEffect"){
  804. Delay = echodelay,
  805. Name = "Echo",
  806. Feedback = fedb,
  807. DryLevel = dryl,
  808. Parent = Sas,
  809. }
  810. wait()
  811. Sas:play()
  812. game:GetService("Debris"):AddItem(Sas, delays)
  813. end;
  814. };
  815.  
  816. ["LongSound"] = {
  817. Create = function(id, par, vol, pit)
  818. local S = Create("Sound"){
  819. Volume = vol,
  820. Pitch = pit or 1,
  821. SoundId = id,
  822. Parent = par or workspace,
  823. }
  824. wait()
  825. S:play()
  826. game:GetService("Debris"):AddItem(S, 60)
  827. end;
  828. };
  829.  
  830. ["ParticleEmitter"] = {
  831. Create = function(Parent, Color1, Color2, LightEmission, Size, Texture, Transparency, ZOffset, Accel, Drag, LockedToPart, VelocityInheritance, EmissionDirection, Enabled, LifeTime, Rate, Rotation, RotSpeed, Speed, VelocitySpread)
  832. local fp = Create("ParticleEmitter"){
  833. Parent = Parent,
  834. Color = ColorSequence.new(Color1, Color2),
  835. LightEmission = LightEmission,
  836. Size = Size,
  837. Texture = Texture,
  838. Transparency = Transparency,
  839. ZOffset = ZOffset,
  840. Acceleration = Accel,
  841. Drag = Drag,
  842. LockedToPart = LockedToPart,
  843. VelocityInheritance = VelocityInheritance,
  844. EmissionDirection = EmissionDirection,
  845. Enabled = Enabled,
  846. Lifetime = LifeTime,
  847. Rate = Rate,
  848. Rotation = Rotation,
  849. RotSpeed = RotSpeed,
  850. Speed = Speed,
  851. VelocitySpread = VelocitySpread,
  852. }
  853. return fp
  854. end;
  855. };
  856.  
  857. CreateTemplate = {
  858.  
  859. };
  860. }
  861.  
  862.  
  863.  
  864. New = function(Object, Parent, Name, Data)
  865. local Object = Instance.new(Object)
  866. for Index, Value in pairs(Data or {}) do
  867. Object[Index] = Value
  868. end
  869. Object.Parent = Parent
  870. Object.Name = Name
  871. return Object
  872. end
  873.  
  874. function ring(type,pos,scale,value)
  875. local type = type
  876. local rng = Instance.new("Part", char)
  877. rng.Anchored = true
  878. rng.BrickColor = origcolor
  879. rng.CanCollide = false
  880. rng.FormFactor = 3
  881. rng.Name = "Ring"
  882. rng.Size = Vector3.new(1, 1, 1)
  883. rng.Transparency = 0
  884. rng.TopSurface = 0
  885. rng.BottomSurface = 0
  886. rng.CFrame = pos
  887. local rngm = Instance.new("SpecialMesh", rng)
  888. rngm.MeshId = "http://www.roblox.com/asset/?id=3270017"
  889. rngm.Scale = scale
  890. local scaler2 = 1
  891. if type == "Add" then
  892. scaler2 = 1*value
  893. elseif type == "Divide" then
  894. scaler2 = 1/value
  895. end
  896. coroutine.resume(coroutine.create(function()
  897. for i = 0,10,0.1 do
  898. swait()
  899. if type == "Add" then
  900. scaler2 = scaler2 - 0.01*value
  901. elseif type == "Divide" then
  902. scaler2 = scaler2 - 0.01/value
  903. end
  904. rng.Transparency = rng.Transparency + 0.01
  905. rngm.Scale = rngm.Scale + Vector3.new(scaler2, scaler2, 0)
  906. end
  907. rng:Destroy()
  908. end))
  909. end
  910.  
  911.  
  912. function wave(type,pos,scale,value)
  913. local type = type
  914. local rng = Instance.new("Part", char)
  915. rng.Anchored = true
  916. rng.BrickColor = origcolor
  917. rng.CanCollide = false
  918. rng.FormFactor = 3
  919. rng.Name = "Ring"
  920. rng.Size = Vector3.new(1, 1, 1)
  921. rng.Transparency = 0
  922. rng.TopSurface = 0
  923. rng.BottomSurface = 0
  924. rng.CFrame = pos
  925. local rngm = Instance.new("SpecialMesh", rng)
  926. rngm.MeshId = "http://www.roblox.com/asset/?id=20329976"
  927. rngm.Scale = scale
  928. local scaler2 = 1
  929. if type == "Add" then
  930. scaler2 = 1*value
  931. elseif type == "Divide" then
  932. scaler2 = 1/value
  933. end
  934. coroutine.resume(coroutine.create(function()
  935. for i = 0,10,0.1 do
  936. swait()
  937. if type == "Add" then
  938. scaler2 = scaler2 - 0.01*value
  939. elseif type == "Divide" then
  940. scaler2 = scaler2 - 0.01/value
  941. end
  942. rng.Transparency = rng.Transparency + 0.01
  943. rngm.Scale = rngm.Scale + Vector3.new(scaler2, scaler2, scaler2)
  944. end
  945. rng:Destroy()
  946. end))
  947. end
  948.  
  949. function wind(type,pos,scale,value,speed)
  950. local type = type
  951. local rng = Instance.new("Part", char)
  952. rng.Anchored = true
  953. rng.BrickColor = origcolor
  954. rng.CanCollide = false
  955. rng.FormFactor = 3
  956. rng.Name = "Ring"
  957. rng.Size = Vector3.new(1, 1, 1)
  958. rng.Transparency = 0
  959. rng.TopSurface = 0
  960. rng.BottomSurface = 0
  961. rng.CFrame = pos
  962. local rngm = Instance.new("SpecialMesh", rng)
  963. rngm.MeshId = "http://www.roblox.com/asset/?id=1051557"
  964. rngm.Scale = scale
  965. local scaler2 = 1
  966. if type == "Add" then
  967. scaler2 = 1*value
  968. elseif type == "Divide" then
  969. scaler2 = 1/value
  970. end
  971. coroutine.resume(coroutine.create(function()
  972. for i = 0,10,0.1 do
  973. swait()
  974. if type == "Add" then
  975. scaler2 = scaler2 - 0.01*value
  976. elseif type == "Divide" then
  977. scaler2 = scaler2 - 0.01/value
  978. end
  979. rng.CFrame = rng.CFrame*CFrame.Angles(0,0.025*speed,0)
  980. rng.Transparency = rng.Transparency + 0.01
  981. rngm.Scale = rngm.Scale + Vector3.new(scaler2, scaler2, scaler2)
  982. end
  983. rng:Destroy()
  984. end))
  985. end
  986.  
  987. function groundwind(type,pos,scale,value,speed)
  988. local type = type
  989. local rng = Instance.new("Part", char)
  990. rng.Anchored = true
  991. rng.BrickColor = origcolor
  992. rng.CanCollide = false
  993. rng.FormFactor = 3
  994. rng.Name = "Ring"
  995. rng.Size = Vector3.new(1, 1, 1)
  996. rng.Transparency = 0
  997. rng.TopSurface = 0
  998. rng.BottomSurface = 0
  999. rng.CFrame = pos
  1000. local rngm = Instance.new("SpecialMesh", rng)
  1001. rngm.MeshId = "http://www.roblox.com/asset/?id=1051557"
  1002. rngm.Scale = scale
  1003. local scaler2 = 1
  1004. if type == "Add" then
  1005. scaler2 = 1*value
  1006. elseif type == "Divide" then
  1007. scaler2 = 1/value
  1008. end
  1009. coroutine.resume(coroutine.create(function()
  1010. for i = 0,10,0.1 do
  1011. swait()
  1012. if type == "Add" then
  1013. scaler2 = scaler2 - 0.01*value
  1014. elseif type == "Divide" then
  1015. scaler2 = scaler2 - 0.01/value
  1016. end
  1017. rng.CFrame = rng.CFrame*CFrame.Angles(0,0.025*speed,0)
  1018. rng.Transparency = rng.Transparency + 0.01
  1019. rngm.Scale = rngm.Scale + Vector3.new(scaler2, scaler2/5, scaler2)
  1020. end
  1021. rng:Destroy()
  1022. end))
  1023. end
  1024.  
  1025. function CameraManager()
  1026. if TwoD and not CamInterrupt then
  1027. if Humanoid.Health > 0 then
  1028. Camera.CameraSubject = Humanoid
  1029. Camera.CameraType = "Scriptable"
  1030. Humanoid.AutoRotate = false
  1031. if Booleans.GyroUse then
  1032. Directer.MaxTorque = Vec3(0, huge, 0)
  1033. else
  1034. Directer.MaxTorque = Vec3(0, 0, 0)
  1035. end
  1036. if TargetInfo[1] ~= nil and TargetInfo[2] ~= nil then
  1037. if Booleans.CamFollow then
  1038. CPart.CFrame = cFrame(RootPart.Position, Vec3(TargetInfo[1].Position.X, RootPart.Position.Y, TargetInfo[1].Position.Z))
  1039. Directer.CFrame = cFrame((RootPart.CFrame * cFrame(0, 0, 10)).p, TargetInfo[1].Position)
  1040. else
  1041. CPart.Position = RootPart.Position
  1042. end
  1043. else
  1044. local ahead = (RootPart.CFrame * cFrame(0, 0, -3)).p
  1045. CPart.CFrame = cFrame(RootPart.Position, Vec3(ahead.X, RootPart.Position.Y, ahead.Z))
  1046. end
  1047. Camera.CFrame = lerp(Camera.CFrame, CPart.CFrame * cFrame(25, 3, 0) * Euler(0, radian(90), 0), 0.2)
  1048. else
  1049. Camera.CameraSubject = Humanoid
  1050. Camera.CameraType = "Custom"
  1051. Controller.Disabled = false
  1052. end
  1053. end
  1054. end
  1055.  
  1056. function sphere(bonuspeed,type,pos,scale,value,color,heart,invert,notaffectbychaosrainbow)
  1057. local type = type
  1058. local rng = Instance.new("Part", char)
  1059. rng.Anchored = true
  1060. rng.BrickColor = color
  1061. rng.CanCollide = false
  1062. rng.FormFactor = 3
  1063. rng.Name = "Ring"
  1064. rng.Material = "Neon"
  1065. rng.Size = Vector3.new(1, 1, 1)
  1066. rng.Transparency = 0
  1067. rng.TopSurface = 0
  1068. rng.BottomSurface = 0
  1069. rng.CFrame = pos
  1070. local rngm = Instance.new("SpecialMesh", rng)
  1071. rngm.MeshType = "Sphere"
  1072.  
  1073.  
  1074. if(heart)then
  1075. rngm.MeshType = Enum.MeshType.FileMesh
  1076. rngm.MeshId = "rbxassetid://105992239"
  1077. rngm.Offset = Vector3.new(0,0,-.25)
  1078. end
  1079. rngm.Scale = scale
  1080. if rainbowmode == true and not notaffectbychaosrainbow then
  1081. rng.Color = Color3.new(r/255,g/255,b/255)
  1082. end
  1083. local scaler2 = 1
  1084. if type == "Add" then
  1085. scaler2 = 1*value
  1086. elseif type == "Divide" then
  1087. scaler2 = 1/value
  1088. end
  1089. coroutine.resume(coroutine.create(function()
  1090. for i = 0,10/bonuspeed,0.1 do
  1091. swait()
  1092. if rainbowmode == true and not notaffectbychaosrainbow then
  1093. rng.Color = Color3.new(r/255,g/255,b/255)
  1094. end
  1095. if type == "Add" then
  1096. scaler2 = scaler2 - 0.01*value/bonuspeed
  1097. elseif type == "Divide" then
  1098. scaler2 = scaler2 - 0.01/value*bonuspeed
  1099. end
  1100. if chaosmode == true and not notaffectbychaosrainbow then
  1101. rng.BrickColor = BrickColor.random()
  1102. end
  1103. if glitchymode then
  1104. local val = math.random(1,255)
  1105. local color = Color3.fromRGB(val,val,val)
  1106. rng.Color = color
  1107. end
  1108. rng.Transparency = rng.Transparency + 0.01*bonuspeed
  1109. if(invert)then
  1110. if(heart)then
  1111. rngm.Scale = rngm.Scale - Vector3.new(scaler2*bonuspeed, scaler2*bonuspeed, 0)
  1112. else
  1113. rngm.Scale = rngm.Scale - Vector3.new(scaler2*bonuspeed, scaler2*bonuspeed, scaler2*bonuspeed)
  1114. end
  1115. else
  1116. if(heart)then
  1117. rngm.Scale = rngm.Scale + Vector3.new(scaler2*bonuspeed, scaler2*bonuspeed, 0)
  1118. else
  1119. rngm.Scale = rngm.Scale + Vector3.new(scaler2*bonuspeed, scaler2*bonuspeed, scaler2*bonuspeed)
  1120. end
  1121. end
  1122. rng.CFrame = pos
  1123. end
  1124. rng:Destroy()
  1125. end))
  1126. end
  1127.  
  1128. function newBezier(startpos, pos2, pos3, endpos, t)
  1129. local A = clerp(startpos, pos2, t)
  1130. local B = clerp(pos2, pos3, t)
  1131. local C = clerp(pos3, endpos, t)
  1132. local lerp1 = clerp(A, B, t)
  1133. local lerp2 = clerp(B, C, t)
  1134. local cubic = clerp(lerp1, lerp2, t)
  1135. return cubic
  1136. end
  1137.  
  1138.  
  1139. function PixelBlock(bonuspeed,FastSpeed,type,pos,x1,y1,z1,value,color,outerpos,heart,invert)
  1140. local type = type
  1141. local rng = Instance.new("Part", char)
  1142. rng.Anchored = true
  1143. rng.BrickColor = color
  1144. rng.CanCollide = false
  1145. rng.FormFactor = 3
  1146. rng.Name = "Ring"
  1147. rng.Material = "Neon"
  1148. rng.Size = Vector3.new(1, 1, 1)
  1149. rng.Transparency = 0
  1150. rng.TopSurface = 0
  1151. rng.BottomSurface = 0
  1152. rng.CFrame = pos
  1153. rng.CFrame = rng.CFrame + rng.CFrame.lookVector*outerpos
  1154. local rngm = Instance.new("SpecialMesh", rng)
  1155. rngm.MeshType = "Brick"
  1156. if(heart)then
  1157. rngm.MeshType = Enum.MeshType.FileMesh
  1158. rngm.MeshId = "rbxassetid://105992239"
  1159. rngm.Offset = Vector3.new(0,0,-.25)
  1160. end
  1161. rngm.Scale = vt(x1,y1,z1)
  1162. if rainbowmode == true then
  1163. rng.Color = Color3.new(r/255,g/255,b/255)
  1164. end
  1165. local scaler2 = 1
  1166. local speeder = FastSpeed/10
  1167. if type == "Add" then
  1168. scaler2 = 1*value
  1169. elseif type == "Divide" then
  1170. scaler2 = 1/value
  1171. end
  1172. coroutine.resume(coroutine.create(function()
  1173. for i = 0,10/bonuspeed,0.1 do
  1174. swait()
  1175. if rainbowmode == true then
  1176. rng.Color = Color3.new(r/255,g/255,b/255)
  1177. end
  1178. if type == "Add" then
  1179. scaler2 = scaler2 - 0.01*value/bonuspeed
  1180. elseif type == "Divide" then
  1181. scaler2 = scaler2 - 0.01/value*bonuspeed
  1182. end
  1183. if chaosmode == true then
  1184. rng.BrickColor = BrickColor.random()
  1185. end
  1186. if glitchymode then
  1187. local val = math.random(1,255)
  1188. local color = Color3.fromRGB(val,val,val)
  1189. rng.Color = color
  1190. end
  1191. speeder = speeder - 0.01*FastSpeed*bonuspeed/10
  1192. if(invert)then rng.CFrame = rng.CFrame - rng.CFrame.lookVector*speeder*bonuspeed else rng.CFrame = rng.CFrame + rng.CFrame.lookVector*speeder*bonuspeed end
  1193. --rng.Transparency = rng.Transparency + 0.01*bonuspeed
  1194. rngm.Scale = rngm.Scale - Vector3.new(scaler2*bonuspeed, scaler2*bonuspeed, scaler2*bonuspeed)
  1195. end
  1196. rng:Destroy()
  1197. end))
  1198. end
  1199.  
  1200. function PixelBlockX(bonuspeed,FastSpeed,type,pos,x1,y1,z1,value,color,outerpos)
  1201. local type = type
  1202. local rng = Instance.new("Part", char)
  1203. rng.Anchored = true
  1204. rng.BrickColor = color
  1205. rng.CanCollide = false
  1206. rng.FormFactor = 3
  1207. rng.Name = "Ring"
  1208. rng.Material = "Neon"
  1209. rng.Size = Vector3.new(1, 1, 1)
  1210. rng.Transparency = 0
  1211. rng.TopSurface = 0
  1212. rng.BottomSurface = 0
  1213. rng.CFrame = pos
  1214. rng.CFrame = rng.CFrame + rng.CFrame.lookVector*outerpos
  1215. local rngm = Instance.new("SpecialMesh", rng)
  1216. rngm.MeshType = "Brick"
  1217. rngm.Scale = vt(x1,y1,z1)
  1218. if rainbowmode == true then
  1219. rng.Color = Color3.new(r/255,g/255,b/255)
  1220. end
  1221. local scaler2 = 1
  1222. local speeder = FastSpeed/10
  1223. if type == "Add" then
  1224. scaler2 = 1*value
  1225. elseif type == "Divide" then
  1226. scaler2 = 1/value
  1227. end
  1228. coroutine.resume(coroutine.create(function()
  1229. for i = 0,10/bonuspeed,0.1 do
  1230. swait()
  1231. if rainbowmode == true then
  1232. rng.Color = Color3.new(r/255,g/255,b/255)
  1233. end
  1234. if type == "Add" then
  1235. scaler2 = scaler2 - 0.01*value/bonuspeed
  1236. elseif type == "Divide" then
  1237. scaler2 = scaler2 - 0.01/value*bonuspeed
  1238. end
  1239. if chaosmode == true then
  1240. rng.BrickColor = BrickColor.random()
  1241. end
  1242. speeder = speeder - 0.01*FastSpeed*bonuspeed/10
  1243. rng.CFrame = rng.CFrame + rng.CFrame.lookVector*speeder*bonuspeed
  1244. rng.Transparency = rng.Transparency + 0.01*bonuspeed
  1245. rngm.Scale = rngm.Scale - Vector3.new(scaler2*bonuspeed, scaler2*bonuspeed, scaler2*bonuspeed)
  1246. end
  1247. rng:Destroy()
  1248. end))
  1249. end
  1250.  
  1251. function PixelBlockNeg(bonuspeed,FastSpeed,type,pos,x1,y1,z1,value,color,outerpos,heart,invert)
  1252. local type = type
  1253. local rng = Instance.new("Part", char)
  1254. rng.Anchored = true
  1255. rng.BrickColor = color
  1256. rng.CanCollide = false
  1257. rng.FormFactor = 3
  1258. rng.Name = "Ring"
  1259. rng.Material = "Neon"
  1260. rng.Size = Vector3.new(1, 1, 1)
  1261. rng.Transparency = 0
  1262. rng.TopSurface = 0
  1263. rng.BottomSurface = 0
  1264. rng.CFrame = pos
  1265. rng.CFrame = rng.CFrame + rng.CFrame.lookVector*outerpos
  1266. local rngm = Instance.new("SpecialMesh", rng)
  1267. rngm.MeshType = "Brick"
  1268. if(heart)then
  1269. rngm.MeshType = Enum.MeshType.FileMesh
  1270. rngm.MeshId = "rbxassetid://105992239"
  1271. rngm.Offset = Vector3.new(0,0,-.25)
  1272. end
  1273. rngm.Scale = vt(x1,y1,z1)
  1274. if rainbowmode == true then
  1275. rng.Color = Color3.new(r/255,g/255,b/255)
  1276. end
  1277. local scaler2 = 0
  1278. local speeder = FastSpeed/10
  1279. if type == "Add" then
  1280. scaler2 = 1*value
  1281. elseif type == "Divide" then
  1282. scaler2 = 1/value
  1283. end
  1284. coroutine.resume(coroutine.create(function()
  1285. for i = 0,10/bonuspeed,0.1 do
  1286. swait()
  1287. if rainbowmode == true then
  1288. rng.Color = Color3.new(r/255,g/255,b/255)
  1289. end
  1290. if type == "Add" then
  1291. scaler2 = scaler2 - 0.01*value/bonuspeed
  1292. elseif type == "Divide" then
  1293. scaler2 = scaler2 - 0.01/value*bonuspeed
  1294. end
  1295. if chaosmode == true then
  1296. rng.BrickColor = BrickColor.random()
  1297. end
  1298. if glitchymode then
  1299. local val = math.random(1,255)
  1300. local color = Color3.fromRGB(val,val,val)
  1301. rng.Color = color
  1302. end
  1303. speeder = speeder + 0.01*FastSpeed*bonuspeed/10
  1304. rng.CFrame = rng.CFrame + rng.CFrame.lookVector*speeder*bonuspeed
  1305. if(invert)then rng.CFrame = rng.CFrame - rng.CFrame.lookVector*speeder*bonuspeed else rng.CFrame = rng.CFrame + rng.CFrame.lookVector*speeder*bonuspeed end
  1306. --rng.Transparency = rng.Transparency + 0.01*bonuspeed
  1307. rngm.Scale = rngm.Scale - Vector3.new(scaler2*bonuspeed, scaler2*bonuspeed, scaler2*bonuspeed)
  1308. end
  1309. rng:Destroy()
  1310. end))
  1311. end
  1312.  
  1313. function sphereMK(bonuspeed,FastSpeed,type,pos,x1,y1,z1,value,color,outerpos)
  1314. local type = type
  1315. local rng = Instance.new("Part", char)
  1316. rng.Anchored = true
  1317. rng.BrickColor = color
  1318. rng.CanCollide = false
  1319. rng.FormFactor = 3
  1320. rng.Name = "Ring"
  1321. rng.Material = "Neon"
  1322. rng.Size = Vector3.new(1, 1, 1)
  1323. rng.Transparency = 0
  1324. rng.TopSurface = 0
  1325. rng.BottomSurface = 0
  1326. rng.CFrame = pos
  1327. rng.CFrame = rng.CFrame + rng.CFrame.lookVector*outerpos
  1328. local rngm = Instance.new("SpecialMesh", rng)
  1329. rngm.MeshType = "Sphere"
  1330. rngm.Scale = vt(x1,y1,z1)
  1331. if rainbowmode == true then
  1332. rng.Color = Color3.new(r/255,g/255,b/255)
  1333. end
  1334. local scaler2 = 1
  1335. local speeder = FastSpeed
  1336. if type == "Add" then
  1337. scaler2 = 1*value
  1338. elseif type == "Divide" then
  1339. scaler2 = 1/value
  1340. end
  1341. coroutine.resume(coroutine.create(function()
  1342. for i = 0,10/bonuspeed,0.1 do
  1343. swait()
  1344. if rainbowmode == true then
  1345. rng.Color = Color3.new(r/255,g/255,b/255)
  1346. end
  1347. if type == "Add" then
  1348. scaler2 = scaler2 - 0.01*value/bonuspeed
  1349. elseif type == "Divide" then
  1350. scaler2 = scaler2 - 0.01/value*bonuspeed
  1351. end
  1352. if chaosmode == true then
  1353. rng.BrickColor = BrickColor.random()
  1354. end
  1355. if glitchymode then
  1356. local val = math.random(1,255)
  1357. local color = Color3.fromRGB(val,val,val)
  1358. rng.Color = color
  1359. end
  1360. speeder = speeder - 0.01*FastSpeed*bonuspeed
  1361. rng.CFrame = rng.CFrame + rng.CFrame.lookVector*speeder*bonuspeed
  1362. rng.Transparency = rng.Transparency + 0.01*bonuspeed
  1363. rngm.Scale = rngm.Scale + Vector3.new(scaler2*bonuspeed, scaler2*bonuspeed, 0)
  1364. end
  1365. rng:Destroy()
  1366. end))
  1367. end
  1368.  
  1369. function Pillar(bonuspeed,FastSpeed,type,pos,x1,y1,z1,value,color,outerpos)
  1370. local type = type
  1371. local rng = script.Pillar:Clone()
  1372. rng.Parent = workspace["xDivern"]
  1373. rng.Anchored = true
  1374. rng.BrickColor = color
  1375. rng.CanCollide = false
  1376. rng.Name = "Ring"
  1377. rng.Material = "Neon"
  1378. rng.Size = Vector3.new(x1, y1, z1)
  1379. rng.Transparency = 0
  1380. rng.TopSurface = 0
  1381. rng.BottomSurface = 0
  1382. rng.CFrame = pos
  1383. rng.CFrame = rng.CFrame + rng.CFrame.lookVector*outerpos
  1384. local scaler2 = 1
  1385. local speeder = FastSpeed
  1386. if type == "Add" then
  1387. scaler2 = 1*value
  1388. elseif type == "Divide" then
  1389. scaler2 = 1/value
  1390. end
  1391. coroutine.resume(coroutine.create(function()
  1392. for i = 0,10/bonuspeed,0.1 do
  1393. swait()
  1394. if type == "Add" then
  1395. scaler2 = scaler2 - 0.01*value/bonuspeed
  1396. elseif type == "Divide" then
  1397. scaler2 = scaler2 - 0.01/value*bonuspeed
  1398. end
  1399. speeder = speeder - 0.01*FastSpeed*bonuspeed
  1400. rng.CFrame = rng.CFrame + Vector3.new(0,0.05,0)
  1401. rng.Transparency = rng.Transparency + 0.01*bonuspeed
  1402. end
  1403. rng:Destroy()
  1404. end))
  1405. end
  1406.  
  1407. function sphere2(bonuspeed,type,pos,scale,value,value2,value3,color)
  1408. local type = type
  1409. local rng = Instance.new("Part", char)
  1410. rng.Anchored = true
  1411. rng.BrickColor = color
  1412. rng.CanCollide = false
  1413. rng.FormFactor = 3
  1414. rng.Name = "Ring"
  1415. rng.Material = "Neon"
  1416. rng.Size = Vector3.new(1, 1, 1)
  1417. rng.Transparency = 0
  1418. rng.TopSurface = 0
  1419. rng.BottomSurface = 0
  1420. rng.CFrame = pos
  1421. local rngm = Instance.new("SpecialMesh", rng)
  1422. rngm.MeshType = "Sphere"
  1423. rngm.Scale = scale
  1424. local scaler2 = 1
  1425. local scaler2b = 1
  1426. local scaler2c = 1
  1427. if type == "Add" then
  1428. scaler2 = 1*value
  1429. scaler2b = 1*value2
  1430. scaler2c = 1*value3
  1431. elseif type == "Divide" then
  1432. scaler2 = 1/value
  1433. scaler2b = 1/value2
  1434. scaler2c = 1/value3
  1435. end
  1436. coroutine.resume(coroutine.create(function()
  1437. for i = 0,10/bonuspeed,0.1 do
  1438. swait()
  1439. if type == "Add" then
  1440. scaler2 = scaler2 - 0.01*value/bonuspeed
  1441. scaler2b = scaler2b - 0.01*value/bonuspeed
  1442. scaler2c = scaler2c - 0.01*value/bonuspeed
  1443. elseif type == "Divide" then
  1444. scaler2 = scaler2 - 0.01/value*bonuspeed
  1445. scaler2b = scaler2b - 0.01/value*bonuspeed
  1446. scaler2c = scaler2c - 0.01/value*bonuspeed
  1447. end
  1448. rng.Transparency = rng.Transparency + 0.01*bonuspeed
  1449. rngm.Scale = rngm.Scale + Vector3.new(scaler2*bonuspeed, scaler2b*bonuspeed, scaler2c*bonuspeed)
  1450. end
  1451. rng:Destroy()
  1452. end))
  1453. end
  1454.  
  1455. function Beamring(col,pos,bonsize,esize,fasten,textr)
  1456. local sa = script.Objects.Ring:Clone()
  1457. sa.Parent = char
  1458. sa.CFrame = pos
  1459. local bem = sa.Beam
  1460. if textr ~= nil then
  1461. bem.Texture = "rbxassetid://" ..textr
  1462. end
  1463. local at1 = sa.a1
  1464. local at2 = sa.a2
  1465. at1.Position = vt(0,0,0.5*esize)
  1466. at2.Position = vt(0,0,-0.5*esize)
  1467. bem.Width0 = 1*esize
  1468. bem.Width1 = 1*esize
  1469. bem.Color = ColorSequence.new(col)
  1470. coroutine.resume(coroutine.create(function()
  1471. local trans = 0
  1472. for i = 0, 99/fasten do
  1473. swait()
  1474. trans = trans + 0.01*fasten
  1475. bem.Transparency = NumberSequence.new({NumberSequenceKeypoint.new(0,trans,0),NumberSequenceKeypoint.new(1,trans,0)})
  1476. at1.Position = at1.Position + vt(0,0,0.5*bonsize*fasten)
  1477. at2.Position = at2.Position - vt(0,0,0.5*bonsize*fasten)
  1478. bem.Width0 = bem.Width0 + 1*bonsize*fasten
  1479. bem.Width1 = bem.Width1 + 1*bonsize*fasten
  1480. end
  1481. sa:Destroy()
  1482. end))
  1483. end
  1484.  
  1485. function sphereMKCharge(bonuspeed,FastSpeed,type,pos,x1,y1,z1,value,color,outerpos)
  1486. local type = type
  1487. local rng = Instance.new("Part", char)
  1488. rng.Anchored = true
  1489. rng.BrickColor = color
  1490. rng.CanCollide = false
  1491. rng.FormFactor = 3
  1492. rng.Name = "Ring"
  1493. rng.Material = "Neon"
  1494. rng.Size = Vector3.new(1, 1, 1)
  1495. rng.Transparency = 1
  1496. rng.TopSurface = 0
  1497. rng.BottomSurface = 0
  1498. rng.CFrame = pos
  1499. rng.CFrame = rng.CFrame + rng.CFrame.lookVector*outerpos
  1500. local rngm = Instance.new("SpecialMesh", rng)
  1501. rngm.MeshType = "Sphere"
  1502. rngm.Scale = vt(x1,y1,z1)
  1503. if rainbowmode == true then
  1504. rng.Color = Color3.new(r/255,g/255,b/255)
  1505. end
  1506. local scaler2 = 1
  1507. local speeder = FastSpeed
  1508. if type == "Add" then
  1509. scaler2 = 1*value
  1510. elseif type == "Divide" then
  1511. scaler2 = 1/value
  1512. end
  1513. coroutine.resume(coroutine.create(function()
  1514. for i = 0,10/bonuspeed,0.1 do
  1515. swait()
  1516. if rainbowmode == true then
  1517. rng.Color = Color3.new(r/255,g/255,b/255)
  1518. end
  1519. if type == "Add" then
  1520. scaler2 = scaler2 - 0.01*value/bonuspeed
  1521. elseif type == "Divide" then
  1522. scaler2 = scaler2 - 0.01/value*bonuspeed
  1523. end
  1524. if chaosmode == true then
  1525. rng.BrickColor = BrickColor.random()
  1526. end
  1527. if glitchymode then
  1528. local val = math.random(1,255)
  1529. local color = Color3.fromRGB(val,val,val)
  1530. rng.Color = color
  1531. end
  1532. speeder = speeder - 0.01*FastSpeed*bonuspeed
  1533. rng.CFrame = rng.CFrame + rng.CFrame.lookVector*speeder*bonuspeed
  1534. rng.Transparency = rng.Transparency - 0.01*bonuspeed
  1535. rngm.Scale = rngm.Scale + Vector3.new(scaler2*bonuspeed, scaler2*bonuspeed, 0)
  1536. end
  1537. rng:Destroy()
  1538. end))
  1539. end
  1540.  
  1541. function dmg(dude)
  1542. if dude.Name ~= Character then
  1543. local bgf = Instance.new("BodyGyro",dude.Head)
  1544. bgf.CFrame = bgf.CFrame * CFrame.fromEulerAnglesXYZ(math.rad(-90),0,0)
  1545. local val = Instance.new("BoolValue",dude)
  1546. val.Name = "IsHit"
  1547. local ds = coroutine.wrap(function()
  1548. local torso = dude:FindFirstChild'Torso' or dude:FindFirstChild'UpperTorso'
  1549. for i = 1, 10 do
  1550. sphereMK(1.5,2,"Add",torso.CFrame*CFrame.Angles(math.rad(math.random(-360,360)),math.rad(math.random(-360,360)),math.rad(math.random(-360,360))),1,1,25,-.01,BrickColor.new("White"),0,true)
  1551. end
  1552. dude:WaitForChild("Head"):BreakJoints()
  1553. wait(0.5)
  1554. targetted = nil
  1555. CFuncs["Sound"].Create("rbxassetid://62339698", char, 0.5, 0.3)
  1556.  
  1557. coroutine.resume(coroutine.create(function()
  1558. for i, v in pairs(dude:GetChildren()) do
  1559. if v:IsA("Accessory") then
  1560. v:Destroy()
  1561. end
  1562. if v:IsA("Humanoid") then
  1563. v:Destroy()
  1564. end
  1565. if v:IsA("CharacterMesh") then
  1566. v:Destroy()
  1567. end
  1568. if v:IsA("Model") then
  1569. v:Destroy()
  1570. end
  1571. if v:IsA("Part") or v:IsA("MeshPart") then
  1572. for x, o in pairs(v:GetChildren()) do
  1573. if o:IsA("Decal") then
  1574. o:Destroy()
  1575. end
  1576. end
  1577. coroutine.resume(coroutine.create(function()
  1578. v.Material = "Neon"
  1579. v.CanCollide = false
  1580. local bld = Instance.new("ParticleEmitter",v)
  1581. bld.LightEmission = 1
  1582. bld.Texture = "rbxassetid://284205403"
  1583. bld.Color = ColorSequence.new(Color3.new(1,1,1))
  1584. bld.Rate = 50
  1585. bld.Lifetime = NumberRange.new(1)
  1586. bld.Size = NumberSequence.new({NumberSequenceKeypoint.new(0,0.75,0),NumberSequenceKeypoint.new(1,0,0)})
  1587. bld.Transparency = NumberSequence.new({NumberSequenceKeypoint.new(0,0,0),NumberSequenceKeypoint.new(1,1,0)})
  1588. bld.Speed = NumberRange.new(0,0)
  1589. bld.VelocitySpread = 50000
  1590. bld.Rotation = NumberRange.new(-500,500)
  1591. bld.RotSpeed = NumberRange.new(-500,500)
  1592. local sbs = Instance.new("BodyPosition", v)
  1593. sbs.P = 3000
  1594. sbs.D = 1000
  1595. sbs.maxForce = Vector3.new(50000000000, 50000000000, 50000000000)
  1596. sbs.position = v.Position + Vector3.new(math.random(-5,5),math.random(-5,5),math.random(-5,5))
  1597. v.Color = Color3.new(1,1,1)
  1598. coroutine.resume(coroutine.create(function()
  1599. for i = 0, 49 do
  1600. swait(1)
  1601. v.Transparency = v.Transparency + 0.02
  1602. end
  1603. CFuncs["Sound"].Create("rbxassetid://1192402877", v, 0.25, 1)
  1604. bld.Speed = NumberRange.new(1,5)
  1605. bld.Acceleration = vt(0,10,0)
  1606. wait(0.5)
  1607. bld.Enabled = false
  1608. wait(3)
  1609. v:Destroy()
  1610. dude:Destroy()
  1611. end))
  1612. end))
  1613. end
  1614. end
  1615. end))
  1616. end)
  1617. ds()
  1618. end
  1619. end
  1620.  
  1621.  
  1622. function FindNearestHead(Position, Distance, SinglePlayer)
  1623. if SinglePlayer then
  1624. return (SinglePlayer.Torso.CFrame.p - Position).magnitude < Distance
  1625. end
  1626. local List = {}
  1627. for i, v in pairs(workspace:GetChildren()) do
  1628. if v:IsA("Model") then
  1629. if v:findFirstChild("Head") then
  1630. if v ~= Character then
  1631. if (v.Head.Position - Position).magnitude <= Distance then
  1632. table.insert(List, v)
  1633. end
  1634. end
  1635. end
  1636. end
  1637. end
  1638. return List
  1639. end
  1640.  
  1641. function FaceMouse()
  1642. Cam = workspace.CurrentCamera
  1643. return {
  1644. CFrame.new(char.Torso.Position, Vector3.new(mouse.Hit.p.x, char.Torso.Position.y, mouse.Hit.p.z)),
  1645. Vector3.new(mouse.Hit.p.x, mouse.Hit.p.y, mouse.Hit.p.z)
  1646. }
  1647. end
  1648.  
  1649. function FaceMouse2()
  1650. Cam = workspace.CurrentCamera
  1651. return {
  1652. CFrame.new(char.Torso.Position, Vector3.new(mouse.Hit.p.x, mouse.Hit.p.y, mouse.Hit.p.z)),
  1653. Vector3.new(mouse.Hit.p.x, mouse.Hit.p.y, mouse.Hit.p.z)
  1654. }
  1655. end
  1656.  
  1657. local ModeOfGlitch = 1
  1658.  
  1659. function CreatePart(Parent, Material, Reflectance, Transparency, BColor, Name, Size)
  1660. local Part = Create("Part")({
  1661. Parent = Parent,
  1662. Reflectance = Reflectance,
  1663. Transparency = Transparency,
  1664. CanCollide = false,
  1665. Locked = true,
  1666. BrickColor = BrickColor.new(tostring(BColor)),
  1667. Name = Name,
  1668. Size = Size,
  1669. Material = Material
  1670. })
  1671. Part.CustomPhysicalProperties = PhysicalProperties.new(0.001, 0.001, 0.001, 0.001, 0.001)
  1672. return Part
  1673. end
  1674.  
  1675. function chatfunc(text,color)
  1676. local chat = coroutine.wrap(function()
  1677. if Character:FindFirstChild("TalkingBillBoard")~= nil then
  1678. Character:FindFirstChild("TalkingBillBoard"):destroy()
  1679. end
  1680. local naeeym2 = Instance.new("BillboardGui",Character)
  1681. naeeym2.Size = UDim2.new(0,100,0,40)
  1682. naeeym2.StudsOffset = Vector3.new(0,3,0)
  1683. naeeym2.Adornee = Character.Head
  1684. naeeym2.Name = "TalkingBillBoard"
  1685. local tecks2 = Instance.new("TextLabel",naeeym2)
  1686. tecks2.BackgroundTransparency = 1
  1687. tecks2.BorderSizePixel = 0
  1688. tecks2.Text = ""
  1689. tecks2.Font = "SciFi"
  1690. tecks2.TextSize = 30
  1691. tecks2.TextStrokeTransparency = 0
  1692. tecks2.TextColor3 = color
  1693. tecks2.TextStrokeColor3 = Color3.new(0,0,0)
  1694. tecks2.Size = UDim2.new(1,0,0.5,0)
  1695. local tecks3 = Instance.new("TextLabel",naeeym2)
  1696. tecks3.BackgroundTransparency = 1
  1697. tecks3.BorderSizePixel = 0
  1698. tecks3.Text = ""
  1699. tecks3.Font = "SciFi"
  1700. tecks3.TextSize = 30
  1701. tecks3.TextStrokeTransparency = 0
  1702. tecks3.TextColor3 = Color3.new(0,0,0)
  1703. tecks3.TextStrokeColor3 = color
  1704. tecks3.Size = UDim2.new(1,0,0.5,0)
  1705. coroutine.resume(coroutine.create(function()
  1706. while true do
  1707. swait(1)
  1708. tecks2.Position = UDim2.new(0,math.random(-5,5),0,math.random(-5,5))
  1709. tecks3.Position = UDim2.new(0,math.random(-5,5),0,math.random(-5,5))
  1710. tecks2.Rotation = math.random(-5,5)
  1711. tecks3.Rotation = math.random(-5,5)
  1712. end
  1713. end))
  1714. for i = 1,string.len(text),1 do
  1715. CFuncs["Sound"].Create("rbxassetid://274118116", char, 0.25, 0.115)
  1716. tecks2.Text = string.sub(text,1,i)
  1717. tecks3.Text = string.sub(text,1,i)
  1718. swait(1)
  1719. end
  1720. wait(1)
  1721. local randomrot = math.random(1,2)
  1722. if randomrot == 1 then
  1723. for i = 1, 50 do
  1724. swait()
  1725. tecks2.Rotation = tecks2.Rotation - .75
  1726. tecks2.TextStrokeTransparency = tecks2.TextStrokeTransparency +.04
  1727. tecks2.TextTransparency = tecks2.TextTransparency + .04
  1728. tecks3.Rotation = tecks2.Rotation + .75
  1729. tecks3.TextStrokeTransparency = tecks2.TextStrokeTransparency +.04
  1730. tecks3.TextTransparency = tecks2.TextTransparency + .04
  1731. end
  1732. elseif randomrot == 2 then
  1733. for i = 1, 50 do
  1734. swait()
  1735. tecks2.Rotation = tecks2.Rotation + .75
  1736. tecks2.TextStrokeTransparency = tecks2.TextStrokeTransparency +.04
  1737. tecks2.TextTransparency = tecks2.TextTransparency + .04
  1738. tecks3.Rotation = tecks2.Rotation - .75
  1739. tecks3.TextStrokeTransparency = tecks2.TextStrokeTransparency +.04
  1740. tecks3.TextTransparency = tecks2.TextTransparency + .04
  1741. end
  1742. end
  1743. naeeym2:Destroy()
  1744. end)
  1745. chat()
  1746. end
  1747.  
  1748. local NewInstance = function(instance,parent,properties)
  1749. local inst = Instance.new(instance,parent)
  1750. if(properties)then
  1751. for i,v in next, properties do
  1752. pcall(function() inst[i] = v end)
  1753. end
  1754. end
  1755. return inst;
  1756. end
  1757.  
  1758. FXFolder = script.Effects
  1759.  
  1760. function CamShake(who,data)
  1761. coroutine.wrap(function()
  1762. if(FXFolder:FindFirstChild'CamShake')then
  1763. local cam = FXFolder.CamShake:Clone()
  1764. cam:WaitForChild'intensity'.Value = data.Intensity or 5
  1765. cam:WaitForChild'duration'.Value = data.Duration or 5
  1766. cam:WaitForChild'speed'.Value = data.Speed or 10;
  1767. if(data.Origin)then NewInstance((typeof(data.Origin) == 'Instance' and "ObjectValue" or typeof(data.Origin) == 'Vector3' and 'Vector3Value' or typeof(data.Origin)=='CFrame' and 'CFrameValue'),cam,{Name='origin',Value=data.Origin}) end
  1768. cam:WaitForChild'rot'.Value = data.Rotation or Vector3.new(1,1,5)
  1769. cam:WaitForChild'pos'.Value = data.Position or Vector3.new(.5,.5,.5)
  1770. cam:WaitForChild'startdist'.Value = data.DropDist or 25;
  1771. cam:WaitForChild'enddist'.Value = data.IneffectiveDist or 150;
  1772.  
  1773. cam.Parent = who
  1774. wait()
  1775. cam.Disabled = false
  1776. end
  1777. end)()
  1778. end
  1779.  
  1780. function CamShakeAll(data)
  1781. for _,v in next, game:service'Players':players() do
  1782. CamShake(v:FindFirstChildOfClass'PlayerGui' or v:FindFirstChildOfClass'Backpack' or v.Character,data)
  1783. end
  1784. end
  1785.  
  1786. -- Damage functions --
  1787.  
  1788. DoDamage = true
  1789.  
  1790. function Vanish(person)
  1791. local human = nil
  1792. human = person:FindFirstChildOfClass("Humanoid")
  1793. if human ~= nil then
  1794. game:GetService("Debris"):AddItem(person,5)
  1795. human:Destroy()
  1796. for i,v in pairs(person:GetDescendants()) do
  1797. if v:IsA("Sound") then
  1798. v.Pitch = 0
  1799. v.Volume = 0
  1800. v:Destroy()
  1801. end
  1802. if v:IsA("Shirt") or v:IsA("Pants") or v:IsA("Decal") or v:IsA("Texture") then
  1803. v:Destroy()
  1804. end
  1805. if v:IsA("Part") or v:IsA("MeshPart") then
  1806. coroutine.resume(coroutine.create(function()
  1807. v.Material = "Neon"
  1808. v.Anchored = true
  1809. v.Color = Color3.new(1,1,1)
  1810. for i = 0, 49 do
  1811. swait()
  1812. v.Transparency = v.Transparency + 0.02
  1813. end
  1814. v.Parent = nil
  1815. end))
  1816. end
  1817. end
  1818. end
  1819. end
  1820.  
  1821. function Damagefunc(Part, hit, minim, maxim, knockback, Type, Property, Delay, HitSound, HitPitch)
  1822. if DoDamage == true then
  1823. if hit.Parent == nil then
  1824. return
  1825. end
  1826. local h = hit.Parent:FindFirstChildOfClass("Humanoid")
  1827. for _, v in pairs(hit.Parent:children()) do
  1828. if v:IsA("Humanoid") then
  1829. h = v
  1830. end
  1831. end
  1832. if h ~= nil and hit.Parent.Name ~= Character.Name and hit.Parent:FindFirstChild("Head") ~= nil then
  1833. if hit.Parent:findFirstChild("DebounceHit") ~= nil and hit.Parent.DebounceHit.Value == true then
  1834. return
  1835. end
  1836. local c = Create("ObjectValue")({
  1837. Name = "creator",
  1838. Value = game:GetService("Players").LocalPlayer,
  1839. Parent = h
  1840. })
  1841. game:GetService("Debris"):AddItem(c, 0.5)
  1842. if HitSound ~= nil and HitPitch ~= nil then
  1843. CFuncs.Sound.Create(HitSound, hit, 1, HitPitch)
  1844. end
  1845. local Damage = math.random(minim, maxim)
  1846. local blocked = false
  1847. local block = hit.Parent:findFirstChild("Block")
  1848. if block ~= nil and block.className == "IntValue" and block.Value > 0 then
  1849. blocked = true
  1850. block.Value = block.Value - 1
  1851. print(block.Value)
  1852. end
  1853. if blocked == false then
  1854. local HitHealth = h.Health
  1855. --h.MaxHealth = 100 let it
  1856.  
  1857. h.Health = h.Health - Damage
  1858. if HitHealth ~= h.Health and HitHealth ~= 0 and 0 >= h.Health and h.Parent.Name ~= "Hologram" then
  1859. --print("gained kill")
  1860. dmg(h.Parent)
  1861. end
  1862. else
  1863. h.Health = h.Health - Damage / 2
  1864. end
  1865. if Type == "Knockdown" then
  1866. local hum = hit.Parent.Humanoid
  1867. hum.PlatformStand = true
  1868. coroutine.resume(coroutine.create(function(HHumanoid)
  1869. swait(1)
  1870. HHumanoid.PlatformStand = false
  1871. end), hum)
  1872. local angle = hit.Position - (Property.Position + Vector3.new(0, 0, 0)).unit
  1873. local bodvol = Create("BodyVelocity")({
  1874. velocity = angle * knockback,
  1875. P = 5000,
  1876. maxForce = Vector3.new(8000, 8000, 8000),
  1877. Parent = hit
  1878. })
  1879. local rl = Create("BodyAngularVelocity")({
  1880. P = 3000,
  1881. maxTorque = Vector3.new(500000, 500000, 500000) * 50000000000000,
  1882. angularvelocity = Vector3.new(math.random(-10, 10), math.random(-10, 10), math.random(-10, 10)),
  1883. Parent = hit
  1884. })
  1885. game:GetService("Debris"):AddItem(bodvol, 0.5)
  1886. game:GetService("Debris"):AddItem(rl, 0.5)
  1887. elseif Type == "Normal" then
  1888. local vp = Create("BodyVelocity")({
  1889. P = 500,
  1890. maxForce = Vector3.new(math.huge, 0, math.huge),
  1891. velocity = Property.CFrame.lookVector * knockback + Property.Velocity / 1.05
  1892. })
  1893. if knockback > 0 and hit.Parent:FindFirstChild'Head' then
  1894. vp.Parent = hit.Parent.Head
  1895. end
  1896. game:GetService("Debris"):AddItem(vp, 0.5)
  1897. elseif Type == "Up" then
  1898. local bodyVelocity = Create("BodyVelocity")({
  1899. velocity = Vector3.new(0, 20, 0),
  1900. P = 5000,
  1901. maxForce = Vector3.new(8000, 8000, 8000),
  1902. Parent = hit
  1903. })
  1904. game:GetService("Debris"):AddItem(bodyVelocity, 0.5)
  1905. local bodyVelocity = Create("BodyVelocity")({
  1906. velocity = Vector3.new(0, 20, 0),
  1907. P = 5000,
  1908. maxForce = Vector3.new(8000, 8000, 8000),
  1909. Parent = hit
  1910. })
  1911. game:GetService("Debris"):AddItem(bodyVelocity, 1)
  1912. elseif Type == "Leech" then
  1913. local hum = hit.Parent.Humanoid
  1914. if hum ~= nil then
  1915. for i = 0, 2 do
  1916. Effects.Sphere.Create(BrickColor.new("Bright red"), hit.Parent.Torso.CFrame * cn(0, 0, 0) * angles(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50)), 1, 15, 1, 0, 5, 0, 0.02)
  1917. end
  1918. Humanoid.Health = Humanoid.Health + 10
  1919. end
  1920. elseif Type == "Tree" then
  1921. Torpefy(hit.Parent)
  1922. elseif Type == "UpKnock" then
  1923. local hum = hit.Parent.Humanoid
  1924. hum.PlatformStand = true
  1925. if hum ~= nil then
  1926. hitr = true
  1927. end
  1928. coroutine.resume(coroutine.create(function(HHumanoid)
  1929. swait(5)
  1930. HHumanoid.PlatformStand = false
  1931. hitr = false
  1932. end), hum)
  1933. local bodyVelocity = Create("BodyVelocity")({
  1934. velocity = Vector3.new(0, 20, 0),
  1935. P = 5000,
  1936. maxForce = Vector3.new(8000, 8000, 8000),
  1937. Parent = hit
  1938. })
  1939. game:GetService("Debris"):AddItem(bodyVelocity, 0.5)
  1940. local bodyVelocity = Create("BodyVelocity")({
  1941. velocity = Vector3.new(0, 20, 0),
  1942. P = 5000,
  1943. maxForce = Vector3.new(8000, 8000, 8000),
  1944. Parent = hit
  1945. })
  1946. game:GetService("Debris"):AddItem(bodyVelocity, 1)
  1947. elseif Type == "Snare" then
  1948. local bp = Create("BodyPosition")({
  1949. P = 2000,
  1950. D = 100,
  1951. maxForce = Vector3.new(math.huge, math.huge, math.huge),
  1952. position = hit.Parent.Torso.Position,
  1953. Parent = hit.Parent.Torso
  1954. })
  1955. game:GetService("Debris"):AddItem(bp, 1)
  1956. elseif Type == "Slashnare" then
  1957. Effects.Block.Create(BrickColor.new("Pastel Blue"), hit.Parent.Torso.CFrame * cn(0, 0, 0), 15*4, 15*4, 15*4, 3*4, 3*4, 3*4, 0.07)
  1958. for i = 1, math.random(4, 5) do
  1959. Effects.Sphere.Create(BrickColor.new("Teal"), hit.Parent.Torso.CFrame * cn(math.random(-5, 5), math.random(-5, 5), math.random(-5, 5)) * angles(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50)), 1, 15, 1, 0, 5, 0, 0.02)
  1960. end
  1961. local bp = Create("BodyPosition")({
  1962. P = 2000,
  1963. D = 100,
  1964. maxForce = Vector3.new(math.huge, math.huge, math.huge),
  1965. position = hit.Parent.Torso.Position,
  1966. Parent = hit.Parent.Torso
  1967. })
  1968. game:GetService("Debris"):AddItem(bp, 1)
  1969. elseif Type == "Burn" then
  1970.  
  1971. local humss = hit.Parent:findFirstChildOfClass("Humanoid")
  1972. humss.PlatformStand = true
  1973. coroutine.resume(coroutine.create(function(HHumanoid)
  1974. swait(60)
  1975. HHumanoid.PlatformStand = false
  1976. end), humss)
  1977. local angle = hit.Position - (Property.Position + Vector3.new(0, 0, 0)).unit
  1978. local bodvol = Create("BodyVelocity")({
  1979. velocity = angle * knockback,
  1980. P = 5000,
  1981. maxForce = Vector3.new(8000, 8000, 8000),
  1982. Parent = hit
  1983. })
  1984. local rl = Create("BodyAngularVelocity")({
  1985. P = 3000,
  1986. maxTorque = Vector3.new(500000, 500000, 500000) * 50000000000000,
  1987. angularvelocity = Vector3.new(math.random(-10, 10), math.random(-10, 10), math.random(-10, 10)),
  1988. Parent = hit
  1989. })
  1990. game:GetService("Debris"):AddItem(bodvol, 0.5)
  1991. game:GetService("Debris"):AddItem(rl, 0.5)
  1992.  
  1993. coroutine.resume(coroutine.create(function()
  1994. if hit.Parent:findFirstChild("Torso")then
  1995. local hitoor=hit.Parent:findFirstChild("Torso")
  1996. local da = script.Effects.Flame:Clone()
  1997. da.Parent = hitoor
  1998. da.Enabled = true
  1999. local BURNBABYBURN = Create("Sound"){
  2000. Volume = 1,
  2001. Name = "asdawdwadadw",
  2002. Pitch = 1.2,
  2003. Looped = true,
  2004. SoundId = "rbxassetid://1601946639",
  2005. Parent = hitoor,
  2006. }
  2007. BURNBABYBURN:play()
  2008. for i=1, 150 do
  2009. swait(5)
  2010. humss.Health = humss.Health - .4
  2011. end
  2012. da.Enabled = false
  2013. BURNBABYBURN:Remove()
  2014. game:GetService("Debris"):AddItem(da, 2)
  2015. end
  2016. end))
  2017.  
  2018. elseif Type == "Spike" then
  2019. -- CreateBigIceSword(hit.Parent.Torso.CFrame)
  2020. local bp = Create("BodyPosition")({
  2021. P = 2000,
  2022. D = 100,
  2023. maxForce = Vector3.new(math.huge, math.huge, math.huge),
  2024. position = hit.Parent.Torso.Position,
  2025. Parent = hit.Parent.Torso
  2026. })
  2027. game:GetService("Debris"):AddItem(bp, 1)
  2028. elseif Type == "Freeze" then
  2029. local BodPos = Create("BodyPosition")({
  2030. P = 50000,
  2031. D = 1000,
  2032. maxForce = Vector3.new(math.huge, math.huge, math.huge),
  2033. position = hit.Parent.Torso.Position,
  2034. Parent = hit.Parent.Torso
  2035. })
  2036. local BodGy = Create("BodyGyro")({
  2037. maxTorque = Vector3.new(400000, 400000, 400000) * math.huge,
  2038. P = 20000,
  2039. Parent = hit.Parent.Torso,
  2040. cframe = hit.Parent.Torso.CFrame
  2041. })
  2042. hit.Parent.Torso.Anchored = true
  2043. coroutine.resume(coroutine.create(function(Part)
  2044. swait(1.5)
  2045. Part.Anchored = false
  2046. end), hit.Parent.Torso)
  2047. game:GetService("Debris"):AddItem(BodPos, 3)
  2048. game:GetService("Debris"):AddItem(BodGy, 3)
  2049. end
  2050. local debounce = Create("BoolValue")({
  2051. Name = "DebounceHit",
  2052. Parent = hit.Parent,
  2053. Value = true
  2054. })
  2055. game:GetService("Debris"):AddItem(debounce, Delay)
  2056. c = Instance.new("ObjectValue")
  2057. c.Name = "creator"
  2058. c.Value = Player
  2059. c.Parent = h
  2060. game:GetService("Debris"):AddItem(c, 0.5)
  2061. end
  2062. elseif DoDamage == false then
  2063. print("Damage is disabled")
  2064. end
  2065. end
  2066. function MagniDamage(Part, magni, mindam, maxdam, knock, Type)
  2067. for _, c in pairs(workspace:children()) do
  2068. local hum = c:findFirstChildOfClass("Humanoid")
  2069. if hum ~= nil then
  2070. local head = c:findFirstChild("Head")
  2071. if head ~= nil then
  2072. local targ = head.Position - Part.Position
  2073. local mag = targ.magnitude
  2074. if magni >= mag and c.Name ~= Player.Name then
  2075. Damagefunc(head, head, mindam, maxdam, knock, Type, RootPart, 0.1, "rbxassetid://231917784", 1)
  2076. end
  2077. end
  2078. end
  2079. end
  2080. end
  2081.  
  2082. function MagniDamageWithEffect(Part, magni, mindam, maxdam, knock, Type)
  2083. for _, c in pairs(workspace:children()) do
  2084. local hum = c:findFirstChild("Humanoid")
  2085. if hum ~= nil then
  2086. local head = c:findFirstChild("Torso")
  2087. if head ~= nil then
  2088. local targ = head.Position - Part.Position
  2089. local mag = targ.magnitude
  2090. if magni >= mag and c.Name ~= Player.Name then
  2091. MagicBlock(BrickColor.new("Pastel light blue"),head.CFrame,5,5,5,1,1,1,0.05)
  2092. Damagefunc(head, head, mindam, maxdam, knock, Type, RootPart, 0.1, "rbxassetid://231917784", 1)
  2093. end
  2094. end
  2095. end
  2096. end
  2097. end
  2098.  
  2099. -- Attacks --
  2100.  
  2101. function volcaniceruption()
  2102. attack = true
  2103. hum.WalkSpeed = 2
  2104. chatfunc("I'll make you burnt toast!",Color3.new(1,0,0))
  2105. local volcano = script.Objects.Volcano:Clone()
  2106. volcano.Parent = char
  2107. volcano.Transparency = 1
  2108. volcano.CFrame = root.CFrame + root.CFrame.lookVector*150
  2109. for i = 1,20,0.1 do
  2110. swait()
  2111. RH.C0=clerp(RH.C0,cf(1,-1.1,0)*angles(math.rad(0),math.rad(85),math.rad(0))*angles(math.rad(-5),math.rad(0),math.rad(0)),.01)
  2112. LH.C0=clerp(LH.C0,cf(-1,-1.1,0)*angles(math.rad(0),math.rad(-85),math.rad(0))*angles(math.rad(-5),math.rad(0),math.rad(0)),.01)
  2113. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,.1)*angles(math.rad(0),math.rad(0),math.rad(-25)),.01)
  2114. Torso.Neck.C0=clerp(Torso.Neck.C0,necko*angles(math.rad(-15),math.rad(0),math.rad(25)),.01)
  2115. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*angles(math.rad(175),math.rad(0),math.rad(10)),.02)
  2116. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*angles(math.rad(175),math.rad(0),math.rad(-10)),.02)
  2117. volcano.Position = Vector3.new(volcano.Position.X,volcano.Position.Y + 0.1, volcano.Position.Z)
  2118. book1.Position = Vector3.new(RootPart.Position.X - math.sin(SINE/17) * 8, RootPart.Position.Y + 0.5 * math.cos(SINE / 25 + 30), RootPart.Position.Z - math.cos(SINE/17) * 8)
  2119. book3.Position = Vector3.new(RootPart.Position.X - math.sin(SINE/17) * 8, RootPart.Position.Y + - 1.5 + 0.5 * math.cos(SINE / 25 + 90), RootPart.Position.Z + math.cos(SINE/17) * 8)
  2120. book4.Position = Vector3.new(RootPart.Position.X + math.sin(SINE/17) * 8, RootPart.Position.Y + 3 + 0.5 * math.cos(SINE / 25 + 120), RootPart.Position.Z + math.cos(SINE/17) * 8)
  2121. book2.CFrame = hed.CFrame + root.CFrame.lookVector*4
  2122. book2.Position = Vector3.new(book2.Position.X,book2.Position.Y + 3 + 0.5 * math.cos(SINE / 25 + 120), book2.Position.Z)
  2123. book5.Position = Vector3.new(RootPart.Position.X - math.sin(SINE/14) * 6, RootPart.Position.Y + 1.5 + 0.5 * math.cos(SINE / 25 + 150), RootPart.Position.Z - math.cos(SINE/14) * 6)
  2124. book6.Position = Vector3.new(RootPart.Position.X - math.sin(SINE/14) * 6, RootPart.Position.Y - 0.5 * math.cos(SINE / 25 + 150), RootPart.Position.Z - math.cos(SINE/14) * 6)
  2125. book7.Position = Vector3.new(RootPart.Position.X - math.cos(SINE/14) * 3, RootPart.Position.Y + 5 + 1* math.cos(SINE / 35), RootPart.Position.Z - math.sin(SINE/14) * 3)
  2126. volcano.Transparency = 1 - (i * 5)/100
  2127. end
  2128. for i = 1,100 do
  2129. swait()
  2130. RH.C0=clerp(RH.C0,cf(1,-1.1,0)*angles(math.rad(0),math.rad(85),math.rad(0))*angles(math.rad(-5),math.rad(0),math.rad(0)),.01)
  2131. LH.C0=clerp(LH.C0,cf(-1,-1.1,0)*angles(math.rad(0),math.rad(-85),math.rad(0))*angles(math.rad(-5),math.rad(0),math.rad(0)),.01)
  2132. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,.1)*angles(math.rad(0),math.rad(0),math.rad(-25)),.01)
  2133. Torso.Neck.C0=clerp(Torso.Neck.C0,necko*angles(math.rad(-15),math.rad(0),math.rad(25)),.01)
  2134. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*angles(math.rad(175),math.rad(0),math.rad(10)),.02)
  2135. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*angles(math.rad(175),math.rad(0),math.rad(-10)),.02)
  2136. book1.Position = Vector3.new(RootPart.Position.X - math.sin(SINE/17) * 8, RootPart.Position.Y + 0.5 * math.cos(SINE / 25 + 30), RootPart.Position.Z - math.cos(SINE/17) * 8)
  2137. book3.Position = Vector3.new(RootPart.Position.X - math.sin(SINE/17) * 8, RootPart.Position.Y + - 1.5 + 0.5 * math.cos(SINE / 25 + 90), RootPart.Position.Z + math.cos(SINE/17) * 8)
  2138. book4.Position = Vector3.new(RootPart.Position.X + math.sin(SINE/17) * 8, RootPart.Position.Y + 3 + 0.5 * math.cos(SINE / 25 + 120), RootPart.Position.Z + math.cos(SINE/17) * 8)
  2139. book2.CFrame = hed.CFrame + root.CFrame.lookVector*4
  2140. book2.Position = Vector3.new(book2.Position.X,book2.Position.Y + 3 + 0.5 * math.cos(SINE / 25 + 120), book2.Position.Z)
  2141. book5.Position = Vector3.new(RootPart.Position.X - math.sin(SINE/14) * 6, RootPart.Position.Y + 1.5 + 0.5 * math.cos(SINE / 25 + 150), RootPart.Position.Z - math.cos(SINE/14) * 6)
  2142. book6.Position = Vector3.new(RootPart.Position.X - math.sin(SINE/14) * 6, RootPart.Position.Y - 0.5 * math.cos(SINE / 25 + 150), RootPart.Position.Z - math.cos(SINE/14) * 6)
  2143. book7.Position = Vector3.new(RootPart.Position.X - math.cos(SINE/14) * 3, RootPart.Position.Y + 5 + 1* math.cos(SINE / 35), RootPart.Position.Z - math.sin(SINE/14) * 3)
  2144. coroutine.resume(coroutine.create(function()
  2145. local magma = Instance.new("Part",char)
  2146. magma.Position = Vector3.new(volcano.Position.X,volcano.Position.Y + 150, volcano.Position.Z)
  2147. magma.Size = Vector3.new(10,10,10)
  2148. magma.BrickColor = BrickColor.Red()
  2149. magma.Velocity = Vector3.new(math.random(-300,300),math.random(-300,300),math.random(-300,300))
  2150. swait(50)
  2151. for i = 1,100 do
  2152. swait(1)
  2153. MagniDamage(magma, 40, 3,5, 0, "Burn")
  2154. end
  2155. magma:Destroy()
  2156. end))
  2157. end
  2158. volcano:Destroy()
  2159. hum.WalkSpeed = 16
  2160. attack = false
  2161. end
  2162.  
  2163. local Alpha = .1
  2164.  
  2165. function LithosphereSpikes()
  2166. local distlook = 0
  2167. attack = true
  2168. hum.WalkSpeed = 0
  2169. chatfunc("Have fun flopping like a fish.",Color3.new(0.5,0.5,0))
  2170. for i = 1,10 do
  2171. swait()
  2172. RootJoint.C0 = RootJoint.C0:lerp(cf(-0.2,-1.4,-0.5)*angles(math.rad(-36),math.rad(-16.3),math.rad(0))*RootCF,Alpha)
  2173. LH.C0 = LH.C0:lerp(cf(-0.9,0.3,-0.1)*angles(math.rad(17.7),math.rad(15.6),math.rad(-4.9))*angles(math.rad(0),math.rad(-90),math.rad(0)),Alpha)
  2174. RH.C0 = RH.C0:lerp(cf(1.2,-1.2,-0.3)*angles(math.rad(-32.5),math.rad(13.9),math.rad(8.7))*angles(math.rad(0),math.rad(90),math.rad(0)),Alpha)
  2175. LW.C0 = LW.C0:lerp(cf(-1.5,0.3,-0.4)*angles(math.rad(43.5),math.rad(12),math.rad(-11.1)),Alpha)
  2176. RW.C0 = RW.C0:lerp(cf(0.9,0.2,-0.4)*angles(math.rad(41.2),math.rad(0),math.rad(-63.3)),Alpha)
  2177. Torso.Neck.C0 = Torso.Neck.C0:lerp(cf(0.1,0.2,0.4)*angles(math.rad(-29.6),math.rad(16.9),math.rad(9.4))*necko,Alpha)
  2178. book2.Position = Vector3.new(RootPart.Position.X + math.sin(SINE/17) * 8, RootPart.Position.Y + 0.5 * math.cos(SINE / 25 + 60), RootPart.Position.Z - math.cos(SINE/17) * 8)
  2179. book3.Position = Vector3.new(RootPart.Position.X - math.sin(SINE/17) * 8, RootPart.Position.Y + - 1.5 + 0.5 * math.cos(SINE / 25 + 90), RootPart.Position.Z + math.cos(SINE/17) * 8)
  2180. book4.Position = Vector3.new(RootPart.Position.X + math.sin(SINE/17) * 8, RootPart.Position.Y + 3 + 0.5 * math.cos(SINE / 25 + 120), RootPart.Position.Z + math.cos(SINE/17) * 8)
  2181. book1.CFrame = hed.CFrame + root.CFrame.lookVector*4
  2182. book1.Position = Vector3.new(book1.Position.X,book1.Position.Y + 3 + 0.5 * math.cos(SINE / 25 + 120), book1.Position.Z)
  2183. book5.Position = Vector3.new(RootPart.Position.X - math.sin(SINE/14) * 6, RootPart.Position.Y + 1.5 + 0.5 * math.cos(SINE / 25 + 150), RootPart.Position.Z - math.cos(SINE/14) * 6)
  2184. book6.Position = Vector3.new(RootPart.Position.X - math.sin(SINE/14) * 6, RootPart.Position.Y - 0.5 * math.cos(SINE / 25 + 150), RootPart.Position.Z - math.cos(SINE/14) * 6)
  2185. book7.Position = Vector3.new(RootPart.Position.X - math.cos(SINE/14) * 3, RootPart.Position.Y + 5 + 1* math.cos(SINE / 35), RootPart.Position.Z - math.sin(SINE/14) * 3)
  2186. coroutine.resume(coroutine.create(function()
  2187. local hite = script.Objects.Spike:Clone()
  2188. hite.Parent = char
  2189. hite.Transparency = 0
  2190. hite.Anchored = true
  2191. hite.CanCollide = false
  2192. hite.CFrame = root.CFrame + root.CFrame.lookVector*(distlook + 10)
  2193. distlook = distlook + 10
  2194. MagniDamage(hite, 10, 30,50, 0, "UpKnock")
  2195. swait(100)
  2196. for i = 1,30 do
  2197. swait()
  2198. hite.Position = hite.Position - Vector3.new(0,0.5,0)
  2199. hite.Transparency = i/30
  2200. end
  2201. hite:Destroy()
  2202. end))
  2203. end
  2204. attack = false
  2205. hum.WalkSpeed = 16
  2206. end
  2207.  
  2208. function Mountain()
  2209. attack = true
  2210. hum.WalkSpeed = 0
  2211. local a = Instance.new("Part",workspace)
  2212. a.Position = Torso.Position - Vector3.new(0,4,0)
  2213. a.Material = "Grass"
  2214. a.BrickColor = BrickColor.new("Earth green")
  2215. a.Anchored = true
  2216. a.Size = Vector3.new(10,1,10)
  2217. CamShakeAll({
  2218. Duration=0.5;
  2219. Intensity=5;
  2220. Position=Vector3.new(2,2,2);
  2221. Rotation=Vector3.new(2,2,6);
  2222. DropDist=1000;
  2223. IneffectiveDist=1000;
  2224. Origin=tors.Position;
  2225. })
  2226. for i = 1,50 do
  2227. swait()
  2228. RootJoint.C0 = RootJoint.C0:lerp(cf(-0.2,-1.4,-0.5)*angles(math.rad(-36),math.rad(-16.3),math.rad(0))*RootCF,Alpha)
  2229. LH.C0 = LH.C0:lerp(cf(-0.9,0.3,-0.1)*angles(math.rad(17.7),math.rad(15.6),math.rad(-4.9))*angles(math.rad(0),math.rad(-90),math.rad(0)),Alpha)
  2230. RH.C0 = RH.C0:lerp(cf(1.2,-1.2,-0.3)*angles(math.rad(-32.5),math.rad(13.9),math.rad(8.7))*angles(math.rad(0),math.rad(90),math.rad(0)),Alpha)
  2231. LW.C0 = LW.C0:lerp(cf(-1.5,0.3,-0.4)*angles(math.rad(43.5),math.rad(12),math.rad(-11.1)),Alpha)
  2232. RW.C0 = RW.C0:lerp(cf(0.9,0.2,-0.4)*angles(math.rad(41.2),math.rad(0),math.rad(-63.3)),Alpha)
  2233. Torso.Neck.C0 = Torso.Neck.C0:lerp(cf(0.1,0.2,0.4)*angles(math.rad(-29.6),math.rad(16.9),math.rad(9.4))*necko,Alpha)
  2234. book2.Position = Vector3.new(RootPart.Position.X + math.sin(SINE/17) * 8, RootPart.Position.Y + 0.5 * math.cos(SINE / 25 + 60), RootPart.Position.Z - math.cos(SINE/17) * 8)
  2235. book3.Position = Vector3.new(RootPart.Position.X - math.sin(SINE/17) * 8, RootPart.Position.Y + - 1.5 + 0.5 * math.cos(SINE / 25 + 90), RootPart.Position.Z + math.cos(SINE/17) * 8)
  2236. book4.Position = Vector3.new(RootPart.Position.X + math.sin(SINE/17) * 8, RootPart.Position.Y + 3 + 0.5 * math.cos(SINE / 25 + 120), RootPart.Position.Z + math.cos(SINE/17) * 8)
  2237. book1.CFrame = hed.CFrame + root.CFrame.lookVector*4
  2238. book1.Position = Vector3.new(book1.Position.X,book1.Position.Y + 3 + 0.5 * math.cos(SINE / 25 + 120), book1.Position.Z)
  2239. book5.Position = Vector3.new(RootPart.Position.X - math.sin(SINE/14) * 6, RootPart.Position.Y + 1.5 + 0.5 * math.cos(SINE / 25 + 150), RootPart.Position.Z - math.cos(SINE/14) * 6)
  2240. book6.Position = Vector3.new(RootPart.Position.X - math.sin(SINE/14) * 6, RootPart.Position.Y - 0.5 * math.cos(SINE / 25 + 150), RootPart.Position.Z - math.cos(SINE/14) * 6)
  2241. book7.Position = Vector3.new(RootPart.Position.X - math.cos(SINE/14) * 3, RootPart.Position.Y + 5 + 1* math.cos(SINE / 35), RootPart.Position.Z - math.sin(SINE/14) * 3)
  2242. a.Size = a.Size + Vector3.new(0,2,0)
  2243. end
  2244. attack = false
  2245. hum.WalkSpeed = 16
  2246. end
  2247.  
  2248. function LightningStrike()
  2249. chatfunc("Take it!",Color3.new(1,1,0))
  2250. CFuncs["EchoSound"].Create("rbxassetid://1625448638", root, 4, 1,0,10,0.15,0.5,1)
  2251. swait(30)
  2252. local a = Instance.new("Part",char)
  2253. a.Name = "Direction"
  2254. a.Anchored = true
  2255. a.BrickColor = BrickColor.new("New Yeller")
  2256. a.Material = "Neon"
  2257. a.Transparency = 1
  2258. a.Shape = "Cylinder"
  2259. local ray = Ray.new(
  2260. root.CFrame.p, -- origin
  2261. (mouse.Hit.p - root.CFrame.p).unit * 500 -- direction
  2262. )
  2263. local ignore = char
  2264. local hit, position, normal = workspace:FindPartOnRay(ray, ignore)
  2265. a.BottomSurface = 10
  2266. a.TopSurface = 10
  2267. local distance = (root.CFrame.p - position).magnitude
  2268. a.Size = Vector3.new(distance,1,1)
  2269. a.CFrame = CFrame.new(root.CFrame.p, position) * CFrame.new(1, 1, -distance)
  2270. local ht = Instance.new("Part",char)
  2271. ht.Name = "Hit"
  2272. ht.Anchored = true
  2273. MagniDamage(ht, 20, 10,15, 0, "Burn")
  2274. ht.CanCollide = false
  2275. ht.Transparency = 1
  2276. ht.Size = vt(0.1,0.1,0.1)
  2277. CFuncs["Sound"].Create("rbxassetid://782353443", char, 3, 1)
  2278. CFuncs["Sound"].Create("rbxassetid://763717897", char, 1, 1.35)
  2279. a.CanCollide = false
  2280. ht.Position = a.Position
  2281. sphere2(2,"Add",ht.CFrame,vt(24,24,24),2,2,2,BrickColor.new("New Yeller"))
  2282. sphere2(1,"Add",ht.CFrame,vt(1,100000,1),0.25,0.25,0.25,BrickColor.new("New Yeller"))
  2283. sphere2(1,"Add",ht.CFrame,vt(24,24,24),1,1,1,BrickColor.new("New Yeller"))
  2284. for i = 0, 9 do
  2285. Beamring(Color3.new(1,1,1),ht.CFrame*CFrame.new(0,0,0)*CFrame.Angles(math.rad(math.random(-360,360)),math.rad(math.random(-360,360)),math.rad(math.random(-360,360))),math.random(10,100)/10,0,math.random(1,5),348103573)
  2286. end
  2287. for i, v in pairs(FindNearestHead(ht.CFrame.p, 80)) do
  2288. if v:FindFirstChild('Head') then
  2289. MagniDamage(v.Head, 5, 10,15, 0, "Burn")
  2290. end
  2291. end
  2292. coroutine.resume(coroutine.create(function()
  2293. game:GetService("Debris"):AddItem(a,5)
  2294. game:GetService("Debris"):AddItem(ht,5)
  2295. end))
  2296. end
  2297.  
  2298. function DryFreeze()
  2299. attack = true
  2300. hum.WalkSpeed = 0
  2301. CFuncs["EchoSound"].Create("rbxassetid://1690476035", root, 10, 1,0.1,10,0.15,0.5,1)
  2302. for i = 1,100 do
  2303. swait()
  2304. RH.C0=clerp(RH.C0,cf(1,-1.1,0)*angles(math.rad(0),math.rad(85),math.rad(0))*angles(math.rad(-5),math.rad(0),math.rad(0)),.01)
  2305. LH.C0=clerp(LH.C0,cf(-1,-1.1,0)*angles(math.rad(0),math.rad(-85),math.rad(0))*angles(math.rad(-5),math.rad(0),math.rad(0)),.01)
  2306. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,.1)*angles(math.rad(0),math.rad(0),math.rad(-25)),.01)
  2307. Torso.Neck.C0=clerp(Torso.Neck.C0,necko*angles(math.rad(-15),math.rad(0),math.rad(25)),.01)
  2308. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*angles(math.rad(175),math.rad(0),math.rad(10)),.02)
  2309. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*angles(math.rad(175),math.rad(0),math.rad(-10)),.02)
  2310. book1.Position = Vector3.new(RootPart.Position.X - math.sin(SINE/17) * 8, RootPart.Position.Y + 0.5 * math.cos(SINE / 25 + 30), RootPart.Position.Z - math.cos(SINE/17) * 8)
  2311. book2.Position = Vector3.new(RootPart.Position.X + math.sin(SINE/17) * 8, RootPart.Position.Y + 0.5 * math.cos(SINE / 25 + 60), RootPart.Position.Z - math.cos(SINE/17) * 8)
  2312. book3.Position = Vector3.new(RootPart.Position.X - math.sin(SINE/17) * 8, RootPart.Position.Y + - 1.5 + 0.5 * math.cos(SINE / 25 + 90), RootPart.Position.Z + math.cos(SINE/17) * 8)
  2313. book4.CFrame = hed.CFrame + root.CFrame.lookVector*4
  2314. book4.Position = Vector3.new(book4.Position.X,book4.Position.Y + 3 + 0.5 * math.cos(SINE / 25 + 120), book4.Position.Z)
  2315. book5.Position = Vector3.new(RootPart.Position.X - math.sin(SINE/14) * 6, RootPart.Position.Y + 1.5 + 0.5 * math.cos(SINE / 25 + 150), RootPart.Position.Z - math.cos(SINE/14) * 6)
  2316. book6.Position = Vector3.new(RootPart.Position.X - math.sin(SINE/14) * 6, RootPart.Position.Y - 0.5 * math.cos(SINE / 25 + 150), RootPart.Position.Z - math.cos(SINE/14) * 6)
  2317. book7.Position = Vector3.new(RootPart.Position.X - math.cos(SINE/14) * 3, RootPart.Position.Y + 5 + 1* math.cos(SINE / 35), RootPart.Position.Z - math.sin(SINE/14) * 3)
  2318. coroutine.resume(coroutine.create(function()
  2319. local icespike = script.Objects.IceSpike:Clone()
  2320. icespike.Parent = char
  2321. icespike.Transparency = 0.1
  2322. icespike.CFrame = root.CFrame * CFrame.new((i-50)/5,-2,0)
  2323. icespike.CFrame = icespike.CFrame + root.CFrame.lookVector*10
  2324. icespike.Orientation = Vector3.new(math.random(-35,35),math.random(85,95),math.random(-35,35))
  2325. MagniDamage(icespike, 5, 10,15, 0, "Freeze")
  2326. swait(100)
  2327. for i = 1,30 do
  2328. swait()
  2329. icespike.Position = icespike.Position - Vector3.new(0,0.5,0)
  2330. icespike.Transparency = i/30
  2331. end
  2332. icespike:Destroy()
  2333. end))
  2334. end
  2335. attack = false
  2336. hum.WalkSpeed = 16
  2337. end
  2338.  
  2339. function DarkPillar() -- some things here are from Spectrum v7.
  2340. chatfunc("The end times are upon us.",Color3.new(0,0,0))
  2341. attack = true
  2342. hum.WalkSpeed = 0
  2343. for i = 1,10,0.1 do
  2344. swait()
  2345. RH.C0=clerp(RH.C0,cf(1,-1.1,0)*angles(math.rad(0),math.rad(85),math.rad(0))*angles(math.rad(-5),math.rad(0),math.rad(0)),.01)
  2346. LH.C0=clerp(LH.C0,cf(-1,-1.1,0)*angles(math.rad(0),math.rad(-85),math.rad(0))*angles(math.rad(-5),math.rad(0),math.rad(0)),.01)
  2347. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,.1)*angles(math.rad(0),math.rad(0),math.rad(-25)),.01)
  2348. Torso.Neck.C0=clerp(Torso.Neck.C0,necko*angles(math.rad(-15),math.rad(0),math.rad(25)),.01)
  2349. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*angles(math.rad(175),math.rad(0),math.rad(10)),.02)
  2350. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*angles(math.rad(175),math.rad(0),math.rad(-10)),.02)
  2351. book1.Position = Vector3.new(RootPart.Position.X - math.sin(SINE/17) * 8, RootPart.Position.Y + 0.5 * math.cos(SINE / 25 + 30), RootPart.Position.Z - math.cos(SINE/17) * 8)
  2352. book2.Position = Vector3.new(RootPart.Position.X + math.sin(SINE/17) * 8, RootPart.Position.Y + 0.5 * math.cos(SINE / 25 + 60), RootPart.Position.Z - math.cos(SINE/17) * 8)
  2353. book3.Position = Vector3.new(RootPart.Position.X - math.sin(SINE/17) * 8, RootPart.Position.Y + - 1.5 + 0.5 * math.cos(SINE / 25 + 90), RootPart.Position.Z + math.cos(SINE/17) * 8)
  2354. book4.Position = Vector3.new(RootPart.Position.X + math.sin(SINE/17) * 8, RootPart.Position.Y + 3 + 0.5 * math.cos(SINE / 25 + 120), RootPart.Position.Z + math.cos(SINE/17) * 8)
  2355. book5.CFrame = hed.CFrame + root.CFrame.lookVector*4
  2356. book5.Position = Vector3.new(book5.Position.X,book5.Position.Y + 3 + 0.5 * math.cos(SINE / 25 + 120), book5.Position.Z)
  2357. book6.Position = Vector3.new(RootPart.Position.X - math.sin(SINE/14) * 6, RootPart.Position.Y - 0.5 * math.cos(SINE / 25 + 150), RootPart.Position.Z - math.cos(SINE/14) * 6)
  2358. book7.Position = Vector3.new(RootPart.Position.X - math.cos(SINE/14) * 3, RootPart.Position.Y + 5 + 1* math.cos(SINE / 35), RootPart.Position.Z - math.sin(SINE/14) * 3)
  2359. end
  2360. local keptcolor = BrickColor.Black()
  2361. local pil = script.Objects.Pillar:Clone()
  2362. pil.Parent = char
  2363. pil.CFrame = root.CFrame + root.CFrame.lookVector*15
  2364. pil.Position = pil.Position + Vector3.new(0,3,0)
  2365. pil.Transparency = 0
  2366. MagniDamage(pil, 30, 10,15, 0, "UpKnock")
  2367. local locat = Instance.new("Part", char)
  2368. locat.CanCollide = false
  2369. locat.FormFactor = 3
  2370. locat.Name = "Ring"
  2371. locat.Material = "Neon"
  2372. locat.Size = Vector3.new(1, 1, 1)
  2373. locat.Transparency = 1
  2374. locat.TopSurface = 0
  2375. locat.BottomSurface = 0
  2376. locat.Anchored = true
  2377. locat.CFrame = pil.CFrame*CFrame.new(0,-3,0)
  2378. local poste = 0
  2379. local rotation = 0
  2380. local upperpos = 0
  2381. local rate = 0
  2382. local x = locat
  2383.  
  2384.  
  2385. CFuncs["Sound"].Create("rbxassetid://763717897", char, 1.2, 1)
  2386. CFuncs["Sound"].Create("rbxassetid://1192402877", char, 0.5, 0.75)
  2387. CFuncs["Sound"].Create("rbxassetid://1664711478", char, 1.2, 0.95)
  2388. sphere2(1,"Add",x.CFrame*CFrame.new(0,0,0),vt(5,50000,5),1.5,1,1.5,BrickColor.Black())
  2389. sphere2(2,"Add",x.CFrame*CFrame.new(0,0,0),vt(5,50000,5),1.5,1,1.5,BrickColor.Black())
  2390. sphere2(4,"Add",x.CFrame*CFrame.new(0,0,0),vt(5,50000,5),1.5,1,1.5,BrickColor.Black())
  2391. for i = 0, 99 do
  2392. local dis = CreateParta(char,1,1,"Neon",BrickColor.Black())
  2393. dis.CFrame = root.CFrame*CFrame.new(math.random(-5,5),math.random(-5,5),math.random(-5,5))*CFrame.Angles(math.rad(math.random(-360,360)),math.rad(math.random(-360,360)),math.rad(math.random(-360,360)))
  2394. local at1 = Instance.new("Attachment",dis)
  2395. at1.Position = vt(-25000,0,0)
  2396. local at2 = Instance.new("Attachment",dis)
  2397. at2.Position = vt(25000,0,0)
  2398. local bv = Instance.new("BodyVelocity")
  2399. bv.maxForce = Vector3.new(1e9, 1e9, 1e9)
  2400. bv.velocity = dis.CFrame.lookVector*math.random(500,2500)
  2401. bv.Parent = dis
  2402. game:GetService("Debris"):AddItem(dis, 10)
  2403. end
  2404. coroutine.resume(coroutine.create(function()
  2405. coroutine.resume(coroutine.create(function()
  2406. local eff = Instance.new("ParticleEmitter",x)
  2407. eff.Texture = "rbxassetid://2273224484"
  2408. eff.LightEmission = 1
  2409. eff.Color = ColorSequence.new(BrickColor.Black().Color)
  2410. eff.Rate = 90000
  2411. eff.Lifetime = NumberRange.new(3,8)
  2412. eff.Size = NumberSequence.new({NumberSequenceKeypoint.new(0,120,0),NumberSequenceKeypoint.new(0.2,25,0),NumberSequenceKeypoint.new(1,0.1,0)})
  2413. eff.Transparency = NumberSequence.new({NumberSequenceKeypoint.new(0,1,0),NumberSequenceKeypoint.new(0.2,0,0),NumberSequenceKeypoint.new(1,1,0)})
  2414. eff.Speed = NumberRange.new(250,1500)
  2415. eff.Drag = 5
  2416. eff.Rotation = NumberRange.new(-500,500)
  2417. eff.VelocitySpread = 9000
  2418. eff.RotSpeed = NumberRange.new(-100,100)
  2419. wait(0.7)
  2420. eff.Enabled = false
  2421. end))
  2422.  
  2423. for i = 0, 154 do
  2424. swait()
  2425. rotation = rotation + 5
  2426. poste = poste + 1
  2427. upperpos = upperpos + rate
  2428. rate = rate + 0.2
  2429. sphere2(8,"Add",x.CFrame*CFrame.Angles(0,math.rad(rotation),0)*CFrame.new(0,upperpos,poste),vt(2.5+upperpos/5,2.5+upperpos/5,2.5+upperpos/5),-0.05,-0.05,-0.05,BrickColor.Black())
  2430. sphere2(8,"Add",x.CFrame*CFrame.Angles(0,math.rad(90+rotation),0)*CFrame.new(0,upperpos,poste),vt(2.5+upperpos/5,2.5+upperpos/5,2.5+upperpos/5),-0.05,-0.05,-0.05,BrickColor.Black())
  2431. sphere2(8,"Add",x.CFrame*CFrame.Angles(0,math.rad(180+rotation),0)*CFrame.new(0,upperpos,poste),vt(2.5+upperpos/5,2.5+upperpos/5,2.5+upperpos/5),-0.05,-0.05,-0.05,BrickColor.Black())
  2432. sphere2(8,"Add",x.CFrame*CFrame.Angles(0,math.rad(270+rotation),0)*CFrame.new(0,upperpos,poste),vt(2.5+upperpos/5,2.5+upperpos/5,2.5+upperpos/5),-0.05,-0.05,-0.05,BrickColor.Black())
  2433. sphere2(8,"Add",x.CFrame*CFrame.Angles(0,math.rad(-rotation),0)*CFrame.new(0,upperpos/2,poste*2),vt(2.5+upperpos/10,2.5+upperpos/10,2.5+upperpos/10),-0.05,-0.05,-0.05,keptcolor)
  2434. sphere2(8,"Add",x.CFrame*CFrame.Angles(0,math.rad(90-rotation),0)*CFrame.new(0,upperpos/2,poste*2),vt(3.5+upperpos/10,3.5+upperpos/10,3.5+upperpos/10),-0.05,-0.05,-0.05,keptcolor)
  2435. sphere2(8,"Add",x.CFrame*CFrame.Angles(0,math.rad(180-rotation),0)*CFrame.new(0,upperpos/2,poste*2),vt(3.5+upperpos/10,3.5+upperpos/10,3.5+upperpos/10),-0.05,-0.05,-0.05,keptcolor)
  2436. sphere2(8,"Add",x.CFrame*CFrame.Angles(0,math.rad(270-rotation),0)*CFrame.new(0,upperpos/2,poste*2),vt(3.5+upperpos/10,3.5+upperpos/10,3.5+upperpos/10),-0.05,-0.05,-0.05,keptcolor)
  2437. end
  2438. wait(6)
  2439. x:Destroy()
  2440. end))
  2441. attack = false
  2442. hum.WalkSpeed = 16
  2443. swait(30)
  2444. for i = 1,30 do
  2445. swait()
  2446. pil.Position = pil.Position - Vector3.new(0,0.5,0)
  2447. pil.Transparency = i/30
  2448. end
  2449. pil:Destroy()
  2450. end
  2451.  
  2452. function Torpefy(plr)
  2453. coroutine.resume(coroutine.create(function()
  2454. tree(plr)
  2455. end))
  2456. end
  2457.  
  2458. function tree(who)
  2459. pcall(function()
  2460. local ded = who
  2461. ded.Humanoid:Remove()
  2462. for i,v in pairs(ded:GetDescendants()) do
  2463. if v:IsA("Part") then
  2464. v.Material = "Grass"
  2465. v.BrickColor = BrickColor.new("Forest green")
  2466. elseif v:IsA("MeshPart") and v.Name ~= "treemesh" then
  2467. v:Remove()
  2468. elseif v:IsA("SpecialMesh") then
  2469. v:Destroy()
  2470. end
  2471. end
  2472. local h1 = ded:FindFirstChild("Head")
  2473. local t1 = ded:FindFirstChild("Torso")
  2474. local ff = ded:FindFirstChildOfClass("ForceField")
  2475. if ff ~= nil then
  2476. ff:Destroy()
  2477. end
  2478. local ra1 = ded:FindFirstChild("Right Arm")
  2479. local la1 = ded:FindFirstChild("Left Arm")
  2480. local rl1 = ded:FindFirstChild("Right Leg")
  2481. local ll1 = ded:FindFirstChild("Left Leg")
  2482. local acc = ded:FindFirstChild("xdded")
  2483. if acc == nil then
  2484. local ac = Instance.new("Glue",ded) ac.Name = "xdded"
  2485. local rut1 = ded:FindFirstChild("HumanoidRootPart")
  2486. if rut1 ~= nil then
  2487. rut1.Parent = nil
  2488. end
  2489. pcall(function()
  2490. for i,v in pairs(who:GetChildren()) do
  2491. if v:IsA("Accessory") or v:IsA("Hat") then
  2492. v:Destroy()
  2493. end
  2494. end
  2495. for i,v in pairs(who:GetChildren()) do
  2496. if v:IsA("Script") or v:IsA("LocalScript") then
  2497. if v.Name == "Health" then
  2498. v.Parent = nil
  2499. end
  2500. end
  2501. end
  2502. end)
  2503. t1:BreakJoints()
  2504. ra1:BreakJoints()
  2505. la1:BreakJoints()
  2506. rl1:BreakJoints()
  2507. ll1:BreakJoints()
  2508.  
  2509. --//Joints~//--
  2510. --Neck--
  2511. if h1 ~= nil then
  2512. local neca = Instance.new("Glue",t1) neca.Part0 = t1 neca.Part1 = h1 neca.C0 = CFrame.new(0,t1.Size.y/2,0) neca.C1 = CFrame.new(0,-h1.Size.y/2,0) neca.Name = "yo"
  2513. local ch = Instance.new("Part",t1) ch.Name = "yo" ch.Size = Vector3.new(h1.Size.x/2,h1.Size.y/2,h1.Size.z/2 + h1.Size.z/4) ch.TopSurface = "Smooth" ch.BottomSurface = "Smooth" ch.Transparency = 1
  2514. local wh = Instance.new("Weld",ch) wh.Part0 = h1 wh.Part1 = ch
  2515. end
  2516. --Right Arm--
  2517. if ra1 ~= nil then
  2518. local rsa = Instance.new("Glue",t1) rsa.Part0 = t1 rsa.Part1 = ra1 rsa.C0 = CFrame.new(t1.Size.x/2 + t1.Size.x/4,t1.Size.y/4,0) rsa.C1 = CFrame.new(0,ra1.Size.y/4,0) rsa.Name = "yo"
  2519. local cra = Instance.new("Part",t1) cra.Name = "yo" cra.Size = Vector3.new(ra1.Size.y/2 + ra1.Size.y/4,ra1.Size.y/2,ra1.Size.z) cra.TopSurface = "Smooth" cra.BottomSurface = "Smooth" cra.Transparency = 1
  2520. local wra = Instance.new("Weld",cra) wra.Part0 = ra1 wra.Part1 = cra wra.C0 = CFrame.new(0,-ra1.Size.y/8,0) * CFrame.Angles(math.rad(0),math.rad(0),math.rad(90))
  2521. end
  2522. --Left Arm--
  2523. if la1 ~= nil then
  2524. local lsa = Instance.new("Glue",t1) lsa.Part0 = t1 lsa.Part1 = la1 lsa.C0 = CFrame.new(-t1.Size.x/2 - t1.Size.x/4,t1.Size.y/4,0) lsa.C1 = CFrame.new(0,la1.Size.y/4,0) lsa.Name = "yo"
  2525. local cla = Instance.new("Part",t1) cla.Name = "yo" cla.Size = Vector3.new(la1.Size.y/2 + la1.Size.y/4,la1.Size.y/2,la1.Size.z) cla.TopSurface = "Smooth" cla.BottomSurface = "Smooth" cla.Transparency = 1
  2526. local wla = Instance.new("Weld",cla) wla.Part0 = la1 wla.Part1 = cla wla.C0 = CFrame.new(0,-la1.Size.y/8,0) * CFrame.Angles(math.rad(0),math.rad(0),math.rad(90))
  2527. end
  2528. --Right Leg--
  2529. if rl1 ~= nil then
  2530. local rha = Instance.new("Glue",t1) rha.Part0 = t1 rha.Part1 = rl1 rha.C0 = CFrame.new(t1.Size.x/4,-t1.Size.y/2,0) rha.C1 = CFrame.new(0,rl1.Size.y/2,0) rha.Name = "yo"
  2531. local crl = Instance.new("Part",t1) crl.Name = "yo" crl.Size = Vector3.new(rl1.Size.y/2 + rl1.Size.y/4,rl1.Size.y/2,rl1.Size.z) crl.TopSurface = "Smooth" crl.BottomSurface = "Smooth" crl.Transparency = 1
  2532. local wrl = Instance.new("Weld",crl) wrl.Part0 = rl1 wrl.Part1 = crl wrl.C0 = CFrame.new(0,-rl1.Size.y/8,0) * CFrame.Angles(math.rad(0),math.rad(0),math.rad(90))
  2533. end
  2534. --Left Leg--
  2535. if ll1 ~= nil then
  2536. local lha = Instance.new("Glue",t1) lha.Part0 = t1 lha.Part1 = ll1 lha.C0 = CFrame.new(-t1.Size.x/4,-t1.Size.y/2,0) lha.C1 = CFrame.new(0,ll1.Size.y/2,0) lha.Name = "yo"
  2537. local cll = Instance.new("Part",t1) cll.Name = "yo" cll.Size = Vector3.new(ll1.Size.y/2 + ll1.Size.y/4,ll1.Size.y/2,ll1.Size.z) cll.TopSurface = "Smooth" cll.BottomSurface = "Smooth" cll.Transparency = 1
  2538. local wll = Instance.new("Weld",cll) wll.Part0 = ll1 wll.Part1 = cll wll.C0 = CFrame.new(0,-ll1.Size.y/8,0) * CFrame.Angles(math.rad(0),math.rad(0),math.rad(90))
  2539. end
  2540. --//End of Joints~//--
  2541. swait(50)
  2542. local nou = who
  2543. swait(300)
  2544. local BRUTAL = Instance.new("Sound",nou)
  2545. BRUTAL.SoundId = "rbxassetid://256509968"
  2546. BRUTAL.Volume = 7
  2547. BRUTAL:Play()
  2548. coroutine.resume(coroutine.create(function()
  2549. for i,v in pairs(nou:GetChildren()) do
  2550. if v:IsA("Part") then
  2551. v.Anchored = true
  2552. end
  2553. end
  2554. end))
  2555. local trae = script.Objects.treemesh:Clone()
  2556. trae.Parent = nou
  2557. trae.Transparency = 0
  2558. trae.Position = nou.Torso.Position
  2559. wait(7)
  2560. BRUTAL:Destroy()
  2561. local BRUTAL = Instance.new("Sound",nou)
  2562. BRUTAL.SoundId = "rbxassetid://256509968"
  2563. BRUTAL.Volume = 7
  2564. BRUTAL:Play()
  2565. trae.Size = Vector3.new(14,40,14)
  2566. wait(7)
  2567. BRUTAL:Destroy()
  2568. end
  2569. end)
  2570. end
  2571.  
  2572. function TreeReduce()
  2573. attack = true
  2574. hum.WalkSpeed = 0
  2575. for i = 1,100,0.75 do
  2576. swait()
  2577. Torso.Neck.C0=clerp(Torso.Neck.C0,necko*angles(math.rad(25 - 1 * math.cos(0)),math.rad(0 + 2 * math.cos(SINE / 32)),math.rad(1 + 2 * math.cos(SINE / 32))),.6)
  2578. RootJoint.C0 = clerp(RootJoint.C0,RootCF*CFrame.new(0,-.3,-1.6) * CFrame.Angles(math.rad(20),math.rad(0 + 1.5 * math.sin(SINE / 2)),math.rad(0)),.25)
  2579. LW.C0 = aclerp(LW.C0,CFrame.new(-0.80868268, 0.497842163, -0.14479053, 0.744864702, -0.66721499, -0.00102781132, -0.0409338176, -0.0441599488, -0.998185575, 0.665959001, 0.743555188, -0.0602048337)*angles(0,math.rad(0+2*math.cos(SINE/0.134561367)),math.rad(0+5*math.cos(SINE/0.127347))),0.3)
  2580. RW.C0 = clerp(RW.C0, cf(1.5* Player_Size, 0.5 + 0.06 * math.sin(SINE / 20)* Player_Size, 0* Player_Size) * angles(math.rad(145), math.rad(0), math.rad(15 + 2.5 * math.sin(SINE / 20))), 0.12)
  2581. RH.C0 = clerp(RH.C0,CFrame.new(-0.5, 0.4 + 0.01 * math.sin(SINE / 12), -0.05 + 0.001 * math.sin(SINE / 12)) * CFrame.Angles(math.rad(-10), math.rad(0 + 0.05 * math.cos(SINE / 12)), math.rad(0 + 0.05 * math.cos(SINE / 12))), 0.25)
  2582. LH.C0 = clerp(LH.C0,CFrame.new(0.5, 0.4 + 0.01 * math.sin(SINE / 12), -0.05 + 0.001 * math.sin(SINE / 12)) * CFrame.Angles(math.rad(-10), math.rad(0 + 0.05 * math.cos(SINE / 12)), math.rad(0 + 0.05 * math.cos(SINE / 12))), 0.25)
  2583. book1.Position = Vector3.new(RootPart.Position.X - math.sin(SINE/17) * 8, RootPart.Position.Y + 0.5 * math.cos(SINE / 25 + 30), RootPart.Position.Z - math.cos(SINE/17) * 8)
  2584. book2.Position = Vector3.new(RootPart.Position.X + math.sin(SINE/17) * 8, RootPart.Position.Y + 1.5 + 0.5 * math.cos(SINE / 25 + 60), RootPart.Position.Z - math.cos(SINE/17) * 8)
  2585. book3.Position = Vector3.new(RootPart.Position.X - math.sin(SINE/17) * 8, RootPart.Position.Y + - 1.5 + 0.5 * math.cos(SINE / 25 + 90), RootPart.Position.Z + math.cos(SINE/17) * 8)
  2586. book4.Position = Vector3.new(RootPart.Position.X + math.sin(SINE/17) * 8, RootPart.Position.Y + 3 + 0.5 * math.cos(SINE / 25 + 120), RootPart.Position.Z + math.cos(SINE/17) * 8)
  2587. book5.Position = Vector3.new(RootPart.Position.X - math.sin(SINE/14) * 6, RootPart.Position.Y + 1.5 + 0.5 * math.cos(SINE / 25 + 150), RootPart.Position.Z - math.cos(SINE/14) * 6)
  2588. book6.CFrame = hed.CFrame + root.CFrame.lookVector*4
  2589. book6.Position = Vector3.new(book6.Position.X,book6.Position.Y + 3 + 0.5 * math.cos(SINE / 25 + 120), book6.Position.Z)
  2590. book7.Position = Vector3.new(RootPart.Position.X - math.cos(SINE/14) * 3, RootPart.Position.Y + 5 + 1* math.cos(SINE / 35), RootPart.Position.Z - math.sin(SINE/14) * 3)
  2591. end
  2592. CFuncs["Sound"].Create("rbxassetid://438666141", root, 7.5,1)
  2593. CFuncs["Sound"].Create("rbxassetid://1208650519", root, 7.5, 1)
  2594. CamShakeAll({
  2595. Duration=0.4;
  2596. Intensity=3;
  2597. Position=Vector3.new(2,2,2);
  2598. Rotation=Vector3.new(2,2,6);
  2599. DropDist=1000;
  2600. IneffectiveDist=1000;
  2601. Origin=tors.Position;
  2602. })
  2603. MagniDamage(tors, 50, 1,2, 0, "Tree")
  2604. chatfunc("Leave the dead where they fall.",Color3.new(1,1,1))
  2605. CFuncs["Sound"].Create("rbxassetid://907329669", root, 10, 1)
  2606. attack = false
  2607. hum.WalkSpeed = 16
  2608. end
  2609.  
  2610. -- transparent objects --
  2611. for i,v in pairs(script.Objects:GetChildren()) do
  2612. if v:IsA("Part") then
  2613. v.Transparency = 1
  2614. end
  2615. end
  2616.  
  2617. -- Keystrokes --
  2618.  
  2619. --[[z,x,c,v,b,n and m select spell books
  2620. q,e,r,t,y, and u are attacks
  2621. --]]
  2622.  
  2623. mouse.KeyDown:connect(function(k)
  2624. if attack == false then
  2625. if k == "z" then
  2626. selected = "fire"
  2627. elseif k == "x" then
  2628. selected = "earth"
  2629. elseif k == "c" then
  2630. selected = "thunder"
  2631. elseif k == "v" then
  2632. selected = "ice"
  2633. elseif k == "b" then
  2634. selected = "dark"
  2635. elseif k == "n" then
  2636. selected = "light"
  2637. elseif k == "m" then
  2638. selected = "lunar"
  2639. end
  2640. if selected == "fire" then
  2641. if k == "q" then
  2642. volcaniceruption()
  2643. end
  2644. elseif selected == "earth" then
  2645. if k == "q" then
  2646. LithosphereSpikes()
  2647. elseif k == "e" then
  2648. Mountain()
  2649. end
  2650. elseif selected == "thunder" then
  2651. if k == "q" then
  2652. LightningStrike()
  2653. end
  2654. elseif selected == "ice" then
  2655. if k == "q" then
  2656. DryFreeze()
  2657. end
  2658. elseif selected == "dark" then
  2659. if k == "q" then
  2660. DarkPillar()
  2661. end
  2662. elseif selected == "light" then
  2663. if k == "q" then
  2664. TreeReduce()
  2665. end
  2666. end
  2667. end
  2668. end)
  2669. -- Final loop--
  2670.  
  2671. --[[
  2672.  
  2673. --]]
  2674.  
  2675. local idle = 0
  2676.  
  2677. hum.Name = "SPELLCASTER"
  2678. hum.MaxHealth = math.huge
  2679. hum.Health = math.huge
  2680. hum.BreakJointsOnDeath = false
  2681. Instance.new("ForceField",char).Visible = false
  2682.  
  2683. while true do
  2684. swait()
  2685. hum.MaxHealth = math.huge
  2686. hum.Health = math.huge
  2687. hum.BreakJointsOnDeath = false
  2688. SINE = SINE + 1
  2689. if attack ~= true then
  2690. book1.Position = Vector3.new(RootPart.Position.X - math.sin(SINE/17) * 8, RootPart.Position.Y + 0.5 * math.cos(SINE / 25 + 30), RootPart.Position.Z - math.cos(SINE/17) * 8)
  2691. book2.Position = Vector3.new(RootPart.Position.X + math.sin(SINE/17) * 8, RootPart.Position.Y + 1.5 + 0.5 * math.cos(SINE / 25 + 60), RootPart.Position.Z - math.cos(SINE/17) * 8)
  2692. book3.Position = Vector3.new(RootPart.Position.X - math.sin(SINE/17) * 8, RootPart.Position.Y + - 1.5 + 0.5 * math.cos(SINE / 25 + 90), RootPart.Position.Z + math.cos(SINE/17) * 8)
  2693. book4.Position = Vector3.new(RootPart.Position.X + math.sin(SINE/17) * 8, RootPart.Position.Y + 3 + 0.5 * math.cos(SINE / 25 + 120), RootPart.Position.Z + math.cos(SINE/17) * 8)
  2694. book5.Position = Vector3.new(RootPart.Position.X - math.sin(SINE/14) * 6, RootPart.Position.Y + 1.5 + 0.5 * math.cos(SINE / 25 + 150), RootPart.Position.Z - math.cos(SINE/14) * 6)
  2695. book6.Position = Vector3.new(RootPart.Position.X - math.cos(SINE/14) * 6, RootPart.Position.Y - 0.5 * math.sin(SINE / 25 + 150), RootPart.Position.Z - math.sin(SINE/14) * 6)
  2696. book7.Position = Vector3.new(RootPart.Position.X - math.cos(SINE/14) * 3, RootPart.Position.Y + 5 + 1* math.cos(SINE / 35), RootPart.Position.Z - math.sin(SINE/14) * 3)
  2697. end
  2698. if selected == "fire" then
  2699. book2.Material = "Neon"
  2700. book1.Material = "Plastic"
  2701. book3.Material = "Plastic"
  2702. book4.Material = "Plastic"
  2703. book5.Material = "Plastic"
  2704. book6.Material = "Plastic"
  2705. book7.Material = "Plastic"
  2706. elseif selected == "earth" then
  2707. book2.Material = "Plastic"
  2708. book1.Material = "Neon"
  2709. book3.Material = "Plastic"
  2710. book4.Material = "Plastic"
  2711. book5.Material = "Plastic"
  2712. book6.Material = "Plastic"
  2713. book7.Material = "Plastic"
  2714. elseif selected == "thunder" then
  2715. book2.Material = "Plastic"
  2716. book1.Material = "Plastic"
  2717. book3.Material = "Neon"
  2718. book4.Material = "Plastic"
  2719. book5.Material = "Plastic"
  2720. book6.Material = "Plastic"
  2721. book7.Material = "Plastic"
  2722. elseif selected == "ice" then
  2723. book2.Material = "Plastic"
  2724. book1.Material = "Plastic"
  2725. book3.Material = "Plastic"
  2726. book4.Material = "Neon"
  2727. book5.Material = "Plastic"
  2728. book6.Material = "Plastic"
  2729. book7.Material = "Plastic"
  2730. elseif selected == "dark" then
  2731. book2.Material = "Plastic"
  2732. book1.Material = "Plastic"
  2733. book3.Material = "Plastic"
  2734. book4.Material = "Plastic"
  2735. book5.Material = "Neon"
  2736. book6.Material = "Plastic"
  2737. book7.Material = "Plastic"
  2738. elseif selected == "light" then
  2739. book2.Material = "Plastic"
  2740. book1.Material = "Plastic"
  2741. book3.Material = "Plastic"
  2742. book4.Material = "Plastic"
  2743. book5.Material = "Plastic"
  2744. book6.Material = "Neon"
  2745. book7.Material = "Plastic"
  2746. elseif selected == "lunar" then
  2747. book2.Material = "Plastic"
  2748. book1.Material = "Plastic"
  2749. book3.Material = "Plastic"
  2750. book4.Material = "Plastic"
  2751. book5.Material = "Plastic"
  2752. book6.Material = "Plastic"
  2753. book7.Material = "Neon"
  2754. end
  2755. local torvel = (RootPart.Velocity * Vector3.new(1, 0, 1)).magnitude
  2756. local velderp = RootPart.Velocity.y
  2757. hf, pf = rayCast(RootPart.Position, CFrame.new(RootPart.Position, RootPart.Position - Vector3.new(0, 1, 0)).lookVector, 4, Character)
  2758. hitfloor, posfloor = rayCast(RootPart.Position, CFrame.new(RootPart.Position, RootPart.Position - Vector3.new(0, 1, 0)).lookVector, 4, Character)
  2759. if attack == false then
  2760. idle = idle + 1
  2761. else
  2762. idle = 0
  2763. end
  2764. if not (idle >= 500) or attack == false then
  2765. end
  2766. if 1 < RootPart.Velocity.y and hitfloor == nil then
  2767. Anim = "Jump"
  2768. if attack == false then
  2769. RH.C0 = clerp(RH.C0, cf(1, -1 - 0.05 * math.cos(SINE / 25), 0) * angles(math.rad(0), math.rad(90), math.rad(0)) * angles(math.rad(-5), math.rad(0), math.rad(-20)), 0.1)
  2770. LH.C0 = clerp(LH.C0, cf(-1, -1 - 0.05 * math.cos(SINE / 25), 0) * angles(math.rad(0), math.rad(-90), math.rad(0)) * angles(math.rad(-5), math.rad(0), math.rad(20)), 0.1)
  2771. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cf(0, 0, 0 + 0.05 * math.cos(SINE / 25)) * angles(math.rad(-10), math.rad(0), math.rad(0)), 0.1)
  2772. Torso.Neck.C0 = clerp(Torso.Neck.C0, necko * angles(math.rad(-2.5), math.rad(0), math.rad(0)), 0.1)
  2773. RW.C0 = clerp(RW.C0, cf(1.45, 0.5 + 0.1 * math.cos(SINE / 25), 0) * angles(math.rad(-5), math.rad(0), math.rad(25)), 0.1)
  2774. LW.C0 = clerp(LW.C0, cf(-1.45, 0.5 + 0.1 * math.cos(SINE / 25), 0) * angles(math.rad(-5), math.rad(0), math.rad(-25)), 0.1)
  2775. end
  2776. elseif -1 > RootPart.Velocity.y and hitfloor == nil then
  2777. Anim = "Fall"
  2778. if attack == false then
  2779. RH.C0 = clerp(RH.C0, cf(1, -1 - 0.05 * math.cos(SINE / 25), 0) * angles(math.rad(0), math.rad(90), math.rad(0)) * angles(math.rad(-5), math.rad(0), math.rad(-20)), 0.1)
  2780. LH.C0 = clerp(LH.C0, cf(-1, -1 - 0.05 * math.cos(SINE / 25), 0) * angles(math.rad(0), math.rad(-90), math.rad(0)) * angles(math.rad(-5), math.rad(0), math.rad(20)), 0.1)
  2781. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cf(0, 0, 0 + 0.05 * math.cos(SINE / 25)) * angles(math.rad(0), math.rad(0), math.rad(0)), 0.1)
  2782. Torso.Neck.C0 = clerp(Torso.Neck.C0, necko * angles(math.rad(0), math.rad(0), math.rad(0)), 0.1)
  2783. RW.C0 = clerp(RW.C0, cf(1.45, 0.5 + 0.1 * math.cos(SINE / 25), 0) * angles(math.rad(-20), math.rad(0), math.rad(50)), 0.1)
  2784. LW.C0 = clerp(LW.C0, cf(-1.45, 0.5 + 0.1 * math.cos(SINE / 25), 0) * angles(math.rad(-20), math.rad(0), math.rad(-50)), 0.1)
  2785. end
  2786. elseif torvel < 1 and hitfloor ~= nil then
  2787. Anim = "Idle"
  2788. if attack == false then
  2789. RH.C0=clerp(RH.C0,cf(1,-0.7,-0.5)*angles(math.rad(0),math.rad(80),math.rad(0))*angles(math.rad(-5),math.rad(0),math.rad(10)),.15)
  2790. LH.C0=clerp(LH.C0,cf(-1,-0.8,0)*angles(math.rad(0),math.rad(-80),math.rad(0))*angles(math.rad(0),math.rad(0),math.rad(0)),.15)
  2791. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,-.25)*angles(math.rad(0),math.rad(0),math.rad(-30)),.15)
  2792. Torso.Neck.C0=clerp(Torso.Neck.C0,necko*angles(math.rad(15),math.rad(0),math.rad(30)),.15)
  2793. RW.C0=clerp(RW.C0,cf(1,0.35 + 0.025 * math.cos(SINE / 45),-0.5)*angles(math.rad(62 + 6 * math.cos(SINE / 72)),math.rad(3 - 2 * math.cos(SINE / 58)),math.rad(-82 + 2 * math.cos(SINE / 45))),.1)
  2794. LW.C0=clerp(LW.C0,cf(-1,0.5 + 0.025 * math.cos(SINE / 45),-0.5)*angles(math.rad(89 - 7 * math.cos(SINE / 66)),math.rad(4 - 3 * math.cos(SINE / 59)),math.rad(67 - 4 * math.cos(SINE / 45))),.1)
  2795. end
  2796. elseif torvel > 2 and torvel < 22 and hitfloor ~= nil then
  2797. Anim = "Walk"
  2798. if attack == false then
  2799. RH.C0 = clerp(RH.C0, cf(1, -0.85 - 0.15 * math.cos(SINE / 3), -0.15 - 0.15 * math.cos(SINE / 3)) * angles(math.rad(0), math.rad(90), math.rad(0)) * angles(math.rad(0), math.rad(0), math.rad(0 + 55 * math.cos(SINE / 6))), 0.1)
  2800. LH.C0 = clerp(LH.C0, cf(-1, -0.85 + 0.15 * math.cos(SINE / 3), -0.15 + 0.15 * math.cos(SINE / 3)) * angles(math.rad(0), math.rad(-90), math.rad(0)) * angles(math.rad(0), math.rad(0), math.rad(0 + 55 * math.cos(SINE / 6))), 0.1)
  2801. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cf(0, 0, -0.15 - 0.1 * math.cos(SINE / 3)) * angles(math.rad(5), math.rad(0), math.rad(0 - 5 * math.cos(SINE / 6))), 0.1)
  2802. Torso.Neck.C0 = clerp(Torso.Neck.C0, necko * angles(math.rad(10 + 2.5 * math.cos(SINE / 100)), math.rad(0), math.rad(0 + 5 * math.cos(SINE / 6))), 0.1)
  2803. RW.C0 = clerp(RW.C0, cf(1.5, 0.5, 0) * angles(math.rad(0 - 75 * math.cos(SINE / 6)), math.rad(0), math.rad(10 - 10 * math.cos(SINE / 3))), 0.1)
  2804. LW.C0 = clerp(LW.C0, cf(-1.5, 0.5, 0) * angles(math.rad(0 + 75 * math.cos(SINE / 6)), math.rad(0), math.rad(-10 + 10 * math.cos(SINE / 3))), 0.1)
  2805. end
  2806. elseif torvel >= 22 and hitfloor ~= nil then
  2807. Anim = "Run"
  2808. if attack == false then
  2809. RH.C0 = clerp(RH.C0, cf(1, -0.75 - 0.25 * math.cos(SINE / 3), -0.25 - 0.25 * math.cos(SINE / 3)) * angles(math.rad(0), math.rad(90), math.rad(0)) * angles(math.rad(0), math.rad(0), math.rad(0 + 95 * math.cos(SINE / 6))), 0.1)
  2810. LH.C0 = clerp(LH.C0, cf(-1, -0.75 + 0.25 * math.cos(SINE / 3), -0.25 + 0.25 * math.cos(SINE / 3)) * angles(math.rad(0), math.rad(-90), math.rad(0)) * angles(math.rad(0), math.rad(0), math.rad(0 + 95 * math.cos(SINE / 6))), 0.1)
  2811. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cf(0, 0, -0.125 + 0.125 * math.cos(SINE / 3)) * angles(math.rad(20), math.rad(0), math.rad(0 - 15 * math.cos(SINE / 6))), 0.1)
  2812. Torso.Neck.C0 = clerp(Torso.Neck.C0, necko * angles(math.rad(-10 + 2.5 * math.cos(SINE / 100)), math.rad(0), math.rad(0 + 15 * math.cos(SINE / 6))), 0.1)
  2813. RW.C0 = clerp(RW.C0, cf(1.5, 0.5, 0) * angles(math.rad(0 - 125 * math.cos(SINE / 6)), math.rad(0), math.rad(5 - 10 * math.cos(SINE / 3))), 0.1)
  2814. LW.C0 = clerp(LW.C0, cf(-1.5, 0.5, 0) * angles(math.rad(0 + 125 * math.cos(SINE / 6)), math.rad(0), math.rad(-5 + 10 * math.cos(SINE / 3))), 0.1)
  2815. end
  2816. end
  2817. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement