Advertisement
Guest User

Untitled

a guest
Oct 23rd, 2018
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 58.04 KB | None | 0 0
  1.  
  2.  
  3. --//====================================================\\--
  4. --|| CREATED BY SHACKLUSTER
  5. --\\====================================================//--
  6. if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
  7. local Player,Mouse,mouse,UserInputService,ContextActionService = owner
  8. do
  9. print("FE Compatibility code by Mokiros")
  10. script.Parent = Player.Character
  11.  
  12. --RemoteEvent for communicating
  13. local Event = Instance.new("RemoteEvent")
  14. Event.Name = "UserInput_Event"
  15.  
  16. --Fake event to make stuff like Mouse.KeyDown work
  17. local function fakeEvent()
  18. local t = {_fakeEvent=true,Connect=function(self,f)self.Function=f end}
  19. t.connect = t.Connect
  20. return t
  21. end
  22.  
  23. --Creating fake input objects with fake variables
  24. local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent()}
  25. local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
  26. local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
  27. CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
  28. end}
  29. --Merged 2 functions into one by checking amount of arguments
  30. CAS.UnbindAction = CAS.BindAction
  31.  
  32. --This function will trigger the events that have been :Connect()'ed
  33. local function te(self,ev,...)
  34. local t = m[ev]
  35. if t and t._fakeEvent and t.Function then
  36. t.Function(...)
  37. end
  38. end
  39. m.TrigEvent = te
  40. UIS.TrigEvent = te
  41.  
  42. Event.OnServerEvent:Connect(function(plr,io)
  43. if plr~=Player then return end
  44. if io.isMouse then
  45. m.Target = io.Target
  46. m.Hit = io.Hit
  47. else
  48. local b = io.UserInputState == Enum.UserInputState.Begin
  49. if io.UserInputType == Enum.UserInputType.MouseButton1 then
  50. return m:TrigEvent(b and "Button1Down" or "Button1Up")
  51. end
  52. for _,t in pairs(CAS.Actions) do
  53. for _,k in pairs(t.Keys) do
  54. if k==io.KeyCode then
  55. t.Function(t.Name,io.UserInputState,io)
  56. end
  57. end
  58. end
  59. m:TrigEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
  60. UIS:TrigEvent(b and "InputBegan" or "InputEnded",io,false)
  61. end
  62. end)
  63. Event.Parent = NLS([==[
  64. local Player = game:GetService("Players").LocalPlayer
  65. local Event = script:WaitForChild("UserInput_Event")
  66.  
  67. local UIS = game:GetService("UserInputService")
  68. local input = function(io,a)
  69. if a then return end
  70. --Since InputObject is a client-side instance, we create and pass table instead
  71. Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState})
  72. end
  73. UIS.InputBegan:Connect(input)
  74. UIS.InputEnded:Connect(input)
  75.  
  76. local Mouse = Player:GetMouse()
  77. local h,t
  78. --Give the server mouse data 30 times every second, but only if the values changed
  79. --If player is not moving their mouse, client won't fire events
  80. while wait(1/30) do
  81. if h~=Mouse.Hit or t~=Mouse.Target then
  82. h,t=Mouse.Hit,Mouse.Target
  83. Event:FireServer({isMouse=true,Target=t,Hit=h})
  84. end
  85. end]==],Player.Character)
  86. Mouse,mouse,UserInputService,ContextActionService = m,m,UIS,CAS
  87. end
  88. wait(0.2)
  89.  
  90. Player = game:GetService("Players").LocalPlayer
  91. PlayerGui = Player.PlayerGui
  92. Cam = workspace.CurrentCamera
  93. Backpack = Player.Backpack
  94. Character = Player.Character
  95. Humanoid = Character.Humanoid
  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("Alder").Color,BRICKC("Lavender").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("Pearl"), "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"Lavender".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"Lavender".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"Lavender".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"Lavender".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("Pearl"), "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("Pearl"), "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, "Lavender", "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, "Lavender", "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, "Lavender", "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, "Lavender", "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"Lavender".Color
  843. tecks2.Size = UDim2.new(1,0,0.5,0)
  844. tecks2.Parent = naeeym2
  845. local EYE = CreatePart(3, Character, "Neon", 0, 0, "Lilac", "FaceGradient", VT(0.15,0.15,0.15),false)
  846. MakeForm(EYE,"Ball")
  847. CreateWeldOrSnapOrMotor("Weld", Head, Head, EYE, CF(0.15,0.22,-0.55), CF(0, 0, 0))
  848. local EYE = CreatePart(3, Character, "Neon", 0, 0, "Lilac", "FaceGradient", VT(0.05,0.14,0.05),false)
  849. EYE.Color = C3(0,0,0)
  850. MakeForm(EYE,"Ball")
  851. CreateWeldOrSnapOrMotor("Weld", Head, Head, EYE, CF(0.15,0.22,-0.6), CF(0, 0, 0))
  852. local top = Instance.new("Shirt")
  853. top.ShirtTemplate = "rbxassetid://676428254"
  854. top.Parent = Character
  855. top.Name = "Cloth"
  856. local bottom = Instance.new("Pants")
  857. bottom.PantsTemplate = "rbxassetid://676428351"
  858. bottom.Parent = Character
  859. bottom.Name = "Cloth"
  860. for _, c in pairs(Character:GetChildren()) do
  861. if c.ClassName == "Part" and c.Name ~= "FaceGradient" and c.Name ~= "Hat" and c.Name ~= "Gem" then
  862. c.Material = "Neon"
  863. if c:FindFirstChildOfClass("ParticleEmitter") then
  864. c:FindFirstChildOfClass("ParticleEmitter"):remove()
  865. end
  866. c.Color = C3(1,1,1)
  867. if c == Head then
  868. if c:FindFirstChild("face") then
  869. c.face:remove()
  870. end
  871. end
  872. elseif c.ClassName == "CharacterMesh" or c.ClassName == "Accessory" or c.ClassName == "Hat" or c.Name == "Body Colors" then
  873. c:remove()
  874. elseif (c.ClassName == "Shirt" or c.ClassName == "Pants") and c.Name ~= "Cloth" then
  875. c:remove()
  876. end
  877. end
  878. local BODY = {}
  879. for _, c in pairs(Character:GetDescendants()) do
  880. if c:IsA("BasePart") and c.Name ~= "Handle" then
  881. if c ~= RootPart and c ~= Torso and c ~= Head and c ~= RightArm and c ~= LeftArm and c ~= RightLeg and c ~= LeftLeg then
  882. c.CustomPhysicalProperties = PhysicalProperties.new(0, 0, 0, 0, 0)
  883. end
  884. table.insert(BODY,{c,c.Parent,c.Material,c.Color,c.Transparency})
  885. elseif c:IsA("JointInstance") then
  886. table.insert(BODY,{c,c.Parent,nil,nil,nil})
  887. end
  888. end
  889. for e = 1, #BODY do
  890. if BODY[e] ~= nil then
  891. local STUFF = BODY[e]
  892. local PART = STUFF[1]
  893. local PARENT = STUFF[2]
  894. local MATERIAL = STUFF[3]
  895. local COLOR = STUFF[4]
  896. local TRANSPARENCY = STUFF[5]
  897. if PART.ClassName == "Part" and PART ~= RootPart then
  898. PART.Material = MATERIAL
  899. PART.Color = COLOR
  900. PART.Transparency = TRANSPARENCY
  901. end
  902. PART.AncestryChanged:Connect(function()
  903. PART.Parent = PARENT
  904. end)
  905. end
  906. end
  907. function refit()
  908. Character.Parent = workspace
  909. for e = 1, #BODY do
  910. if BODY[e] ~= nil then
  911. local STUFF = BODY[e]
  912. local PART = STUFF[1]
  913. local PARENT = STUFF[2]
  914. local MATERIAL = STUFF[3]
  915. local COLOR = STUFF[4]
  916. local TRANSPARENCY = STUFF[5]
  917. if PART.ClassName == "Part" and PART ~= RootPart then
  918. PART.Material = MATERIAL
  919. PART.Color = COLOR
  920. PART.Transparency = TRANSPARENCY
  921. end
  922. if PART.Parent ~= PARENT then
  923. Humanoid:remove()
  924. PART.Parent = PARENT
  925. Humanoid = IT("Humanoid",Character)
  926. end
  927. end
  928. end
  929. end
  930. local SKILLTEXTCOLOR = BRICKC"Lavender".Color
  931. local SKILLFONT = "Bodoni"
  932. local SKILLTEXTSIZE = 7
  933.  
  934. Humanoid.Died:connect(function()
  935. refit()
  936. end)
  937.  
  938. 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")
  939. 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")
  940. 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")
  941. 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")
  942. 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")
  943.  
  944. local SKILL1TEXT = CreateLabel(SKILL1FRAME, "[Z] Warden Zap", SKILLTEXTCOLOR, SKILLTEXTSIZE, SKILLFONT, 0, 2, 0, "Text 1")
  945. local SKILL2TEXT = CreateLabel(SKILL2FRAME, "[B] Warden Thunder", SKILLTEXTCOLOR, SKILLTEXTSIZE, SKILLFONT, 0, 2, 0, "Text 2")
  946. local SKILL3TEXT = CreateLabel(SKILL3FRAME, "[C] Inferno Ring", SKILLTEXTCOLOR, SKILLTEXTSIZE, SKILLFONT, 0, 2, 0, "Text 3")
  947. local SKILL4TEXT = CreateLabel(SKILL4FRAME, "[V] Warden Wall", SKILLTEXTCOLOR, SKILLTEXTSIZE, SKILLFONT, 0, 2, 0, "Text 4")
  948. local SKILL5TEXT = CreateLabel(SKILL5FRAME, "[X] Prison Key", SKILLTEXTCOLOR, SKILLTEXTSIZE, SKILLFONT, 0, 2, 0, "Text 5")
  949.  
  950. --//=================================\\
  951. --|| DAMAGING
  952. --\\=================================//
  953.  
  954. function ApplyAoE(POSITION,RANGE,FLING,BURN)
  955. local CHILDREN = workspace:GetDescendants()
  956. for index, CHILD in pairs(CHILDREN) do
  957. if CHILD.ClassName == "Model" and CHILD ~= Character then
  958. local HUM = CHILD:FindFirstChildOfClass("Humanoid")
  959. if HUM then
  960. local TORSO = CHILD:FindFirstChild("Torso") or CHILD:FindFirstChild("UpperTorso")
  961. if TORSO then
  962. if HUM.Health > 0 and (TORSO.Position - POSITION).Magnitude <= RANGE then
  963. CHILD:BreakJoints()
  964. if FLING ~= 0 then
  965. for _, c in pairs(CHILD:GetChildren()) do
  966. if c:IsA("BasePart") and c.Transparency == 0 then
  967. if BURN == true then
  968. Fire(c)
  969. end
  970. local bv = Instance.new("BodyVelocity")
  971. bv.maxForce = Vector3.new(1e9, 1e9, 1e9)
  972. bv.velocity = CF(POSITION,TORSO.Position).lookVector*FLING
  973. bv.Parent = c
  974. Debris:AddItem(bv,0.05)
  975. end
  976. end
  977. end
  978. end
  979. end
  980. end
  981. end
  982. end
  983. end
  984.  
  985. --//=================================\\
  986. --|| ATTACK FUNCTIONS AND STUFF
  987. --\\=================================//
  988.  
  989. function Warden_Zap()
  990. ATTACK = true
  991. Rooted = false
  992. local GYRO = IT("BodyGyro",RootPart)
  993. GYRO.D = 750
  994. GYRO.P = 20000
  995. GYRO.MaxTorque = VT(0,40000000,0)
  996. CreateSound(348663022,RightArm,1.5,2,false)
  997. Pose("Cast1",0.8,1,true,GYRO)
  998. 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})
  999. local Hitpos = LightningTable.End
  1000. ApplyAoE(Hitpos,10,35)
  1001. 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})
  1002. for i = 1, 4 do
  1003. 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})
  1004. end
  1005. Pose("Cast1",0.8,1,true)
  1006. GYRO:remove()
  1007. ATTACK = false
  1008. Rooted = false
  1009. end
  1010.  
  1011. function Warden_Thunder()
  1012. ATTACK = true
  1013. Rooted = false
  1014. local GYRO = IT("BodyGyro",RootPart)
  1015. GYRO.D = 750
  1016. GYRO.P = 20000
  1017. GYRO.MaxTorque = VT(0,40000000,0)
  1018. CreateSound(469345336,Torso,3,2,false)
  1019. Pose("Cast2",1.5,2,true,GYRO)
  1020. coroutine.resume(coroutine.create(function()
  1021. local FRAME = RootPart.CFrame
  1022. for i = 1, 25 do
  1023. local POS = FRAME*CF(MRANDOM(-17,17),0,-i*15)
  1024. 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})
  1025. local Hitpos = LightningTable.End
  1026. ApplyAoE(Hitpos,20,15)
  1027. 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})
  1028. for i = 1, 4 do
  1029. 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})
  1030. end
  1031. wait(0.05)
  1032. end
  1033. end))
  1034. Pose("Cast2",1.5,0.7,true)
  1035. GYRO:remove()
  1036. ATTACK = false
  1037. Rooted = false
  1038. end
  1039.  
  1040. function Inferno_Ring()
  1041. ATTACK = true
  1042. Rooted = false
  1043. local GYRO = IT("BodyGyro",RootPart)
  1044. GYRO.D = 750
  1045. GYRO.P = 20000
  1046. GYRO.MaxTorque = VT(0,40000000,0)
  1047. local FIRE = IT("Model",Effects)
  1048. FIRE.Name = "Fire"
  1049. local MAIN = CreatePart(3, FIRE, "Neon", 0, 1, "Lavender", "Center", VT(0,0,0))
  1050. FIRE.PrimaryPart = MAIN
  1051. local FIRES = {}
  1052. for i = 1, 45 do
  1053. local PRT = CreatePart(3, FIRE, "Neon", 0, 1, "Lavender", "RingPart", VT(3,3,3))
  1054. PRT.CFrame = MAIN.CFrame*ANGLES(RAD(0),RAD((360/45)*i),RAD(0))*CF(0,0,20)
  1055. local F = Fire(PRT)
  1056. table.insert(FIRES,F)
  1057. end
  1058. repeat
  1059. FIRE:SetPrimaryPartCFrame(CF(Mouse.Hit.p))
  1060. Pose("Cast1",1.5,0.01,false,GYRO)
  1061. until HOLD == true
  1062. coroutine.resume(coroutine.create(function()
  1063. for i = 1, 4 do
  1064. ApplyAoE(MAIN.Position,21,-15,true)
  1065. CreateSound(463598785,MAIN,3,1,false)
  1066. for E = 1, #FIRES do
  1067. if FIRES[E] ~= nil then
  1068. FIRES[E].Acceleration = VT(0,300,0)
  1069. FIRES[E].Lifetime=NumberRange.new(0.35,1.5)
  1070. end
  1071. end
  1072. wait(0.3)
  1073. end
  1074. for E = 1, #FIRES do
  1075. if FIRES[E] ~= nil then
  1076. FIRES[E].Enabled = false
  1077. end
  1078. end
  1079. Debris:AddItem(FIRE,5)
  1080. end))
  1081. CreateSound(215395388,RightArm,3,2,false)
  1082. Pose("RightArmUp",1.5,0.5,true)
  1083. GYRO:remove()
  1084. ATTACK = false
  1085. Rooted = false
  1086. end
  1087.  
  1088. function Warden_Wall()
  1089. local HITFLOOR = Raycast(RootPart.Position, (CF(RootPart.Position, RootPart.Position + VT(0, -1, 0))).lookVector, 8, Character)
  1090. if HITFLOOR ~= nil then
  1091. if HITFLOOR.Anchored == true then
  1092. local WALL = HITFLOOR:Clone()
  1093. WALL.Size = VT(45,45,5)
  1094. WALL.Parent = Effects
  1095. WALL.Name = "Wall"
  1096. WALL.CFrame = RootPart.CFrame*CF(0,-65/2.1,-5)*ANGLES(RAD(-15),RAD(0),RAD(0))
  1097. CreateSound(130972023,WALL,5,0.8,false)
  1098. ATTACK = true
  1099. Rooted = true
  1100. local HIT = WALL.Touched:Connect(function(hit)
  1101. if hit.Parent ~= Character then
  1102. hit:BreakJoints()
  1103. end
  1104. end)
  1105. coroutine.resume(coroutine.create(function()
  1106. 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})
  1107. for i = 1, 90 do
  1108. Swait()
  1109. WALL.CFrame = WALL.CFrame*CF(0,0.5,0)
  1110. end
  1111. HIT:disconnect()
  1112. wait(5)
  1113. for i = 1, 46 do
  1114. Swait()
  1115. WALL.CFrame = WALL.CFrame*CF(0,-1,0)
  1116. end
  1117. WALL:remove()
  1118. end))
  1119. Pose("RightArmUp",1.5,1.2,true)
  1120. ATTACK = false
  1121. Rooted = false
  1122. end
  1123. end
  1124. end
  1125.  
  1126. function Prison_Key()
  1127. if Mouse.Target ~= nil then
  1128. if Mouse.Target.Parent ~= Character and Mouse.Target.Parent.Parent ~= Character and Mouse.Target.Parent:FindFirstChildOfClass("Humanoid") ~= nil then
  1129. local HUM = Mouse.Target.Parent:FindFirstChildOfClass("Humanoid")
  1130. local TORSO = HUM.Parent:FindFirstChild("Torso") or HUM.Parent:FindFirstChild("UpperTorso")
  1131. local GYRO = IT("BodyGyro",RootPart)
  1132. GYRO.D = 750
  1133. GYRO.P = 20000
  1134. GYRO.MaxTorque = VT(0,40000000,0)
  1135. local grav = Instance.new("BodyPosition",TORSO)
  1136. grav.D = 15
  1137. grav.P = 20000
  1138. grav.maxForce = Vector3.new(math.huge,math.huge,math.huge)
  1139. grav.position = TORSO.Position
  1140. local GYRO2 = IT("BodyGyro",TORSO)
  1141. GYRO2.D = 750
  1142. GYRO2.P = 20000
  1143. GYRO2.MaxTorque = VT(0,40000000,0)
  1144. GYRO2.cframe = CF(TORSO.Position,RootPart.Position)
  1145. grav.Name = "Jail"
  1146. local LOCKPARTS = {}
  1147. ATTACK = true
  1148. Rooted = false
  1149. local LOCK = IT("Model",Effects)
  1150. LOCK.Name = "Lock"
  1151. local LOCK2 = IT("Model",LOCK)
  1152. LOCK2.Name = "Metal"
  1153. --CREATE LOCK--
  1154. local BASE = CreatePart(3, LOCK, "Glass", 0, 0, "Gold", "Keylock", VT(3, 2.5, 1))
  1155. LOCK.PrimaryPart = BASE
  1156. BASE.CFrame = CF(TORSO.Position,RootPart.Position)*CF(0,0,-4)
  1157. local PRT = CreatePart(3, LOCK, "Glass", 0, 0, "Gold", "Keylock", VT(3, 1, 3))
  1158. PRT.CFrame = BASE.CFrame*CF(0,-1.25,0)*ANGLES(RAD(90),RAD(0),RAD(0))
  1159. MakeForm(PRT,"Cyl")
  1160. local PRT = CreatePart(3, LOCK, "Glass", 0, 0, "White", "Hole", VT(1, 1, 1))
  1161. PRT.Color = C3(0,0,0)
  1162. PRT.CFrame = BASE.CFrame*CF(0,0.3,-0.01)*ANGLES(RAD(90),RAD(0),RAD(0))
  1163. MakeForm(PRT,"Cyl")
  1164. local PRT = CreatePart(3, LOCK, "Glass", 0, 0, "White", "Hole", VT(0.5, 1, 1))
  1165. PRT.Color = C3(0,0,0)
  1166. PRT.CFrame = BASE.CFrame*CF(0,-0.2,-0.01)
  1167. for i = 1, 45 do
  1168. local PRT = CreatePart(3, LOCK2, "Glass", 0, 0, "Grey", "Keylock", VT(0.5, 0.5, 0.5))
  1169. PRT.CFrame = BASE.CFrame*CF(0,2,0)*ANGLES(RAD(0),RAD(0),RAD(-90+(360/90*i)))*CF(0,1,0)
  1170. end
  1171. local PRT = CreatePart(3, LOCK2, "Glass", 0, 0, "Grey", "Keylock", VT(0.5, 0.5, 0.5))
  1172. PRT.CFrame = BASE.CFrame*CF(0,1.5,0)*ANGLES(RAD(0),RAD(0),RAD(90))*CF(0,1,0)
  1173. LOCK2.PrimaryPart = PRT
  1174. ---------------
  1175. local CHILDREN = LOCK:GetDescendants()
  1176. for index, CHILD in pairs(CHILDREN) do
  1177. if CHILD:IsA("BasePart") then
  1178. CHILD.Transparency = 1
  1179. end
  1180. end
  1181. for i = 1, 75 do
  1182. LOCK:SetPrimaryPartCFrame(CF(TORSO.Position,RootPart.Position)*CF(0,0,-4))
  1183. Swait()
  1184. GYRO2.cframe = CF(TORSO.Position,RootPart.Position)
  1185. GYRO.cframe = CF(RootPart.Position,TORSO.Position)
  1186. local CHILDREN = LOCK:GetDescendants()
  1187. for index, CHILD in pairs(CHILDREN) do
  1188. if CHILD:IsA("BasePart") then
  1189. CHILD.Transparency = CHILD.Transparency - 1/75
  1190. end
  1191. end
  1192. end
  1193. HUM.DisplayDistanceType = "None"
  1194. local KEY = IT("Model",Effects)
  1195. KEY.Name = "Key"
  1196. --CREATE KEY--
  1197. local KBASE = CreatePart(3, KEY, "Neon", 0, 0, "Lavender", "KeyBase", VT(0.1, 1, 0.1),false)
  1198. KEY.PrimaryPart = KBASE
  1199. KBASE.CFrame = RightArm.CFrame*CF(0,-2.1,0)*ANGLES(RAD(0),RAD(90),RAD(0))
  1200. local WLD = weldBetween(RightArm,KBASE)
  1201. for i = 1, 45 do
  1202. local PRT = CreatePart(3, KEY, "Neon", 0, 0, "Lavender", "Key", VT(0.1, 0.1, 0.1),false)
  1203. PRT.CFrame = KBASE.CFrame*CF(0,0.8,0)*ANGLES(RAD(0),RAD(0),RAD((360/45*i)))*CF(0,0.25,0)
  1204. weldBetween(KBASE,PRT)
  1205. end
  1206. local PRT = CreatePart(3, KEY, "Neon", 0, 0, "Lavender", "Key", VT(0.3, 0.1, 0.1),false)
  1207. PRT.CFrame = KBASE.CFrame*CF(-0.15,-0.45,0)
  1208. weldBetween(KBASE,PRT)
  1209. local PRT = CreatePart(3, KEY, "Neon", 0, 0, "Lavender", "Key", VT(0.3, 0.1, 0.1),false)
  1210. PRT.CFrame = KBASE.CFrame*CF(-0.15,-0.25,0)
  1211. weldBetween(KBASE,PRT)
  1212. --------------
  1213. Rooted = true
  1214. Pose("Prepare key",1.5,1.2,false,GYRO,TORSO)
  1215. coroutine.resume(coroutine.create(function()
  1216. for i = 1, 10 do
  1217. Swait()
  1218. GYRO2.cframe = CF(TORSO.Position,RootPart.Position)
  1219. GYRO.cframe = CF(RootPart.Position,TORSO.Position)
  1220. end
  1221. CreateSound(1149318312,BASE,5,1,false)
  1222. CreateSound(160772554,BASE,3,1,false)
  1223. LOCK2:SetPrimaryPartCFrame(BASE.CFrame*CF(0,0.8,0)*ANGLES(RAD(0),RAD(0),RAD(90))*CF(0,1,0))
  1224. for i = 1, 4 do
  1225. 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})
  1226. end
  1227. 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})
  1228. wait(1)
  1229. TORSO.Parent.Parent = LOCK
  1230. for i = 1, 75 do
  1231. Swait()
  1232. local CHILDREN = KEY:GetDescendants()
  1233. for index, CHILD in pairs(CHILDREN) do
  1234. if CHILD:IsA("BasePart") then
  1235. CHILD.Transparency = i/25
  1236. end
  1237. end
  1238. local CHILDREN = LOCK:GetDescendants()
  1239. for index, CHILD in pairs(CHILDREN) do
  1240. if CHILD:IsA("BasePart") and CHILD.Name ~= "HumanoidRootPart" then
  1241. CHILD.Transparency = CHILD.Transparency + 1/75
  1242. elseif CHILD.ClassName == "Decal" then
  1243. CHILD.Transparency = CHILD.Transparency + 1/75
  1244. end
  1245. end
  1246. end
  1247. TORSO.Parent:ClearAllChildren()
  1248. KEY:remove()
  1249. LOCK:remove()
  1250. end))
  1251. Pose("Turn key",0.8,1.2,false,GYRO,TORSO)
  1252. GYRO:remove()
  1253. ATTACK = false
  1254. Rooted = false
  1255. end
  1256. end
  1257. end
  1258.  
  1259. function Hat()
  1260. ATTACK = true
  1261. Rooted = false
  1262. Pose("Taunt",0.4,1.2,false)
  1263. ATTACK = false
  1264. Rooted = false
  1265. end
  1266.  
  1267. --//=================================\\
  1268. --|| ASSIGN THINGS TO KEYS
  1269. --\\=================================//
  1270.  
  1271. function MouseDown(Mouse)
  1272. HOLD = true
  1273. if ATTACK == false then
  1274. end
  1275. end
  1276.  
  1277. function MouseUp(Mouse)
  1278. HOLD = false
  1279. end
  1280.  
  1281. function KeyDown(Key)
  1282. KEYHOLD = true
  1283. if Key == "z" and ATTACK == false then
  1284. Warden_Zap()
  1285. end
  1286.  
  1287. if Key == "b" and ATTACK == false then
  1288. Warden_Thunder()
  1289. end
  1290.  
  1291. if Key == "c" and ATTACK == false then
  1292. Inferno_Ring()
  1293. end
  1294.  
  1295. if Key == "v" and ATTACK == false then
  1296. Warden_Wall()
  1297. end
  1298.  
  1299. if Key == "x" and ATTACK == false then
  1300. Prison_Key()
  1301. end
  1302.  
  1303. if Key == "t" and ATTACK == false then
  1304. Hat()
  1305. end
  1306. end
  1307.  
  1308. function KeyUp(Key)
  1309. KEYHOLD = false
  1310. end
  1311.  
  1312. Mouse.Button1Down:connect(function(NEWKEY)
  1313. MouseDown(NEWKEY)
  1314. end)
  1315. Mouse.Button1Up:connect(function(NEWKEY)
  1316. MouseUp(NEWKEY)
  1317. end)
  1318. Mouse.KeyDown:connect(function(NEWKEY)
  1319. KeyDown(NEWKEY)
  1320. end)
  1321. Mouse.KeyUp:connect(function(NEWKEY)
  1322. KeyUp(NEWKEY)
  1323. end)
  1324.  
  1325. --//=================================\\
  1326. --\\=================================//
  1327.  
  1328.  
  1329. function unanchor()
  1330. if UNANCHOR == true then
  1331. g = Character:GetChildren()
  1332. for i = 1, #g do
  1333. if g[i].ClassName == "Part" then
  1334. g[i].Anchored = false
  1335. end
  1336. end
  1337. end
  1338. end
  1339.  
  1340.  
  1341. --//=================================\\
  1342. --|| WRAP THE WHOLE SCRIPT UP
  1343. --\\=================================//
  1344.  
  1345. Humanoid.Changed:connect(function(Jump)
  1346. if Jump == "Jump" and (Disable_Jump == true) then
  1347. Humanoid.Jump = false
  1348. end
  1349. end)
  1350.  
  1351. while true do
  1352. Swait()
  1353. script.Parent = WEAPONGUI
  1354. Humanoid.Parent = Character
  1355. if Humanoid then
  1356. local IDLEANIMATION = Humanoid:LoadAnimation(ROBLOXIDLEANIMATION)
  1357. IDLEANIMATION:Play()
  1358. end
  1359. if ANIMATE.Parent == Character then
  1360. ANIMATE:Destroy()
  1361. end
  1362. SINE = SINE + CHANGE
  1363. local TORSOVELOCITY = (RootPart.Velocity * VT(1, 0, 1)).magnitude
  1364. local TORSOVERTICALVELOCITY = RootPart.Velocity.y
  1365. Humanoid.HipHeight = 1
  1366. Humanoid.Name = "Warden"
  1367. Humanoid.PlatformStand = false
  1368. if PLAYMAINANIM == true then
  1369. if TORSOVELOCITY < 1 then
  1370. 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)
  1371. 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)
  1372. 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)
  1373. 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)
  1374. 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)
  1375. 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)
  1376. elseif TORSOVELOCITY > 1 then
  1377. 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)
  1378. 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)
  1379. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.25, 0.5 + 0.15 * COS(SINE / 12) - 0.05 * COS(SINE / 12), 0.5) * ANGLES(RAD(-35), RAD(0), RAD(-45)) * RIGHTSHOULDERC0, 0.15 / Animation_Speed)
  1380. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.25, 0.5 + 0.15 * COS(SINE / 12) - 0.05 * COS(SINE / 12), 0.5) * ANGLES(RAD(-35), RAD(0), RAD(45)) * LEFTSHOULDERC0, 0.15 / Animation_Speed)
  1381. RightHip.C0 = Clerp(RightHip.C0, CF(1, -0.5, -0.5) * ANGLES(RAD(0), RAD(65), RAD(0)) * ANGLES(RAD(-3), RAD(0), RAD(-20)), 0.15 / Animation_Speed)
  1382. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, -0.01) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(10)), 0.15 / Animation_Speed)
  1383. end
  1384. end
  1385. unanchor()
  1386. Humanoid.MaxHealth = "inf"
  1387. Humanoid.Health = "inf"
  1388. if Rooted == false then
  1389. Disable_Jump = false
  1390. Humanoid.WalkSpeed = Speed
  1391. elseif Rooted == true then
  1392. Disable_Jump = true
  1393. Humanoid.WalkSpeed = 0
  1394. end
  1395. for _, c in pairs(Character:GetChildren()) do
  1396. if c.ClassName == "Part" and c.Name ~= "Eye" then
  1397. c.Material = "Neon"
  1398. if c:FindFirstChildOfClass("ParticleEmitter") then
  1399. c:FindFirstChildOfClass("ParticleEmitter"):remove()
  1400. end
  1401. c.Color = C3(1,1,1)
  1402. if c == Head then
  1403. if c:FindFirstChild("face") then
  1404. c.face:remove()
  1405. end
  1406. end
  1407. elseif c.ClassName == "CharacterMesh" or c.ClassName == "Accessory" or c.ClassName == "Hat" or c.Name == "Body Colors" then
  1408. c:remove()
  1409. elseif (c.ClassName == "Shirt" or c.ClassName == "Pants") and c.Name ~= "Cloth" then
  1410. c:remove()
  1411. end
  1412. end
  1413. sick.SoundId = "rbxassetid://1494340971"
  1414. sick.Looped = true
  1415. sick.Pitch = 1
  1416. sick.Volume = 3
  1417. sick:Resume()
  1418. sick.Parent = Torso
  1419. refit()
  1420. if Head:FindFirstChildOfClass("Sound") then
  1421. Head:FindFirstChildOfClass("Sound"):remove()
  1422. end
  1423. end
  1424.  
  1425. --//=================================\\
  1426. --\\=================================//
  1427.  
  1428.  
  1429.  
  1430.  
  1431.  
  1432. --//====================================================\\--
  1433. --|| END OF SCRIPT
  1434. --\\====================================================//--
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement