Advertisement
Guest User

Void

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