Advertisement
Cute_Sylveon

kkk

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