Upscalefanatic3

OP Script Gentleman with tophat Script (Voidacity)

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