Advertisement
Axelpuff

Warden FE

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