Advertisement
SCP-682-A

FE Warden

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