reset234567890

dont work

Jun 25th, 2019
191
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 60.55 KB | None | 0 0
  1. -- This script has convert to FE by who i don't know?
  2.  
  3. -----------------------------------------------------
  4. if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
  5. local Player,game,owner = owner,game
  6. local RealPlayer = Player
  7. do
  8. print("FE Compatibility code by Mokiros | Showcase by Bacon Hair!")
  9. local rp = RealPlayer
  10. script.Parent = rp.Character
  11.  
  12. --RemoteEvent for communicating
  13. local Event = Instance.new("RemoteEvent")
  14. Event.Name = "UserInput_Event"
  15.  
  16. --Fake event to make stuff like Mouse.KeyDown work
  17. local function fakeEvent()
  18. local t = {_fakeEvent=true,Functions={},Connect=function(self,f)table.insert(self.Functions,f) end}
  19. t.connect = t.Connect
  20. return t
  21. end
  22.  
  23. --Creating fake input objects with fake variables
  24. local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent()}
  25. local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
  26. local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
  27. CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
  28. end}
  29. --Merged 2 functions into one by checking amount of arguments
  30. CAS.UnbindAction = CAS.BindAction
  31.  
  32. --This function will trigger the events that have been :Connect()'ed
  33. local function te(self,ev,...)
  34. local t = m[ev]
  35. if t and t._fakeEvent then
  36. for _,f in pairs(t.Functions) do
  37. f(...)
  38. end
  39. end
  40. end
  41. m.TrigEvent = te
  42. UIS.TrigEvent = te
  43.  
  44. Event.OnServerEvent:Connect(function(plr,io)
  45. if plr~=rp then return end
  46. m.Target = io.Target
  47. m.Hit = io.Hit
  48. if not io.isMouse then
  49. local b = io.UserInputState == Enum.UserInputState.Begin
  50. if io.UserInputType == Enum.UserInputType.MouseButton1 then
  51. return m:TrigEvent(b and "Button1Down" or "Button1Up")
  52. end
  53. for _,t in pairs(CAS.Actions) do
  54. for _,k in pairs(t.Keys) do
  55. if k==io.KeyCode then
  56. t.Function(t.Name,io.UserInputState,io)
  57. end
  58. end
  59. end
  60. m:TrigEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
  61. UIS:TrigEvent(b and "InputBegan" or "InputEnded",io,false)
  62. end
  63. end)
  64. Event.Parent = NLS([==[
  65. local Player = game:GetService("Players").LocalPlayer
  66. local Event = script:WaitForChild("UserInput_Event")
  67.  
  68. local Mouse = Player:GetMouse()
  69. local UIS = game:GetService("UserInputService")
  70. local input = function(io,a)
  71. if a then return end
  72. --Since InputObject is a client-side instance, we create and pass table instead
  73. Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState,Hit=Mouse.Hit,Target=Mouse.Target})
  74. end
  75. UIS.InputBegan:Connect(input)
  76. UIS.InputEnded:Connect(input)
  77.  
  78. local h,t
  79. --Give the server mouse data 30 times every second, but only if the values changed
  80. --If player is not moving their mouse, client won't fire events
  81. while wait(1/30) do
  82. if h~=Mouse.Hit or t~=Mouse.Target then
  83. h,t=Mouse.Hit,Mouse.Target
  84. Event:FireServer({isMouse=true,Target=t,Hit=h})
  85. end
  86. end]==],Player.Character)
  87.  
  88. ----Sandboxed game object that allows the usage of client-side methods and services
  89. --Real game object
  90. local _rg = game
  91.  
  92. --Metatable for fake service
  93. local fsmt = {
  94. __index = function(self,k)
  95. local s = rawget(self,"_RealService")
  96. if s then return s[k] end
  97. end,
  98. __newindex = function(self,k,v)
  99. local s = rawget(self,"_RealService")
  100. if s then s[k]=v end
  101. end,
  102. __call = function(self,...)
  103. local s = rawget(self,"_RealService")
  104. if s then return s(...) 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 self[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. }
  123. rawset(g.Players,"localPlayer",g.Players.LocalPlayer)
  124. g.service = g.GetService
  125.  
  126. g.RunService = FakeService({
  127. RenderStepped = _rg:GetService("RunService").Heartbeat,
  128. BindToRenderStep = function(self,name,_,fun)
  129.  
  130. end,
  131. UnbindFromRenderStep = function(self,name)
  132. self._btrs[name]:Disconnect()
  133. end,
  134. },"RunService")
  135.  
  136. setmetatable(g,{
  137. __index=function(self,s)
  138. return _rg:GetService(s) or typeof(_rg[s])=="function"
  139. and function(_,...)return _rg[s](_rg,...)end or _rg[s]
  140. end,
  141. __newindex = fsmt.__newindex,
  142. __call = fsmt.__call
  143. })
  144. --Changing owner to fake player object to support owner:GetMouse()
  145. game,owner = g,g.Players.LocalPlayer
  146. end
  147. --//====================================================\\--
  148. --|| CREATED BY SHACKLUSTER
  149. --\\====================================================//--
  150.  
  151. wait(0.2)
  152.  
  153. Player = owner
  154. PlayerGui = Player.PlayerGui
  155. Cam = workspace.CurrentCamera
  156. Backpack = Player.Backpack
  157. Character = Player.Character
  158. Humanoid = Character.Humanoid
  159. RootPart = Character["HumanoidRootPart"]
  160. Torso = Character["Torso"]
  161. Head = Character["Head"]
  162. RightArm = Character["Right Arm"]
  163. LeftArm = Character["Left Arm"]
  164. RightLeg = Character["Right Leg"]
  165. LeftLeg = Character["Left Leg"]
  166. RootJoint = RootPart["RootJoint"]
  167. Neck = Torso["Neck"]
  168. RightShoulder = Torso["Right Shoulder"]
  169. LeftShoulder = Torso["Left Shoulder"]
  170. RightHip = Torso["Right Hip"]
  171. LeftHip = Torso["Left Hip"]
  172. local sick = Instance.new("Sound",Character)
  173. sick.SoundId = "rbxassetid://1494340971"
  174. sick.Looped = true
  175. sick.Pitch = 1
  176. sick.Volume = 1
  177. sick:Play()
  178.  
  179. IT = Instance.new
  180. CF = CFrame.new
  181. VT = Vector3.new
  182. RAD = math.rad
  183. C3 = Color3.new
  184. UD2 = UDim2.new
  185. BRICKC = BrickColor.new
  186. ANGLES = CFrame.Angles
  187. EULER = CFrame.fromEulerAnglesXYZ
  188. COS = math.cos
  189. ACOS = math.acos
  190. SIN = math.sin
  191. ASIN = math.asin
  192. ABS = math.abs
  193. MRANDOM = math.random
  194. FLOOR = math.floor
  195.  
  196. --//=================================\\
  197. --|| USEFUL VALUES
  198. --\\=================================//
  199.  
  200. Animation_Speed = 3
  201. Frame_Speed = 1 / 60 -- (1 / 30) OR (1 / 60)
  202. local Speed = 25
  203. local ROOTC0 = CF(0, 0, 0) * ANGLES(RAD(-90), RAD(0), RAD(180))
  204. local NECKC0 = CF(0, 1, 0) * ANGLES(RAD(-90), RAD(0), RAD(180))
  205. local RIGHTSHOULDERC0 = CF(-0.5, 0, 0) * ANGLES(RAD(0), RAD(90), RAD(0))
  206. local LEFTSHOULDERC0 = CF(0.5, 0, 0) * ANGLES(RAD(0), RAD(-90), RAD(0))
  207. local DAMAGEMULTIPLIER = 1
  208. local ANIM = "Idle"
  209. local ATTACK = false
  210. local EQUIPPED = false
  211. local HOLD = false
  212. local COMBO = 1
  213. local Rooted = false
  214. local SINE = 0
  215. local KEYHOLD = false
  216. local CHANGE = 2 / Animation_Speed
  217. local WALKINGANIM = false
  218. local VALUE1 = false
  219. local VALUE2 = false
  220. local ROBLOXIDLEANIMATION = IT("Animation")
  221. ROBLOXIDLEANIMATION.Name = "Roblox Idle Animation"
  222. ROBLOXIDLEANIMATION.AnimationId = "http://www.roblox.com/asset/?id=180435571"
  223. --ROBLOXIDLEANIMATION.Parent = Humanoid
  224. local WEAPONGUI = IT("ScreenGui", PlayerGui)
  225. WEAPONGUI.Name = "Weapon GUI"
  226. local Effects = IT("Folder", Character)
  227. Effects.Name = "Effects"
  228. local ANIMATOR = Humanoid.Animator
  229. local ANIMATE = Character.Animate
  230. local UNANCHOR = true
  231. local PLAYMAINANIM = true
  232. local BOLTSOUNDS = {168586621,168586586,178452241}
  233.  
  234. --//=================================\\
  235. --\\=================================//
  236.  
  237.  
  238. --//=================================\\
  239. --|| SAZERENOS' ARTIFICIAL HEARTBEAT
  240. --\\=================================//
  241.  
  242. ArtificialHB = Instance.new("BindableEvent", script)
  243. ArtificialHB.Name = "ArtificialHB"
  244.  
  245. script:WaitForChild("ArtificialHB")
  246.  
  247. frame = Frame_Speed
  248. tf = 0
  249. allowframeloss = false
  250. tossremainder = false
  251. lastframe = tick()
  252. script.ArtificialHB:Fire()
  253.  
  254. game:GetService("RunService").Heartbeat:connect(function(s, p)
  255. tf = tf + s
  256. if tf >= frame then
  257. if allowframeloss then
  258. script.ArtificialHB:Fire()
  259. lastframe = tick()
  260. else
  261. for i = 1, math.floor(tf / frame) do
  262. script.ArtificialHB:Fire()
  263. end
  264. lastframe = tick()
  265. end
  266. if tossremainder then
  267. tf = 0
  268. else
  269. tf = tf - frame * math.floor(tf / frame)
  270. end
  271. end
  272. end)
  273.  
  274. --//=================================\\
  275. --\\=================================//
  276.  
  277. --//=================================\\
  278. --|| SOME FUNCTIONS
  279. --\\=================================//
  280.  
  281. function Raycast(POSITION, DIRECTION, RANGE, IGNOREDECENDANTS)
  282. return workspace:FindPartOnRay(Ray.new(POSITION, DIRECTION.unit * RANGE), IGNOREDECENDANTS)
  283. end
  284.  
  285. function PositiveAngle(NUMBER)
  286. if NUMBER >= 0 then
  287. NUMBER = 0
  288. end
  289. return NUMBER
  290. end
  291.  
  292. function NegativeAngle(NUMBER)
  293. if NUMBER <= 0 then
  294. NUMBER = 0
  295. end
  296. return NUMBER
  297. end
  298.  
  299. function Swait(NUMBER)
  300. if NUMBER == 0 or NUMBER == nil then
  301. ArtificialHB.Event:wait()
  302. else
  303. for i = 1, NUMBER do
  304. ArtificialHB.Event:wait()
  305. end
  306. end
  307. end
  308.  
  309. function CreateMesh(MESH, PARENT, MESHTYPE, MESHID, TEXTUREID, SCALE, OFFSET)
  310. local NEWMESH = IT(MESH)
  311. if MESH == "SpecialMesh" then
  312. NEWMESH.MeshType = MESHTYPE
  313. if MESHID ~= "nil" and MESHID ~= "" then
  314. NEWMESH.MeshId = "http://www.roblox.com/asset/?id="..MESHID
  315. end
  316. if TEXTUREID ~= "nil" and TEXTUREID ~= "" then
  317. NEWMESH.TextureId = "http://www.roblox.com/asset/?id="..TEXTUREID
  318. end
  319. end
  320. NEWMESH.Offset = OFFSET or VT(0, 0, 0)
  321. NEWMESH.Scale = SCALE
  322. NEWMESH.Parent = PARENT
  323. return NEWMESH
  324. end
  325.  
  326. function CreatePart(FORMFACTOR, PARENT, MATERIAL, REFLECTANCE, TRANSPARENCY, BRICKCOLOR, NAME, SIZE, ANCHOR)
  327. local NEWPART = IT("Part")
  328. NEWPART.formFactor = FORMFACTOR
  329. NEWPART.Reflectance = REFLECTANCE
  330. NEWPART.Transparency = TRANSPARENCY
  331. NEWPART.CanCollide = false
  332. NEWPART.Locked = true
  333. NEWPART.Anchored = true
  334. if ANCHOR == false then
  335. NEWPART.Anchored = false
  336. end
  337. NEWPART.BrickColor = BRICKC(tostring(BRICKCOLOR))
  338. NEWPART.Name = NAME
  339. NEWPART.Size = SIZE
  340. NEWPART.Position = Torso.Position
  341. NEWPART.Material = MATERIAL
  342. NEWPART:BreakJoints()
  343. NEWPART.Parent = PARENT
  344. return NEWPART
  345. end
  346.  
  347. local function weldBetween(a, b)
  348. local weldd = Instance.new("ManualWeld")
  349. weldd.Part0 = a
  350. weldd.Part1 = b
  351. weldd.C0 = CFrame.new()
  352. weldd.C1 = b.CFrame:inverse() * a.CFrame
  353. weldd.Parent = a
  354. return weldd
  355. end
  356.  
  357.  
  358. function QuaternionFromCFrame(cf)
  359. local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components()
  360. local trace = m00 + m11 + m22
  361. if trace > 0 then
  362. local s = math.sqrt(1 + trace)
  363. local recip = 0.5 / s
  364. return (m21 - m12) * recip, (m02 - m20) * recip, (m10 - m01) * recip, s * 0.5
  365. else
  366. local i = 0
  367. if m11 > m00 then
  368. i = 1
  369. end
  370. if m22 > (i == 0 and m00 or m11) then
  371. i = 2
  372. end
  373. if i == 0 then
  374. local s = math.sqrt(m00 - m11 - m22 + 1)
  375. local recip = 0.5 / s
  376. return 0.5 * s, (m10 + m01) * recip, (m20 + m02) * recip, (m21 - m12) * recip
  377. elseif i == 1 then
  378. local s = math.sqrt(m11 - m22 - m00 + 1)
  379. local recip = 0.5 / s
  380. return (m01 + m10) * recip, 0.5 * s, (m21 + m12) * recip, (m02 - m20) * recip
  381. elseif i == 2 then
  382. local s = math.sqrt(m22 - m00 - m11 + 1)
  383. local recip = 0.5 / s return (m02 + m20) * recip, (m12 + m21) * recip, 0.5 * s, (m10 - m01) * recip
  384. end
  385. end
  386. end
  387.  
  388. function QuaternionToCFrame(px, py, pz, x, y, z, w)
  389. local xs, ys, zs = x + x, y + y, z + z
  390. local wx, wy, wz = w * xs, w * ys, w * zs
  391. local xx = x * xs
  392. local xy = x * ys
  393. local xz = x * zs
  394. local yy = y * ys
  395. local yz = y * zs
  396. local zz = z * zs
  397. 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))
  398. end
  399.  
  400. function QuaternionSlerp(a, b, t)
  401. local cosTheta = a[1] * b[1] + a[2] * b[2] + a[3] * b[3] + a[4] * b[4]
  402. local startInterp, finishInterp;
  403. if cosTheta >= 0.0001 then
  404. if (1 - cosTheta) > 0.0001 then
  405. local theta = ACOS(cosTheta)
  406. local invSinTheta = 1 / SIN(theta)
  407. startInterp = SIN((1 - t) * theta) * invSinTheta
  408. finishInterp = SIN(t * theta) * invSinTheta
  409. else
  410. startInterp = 1 - t
  411. finishInterp = t
  412. end
  413. else
  414. if (1 + cosTheta) > 0.0001 then
  415. local theta = ACOS(-cosTheta)
  416. local invSinTheta = 1 / SIN(theta)
  417. startInterp = SIN((t - 1) * theta) * invSinTheta
  418. finishInterp = SIN(t * theta) * invSinTheta
  419. else
  420. startInterp = t - 1
  421. finishInterp = t
  422. end
  423. end
  424. 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
  425. end
  426.  
  427. function Clerp(a, b, t)
  428. local qa = {QuaternionFromCFrame(a)}
  429. local qb = {QuaternionFromCFrame(b)}
  430. local ax, ay, az = a.x, a.y, a.z
  431. local bx, by, bz = b.x, b.y, b.z
  432. local _t = 1 - t
  433. return QuaternionToCFrame(_t * ax + t * bx, _t * ay + t * by, _t * az + t * bz, QuaternionSlerp(qa, qb, t))
  434. end
  435.  
  436. function CreateFrame(PARENT, TRANSPARENCY, BORDERSIZEPIXEL, POSITION, SIZE, COLOR, BORDERCOLOR, NAME)
  437. local frame = IT("Frame")
  438. frame.BackgroundTransparency = TRANSPARENCY
  439. frame.BorderSizePixel = BORDERSIZEPIXEL
  440. frame.Position = POSITION
  441. frame.Size = SIZE
  442. frame.BackgroundColor3 = COLOR
  443. frame.BorderColor3 = BORDERCOLOR
  444. frame.Name = NAME
  445. frame.Parent = PARENT
  446. return frame
  447. end
  448.  
  449. function CreateLabel(PARENT, TEXT, TEXTCOLOR, TEXTFONTSIZE, TEXTFONT, TRANSPARENCY, BORDERSIZEPIXEL, STROKETRANSPARENCY, NAME)
  450. local label = IT("TextLabel")
  451. label.BackgroundTransparency = 1
  452. label.Size = UD2(1, 0, 1, 0)
  453. label.Position = UD2(0, 0, 0, 0)
  454. label.TextColor3 = TEXTCOLOR
  455. label.TextStrokeTransparency = STROKETRANSPARENCY
  456. label.TextTransparency = TRANSPARENCY
  457. label.FontSize = TEXTFONTSIZE
  458. label.Font = TEXTFONT
  459. label.BorderSizePixel = BORDERSIZEPIXEL
  460. label.TextScaled = false
  461. label.Text = TEXT
  462. label.Name = NAME
  463. label.Parent = PARENT
  464. return label
  465. end
  466.  
  467. function NoOutlines(PART)
  468. PART.TopSurface, PART.BottomSurface, PART.LeftSurface, PART.RightSurface, PART.FrontSurface, PART.BackSurface = 10, 10, 10, 10, 10, 10
  469. end
  470.  
  471. function CreateWeldOrSnapOrMotor(TYPE, PARENT, PART0, PART1, C0, C1)
  472. local NEWWELD = IT(TYPE)
  473. NEWWELD.Part0 = PART0
  474. NEWWELD.Part1 = PART1
  475. NEWWELD.C0 = C0
  476. NEWWELD.C1 = C1
  477. NEWWELD.Parent = PARENT
  478. return NEWWELD
  479. end
  480.  
  481. local S = IT("Sound")
  482. function CreateSound(ID, PARENT, VOLUME, PITCH, DOESLOOP)
  483. local NEWSOUND = nil
  484. coroutine.resume(coroutine.create(function()
  485. NEWSOUND = S:Clone()
  486. NEWSOUND.Parent = PARENT
  487. NEWSOUND.Volume = VOLUME
  488. NEWSOUND.Pitch = PITCH
  489. NEWSOUND.SoundId = "http://www.roblox.com/asset/?id="..ID
  490. NEWSOUND:play()
  491. if DOESLOOP == true then
  492. NEWSOUND.Looped = true
  493. else
  494. repeat wait(1) until NEWSOUND.Playing == false
  495. NEWSOUND:remove()
  496. end
  497. end))
  498. return NEWSOUND
  499. end
  500.  
  501. local EyeSizes={
  502. NumberSequenceKeypoint.new(0,2,0),
  503. NumberSequenceKeypoint.new(1,0,0)
  504. }
  505. local EyeTrans={
  506. NumberSequenceKeypoint.new(0,0.5,0),
  507. NumberSequenceKeypoint.new(1,1,0)
  508. }
  509. local PE=Instance.new("ParticleEmitter",nil)
  510. PE.LightEmission=.8
  511. PE.Color = ColorSequence.new(BRICKC("Alder").Color,BRICKC("Lavender").Color)
  512. PE.Size=NumberSequence.new(EyeSizes)
  513. PE.Transparency=NumberSequence.new(EyeTrans)
  514. PE.Lifetime=NumberRange.new(0.35,1)
  515. PE.Rotation=NumberRange.new(0,360)
  516. PE.Rate=100
  517. PE.VelocitySpread = 10000
  518. PE.Acceleration = Vector3.new(0,85,0)
  519. PE.Drag = 5
  520. PE.Speed = NumberRange.new(0.1,5)
  521. PE.Texture="http://www.roblox.com/asset/?id=1460745664"
  522. PE.ZOffset = 0.5
  523. PE.Name = "PE"
  524. PE.Enabled = false
  525.  
  526. function Fire(art)
  527. local PARTICLES = PE:Clone()
  528. PARTICLES.Parent = art
  529. PARTICLES.Enabled = true
  530. return PARTICLES
  531. end
  532.  
  533. function CFrameFromTopBack(at, top, back)
  534. local right = top:Cross(back)
  535. 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)
  536. end
  537.  
  538. --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})
  539. function WACKYEFFECT(Table)
  540. local TYPE = (Table.EffectType or "Sphere")
  541. local SIZE = (Table.Size or VT(1,1,1))
  542. local ENDSIZE = (Table.Size2 or VT(0,0,0))
  543. local TRANSPARENCY = (Table.Transparency or 0)
  544. local ENDTRANSPARENCY = (Table.Transparency2 or 1)
  545. local CFRAME = (Table.CFrame or Torso.CFrame)
  546. local MOVEDIRECTION = (Table.MoveToPos or nil)
  547. local ROTATION1 = (Table.RotationX or 0)
  548. local ROTATION2 = (Table.RotationY or 0)
  549. local ROTATION3 = (Table.RotationZ or 0)
  550. local MATERIAL = (Table.Material or "Neon")
  551. local COLOR = (Table.Color or C3(1,1,1))
  552. local TIME = (Table.Time or 45)
  553. local SOUNDID = (Table.SoundID or nil)
  554. local SOUNDPITCH = (Table.SoundPitch or nil)
  555. local SOUNDVOLUME = (Table.SoundVolume or nil)
  556. coroutine.resume(coroutine.create(function()
  557. local PLAYSSOUND = false
  558. local SOUND = nil
  559. local EFFECT = CreatePart(3, Effects, MATERIAL, 0, TRANSPARENCY, BRICKC("Pearl"), "Effect", VT(1,1,1), true)
  560. if SOUNDID ~= nil and SOUNDPITCH ~= nil and SOUNDVOLUME ~= nil then
  561. PLAYSSOUND = true
  562. SOUND = CreateSound(SOUNDID, EFFECT, SOUNDVOLUME, SOUNDPITCH, false)
  563. end
  564. EFFECT.Color = COLOR
  565. local MSH = nil
  566. if TYPE == "Sphere" then
  567. MSH = CreateMesh("SpecialMesh", EFFECT, "Sphere", "", "", SIZE, VT(0,0,0))
  568. elseif TYPE == "Block" or TYPE == "Box" then
  569. MSH = IT("BlockMesh",EFFECT)
  570. MSH.Scale = SIZE
  571. elseif TYPE == "Wave" then
  572. MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "20329976", "", SIZE, VT(0,0,-SIZE.X/8))
  573. elseif TYPE == "Ring" then
  574. MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "559831844", "", VT(SIZE.X,SIZE.X,0.1), VT(0,0,0))
  575. elseif TYPE == "Slash" then
  576. MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "662586858", "", VT(SIZE.X/10,0,SIZE.X/10), VT(0,0,0))
  577. elseif TYPE == "Round Slash" then
  578. MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "662585058", "", VT(SIZE.X/10,0,SIZE.X/10), VT(0,0,0))
  579. elseif TYPE == "Swirl" then
  580. MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "1051557", "", SIZE, VT(0,0,0))
  581. elseif TYPE == "Skull" then
  582. MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "4770583", "", SIZE, VT(0,0,0))
  583. elseif TYPE == "Crystal" then
  584. MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "9756362", "", SIZE, VT(0,0,0))
  585. end
  586. if MSH ~= nil then
  587. local MOVESPEED = nil
  588. if MOVEDIRECTION ~= nil then
  589. MOVESPEED = (CFRAME.p - MOVEDIRECTION).Magnitude/TIME
  590. end
  591. local GROWTH = SIZE - ENDSIZE
  592. local TRANS = TRANSPARENCY - ENDTRANSPARENCY
  593. if TYPE == "Block" then
  594. EFFECT.CFrame = CFRAME*ANGLES(RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)))
  595. else
  596. EFFECT.CFrame = CFRAME
  597. end
  598. for LOOP = 1, TIME+1 do
  599. Swait()
  600. MSH.Scale = MSH.Scale - GROWTH/TIME
  601. if TYPE == "Wave" then
  602. MSH.Offset = VT(0,0,-MSH.Scale.X/8)
  603. end
  604. EFFECT.Transparency = EFFECT.Transparency - TRANS/TIME
  605. if TYPE == "Block" then
  606. EFFECT.CFrame = CFRAME*ANGLES(RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)))
  607. else
  608. EFFECT.CFrame = EFFECT.CFrame*ANGLES(RAD(ROTATION1),RAD(ROTATION2),RAD(ROTATION3))
  609. end
  610. if MOVEDIRECTION ~= nil then
  611. local ORI = EFFECT.Orientation
  612. EFFECT.CFrame = CF(EFFECT.Position,MOVEDIRECTION)*CF(0,0,-MOVESPEED)
  613. EFFECT.Orientation = ORI
  614. end
  615. end
  616. if PLAYSSOUND == false then
  617. EFFECT:remove()
  618. else
  619. repeat wait(1) until SOUND.Playing == false
  620. EFFECT:remove()
  621. end
  622. else
  623. if PLAYSSOUND == false then
  624. EFFECT:remove()
  625. else
  626. repeat Swait() until SOUND.Playing == false
  627. EFFECT:remove()
  628. end
  629. end
  630. end))
  631. end
  632.  
  633. function MakeForm(PART,TYPE)
  634. if TYPE == "Cyl" then
  635. local MSH = IT("CylinderMesh",PART)
  636. elseif TYPE == "Ball" then
  637. local MSH = IT("SpecialMesh",PART)
  638. MSH.MeshType = "Sphere"
  639. elseif TYPE == "Wedge" then
  640. local MSH = IT("SpecialMesh",PART)
  641. MSH.MeshType = "Wedge"
  642. end
  643. end
  644.  
  645. Debris = game:GetService("Debris")
  646.  
  647. function CastProperRay(StartPos, EndPos, Distance, Ignore)
  648. local DIRECTION = CF(StartPos,EndPos).lookVector
  649. return Raycast(StartPos, DIRECTION, Distance, Ignore)
  650. end
  651.  
  652. local HATWELD = nil
  653. function Pose(WhichPose,Speed,Time,Magic,Gyro,Tors)
  654. PLAYMAINANIM = false
  655. if WhichPose == "Cast1" then
  656. for i=0, Time, 0.1 / Animation_Speed do
  657. Swait()
  658. if Magic == true then
  659. 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"Lavender".Color, SoundID = nil, SoundPitch = nil, SoundVolume = nil})
  660. end
  661. if Gyro ~= nil and Gyro ~= false then
  662. Gyro.cframe = CF(RootPart.Position,Mouse.Hit.p)
  663. end
  664. 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)
  665. 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)
  666. 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)
  667. 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)
  668. 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)
  669. 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)
  670. end
  671. elseif WhichPose == "Cast2" then
  672. for i=0, Time, 0.1 / Animation_Speed do
  673. Swait()
  674. if Magic == true then
  675. 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"Lavender".Color, SoundID = nil, SoundPitch = nil, SoundVolume = nil})
  676. 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"Lavender".Color, SoundID = nil, SoundPitch = nil, SoundVolume = nil})
  677. end
  678. if Gyro ~= nil and Gyro ~= false then
  679. Gyro.cframe = CF(RootPart.Position,Mouse.Hit.p)
  680. end
  681. 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)
  682. 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)
  683. 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)
  684. 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)
  685. 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)
  686. 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)
  687. end
  688. elseif WhichPose == "RightArmUp" then
  689. for i=0, Time, 0.1 / Animation_Speed do
  690. Swait()
  691. if Magic == true then
  692. 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"Lavender".Color, SoundID = nil, SoundPitch = nil, SoundVolume = nil})
  693. end
  694. if Gyro ~= nil and Gyro ~= false then
  695. Gyro.cframe = CF(RootPart.Position,Mouse.Hit.p)
  696. end
  697. 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)
  698. 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)
  699. 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)
  700. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.25, 0.5 + 0.15 * COS(SINE / 12) - 0.05 * COS(SINE / 12), 0.5) * ANGLES(RAD(-45), RAD(0), RAD(45)) * LEFTSHOULDERC0, Speed / Animation_Speed)
  701. RightHip.C0 = Clerp(RightHip.C0, CF(1, -0.5, -0.5) * ANGLES(RAD(0), RAD(65), RAD(0)) * ANGLES(RAD(-3), RAD(0), RAD(-15)), Speed / Animation_Speed)
  702. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, -0.01) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), Speed / Animation_Speed)
  703. end
  704. elseif WhichPose == "Taunt" then
  705. for i=0, Time, 0.1 / Animation_Speed do
  706. Swait()
  707. 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)
  708. 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)
  709. 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)
  710. 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)
  711. 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)
  712. 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)
  713. end
  714. HATWELD.Part0 = RightArm
  715. HATWELD.C0 = CF(0,-1.1,-0.4) * ANGLES(RAD(0), RAD(0), RAD(180)) * ANGLES(RAD(-20), RAD(0), RAD(0))
  716. CreateSound(221057812,Torso,10,1,false)
  717. for i=0, Time*2, 0.1 / Animation_Speed do
  718. Swait()
  719. 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)
  720. 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)
  721. 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)
  722. 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)
  723. 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)
  724. 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)
  725. end
  726. for i=0, Time, 0.1 / Animation_Speed do
  727. Swait()
  728. 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)
  729. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(5), RAD(0), RAD(0)), Speed / Animation_Speed)
  730. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.35, 0.65, -0.5) * ANGLES(RAD(175), RAD(0), RAD(-35)) * RIGHTSHOULDERC0, Speed / Animation_Speed)
  731. 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)
  732. 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)
  733. 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)
  734. 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)
  735. end
  736. HATWELD.Part0 = Head
  737. HATWELD.C0 = CF(0,0.35,0)
  738. elseif WhichPose == "Prepare key" then
  739. for i=0, Time, 0.1 / Animation_Speed do
  740. Swait()
  741. if Gyro ~= nil and Gyro ~= false then
  742. Gyro.cframe = CF(RootPart.Position,Tors.Position)
  743. end
  744. 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)
  745. 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)
  746. 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)
  747. 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)
  748. 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)
  749. 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)
  750. end
  751. elseif WhichPose == "Turn key" then
  752. for i=0, Time, 0.1 / Animation_Speed do
  753. Swait()
  754. if Gyro ~= nil and Gyro ~= false then
  755. Gyro.cframe = CF(RootPart.Position,Tors.Position)
  756. end
  757. 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)
  758. 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)
  759. 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)
  760. 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)
  761. 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)
  762. 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)
  763. end
  764. end
  765. PLAYMAINANIM = true
  766. end
  767.  
  768. --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})
  769. function Lightning(Table)
  770. local Color = Table.Color or C3(1,1,1)
  771. local StartPos = Table.Start or Torso.Position
  772. local EndPos = Table.End or Mouse.Hit.p
  773. local SegmentLength = Table.SegmentL or 2
  774. local Thickness = Table.Thickness or 0.1
  775. local Dissapear = Table.DoesFade or false
  776. local Parent = Table.Ignore or Character
  777. local MaxDist = Table.MaxDist or 400
  778. local Branches = Table.Branches or false
  779. local HIT,HITPOS = CastProperRay(StartPos, EndPos, MaxDist, Parent)
  780. local DISTANCE = math.ceil((StartPos - HITPOS).Magnitude/SegmentLength)
  781. local LIGHTNINGMODEL = IT("Model",Effects)
  782. LIGHTNINGMODEL.Name = "Lightning"
  783. local LastBolt = nil
  784. for E = 1, DISTANCE do
  785. local ExtraSize = (DISTANCE-E)/15
  786. local PART = CreatePart(3, LIGHTNINGMODEL, "Neon", 0, 0, BRICKC("Pearl"), "LightningPart"..E, VT(Thickness+ExtraSize,SegmentLength,Thickness+ExtraSize))
  787. PART.Color = Color
  788. MakeForm(PART,"Cyl")
  789. if LastBolt == nil then
  790. PART.CFrame = CF(StartPos,HITPOS)*ANGLES(RAD(90),RAD(0),RAD(0))*CF(0,-PART.Size.Y/2,0)
  791. else
  792. 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)
  793. end
  794. LastBolt = PART
  795. if Branches == true then
  796. local CHOICE = MRANDOM(1,7+((DISTANCE-E)*2))
  797. if CHOICE == 1 then
  798. local LASTBRANCH = nil
  799. for i = 1, MRANDOM(2,5) do
  800. local ExtraSize2 = ((DISTANCE-E)/25)/i
  801. local PART = CreatePart(3, LIGHTNINGMODEL, "Neon", 0, 0, BRICKC("Pearl"), "Branch"..E.."-"..i, VT(Thickness+ExtraSize2,SegmentLength,Thickness+ExtraSize2))
  802. PART.Color = Color
  803. MakeForm(PART,"Cyl")
  804. if LASTBRANCH == nil then
  805. 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)
  806. else
  807. 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)
  808. end
  809. LASTBRANCH = PART
  810. end
  811. end
  812. end
  813. end
  814. if Dissapear == true then
  815. coroutine.resume(coroutine.create(function()
  816. for i = 1, 10 do
  817. Swait()
  818. for _, c in pairs(LIGHTNINGMODEL:GetChildren()) do
  819. if c.ClassName == "Part" then
  820. c.Transparency = i/10
  821. end
  822. end
  823. end
  824. LIGHTNINGMODEL:remove()
  825. end))
  826. elseif Dissapear == false then
  827. Debris:AddItem(LIGHTNINGMODEL,0.1)
  828. end
  829. return {End = LastBolt.CFrame*CF(0,0,-LastBolt.Size.Z/2).p,LastBolt = LastBolt,Model = LIGHTNINGMODEL}
  830. end
  831.  
  832. --//=================================\\
  833. --|| WEAPON CREATION
  834. --\\=================================//
  835.  
  836. for i = 1, 15 do
  837. local FACE = CreatePart(3, Character, "Fabric", 0, 0+(i-1)/15.2, "Dark stone grey", "FaceGradient", VT(1.01,0.58,1.01),false)
  838. FACE.Color = C3(0,0,0)
  839. Head:FindFirstChildOfClass("SpecialMesh"):Clone().Parent = FACE
  840. CreateWeldOrSnapOrMotor("Weld", Head, Head, FACE, CF(0,0.35-(i-1)/35,0), CF(0, 0, 0))
  841. end
  842. local HAT1 = CreatePart(3, Character, "SmoothPlastic", 0, 0, "Really black", "Hat", VT(2,0.2,2),false)
  843. MakeForm(HAT1,"Cyl")
  844. HATWELD = CreateWeldOrSnapOrMotor("Weld", Head, Head, HAT1, CF(0,0.35,0), CF(0, 0, 0))
  845. local BELT = CreatePart(3, Character, "SmoothPlastic", 0, 0, "Really black", "Hat", VT(2.01,0.15,2.01),false)
  846. BELT.Color = C3(15/255,15/255,15/255)
  847. MakeForm(BELT,"Cyl")
  848. CreateWeldOrSnapOrMotor("Weld", HAT1, HAT1, BELT, CF(0,0,0), CF(0, 0, 0))
  849. local HAT2 = CreatePart(3, Character, "SmoothPlastic", 0, 0, "Really black", "Hat", VT(1.3,2.2,1.3),false)
  850. MakeForm(HAT2,"Cyl")
  851. CreateWeldOrSnapOrMotor("Weld", HAT1, HAT1, HAT2, CF(0,1.1,0), CF(0, 0, 0))
  852. local BELT = CreatePart(3, Character, "SmoothPlastic", 0, 0, "Really black", "Hat", VT(1.31,0.2,1.31),false)
  853. BELT.Color = C3(15/255,15/255,15/255)
  854. MakeForm(BELT,"Cyl")
  855. CreateWeldOrSnapOrMotor("Weld", HAT2, HAT2, BELT, CF(0,0,0), CF(0, 0, 0))
  856. local GEM = CreatePart(3, Character, "Neon", 0, 0, "Lavender", "Gem", VT(0.25,0.25,0.1),false)
  857. MakeForm(GEM,"Ball")
  858. CreateWeldOrSnapOrMotor("Weld", HAT2, HAT2, GEM, CF(0,0,-BELT.Size.X/2), CF(0, 0, 0))
  859. local GEM = CreatePart(3, Character, "Neon", 0, 0, "Lavender", "Gem", VT(0.25,0.25,0.1),false)
  860. MakeForm(GEM,"Ball")
  861. CreateWeldOrSnapOrMotor("Weld", HAT2, HAT2, GEM, CF(0,0,BELT.Size.X/2), CF(0, 0, 0))
  862. local GEM = CreatePart(3, Character, "Neon", 0, 0, "Lavender", "Gem", VT(0.1,0.25,0.25),false)
  863. MakeForm(GEM,"Ball")
  864. CreateWeldOrSnapOrMotor("Weld", HAT2, HAT2, GEM, CF(-BELT.Size.X/2,0,0), CF(0, 0, 0))
  865. local GEM = CreatePart(3, Character, "Neon", 0, 0, "Lavender", "Gem", VT(0.1,0.25,0.25),false)
  866. MakeForm(GEM,"Ball")
  867. CreateWeldOrSnapOrMotor("Weld", HAT2, HAT2, GEM, CF(BELT.Size.X/2,0,0), CF(0, 0, 0))
  868. local BELT = CreatePart(3, Character, "SmoothPlastic", 0, 0, "Really black", "Hat", VT(1.31,0.1,1.31),false)
  869. BELT.Color = C3(15/255,15/255,15/255)
  870. MakeForm(BELT,"Cyl")
  871. CreateWeldOrSnapOrMotor("Weld", HAT2, HAT2, BELT, CF(0,0.7,0), CF(0, 0, 0))
  872. local BELT = CreatePart(3, Character, "SmoothPlastic", 0, 0, "Really black", "Hat", VT(1.31,0.1,1.31),false)
  873. BELT.Color = C3(15/255,15/255,15/255)
  874. MakeForm(BELT,"Cyl")
  875. CreateWeldOrSnapOrMotor("Weld", HAT2, HAT2, BELT, CF(0,-0.7,0), CF(0, 0, 0))
  876. local BELT = CreatePart(3, Character, "SmoothPlastic", 0, 0, "Really black", "Hat", VT(1.31,0.1,1.31),false)
  877. BELT.Color = C3(15/255,15/255,15/255)
  878. MakeForm(BELT,"Cyl")
  879. CreateWeldOrSnapOrMotor("Weld", HAT2, HAT2, BELT, CF(0,0.35,0), CF(0, 0, 0))
  880. local BELT = CreatePart(3, Character, "SmoothPlastic", 0, 0, "Really black", "Hat", VT(1.31,0.1,1.31),false)
  881. BELT.Color = C3(15/255,15/255,15/255)
  882. MakeForm(BELT,"Cyl")
  883. CreateWeldOrSnapOrMotor("Weld", HAT2, HAT2, BELT, CF(0,-0.35,0), CF(0, 0, 0))
  884. local BELT = CreatePart(3, Character, "SmoothPlastic", 0, 0, "Really black", "Hat", VT(1.3,0.5,1.3),false)
  885. MakeForm(BELT,"Ball")
  886. CreateWeldOrSnapOrMotor("Weld", HAT2, HAT2, BELT, CF(0,HAT2.Size.Y/2,0), CF(0, 0, 0))
  887. Humanoid.DisplayDistanceType = "None"
  888. local naeeym2 = IT("BillboardGui",Character)
  889. naeeym2.AlwaysOnTop = true
  890. naeeym2.Size = UDim2.new(5,35,2,15)
  891. naeeym2.StudsOffset = Vector3.new(0,3,0)
  892. naeeym2.MaxDistance = 75
  893. naeeym2.Adornee = Character.Head
  894. naeeym2.Name = "Name"
  895. naeeym2.PlayerToHideFrom = Player
  896. local tecks2 = IT("TextLabel",naeeym2)
  897. tecks2.BackgroundTransparency = 1
  898. tecks2.TextScaled = true
  899. tecks2.BorderSizePixel = 0
  900. tecks2.Text = "The Warden"
  901. tecks2.Font = "Bodoni"
  902. tecks2.TextSize = 30
  903. tecks2.TextStrokeTransparency = 0.5
  904. tecks2.TextColor3 = C3(0,0,0)
  905. tecks2.TextStrokeColor3 = BRICKC"Lavender".Color
  906. tecks2.Size = UDim2.new(1,0,0.5,0)
  907. tecks2.Parent = naeeym2
  908. local EYE = CreatePart(3, Character, "Neon", 0, 0, "Lilac", "FaceGradient", VT(0.15,0.15,0.15),false)
  909. MakeForm(EYE,"Ball")
  910. CreateWeldOrSnapOrMotor("Weld", Head, Head, EYE, CF(0.15,0.22,-0.55), CF(0, 0, 0))
  911. local EYE = CreatePart(3, Character, "Neon", 0, 0, "Lilac", "FaceGradient", VT(0.05,0.14,0.05),false)
  912. EYE.Color = C3(0,0,0)
  913. MakeForm(EYE,"Ball")
  914. CreateWeldOrSnapOrMotor("Weld", Head, Head, EYE, CF(0.15,0.22,-0.6), CF(0, 0, 0))
  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"Lavender".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"Lavender".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"Lavender".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"Lavender".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"Lavender".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, "Lavender", "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, "Lavender", "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"Lavender".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, "Lavender", "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, "Lavender", "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, "Lavender", "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, "Lavender", "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"Lavender".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"Lavender".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. Lamp_Light()
  1348. end
  1349.  
  1350. if Key == "b" and ATTACK == false then
  1351. Beast_Thunder()
  1352. end
  1353.  
  1354. if Key == "c" and ATTACK == false then
  1355. Garden_Limitation()
  1356. end
  1357.  
  1358. if Key == "v" and ATTACK == false then
  1359. Garden_Wall()
  1360. end
  1361.  
  1362. if Key == "x" and ATTACK == false then
  1363. Garden_Exit()
  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 = "The Beast"
  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://498297099"
  1477. sick.Looped = true
  1478. sick.Pitch = 1
  1479. sick.Volume = 4
  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. --\\====================================================//--
Add Comment
Please, Sign In to add comment