Advertisement
memberhero

FE Warden

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