Leodu41

lunar orori

Aug 17th, 2019
132
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 59.27 KB | None | 0 0
  1. local Player = game:GetService("Players").leodu41
  2. local Mouse,mouse,UserInputService,ContextActionService
  3. do
  4. script.Parent = Player.Character
  5. local CAS = {Actions={}}
  6. local Event = Instance.new("RemoteEvent")
  7. Event.Name = "UserInput_Event"
  8. Event.Parent = Player.Character
  9. local fakeEvent = function()
  10. local t = {_fakeEvent=true}
  11. t.Connect = function(self,f)self.Function=f end
  12. t.connect = t.Connect
  13. return t
  14. end
  15. local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent()}
  16. local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
  17. function CAS:BindAction(name,fun,touch,...)
  18. CAS.Actions[name] = {Name=name,Function=fun,Keys={...}}
  19. end
  20. function CAS:UnbindAction(name)
  21. CAS.Actions[name] = nil
  22. end
  23. local function te(self,ev,...)
  24. local t = m[ev]
  25. if t and t._fakeEvent and t.Function then
  26. t.Function(...)
  27. end
  28. end
  29. m.TrigEvent = te
  30. UIS.TrigEvent = te
  31. Event.OnServerEvent:Connect(function(plr,io)
  32. if plr~=Player then return end
  33. if io.isMouse then
  34. m.Target = io.Target
  35. m.Hit = io.Hit
  36. elseif io.UserInputType == Enum.UserInputType.MouseButton1 then
  37. if io.UserInputState == Enum.UserInputState.Begin then
  38. m:TrigEvent("Button1Down")
  39. else
  40. m:TrigEvent("Button1Up")
  41. end
  42. else
  43. for n,t in pairs(CAS.Actions) do
  44. for _,k in pairs(t.Keys) do
  45. if k==io.KeyCode then
  46. t.Function(t.Name,io.UserInputState,io)
  47. end
  48. end
  49. end
  50. if io.UserInputState == Enum.UserInputState.Begin then
  51. m:TrigEvent("KeyDown",io.KeyCode.Name:lower())
  52. UIS:TrigEvent("InputBegan",io,false)
  53. else
  54. m:TrigEvent("KeyUp",io.KeyCode.Name:lower())
  55. UIS:TrigEvent("InputEnded",io,false)
  56. end
  57. end
  58. end)
  59. Mouse,mouse,UserInputService,ContextActionService = m,m,UIS,CAS
  60. end
  61.  
  62. --//====================================================\\--
  63. --|| CREATED BY SHACKLUSTER
  64. --\\====================================================//--
  65.  
  66. wait(0.2)
  67.  
  68. Player = game:GetService("Players").StarzoZero
  69. PlayerGui = Player.PlayerGui
  70. Cam = workspace.CurrentCamera
  71. Backpack = Player.Backpack
  72. Character = Player.Character
  73. Humanoid = Character.Humanoid
  74. RootPart = Character["HumanoidRootPart"]
  75. Torso = Character["Torso"]
  76. Head = Character["Head"]
  77. RightArm = Character["Right Arm"]
  78. LeftArm = Character["Left Arm"]
  79. RightLeg = Character["Right Leg"]
  80. LeftLeg = Character["Left Leg"]
  81. RootJoint = RootPart["RootJoint"]
  82. Neck = Torso["Neck"]
  83. RightShoulder = Torso["Right Shoulder"]
  84. LeftShoulder = Torso["Left Shoulder"]
  85. RightHip = Torso["Right Hip"]
  86. LeftHip = Torso["Left Hip"]
  87. local sick = Instance.new("Sound",Character)
  88. sick.SoundId = "rbxassetid://1494340971"
  89. sick.Looped = true
  90. sick.Pitch = 1
  91. sick.Volume = 1
  92. sick:Play()
  93.  
  94. IT = Instance.new
  95. CF = CFrame.new
  96. VT = Vector3.new
  97. RAD = math.rad
  98. C3 = Color3.new
  99. UD2 = UDim2.new
  100. BRICKC = BrickColor.new
  101. ANGLES = CFrame.Angles
  102. EULER = CFrame.fromEulerAnglesXYZ
  103. COS = math.cos
  104. ACOS = math.acos
  105. SIN = math.sin
  106. ASIN = math.asin
  107. ABS = math.abs
  108. MRANDOM = math.random
  109. FLOOR = math.floor
  110.  
  111. --//=================================\\
  112. --|| USEFUL VALUES
  113. --\\=================================//
  114.  
  115. Animation_Speed = 3
  116. Frame_Speed = 1 / 60 -- (1 / 30) OR (1 / 60)
  117. local Speed = 25
  118. local ROOTC0 = CF(0, 0, 0) * ANGLES(RAD(-90), RAD(0), RAD(180))
  119. local NECKC0 = CF(0, 1, 0) * ANGLES(RAD(-90), RAD(0), RAD(180))
  120. local RIGHTSHOULDERC0 = CF(-0.5, 0, 0) * ANGLES(RAD(0), RAD(90), RAD(0))
  121. local LEFTSHOULDERC0 = CF(0.5, 0, 0) * ANGLES(RAD(0), RAD(-90), RAD(0))
  122. local DAMAGEMULTIPLIER = 1
  123. local ANIM = "Idle"
  124. local ATTACK = false
  125. local EQUIPPED = false
  126. local HOLD = false
  127. local COMBO = 1
  128. local Rooted = false
  129. local SINE = 0
  130. local KEYHOLD = false
  131. local CHANGE = 2 / Animation_Speed
  132. local WALKINGANIM = false
  133. local VALUE1 = false
  134. local VALUE2 = false
  135. local ROBLOXIDLEANIMATION = IT("Animation")
  136. ROBLOXIDLEANIMATION.Name = "Roblox Idle Animation"
  137. ROBLOXIDLEANIMATION.AnimationId = "http://www.roblox.com/asset/?id=180435571"
  138. --ROBLOXIDLEANIMATION.Parent = Humanoid
  139. local WEAPONGUI = IT("ScreenGui", PlayerGui)
  140. WEAPONGUI.Name = "Weapon GUI"
  141. local Effects = IT("Folder", Character)
  142. Effects.Name = "Effects"
  143. local ANIMATOR = Humanoid.Animator
  144. local ANIMATE = Character.Animate
  145. local UNANCHOR = true
  146. local PLAYMAINANIM = true
  147. local BOLTSOUNDS = {168586621,168586586,178452241}
  148.  
  149. --//=================================\\
  150. --\\=================================//
  151.  
  152.  
  153. --//=================================\\
  154. --|| SAZERENOS' ARTIFICIAL HEARTBEAT
  155. --\\=================================//
  156.  
  157. ArtificialHB = Instance.new("BindableEvent", script)
  158. ArtificialHB.Name = "ArtificialHB"
  159.  
  160. script:WaitForChild("ArtificialHB")
  161.  
  162. frame = Frame_Speed
  163. tf = 0
  164. allowframeloss = false
  165. tossremainder = false
  166. lastframe = tick()
  167. script.ArtificialHB:Fire()
  168.  
  169. game:GetService("RunService").Heartbeat:connect(function(s, p)
  170. tf = tf + s
  171. if tf >= frame then
  172. if allowframeloss then
  173. script.ArtificialHB:Fire()
  174. lastframe = tick()
  175. else
  176. for i = 1, math.floor(tf / frame) do
  177. script.ArtificialHB:Fire()
  178. end
  179. lastframe = tick()
  180. end
  181. if tossremainder then
  182. tf = 0
  183. else
  184. tf = tf - frame * math.floor(tf / frame)
  185. end
  186. end
  187. end)
  188.  
  189. --//=================================\\
  190. --\\=================================//
  191.  
  192. --//=================================\\
  193. --|| SOME FUNCTIONS
  194. --\\=================================//
  195.  
  196.  
  197.  
  198. function Raycast(POSITION, DIRECTION, RANGE, IGNOREDECENDANTS)
  199. return workspace:FindPartOnRay(Ray.new(POSITION, DIRECTION.unit * RANGE), IGNOREDECENDANTS)
  200. end
  201.  
  202. function PositiveAngle(NUMBER)
  203. if NUMBER >= 0 then
  204. NUMBER = 0
  205. end
  206. return NUMBER
  207. end
  208.  
  209. function NegativeAngle(NUMBER)
  210. if NUMBER <= 0 then
  211. NUMBER = 0
  212. end
  213. return NUMBER
  214. end
  215.  
  216. function Swait(NUMBER)
  217. if NUMBER == 0 or NUMBER == nil then
  218. ArtificialHB.Event:wait()
  219. else
  220. for i = 1, NUMBER do
  221. ArtificialHB.Event:wait()
  222. end
  223. end
  224. end
  225.  
  226. function CreateMesh(MESH, PARENT, MESHTYPE, MESHID, TEXTUREID, SCALE, OFFSET)
  227. local NEWMESH = IT(MESH)
  228. if MESH == "SpecialMesh" then
  229. NEWMESH.MeshType = MESHTYPE
  230. if MESHID ~= "nil" and MESHID ~= "" then
  231. NEWMESH.MeshId = "http://www.roblox.com/asset/?id="..MESHID
  232. end
  233. if TEXTUREID ~= "nil" and TEXTUREID ~= "" then
  234. NEWMESH.TextureId = "http://www.roblox.com/asset/?id="..TEXTUREID
  235. end
  236. end
  237. NEWMESH.Offset = OFFSET or VT(0, 0, 0)
  238. NEWMESH.Scale = SCALE
  239. NEWMESH.Parent = PARENT
  240. return NEWMESH
  241. end
  242.  
  243. function CreatePart(FORMFACTOR, PARENT, MATERIAL, REFLECTANCE, TRANSPARENCY, BRICKCOLOR, NAME, SIZE, ANCHOR)
  244. local NEWPART = IT("Part")
  245. NEWPART.formFactor = FORMFACTOR
  246. NEWPART.Reflectance = REFLECTANCE
  247. NEWPART.Transparency = TRANSPARENCY
  248. NEWPART.CanCollide = false
  249. NEWPART.Locked = true
  250. NEWPART.Anchored = true
  251. if ANCHOR == false then
  252. NEWPART.Anchored = false
  253. end
  254. NEWPART.BrickColor = BRICKC(tostring(BRICKCOLOR))
  255. NEWPART.Name = NAME
  256. NEWPART.Size = SIZE
  257. NEWPART.Position = Torso.Position
  258. NEWPART.Material = MATERIAL
  259. NEWPART:BreakJoints()
  260. NEWPART.Parent = PARENT
  261. return NEWPART
  262. end
  263.  
  264. local function weldBetween(a, b)
  265. local weldd = Instance.new("ManualWeld")
  266. weldd.Part0 = a
  267. weldd.Part1 = b
  268. weldd.C0 = CFrame.new()
  269. weldd.C1 = b.CFrame:inverse() * a.CFrame
  270. weldd.Parent = a
  271. return weldd
  272. end
  273.  
  274.  
  275. function QuaternionFromCFrame(cf)
  276. local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components()
  277. local trace = m00 + m11 + m22
  278. if trace > 0 then
  279. local s = math.sqrt(1 + trace)
  280. local recip = 0.5 / s
  281. return (m21 - m12) * recip, (m02 - m20) * recip, (m10 - m01) * recip, s * 0.5
  282. else
  283. local i = 0
  284. if m11 > m00 then
  285. i = 1
  286. end
  287. if m22 > (i == 0 and m00 or m11) then
  288. i = 2
  289. end
  290. if i == 0 then
  291. local s = math.sqrt(m00 - m11 - m22 + 1)
  292. local recip = 0.5 / s
  293. return 0.5 * s, (m10 + m01) * recip, (m20 + m02) * recip, (m21 - m12) * recip
  294. elseif i == 1 then
  295. local s = math.sqrt(m11 - m22 - m00 + 1)
  296. local recip = 0.5 / s
  297. return (m01 + m10) * recip, 0.5 * s, (m21 + m12) * recip, (m02 - m20) * recip
  298. elseif i == 2 then
  299. local s = math.sqrt(m22 - m00 - m11 + 1)
  300. local recip = 0.5 / s return (m02 + m20) * recip, (m12 + m21) * recip, 0.5 * s, (m10 - m01) * recip
  301. end
  302. end
  303. end
  304.  
  305. function QuaternionToCFrame(px, py, pz, x, y, z, w)
  306. local xs, ys, zs = x + x, y + y, z + z
  307. local wx, wy, wz = w * xs, w * ys, w * zs
  308. local xx = x * xs
  309. local xy = x * ys
  310. local xz = x * zs
  311. local yy = y * ys
  312. local yz = y * zs
  313. local zz = z * zs
  314. 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))
  315. end
  316.  
  317. function QuaternionSlerp(a, b, t)
  318. local cosTheta = a[1] * b[1] + a[2] * b[2] + a[3] * b[3] + a[4] * b[4]
  319. local startInterp, finishInterp;
  320. if cosTheta >= 0.0001 then
  321. if (1 - cosTheta) > 0.0001 then
  322. local theta = ACOS(cosTheta)
  323. local invSinTheta = 1 / SIN(theta)
  324. startInterp = SIN((1 - t) * theta) * invSinTheta
  325. finishInterp = SIN(t * theta) * invSinTheta
  326. else
  327. startInterp = 1 - t
  328. finishInterp = t
  329. end
  330. else
  331. if (1 + cosTheta) > 0.0001 then
  332. local theta = ACOS(-cosTheta)
  333. local invSinTheta = 1 / SIN(theta)
  334. startInterp = SIN((t - 1) * theta) * invSinTheta
  335. finishInterp = SIN(t * theta) * invSinTheta
  336. else
  337. startInterp = t - 1
  338. finishInterp = t
  339. end
  340. end
  341. 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
  342. end
  343.  
  344. function Clerp(a, b, t)
  345. local qa = {QuaternionFromCFrame(a)}
  346. local qb = {QuaternionFromCFrame(b)}
  347. local ax, ay, az = a.x, a.y, a.z
  348. local bx, by, bz = b.x, b.y, b.z
  349. local _t = 1 - t
  350. return QuaternionToCFrame(_t * ax + t * bx, _t * ay + t * by, _t * az + t * bz, QuaternionSlerp(qa, qb, t))
  351. end
  352.  
  353. function CreateFrame(PARENT, TRANSPARENCY, BORDERSIZEPIXEL, POSITION, SIZE, COLOR, BORDERCOLOR, NAME)
  354. local frame = IT("Frame")
  355. frame.BackgroundTransparency = TRANSPARENCY
  356. frame.BorderSizePixel = BORDERSIZEPIXEL
  357. frame.Position = POSITION
  358. frame.Size = SIZE
  359. frame.BackgroundColor3 = COLOR
  360. frame.BorderColor3 = BORDERCOLOR
  361. frame.Name = NAME
  362. frame.Parent = PARENT
  363. return frame
  364. end
  365.  
  366. function CreateLabel(PARENT, TEXT, TEXTCOLOR, TEXTFONTSIZE, TEXTFONT, TRANSPARENCY, BORDERSIZEPIXEL, STROKETRANSPARENCY, NAME)
  367. local label = IT("TextLabel")
  368. label.BackgroundTransparency = 1
  369. label.Size = UD2(1, 0, 1, 0)
  370. label.Position = UD2(0, 0, 0, 0)
  371. label.TextColor3 = TEXTCOLOR
  372. label.TextStrokeTransparency = STROKETRANSPARENCY
  373. label.TextTransparency = TRANSPARENCY
  374. label.FontSize = TEXTFONTSIZE
  375. label.Font = TEXTFONT
  376. label.BorderSizePixel = BORDERSIZEPIXEL
  377. label.TextScaled = false
  378. label.Text = TEXT
  379. label.Name = NAME
  380. label.Parent = PARENT
  381. return label
  382. end
  383.  
  384. function NoOutlines(PART)
  385. PART.TopSurface, PART.BottomSurface, PART.LeftSurface, PART.RightSurface, PART.FrontSurface, PART.BackSurface = 10, 10, 10, 10, 10, 10
  386. end
  387.  
  388. function CreateWeldOrSnapOrMotor(TYPE, PARENT, PART0, PART1, C0, C1)
  389. local NEWWELD = IT(TYPE)
  390. NEWWELD.Part0 = PART0
  391. NEWWELD.Part1 = PART1
  392. NEWWELD.C0 = C0
  393. NEWWELD.C1 = C1
  394. NEWWELD.Parent = PARENT
  395. return NEWWELD
  396. end
  397.  
  398. local S = IT("Sound")
  399. function CreateSound(ID, PARENT, VOLUME, PITCH, DOESLOOP)
  400. local NEWSOUND = nil
  401. coroutine.resume(coroutine.create(function()
  402. NEWSOUND = S:Clone()
  403. NEWSOUND.Parent = PARENT
  404. NEWSOUND.Volume = VOLUME
  405. NEWSOUND.Pitch = PITCH
  406. NEWSOUND.SoundId = "http://www.roblox.com/asset/?id="..ID
  407. NEWSOUND:play()
  408. if DOESLOOP == true then
  409. NEWSOUND.Looped = true
  410. else
  411. repeat wait(1) until NEWSOUND.Playing == false
  412. NEWSOUND:remove()
  413. end
  414. end))
  415. return NEWSOUND
  416. end
  417.  
  418. local EyeSizes={
  419. NumberSequenceKeypoint.new(0,2,0),
  420. NumberSequenceKeypoint.new(1,0,0)
  421. }
  422. local EyeTrans={
  423. NumberSequenceKeypoint.new(0,0.5,0),
  424. NumberSequenceKeypoint.new(1,1,0)
  425. }
  426. local PE=Instance.new("ParticleEmitter",nil)
  427. PE.LightEmission=.8
  428. PE.Color = ColorSequence.new(BRICKC("Cyan").Color,BRICKC("Dark blue").Color)
  429. PE.Size=NumberSequence.new(EyeSizes)
  430. PE.Transparency=NumberSequence.new(EyeTrans)
  431. PE.Lifetime=NumberRange.new(0.35,1)
  432. PE.Rotation=NumberRange.new(0,360)
  433. PE.Rate=100
  434. PE.VelocitySpread = 10000
  435. PE.Acceleration = Vector3.new(0,85,0)
  436. PE.Drag = 5
  437. PE.Speed = NumberRange.new(0.1,5)
  438. PE.Texture="http://www.roblox.com/asset/?id=1460745664"
  439. PE.ZOffset = 0.5
  440. PE.Name = "PE"
  441. PE.Enabled = false
  442.  
  443. function Fire(art)
  444. local PARTICLES = PE:Clone()
  445. PARTICLES.Parent = art
  446. PARTICLES.Enabled = true
  447. return PARTICLES
  448. end
  449.  
  450. function CFrameFromTopBack(at, top, back)
  451. local right = top:Cross(back)
  452. return CF(at.x, at.y, at.z, right.x, top.x, back.x, right.y, top.y, back.y, right.z, top.z, back.z)
  453. end
  454.  
  455. --WACKYEFFECT({EffectType = "", Size = VT(1,1,1), Size2 = VT(0,0,0), Transparency = 0, Transparency2 = 1, CFrame = CF(), MoveToPos = nil, RotationX = 0, RotationY = 0, RotationZ = 0, Material = "Neon", Color = C3(1,1,1), SoundID = nil, SoundPitch = nil, SoundVolume = nil})
  456. function WACKYEFFECT(Table)
  457. local TYPE = (Table.EffectType or "Sphere")
  458. local SIZE = (Table.Size or VT(1,1,1))
  459. local ENDSIZE = (Table.Size2 or VT(0,0,0))
  460. local TRANSPARENCY = (Table.Transparency or 0)
  461. local ENDTRANSPARENCY = (Table.Transparency2 or 1)
  462. local CFRAME = (Table.CFrame or Torso.CFrame)
  463. local MOVEDIRECTION = (Table.MoveToPos or nil)
  464. local ROTATION1 = (Table.RotationX or 0)
  465. local ROTATION2 = (Table.RotationY or 0)
  466. local ROTATION3 = (Table.RotationZ or 0)
  467. local MATERIAL = (Table.Material or "Neon")
  468. local COLOR = (Table.Color or C3(1,1,1))
  469. local TIME = (Table.Time or 45)
  470. local SOUNDID = (Table.SoundID or nil)
  471. local SOUNDPITCH = (Table.SoundPitch or nil)
  472. local SOUNDVOLUME = (Table.SoundVolume or nil)
  473. coroutine.resume(coroutine.create(function()
  474. local PLAYSSOUND = false
  475. local SOUND = nil
  476. local EFFECT = CreatePart(3, Effects, MATERIAL, 0, TRANSPARENCY, BRICKC("Pearl"), "Effect", VT(1,1,1), true)
  477. if SOUNDID ~= nil and SOUNDPITCH ~= nil and SOUNDVOLUME ~= nil then
  478. PLAYSSOUND = true
  479. SOUND = CreateSound(SOUNDID, EFFECT, SOUNDVOLUME, SOUNDPITCH, false)
  480. end
  481. EFFECT.Color = COLOR
  482. local MSH = nil
  483. if TYPE == "Sphere" then
  484. MSH = CreateMesh("SpecialMesh", EFFECT, "Sphere", "", "", SIZE, VT(0,0,0))
  485. elseif TYPE == "Block" or TYPE == "Box" then
  486. MSH = IT("BlockMesh",EFFECT)
  487. MSH.Scale = SIZE
  488. elseif TYPE == "Wave" then
  489. MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "20329976", "", SIZE, VT(0,0,-SIZE.X/8))
  490. elseif TYPE == "Ring" then
  491. MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "559831844", "", VT(SIZE.X,SIZE.X,0.1), VT(0,0,0))
  492. elseif TYPE == "Slash" then
  493. MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "662586858", "", VT(SIZE.X/10,0,SIZE.X/10), VT(0,0,0))
  494. elseif TYPE == "Round Slash" then
  495. MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "662585058", "", VT(SIZE.X/10,0,SIZE.X/10), VT(0,0,0))
  496. elseif TYPE == "Swirl" then
  497. MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "1051557", "", SIZE, VT(0,0,0))
  498. elseif TYPE == "Skull" then
  499. MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "4770583", "", SIZE, VT(0,0,0))
  500. elseif TYPE == "Crystal" then
  501. MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "9756362", "", SIZE, VT(0,0,0))
  502. end
  503. if MSH ~= nil then
  504. local MOVESPEED = nil
  505. if MOVEDIRECTION ~= nil then
  506. MOVESPEED = (CFRAME.p - MOVEDIRECTION).Magnitude/TIME
  507. end
  508. local GROWTH = SIZE - ENDSIZE
  509. local TRANS = TRANSPARENCY - ENDTRANSPARENCY
  510. if TYPE == "Block" then
  511. EFFECT.CFrame = CFRAME*ANGLES(RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)))
  512. else
  513. EFFECT.CFrame = CFRAME
  514. end
  515. for LOOP = 1, TIME+1 do
  516. Swait()
  517. MSH.Scale = MSH.Scale - GROWTH/TIME
  518. if TYPE == "Wave" then
  519. MSH.Offset = VT(0,0,-MSH.Scale.X/8)
  520. end
  521. EFFECT.Transparency = EFFECT.Transparency - TRANS/TIME
  522. if TYPE == "Block" then
  523. EFFECT.CFrame = CFRAME*ANGLES(RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)))
  524. else
  525. EFFECT.CFrame = EFFECT.CFrame*ANGLES(RAD(ROTATION1),RAD(ROTATION2),RAD(ROTATION3))
  526. end
  527. if MOVEDIRECTION ~= nil then
  528. local ORI = EFFECT.Orientation
  529. EFFECT.CFrame = CF(EFFECT.Position,MOVEDIRECTION)*CF(0,0,-MOVESPEED)
  530. EFFECT.Orientation = ORI
  531. end
  532. end
  533. if PLAYSSOUND == false then
  534. EFFECT:remove()
  535. else
  536. repeat wait(1) until SOUND.Playing == false
  537. EFFECT:remove()
  538. end
  539. else
  540. if PLAYSSOUND == false then
  541. EFFECT:remove()
  542. else
  543. repeat Swait() until SOUND.Playing == false
  544. EFFECT:remove()
  545. end
  546. end
  547. end))
  548. end
  549.  
  550. function MakeForm(PART,TYPE)
  551. if TYPE == "Cyl" then
  552. local MSH = IT("CylinderMesh",PART)
  553. elseif TYPE == "Ball" then
  554. local MSH = IT("SpecialMesh",PART)
  555. MSH.MeshType = "Sphere"
  556. elseif TYPE == "Wedge" then
  557. local MSH = IT("SpecialMesh",PART)
  558. MSH.MeshType = "Wedge"
  559. end
  560. end
  561.  
  562. Debris = game:GetService("Debris")
  563.  
  564. function CastProperRay(StartPos, EndPos, Distance, Ignore)
  565. local DIRECTION = CF(StartPos,EndPos).lookVector
  566. return Raycast(StartPos, DIRECTION, Distance, Ignore)
  567. end
  568.  
  569. local HATWELD = nil
  570. function Pose(WhichPose,Speed,Time,Magic,Gyro,Tors)
  571. PLAYMAINANIM = false
  572. if WhichPose == "Cast1" then
  573. for i=0, Time, 0.1 / Animation_Speed do
  574. Swait()
  575. if Magic == true then
  576. WACKYEFFECT({Time = 15, EffectType = "Crystal", Size = VT(1,1,1)*1.5, Size2 = VT(0,4,0), Transparency = 0, Transparency2 = 1, CFrame = RightArm.CFrame*CF(0,-1,0)*ANGLES(RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360))), MoveToPos = nil, RotationX = 0, RotationY = 0, RotationZ = 0, Material = "Glass", Color = BRICKC"Dark blue".Color, SoundID = nil, SoundPitch = nil, SoundVolume = nil})
  577. end
  578. if Gyro ~= nil and Gyro ~= false then
  579. Gyro.cframe = CF(RootPart.Position,Mouse.Hit.p)
  580. end
  581. RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0 + 0.05 * COS(SINE / 12)) * ANGLES(RAD(0), RAD(0), RAD(35)), Speed / Animation_Speed)
  582. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(5 - 6.5 * SIN(SINE / 12)), RAD(0), RAD(-35)), Speed / Animation_Speed)
  583. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.65 + 0.15 * COS(SINE / 12) - 0.05 * COS(SINE / 12), -0.5) * ANGLES(RAD(125), RAD(0), RAD(45)) * RIGHTSHOULDERC0, Speed / Animation_Speed)
  584. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.25, 0.5 + 0.15 * COS(SINE / 12) - 0.05 * COS(SINE / 12), 0.5) * ANGLES(RAD(-45), RAD(0), RAD(45)) * LEFTSHOULDERC0, Speed / Animation_Speed)
  585. RightHip.C0 = Clerp(RightHip.C0, CF(1, -0.5, -0.5) * ANGLES(RAD(0), RAD(65), RAD(0)) * ANGLES(RAD(-3), RAD(0), RAD(-15)), Speed / Animation_Speed)
  586. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, -0.01) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), Speed / Animation_Speed)
  587. end
  588. elseif WhichPose == "Cast2" then
  589. for i=0, Time, 0.1 / Animation_Speed do
  590. Swait()
  591. if Magic == true then
  592. WACKYEFFECT({Time = 15, EffectType = "Crystal", Size = VT(1,1,1)*1.5, Size2 = VT(0,4,0), Transparency = 0, Transparency2 = 1, CFrame = RightArm.CFrame*CF(0,-1,0)*ANGLES(RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360))), MoveToPos = nil, RotationX = 0, RotationY = 0, RotationZ = 0, Material = "Glass", Color = BRICKC"Dark blue".Color, SoundID = nil, SoundPitch = nil, SoundVolume = nil})
  593. WACKYEFFECT({Time = 15, EffectType = "Crystal", Size = VT(1,1,1)*1.5, Size2 = VT(0,4,0), Transparency = 0, Transparency2 = 1, CFrame = LeftArm.CFrame*CF(0,-1,0)*ANGLES(RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360))), MoveToPos = nil, RotationX = 0, RotationY = 0, RotationZ = 0, Material = "Glass", Color = BRICKC"Dark blue".Color, SoundID = nil, SoundPitch = nil, SoundVolume = nil})
  594. end
  595. if Gyro ~= nil and Gyro ~= false then
  596. Gyro.cframe = CF(RootPart.Position,Mouse.Hit.p)
  597. end
  598. RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0 + 0.05 * COS(SINE / 12)) * ANGLES(RAD(0), RAD(0), RAD(0)), Speed / Animation_Speed)
  599. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(-15 - 6.5 * SIN(SINE / 12)), RAD(0), RAD(0)), Speed / Animation_Speed)
  600. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.65 + 0.15 * COS(SINE / 12) - 0.05 * COS(SINE / 12), -0.5) * ANGLES(RAD(120), RAD(0), RAD(15)) * RIGHTSHOULDERC0, Speed / Animation_Speed)
  601. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.65 + 0.15 * COS(SINE / 12) - 0.05 * COS(SINE / 12), -0.5) * ANGLES(RAD(120), RAD(0), RAD(-15)) * LEFTSHOULDERC0, Speed / Animation_Speed)
  602. RightHip.C0 = Clerp(RightHip.C0, CF(1, -0.5, -0.5) * ANGLES(RAD(0), RAD(65), RAD(0)) * ANGLES(RAD(-3), RAD(0), RAD(-15)), Speed / Animation_Speed)
  603. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, -0.01) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), Speed / Animation_Speed)
  604. end
  605. elseif WhichPose == "RightArmUp" then
  606. for i=0, Time, 0.1 / Animation_Speed do
  607. Swait()
  608. if Magic == true then
  609. WACKYEFFECT({Time = 15, EffectType = "Crystal", Size = VT(1,1,1)*1.5, Size2 = VT(0,4,0), Transparency = 0, Transparency2 = 1, CFrame = RightArm.CFrame*CF(0,-1,0)*ANGLES(RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360))), MoveToPos = nil, RotationX = 0, RotationY = 0, RotationZ = 0, Material = "Glass", Color = BRICKC"Dark blue".Color, SoundID = nil, SoundPitch = nil, SoundVolume = nil})
  610. end
  611. if Gyro ~= nil and Gyro ~= false then
  612. Gyro.cframe = CF(RootPart.Position,Mouse.Hit.p)
  613. end
  614. RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0 + 0.05 * COS(SINE / 12)) * ANGLES(RAD(0), RAD(0), RAD(15)), Speed / Animation_Speed)
  615. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(-5 - 6.5 * SIN(SINE / 12)), RAD(0), RAD(-15)), Speed / Animation_Speed)
  616. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.65 + 0.15 * COS(SINE / 12) - 0.05 * COS(SINE / 12), -0.2) * ANGLES(RAD(125), RAD(0), RAD(25)) * RIGHTSHOULDERC0, Speed / Animation_Speed)
  617. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.25, 0.5 + 0.15 * COS(SINE / 12) - 0.05 * COS(SINE / 12), 0.5) * ANGLES(RAD(-45), RAD(0), RAD(45)) * LEFTSHOULDERC0, Speed / Animation_Speed)
  618. RightHip.C0 = Clerp(RightHip.C0, CF(1, -0.5, -0.5) * ANGLES(RAD(0), RAD(65), RAD(0)) * ANGLES(RAD(-3), RAD(0), RAD(-15)), Speed / Animation_Speed)
  619. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, -0.01) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), Speed / Animation_Speed)
  620. end
  621. elseif WhichPose == "Taunt" then
  622. for i=0, Time, 0.1 / Animation_Speed do
  623. Swait()
  624. RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0 + 0.05 * COS(SINE / 12)) * ANGLES(RAD(0), RAD(0), RAD(0)), Speed / Animation_Speed)
  625. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(-5 - 6.5 * SIN(SINE / 12)), RAD(0), RAD(0)), Speed / Animation_Speed)
  626. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.25, 0.5 + 0.15 * COS(SINE / 12) - 0.05 * COS(SINE / 12), -0.5) * ANGLES(RAD(175), RAD(0), RAD(-35)) * RIGHTSHOULDERC0, Speed / Animation_Speed)
  627. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.25, 0.5 + 0.15 * COS(SINE / 12) - 0.05 * COS(SINE / 12), 0.5) * ANGLES(RAD(-45), RAD(0), RAD(45)) * LEFTSHOULDERC0, Speed / Animation_Speed)
  628. RightHip.C0 = Clerp(RightHip.C0, CF(1, -0.5, -0.5) * ANGLES(RAD(0), RAD(65), RAD(0)) * ANGLES(RAD(-3), RAD(0), RAD(-15)), Speed / Animation_Speed)
  629. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, -0.01) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), Speed / Animation_Speed)
  630. end
  631. HATWELD.Part0 = RightArm
  632. HATWELD.C0 = CF(0,-1.1,-0.4) * ANGLES(RAD(0), RAD(0), RAD(180)) * ANGLES(RAD(-20), RAD(0), RAD(0))
  633. CreateSound(221057812,Torso,10,1,false)
  634. for i=0, Time*2, 0.1 / Animation_Speed do
  635. Swait()
  636. RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0 + 0.05 * COS(SINE / 12)) * ANGLES(RAD(0), RAD(0), RAD(0)), Speed / Animation_Speed)
  637. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(35 - 6.5 * SIN(SINE / 12)), RAD(0), RAD(0)), Speed / Animation_Speed)
  638. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.25, 0.5 + 0.15 * COS(SINE / 12) - 0.05 * COS(SINE / 12), 0.5) * ANGLES(RAD(145), RAD(0), RAD(45)) * RIGHTSHOULDERC0, Speed / Animation_Speed)
  639. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.25, 0.5 + 0.15 * COS(SINE / 12) - 0.05 * COS(SINE / 12), 0.5) * ANGLES(RAD(5), RAD(25), RAD(-15)) * LEFTSHOULDERC0, Speed / Animation_Speed)
  640. RightHip.C0 = Clerp(RightHip.C0, CF(1, -0.5, -0.5) * ANGLES(RAD(0), RAD(65), RAD(0)) * ANGLES(RAD(-3), RAD(0), RAD(-15)), Speed / Animation_Speed)
  641. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, -0.01) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), Speed / Animation_Speed)
  642. end
  643. for i=0, Time, 0.1 / Animation_Speed do
  644. Swait()
  645. RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0 + 0.05 * COS(SINE / 12)) * ANGLES(RAD(0), RAD(0), RAD(0)), Speed / Animation_Speed)
  646. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(5), RAD(0), RAD(0)), Speed / Animation_Speed)
  647. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.35, 0.65, -0.5) * ANGLES(RAD(175), RAD(0), RAD(-35)) * RIGHTSHOULDERC0, Speed / Animation_Speed)
  648. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.25, 0.5 + 0.15 * COS(SINE / 12) - 0.05 * COS(SINE / 12), 0.5) * ANGLES(RAD(-45), RAD(0), RAD(45)) * LEFTSHOULDERC0, Speed / Animation_Speed)
  649. RightHip.C0 = Clerp(RightHip.C0, CF(1, -0.5, -0.5) * ANGLES(RAD(0), RAD(65), RAD(0)) * ANGLES(RAD(-3), RAD(0), RAD(-15)), Speed / Animation_Speed)
  650. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, -0.01) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), Speed / Animation_Speed)
  651. HATWELD.C0 = Clerp(HATWELD.C0, CF(-0.5,-1.2,-0.3) * ANGLES(RAD(0), RAD(0), RAD(180)) * ANGLES(RAD(35), RAD(0), RAD(35)), Speed / Animation_Speed)
  652. end
  653. HATWELD.Part0 = Head
  654. HATWELD.C0 = CF(0,0.35,0)
  655. elseif WhichPose == "Prepare key" then
  656. for i=0, Time, 0.1 / Animation_Speed do
  657. Swait()
  658. if Gyro ~= nil and Gyro ~= false then
  659. Gyro.cframe = CF(RootPart.Position,Tors.Position)
  660. end
  661. RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0 + 0.05 * COS(SINE / 12)) * ANGLES(RAD(0), RAD(0), RAD(65)), Speed / Animation_Speed)
  662. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(5 - 6.5 * SIN(SINE / 12)), RAD(0), RAD(-65)), Speed / Animation_Speed)
  663. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5 + 0.15 * COS(SINE / 12) - 0.05 * COS(SINE / 12), -0.25) * ANGLES(RAD(90), RAD(0), RAD(65)) * RIGHTSHOULDERC0, Speed / Animation_Speed)
  664. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.25, 0.5 + 0.15 * COS(SINE / 12) - 0.05 * COS(SINE / 12), 0.5) * ANGLES(RAD(-45), RAD(0), RAD(45)) * LEFTSHOULDERC0, Speed / Animation_Speed)
  665. RightHip.C0 = Clerp(RightHip.C0, CF(1, -0.5, -0.5) * ANGLES(RAD(0), RAD(65), RAD(0)) * ANGLES(RAD(-3), RAD(0), RAD(-15)), Speed / Animation_Speed)
  666. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, -0.01) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), Speed / Animation_Speed)
  667. end
  668. elseif WhichPose == "Turn key" then
  669. for i=0, Time, 0.1 / Animation_Speed do
  670. Swait()
  671. if Gyro ~= nil and Gyro ~= false then
  672. Gyro.cframe = CF(RootPart.Position,Tors.Position)
  673. end
  674. RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0 + 0.05 * COS(SINE / 12)) * ANGLES(RAD(0), RAD(0), RAD(75)), Speed / Animation_Speed)
  675. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(5 - 6.5 * SIN(SINE / 12)), RAD(0), RAD(-75)), Speed / Animation_Speed)
  676. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5 + 0.15 * COS(SINE / 12) - 0.05 * COS(SINE / 12), -0.25) * ANGLES(RAD(90), RAD(0), RAD(75)) * ANGLES(RAD(0), RAD(-90), RAD(0)) * RIGHTSHOULDERC0, Speed / Animation_Speed)
  677. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.25, 0.5 + 0.15 * COS(SINE / 12) - 0.05 * COS(SINE / 12), 0.5) * ANGLES(RAD(-45), RAD(0), RAD(45)) * LEFTSHOULDERC0, Speed / Animation_Speed)
  678. RightHip.C0 = Clerp(RightHip.C0, CF(1, -0.5, -0.5) * ANGLES(RAD(0), RAD(65), RAD(0)) * ANGLES(RAD(-3), RAD(0), RAD(-15)), Speed / Animation_Speed)
  679. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, -0.01) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), Speed / Animation_Speed)
  680. end
  681. end
  682. PLAYMAINANIM = true
  683. end
  684.  
  685. --Lightning({Color = C3(1,1,1), Start = Torso.Position, End = Mouse.Hit.p, SegmentL = 2, Thickness = 0.1, DoesFade = false, Ignore = Character, MaxDist = 400, Branches = false})
  686. function Lightning(Table)
  687. local Color = Table.Color or C3(1,1,1)
  688. local StartPos = Table.Start or Torso.Position
  689. local EndPos = Table.End or Mouse.Hit.p
  690. local SegmentLength = Table.SegmentL or 2
  691. local Thickness = Table.Thickness or 0.1
  692. local Dissapear = Table.DoesFade or false
  693. local Parent = Table.Ignore or Character
  694. local MaxDist = Table.MaxDist or 400
  695. local Branches = Table.Branches or false
  696. local HIT,HITPOS = CastProperRay(StartPos, EndPos, MaxDist, Parent)
  697. local DISTANCE = math.ceil((StartPos - HITPOS).Magnitude/SegmentLength)
  698. local LIGHTNINGMODEL = IT("Model",Effects)
  699. LIGHTNINGMODEL.Name = "Lightning"
  700. local LastBolt = nil
  701. for E = 1, DISTANCE do
  702. local ExtraSize = (DISTANCE-E)/15
  703. local PART = CreatePart(3, LIGHTNINGMODEL, "Neon", 0, 0, BRICKC("Pearl"), "LightningPart"..E, VT(Thickness+ExtraSize,SegmentLength,Thickness+ExtraSize))
  704. PART.Color = Color
  705. MakeForm(PART,"Cyl")
  706. if LastBolt == nil then
  707. PART.CFrame = CF(StartPos,HITPOS)*ANGLES(RAD(90),RAD(0),RAD(0))*CF(0,-PART.Size.Y/2,0)
  708. else
  709. PART.CFrame = CF(LastBolt.CFrame*CF(0,-LastBolt.Size.Y/2,0).p,CF(HITPOS)*ANGLES(RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)))*CF(0,0,SegmentLength/3+(DISTANCE-E)).p)*ANGLES(RAD(90),RAD(0),RAD(0))*CF(0,-PART.Size.Y/2,0)
  710. end
  711. LastBolt = PART
  712. if Branches == true then
  713. local CHOICE = MRANDOM(1,7+((DISTANCE-E)*2))
  714. if CHOICE == 1 then
  715. local LASTBRANCH = nil
  716. for i = 1, MRANDOM(2,5) do
  717. local ExtraSize2 = ((DISTANCE-E)/25)/i
  718. local PART = CreatePart(3, LIGHTNINGMODEL, "Neon", 0, 0, BRICKC("Pearl"), "Branch"..E.."-"..i, VT(Thickness+ExtraSize2,SegmentLength,Thickness+ExtraSize2))
  719. PART.Color = Color
  720. MakeForm(PART,"Cyl")
  721. if LASTBRANCH == nil then
  722. PART.CFrame = CF(LastBolt.CFrame*CF(0,-LastBolt.Size.Y/2,0).p,LastBolt.CFrame*CF(0,-LastBolt.Size.Y/2,0)*ANGLES(RAD(0),RAD(0),RAD(MRANDOM(0,360)))*CF(0,Thickness*7,0)*CF(0,0,-1).p)*ANGLES(RAD(90),RAD(0),RAD(0))*CF(0,-PART.Size.Y/2,0)
  723. else
  724. PART.CFrame = CF(LASTBRANCH.CFrame*CF(0,-LASTBRANCH.Size.Y/2,0).p,LASTBRANCH.CFrame*CF(0,-LASTBRANCH.Size.Y/2,0)*ANGLES(RAD(0),RAD(0),RAD(MRANDOM(0,360)))*CF(0,Thickness*3,0)*CF(0,0,-1).p)*ANGLES(RAD(90),RAD(0),RAD(0))*CF(0,-PART.Size.Y/2,0)
  725. end
  726. LASTBRANCH = PART
  727. end
  728. end
  729. end
  730. end
  731. if Dissapear == true then
  732. coroutine.resume(coroutine.create(function()
  733. for i = 1, 10 do
  734. Swait()
  735. for _, c in pairs(LIGHTNINGMODEL:GetChildren()) do
  736. if c.ClassName == "Part" then
  737. c.Transparency = i/10
  738. end
  739. end
  740. end
  741. LIGHTNINGMODEL:remove()
  742. end))
  743. elseif Dissapear == false then
  744. Debris:AddItem(LIGHTNINGMODEL,0.1)
  745. end
  746. return {End = LastBolt.CFrame*CF(0,0,-LastBolt.Size.Z/2).p,LastBolt = LastBolt,Model = LIGHTNINGMODEL}
  747. end
  748.  
  749. --//=================================\\
  750. --|| WEAPON CREATION
  751. --\\=================================//
  752.  
  753. for i = 1, 15 do
  754. local FACE = CreatePart(3, Character, "Fabric", 0, 0+(i-1)/15.2, "Dark stone grey", "FaceGradient", VT(1.01,0.58,1.01),false)
  755. FACE.Color = C3(0,0,0)
  756. Head:FindFirstChildOfClass("SpecialMesh"):Clone().Parent = FACE
  757. CreateWeldOrSnapOrMotor("Weld", Head, Head, FACE, CF(0,0.35-(i-1)/35,0), CF(0, 0, 0))
  758. end
  759. local HAT1 = CreatePart(3, Character, "SmoothPlastic", 0, 0, "Really black", "Hat", VT(2,0.2,2),false)
  760. MakeForm(HAT1,"Cyl")
  761. HATWELD = CreateWeldOrSnapOrMotor("Weld", Head, Head, HAT1, CF(0,0.35,0), CF(0, 0, 0))
  762. local BELT = CreatePart(3, Character, "SmoothPlastic", 0, 0, "Really black", "Hat", VT(2.01,0.15,2.01),false)
  763. BELT.Color = C3(15/255,15/255,15/255)
  764. MakeForm(BELT,"Cyl")
  765. CreateWeldOrSnapOrMotor("Weld", HAT1, HAT1, BELT, CF(0,0,0), CF(0, 0, 0))
  766. local HAT2 = CreatePart(3, Character, "SmoothPlastic", 0, 0, "Really black", "Hat", VT(1.3,2.2,1.3),false)
  767. MakeForm(HAT2,"Cyl")
  768. CreateWeldOrSnapOrMotor("Weld", HAT1, HAT1, HAT2, CF(0,1.1,0), CF(0, 0, 0))
  769. local BELT = CreatePart(3, Character, "SmoothPlastic", 0, 0, "Really black", "Hat", VT(1.31,0.2,1.31),false)
  770. BELT.Color = C3(15/255,15/255,15/255)
  771. MakeForm(BELT,"Cyl")
  772. CreateWeldOrSnapOrMotor("Weld", HAT2, HAT2, BELT, CF(0,0,0), CF(0, 0, 0))
  773. local GEM = CreatePart(3, Character, "Neon", 0, 0, "Dark blue", "Gem", VT(0.25,0.25,0.1),false)
  774. MakeForm(GEM,"Ball")
  775. CreateWeldOrSnapOrMotor("Weld", HAT2, HAT2, GEM, CF(0,0,-BELT.Size.X/2), CF(0, 0, 0))
  776. local GEM = CreatePart(3, Character, "Neon", 0, 0, "Dark blue", "Gem", VT(0.25,0.25,0.1),false)
  777. MakeForm(GEM,"Ball")
  778. CreateWeldOrSnapOrMotor("Weld", HAT2, HAT2, GEM, CF(0,0,BELT.Size.X/2), CF(0, 0, 0))
  779. local GEM = CreatePart(3, Character, "Neon", 0, 0, "Dark blue", "Gem", VT(0.1,0.25,0.25),false)
  780. MakeForm(GEM,"Ball")
  781. CreateWeldOrSnapOrMotor("Weld", HAT2, HAT2, GEM, CF(-BELT.Size.X/2,0,0), CF(0, 0, 0))
  782. local GEM = CreatePart(3, Character, "Neon", 0, 0, "Dark blue", "Gem", VT(0.1,0.25,0.25),false)
  783. MakeForm(GEM,"Ball")
  784. CreateWeldOrSnapOrMotor("Weld", HAT2, HAT2, GEM, CF(BELT.Size.X/2,0,0), CF(0, 0, 0))
  785. local BELT = CreatePart(3, Character, "SmoothPlastic", 0, 0, "Really black", "Hat", VT(1.31,0.1,1.31),false)
  786. BELT.Color = C3(15/255,15/255,15/255)
  787. MakeForm(BELT,"Cyl")
  788. CreateWeldOrSnapOrMotor("Weld", HAT2, HAT2, BELT, CF(0,0.7,0), CF(0, 0, 0))
  789. local BELT = CreatePart(3, Character, "SmoothPlastic", 0, 0, "Really black", "Hat", VT(1.31,0.1,1.31),false)
  790. BELT.Color = C3(15/255,15/255,15/255)
  791. MakeForm(BELT,"Cyl")
  792. CreateWeldOrSnapOrMotor("Weld", HAT2, HAT2, BELT, CF(0,-0.7,0), CF(0, 0, 0))
  793. local BELT = CreatePart(3, Character, "SmoothPlastic", 0, 0, "Really black", "Hat", VT(1.31,0.1,1.31),false)
  794. BELT.Color = C3(15/255,15/255,15/255)
  795. MakeForm(BELT,"Cyl")
  796. CreateWeldOrSnapOrMotor("Weld", HAT2, HAT2, BELT, CF(0,0.35,0), CF(0, 0, 0))
  797. local BELT = CreatePart(3, Character, "SmoothPlastic", 0, 0, "Really black", "Hat", VT(1.31,0.1,1.31),false)
  798. BELT.Color = C3(15/255,15/255,15/255)
  799. MakeForm(BELT,"Cyl")
  800. CreateWeldOrSnapOrMotor("Weld", HAT2, HAT2, BELT, CF(0,-0.35,0), CF(0, 0, 0))
  801. local BELT = CreatePart(3, Character, "SmoothPlastic", 0, 0, "Really black", "Hat", VT(1.3,0.5,1.3),false)
  802. MakeForm(BELT,"Ball")
  803. CreateWeldOrSnapOrMotor("Weld", HAT2, HAT2, BELT, CF(0,HAT2.Size.Y/2,0), CF(0, 0, 0))
  804. Humanoid.DisplayDistanceType = "None"
  805. local naeeym2 = IT("BillboardGui",Character)
  806. naeeym2.AlwaysOnTop = true
  807. naeeym2.Size = UDim2.new(5,35,2,15)
  808. naeeym2.StudsOffset = Vector3.new(0,3,0)
  809. naeeym2.MaxDistance = 75
  810. naeeym2.Adornee = Character.Head
  811. naeeym2.Name = "Name"
  812. local tecks2 = IT("TextLabel",naeeym2)
  813. tecks2.BackgroundTransparency = 1
  814. tecks2.TextScaled = true
  815. tecks2.BorderSizePixel = 0
  816. tecks2.Text = "Lunar Warden"
  817. tecks2.Font = "Bodoni"
  818. tecks2.TextSize = 30
  819. tecks2.TextStrokeTransparency = 0.5
  820. tecks2.TextColor3 = C3(0,0,0)
  821. tecks2.TextStrokeColor3 = BRICKC"Dark blue".Color
  822. tecks2.Size = UDim2.new(1,0,0.5,0)
  823. tecks2.Parent = naeeym2
  824. local Eye = CreatePart(3, Character, "Neon", 0, 0, "Really red", "Eye", VT(0.6,0.1,1)/2,false)
  825. MakeForm(Eye,"Ball")
  826. CreateWeldOrSnapOrMotor("Weld", Eye, Head, Eye, CF(0,0.2,0) * ANGLES(RAD(0), RAD(-18), RAD(15)), CF(0, 0, 0.4))
  827. local Eye = CreatePart(3, Character, "Neon", 0, 0, "Really red", "Eye", VT(0.6,0.1,1)/2,false)
  828. MakeForm(Eye,"Ball")
  829. CreateWeldOrSnapOrMotor("Weld", Eye, Head, Eye, CF(0,0.2,0) * ANGLES(RAD(0), RAD(18), RAD(-15)), CF(0, 0, 0.4))
  830. local Eye = CreatePart(3, Character, "Neon", 0, 0, "Really red", "Eye", VT(0.1,1,1)/2,false)
  831. MakeForm(Eye,"Ball")
  832. CreateWeldOrSnapOrMotor("Weld", Eye, Head, Eye, CF(0,0.15,0) * ANGLES(RAD(0), RAD(-18), RAD(0)), CF(0, 0, 0.4))
  833. local Eye = CreatePart(3, Character, "Neon", 0, 0, "Really red", "Eye", VT(0.1,1,1)/2,false)
  834. MakeForm(Eye,"Ball")
  835. CreateWeldOrSnapOrMotor("Weld", Eye, Head, Eye, CF(0,0.15,0) * ANGLES(RAD(0), RAD(18), RAD(0)), CF(0, 0, 0.4))
  836. local top = Instance.new("Shirt")
  837. top.ShirtTemplate = "rbxassetid://276792537"
  838. top.Parent = Character
  839. top.Name = "Cloth"
  840. local bottom = Instance.new("Pants")
  841. bottom.PantsTemplate = "rbxassetid://276792689"
  842. bottom.Parent = Character
  843. bottom.Name = "Cloth"
  844. local BC = Character["Body Colors"]
  845. BC.HeadColor = BrickColor.new("Dark blue")
  846. BC.LeftArmColor = BrickColor.new("Dark blue")
  847. BC.LeftLegColor = BrickColor.new("Dark blue")
  848. BC.RightArmColor = BrickColor.new("Dark blue")
  849. BC.RightLegColor = BrickColor.new("Dark blue")
  850. BC.TorsoColor = BrickColor.new("Dark blue")
  851. for _, c in pairs(Character:GetChildren()) do
  852. if c.ClassName == "Part" and c.Name ~= "FaceGradient" and c.Name ~= "Hat" and c.Name ~= "Gem" then
  853. c.Material = "Neon"
  854. if c:FindFirstChildOfClass("ParticleEmitter") then
  855. c:FindFirstChildOfClass("ParticleEmitter"):remove()
  856. end
  857. c.Color = C3(1,1,1)
  858. if c == Head then
  859. if c:FindFirstChild("face") then
  860. c.face:remove()
  861. end
  862. end
  863. elseif c.ClassName == "CharacterMesh" or c.ClassName == "Accessory" or c.ClassName == "Hat" or c.Name == "Body Colors" then
  864. c:remove()
  865. elseif (c.ClassName == "Shirt" or c.ClassName == "Pants") and c.Name ~= "Cloth" then
  866. c:remove()
  867. end
  868. end
  869. local BODY = {}
  870. for _, c in pairs(Character:GetDescendants()) do
  871. if c:IsA("BasePart") and c.Name ~= "Handle" then
  872. if c ~= RootPart and c ~= Torso and c ~= Head and c ~= RightArm and c ~= LeftArm and c ~= RightLeg and c ~= LeftLeg then
  873. c.CustomPhysicalProperties = PhysicalProperties.new(0, 0, 0, 0, 0)
  874. end
  875. table.insert(BODY,{c,c.Parent,c.Material,c.Color,c.Transparency})
  876. elseif c:IsA("JointInstance") then
  877. table.insert(BODY,{c,c.Parent,nil,nil,nil})
  878. end
  879. end
  880. for e = 1, #BODY do
  881. if BODY[e] ~= nil then
  882. local STUFF = BODY[e]
  883. local PART = STUFF[1]
  884. local PARENT = STUFF[2]
  885. local MATERIAL = STUFF[3]
  886. local COLOR = STUFF[4]
  887. local TRANSPARENCY = STUFF[5]
  888. if PART.ClassName == "Part" and PART ~= RootPart then
  889. PART.Material = MATERIAL
  890. PART.Color = COLOR
  891. PART.Transparency = TRANSPARENCY
  892. end
  893. PART.AncestryChanged:Connect(function()
  894. PART.Parent = PARENT
  895. end)
  896. end
  897. end
  898. function refit()
  899. Character.Parent = workspace
  900. for e = 1, #BODY do
  901. if BODY[e] ~= nil then
  902. local STUFF = BODY[e]
  903. local PART = STUFF[1]
  904. local PARENT = STUFF[2]
  905. local MATERIAL = STUFF[3]
  906. local COLOR = STUFF[4]
  907. local TRANSPARENCY = STUFF[5]
  908. if PART.ClassName == "Part" and PART ~= RootPart then
  909. PART.Material = MATERIAL
  910. PART.Color = COLOR
  911. PART.Transparency = TRANSPARENCY
  912. end
  913. if PART.Parent ~= PARENT then
  914. Humanoid:remove()
  915. PART.Parent = PARENT
  916. Humanoid = IT("Humanoid",Character)
  917. end
  918. end
  919. end
  920. end
  921. local SKILLTEXTCOLOR = BRICKC"Dark blue".Color
  922. local SKILLFONT = "Bodoni"
  923. local SKILLTEXTSIZE = 7
  924.  
  925. Humanoid.Died:connect(function()
  926. refit()
  927. end)
  928.  
  929.  
  930.  
  931. --//=================================\\
  932. --|| DAMAGING
  933. --\\=================================//
  934.  
  935. function ApplyAoE(POSITION,RANGE,FLING,BURN)
  936. local CHILDREN = workspace:GetDescendants()
  937. for index, CHILD in pairs(CHILDREN) do
  938. if CHILD.ClassName == "Model" and CHILD ~= Character then
  939. local HUM = CHILD:FindFirstChildOfClass("Humanoid")
  940. if HUM then
  941. local TORSO = CHILD:FindFirstChild("Torso") or CHILD:FindFirstChild("UpperTorso")
  942. if TORSO then
  943. if HUM.Health > 0 and (TORSO.Position - POSITION).Magnitude <= RANGE then
  944. CHILD:BreakJoints()
  945. if FLING ~= 0 then
  946. for _, c in pairs(CHILD:GetChildren()) do
  947. if c:IsA("BasePart") and c.Transparency == 0 then
  948. if BURN == true then
  949. Fire(c)
  950. end
  951. local bv = Instance.new("BodyVelocity")
  952. bv.maxForce = Vector3.new(1e9, 1e9, 1e9)
  953. bv.velocity = CF(POSITION,TORSO.Position).lookVector*FLING
  954. bv.Parent = c
  955. Debris:AddItem(bv,0.05)
  956. end
  957. end
  958. end
  959. end
  960. end
  961. end
  962. end
  963. end
  964. end
  965.  
  966. --//=================================\\
  967. --|| ATTACK FUNCTIONS AND STUFF
  968. --\\=================================//
  969.  
  970. function Warden_Zap()
  971. ATTACK = true
  972. Rooted = false
  973. local GYRO = IT("BodyGyro",RootPart)
  974. GYRO.D = 750
  975. GYRO.P = 20000
  976. GYRO.MaxTorque = VT(0,40000000,0)
  977. CreateSound(348663022,RightArm,1.5,2,false)
  978. Pose("Cast1",0.8,1,true,GYRO)
  979. local LightningTable = Lightning({Color = SKILLTEXTCOLOR, Start = RightArm.CFrame*CF(0,-1,0).p, End = Mouse.Hit.p, SegmentL = 2, Thickness = 0.2, DoesFade = true, Ignore = Character, MaxDist = 100, Branches = false})
  980. local Hitpos = LightningTable.End
  981. ApplyAoE(Hitpos,10,35)
  982. WACKYEFFECT({Time = 15, EffectType = "Sphere", Size = VT(1,1,1), Size2 = VT(1,1,1)*15, Transparency = 0, Transparency2 = 1, CFrame = CF(Hitpos)*ANGLES(RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360))), MoveToPos = nil, RotationX = 0, RotationY = 0, RotationZ = 0, Material = "Neon", Color = BRICKC"Dark blue".Color, SoundID = BOLTSOUNDS[MRANDOM(1,#BOLTSOUNDS)], SoundPitch = MRANDOM(8,12)/10, SoundVolume = 5})
  983. for i = 1, 4 do
  984. WACKYEFFECT({Time = 15, EffectType = "Sphere", Size = VT(1,1,1), Size2 = VT(0,45,0), Transparency = 0, Transparency2 = 1, CFrame = CF(Hitpos)*ANGLES(RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360))), MoveToPos = nil, RotationX = 0, RotationY = 0, RotationZ = 0, Material = "Neon", Color = BRICKC"Dark blue".Color, SoundID = nil, SoundPitch = nil, SoundVolume = nil})
  985. end
  986. Pose("Cast1",0.8,1,true)
  987. GYRO:remove()
  988. ATTACK = false
  989. Rooted = false
  990. end
  991.  
  992. function Warden_Thunder()
  993. ATTACK = true
  994. Rooted = false
  995. local GYRO = IT("BodyGyro",RootPart)
  996. GYRO.D = 750
  997. GYRO.P = 20000
  998. GYRO.MaxTorque = VT(0,40000000,0)
  999. CreateSound(469345336,Torso,3,2,false)
  1000. Pose("Cast2",1.5,2,true,GYRO)
  1001. coroutine.resume(coroutine.create(function()
  1002. local FRAME = RootPart.CFrame
  1003. for i = 1, 25 do
  1004. local POS = FRAME*CF(MRANDOM(-17,17),0,-i*15)
  1005. local LightningTable = Lightning({Color = SKILLTEXTCOLOR, Start = POS*CF(0,85,0).p, End = POS*CF(0,-15,0).p, SegmentL = 3, Thickness = 0.4, DoesFade = true, Ignore = Character, MaxDist = 400, Branches = true})
  1006. local Hitpos = LightningTable.End
  1007. ApplyAoE(Hitpos,20,15)
  1008. WACKYEFFECT({Time = 15, EffectType = "Sphere", Size = VT(1,1,1), Size2 = VT(1,1,1)*15, Transparency = 0, Transparency2 = 1, CFrame = CF(Hitpos)*ANGLES(RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360))), MoveToPos = nil, RotationX = 0, RotationY = 0, RotationZ = 0, Material = "Neon", Color = BRICKC"Dark blue".Color, SoundID = BOLTSOUNDS[MRANDOM(1,#BOLTSOUNDS)], SoundPitch = MRANDOM(8,12)/10, SoundVolume = 5})
  1009. for i = 1, 4 do
  1010. WACKYEFFECT({Time = 15, EffectType = "Sphere", Size = VT(1,1,1), Size2 = VT(0,75,0), Transparency = 0, Transparency2 = 1, CFrame = CF(Hitpos)*ANGLES(RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360))), MoveToPos = nil, RotationX = 0, RotationY = 0, RotationZ = 0, Material = "Neon", Color = BRICKC"Dark blue".Color, SoundID = nil, SoundPitch = nil, SoundVolume = nil})
  1011. end
  1012. wait(0.05)
  1013. end
  1014. end))
  1015. Pose("Cast2",1.5,0.7,true)
  1016. GYRO:remove()
  1017. ATTACK = false
  1018. Rooted = false
  1019. end
  1020.  
  1021. function Inferno_Ring()
  1022. ATTACK = true
  1023. Rooted = false
  1024. local GYRO = IT("BodyGyro",RootPart)
  1025. GYRO.D = 750
  1026. GYRO.P = 20000
  1027. GYRO.MaxTorque = VT(0,40000000,0)
  1028. local FIRE = IT("Model",Effects)
  1029. FIRE.Name = "Fire"
  1030. local MAIN = CreatePart(3, FIRE, "Neon", 0, 1, "Dark blue", "Center", VT(0,0,0))
  1031. FIRE.PrimaryPart = MAIN
  1032. local FIRES = {}
  1033. for i = 1, 45 do
  1034. local PRT = CreatePart(3, FIRE, "Neon", 0, 1, "Dark blue", "RingPart", VT(3,3,3))
  1035. PRT.CFrame = MAIN.CFrame*ANGLES(RAD(0),RAD((360/45)*i),RAD(0))*CF(0,0,20)
  1036. local F = Fire(PRT)
  1037. table.insert(FIRES,F)
  1038. end
  1039. repeat
  1040. FIRE:SetPrimaryPartCFrame(CF(Mouse.Hit.p))
  1041. Pose("Cast1",1.5,0.01,false,GYRO)
  1042. until HOLD == true
  1043. coroutine.resume(coroutine.create(function()
  1044. for i = 1, 4 do
  1045. ApplyAoE(MAIN.Position,21,-15,true)
  1046. CreateSound(463598785,MAIN,3,1,false)
  1047. for E = 1, #FIRES do
  1048. if FIRES[E] ~= nil then
  1049. FIRES[E].Acceleration = VT(0,300,0)
  1050. FIRES[E].Lifetime=NumberRange.new(0.35,1.5)
  1051. end
  1052. end
  1053. wait(0.3)
  1054. end
  1055. for E = 1, #FIRES do
  1056. if FIRES[E] ~= nil then
  1057. FIRES[E].Enabled = false
  1058. end
  1059. end
  1060. Debris:AddItem(FIRE,5)
  1061. end))
  1062. CreateSound(215395388,RightArm,3,2,false)
  1063. Pose("RightArmUp",1.5,0.5,true)
  1064. GYRO:remove()
  1065. ATTACK = false
  1066. Rooted = false
  1067. end
  1068.  
  1069. function Warden_Wall()
  1070. local HITFLOOR = Raycast(RootPart.Position, (CF(RootPart.Position, RootPart.Position + VT(0, -1, 0))).lookVector, 8, Character)
  1071. if HITFLOOR ~= nil then
  1072. if HITFLOOR.Anchored == true then
  1073. local WALL = HITFLOOR:Clone()
  1074. WALL.Size = VT(45,45,5)
  1075. WALL.Parent = Effects
  1076. WALL.Name = "Wall"
  1077. WALL.CFrame = RootPart.CFrame*CF(0,-65/2.1,-5)*ANGLES(RAD(-15),RAD(0),RAD(0))
  1078. CreateSound(130972023,WALL,5,0.8,false)
  1079. ATTACK = true
  1080. Rooted = true
  1081. local HIT = WALL.Touched:Connect(function(hit)
  1082. if hit.Parent ~= Character then
  1083. hit:BreakJoints()
  1084. end
  1085. end)
  1086. coroutine.resume(coroutine.create(function()
  1087. WACKYEFFECT({Time = 35, EffectType = "Box", Size = WALL.Size, Size2 = WALL.Size*2, Transparency = 0, Transparency2 = 1, CFrame = WALL.CFrame, MoveToPos = nil, RotationX = 0, RotationY = 0, RotationZ = 0, Material = "Neon", Color = BRICKC"Dark blue".Color, SoundID = nil, SoundPitch = nil, SoundVolume = nil})
  1088. for i = 1, 90 do
  1089. Swait()
  1090. WALL.CFrame = WALL.CFrame*CF(0,0.5,0)
  1091. end
  1092. HIT:disconnect()
  1093. wait(5)
  1094. for i = 1, 46 do
  1095. Swait()
  1096. WALL.CFrame = WALL.CFrame*CF(0,-1,0)
  1097. end
  1098. WALL:remove()
  1099. end))
  1100. Pose("RightArmUp",1.5,1.2,true)
  1101. ATTACK = false
  1102. Rooted = false
  1103. end
  1104. end
  1105. end
  1106.  
  1107. function Prison_Key()
  1108. if Mouse.Target ~= nil then
  1109. if Mouse.Target.Parent ~= Character and Mouse.Target.Parent.Parent ~= Character and Mouse.Target.Parent:FindFirstChildOfClass("Humanoid") ~= nil then
  1110. local HUM = Mouse.Target.Parent:FindFirstChildOfClass("Humanoid")
  1111. local TORSO = HUM.Parent:FindFirstChild("Torso") or HUM.Parent:FindFirstChild("UpperTorso")
  1112. local GYRO = IT("BodyGyro",RootPart)
  1113. GYRO.D = 750
  1114. GYRO.P = 20000
  1115. GYRO.MaxTorque = VT(0,40000000,0)
  1116. local grav = Instance.new("BodyPosition",TORSO)
  1117. grav.D = 15
  1118. grav.P = 20000
  1119. grav.maxForce = Vector3.new(math.huge,math.huge,math.huge)
  1120. grav.position = TORSO.Position
  1121. local GYRO2 = IT("BodyGyro",TORSO)
  1122. GYRO2.D = 750
  1123. GYRO2.P = 20000
  1124. GYRO2.MaxTorque = VT(0,40000000,0)
  1125. GYRO2.cframe = CF(TORSO.Position,RootPart.Position)
  1126. grav.Name = "Jail"
  1127. local LOCKPARTS = {}
  1128. ATTACK = true
  1129. Rooted = false
  1130. local LOCK = IT("Model",Effects)
  1131. LOCK.Name = "Lock"
  1132. local LOCK2 = IT("Model",LOCK)
  1133. LOCK2.Name = "Metal"
  1134. --CREATE LOCK--
  1135. local BASE = CreatePart(3, LOCK, "Glass", 0, 0, "Gold", "Keylock", VT(3, 2.5, 1))
  1136. LOCK.PrimaryPart = BASE
  1137. BASE.CFrame = CF(TORSO.Position,RootPart.Position)*CF(0,0,-4)
  1138. local PRT = CreatePart(3, LOCK, "Glass", 0, 0, "Gold", "Keylock", VT(3, 1, 3))
  1139. PRT.CFrame = BASE.CFrame*CF(0,-1.25,0)*ANGLES(RAD(90),RAD(0),RAD(0))
  1140. MakeForm(PRT,"Cyl")
  1141. local PRT = CreatePart(3, LOCK, "Glass", 0, 0, "White", "Hole", VT(1, 1, 1))
  1142. PRT.Color = C3(0,0,0)
  1143. PRT.CFrame = BASE.CFrame*CF(0,0.3,-0.01)*ANGLES(RAD(90),RAD(0),RAD(0))
  1144. MakeForm(PRT,"Cyl")
  1145. local PRT = CreatePart(3, LOCK, "Glass", 0, 0, "White", "Hole", VT(0.5, 1, 1))
  1146. PRT.Color = C3(0,0,0)
  1147. PRT.CFrame = BASE.CFrame*CF(0,-0.2,-0.01)
  1148. for i = 1, 45 do
  1149. local PRT = CreatePart(3, LOCK2, "Glass", 0, 0, "Grey", "Keylock", VT(0.5, 0.5, 0.5))
  1150. PRT.CFrame = BASE.CFrame*CF(0,2,0)*ANGLES(RAD(0),RAD(0),RAD(-90+(360/90*i)))*CF(0,1,0)
  1151. end
  1152. local PRT = CreatePart(3, LOCK2, "Glass", 0, 0, "Grey", "Keylock", VT(0.5, 0.5, 0.5))
  1153. PRT.CFrame = BASE.CFrame*CF(0,1.5,0)*ANGLES(RAD(0),RAD(0),RAD(90))*CF(0,1,0)
  1154. LOCK2.PrimaryPart = PRT
  1155. ---------------
  1156. local CHILDREN = LOCK:GetDescendants()
  1157. for index, CHILD in pairs(CHILDREN) do
  1158. if CHILD:IsA("BasePart") then
  1159. CHILD.Transparency = 1
  1160. end
  1161. end
  1162. for i = 1, 75 do
  1163. LOCK:SetPrimaryPartCFrame(CF(TORSO.Position,RootPart.Position)*CF(0,0,-4))
  1164. Swait()
  1165. GYRO2.cframe = CF(TORSO.Position,RootPart.Position)
  1166. GYRO.cframe = CF(RootPart.Position,TORSO.Position)
  1167. local CHILDREN = LOCK:GetDescendants()
  1168. for index, CHILD in pairs(CHILDREN) do
  1169. if CHILD:IsA("BasePart") then
  1170. CHILD.Transparency = CHILD.Transparency - 1/75
  1171. end
  1172. end
  1173. end
  1174. HUM.DisplayDistanceType = "None"
  1175. local KEY = IT("Model",Effects)
  1176. KEY.Name = "Key"
  1177. --CREATE KEY--
  1178. local KBASE = CreatePart(3, KEY, "Neon", 0, 0, "Dark blue", "KeyBase", VT(0.1, 1, 0.1),false)
  1179. KEY.PrimaryPart = KBASE
  1180. KBASE.CFrame = RightArm.CFrame*CF(0,-2.1,0)*ANGLES(RAD(0),RAD(90),RAD(0))
  1181. local WLD = weldBetween(RightArm,KBASE)
  1182. for i = 1, 45 do
  1183. local PRT = CreatePart(3, KEY, "Neon", 0, 0, "Dark blue", "Key", VT(0.1, 0.1, 0.1),false)
  1184. PRT.CFrame = KBASE.CFrame*CF(0,0.8,0)*ANGLES(RAD(0),RAD(0),RAD((360/45*i)))*CF(0,0.25,0)
  1185. weldBetween(KBASE,PRT)
  1186. end
  1187. local PRT = CreatePart(3, KEY, "Neon", 0, 0, "Dark blue", "Key", VT(0.3, 0.1, 0.1),false)
  1188. PRT.CFrame = KBASE.CFrame*CF(-0.15,-0.45,0)
  1189. weldBetween(KBASE,PRT)
  1190. local PRT = CreatePart(3, KEY, "Neon", 0, 0, "Dark blue", "Key", VT(0.3, 0.1, 0.1),false)
  1191. PRT.CFrame = KBASE.CFrame*CF(-0.15,-0.25,0)
  1192. weldBetween(KBASE,PRT)
  1193. --------------
  1194. Rooted = true
  1195. Pose("Prepare key",1.5,1.2,false,GYRO,TORSO)
  1196. coroutine.resume(coroutine.create(function()
  1197. for i = 1, 10 do
  1198. Swait()
  1199. GYRO2.cframe = CF(TORSO.Position,RootPart.Position)
  1200. GYRO.cframe = CF(RootPart.Position,TORSO.Position)
  1201. end
  1202. CreateSound(1149318312,BASE,5,1,false)
  1203. CreateSound(160772554,BASE,3,1,false)
  1204. LOCK2:SetPrimaryPartCFrame(BASE.CFrame*CF(0,0.8,0)*ANGLES(RAD(0),RAD(0),RAD(90))*CF(0,1,0))
  1205. for i = 1, 4 do
  1206. WACKYEFFECT({Time = 35, EffectType = "Crystal", Size = VT(1,1,1), Size2 = VT(0,15,0), Transparency = 0, Transparency2 = 1, CFrame = BASE.CFrame*CF(1,1.45,0)*ANGLES(RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360))), MoveToPos = nil, RotationX = 0, RotationY = 0, RotationZ = 0, Material = "Neon", Color = BRICKC"Dark blue".Color, SoundID = nil, SoundPitch = nil, SoundVolume = nil})
  1207. end
  1208. WACKYEFFECT({Time = 35, EffectType = "Sphere", Size = VT(0,0,0), Size2 = VT(1,1,1)*25, Transparency = 0, Transparency2 = 1, CFrame = TORSO.CFrame, MoveToPos = nil, RotationX = 0, RotationY = 0, RotationZ = 0, Material = "Neon", Color = BRICKC"Dark blue".Color, SoundID = nil, SoundPitch = MRANDOM(8,12)/10, SoundVolume = 5})
  1209. wait(1)
  1210. TORSO.Parent.Parent = LOCK
  1211. for i = 1, 75 do
  1212. Swait()
  1213. local CHILDREN = KEY:GetDescendants()
  1214. for index, CHILD in pairs(CHILDREN) do
  1215. if CHILD:IsA("BasePart") then
  1216. CHILD.Transparency = i/25
  1217. end
  1218. end
  1219. local CHILDREN = LOCK:GetDescendants()
  1220. for index, CHILD in pairs(CHILDREN) do
  1221. if CHILD:IsA("BasePart") and CHILD.Name ~= "HumanoidRootPart" then
  1222. CHILD.Transparency = CHILD.Transparency + 1/75
  1223. elseif CHILD.ClassName == "Decal" then
  1224. CHILD.Transparency = CHILD.Transparency + 1/75
  1225. end
  1226. end
  1227. end
  1228. TORSO.Parent:ClearAllChildren()
  1229. KEY:remove()
  1230. LOCK:remove()
  1231. end))
  1232. Pose("Turn key",0.8,1.2,false,GYRO,TORSO)
  1233. GYRO:remove()
  1234. ATTACK = false
  1235. Rooted = false
  1236. end
  1237. end
  1238. end
  1239.  
  1240. function Hat()
  1241. ATTACK = true
  1242. Rooted = false
  1243. Pose("Taunt",0.4,1.2,false)
  1244. ATTACK = false
  1245. Rooted = false
  1246. end
  1247.  
  1248. Player_Size = 1 --Size of the player.
  1249.  
  1250. print("hey hello am saba1520 and am editor of this script")
  1251.  
  1252. Void = nil
  1253. VoidParts = {}
  1254. Equipped = false
  1255. function RayCast(Position, Direction, MaxDistance, IgnoreList)
  1256. return game:GetService("Workspace"):FindPartOnRayWithIgnoreList(Ray.new(Position, Direction.unit * (MaxDistance or 999.999)), IgnoreList)
  1257. end
  1258.  
  1259. Player = Player
  1260. Character = Character
  1261.  
  1262. Humanoid = Character:FindFirstChildOfClass("Humanoid")
  1263. Torso = Character:FindFirstChild("Torso")
  1264. if not Player or not Humanoid or Humanoid.Health == 0 or not Torso then
  1265. return
  1266. end
  1267. Equipped = true
  1268. Void = Instance.new("Model")
  1269. Void.Name = "Void"
  1270. Angle = 0
  1271. for i = 1, 1 do
  1272. local VoidPart = Instance.new("Part")
  1273. VoidPart.Name = "VoidPart"
  1274. VoidPart.Transparency = 1
  1275. VoidPart.BrickColor = BrickColor.new("Really black")
  1276. VoidPart.Material = Enum.Material.Plastic
  1277. VoidPart.Shape = Enum.PartType.Block
  1278. VoidPart.FormFactor = Enum.FormFactor.Custom
  1279. VoidPart.TopSurface = Enum.SurfaceType.Smooth
  1280. VoidPart.BottomSurface = Enum.SurfaceType.Smooth
  1281. VoidPart.Anchored = true
  1282. VoidPart.CanCollide = false
  1283. VoidPart.Locked = true
  1284. VoidPart.Size = Vector3.new(18, 0.2, 18)
  1285. local BlockMesh = Instance.new("BlockMesh")
  1286. BlockMesh.Scale = Vector3.new(1, (1 + (0.005 * i)), 1)
  1287. BlockMesh.Parent = VoidPart
  1288. VoidPart.Parent = Void
  1289. local Star = Instance.new("Decal", VoidPart)
  1290. Star.Texture = "http://www.roblox.com/asset/?id=363839172"
  1291. --CricleForTarget
  1292. --121028264 MagicCircle1
  1293. --160506713 MagicCircle2
  1294. --327794305 MagicCircle3 (Death)
  1295. --160508788 MagicCircle4 (Scary)
  1296. --124339738 CoolCircle5
  1297. --268043891 Abyss-Demon-Magic-Circle
  1298. Star.Face = "Top"
  1299. local Light = Instance.new("PointLight", VoidPart)
  1300. Light.Color = Color3.new(0,0,1)
  1301. Light.Brightness = 200
  1302. Light.Range = 35
  1303. table.insert(VoidParts, VoidPart)
  1304. end
  1305. Spawn(function()
  1306. while Equipped and Humanoid.Parent and Humanoid.Health > 0 and Torso.Parent do
  1307. if Angle == 360 then
  1308. Angle = 0
  1309. end
  1310. Angle = Angle + 0.05
  1311. local Hit, EndPosition = RayCast(Torso.Position, Vector3.new(0, -1, 0), (Torso.Size.Y * 6.5), {Character})
  1312. if Hit then
  1313. if not Void.Parent then
  1314. Void.Parent = Character
  1315. end
  1316. for i, v in pairs(VoidParts) do
  1317. v.CFrame = CFrame.new(Torso.Position.X, EndPosition.Y, Torso.Position.Z) * CFrame.Angles(0, (Angle + i), 0)
  1318. end
  1319. else
  1320. Void.Parent = nil
  1321. end
  1322. wait()
  1323. end
  1324. end)
  1325.  
  1326.  
  1327. --//=================================\\
  1328. --|| ASSIGN THINGS TO KEYS
  1329. --\\=================================//
  1330.  
  1331. function MouseDown(Mouse)
  1332. HOLD = true
  1333. if ATTACK == false then
  1334. end
  1335. end
  1336.  
  1337. function MouseUp(Mouse)
  1338. HOLD = false
  1339. end
  1340.  
  1341. function KeyDown(Key)
  1342. KEYHOLD = true
  1343. if Key == "z" and ATTACK == false then
  1344. Warden_Zap()
  1345. end
  1346.  
  1347. if Key == "b" and ATTACK == false then
  1348. Warden_Thunder()
  1349. end
  1350.  
  1351. if Key == "c" and ATTACK == false then
  1352. Inferno_Ring()
  1353. end
  1354.  
  1355. if Key == "v" and ATTACK == false then
  1356. Warden_Wall()
  1357. end
  1358.  
  1359. if Key == "x" and ATTACK == false then
  1360. Prison_Key()
  1361. end
  1362.  
  1363. if Key == "t" and ATTACK == false then
  1364. Hat()
  1365. end
  1366. end
  1367.  
  1368. function KeyUp(Key)
  1369. KEYHOLD = false
  1370. end
  1371.  
  1372. Mouse.Button1Down:connect(function(NEWKEY)
  1373. MouseDown(NEWKEY)
  1374. end)
  1375. Mouse.Button1Up:connect(function(NEWKEY)
  1376. MouseUp(NEWKEY)
  1377. end)
  1378. Mouse.KeyDown:connect(function(NEWKEY)
  1379. KeyDown(NEWKEY)
  1380. end)
  1381. Mouse.KeyUp:connect(function(NEWKEY)
  1382. KeyUp(NEWKEY)
  1383. end)
  1384.  
  1385. --//=================================\\
  1386. --\\=================================//
  1387.  
  1388.  
  1389. function unanchor()
  1390. if UNANCHOR == true then
  1391. g = Character:GetChildren()
  1392. for i = 1, #g do
  1393. if g[i].ClassName == "Part" then
  1394. g[i].Anchored = false
  1395. end
  1396. end
  1397. end
  1398. end
  1399.  
  1400.  
  1401. --//=================================\\
  1402. --|| WRAP THE WHOLE SCRIPT UP
  1403. --\\=================================//
  1404.  
  1405. Humanoid.Changed:connect(function(Jump)
  1406. if Jump == "Jump" and (Disable_Jump == true) then
  1407. Humanoid.Jump = false
  1408. end
  1409. end)
  1410.  
  1411. while true do
  1412. Swait()
  1413. script.Parent = WEAPONGUI
  1414. Humanoid.Parent = Character
  1415. if Humanoid then
  1416. local IDLEANIMATION = Humanoid:LoadAnimation(ROBLOXIDLEANIMATION)
  1417. IDLEANIMATION:Play()
  1418. end
  1419. if ANIMATE.Parent == Character then
  1420. ANIMATE:Destroy()
  1421. end
  1422. SINE = SINE + CHANGE
  1423. local TORSOVELOCITY = (RootPart.Velocity * VT(1, 0, 1)).magnitude
  1424. local TORSOVERTICALVELOCITY = RootPart.Velocity.y
  1425. Humanoid.HipHeight = 1
  1426. Humanoid.Name = "Warden"
  1427. Humanoid.PlatformStand = false
  1428. if PLAYMAINANIM == true then
  1429. if TORSOVELOCITY < 1 then
  1430. RootJoint.C0 = Clerp(RootJoint.C0, ROOTC0 * CF(0, 0, 0 + 0.45 * COS(SINE / 12)) * ANGLES(RAD(7 + 2.5 * SIN(SINE / 12)), RAD(0), RAD(5 + 1 * SIN(SINE / 12))), 1 / Animation_Speed)
  1431. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0) * ANGLES(RAD(0 + 4.5 * SIN(SINE / 12)), RAD(0), RAD(-5 - 2.5 * SIN(SINE / 12))), 1 / Animation_Speed)
  1432. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(0), RAD(60)) * RIGHTSHOULDERC0, 0.2 / Animation_Speed)
  1433. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(0), RAD(-60)) * LEFTSHOULDERC0, 0.2 / Animation_Speed)
  1434. RightHip.C0 = Clerp(RightHip.C0, CF(1, -1 + 0.15 * COS(SINE / 12), -0.01) * ANGLES(RAD(-7.5 * SIN(SINE / 12)), RAD(75), RAD(0)) * ANGLES(RAD(-8 - 2.5 * SIN(SINE / 12)), RAD(0), RAD(0)), 1 / Animation_Speed)
  1435. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -0.5 + 0.25 * COS(SINE / 12), -0.5) * ANGLES(RAD(-7.5 * SIN(SINE / 12)), RAD(-90), RAD(0)) * ANGLES(RAD(-8 - 2.5 * SIN(SINE / 12)), RAD(0), RAD(0)), 1 / Animation_Speed)
  1436. elseif TORSOVELOCITY > 1 then
  1437. RootJoint.C0 = Clerp(RootJoint.C0, ROOTC0 * CF(0, 0, 0 + 0.25 * COS(SINE / 12)) * ANGLES(RAD(25 + 2.5 * SIN(SINE / 12)), RAD(0), RAD(5 + 2.5 * SIN(SINE / 12))), 1 / Animation_Speed)
  1438. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0) * ANGLES(RAD(-25 + 4.5 * SIN(SINE / 12)), RAD(0), RAD(-5 - 2.5 * SIN(SINE / 12))), 1 / Animation_Speed)
  1439. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5 + 0.25 * COS(SINE / 12), 0) * ANGLES(RAD(-25), RAD(0 - 7.5 * SIN(SINE / 12)), RAD(25 + 7.5 * SIN(SINE / 12))) * RIGHTSHOULDERC0, 1 / Animation_Speed)
  1440. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5 + 0.25 * COS(SINE / 12), 0) * ANGLES(RAD(-25), RAD(0 + 7.5 * SIN(SINE / 12)), RAD(-25 - 7.5 * SIN(SINE / 12))) * LEFTSHOULDERC0, 1 / Animation_Speed)
  1441. RightHip.C0 = Clerp(RightHip.C0, CF(1, -1, -0.01) * ANGLES(RAD(-25 - 7.5 * SIN(SINE / 12)), RAD(75), RAD(0)) * ANGLES(RAD(-8 - 5.5 * SIN(SINE / 12)), RAD(0), RAD(0)), 1 / Animation_Speed)
  1442. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -0.5, -0.5) * ANGLES(RAD(-7.5 * SIN(SINE / 12)), RAD(-90), RAD(0)) * ANGLES(RAD(-8 - 2.5 * SIN(SINE / 12)), RAD(0), RAD(0)), 1 / Animation_Speed)
  1443. end
  1444. end
  1445. unanchor()
  1446. Humanoid.MaxHealth = "inf"
  1447. Humanoid.Health = "inf"
  1448. if Rooted == false then
  1449. Disable_Jump = false
  1450. Humanoid.WalkSpeed = Speed
  1451. elseif Rooted == true then
  1452. Disable_Jump = true
  1453. Humanoid.WalkSpeed = 0
  1454. end
  1455. for _, c in pairs(Character:GetChildren()) do
  1456. if c.ClassName == "Part" and c.Name ~= "Eye" then
  1457. c.Material = "Neon"
  1458. if c:FindFirstChildOfClass("ParticleEmitter") then
  1459. c:FindFirstChildOfClass("ParticleEmitter"):remove()
  1460. end
  1461. c.Color = C3(1,1,1)
  1462. if c == Head then
  1463. if c:FindFirstChild("face") then
  1464. c.face:remove()
  1465. end
  1466. end
  1467. elseif c.ClassName == "CharacterMesh" or c.ClassName == "Accessory" or c.ClassName == "Hat" or c.Name == "Body Colors" then
  1468. c:remove()
  1469. elseif (c.ClassName == "Shirt" or c.ClassName == "Pants") and c.Name ~= "Cloth" then
  1470. c:remove()
  1471. end
  1472. end
  1473. sick.SoundId = "rbxassetid://561833161"
  1474. sick.Looped = true
  1475. sick.Pitch = 1
  1476. sick.Volume = 3
  1477. sick:Resume()
  1478. sick.Parent = Torso
  1479. refit()
  1480. if Head:FindFirstChildOfClass("Sound") then
  1481. Head:FindFirstChildOfClass("Sound"):remove()
  1482. end
  1483. end
  1484.  
  1485. --//=================================\\
  1486. --\\=================================//
  1487.  
  1488.  
  1489.  
  1490.  
  1491.  
  1492. --//====================================================\\--
  1493. --|| END OF SCRIPT
  1494. --\\====================================================//--
Add Comment
Please, Sign In to add comment