Advertisement
cubanmixed2

Justice Warden

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