EdgyHedgehog

Warden FE

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