Advertisement
Goo345

Untitled

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