Advertisement
zXzGamePROzXz

Da Warden

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