Advertisement
Guest User

Untitled

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