Advertisement
Hermaxs

Untitled

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