Advertisement
plytalent

warden fe

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