Azpect

Untitled

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