Advertisement
Dark_AJ1

warden

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