Advertisement
1x11337

Lunar Warden

Oct 26th, 2018
448
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. local Player = game:GetService("Players").baldiwrds --- Name Change
  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").baldiwrds
  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. local SKILL1FRAME = CreateFrame(WEAPONGUI, 0.75, 2, UD2(0.23, 0, 0.80, 0), UD2(0.26, 0, 0.07, 0), C3(0,0,0), C3(0, 0, 0), "Skill 1 Frame")
  930. local SKILL2FRAME = CreateFrame(WEAPONGUI, 0.75, 2, UD2(0.50, 0, 0.80, 0), UD2(0.26, 0, 0.07, 0), C3(0,0,0), C3(0, 0, 0), "Skill 2 Frame")
  931. local SKILL3FRAME = CreateFrame(WEAPONGUI, 0.75, 2, UD2(0.23, 0, 0.90, 0), UD2(0.26, 0, 0.07, 0), C3(0,0,0), C3(0, 0, 0), "Skill 3 Frame")
  932. local SKILL4FRAME = CreateFrame(WEAPONGUI, 0.75, 2, UD2(0.50, 0, 0.90, 0), UD2(0.26, 0, 0.07, 0), C3(0,0,0), C3(0, 0, 0), "Skill 4 Frame")
  933. local SKILL5FRAME = CreateFrame(WEAPONGUI, 0.75, 2, UD2(0.365, 0, 0.70, 0), UD2(0.26, 0, 0.07, 0), C3(0,0,0), C3(0, 0, 0), "Skill 5 Frame")
  934.  
  935. local SKILL1TEXT = CreateLabel(SKILL1FRAME, "[Z] Warden Zap", SKILLTEXTCOLOR, SKILLTEXTSIZE, SKILLFONT, 0, 2, 0, "Text 1")
  936. local SKILL2TEXT = CreateLabel(SKILL2FRAME, "[B] Warden Thunder", SKILLTEXTCOLOR, SKILLTEXTSIZE, SKILLFONT, 0, 2, 0, "Text 2")
  937. local SKILL3TEXT = CreateLabel(SKILL3FRAME, "[C] Inferno Ring", SKILLTEXTCOLOR, SKILLTEXTSIZE, SKILLFONT, 0, 2, 0, "Text 3")
  938. local SKILL4TEXT = CreateLabel(SKILL4FRAME, "[V] Warden Wall", SKILLTEXTCOLOR, SKILLTEXTSIZE, SKILLFONT, 0, 2, 0, "Text 4")
  939. local SKILL5TEXT = CreateLabel(SKILL5FRAME, "[X] Prison Key", SKILLTEXTCOLOR, SKILLTEXTSIZE, SKILLFONT, 0, 2, 0, "Text 5")
  940.  
  941. --//=================================\\
  942. --|| DAMAGING
  943. --\\=================================//
  944.  
  945. function ApplyAoE(POSITION,RANGE,FLING,BURN)
  946. local CHILDREN = workspace:GetDescendants()
  947. for index, CHILD in pairs(CHILDREN) do
  948. if CHILD.ClassName == "Model" and CHILD ~= Character then
  949. local HUM = CHILD:FindFirstChildOfClass("Humanoid")
  950. if HUM then
  951. local TORSO = CHILD:FindFirstChild("Torso") or CHILD:FindFirstChild("UpperTorso")
  952. if TORSO then
  953. if HUM.Health > 0 and (TORSO.Position - POSITION).Magnitude <= RANGE then
  954. CHILD:BreakJoints()
  955. if FLING ~= 0 then
  956. for _, c in pairs(CHILD:GetChildren()) do
  957. if c:IsA("BasePart") and c.Transparency == 0 then
  958. if BURN == true then
  959. Fire(c)
  960. end
  961. local bv = Instance.new("BodyVelocity")
  962. bv.maxForce = Vector3.new(1e9, 1e9, 1e9)
  963. bv.velocity = CF(POSITION,TORSO.Position).lookVector*FLING
  964. bv.Parent = c
  965. Debris:AddItem(bv,0.05)
  966. end
  967. end
  968. end
  969. end
  970. end
  971. end
  972. end
  973. end
  974. end
  975.  
  976. --//=================================\\
  977. --|| ATTACK FUNCTIONS AND STUFF
  978. --\\=================================//
  979.  
  980. function Warden_Zap()
  981. ATTACK = true
  982. Rooted = false
  983. local GYRO = IT("BodyGyro",RootPart)
  984. GYRO.D = 750
  985. GYRO.P = 20000
  986. GYRO.MaxTorque = VT(0,40000000,0)
  987. CreateSound(348663022,RightArm,1.5,2,false)
  988. Pose("Cast1",0.8,1,true,GYRO)
  989. 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})
  990. local Hitpos = LightningTable.End
  991. ApplyAoE(Hitpos,10,35)
  992. 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})
  993. for i = 1, 4 do
  994. 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})
  995. end
  996. Pose("Cast1",0.8,1,true)
  997. GYRO:remove()
  998. ATTACK = false
  999. Rooted = false
  1000. end
  1001.  
  1002. function Warden_Thunder()
  1003. ATTACK = true
  1004. Rooted = false
  1005. local GYRO = IT("BodyGyro",RootPart)
  1006. GYRO.D = 750
  1007. GYRO.P = 20000
  1008. GYRO.MaxTorque = VT(0,40000000,0)
  1009. CreateSound(469345336,Torso,3,2,false)
  1010. Pose("Cast2",1.5,2,true,GYRO)
  1011. coroutine.resume(coroutine.create(function()
  1012. local FRAME = RootPart.CFrame
  1013. for i = 1, 25 do
  1014. local POS = FRAME*CF(MRANDOM(-17,17),0,-i*15)
  1015. 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})
  1016. local Hitpos = LightningTable.End
  1017. ApplyAoE(Hitpos,20,15)
  1018. 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})
  1019. for i = 1, 4 do
  1020. 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})
  1021. end
  1022. wait(0.05)
  1023. end
  1024. end))
  1025. Pose("Cast2",1.5,0.7,true)
  1026. GYRO:remove()
  1027. ATTACK = false
  1028. Rooted = false
  1029. end
  1030.  
  1031. function Inferno_Ring()
  1032. ATTACK = true
  1033. Rooted = false
  1034. local GYRO = IT("BodyGyro",RootPart)
  1035. GYRO.D = 750
  1036. GYRO.P = 20000
  1037. GYRO.MaxTorque = VT(0,40000000,0)
  1038. local FIRE = IT("Model",Effects)
  1039. FIRE.Name = "Fire"
  1040. local MAIN = CreatePart(3, FIRE, "Neon", 0, 1, "Dark blue", "Center", VT(0,0,0))
  1041. FIRE.PrimaryPart = MAIN
  1042. local FIRES = {}
  1043. for i = 1, 45 do
  1044. local PRT = CreatePart(3, FIRE, "Neon", 0, 1, "Dark blue", "RingPart", VT(3,3,3))
  1045. PRT.CFrame = MAIN.CFrame*ANGLES(RAD(0),RAD((360/45)*i),RAD(0))*CF(0,0,20)
  1046. local F = Fire(PRT)
  1047. table.insert(FIRES,F)
  1048. end
  1049. repeat
  1050. FIRE:SetPrimaryPartCFrame(CF(Mouse.Hit.p))
  1051. Pose("Cast1",1.5,0.01,false,GYRO)
  1052. until HOLD == true
  1053. coroutine.resume(coroutine.create(function()
  1054. for i = 1, 4 do
  1055. ApplyAoE(MAIN.Position,21,-15,true)
  1056. CreateSound(463598785,MAIN,3,1,false)
  1057. for E = 1, #FIRES do
  1058. if FIRES[E] ~= nil then
  1059. FIRES[E].Acceleration = VT(0,300,0)
  1060. FIRES[E].Lifetime=NumberRange.new(0.35,1.5)
  1061. end
  1062. end
  1063. wait(0.3)
  1064. end
  1065. for E = 1, #FIRES do
  1066. if FIRES[E] ~= nil then
  1067. FIRES[E].Enabled = false
  1068. end
  1069. end
  1070. Debris:AddItem(FIRE,5)
  1071. end))
  1072. CreateSound(215395388,RightArm,3,2,false)
  1073. Pose("RightArmUp",1.5,0.5,true)
  1074. GYRO:remove()
  1075. ATTACK = false
  1076. Rooted = false
  1077. end
  1078.  
  1079. function Warden_Wall()
  1080. local HITFLOOR = Raycast(RootPart.Position, (CF(RootPart.Position, RootPart.Position + VT(0, -1, 0))).lookVector, 8, Character)
  1081. if HITFLOOR ~= nil then
  1082. if HITFLOOR.Anchored == true then
  1083. local WALL = HITFLOOR:Clone()
  1084. WALL.Size = VT(45,45,5)
  1085. WALL.Parent = Effects
  1086. WALL.Name = "Wall"
  1087. WALL.CFrame = RootPart.CFrame*CF(0,-65/2.1,-5)*ANGLES(RAD(-15),RAD(0),RAD(0))
  1088. CreateSound(130972023,WALL,5,0.8,false)
  1089. ATTACK = true
  1090. Rooted = true
  1091. local HIT = WALL.Touched:Connect(function(hit)
  1092. if hit.Parent ~= Character then
  1093. hit:BreakJoints()
  1094. end
  1095. end)
  1096. coroutine.resume(coroutine.create(function()
  1097. 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})
  1098. for i = 1, 90 do
  1099. Swait()
  1100. WALL.CFrame = WALL.CFrame*CF(0,0.5,0)
  1101. end
  1102. HIT:disconnect()
  1103. wait(5)
  1104. for i = 1, 46 do
  1105. Swait()
  1106. WALL.CFrame = WALL.CFrame*CF(0,-1,0)
  1107. end
  1108. WALL:remove()
  1109. end))
  1110. Pose("RightArmUp",1.5,1.2,true)
  1111. ATTACK = false
  1112. Rooted = false
  1113. end
  1114. end
  1115. end
  1116.  
  1117. function Prison_Key()
  1118. if Mouse.Target ~= nil then
  1119. if Mouse.Target.Parent ~= Character and Mouse.Target.Parent.Parent ~= Character and Mouse.Target.Parent:FindFirstChildOfClass("Humanoid") ~= nil then
  1120. local HUM = Mouse.Target.Parent:FindFirstChildOfClass("Humanoid")
  1121. local TORSO = HUM.Parent:FindFirstChild("Torso") or HUM.Parent:FindFirstChild("UpperTorso")
  1122. local GYRO = IT("BodyGyro",RootPart)
  1123. GYRO.D = 750
  1124. GYRO.P = 20000
  1125. GYRO.MaxTorque = VT(0,40000000,0)
  1126. local grav = Instance.new("BodyPosition",TORSO)
  1127. grav.D = 15
  1128. grav.P = 20000
  1129. grav.maxForce = Vector3.new(math.huge,math.huge,math.huge)
  1130. grav.position = TORSO.Position
  1131. local GYRO2 = IT("BodyGyro",TORSO)
  1132. GYRO2.D = 750
  1133. GYRO2.P = 20000
  1134. GYRO2.MaxTorque = VT(0,40000000,0)
  1135. GYRO2.cframe = CF(TORSO.Position,RootPart.Position)
  1136. grav.Name = "Jail"
  1137. local LOCKPARTS = {}
  1138. ATTACK = true
  1139. Rooted = false
  1140. local LOCK = IT("Model",Effects)
  1141. LOCK.Name = "Lock"
  1142. local LOCK2 = IT("Model",LOCK)
  1143. LOCK2.Name = "Metal"
  1144. --CREATE LOCK--
  1145. local BASE = CreatePart(3, LOCK, "Glass", 0, 0, "Gold", "Keylock", VT(3, 2.5, 1))
  1146. LOCK.PrimaryPart = BASE
  1147. BASE.CFrame = CF(TORSO.Position,RootPart.Position)*CF(0,0,-4)
  1148. local PRT = CreatePart(3, LOCK, "Glass", 0, 0, "Gold", "Keylock", VT(3, 1, 3))
  1149. PRT.CFrame = BASE.CFrame*CF(0,-1.25,0)*ANGLES(RAD(90),RAD(0),RAD(0))
  1150. MakeForm(PRT,"Cyl")
  1151. local PRT = CreatePart(3, LOCK, "Glass", 0, 0, "White", "Hole", VT(1, 1, 1))
  1152. PRT.Color = C3(0,0,0)
  1153. PRT.CFrame = BASE.CFrame*CF(0,0.3,-0.01)*ANGLES(RAD(90),RAD(0),RAD(0))
  1154. MakeForm(PRT,"Cyl")
  1155. local PRT = CreatePart(3, LOCK, "Glass", 0, 0, "White", "Hole", VT(0.5, 1, 1))
  1156. PRT.Color = C3(0,0,0)
  1157. PRT.CFrame = BASE.CFrame*CF(0,-0.2,-0.01)
  1158. for i = 1, 45 do
  1159. local PRT = CreatePart(3, LOCK2, "Glass", 0, 0, "Grey", "Keylock", VT(0.5, 0.5, 0.5))
  1160. PRT.CFrame = BASE.CFrame*CF(0,2,0)*ANGLES(RAD(0),RAD(0),RAD(-90+(360/90*i)))*CF(0,1,0)
  1161. end
  1162. local PRT = CreatePart(3, LOCK2, "Glass", 0, 0, "Grey", "Keylock", VT(0.5, 0.5, 0.5))
  1163. PRT.CFrame = BASE.CFrame*CF(0,1.5,0)*ANGLES(RAD(0),RAD(0),RAD(90))*CF(0,1,0)
  1164. LOCK2.PrimaryPart = PRT
  1165. ---------------
  1166. local CHILDREN = LOCK:GetDescendants()
  1167. for index, CHILD in pairs(CHILDREN) do
  1168. if CHILD:IsA("BasePart") then
  1169. CHILD.Transparency = 1
  1170. end
  1171. end
  1172. for i = 1, 75 do
  1173. LOCK:SetPrimaryPartCFrame(CF(TORSO.Position,RootPart.Position)*CF(0,0,-4))
  1174. Swait()
  1175. GYRO2.cframe = CF(TORSO.Position,RootPart.Position)
  1176. GYRO.cframe = CF(RootPart.Position,TORSO.Position)
  1177. local CHILDREN = LOCK:GetDescendants()
  1178. for index, CHILD in pairs(CHILDREN) do
  1179. if CHILD:IsA("BasePart") then
  1180. CHILD.Transparency = CHILD.Transparency - 1/75
  1181. end
  1182. end
  1183. end
  1184. HUM.DisplayDistanceType = "None"
  1185. local KEY = IT("Model",Effects)
  1186. KEY.Name = "Key"
  1187. --CREATE KEY--
  1188. local KBASE = CreatePart(3, KEY, "Neon", 0, 0, "Dark blue", "KeyBase", VT(0.1, 1, 0.1),false)
  1189. KEY.PrimaryPart = KBASE
  1190. KBASE.CFrame = RightArm.CFrame*CF(0,-2.1,0)*ANGLES(RAD(0),RAD(90),RAD(0))
  1191. local WLD = weldBetween(RightArm,KBASE)
  1192. for i = 1, 45 do
  1193. local PRT = CreatePart(3, KEY, "Neon", 0, 0, "Dark blue", "Key", VT(0.1, 0.1, 0.1),false)
  1194. PRT.CFrame = KBASE.CFrame*CF(0,0.8,0)*ANGLES(RAD(0),RAD(0),RAD((360/45*i)))*CF(0,0.25,0)
  1195. weldBetween(KBASE,PRT)
  1196. end
  1197. local PRT = CreatePart(3, KEY, "Neon", 0, 0, "Dark blue", "Key", VT(0.3, 0.1, 0.1),false)
  1198. PRT.CFrame = KBASE.CFrame*CF(-0.15,-0.45,0)
  1199. weldBetween(KBASE,PRT)
  1200. local PRT = CreatePart(3, KEY, "Neon", 0, 0, "Dark blue", "Key", VT(0.3, 0.1, 0.1),false)
  1201. PRT.CFrame = KBASE.CFrame*CF(-0.15,-0.25,0)
  1202. weldBetween(KBASE,PRT)
  1203. --------------
  1204. Rooted = true
  1205. Pose("Prepare key",1.5,1.2,false,GYRO,TORSO)
  1206. coroutine.resume(coroutine.create(function()
  1207. for i = 1, 10 do
  1208. Swait()
  1209. GYRO2.cframe = CF(TORSO.Position,RootPart.Position)
  1210. GYRO.cframe = CF(RootPart.Position,TORSO.Position)
  1211. end
  1212. CreateSound(1149318312,BASE,5,1,false)
  1213. CreateSound(160772554,BASE,3,1,false)
  1214. LOCK2:SetPrimaryPartCFrame(BASE.CFrame*CF(0,0.8,0)*ANGLES(RAD(0),RAD(0),RAD(90))*CF(0,1,0))
  1215. for i = 1, 4 do
  1216. 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})
  1217. end
  1218. 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})
  1219. wait(1)
  1220. TORSO.Parent.Parent = LOCK
  1221. for i = 1, 75 do
  1222. Swait()
  1223. local CHILDREN = KEY:GetDescendants()
  1224. for index, CHILD in pairs(CHILDREN) do
  1225. if CHILD:IsA("BasePart") then
  1226. CHILD.Transparency = i/25
  1227. end
  1228. end
  1229. local CHILDREN = LOCK:GetDescendants()
  1230. for index, CHILD in pairs(CHILDREN) do
  1231. if CHILD:IsA("BasePart") and CHILD.Name ~= "HumanoidRootPart" then
  1232. CHILD.Transparency = CHILD.Transparency + 1/75
  1233. elseif CHILD.ClassName == "Decal" then
  1234. CHILD.Transparency = CHILD.Transparency + 1/75
  1235. end
  1236. end
  1237. end
  1238. TORSO.Parent:ClearAllChildren()
  1239. KEY:remove()
  1240. LOCK:remove()
  1241. end))
  1242. Pose("Turn key",0.8,1.2,false,GYRO,TORSO)
  1243. GYRO:remove()
  1244. ATTACK = false
  1245. Rooted = false
  1246. end
  1247. end
  1248. end
  1249.  
  1250. function Hat()
  1251. ATTACK = true
  1252. Rooted = false
  1253. Pose("Taunt",0.4,1.2,false)
  1254. ATTACK = false
  1255. Rooted = false
  1256. end
  1257.  
  1258. Player_Size = 1 --Size of the player.
  1259.  
  1260. print("hey hello am saba1520 and am editor of this script")
  1261.  
  1262. Void = nil
  1263. VoidParts = {}
  1264. Equipped = false
  1265. function RayCast(Position, Direction, MaxDistance, IgnoreList)
  1266. return game:GetService("Workspace"):FindPartOnRayWithIgnoreList(Ray.new(Position, Direction.unit * (MaxDistance or 999.999)), IgnoreList)
  1267. end
  1268.  
  1269. Player = Player
  1270. Character = Character
  1271.  
  1272. Humanoid = Character:FindFirstChildOfClass("Humanoid")
  1273. Torso = Character:FindFirstChild("Torso")
  1274. if not Player or not Humanoid or Humanoid.Health == 0 or not Torso then
  1275. return
  1276. end
  1277. Equipped = true
  1278. Void = Instance.new("Model")
  1279. Void.Name = "Void"
  1280. Angle = 0
  1281. for i = 1, 1 do
  1282. local VoidPart = Instance.new("Part")
  1283. VoidPart.Name = "VoidPart"
  1284. VoidPart.Transparency = 1
  1285. VoidPart.BrickColor = BrickColor.new("Really black")
  1286. VoidPart.Material = Enum.Material.Plastic
  1287. VoidPart.Shape = Enum.PartType.Block
  1288. VoidPart.FormFactor = Enum.FormFactor.Custom
  1289. VoidPart.TopSurface = Enum.SurfaceType.Smooth
  1290. VoidPart.BottomSurface = Enum.SurfaceType.Smooth
  1291. VoidPart.Anchored = true
  1292. VoidPart.CanCollide = false
  1293. VoidPart.Locked = true
  1294. VoidPart.Size = Vector3.new(18, 0.2, 18)
  1295. local BlockMesh = Instance.new("BlockMesh")
  1296. BlockMesh.Scale = Vector3.new(1, (1 + (0.005 * i)), 1)
  1297. BlockMesh.Parent = VoidPart
  1298. VoidPart.Parent = Void
  1299. local Star = Instance.new("Decal", VoidPart)
  1300. Star.Texture = "http://www.roblox.com/asset/?id=363839172"
  1301. --CricleForTarget
  1302. --121028264 MagicCircle1
  1303. --160506713 MagicCircle2
  1304. --327794305 MagicCircle3 (Death)
  1305. --160508788 MagicCircle4 (Scary)
  1306. --124339738 CoolCircle5
  1307. --268043891 Abyss-Demon-Magic-Circle
  1308. Star.Face = "Top"
  1309. local Light = Instance.new("PointLight", VoidPart)
  1310. Light.Color = Color3.new(0,0,1)
  1311. Light.Brightness = 200
  1312. Light.Range = 35
  1313. table.insert(VoidParts, VoidPart)
  1314. end
  1315. Spawn(function()
  1316. while Equipped and Humanoid.Parent and Humanoid.Health > 0 and Torso.Parent do
  1317. if Angle == 360 then
  1318. Angle = 0
  1319. end
  1320. Angle = Angle + 0.05
  1321. local Hit, EndPosition = RayCast(Torso.Position, Vector3.new(0, -1, 0), (Torso.Size.Y * 6.5), {Character})
  1322. if Hit then
  1323. if not Void.Parent then
  1324. Void.Parent = Character
  1325. end
  1326. for i, v in pairs(VoidParts) do
  1327. v.CFrame = CFrame.new(Torso.Position.X, EndPosition.Y, Torso.Position.Z) * CFrame.Angles(0, (Angle + i), 0)
  1328. end
  1329. else
  1330. Void.Parent = nil
  1331. end
  1332. wait()
  1333. end
  1334. end)
  1335.  
  1336.  
  1337. --//=================================\\
  1338. --|| ASSIGN THINGS TO KEYS
  1339. --\\=================================//
  1340.  
  1341. function MouseDown(Mouse)
  1342. HOLD = true
  1343. if ATTACK == false then
  1344. end
  1345. end
  1346.  
  1347. function MouseUp(Mouse)
  1348. HOLD = false
  1349. end
  1350.  
  1351. function KeyDown(Key)
  1352. KEYHOLD = true
  1353. if Key == "z" and ATTACK == false then
  1354. Warden_Zap()
  1355. end
  1356.  
  1357. if Key == "b" and ATTACK == false then
  1358. Warden_Thunder()
  1359. end
  1360.  
  1361. if Key == "c" and ATTACK == false then
  1362. Inferno_Ring()
  1363. end
  1364.  
  1365. if Key == "v" and ATTACK == false then
  1366. Warden_Wall()
  1367. end
  1368.  
  1369. if Key == "x" and ATTACK == false then
  1370. Prison_Key()
  1371. end
  1372.  
  1373. if Key == "t" and ATTACK == false then
  1374. Hat()
  1375. end
  1376. end
  1377.  
  1378. function KeyUp(Key)
  1379. KEYHOLD = false
  1380. end
  1381.  
  1382. Mouse.Button1Down:connect(function(NEWKEY)
  1383. MouseDown(NEWKEY)
  1384. end)
  1385. Mouse.Button1Up:connect(function(NEWKEY)
  1386. MouseUp(NEWKEY)
  1387. end)
  1388. Mouse.KeyDown:connect(function(NEWKEY)
  1389. KeyDown(NEWKEY)
  1390. end)
  1391. Mouse.KeyUp:connect(function(NEWKEY)
  1392. KeyUp(NEWKEY)
  1393. end)
  1394.  
  1395. --//=================================\\
  1396. --\\=================================//
  1397.  
  1398.  
  1399. function unanchor()
  1400. if UNANCHOR == true then
  1401. g = Character:GetChildren()
  1402. for i = 1, #g do
  1403. if g[i].ClassName == "Part" then
  1404. g[i].Anchored = false
  1405. end
  1406. end
  1407. end
  1408. end
  1409.  
  1410.  
  1411. --//=================================\\
  1412. --|| WRAP THE WHOLE SCRIPT UP
  1413. --\\=================================//
  1414.  
  1415. Humanoid.Changed:connect(function(Jump)
  1416. if Jump == "Jump" and (Disable_Jump == true) then
  1417. Humanoid.Jump = false
  1418. end
  1419. end)
  1420.  
  1421. while true do
  1422. Swait()
  1423. script.Parent = WEAPONGUI
  1424. Humanoid.Parent = Character
  1425. if Humanoid then
  1426. local IDLEANIMATION = Humanoid:LoadAnimation(ROBLOXIDLEANIMATION)
  1427. IDLEANIMATION:Play()
  1428. end
  1429. if ANIMATE.Parent == Character then
  1430. ANIMATE:Destroy()
  1431. end
  1432. SINE = SINE + CHANGE
  1433. local TORSOVELOCITY = (RootPart.Velocity * VT(1, 0, 1)).magnitude
  1434. local TORSOVERTICALVELOCITY = RootPart.Velocity.y
  1435. Humanoid.HipHeight = 1
  1436. Humanoid.Name = "Warden"
  1437. Humanoid.PlatformStand = false
  1438. if PLAYMAINANIM == true then
  1439. if TORSOVELOCITY < 1 then
  1440. 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)
  1441. 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)
  1442. 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)
  1443. 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)
  1444. 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)
  1445. 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)
  1446. elseif TORSOVELOCITY > 1 then
  1447. 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)
  1448. 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)
  1449. 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)
  1450. 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)
  1451. 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)
  1452. 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)
  1453. end
  1454. end
  1455. unanchor()
  1456. Humanoid.MaxHealth = "inf"
  1457. Humanoid.Health = "inf"
  1458. if Rooted == false then
  1459. Disable_Jump = false
  1460. Humanoid.WalkSpeed = Speed
  1461. elseif Rooted == true then
  1462. Disable_Jump = true
  1463. Humanoid.WalkSpeed = 0
  1464. end
  1465. for _, c in pairs(Character:GetChildren()) do
  1466. if c.ClassName == "Part" and c.Name ~= "Eye" then
  1467. c.Material = "Neon"
  1468. if c:FindFirstChildOfClass("ParticleEmitter") then
  1469. c:FindFirstChildOfClass("ParticleEmitter"):remove()
  1470. end
  1471. c.Color = C3(1,1,1)
  1472. if c == Head then
  1473. if c:FindFirstChild("face") then
  1474. c.face:remove()
  1475. end
  1476. end
  1477. elseif c.ClassName == "CharacterMesh" or c.ClassName == "Accessory" or c.ClassName == "Hat" or c.Name == "Body Colors" then
  1478. c:remove()
  1479. elseif (c.ClassName == "Shirt" or c.ClassName == "Pants") and c.Name ~= "Cloth" then
  1480. c:remove()
  1481. end
  1482. end
  1483. sick.SoundId = "rbxassetid://561833161"
  1484. sick.Looped = true
  1485. sick.Pitch = 1
  1486. sick.Volume = 3
  1487. sick:Resume()
  1488. sick.Parent = Torso
  1489. refit()
  1490. if Head:FindFirstChildOfClass("Sound") then
  1491. Head:FindFirstChildOfClass("Sound"):remove()
  1492. end
  1493. end
  1494.  
  1495. --//=================================\\
  1496. --\\=================================//
  1497.  
  1498.  
  1499.  
  1500.  
  1501.  
  1502. --//====================================================\\--
  1503. --|| END OF SCRIPT
  1504. --\\====================================================//--
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement