Advertisement
Dxcay

Untitled

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