Advertisement
sawgamer1

Untitled

Nov 13th, 2018
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 120.30 KB | None | 0 0
  1. if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
  2. local Player,game,owner = owner,game
  3. local RealPlayer = Player
  4. do
  5. print("FE Compatibility code by Mokiros")
  6. local rp = RealPlayer
  7. script.Parent = rp.Character
  8.  
  9. --RemoteEvent for communicating
  10. local Event = Instance.new("RemoteEvent")
  11. Event.Name = "UserInput_Event"
  12.  
  13. --Fake event to make stuff like Mouse.KeyDown work
  14. local function fakeEvent()
  15. local t = {_fakeEvent=true,Functions={},Connect=function(self,f)table.insert(self.Functions,f) end}
  16. t.connect = t.Connect
  17. return t
  18. end
  19.  
  20. --Creating fake input objects with fake variables
  21. local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent()}
  22. local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
  23. local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
  24. CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
  25. end}
  26. --Merged 2 functions into one by checking amount of arguments
  27. CAS.UnbindAction = CAS.BindAction
  28.  
  29. --This function will trigger the events that have been :Connect()'ed
  30. local function te(self,ev,...)
  31. local t = m[ev]
  32. if t and t._fakeEvent then
  33. for _,f in pairs(t.Functions) do
  34. f(...)
  35. end
  36. end
  37. end
  38. m.TrigEvent = te
  39. UIS.TrigEvent = te
  40.  
  41. Event.OnServerEvent:Connect(function(plr,io)
  42. if plr~=rp then return end
  43. m.Target = io.Target
  44. m.Hit = io.Hit
  45. if not io.isMouse then
  46. local b = io.UserInputState == Enum.UserInputState.Begin
  47. if io.UserInputType == Enum.UserInputType.MouseButton1 then
  48. return m:TrigEvent(b and "Button1Down" or "Button1Up")
  49. end
  50. for _,t in pairs(CAS.Actions) do
  51. for _,k in pairs(t.Keys) do
  52. if k==io.KeyCode then
  53. t.Function(t.Name,io.UserInputState,io)
  54. end
  55. end
  56. end
  57. m:TrigEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
  58. UIS:TrigEvent(b and "InputBegan" or "InputEnded",io,false)
  59. end
  60. end)
  61. Event.Parent = NLS([==[
  62. local Player = owner
  63. local Event = script:WaitForChild("UserInput_Event")
  64.  
  65. local Mouse = Player:GetMouse()
  66. local UIS = game:GetService("UserInputService")
  67. local input = function(io,a)
  68. if a then return end
  69. --Since InputObject is a client-side instance, we create and pass table instead
  70. Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState,Hit=Mouse.Hit,Target=Mouse.Target})
  71. end
  72. UIS.InputBegan:Connect(input)
  73. UIS.InputEnded:Connect(input)
  74.  
  75. local h,t
  76. --Give the server mouse data 30 times every second, but only if the values changed
  77. --If player is not moving their mouse, client won't fire events
  78. while wait(1/30) do
  79. if h~=Mouse.Hit or t~=Mouse.Target then
  80. h,t=Mouse.Hit,Mouse.Target
  81. Event:FireServer({isMouse=true,Target=t,Hit=h})
  82. end
  83. end]==],Player.Character)
  84.  
  85. ----Sandboxed game object that allows the usage of client-side methods and services
  86. --Real game object
  87. local _rg = game
  88.  
  89. --Metatable for fake service
  90. local fsmt = {
  91. __index = function(self,k)
  92. local s = rawget(self,"_RealService")
  93. if s then return s[k] end
  94. end,
  95. __newindex = function(self,k,v)
  96. local s = rawget(self,"_RealService")
  97. if s then s[k]=v end
  98. end,
  99. __call = function(self,...)
  100. local s = rawget(self,"_RealService")
  101. if s then return s(...) end
  102. end
  103. }
  104. local function FakeService(t,RealService)
  105. t._RealService = typeof(RealService)=="string" and _rg:GetService(RealService) or RealService
  106. return setmetatable(t,fsmt)
  107. end
  108.  
  109. --Fake game object
  110. local g = {
  111. GetService = function(self,s)
  112. return self[s]
  113. end,
  114. Players = FakeService({
  115. owner = FakeService({GetMouse=function(self)return m end},Player)
  116. },"Players"),
  117. UserInputService = FakeService(UIS,"UserInputService"),
  118. ContextActionService = FakeService(CAS,"ContextActionService"),
  119. }
  120. rawset(g.Players,"owner",g.Players.owner)
  121. g.service = g.GetService
  122.  
  123. g.RunService = FakeService({
  124. RenderStepped = _rg:GetService("RunService").Heartbeat,
  125. BindToRenderStep = function(self,name,_,fun)
  126. self._btrs[name] = self.Heartbeat:Connect(fun)
  127. end,
  128. UnbindFromRenderStep = function(self,name)
  129. self._btrs[name]:Disconnect()
  130. end,
  131. },"RunService")
  132.  
  133. setmetatable(g,{
  134. __index=function(self,s)
  135. return _rg:GetService(s) or typeof(_rg[s])=="function"
  136. and function(_,...)return _rg[s](_rg,...)end or _rg[s]
  137. end,
  138. __newindex = fsmt.__newindex,
  139. __call = fsmt.__call
  140. })
  141. --Changing owner to fake player object to support owner:GetMouse()
  142. game,owner = g,g.Players.owner
  143. end
  144.  
  145. Player = game.Players.owner
  146. Character = Player.Character
  147. local txt = Instance.new("BillboardGui", Character)
  148. txt.Adornee = Character.Head
  149. txt.Name = "_status"
  150. txt.Size = UDim2.new(2, 0, 1.2, 0)
  151. txt.StudsOffset = Vector3.new(-9, 8, 0)
  152. local text = Instance.new("TextLabel", txt)
  153. text.Size = UDim2.new(10, 0, 7, 0)
  154. text.FontSize = "Size24"
  155. text.TextScaled = true
  156. text.TextTransparency = 0
  157. text.BackgroundTransparency = 1
  158. text.TextTransparency = 0
  159. text.TextStrokeTransparency = 0
  160. text.Font = "Antique"
  161. text.TextStrokeColor3 = Color3.new(196, 40, 28)
  162. text.Text = "The Corrupted Doctor"
  163. script.Name = "The Corrupted Doctor"
  164. --//====================================================\\--
  165. --|| CREATED BY SHACKLUSTER-EDITED BY PROMLG112
  166. --\\====================================================//--
  167. local chara = Character
  168.  
  169. function chat(...)
  170. local txxt = {...}
  171. local ch = coroutine.wrap(function()
  172. if chara:FindFirstChild("Chatt")~= nil then
  173. Character:FindFirstChild("Chatt"):destroy()
  174. end
  175. local txt = Instance.new("BillboardGui", chara)
  176. txt.Adornee = chara.Head
  177. txt.Name = "Chatt"
  178. txt.Size = UDim2.new(2, 0, 1.2, 0)
  179. txt.StudsOffset = Vector3.new(-9, 7, 0)
  180. local text = Instance.new("TextLabel", txt)
  181. text.Size = UDim2.new(10, 0, 7, 0)
  182. text.TextSize = 32
  183. text.Font = Enum.Font.Antique
  184. text.TextScaled = false
  185. text.BackgroundTransparency = 1
  186. text.TextColor3 = Color3.new(0,0,0)
  187. text.TextStrokeTransparency = 0
  188. text.TextStrokeColor3 = Color3.new(0/0, 0/0, 0/0)
  189. text.Text = ""
  190. txxt = table.concat(txxt,"\t")
  191. for i = 1, #txxt do
  192. text.Text = txxt:sub(1,i)
  193.  
  194. end
  195. wait(2)
  196. for trans = 0,1,00.1 do
  197. text.TextTransparency = trans
  198. text.TextStrokeTransparency = trans
  199. wait()
  200. end
  201. wait()
  202. txt:destroy()
  203. end)
  204.  
  205. ch(...)
  206. end
  207. Player.Chatted:connect(chat)
  208.  
  209. wait(0.2)
  210.  
  211. Player = game:GetService("Players").owner
  212. PlayerGui = Player.PlayerGui
  213. Cam = workspace.CurrentCamera
  214. Backpack = Player.Backpack
  215. Character = Player.Character
  216. Humanoid = Character.Humanoid
  217. Mouse = Player:GetMouse()
  218. RootPart = Character["HumanoidRootPart"]
  219. Torso = Character["Torso"]
  220. Head = Character["Head"]
  221. RightArm = Character["Right Arm"]
  222. LeftArm = Character["Left Arm"]
  223. RightLeg = Character["Right Leg"]
  224. LeftLeg = Character["Left Leg"]
  225. RootJoint = RootPart["RootJoint"]
  226. Neck = Torso["Neck"]
  227. RightShoulder = Torso["Right Shoulder"]
  228. LeftShoulder = Torso["Left Shoulder"]
  229. RightHip = Torso["Right Hip"]
  230. LeftHip = Torso["Left Hip"]
  231.  
  232. for i,v in pairs(Character:GetChildren()) do
  233. if v.ClassName == "Shirt" or v.ClassName == "Pants" or v.ClassName == "CharacterMesh" then
  234. v:Destroy()
  235. end
  236. end
  237.  
  238. for i,v in pairs(Character:GetChildren()) do
  239. if v.ClassName == "Accessory" or v.ClassName == "Hat" then
  240. v:Destroy()
  241. end
  242. end
  243.  
  244. local Shirt = Instance.new("Shirt",Character)
  245. local Pants = Instance.new("Pants",Character)
  246. Shirt.ShirtTemplate = "rbxassetid://648758131"
  247. Pants.PantsTemplate = "rbxassetid://472675863"
  248.  
  249. local sick = Instance.new("Sound",Character)
  250. sick.SoundId = "rbxassetid://561833161"
  251. sick.Looped = true
  252. sick.Pitch = 1
  253. sick.Volume = 1.3
  254. sick:Play()
  255.  
  256. IT = Instance.new
  257. CF = CFrame.new
  258. VT = Vector3.new
  259. RAD = math.rad
  260. C3 = Color3.new
  261. UD2 = UDim2.new
  262. BRICKC = BrickColor.new
  263. ANGLES = CFrame.Angles
  264. EULER = CFrame.fromEulerAnglesXYZ
  265. COS = math.cos
  266. ACOS = math.acos
  267. SIN = math.sin
  268. ASIN = math.asin
  269. ABS = math.abs
  270. MRANDOM = math.random
  271. FLOOR = math.floor
  272. local CLOAKED = false
  273. local KILLINSTINCT = 0
  274. --//=================================\\
  275. --|| SOME OTHER STUFF
  276. --\\=================================//
  277. ff = Instance.new("ForceField", game.Players.LocalPlayer.Character)
  278. ff.Visible = false
  279. Humanoid.Name = "God Mode"
  280.  
  281. --//=================================\\
  282. --|| CUSTOMIZATION
  283. --\\=================================//
  284.  
  285. Player_Size = 1 --Size of the player.
  286. Animation_Speed = 3
  287. Frame_Speed = 1 / 60 -- (1 / 30) OR (1 / 60)
  288.  
  289. local Speed = 16
  290. local Effects2 = {}
  291.  
  292. --//=================================\\
  293. --|| END OF CUSTOMIZATION
  294. --\\=================================//
  295.  
  296. local function weldBetween(a, b)
  297. local weldd = Instance.new("ManualWeld")
  298. weldd.Part0 = a
  299. weldd.Part1 = b
  300. weldd.C0 = CFrame.new()
  301. weldd.C1 = b.CFrame:inverse() * a.CFrame
  302. weldd.Parent = a
  303. return weldd
  304. end
  305. --//=================================\\
  306. --|| USEFUL VALUES
  307. --\\=================================//
  308.  
  309. Animation_Speed = 3
  310. Frame_Speed = 1 / 60 -- (1 / 30) OR (1 / 60)
  311. local Speed = 16
  312. local ROOTC0 = CF(0, 0, 0) * ANGLES(RAD(-90), RAD(0), RAD(180))
  313. local NECKC0 = CF(0, 1, 0) * ANGLES(RAD(-90), RAD(0), RAD(180))
  314. local RIGHTSHOULDERC0 = CF(-0.5, 0, 0) * ANGLES(RAD(0), RAD(90), RAD(0))
  315. local LEFTSHOULDERC0 = CF(0.5, 0, 0) * ANGLES(RAD(0), RAD(-90), RAD(0))
  316. local DAMAGEMULTIPLIER = 1
  317. local ANIM = "Idle"
  318. local ATTACK = false
  319. local EQUIPPED = false
  320. local HOLD = false
  321. local CLOCKTARGET = nil
  322. local CLOCKSPEED = 2.5
  323. local CLOCKLOOP = 0
  324. local COMBO = 1
  325. local Rooted = false
  326. local SINE = 0
  327. local KEYHOLD = false
  328. local CHANGE = 2 / Animation_Speed
  329. local WALKINGANIM = false
  330. local VALUE1 = false
  331. local VALUE2 = false
  332. local ROBLOXIDLEANIMATION = IT("Animation")
  333. ROBLOXIDLEANIMATION.Name = "Roblox Idle Animation"
  334. ROBLOXIDLEANIMATION.AnimationId = "http://www.roblox.com/asset/?id=180435571"
  335. --ROBLOXIDLEANIMATION.Parent = Humanoid
  336. local WEAPONGUI = IT("ScreenGui", PlayerGui)
  337. WEAPONGUI.Name = "Weapon GUI"
  338. local Weapon = IT("Model")
  339. Weapon.Name = "Adds"
  340. local Effects = IT("Folder", Weapon)
  341. Effects.Name = "Effects"
  342. local ANIMATOR = Humanoid.Animator
  343. local ANIMATE = Character.Animate
  344. local UNANCHOR = true
  345. local ENERGYSOUND = 1417051162
  346. local BEAMSOUND = 1417056781
  347. local EXPLOSIONSOUND = 1417056081
  348.  
  349. --//=================================\\
  350. --\\=================================//
  351.  
  352. local asd = Instance.new("ParticleEmitter")
  353. asd.Color = ColorSequence.new(Color3.new(0.5, 0, 0), Color3.new(.3, 0, 0))
  354. asd.LightEmission = .1
  355. asd.Texture = "http://www.roblox.com/asset/?ID=291880914"
  356. aaa = NumberSequence.new({NumberSequenceKeypoint.new(0, 0.6),NumberSequenceKeypoint.new(1, 2)})
  357. bbb = NumberSequence.new({NumberSequenceKeypoint.new(0, 1),NumberSequenceKeypoint.new(0.0636, 0), NumberSequenceKeypoint.new(1, 1)})
  358. asd.Transparency = bbb
  359. asd.Size = aaa
  360. asd.ZOffset = .9
  361. asd.Acceleration = Vector3.new(0, -15, 0)
  362. asd.LockedToPart = false
  363. asd.EmissionDirection = "Back"
  364. asd.Lifetime = NumberRange.new(1, 2)
  365. asd.Rotation = NumberRange.new(-100, 100)
  366. asd.RotSpeed = NumberRange.new(-100, 100)
  367. asd.Speed = NumberRange.new(10)
  368. asd.Enabled = false
  369. asd.VelocitySpread = 999
  370.  
  371. function getbloody(victim,amount)
  372. local PART = CreatePart(3, Effects, "Metal", 0, 1, "Mid gray", "Blood", victim.Size)
  373. PART.CFrame = victim.CFrame
  374. local HITPLAYERSOUNDS = {"356551938","264486467"}
  375. Debris:AddItem(PART,5)
  376. CreateSound(HITPLAYERSOUNDS[MRANDOM(1, #HITPLAYERSOUNDS)], PART, 1, (math.random(8,12)/10))
  377. CreateSound(HITPLAYERSOUNDS[MRANDOM(1, #HITPLAYERSOUNDS)], PART, 1, (math.random(8,12)/10))
  378. CreateSound(HITPLAYERSOUNDS[MRANDOM(1, #HITPLAYERSOUNDS)], PART, 1, (math.random(8,12)/10))
  379. local prtcl = asd:Clone()
  380. prtcl.Parent = PART
  381. prtcl:Emit(amount*10)
  382. end
  383.  
  384. --//=================================\\
  385. --|| SAZERENOS' ARTIFICIAL HEARTBEAT
  386. --\\=================================//
  387.  
  388. ArtificialHB = Instance.new("BindableEvent", script)
  389. ArtificialHB.Name = "ArtificialHB"
  390.  
  391. script:WaitForChild("ArtificialHB")
  392.  
  393. frame = Frame_Speed
  394. tf = 0
  395. allowframeloss = false
  396. tossremainder = false
  397. lastframe = tick()
  398. script.ArtificialHB:Fire()
  399.  
  400. game:GetService("RunService").Heartbeat:connect(function(s, p)
  401. tf = tf + s
  402. if tf >= frame then
  403. if allowframeloss then
  404. script.ArtificialHB:Fire()
  405. lastframe = tick()
  406. else
  407. for i = 1, math.floor(tf / frame) do
  408. script.ArtificialHB:Fire()
  409. end
  410. lastframe = tick()
  411. end
  412. if tossremainder then
  413. tf = 0
  414. else
  415. tf = tf - frame * math.floor(tf / frame)
  416. end
  417. end
  418. end)
  419.  
  420. --//=================================\\
  421. --\\=================================//
  422. ff = Instance.new("ForceField", game.Players.LocalPlayer.Character)
  423. ff.Visible = false
  424. Humanoid.Name = "God Mode"
  425.  
  426. local l = game.Lighting
  427. local sky = Instance.new("Sky",l)
  428. l.TimeOfDay = "00:00:00"
  429. l.Brightness = 1
  430. l.Ambient = Color3.new(0.25, 0.5, 0.75)
  431. ---
  432.  
  433.  
  434.  
  435. --//=================================\\
  436. --|| SOME FUNCTIONS
  437. --\\=================================//
  438. function Raycast(POSITION, DIRECTION, RANGE, IGNOREDECENDANTS)
  439. return workspace:FindPartOnRay(Ray.new(POSITION, DIRECTION.unit * RANGE), IGNOREDECENDANTS)
  440. end
  441.  
  442. function PositiveAngle(NUMBER)
  443. if NUMBER >= 0 then
  444. NUMBER = 0
  445. end
  446. return NUMBER
  447. end
  448.  
  449. function NegativeAngle(NUMBER)
  450. if NUMBER <= 0 then
  451. NUMBER = 0
  452. end
  453. return NUMBER
  454. end
  455.  
  456. function Swait(NUMBER)
  457. if NUMBER == 0 or NUMBER == nil then
  458. ArtificialHB.Event:wait()
  459. else
  460. for i = 1, NUMBER do
  461. ArtificialHB.Event:wait()
  462. end
  463. end
  464. end
  465.  
  466. function CreateMesh(MESH, PARENT, MESHTYPE, MESHID, TEXTUREID, SCALE, OFFSET)
  467. local NEWMESH = IT(MESH)
  468. if MESH == "SpecialMesh" then
  469. NEWMESH.MeshType = MESHTYPE
  470. if MESHID ~= "nil" and MESHID ~= "" then
  471. NEWMESH.MeshId = "http://www.roblox.com/asset/?id="..MESHID
  472. end
  473. if TEXTUREID ~= "nil" and TEXTUREID ~= "" then
  474. NEWMESH.TextureId = "http://www.roblox.com/asset/?id="..TEXTUREID
  475. end
  476. end
  477. NEWMESH.Offset = OFFSET or VT(0, 0, 0)
  478. NEWMESH.Scale = SCALE
  479. NEWMESH.Parent = PARENT
  480. return NEWMESH
  481. end
  482.  
  483. function CreatePart(FORMFACTOR, PARENT, MATERIAL, REFLECTANCE, TRANSPARENCY, BRICKCOLOR, NAME, SIZE, ANCHOR)
  484. local NEWPART = IT("Part")
  485. NEWPART.formFactor = FORMFACTOR
  486. NEWPART.Reflectance = REFLECTANCE
  487. NEWPART.Transparency = TRANSPARENCY
  488. NEWPART.CanCollide = false
  489. NEWPART.Locked = true
  490. NEWPART.Anchored = true
  491. if ANCHOR == false then
  492. NEWPART.Anchored = false
  493. end
  494. NEWPART.BrickColor = BRICKC(tostring(BRICKCOLOR))
  495. NEWPART.Name = NAME
  496. NEWPART.Size = SIZE
  497. NEWPART.Position = Torso.Position
  498. NEWPART.Material = MATERIAL
  499. NEWPART:BreakJoints()
  500. NEWPART.Parent = PARENT
  501. return NEWPART
  502. end
  503.  
  504. local function weldBetween(a, b)
  505. local weldd = Instance.new("ManualWeld")
  506. weldd.Part0 = a
  507. weldd.Part1 = b
  508. weldd.C0 = CFrame.new()
  509. weldd.C1 = b.CFrame:inverse() * a.CFrame
  510. weldd.Parent = a
  511. return weldd
  512. end
  513.  
  514.  
  515. function QuaternionFromCFrame(cf)
  516. local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components()
  517. local trace = m00 + m11 + m22
  518. if trace > 0 then
  519. local s = math.sqrt(1 + trace)
  520. local recip = 0.5 / s
  521. return (m21 - m12) * recip, (m02 - m20) * recip, (m10 - m01) * recip, s * 0.5
  522. else
  523. local i = 0
  524. if m11 > m00 then
  525. i = 1
  526. end
  527. if m22 > (i == 0 and m00 or m11) then
  528. i = 2
  529. end
  530. if i == 0 then
  531. local s = math.sqrt(m00 - m11 - m22 + 1)
  532. local recip = 0.5 / s
  533. return 0.5 * s, (m10 + m01) * recip, (m20 + m02) * recip, (m21 - m12) * recip
  534. elseif i == 1 then
  535. local s = math.sqrt(m11 - m22 - m00 + 1)
  536. local recip = 0.5 / s
  537. return (m01 + m10) * recip, 0.5 * s, (m21 + m12) * recip, (m02 - m20) * recip
  538. elseif i == 2 then
  539. local s = math.sqrt(m22 - m00 - m11 + 1)
  540. local recip = 0.5 / s return (m02 + m20) * recip, (m12 + m21) * recip, 0.5 * s, (m10 - m01) * recip
  541. end
  542. end
  543. end
  544.  
  545. function QuaternionToCFrame(px, py, pz, x, y, z, w)
  546. local xs, ys, zs = x + x, y + y, z + z
  547. local wx, wy, wz = w * xs, w * ys, w * zs
  548. local xx = x * xs
  549. local xy = x * ys
  550. local xz = x * zs
  551. local yy = y * ys
  552. local yz = y * zs
  553. local zz = z * zs
  554. 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))
  555. end
  556.  
  557. function QuaternionSlerp(a, b, t)
  558. local cosTheta = a[1] * b[1] + a[2] * b[2] + a[3] * b[3] + a[4] * b[4]
  559. local startInterp, finishInterp;
  560. if cosTheta >= 0.0001 then
  561. if (1 - cosTheta) > 0.0001 then
  562. local theta = ACOS(cosTheta)
  563. local invSinTheta = 1 / SIN(theta)
  564. startInterp = SIN((1 - t) * theta) * invSinTheta
  565. finishInterp = SIN(t * theta) * invSinTheta
  566. else
  567. startInterp = 1 - t
  568. finishInterp = t
  569. end
  570. else
  571. if (1 + cosTheta) > 0.0001 then
  572. local theta = ACOS(-cosTheta)
  573. local invSinTheta = 1 / SIN(theta)
  574. startInterp = SIN((t - 1) * theta) * invSinTheta
  575. finishInterp = SIN(t * theta) * invSinTheta
  576. else
  577. startInterp = t - 1
  578. finishInterp = t
  579. end
  580. end
  581. 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
  582. end
  583.  
  584. function Clerp(a, b, t)
  585. local qa = {QuaternionFromCFrame(a)}
  586. local qb = {QuaternionFromCFrame(b)}
  587. local ax, ay, az = a.x, a.y, a.z
  588. local bx, by, bz = b.x, b.y, b.z
  589. local _t = 1 - t
  590. return QuaternionToCFrame(_t * ax + t * bx, _t * ay + t * by, _t * az + t * bz, QuaternionSlerp(qa, qb, t))
  591. end
  592.  
  593. function CreateFrame(PARENT, TRANSPARENCY, BORDERSIZEPIXEL, POSITION, SIZE, COLOR, BORDERCOLOR, NAME)
  594. local frame = IT("Frame")
  595. frame.BackgroundTransparency = TRANSPARENCY
  596. frame.BorderSizePixel = BORDERSIZEPIXEL
  597. frame.Position = POSITION
  598. frame.Size = SIZE
  599. frame.BackgroundColor3 = COLOR
  600. frame.BorderColor3 = BORDERCOLOR
  601. frame.Name = NAME
  602. frame.Parent = PARENT
  603. return frame
  604. end
  605.  
  606. function CreateLabel(PARENT, TEXT, TEXTCOLOR, TEXTFONTSIZE, TEXTFONT, TRANSPARENCY, BORDERSIZEPIXEL, STROKETRANSPARENCY, NAME)
  607. local label = IT("TextLabel")
  608. label.BackgroundTransparency = 1
  609. label.Size = UD2(1, 0, 1, 0)
  610. label.Position = UD2(0, 0, 0, 0)
  611. label.TextColor3 = TEXTCOLOR
  612. label.TextStrokeTransparency = STROKETRANSPARENCY
  613. label.TextTransparency = TRANSPARENCY
  614. label.FontSize = TEXTFONTSIZE
  615. label.Font = TEXTFONT
  616. label.BorderSizePixel = BORDERSIZEPIXEL
  617. label.TextStrokeColor3 = C3(1,1,1)
  618. label.TextScaled = false
  619. label.Text = TEXT
  620. label.Name = NAME
  621. label.Parent = PARENT
  622. return label
  623. end
  624.  
  625. function NoOutlines(PART)
  626. PART.TopSurface, PART.BottomSurface, PART.LeftSurface, PART.RightSurface, PART.FrontSurface, PART.BackSurface = 10, 10, 10, 10, 10, 10
  627. end
  628.  
  629. function CreateWeldOrSnapOrMotor(TYPE, PARENT, PART0, PART1, C0, C1)
  630. local NEWWELD = IT(TYPE)
  631. NEWWELD.Part0 = PART0
  632. NEWWELD.Part1 = PART1
  633. NEWWELD.C0 = C0
  634. NEWWELD.C1 = C1
  635. NEWWELD.Parent = PARENT
  636. return NEWWELD
  637. end
  638.  
  639. local S = IT("Sound")
  640. function CreateSound(ID, PARENT, VOLUME, PITCH, DOESLOOP)
  641. local NEWSOUND = nil
  642. coroutine.resume(coroutine.create(function()
  643. NEWSOUND = S:Clone()
  644. NEWSOUND.Parent = PARENT
  645. NEWSOUND.Volume = VOLUME
  646. NEWSOUND.Pitch = PITCH
  647. NEWSOUND.SoundId = "http://www.roblox.com/asset/?id="..ID
  648. NEWSOUND:play()
  649. if DOESLOOP == true then
  650. NEWSOUND.Looped = true
  651. else
  652. repeat wait(1) until NEWSOUND.Playing == false
  653. NEWSOUND:remove()
  654. end
  655. end))
  656. return NEWSOUND
  657. end
  658.  
  659. function CFrameFromTopBack(at, top, back)
  660. local right = top:Cross(back)
  661. 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)
  662. end
  663.  
  664. --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})
  665. function WACKYEFFECT(Table)
  666. local TYPE = (Table.EffectType or "Sphere")
  667. local SIZE = (Table.Size or VT(1,1,1))
  668. local ENDSIZE = (Table.Size2 or VT(0,0,0))
  669. local TRANSPARENCY = (Table.Transparency or 0)
  670. local ENDTRANSPARENCY = (Table.Transparency2 or 1)
  671. local CFRAME = (Table.CFrame or Torso.CFrame)
  672. local MOVEDIRECTION = (Table.MoveToPos or nil)
  673. local ROTATION1 = (Table.RotationX or 0)
  674. local ROTATION2 = (Table.RotationY or 0)
  675. local ROTATION3 = (Table.RotationZ or 0)
  676. local MATERIAL = (Table.Material or "Neon")
  677. local COLOR = (Table.Color or C3(1,1,1))
  678. local TIME = (Table.Time or 45)
  679. local SOUNDID = (Table.SoundID or nil)
  680. local SOUNDPITCH = (Table.SoundPitch or nil)
  681. local SOUNDVOLUME = (Table.SoundVolume or nil)
  682. coroutine.resume(coroutine.create(function()
  683. local PLAYSSOUND = false
  684. local SOUND = nil
  685. local EFFECT = CreatePart(3, Effects, MATERIAL, 0, TRANSPARENCY, BRICKC("Pearl"), "Effect", VT(1,1,1), true)
  686. if SOUNDID ~= nil and SOUNDPITCH ~= nil and SOUNDVOLUME ~= nil then
  687. PLAYSSOUND = true
  688. SOUND = CreateSound(SOUNDID, EFFECT, SOUNDVOLUME, SOUNDPITCH, false)
  689. end
  690. EFFECT.Color = COLOR
  691. local MSH = nil
  692. if TYPE == "Sphere" then
  693. MSH = CreateMesh("SpecialMesh", EFFECT, "Sphere", "", "", SIZE, VT(0,0,0))
  694. elseif TYPE == "Block" then
  695. MSH = IT("BlockMesh",EFFECT)
  696. MSH.Scale = VT(SIZE.X,SIZE.X,SIZE.X)
  697. elseif TYPE == "Wave" then
  698. MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "20329976", "", SIZE, VT(0,0,-SIZE.X/8))
  699. elseif TYPE == "Ring" then
  700. MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "559831844", "", VT(SIZE.X,SIZE.X,0.1), VT(0,0,0))
  701. elseif TYPE == "Slash" then
  702. MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "662586858", "", VT(SIZE.X/10,0,SIZE.X/10), VT(0,0,0))
  703. elseif TYPE == "Round Slash" then
  704. MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "662585058", "", VT(SIZE.X/10,0,SIZE.X/10), VT(0,0,0))
  705. elseif TYPE == "Swirl" then
  706. MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "1051557", "", SIZE, VT(0,0,0))
  707. elseif TYPE == "Skull" then
  708. MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "4770583", "", SIZE, VT(0,0,0))
  709. elseif TYPE == "Crystal" then
  710. MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "9756362", "", SIZE, VT(0,0,0))
  711. end
  712. if MSH ~= nil then
  713. local MOVESPEED = nil
  714. if MOVEDIRECTION ~= nil then
  715. MOVESPEED = (CFRAME.p - MOVEDIRECTION).Magnitude/TIME
  716. end
  717. local GROWTH = SIZE - ENDSIZE
  718. local TRANS = TRANSPARENCY - ENDTRANSPARENCY
  719. if TYPE == "Block" then
  720. EFFECT.CFrame = CFRAME*ANGLES(RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)))
  721. else
  722. EFFECT.CFrame = CFRAME
  723. end
  724. for LOOP = 1, TIME+1 do
  725. Swait()
  726. MSH.Scale = MSH.Scale - GROWTH/TIME
  727. if TYPE == "Wave" then
  728. MSH.Offset = VT(0,0,-MSH.Scale.X/8)
  729. end
  730. EFFECT.Transparency = EFFECT.Transparency - TRANS/TIME
  731. if TYPE == "Block" then
  732. EFFECT.CFrame = CFRAME*ANGLES(RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)))
  733. else
  734. EFFECT.CFrame = EFFECT.CFrame*ANGLES(RAD(ROTATION1),RAD(ROTATION2),RAD(ROTATION3))
  735. end
  736. if MOVEDIRECTION ~= nil then
  737. local ORI = EFFECT.Orientation
  738. EFFECT.CFrame = CF(EFFECT.Position,MOVEDIRECTION)*CF(0,0,-MOVESPEED)
  739. EFFECT.Orientation = ORI
  740. end
  741. end
  742. if PLAYSSOUND == false then
  743. EFFECT:remove()
  744. else
  745. repeat Swait() until SOUND.Playing == false
  746. EFFECT:remove()
  747. end
  748. else
  749. if PLAYSSOUND == false then
  750. EFFECT:remove()
  751. else
  752. repeat Swait() until SOUND.Playing == false
  753. EFFECT:remove()
  754. end
  755. end
  756. end))
  757. end
  758.  
  759. function MakeForm(PART,TYPE)
  760. if TYPE == "Cyl" then
  761. local MSH = IT("CylinderMesh",PART)
  762. elseif TYPE == "Ball" then
  763. local MSH = IT("SpecialMesh",PART)
  764. MSH.MeshType = "Sphere"
  765. elseif TYPE == "Wedge" then
  766. local MSH = IT("SpecialMesh",PART)
  767. MSH.MeshType = "Wedge"
  768. end
  769. end
  770.  
  771. Debris = game:GetService("Debris")
  772.  
  773. function CastProperRay(StartPos, EndPos, Distance, Ignore)
  774. local DIRECTION = CF(StartPos,EndPos).lookVector
  775. return Raycast(StartPos, DIRECTION, Distance, Ignore)
  776. end
  777.  
  778. function turnto(position)
  779. RootPart.CFrame=CFrame.new(RootPart.CFrame.p,VT(position.X,RootPart.Position.Y,position.Z)) * CFrame.new(0, 0, 0)
  780. end
  781.  
  782. function Raycast(POSITION, DIRECTION, RANGE, IGNOREDECENDANTS)
  783. return workspace:FindPartOnRay(Ray.new(POSITION, DIRECTION.unit * RANGE), IGNOREDECENDANTS)
  784. end
  785.  
  786. function PositiveAngle(NUMBER)
  787. if NUMBER >= 0 then
  788. NUMBER = 0
  789. end
  790. return NUMBER
  791. end
  792.  
  793. function NegativeAngle(NUMBER)
  794. if NUMBER <= 0 then
  795. NUMBER = 0
  796. end
  797. return NUMBER
  798. end
  799.  
  800. function Swait(NUMBER)
  801. if NUMBER == 0 or NUMBER == nil then
  802. ArtificialHB.Event:wait()
  803. else
  804. for i = 1, NUMBER do
  805. ArtificialHB.Event:wait()
  806. end
  807. end
  808. end
  809.  
  810. function CreateMesh(MESH, PARENT, MESHTYPE, MESHID, TEXTUREID, SCALE, OFFSET)
  811. local NEWMESH = IT(MESH)
  812. if MESH == "SpecialMesh" then
  813. NEWMESH.MeshType = MESHTYPE
  814. if MESHID ~= "nil" and MESHID ~= "" then
  815. NEWMESH.MeshId = "http://www.roblox.com/asset/?id="..MESHID
  816. end
  817. if TEXTUREID ~= "nil" and TEXTUREID ~= "" then
  818. NEWMESH.TextureId = "http://www.roblox.com/asset/?id="..TEXTUREID
  819. end
  820. end
  821. NEWMESH.Offset = OFFSET or VT(0, 0, 0)
  822. NEWMESH.Scale = SCALE
  823. NEWMESH.Parent = PARENT
  824. return NEWMESH
  825. end
  826.  
  827. function CreatePart(FORMFACTOR, PARENT, MATERIAL, REFLECTANCE, TRANSPARENCY, BRICKCOLOR, NAME, SIZE, ANCHOR)
  828. local NEWPART = IT("Part")
  829. NEWPART.formFactor = FORMFACTOR
  830. NEWPART.Reflectance = REFLECTANCE
  831. NEWPART.Transparency = TRANSPARENCY
  832. NEWPART.CanCollide = false
  833. NEWPART.Locked = true
  834. NEWPART.Anchored = true
  835. if ANCHOR == false then
  836. NEWPART.Anchored = false
  837. end
  838. NEWPART.BrickColor = BRICKC(tostring(BRICKCOLOR))
  839. NEWPART.Name = NAME
  840. NEWPART.Size = SIZE
  841. NEWPART.Position = Torso.Position
  842. NEWPART.Material = MATERIAL
  843. NEWPART:BreakJoints()
  844. NEWPART.Parent = PARENT
  845. return NEWPART
  846. end
  847.  
  848. local function weldBetween(a, b)
  849. local weldd = Instance.new("ManualWeld")
  850. weldd.Part0 = a
  851. weldd.Part1 = b
  852. weldd.C0 = CFrame.new()
  853. weldd.C1 = b.CFrame:inverse() * a.CFrame
  854. weldd.Parent = a
  855. return weldd
  856. end
  857.  
  858.  
  859. function QuaternionFromCFrame(cf)
  860. local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components()
  861. local trace = m00 + m11 + m22
  862. if trace > 0 then
  863. local s = math.sqrt(1 + trace)
  864. local recip = 0.5 / s
  865. return (m21 - m12) * recip, (m02 - m20) * recip, (m10 - m01) * recip, s * 0.5
  866. else
  867. local i = 0
  868. if m11 > m00 then
  869. i = 1
  870. end
  871. if m22 > (i == 0 and m00 or m11) then
  872. i = 2
  873. end
  874. if i == 0 then
  875. local s = math.sqrt(m00 - m11 - m22 + 1)
  876. local recip = 0.5 / s
  877. return 0.5 * s, (m10 + m01) * recip, (m20 + m02) * recip, (m21 - m12) * recip
  878. elseif i == 1 then
  879. local s = math.sqrt(m11 - m22 - m00 + 1)
  880. local recip = 0.5 / s
  881. return (m01 + m10) * recip, 0.5 * s, (m21 + m12) * recip, (m02 - m20) * recip
  882. elseif i == 2 then
  883. local s = math.sqrt(m22 - m00 - m11 + 1)
  884. local recip = 0.5 / s return (m02 + m20) * recip, (m12 + m21) * recip, 0.5 * s, (m10 - m01) * recip
  885. end
  886. end
  887. end
  888.  
  889. function QuaternionToCFrame(px, py, pz, x, y, z, w)
  890. local xs, ys, zs = x + x, y + y, z + z
  891. local wx, wy, wz = w * xs, w * ys, w * zs
  892. local xx = x * xs
  893. local xy = x * ys
  894. local xz = x * zs
  895. local yy = y * ys
  896. local yz = y * zs
  897. local zz = z * zs
  898. 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))
  899. end
  900.  
  901. function QuaternionSlerp(a, b, t)
  902. local cosTheta = a[1] * b[1] + a[2] * b[2] + a[3] * b[3] + a[4] * b[4]
  903. local startInterp, finishInterp;
  904. if cosTheta >= 0.0001 then
  905. if (1 - cosTheta) > 0.0001 then
  906. local theta = ACOS(cosTheta)
  907. local invSinTheta = 1 / SIN(theta)
  908. startInterp = SIN((1 - t) * theta) * invSinTheta
  909. finishInterp = SIN(t * theta) * invSinTheta
  910. else
  911. startInterp = 1 - t
  912. finishInterp = t
  913. end
  914. else
  915. if (1 + cosTheta) > 0.0001 then
  916. local theta = ACOS(-cosTheta)
  917. local invSinTheta = 1 / SIN(theta)
  918. startInterp = SIN((t - 1) * theta) * invSinTheta
  919. finishInterp = SIN(t * theta) * invSinTheta
  920. else
  921. startInterp = t - 1
  922. finishInterp = t
  923. end
  924. end
  925. 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
  926. end
  927.  
  928. function Clerp(a, b, t)
  929. local qa = {QuaternionFromCFrame(a)}
  930. local qb = {QuaternionFromCFrame(b)}
  931. local ax, ay, az = a.x, a.y, a.z
  932. local bx, by, bz = b.x, b.y, b.z
  933. local _t = 1 - t
  934. return QuaternionToCFrame(_t * ax + t * bx, _t * ay + t * by, _t * az + t * bz, QuaternionSlerp(qa, qb, t))
  935. end
  936.  
  937. function CreateFrame(PARENT, TRANSPARENCY, BORDERSIZEPIXEL, POSITION, SIZE, COLOR, BORDERCOLOR, NAME)
  938. local frame = IT("Frame")
  939. frame.BackgroundTransparency = TRANSPARENCY
  940. frame.BorderSizePixel = BORDERSIZEPIXEL
  941. frame.Position = POSITION
  942. frame.Size = SIZE
  943. frame.BackgroundColor3 = COLOR
  944. frame.BorderColor3 = BORDERCOLOR
  945. frame.Name = NAME
  946. frame.Parent = PARENT
  947. return frame
  948. end
  949.  
  950. function CreateLabel(PARENT, TEXT, TEXTCOLOR, TEXTFONTSIZE, TEXTFONT, TRANSPARENCY, BORDERSIZEPIXEL, STROKETRANSPARENCY, NAME)
  951. local label = IT("TextLabel")
  952. label.BackgroundTransparency = 1
  953. label.Size = UD2(1, 0, 1, 0)
  954. label.Position = UD2(0, 0, 0, 0)
  955. label.TextColor3 = TEXTCOLOR
  956. label.TextStrokeTransparency = STROKETRANSPARENCY
  957. label.TextTransparency = TRANSPARENCY
  958. label.FontSize = TEXTFONTSIZE
  959. label.Font = TEXTFONT
  960. label.BorderSizePixel = BORDERSIZEPIXEL
  961. label.TextScaled = false
  962. label.Text = TEXT
  963. label.Name = NAME
  964. label.Parent = PARENT
  965. return label
  966. end
  967.  
  968. function NoOutlines(PART)
  969. PART.TopSurface, PART.BottomSurface, PART.LeftSurface, PART.RightSurface, PART.FrontSurface, PART.BackSurface = 10, 10, 10, 10, 10, 10
  970. end
  971.  
  972. function CreateWeldOrSnapOrMotor(TYPE, PARENT, PART0, PART1, C0, C1)
  973. local NEWWELD = IT(TYPE)
  974. NEWWELD.Part0 = PART0
  975. NEWWELD.Part1 = PART1
  976. NEWWELD.C0 = C0
  977. NEWWELD.C1 = C1
  978. NEWWELD.Parent = PARENT
  979. return NEWWELD
  980. end
  981.  
  982. local S = IT("Sound")
  983. function CreateSound(ID, PARENT, VOLUME, PITCH, DOESLOOP)
  984. local NEWSOUND = nil
  985. coroutine.resume(coroutine.create(function()
  986. NEWSOUND = S:Clone()
  987. NEWSOUND.Parent = PARENT
  988. NEWSOUND.Volume = VOLUME
  989. NEWSOUND.Pitch = PITCH
  990. NEWSOUND.SoundId = "http://www.roblox.com/asset/?id="..ID
  991. NEWSOUND:play()
  992. if DOESLOOP == true then
  993. NEWSOUND.Looped = true
  994. else
  995. repeat wait(1) until NEWSOUND.Playing == false
  996. NEWSOUND:remove()
  997. end
  998. end))
  999. return NEWSOUND
  1000. end
  1001.  
  1002. function CFrameFromTopBack(at, top, back)
  1003. local right = top:Cross(back)
  1004. 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)
  1005. end
  1006.  
  1007. --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})
  1008. function WACKYEFFECT(Table)
  1009. local TYPE = (Table.EffectType or "Sphere")
  1010. local SIZE = (Table.Size or VT(1,1,1))
  1011. local ENDSIZE = (Table.Size2 or VT(0,0,0))
  1012. local TRANSPARENCY = (Table.Transparency or 0)
  1013. local ENDTRANSPARENCY = (Table.Transparency2 or 1)
  1014. local CFRAME = (Table.CFrame or Torso.CFrame)
  1015. local MOVEDIRECTION = (Table.MoveToPos or nil)
  1016. local ROTATION1 = (Table.RotationX or 0)
  1017. local ROTATION2 = (Table.RotationY or 0)
  1018. local ROTATION3 = (Table.RotationZ or 0)
  1019. local MATERIAL = (Table.Material or "Neon")
  1020. local COLOR = (Table.Color or C3(1,1,1))
  1021. local TIME = (Table.Time or 45)
  1022. local SOUNDID = (Table.SoundID or nil)
  1023. local SOUNDPITCH = (Table.SoundPitch or nil)
  1024. local SOUNDVOLUME = (Table.SoundVolume or nil)
  1025. coroutine.resume(coroutine.create(function()
  1026. local PLAYSSOUND = false
  1027. local SOUND = nil
  1028. local EFFECT = CreatePart(3, Effects, MATERIAL, 0, TRANSPARENCY, BRICKC("Pearl"), "Effect", VT(1,1,1), true)
  1029. if SOUNDID ~= nil and SOUNDPITCH ~= nil and SOUNDVOLUME ~= nil then
  1030. PLAYSSOUND = true
  1031. SOUND = CreateSound(SOUNDID, EFFECT, SOUNDVOLUME, SOUNDPITCH, false)
  1032. end
  1033. EFFECT.Color = COLOR
  1034. local MSH = nil
  1035. if TYPE == "Sphere" then
  1036. MSH = CreateMesh("SpecialMesh", EFFECT, "Sphere", "", "", SIZE, VT(0,0,0))
  1037. elseif TYPE == "Block" then
  1038. MSH = IT("BlockMesh",EFFECT)
  1039. MSH.Scale = VT(SIZE.X,SIZE.X,SIZE.X)
  1040. elseif TYPE == "Wave" then
  1041. MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "20329976", "", SIZE, VT(0,0,-SIZE.X/8))
  1042. elseif TYPE == "Ring" then
  1043. MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "559831844", "", VT(SIZE.X,SIZE.X,0.1), VT(0,0,0))
  1044. elseif TYPE == "Slash" then
  1045. MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "662586858", "", VT(SIZE.X/10,0,SIZE.X/10), VT(0,0,0))
  1046. elseif TYPE == "Round Slash" then
  1047. MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "662585058", "", VT(SIZE.X/10,0,SIZE.X/10), VT(0,0,0))
  1048. elseif TYPE == "Swirl" then
  1049. MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "1051557", "", SIZE, VT(0,0,0))
  1050. elseif TYPE == "Skull" then
  1051. MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "4770583", "", SIZE, VT(0,0,0))
  1052. elseif TYPE == "Crystal" then
  1053. MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "9756362", "", SIZE, VT(0,0,0))
  1054. end
  1055. if MSH ~= nil then
  1056. local MOVESPEED = nil
  1057. if MOVEDIRECTION ~= nil then
  1058. MOVESPEED = (CFRAME.p - MOVEDIRECTION).Magnitude/TIME
  1059. end
  1060. local GROWTH = SIZE - ENDSIZE
  1061. local TRANS = TRANSPARENCY - ENDTRANSPARENCY
  1062. if TYPE == "Block" then
  1063. EFFECT.CFrame = CFRAME*ANGLES(RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)))
  1064. else
  1065. EFFECT.CFrame = CFRAME
  1066. end
  1067. for LOOP = 1, TIME+1 do
  1068. Swait()
  1069. MSH.Scale = MSH.Scale - GROWTH/TIME
  1070. if TYPE == "Wave" then
  1071. MSH.Offset = VT(0,0,-MSH.Scale.X/8)
  1072. end
  1073. EFFECT.Transparency = EFFECT.Transparency - TRANS/TIME
  1074. if TYPE == "Block" then
  1075. EFFECT.CFrame = CFRAME*ANGLES(RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)))
  1076. else
  1077. EFFECT.CFrame = EFFECT.CFrame*ANGLES(RAD(ROTATION1),RAD(ROTATION2),RAD(ROTATION3))
  1078. end
  1079. if MOVEDIRECTION ~= nil then
  1080. local ORI = EFFECT.Orientation
  1081. EFFECT.CFrame = CF(EFFECT.Position,MOVEDIRECTION)*CF(0,0,-MOVESPEED)
  1082. EFFECT.Orientation = ORI
  1083. end
  1084. end
  1085. if PLAYSSOUND == false then
  1086. EFFECT:remove()
  1087. else
  1088. SOUND.Stopped:Connect(function()
  1089. EFFECT:remove()
  1090. end)
  1091. end
  1092. else
  1093. if PLAYSSOUND == false then
  1094. EFFECT:remove()
  1095. else
  1096. repeat Swait() until SOUND.Playing == false
  1097. EFFECT:remove()
  1098. end
  1099. end
  1100. end))
  1101. end
  1102.  
  1103. function MakeForm(PART,TYPE)
  1104. if TYPE == "Cyl" then
  1105. local MSH = IT("CylinderMesh",PART)
  1106. elseif TYPE == "Ball" then
  1107. local MSH = IT("SpecialMesh",PART)
  1108. MSH.MeshType = "Sphere"
  1109. elseif TYPE == "Wedge" then
  1110. local MSH = IT("SpecialMesh",PART)
  1111. MSH.MeshType = "Wedge"
  1112. end
  1113. end
  1114.  
  1115. Debris = game:GetService("Debris")
  1116.  
  1117. function CastProperRay(StartPos, EndPos, Distance, Ignore)
  1118. local DIRECTION = CF(StartPos,EndPos).lookVector
  1119. return Raycast(StartPos, DIRECTION, Distance, Ignore)
  1120. end
  1121.  
  1122. local EyeSizes={
  1123. NumberSequenceKeypoint.new(0,1,0),
  1124. NumberSequenceKeypoint.new(1,0,0)
  1125. }
  1126. local EyeTrans={
  1127. NumberSequenceKeypoint.new(0,0.8,0),
  1128. NumberSequenceKeypoint.new(1,1,0)
  1129. }
  1130. local PE=Instance.new("ParticleEmitter",nil)
  1131. PE.LightEmission=.8
  1132. PE.Color = ColorSequence.new(BRICKC("Black").Color)
  1133. PE.Size=NumberSequence.new(EyeSizes)
  1134. PE.Transparency=NumberSequence.new(EyeTrans)
  1135. PE.Lifetime=NumberRange.new(0.35,1.5)
  1136. PE.Rotation=NumberRange.new(0,360)
  1137. PE.Rate=999
  1138. PE.VelocitySpread = 10000
  1139. PE.Acceleration = Vector3.new(0,0,0)
  1140. PE.Drag = 5
  1141. PE.Speed = NumberRange.new(0,0,0)
  1142. PE.Texture="http://www.roblox.com/asset/?id=1351966707"
  1143. PE.ZOffset = -0
  1144. PE.Name = "PE"
  1145. PE.Enabled = false
  1146.  
  1147. function particles(art)
  1148. local PARTICLES = PE:Clone()
  1149. PARTICLES.Parent = art
  1150. end
  1151.  
  1152. function CreateDebreeRing(FLOOR,POSITION,SIZE,BLOCKSIZE,SWAIT)
  1153. if FLOOR ~= nil then
  1154. coroutine.resume(coroutine.create(function()
  1155. local PART = CreatePart(3, Effects, "Plastic", 0, 1, "Pearl", "DebreeCenter", VT(0,0,0))
  1156. PART.CFrame = CF(POSITION)
  1157. for i = 1, 45 do
  1158. local RingPiece = CreatePart(3, Effects, "Plastic", 0, 0, "Pearl", "DebreePart", BLOCKSIZE)
  1159. RingPiece.Material = FLOOR.Material
  1160. RingPiece.Color = FLOOR.Color
  1161. RingPiece.CFrame = PART.CFrame * ANGLES(RAD(0), RAD(i*8), RAD(0)) * CF(SIZE, 0, 0) * ANGLES(RAD(MRANDOM(-360,360)),RAD(MRANDOM(-360,360)),RAD(MRANDOM(-360,360)))
  1162. Debris:AddItem(RingPiece,SWAIT)
  1163. end
  1164. PART:remove()
  1165. end))
  1166. end
  1167. end
  1168.  
  1169. function CreateFlyingDebree(FLOOR,POSITION,AMOUNT,BLOCKSIZE,SWAIT,STRENGTH)
  1170. if FLOOR ~= nil then
  1171. for i = 1, AMOUNT do
  1172. local DEBREE = CreatePart(3, Effects, "Neon", FLOOR.Reflectance, FLOOR.Transparency, "Peal", "Debree", BLOCKSIZE, false)
  1173. DEBREE.Material = FLOOR.Material
  1174. DEBREE.Color = FLOOR.Color
  1175. DEBREE.CFrame = POSITION * ANGLES(RAD(MRANDOM(-360,360)),RAD(MRANDOM(-360,360)),RAD(MRANDOM(-360,360)))
  1176. DEBREE.Velocity = VT(MRANDOM(-STRENGTH,STRENGTH),MRANDOM(-STRENGTH,STRENGTH),MRANDOM(-STRENGTH,STRENGTH))
  1177. coroutine.resume(coroutine.create(function()
  1178. Swait(15)
  1179. DEBREE.Parent = workspace
  1180. DEBREE.CanCollide = true
  1181. Debris:AddItem(DEBREE,SWAIT)
  1182. end))
  1183. end
  1184. end
  1185. end
  1186.  
  1187. function Raycast(POSITION, DIRECTION, RANGE, IGNOREDECENDANTS)
  1188. return workspace:FindPartOnRay(Ray.new(POSITION, DIRECTION.unit * RANGE), IGNOREDECENDANTS)
  1189. end
  1190.  
  1191. function PositiveAngle(NUMBER)
  1192. if NUMBER >= 0 then
  1193. NUMBER = 0
  1194. end
  1195. return NUMBER
  1196. end
  1197.  
  1198. function NegativeAngle(NUMBER)
  1199. if NUMBER <= 0 then
  1200. NUMBER = 0
  1201. end
  1202. return NUMBER
  1203. end
  1204.  
  1205. function Swait(NUMBER)
  1206. if NUMBER == 0 or NUMBER == nil then
  1207. ArtificialHB.Event:wait()
  1208. else
  1209. for i = 1, NUMBER do
  1210. ArtificialHB.Event:wait()
  1211. end
  1212. end
  1213. end
  1214.  
  1215. function CreateMesh(MESH, PARENT, MESHTYPE, MESHID, TEXTUREID, SCALE, OFFSET)
  1216. local NEWMESH = IT(MESH)
  1217. if MESH == "SpecialMesh" then
  1218. NEWMESH.MeshType = MESHTYPE
  1219. if MESHID ~= "nil" and MESHID ~= "" then
  1220. NEWMESH.MeshId = "http://www.roblox.com/asset/?id="..MESHID
  1221. end
  1222. if TEXTUREID ~= "nil" and TEXTUREID ~= "" then
  1223. NEWMESH.TextureId = "http://www.roblox.com/asset/?id="..TEXTUREID
  1224. end
  1225. end
  1226. NEWMESH.Offset = OFFSET or VT(0, 0, 0)
  1227. NEWMESH.Scale = SCALE
  1228. NEWMESH.Parent = PARENT
  1229. return NEWMESH
  1230. end
  1231.  
  1232. function CreatePart(FORMFACTOR, PARENT, MATERIAL, REFLECTANCE, TRANSPARENCY, BRICKCOLOR, NAME, SIZE, ANCHOR)
  1233. local NEWPART = IT("Part")
  1234. NEWPART.formFactor = FORMFACTOR
  1235. NEWPART.Reflectance = REFLECTANCE
  1236. NEWPART.Transparency = TRANSPARENCY
  1237. NEWPART.CanCollide = false
  1238. NEWPART.Locked = true
  1239. NEWPART.Anchored = true
  1240. if ANCHOR == false then
  1241. NEWPART.Anchored = false
  1242. end
  1243. NEWPART.BrickColor = BRICKC(tostring(BRICKCOLOR))
  1244. NEWPART.Name = NAME
  1245. NEWPART.Size = SIZE
  1246. NEWPART.Position = Torso.Position
  1247. NEWPART.Material = MATERIAL
  1248. NEWPART:BreakJoints()
  1249. NEWPART.Parent = PARENT
  1250. return NEWPART
  1251. end
  1252.  
  1253. local function weldBetween(a, b)
  1254. local weldd = Instance.new("ManualWeld")
  1255. weldd.Part0 = a
  1256. weldd.Part1 = b
  1257. weldd.C0 = CFrame.new()
  1258. weldd.C1 = b.CFrame:inverse() * a.CFrame
  1259. weldd.Parent = a
  1260. return weldd
  1261. end
  1262.  
  1263.  
  1264. function QuaternionFromCFrame(cf)
  1265. local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components()
  1266. local trace = m00 + m11 + m22
  1267. if trace > 0 then
  1268. local s = math.sqrt(1 + trace)
  1269. local recip = 0.5 / s
  1270. return (m21 - m12) * recip, (m02 - m20) * recip, (m10 - m01) * recip, s * 0.5
  1271. else
  1272. local i = 0
  1273. if m11 > m00 then
  1274. i = 1
  1275. end
  1276. if m22 > (i == 0 and m00 or m11) then
  1277. i = 2
  1278. end
  1279. if i == 0 then
  1280. local s = math.sqrt(m00 - m11 - m22 + 1)
  1281. local recip = 0.5 / s
  1282. return 0.5 * s, (m10 + m01) * recip, (m20 + m02) * recip, (m21 - m12) * recip
  1283. elseif i == 1 then
  1284. local s = math.sqrt(m11 - m22 - m00 + 1)
  1285. local recip = 0.5 / s
  1286. return (m01 + m10) * recip, 0.5 * s, (m21 + m12) * recip, (m02 - m20) * recip
  1287. elseif i == 2 then
  1288. local s = math.sqrt(m22 - m00 - m11 + 1)
  1289. local recip = 0.5 / s return (m02 + m20) * recip, (m12 + m21) * recip, 0.5 * s, (m10 - m01) * recip
  1290. end
  1291. end
  1292. end
  1293.  
  1294. function QuaternionToCFrame(px, py, pz, x, y, z, w)
  1295. local xs, ys, zs = x + x, y + y, z + z
  1296. local wx, wy, wz = w * xs, w * ys, w * zs
  1297. local xx = x * xs
  1298. local xy = x * ys
  1299. local xz = x * zs
  1300. local yy = y * ys
  1301. local yz = y * zs
  1302. local zz = z * zs
  1303. 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))
  1304. end
  1305.  
  1306. function QuaternionSlerp(a, b, t)
  1307. local cosTheta = a[1] * b[1] + a[2] * b[2] + a[3] * b[3] + a[4] * b[4]
  1308. local startInterp, finishInterp;
  1309. if cosTheta >= 0.0001 then
  1310. if (1 - cosTheta) > 0.0001 then
  1311. local theta = ACOS(cosTheta)
  1312. local invSinTheta = 1 / SIN(theta)
  1313. startInterp = SIN((1 - t) * theta) * invSinTheta
  1314. finishInterp = SIN(t * theta) * invSinTheta
  1315. else
  1316. startInterp = 1 - t
  1317. finishInterp = t
  1318. end
  1319. else
  1320. if (1 + cosTheta) > 0.0001 then
  1321. local theta = ACOS(-cosTheta)
  1322. local invSinTheta = 1 / SIN(theta)
  1323. startInterp = SIN((t - 1) * theta) * invSinTheta
  1324. finishInterp = SIN(t * theta) * invSinTheta
  1325. else
  1326. startInterp = t - 1
  1327. finishInterp = t
  1328. end
  1329. end
  1330. 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
  1331. end
  1332.  
  1333. function Clerp(a, b, t)
  1334. local qa = {QuaternionFromCFrame(a)}
  1335. local qb = {QuaternionFromCFrame(b)}
  1336. local ax, ay, az = a.x, a.y, a.z
  1337. local bx, by, bz = b.x, b.y, b.z
  1338. local _t = 1 - t
  1339. return QuaternionToCFrame(_t * ax + t * bx, _t * ay + t * by, _t * az + t * bz, QuaternionSlerp(qa, qb, t))
  1340. end
  1341.  
  1342. function CreateFrame(PARENT, TRANSPARENCY, BORDERSIZEPIXEL, POSITION, SIZE, COLOR, BORDERCOLOR, NAME)
  1343. local frame = IT("Frame")
  1344. frame.BackgroundTransparency = TRANSPARENCY
  1345. frame.BorderSizePixel = BORDERSIZEPIXEL
  1346. frame.Position = POSITION
  1347. frame.Size = SIZE
  1348. frame.BackgroundColor3 = COLOR
  1349. frame.BorderColor3 = BORDERCOLOR
  1350. frame.Name = NAME
  1351. frame.Parent = PARENT
  1352. return frame
  1353. end
  1354.  
  1355. function CreateLabel(PARENT, TEXT, TEXTCOLOR, TEXTFONTSIZE, TEXTFONT, TRANSPARENCY, BORDERSIZEPIXEL, STROKETRANSPARENCY, NAME)
  1356. local label = IT("TextLabel")
  1357. label.BackgroundTransparency = 1
  1358. label.Size = UD2(1, 0, 1, 0)
  1359. label.Position = UD2(0, 0, 0, 0)
  1360. label.TextColor3 = TEXTCOLOR
  1361. label.TextStrokeTransparency = STROKETRANSPARENCY
  1362. label.TextTransparency = TRANSPARENCY
  1363. label.FontSize = TEXTFONTSIZE
  1364. label.Font = TEXTFONT
  1365. label.BorderSizePixel = BORDERSIZEPIXEL
  1366. label.TextScaled = false
  1367. label.Text = TEXT
  1368. label.Name = NAME
  1369. label.Parent = PARENT
  1370. return label
  1371. end
  1372.  
  1373. function NoOutlines(PART)
  1374. PART.TopSurface, PART.BottomSurface, PART.LeftSurface, PART.RightSurface, PART.FrontSurface, PART.BackSurface = 10, 10, 10, 10, 10, 10
  1375. end
  1376.  
  1377. function CreateWeldOrSnapOrMotor(TYPE, PARENT, PART0, PART1, C0, C1)
  1378. local NEWWELD = IT(TYPE)
  1379. NEWWELD.Part0 = PART0
  1380. NEWWELD.Part1 = PART1
  1381. NEWWELD.C0 = C0
  1382. NEWWELD.C1 = C1
  1383. NEWWELD.Parent = PARENT
  1384. return NEWWELD
  1385. end
  1386.  
  1387. local S = IT("Sound")
  1388. function CreateSound(ID, PARENT, VOLUME, PITCH, DOESLOOP)
  1389. local NEWSOUND = nil
  1390. coroutine.resume(coroutine.create(function()
  1391. NEWSOUND = S:Clone()
  1392. NEWSOUND.Parent = PARENT
  1393. NEWSOUND.Volume = VOLUME
  1394. NEWSOUND.Pitch = PITCH
  1395. NEWSOUND.SoundId = "http://www.roblox.com/asset/?id="..ID
  1396. NEWSOUND:play()
  1397. if DOESLOOP == true then
  1398. NEWSOUND.Looped = true
  1399. else
  1400. repeat wait(1) until NEWSOUND.Playing == false
  1401. NEWSOUND:remove()
  1402. end
  1403. end))
  1404. return NEWSOUND
  1405. end
  1406.  
  1407. function CFrameFromTopBack(at, top, back)
  1408. local right = top:Cross(back)
  1409. 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)
  1410. end
  1411.  
  1412. --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})
  1413. function WACKYEFFECT(Table)
  1414. local TYPE = (Table.EffectType or "Sphere")
  1415. local SIZE = (Table.Size or VT(1,1,1))
  1416. local ENDSIZE = (Table.Size2 or VT(0,0,0))
  1417. local TRANSPARENCY = (Table.Transparency or 0)
  1418. local ENDTRANSPARENCY = (Table.Transparency2 or 1)
  1419. local CFRAME = (Table.CFrame or Torso.CFrame)
  1420. local MOVEDIRECTION = (Table.MoveToPos or nil)
  1421. local ROTATION1 = (Table.RotationX or 0)
  1422. local ROTATION2 = (Table.RotationY or 0)
  1423. local ROTATION3 = (Table.RotationZ or 0)
  1424. local MATERIAL = (Table.Material or "Neon")
  1425. local COLOR = (Table.Color or C3(1,1,1))
  1426. local TIME = (Table.Time or 45)
  1427. local SOUNDID = (Table.SoundID or nil)
  1428. local SOUNDPITCH = (Table.SoundPitch or nil)
  1429. local SOUNDVOLUME = (Table.SoundVolume or nil)
  1430. coroutine.resume(coroutine.create(function()
  1431. local PLAYSSOUND = false
  1432. local SOUND = nil
  1433. local EFFECT = CreatePart(3, Effects, MATERIAL, 0, TRANSPARENCY, BRICKC("Pearl"), "Effect", VT(1,1,1), true)
  1434. if SOUNDID ~= nil and SOUNDPITCH ~= nil and SOUNDVOLUME ~= nil then
  1435. PLAYSSOUND = true
  1436. SOUND = CreateSound(SOUNDID, EFFECT, SOUNDVOLUME, SOUNDPITCH, false)
  1437. end
  1438. EFFECT.Color = COLOR
  1439. local MSH = nil
  1440. if TYPE == "Sphere" then
  1441. MSH = CreateMesh("SpecialMesh", EFFECT, "Sphere", "", "", SIZE, VT(0,0,0))
  1442. elseif TYPE == "Block" then
  1443. MSH = IT("BlockMesh",EFFECT)
  1444. MSH.Scale = VT(SIZE.X,SIZE.X,SIZE.X)
  1445. elseif TYPE == "Wave" then
  1446. MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "20329976", "", SIZE, VT(0,0,-SIZE.X/8))
  1447. elseif TYPE == "Ring" then
  1448. MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "559831844", "", VT(SIZE.X,SIZE.X,0.1), VT(0,0,0))
  1449. elseif TYPE == "Slash" then
  1450. MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "662586858", "", VT(SIZE.X/10,0,SIZE.X/10), VT(0,0,0))
  1451. elseif TYPE == "Round Slash" then
  1452. MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "662585058", "", VT(SIZE.X/10,0,SIZE.X/10), VT(0,0,0))
  1453. elseif TYPE == "Swirl" then
  1454. MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "1051557", "", SIZE, VT(0,0,0))
  1455. elseif TYPE == "Skull" then
  1456. MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "4770583", "", SIZE, VT(0,0,0))
  1457. elseif TYPE == "Crystal" then
  1458. MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "9756362", "", SIZE, VT(0,0,0))
  1459. end
  1460. if MSH ~= nil then
  1461. local MOVESPEED = nil
  1462. if MOVEDIRECTION ~= nil then
  1463. MOVESPEED = (CFRAME.p - MOVEDIRECTION).Magnitude/TIME
  1464. end
  1465. local GROWTH = SIZE - ENDSIZE
  1466. local TRANS = TRANSPARENCY - ENDTRANSPARENCY
  1467. if TYPE == "Block" then
  1468. EFFECT.CFrame = CFRAME*ANGLES(RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)))
  1469. else
  1470. EFFECT.CFrame = CFRAME
  1471. end
  1472. for LOOP = 1, TIME+1 do
  1473. Swait()
  1474. MSH.Scale = MSH.Scale - GROWTH/TIME
  1475. if TYPE == "Wave" then
  1476. MSH.Offset = VT(0,0,-MSH.Scale.X/8)
  1477. end
  1478. EFFECT.Transparency = EFFECT.Transparency - TRANS/TIME
  1479. if TYPE == "Block" then
  1480. EFFECT.CFrame = CFRAME*ANGLES(RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)))
  1481. else
  1482. EFFECT.CFrame = EFFECT.CFrame*ANGLES(RAD(ROTATION1),RAD(ROTATION2),RAD(ROTATION3))
  1483. end
  1484. if MOVEDIRECTION ~= nil then
  1485. local ORI = EFFECT.Orientation
  1486. EFFECT.CFrame = CF(EFFECT.Position,MOVEDIRECTION)*CF(0,0,-MOVESPEED)
  1487. EFFECT.Orientation = ORI
  1488. end
  1489. end
  1490. if PLAYSSOUND == false then
  1491. EFFECT:remove()
  1492. else
  1493. repeat Swait() until SOUND.Playing == false
  1494. EFFECT:remove()
  1495. end
  1496. else
  1497. if PLAYSSOUND == false then
  1498. EFFECT:remove()
  1499. else
  1500. repeat Swait() until SOUND.Playing == false
  1501. EFFECT:remove()
  1502. end
  1503. end
  1504. end))
  1505. end
  1506.  
  1507. function MakeForm(PART,TYPE)
  1508. if TYPE == "Cyl" then
  1509. local MSH = IT("CylinderMesh",PART)
  1510. elseif TYPE == "Ball" then
  1511. local MSH = IT("SpecialMesh",PART)
  1512. MSH.MeshType = "Sphere"
  1513. elseif TYPE == "Wedge" then
  1514. local MSH = IT("SpecialMesh",PART)
  1515. MSH.MeshType = "Wedge"
  1516. end
  1517. end
  1518.  
  1519. Debris = game:GetService("Debris")
  1520.  
  1521. function CastProperRay(StartPos, EndPos, Distance, Ignore)
  1522. local DIRECTION = CF(StartPos,EndPos).lookVector
  1523. return Raycast(StartPos, DIRECTION, Distance, Ignore)
  1524. end
  1525.  
  1526. function turnto(position)
  1527. RootPart.CFrame=CFrame.new(RootPart.CFrame.p,VT(position.X,RootPart.Position.Y,position.Z)) * CFrame.new(0, 0, 0)
  1528. end
  1529.  
  1530. --//=================================\\
  1531. --|| WEAPON CREATION
  1532. --\\=================================//
  1533. local BODY = {}
  1534.  
  1535. for _, c in pairs(Character:GetDescendants()) do
  1536. if c:IsA("BasePart") and c.Name ~= "Handle" then
  1537. if c ~= RootPart and c ~= Torso and c ~= Head and c ~= RightArm and c ~= LeftArm and c ~= RightLeg and c ~= LeftLeg then
  1538. c.CustomPhysicalProperties = PhysicalProperties.new(0, 0, 0, 0, 0)
  1539. end
  1540. table.insert(BODY,{c,c.Parent,c.Material,c.Color,c.Transparency})
  1541. elseif c:IsA("JointInstance") then
  1542. table.insert(BODY,{c,c.Parent,nil,nil,nil})
  1543. end
  1544. end
  1545.  
  1546. for e = 1, #BODY do
  1547. if BODY[e] ~= nil then
  1548. local STUFF = BODY[e]
  1549. local PART = STUFF[1]
  1550. local PARENT = STUFF[2]
  1551. local MATERIAL = STUFF[3]
  1552. local COLOR = STUFF[4]
  1553. local TRANSPARENCY = STUFF[5]
  1554. if PART.ClassName == "Part" and PART ~= RootPart then
  1555. PART.Material = MATERIAL
  1556. PART.Color = COLOR
  1557. PART.Transparency = TRANSPARENCY
  1558. end
  1559. PART.AncestryChanged:Connect(function()
  1560. PART.Parent = PARENT
  1561. end)
  1562. end
  1563. end
  1564.  
  1565. -------------------------------------------------------
  1566. local Orbd = Instance.new("Part", Character)
  1567. Orbd.Name = "Orbd"
  1568. Orbd.Shape = Enum.PartType.Ball
  1569. Orbd.CanCollide = false
  1570. Orbd.BrickColor = BrickColor.new("Really black")
  1571. Orbd.Transparency = 0
  1572. Orbd.Material = "Neon"
  1573. Orbd.Size = Vector3.new(0.3, 0.3, 0.3)
  1574. Orbd.TopSurface = Enum.SurfaceType.Smooth
  1575. Orbd.BottomSurface = Enum.SurfaceType.Smooth
  1576.  
  1577. local Weld = Instance.new("Weld", Orbd)
  1578. Weld.Part0 = Character.Head
  1579. Weld.Part1 = Orbd
  1580. Weld.C1 = CFrame.new(-0.26, -0.24, 0.55)
  1581.  
  1582. --------------------------------------------------------
  1583. local Orbvc = Instance.new("Part", Character)
  1584. Orbvc.Name = "Orbvc"
  1585. Orbvc.Shape = Enum.PartType.Ball
  1586. Orbvc.CanCollide = false
  1587. Orbvc.BrickColor = BrickColor.new("Really black")
  1588. Orbvc.Transparency = 0
  1589. Orbvc.Material = "Neon"
  1590. Orbvc.Size = Vector3.new(0.3, 0.3, 0.3)
  1591. Orbvc.TopSurface = Enum.SurfaceType.Smooth
  1592. Orbvc.BottomSurface = Enum.SurfaceType.Smooth
  1593.  
  1594. local Weld = Instance.new("Weld", Orbvc)
  1595. Weld.Part0 = Character.Head
  1596. Weld.Part1 = Orbvc
  1597. Weld.C1 = CFrame.new(0.26, -0.24, 0.55)
  1598. ---------------------------------------------------------
  1599. local Mask = Instance.new("Part", Character)
  1600. Mask.Name = "Mask"
  1601. Mask.CanCollide = false
  1602. Mask.BrickColor = BrickColor.new("Medium stone grey")
  1603. Mask.Transparency = 0
  1604. Mask.Material = "Neon"
  1605. Mask.Size = Vector3.new(0.1, 0.1, 0.1)
  1606. Mask.TopSurface = Enum.SurfaceType.Smooth
  1607. Mask.BottomSurface = Enum.SurfaceType.Smooth
  1608.  
  1609. local Weld = Instance.new("Weld", Mask)
  1610. Weld.Part0 = Character.Head
  1611. Weld.Part1 = Mask
  1612. Weld.C1 = CFrame.new(0, -0.1, 0.8)
  1613.  
  1614. local M1 = Instance.new("SpecialMesh")
  1615. M1.Parent = Mask
  1616. M1.MeshId = "http://www.roblox.com/asset/?id=62679079"
  1617. M1.Scale = Vector3.new( 1, 1, 2)
  1618. ----------------------------------------------------------
  1619. local Hood = Instance.new("Part", Character)
  1620. Hood.Name = "Hood"
  1621. Hood.CanCollide = false
  1622. Hood.BrickColor = BrickColor.new("Really black")
  1623. Hood.Transparency = 0
  1624. Hood.Material = "Plastic"
  1625. Hood.Size = Vector3.new(0.1, 0.1, 0.1)
  1626. Hood.TopSurface = Enum.SurfaceType.Smooth
  1627. Hood.BottomSurface = Enum.SurfaceType.Smooth
  1628.  
  1629. local Weld = Instance.new("Weld", Hood)
  1630. Weld.Part0 = Character.Head
  1631. Weld.Part1 = Hood
  1632. Weld.C1 = CFrame.new(0, -0.2, 0)
  1633.  
  1634. local M2 = Instance.new("SpecialMesh")
  1635. M2.Parent = Hood
  1636. M2.MeshId = "http://www.roblox.com/asset/?id=83499032"
  1637. M2.Scale = Vector3.new( 1, 1.2, 1.1)
  1638. ------------------------------------------------------
  1639. --[[
  1640. Thanks for using Build-To-Lua by jarredbcv.
  1641. ]]--
  1642.  
  1643. New = function(Object, Parent, Name, Data)
  1644. local Object = Instance.new(Object)
  1645. for Index, Value in pairs(Data or {}) do
  1646. Object[Index] = Value
  1647. end
  1648. Object.Parent = Parent
  1649. Object.Name = Name
  1650. return Object
  1651. end
  1652.  
  1653. for i = 1, 35 do
  1654. local FACE = CreatePart(3, Character, "Fabric", 0, 0+(i-1)/35.2, "Dark stone grey", "FaceGradient", VT(1.01,0.5,1.01),false)
  1655. FACE.Color = C3(0,0,0)
  1656. Head:FindFirstChildOfClass("SpecialMesh"):Clone().Parent = FACE
  1657. CreateWeldOrSnapOrMotor("Weld", Head, Head, FACE, CF(0,0.35-(i-1)/75,0), CF(0, 0, 0))
  1658. end
  1659.  
  1660. local Eye = CreatePart(3, Character, "Neon", 0, 0, "Really red", "Eye", VT(0.6,0.1,1)/2,false)
  1661. MakeForm(Eye,"Ball")
  1662. CreateWeldOrSnapOrMotor("Weld", Eye, Head, Eye, CF(0,0.2,0) * ANGLES(RAD(0), RAD(-18), RAD(15)), CF(0, 0, 0.4))
  1663. local Eye = CreatePart(3, Character, "Neon", 0, 0, "Black", "Eye", VT(0.6,0.1,1)/2,false)
  1664. MakeForm(Eye,"Ball")
  1665. CreateWeldOrSnapOrMotor("Weld", Eye, Head, Eye, CF(0,0.2,0) * ANGLES(RAD(0), RAD(18), RAD(-15)), CF(0, 0, 0.4))
  1666. local Eye = CreatePart(3, Character, "Neon", 0, 0, "Black", "Eye", VT(0.1,1,1)/2,false)
  1667. MakeForm(Eye,"Ball")
  1668. CreateWeldOrSnapOrMotor("Weld", Eye, Head, Eye, CF(0,0.15,0) * ANGLES(RAD(0), RAD(-18), RAD(0)), CF(0, 0, 0.4))
  1669. local Eye = CreatePart(3, Character, "Neon", 0, 0, "Black", "Eye", VT(0.1,1,1)/2,false)
  1670. MakeForm(Eye,"Ball")
  1671. CreateWeldOrSnapOrMotor("Weld", Eye, Head, Eye, CF(0,0.15,0) * ANGLES(RAD(0), RAD(18), RAD(0)), CF(0, 0, 0.4))
  1672.  
  1673. local BasePart = CreatePart(3, Weapon, "SmoothPlastic", 1, 1, "Black", "BraceletPart", VT(1.01,0.3,1.01),false)
  1674. CreateWeldOrSnapOrMotor("Weld", RightArm, RightArm, BasePart, CF(0, -0.2, 0) * ANGLES(RAD(0), RAD(0), RAD(0)), CF(0, 0, 0))
  1675. for i = 1, 3 do
  1676. local Part = CreatePart(3, Weapon, "SmoothPlastic", 1, 1, "Black", "BraceletPart", VT(0.2,1.02,0.2),false)
  1677. CreateWeldOrSnapOrMotor("Weld", BasePart, BasePart, Part, CF(0, 0, 0.6-0.3*i) * ANGLES(RAD(0), RAD(0), RAD(90)), CF(0, 0, 0))
  1678. MakeForm(Part,"Cyl")
  1679. end
  1680. for i = 1, 3 do
  1681. local Part = CreatePart(3, Weapon, "SmoothPlastic", 1, 1, "Black", "BraceletPart", VT(0.2,1.02,0.2),false)
  1682. CreateWeldOrSnapOrMotor("Weld", BasePart, BasePart, Part, CF(0.6-0.3*i, 0, 0) * ANGLES(RAD(0), RAD(90), RAD(90)), CF(0, 0, 0))
  1683. MakeForm(Part,"Cyl")
  1684. end
  1685. local Part = CreatePart(3, Weapon, "SmoothPlastic", 1, 1, "Black", "BraceletPart", VT(0.51,0.6,0.25),false)
  1686. CreateWeldOrSnapOrMotor("Weld", BasePart, BasePart, Part, CF(-0.125, -0.4, -0.25) * ANGLES(RAD(0), RAD(90), RAD(180)), CF(0, 0, 0))
  1687. MakeForm(Part,"Wedge")
  1688. local Part = CreatePart(3, Weapon, "SmoothPlastic", 1, 1, "Black", "BraceletPart", VT(0.51,0.6,0.25),false)
  1689. CreateWeldOrSnapOrMotor("Weld", BasePart, BasePart, Part, CF(0.125, -0.4, -0.25) * ANGLES(RAD(0), RAD(-90), RAD(180)), CF(0, 0, 0))
  1690. MakeForm(Part,"Wedge")
  1691. local Part = CreatePart(3, Weapon, "SmoothPlastic", 1, 1, "Black", "BraceletPart", VT(0.52,0.5,0.25/2.3),false)
  1692. CreateWeldOrSnapOrMotor("Weld", BasePart, BasePart, Part, CF(-0.125/2.3, -0.25, -0.25) * ANGLES(RAD(0), RAD(90), RAD(180)), CF(0, 0, 0))
  1693. MakeForm(Part,"Wedge")
  1694. local Part = CreatePart(3, Weapon, "SmoothPlastic", 1, 1, "Black", "BraceletPart", VT(0.52,0.5,0.25/2.3),false)
  1695. CreateWeldOrSnapOrMotor("Weld", BasePart, BasePart, Part, CF(0.125/2.3, -0.25, -0.25) * ANGLES(RAD(0), RAD(-90), RAD(180)), CF(0, 0, 0))
  1696. MakeForm(Part,"Wedge")
  1697.  
  1698.  
  1699.  
  1700.  
  1701.  
  1702.  
  1703.  
  1704. for _, c in pairs(Weapon:GetChildren()) do
  1705. if c.ClassName == "Part" then
  1706. c.CustomPhysicalProperties = PhysicalProperties.new(0, 0, 0, 0, 0)
  1707. local AURA = c:Clone()
  1708. AURA:BreakJoints()
  1709. AURA.Parent = c
  1710. AURA.CFrame = c.CFrame
  1711. AURA.Size = AURA.Size*1.001
  1712. AURA.Transparency = 0.8
  1713. AURA.BrickColor = BRICKC"Royal purple"
  1714. AURA.Material = "Neon"
  1715. weldBetween(c,AURA)
  1716. end
  1717. end
  1718. function refit()
  1719. Character.Parent = workspace
  1720. for e = 1, #BODY do
  1721. if BODY[e] ~= nil then
  1722. local STUFF = BODY[e]
  1723. local PART = STUFF[1]
  1724. local PARENT = STUFF[2]
  1725. local MATERIAL = STUFF[3]
  1726. local COLOR = STUFF[4]
  1727. local TRANSPARENCY = STUFF[5]
  1728. if PART.ClassName == "Part" and PART ~= RootPart then
  1729. PART.Material = MATERIAL
  1730. PART.Color = COLOR
  1731. PART.Transparency = TRANSPARENCY
  1732. end
  1733. if PART.Parent ~= PARENT then
  1734. Humanoid:remove()
  1735. PART.Parent = PARENT
  1736. Humanoid = IT("Humanoid",Character)
  1737. end
  1738. end
  1739. end
  1740. end
  1741.  
  1742. local SKILLTEXTCOLOR = BRICKC"Black".Color
  1743. local SKILLFONT = "Bodoni"
  1744. local SKILLTEXTSIZE = 7
  1745.  
  1746. Weapon.Parent = Character
  1747.  
  1748. Humanoid.Died:connect(function()
  1749.  
  1750. ATTACK = true
  1751. end)
  1752.  
  1753. local SKILL1FRAME = CreateFrame(WEAPONGUI, 1, 2, UD2(0.23-.20, 0, 0.84, 0), UD2(0.26, 0, 0.07, 0), C3(0,0,0), C3(0, 0, 0), "Skill 1 Frame")
  1754. local SKILL2FRAME = CreateFrame(WEAPONGUI, 1, 2, UD2(0.50+.20, 0, 0.84, 0), UD2(0.26, 0, 0.07, 0), C3(0,0,0), C3(0, 0, 0), "Skill 2 Frame")
  1755. local SKILL3FRAME = CreateFrame(WEAPONGUI, 1, 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")
  1756. local SKILL4FRAME = CreateFrame(WEAPONGUI, 1, 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")
  1757. local SKILL5FRAME = CreateFrame(WEAPONGUI, 1, 2, UD2(0.365, 0, 0.86, 0), UD2(0.26, 0, 0.07, 0), C3(0,0,0), C3(0, 0, 0), "Skill 5 Frame")
  1758. local SKILL6FRAME = CreateFrame(WEAPONGUI, 1, 2, UD2(0.365, 0, 0.76, 0), UD2(0.26, 0, 0.07, 0), C3(0,0,0), C3(0, 0, 0), "Skill 6 Frame")
  1759.  
  1760.  
  1761. local SKILL1TEXT = CreateLabel(SKILL1FRAME, "[Z] BEAM OF CORRUPTION", SKILLTEXTCOLOR, SKILLTEXTSIZE, SKILLFONT, 0, 0, 0, "Text 1")
  1762. local SKILL2TEXT = CreateLabel(SKILL2FRAME, "[X] EXPLOSION", SKILLTEXTCOLOR, SKILLTEXTSIZE, SKILLFONT, 0, 0, 0, "Text 2")
  1763. local SKILL3TEXT = CreateLabel(SKILL3FRAME, "[C] STUN", SKILLTEXTCOLOR, SKILLTEXTSIZE, SKILLFONT, 0, 0, 0, "Text 3")
  1764. local SKILL4TEXT = CreateLabel(SKILL4FRAME, "[E] SCREAM", SKILLTEXTCOLOR, SKILLTEXTSIZE, SKILLFONT, 0, 0, 0, "Text 4")
  1765. local SKILL5TEXT = CreateLabel(SKILL5FRAME, "[R] WARP", SKILLTEXTCOLOR, SKILLTEXTSIZE, SKILLFONT, 0, 0, 0, "Text 5")
  1766. local SKILL6TEXT = CreateLabel(SKILL6FRAME, "[Q] PAIN", SKILLTEXTCOLOR, SKILLTEXTSIZE, SKILLFONT, 0, 0, 0, "Text 6")
  1767.  
  1768. --//=================================\\
  1769. --|| RAGDOLL STUFF
  1770. --\\=================================//
  1771.  
  1772. function recurse(root,callback,i)
  1773. i= i or 0
  1774. for _,v in pairs(root:GetChildren()) do
  1775. i = i + 1
  1776. callback(i,v)
  1777.  
  1778. if #v:GetChildren() > 0 then
  1779. i = recurse(v,callback,i)
  1780. end
  1781. end
  1782.  
  1783. return i
  1784. end
  1785.  
  1786. function ragdollJoint(character, part0, part1, attachmentName, className, properties)
  1787. attachmentName = attachmentName.."RigAttachment"
  1788. local constraint = Instance.new(className.."Constraint")
  1789. constraint.Attachment0 = part0:FindFirstChild(attachmentName)
  1790. constraint.Attachment1 = part1:FindFirstChild(attachmentName)
  1791. constraint.Name = "RagdollConstraint"..part1.Name
  1792.  
  1793. for _,propertyData in next,properties or {} do
  1794. constraint[propertyData[1]] = propertyData[2]
  1795. end
  1796.  
  1797. constraint.Parent = character
  1798. end
  1799.  
  1800. function getAttachment0(character, attachmentName)
  1801. for _,child in next,character:GetChildren() do
  1802. local attachment = child:FindFirstChild(attachmentName)
  1803. if attachment then
  1804. return attachment
  1805. end
  1806. end
  1807. end
  1808.  
  1809. function ArtificialHitbox(Part)
  1810. local HITBOX = CreatePart(3, Part, "Metal", 0, 1, "Really black", "Hitbox", Part.Size/2, false)
  1811. HITBOX.CanCollide = true
  1812. HITBOX.CFrame = Part.CFrame
  1813. weldBetween(Part,HITBOX)
  1814. end
  1815.  
  1816. function R15Ragdoll(character,KeepArms)
  1817. character:BreakJoints()
  1818. coroutine.resume(coroutine.create(function()
  1819. recurse(character, function(_,v)
  1820. if v:IsA("Attachment") then
  1821. v.Axis = Vector3.new(0, 1, 0)
  1822. v.SecondaryAxis = Vector3.new(0, 0, 1)
  1823. v.Rotation = Vector3.new(0, 0, 0)
  1824. end
  1825. end)
  1826. for _,child in next,character:GetChildren() do
  1827. if child:IsA("Accoutrement") then
  1828. for _,part in next,child:GetChildren() do
  1829. if part:IsA("BasePart") and part.Name ~= "HumanoidRootPart" then
  1830. local attachment1 = part:FindFirstChildOfClass("Attachment")
  1831. local attachment0 = getAttachment0(character,attachment1.Name)
  1832. if attachment0 and attachment1 then
  1833. local constraint = Instance.new("HingeConstraint")
  1834. constraint.Attachment0 = attachment0
  1835. constraint.Attachment1 = attachment1
  1836. constraint.LimitsEnabled = true
  1837. constraint.UpperAngle = 0
  1838. constraint.LowerAngle = 0
  1839. constraint.Parent = character
  1840. end
  1841. ArtificialHitbox(part)
  1842. elseif part.Name == "HumanoidRootPart" then
  1843. part:remove()
  1844. end
  1845. end
  1846. end
  1847. end
  1848.  
  1849. ragdollJoint(character,character.LowerTorso, character.UpperTorso, "Waist", "BallSocket", {
  1850. {"LimitsEnabled",true};
  1851. {"UpperAngle",5};
  1852. })
  1853. if character:FindFirstChild("Head") then
  1854. ragdollJoint(character,character.UpperTorso, character.Head, "Neck", "BallSocket", {
  1855. {"LimitsEnabled",true};
  1856. {"UpperAngle",15};
  1857. })
  1858. end
  1859.  
  1860. local handProperties = {
  1861. {"LimitsEnabled", true};
  1862. {"UpperAngle",0};
  1863. {"LowerAngle",0};
  1864. }
  1865. ragdollJoint(character,character.LeftLowerArm, character.LeftHand, "LeftWrist", "Hinge", handProperties)
  1866. ragdollJoint(character,character.RightLowerArm, character.RightHand, "RightWrist", "Hinge", handProperties)
  1867.  
  1868. local shinProperties = {
  1869. {"LimitsEnabled", true};
  1870. {"UpperAngle", 0};
  1871. {"LowerAngle", -75};
  1872. }
  1873. ragdollJoint(character,character.LeftUpperLeg, character.LeftLowerLeg, "LeftKnee", "Hinge", shinProperties)
  1874. ragdollJoint(character,character.RightUpperLeg, character.RightLowerLeg, "RightKnee", "Hinge", shinProperties)
  1875.  
  1876. local footProperties = {
  1877. {"LimitsEnabled", true};
  1878. {"UpperAngle", 15};
  1879. {"LowerAngle", -45};
  1880. }
  1881. ragdollJoint(character,character.LeftLowerLeg, character.LeftFoot, "LeftAnkle", "Hinge", footProperties)
  1882. ragdollJoint(character,character.RightLowerLeg, character.RightFoot, "RightAnkle", "Hinge", footProperties)
  1883. if KeepArms == true then
  1884. ragdollJoint(character,character.UpperTorso, character.RightUpperArm, "RightShoulder", "BallSocket")
  1885. ragdollJoint(character,character.RightUpperArm, character.RightLowerArm, "RightElbow", "BallSocket")
  1886. ragdollJoint(character,character.UpperTorso, character.LeftUpperArm, "LeftShoulder", "BallSocket")
  1887. ragdollJoint(character,character.LeftUpperArm, character.LeftLowerArm, "LeftElbow", "BallSocket")
  1888. end
  1889. ragdollJoint(character,character.LowerTorso, character.LeftUpperLeg, "LeftHip", "BallSocket")
  1890. ragdollJoint(character,character.LowerTorso, character.RightUpperLeg, "RightHip", "BallSocket")
  1891. Debris:AddItem(character,5)
  1892. end))
  1893. end
  1894.  
  1895. function Ragdoll(Character2,CharTorso,KeepArms)
  1896. coroutine.resume(coroutine.create(function()
  1897. Character2:BreakJoints()
  1898. local hum = Character2:findFirstChild("Humanoid")
  1899. hum:remove()
  1900. local function Scan(ch)
  1901. local e
  1902. for e = 1,#ch do
  1903. Scan(ch[e]:GetChildren())
  1904. if ch[e].ClassName == "Weld" or ch[e].ClassName == "Motor6D" then
  1905. ch[e]:remove()
  1906. end
  1907. end
  1908. end
  1909. local NEWHUM = IT("Humanoid")
  1910. NEWHUM.Name = "Corpse"
  1911. NEWHUM.Health = 0
  1912. NEWHUM.MaxHealth = 0
  1913. NEWHUM.PlatformStand = true
  1914. NEWHUM.Parent = Character2
  1915. NEWHUM.DisplayDistanceType = "None"
  1916.  
  1917. local ch = Character2:GetChildren()
  1918. local i
  1919. for i = 1,#ch do
  1920. if ch[i].Name == "THandle1" or ch[i].Name == "THandle2" then
  1921. ch[i]:remove()
  1922. end
  1923. end
  1924.  
  1925. local Torso2 = Character2.Torso
  1926. local movevector = Vector3.new()
  1927.  
  1928. if Torso2 then
  1929. movevector = CFrame.new(CharTorso.Position,Torso2.Position).lookVector
  1930. local Head = Character2:FindFirstChild("Head")
  1931. if Head then
  1932. local Neck = Instance.new("Weld")
  1933. Neck.Name = "Neck"
  1934. Neck.Part0 = Torso2
  1935. Neck.Part1 = Head
  1936. Neck.C0 = CFrame.new(0, 1.5, 0)
  1937. Neck.C1 = CFrame.new()
  1938. Neck.Parent = Torso2
  1939.  
  1940. end
  1941. local Limb = Character2:FindFirstChild("Right Arm")
  1942. if Limb and KeepArms == true then
  1943.  
  1944. Limb.CFrame = Torso2.CFrame * CFrame.new(1.5, 0, 0)
  1945. local Joint = Instance.new("Glue")
  1946. Joint.Name = "RightShoulder"
  1947. Joint.Part0 = Torso2
  1948. Joint.Part1 = Limb
  1949. Joint.C0 = CFrame.new(1.5, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  1950. Joint.C1 = CFrame.new(-0, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  1951. Joint.Parent = Torso2
  1952.  
  1953. local B = Instance.new("Part")
  1954. B.TopSurface = 0
  1955. B.BottomSurface = 0
  1956. B.formFactor = "Symmetric"
  1957. B.Size = Vector3.new(1, 1, 1)
  1958. B.Transparency = 1
  1959. B.CFrame = Limb.CFrame * CFrame.new(0, -0.5, 0)
  1960. B.Parent = Character2
  1961. local W = Instance.new("Weld")
  1962. W.Part0 = Limb
  1963. W.Part1 = B
  1964. W.C0 = CFrame.new(0, -0.5, 0)
  1965. W.Parent = Limb
  1966.  
  1967. end
  1968. local Limb = Character2:FindFirstChild("Left Arm")
  1969. if Limb and KeepArms == true then
  1970.  
  1971. Limb.CFrame = Torso2.CFrame * CFrame.new(-1.5, 0, 0)
  1972. local Joint = Instance.new("Glue")
  1973. Joint.Name = "LeftShoulder"
  1974. Joint.Part0 = Torso2
  1975. Joint.Part1 = Limb
  1976. Joint.C0 = CFrame.new(-1.5, 0.5, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
  1977. Joint.C1 = CFrame.new(0, 0.5, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
  1978. Joint.Parent = Torso2
  1979.  
  1980. local B = Instance.new("Part")
  1981. B.TopSurface = 0
  1982. B.BottomSurface = 0
  1983. B.formFactor = "Symmetric"
  1984. B.Size = Vector3.new(1, 1, 1)
  1985. B.Transparency = 1
  1986. B.CFrame = Limb.CFrame * CFrame.new(0, -0.5, 0)
  1987. B.Parent = Character2
  1988. local W = Instance.new("Weld")
  1989. W.Part0 = Limb
  1990. W.Part1 = B
  1991. W.C0 = CFrame.new(0, -0.5, 0)
  1992. W.Parent = Limb
  1993.  
  1994. end
  1995. local Limb = Character2:FindFirstChild("Right Leg")
  1996. if Limb then
  1997.  
  1998. Limb.CFrame = Torso2.CFrame * CFrame.new(0.5, -2, 0)
  1999. local Joint = Instance.new("Glue")
  2000. Joint.Name = "RightHip"
  2001. Joint.Part0 = Torso2
  2002. Joint.Part1 = Limb
  2003. Joint.C0 = CFrame.new(0.5, -1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  2004. Joint.C1 = CFrame.new(0, 1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  2005. Joint.Parent = Torso2
  2006.  
  2007. local B = Instance.new("Part")
  2008. B.TopSurface = 0
  2009. B.BottomSurface = 0
  2010. B.formFactor = "Symmetric"
  2011. B.Size = Vector3.new(1, 1, 1)
  2012. B.Transparency = 1
  2013. B.CFrame = Limb.CFrame * CFrame.new(0, -0.5, 0)
  2014. B.Parent = Character2
  2015. local W = Instance.new("Weld")
  2016. W.Part0 = Limb
  2017. W.Part1 = B
  2018. W.C0 = CFrame.new(0, -0.5, 0)
  2019. W.Parent = Limb
  2020.  
  2021. end
  2022. local Limb = Character2:FindFirstChild("Left Leg")
  2023. if Limb then
  2024.  
  2025. Limb.CFrame = Torso2.CFrame * CFrame.new(-0.5, -2, 0)
  2026. local Joint = Instance.new("Glue")
  2027. Joint.Name = "LeftHip"
  2028. Joint.Part0 = Torso2
  2029. Joint.Part1 = Limb
  2030. Joint.C0 = CFrame.new(-0.5, -1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
  2031. Joint.C1 = CFrame.new(-0, 1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
  2032. Joint.Parent = Torso2
  2033.  
  2034. local B = Instance.new("Part")
  2035. B.TopSurface = 0
  2036. B.BottomSurface = 0
  2037. B.formFactor = "Symmetric"
  2038. B.Size = Vector3.new(1, 1, 1)
  2039. B.Transparency = 1
  2040. B.CFrame = Limb.CFrame * CFrame.new(0, -0.5, 0)
  2041. B.Parent = Character2
  2042. local W = Instance.new("Weld")
  2043. W.Part0 = Limb
  2044. W.Part1 = B
  2045. W.C0 = CFrame.new(0, -0.5, 0)
  2046. W.Parent = Limb
  2047.  
  2048. end
  2049. --[
  2050. local Bar = Instance.new("Part")
  2051. Bar.TopSurface = 0
  2052. Bar.BottomSurface = 0
  2053. Bar.formFactor = "Symmetric"
  2054. Bar.Size = Vector3.new(1, 1, 1)
  2055. Bar.Transparency = 1
  2056. Bar.CFrame = Torso2.CFrame * CFrame.new(0, 0.5, 0)
  2057. Bar.Parent = Character2
  2058. local Weld = Instance.new("Weld")
  2059. Weld.Part0 = Torso2
  2060. Weld.Part1 = Bar
  2061. Weld.C0 = CFrame.new(0, 0.5, 0)
  2062. Weld.Parent = Torso2
  2063. --]]
  2064. end
  2065. Character2.Parent = workspace
  2066. Debris:AddItem(Character2,5)
  2067.  
  2068. return Character2,Torso2
  2069. end))
  2070. end
  2071.  
  2072. --//=================================\\
  2073. --|| DAMAGE FUNCTIONS
  2074. --\\=================================//
  2075. function StatLabel(CFRAME, TEXT, COLOR)
  2076. local STATPART = CreatePart(3, Effects, "SmoothPlastic", 0, 1, "Really black", "Effect", VT())
  2077. STATPART.CFrame = CF(CFRAME.p,CFRAME.p+VT(MRANDOM(-5,5),MRANDOM(0,5),MRANDOM(-5,5)))
  2078. local BODYGYRO = IT("BodyGyro", STATPART)
  2079. game:GetService("Debris"):AddItem(STATPART ,5)
  2080. local BILLBOARDGUI = Instance.new("BillboardGui", STATPART)
  2081. BILLBOARDGUI.Adornee = STATPART
  2082. BILLBOARDGUI.Size = UD2(2.5, 0, 2.5 ,0)
  2083. BILLBOARDGUI.StudsOffset = VT(-2, 2, 0)
  2084. BILLBOARDGUI.AlwaysOnTop = false
  2085. local TEXTLABEL = Instance.new("TextLabel", BILLBOARDGUI)
  2086. TEXTLABEL.BackgroundTransparency = 1
  2087. TEXTLABEL.Size = UD2(2.5, 0, 2.5, 0)
  2088. TEXTLABEL.Text = TEXT
  2089. TEXTLABEL.Font = SKILLFONT
  2090. TEXTLABEL.FontSize="Size42"
  2091. TEXTLABEL.TextColor3 = COLOR
  2092. TEXTLABEL.TextStrokeTransparency = 0
  2093. TEXTLABEL.TextScaled = true
  2094. TEXTLABEL.TextWrapped = true
  2095. coroutine.resume(coroutine.create(function(THEPART, THEBODYPOSITION, THETEXTLABEL)
  2096. for i = 1, 50 do
  2097. Swait()
  2098. STATPART.CFrame = STATPART.CFrame * CF(0,0,-0.2)
  2099. TEXTLABEL.TextTransparency = TEXTLABEL.TextTransparency + (1/50)
  2100. TEXTLABEL.TextStrokeTransparency = TEXTLABEL.TextTransparency
  2101. end
  2102. THEPART.Parent = nil
  2103. end),STATPART, TEXTLABEL)
  2104. end
  2105.  
  2106. function StatLabel(CFRAME, TEXT, COLOR)
  2107. local STATPART = CreatePart(3, Effects, "SmoothPlastic", 0, 1, "Really black", "Effect", VT())
  2108. STATPART.CFrame = CF(CFRAME.p,CFRAME.p+VT(MRANDOM(-5,5),MRANDOM(0,5),MRANDOM(-5,5)))
  2109. local BODYGYRO = IT("BodyGyro", STATPART)
  2110. game:GetService("Debris"):AddItem(STATPART ,5)
  2111. local BILLBOARDGUI = Instance.new("BillboardGui", STATPART)
  2112. BILLBOARDGUI.Adornee = STATPART
  2113. BILLBOARDGUI.Size = UD2(2.5, 0, 2.5 ,0)
  2114. BILLBOARDGUI.StudsOffset = VT(-2, 2, 0)
  2115. BILLBOARDGUI.AlwaysOnTop = false
  2116. local TEXTLABEL = Instance.new("TextLabel", BILLBOARDGUI)
  2117. TEXTLABEL.BackgroundTransparency = 1
  2118. TEXTLABEL.Size = UD2(2.5, 0, 2.5, 0)
  2119. TEXTLABEL.Text = TEXT
  2120. TEXTLABEL.Font = "Fantasy"
  2121. TEXTLABEL.FontSize="Size42"
  2122. TEXTLABEL.TextColor3 = COLOR
  2123. TEXTLABEL.TextStrokeTransparency = 0
  2124. TEXTLABEL.TextScaled = true
  2125. TEXTLABEL.TextWrapped = true
  2126. coroutine.resume(coroutine.create(function(THEPART, THEBODYPOSITION, THETEXTLABEL)
  2127. for i = 1, 50 do
  2128. Swait()
  2129. STATPART.CFrame = STATPART.CFrame * CF(0,0,-0.2)
  2130. TEXTLABEL.TextTransparency = TEXTLABEL.TextTransparency + (1/50)
  2131. TEXTLABEL.TextStrokeTransparency = TEXTLABEL.TextTransparency
  2132. end
  2133. THEPART.Parent = nil
  2134. end),STATPART, TEXTLABEL)
  2135. end
  2136.  
  2137. function StatLabel(CFRAME, TEXT, COLOR)
  2138. local STATPART = CreatePart(3, Effects, "SmoothPlastic", 0, 1, "Really black", "Effect", VT())
  2139. STATPART.CFrame = CF(CFRAME.p,CFRAME.p+VT(MRANDOM(-5,5),MRANDOM(0,5),MRANDOM(-5,5)))
  2140. local BODYGYRO = IT("BodyGyro", STATPART)
  2141. game:GetService("Debris"):AddItem(STATPART ,5)
  2142. local BILLBOARDGUI = Instance.new("BillboardGui", STATPART)
  2143. BILLBOARDGUI.Adornee = STATPART
  2144. BILLBOARDGUI.Size = UD2(2.5, 0, 2.5 ,0)
  2145. BILLBOARDGUI.StudsOffset = VT(-2, 2, 0)
  2146. BILLBOARDGUI.AlwaysOnTop = false
  2147. local TEXTLABEL = Instance.new("TextLabel", BILLBOARDGUI)
  2148. TEXTLABEL.BackgroundTransparency = 1
  2149. TEXTLABEL.Size = UD2(2.5, 0, 2.5, 0)
  2150. TEXTLABEL.Text = TEXT
  2151. TEXTLABEL.Font = SKILLFONT
  2152. TEXTLABEL.FontSize="Size42"
  2153. TEXTLABEL.TextColor3 = COLOR
  2154. TEXTLABEL.TextStrokeTransparency = 0
  2155. TEXTLABEL.TextScaled = true
  2156. TEXTLABEL.TextWrapped = true
  2157. coroutine.resume(coroutine.create(function(THEPART, THEBODYPOSITION, THETEXTLABEL)
  2158. for i = 1, 50 do
  2159. Swait()
  2160. STATPART.CFrame = STATPART.CFrame * CF(0,0,-0.2)
  2161. TEXTLABEL.TextTransparency = TEXTLABEL.TextTransparency + (1/50)
  2162. TEXTLABEL.TextStrokeTransparency = TEXTLABEL.TextTransparency
  2163. end
  2164. THEPART.Parent = nil
  2165. end),STATPART, TEXTLABEL)
  2166. end
  2167.  
  2168. --//=================================\\
  2169. --|| DAMAGING
  2170. --\\=================================//
  2171. function ApplyDamage(Humanoid,Damage,TorsoPart)
  2172. local defence = Instance.new("BoolValue",Humanoid.Parent)
  2173. defence.Name = ("HitBy"..Player.Name)
  2174. game:GetService("Debris"):AddItem(defence, 0.001)
  2175. Damage = Damage * DAMAGEMULTIPLIER
  2176. if Humanoid.Health ~= 0 then
  2177. local CritChance = MRANDOM(1,100)
  2178. if Damage > Humanoid.Health then
  2179. Damage = math.ceil(Humanoid.Health)
  2180. if Damage == 0 then
  2181. Damage = 0.1
  2182. end
  2183. end
  2184. Humanoid.Health = Humanoid.Health - Damage
  2185. end
  2186. end
  2187.  
  2188. function ApplyAoE(POSITION,RANGE,MINDMG,MAXDMG,FLING,INSTAKILL)
  2189. local CHILDREN = workspace:GetDescendants()
  2190. for index, CHILD in pairs(CHILDREN) do
  2191. if CHILD.ClassName == "Model" and CHILD ~= Character and CHILD.Parent ~= Effects then
  2192. local HUM = CHILD:FindFirstChildOfClass("Humanoid")
  2193. if HUM then
  2194. local TORSO = CHILD:FindFirstChild("Torso") or CHILD:FindFirstChild("UpperTorso")
  2195. if TORSO then
  2196. if (TORSO.Position - POSITION).Magnitude <= RANGE then
  2197. if INSTAKILL == false then
  2198. CHILD:BreakJoints()
  2199. else
  2200. local DMG = MRANDOM(MINDMG,MAXDMG)
  2201. ApplyDamage(HUM,DMG,TORSO)
  2202. end
  2203. if FLING > 0 then
  2204. for _, c in pairs(CHILD:GetChildren()) do
  2205. if c:IsA("BasePart") then
  2206. local bv = Instance.new("BodyVelocity")
  2207. bv.maxForce = Vector3.new(1e9, 1e9, 1e9)
  2208. bv.velocity = CF(POSITION,TORSO.Position).lookVector*FLING
  2209. bv.Parent = c
  2210. Debris:AddItem(bv,0.05)
  2211. end
  2212. end
  2213. end
  2214. end
  2215. end
  2216. end
  2217. end
  2218. end
  2219. end
  2220.  
  2221. function KillChildren(v)
  2222. v:BreakJoints()
  2223. for _, c in pairs(v:GetChildren()) do
  2224. if c:IsA("BasePart") then
  2225. if c.Transparency < 1 then
  2226. if c:FindFirstChildOfClass("Decal") then
  2227. c:FindFirstChildOfClass("Decal"):remove()
  2228. end
  2229. particles(c)
  2230. c.PE.Enabled = true
  2231. c.Parent = Effects
  2232. c.CanCollide = false
  2233. c.Material = "Neon"
  2234. c.Color = C3(0,0,0)
  2235. c.Transparency = 1
  2236. local grav = Instance.new("BodyPosition",c)
  2237. grav.P = 20000
  2238. grav.maxForce = Vector3.new(math.huge,math.huge,math.huge)
  2239. grav.position = c.Position + VT(MRANDOM(-5,5),MRANDOM(-5,5),MRANDOM(-5,5))
  2240. grav.Name = "GravityForce"
  2241. coroutine.resume(coroutine.create(function()
  2242. for i = 1, 20 do
  2243. Swait()
  2244. c.Transparency = c.Transparency + 1/20
  2245. end
  2246. c.PE.Enabled = false
  2247. Debris:AddItem(c,2)
  2248. end))
  2249. end
  2250. end
  2251. end
  2252. end
  2253.  
  2254. function ApplyAoE(POSITION,RANGE)
  2255. local CHILDREN = workspace:GetDescendants()
  2256. for index, CHILD in pairs(CHILDREN) do
  2257. if CHILD.ClassName == "Model" and CHILD ~= Character then
  2258. local LISTED = false
  2259. for LIST = 1, #WHITELIST do
  2260. if WHITELIST[LIST] ~= nil then
  2261. if CHILD.Name == WHITELIST[LIST] then
  2262. LISTED = true
  2263. end
  2264. end
  2265. end
  2266. if LISTED == false then
  2267. local HUM = CHILD:FindFirstChildOfClass("Humanoid")
  2268. if HUM then
  2269. local TORSO = CHILD:FindFirstChild("Torso") or CHILD:FindFirstChild("UpperTorso")
  2270. if TORSO then
  2271. if (TORSO.Position - POSITION).Magnitude <= RANGE+TORSO.Size.Magnitude then
  2272. KillChildren(CHILD)
  2273. end
  2274. end
  2275. end
  2276. end
  2277. end
  2278. end
  2279. end
  2280.  
  2281. function ApplyDamage(Humanoid,Damage,CritRate,CritMultiplier)
  2282. local defence = Instance.new("BoolValue",Humanoid.Parent)
  2283. defence.Name = ("HitBy"..Player.Name)
  2284. game:GetService("Debris"):AddItem(defence, 0.001)
  2285. if Humanoid.Health ~= 0 then
  2286. local CritChance = MRANDOM(1,100)
  2287. if CritChance < CritRate + 1 then
  2288. Damage = Damage*CritMultiplier
  2289. end
  2290. if Damage > Humanoid.Health then
  2291. Damage = math.ceil(Humanoid.Health)
  2292. if Damage == 0 then
  2293. Damage = 0.1
  2294. end
  2295. end
  2296. Humanoid.Health = Humanoid.Health - Damage
  2297. if Humanoid.Parent:FindFirstChild("Head") then
  2298. CreateSound(HITPLAYERSOUNDS[MRANDOM(1,#HITPLAYERSOUNDS)], Humanoid.Parent.Head, 5, 1)
  2299. if CritChance < CritRate + 1 then
  2300. StatLabel(Humanoid.Parent.Head.CFrame * CF(0, 0 + (Humanoid.Parent.Head.Size.z - 1), 0), "CRIT//"..Damage, C3(1, 0, 0))
  2301. else
  2302. StatLabel(Humanoid.Parent.Head.CFrame * CF(0, 0 + (Humanoid.Parent.Head.Size.z - 1), 0), Damage, SKILLTEXTCOLOR)
  2303. end
  2304. end
  2305. end
  2306. end
  2307.  
  2308. function AoEDamage(position,radius,min,max,maxstrength,critrate,critmultiplier,CanBeDodgedByJumping)
  2309. local dmg = math.random(min,max)
  2310. for i,v in ipairs(workspace:GetChildren()) do
  2311. if v:FindFirstChild("HitBy"..Player.Name) == nil then
  2312. local body = v:GetChildren()
  2313. for part = 1, #body do
  2314. if(v:FindFirstChild("HitBy"..Player.Name) == nil and (body[part].ClassName == "Part" or body[part].ClassName == "MeshPart") and v ~= Character) then
  2315. if(body[part].Position - position).Magnitude < radius then
  2316. if v.ClassName == "Model" then
  2317. if v:FindFirstChildOfClass("Humanoid") then
  2318. if CanBeDodgedByJumping == true then
  2319. if body[part].Position.Y < position.Y+5 then
  2320. ApplyDamage(v:FindFirstChildOfClass("Humanoid"),dmg,critrate,critmultiplier)
  2321. end
  2322. else
  2323. ApplyDamage(v:FindFirstChildOfClass("Humanoid"),dmg,critrate,critmultiplier)
  2324. end
  2325. local bv = Instance.new("BodyVelocity")
  2326. bv.maxForce = Vector3.new(1e9, 1e9, 1e9)
  2327. bv.velocity = RootPart.CFrame.lookVector*maxstrength
  2328. bv.Parent = body[part]
  2329. Debris:AddItem(bv,0.2)
  2330. end
  2331. end
  2332. end
  2333. end
  2334. end
  2335. end
  2336. if v:FindFirstChild("HitBy"..Player.Name) then
  2337. v:FindFirstChild("HitBy"..Player.Name):remove()
  2338. end
  2339. end
  2340. end
  2341.  
  2342. function Kill(Char)
  2343. local NewCharacter = IT("Model",Effects)
  2344. NewCharacter.Name = "Ow im ded ;-;"
  2345. for _, c in pairs(Char:GetDescendants()) do
  2346. if c:IsA("BasePart") and c.Transparency == 0 then
  2347. if c.Parent == Char then
  2348. getbloody(c,5)
  2349. end
  2350. c:BreakJoints()
  2351. c.Material = "Glass"
  2352. c.Color = C3(0.5,0,0)
  2353. c.CanCollide = true
  2354. c.Transparency = 0.3
  2355. if c:FindFirstChildOfClass("SpecialMesh") then
  2356. c:FindFirstChildOfClass("SpecialMesh").TextureId = ""
  2357. end
  2358. if c.Name == "Head" then
  2359. c:ClearAllChildren()
  2360. c.Size = VT(c.Size.Y,c.Size.Y,c.Size.Y)
  2361. end
  2362. if c.ClassName == "MeshPart" then
  2363. c.TextureID = ""
  2364. end
  2365. if c:FindFirstChildOfClass("BodyPosition") then
  2366. c:FindFirstChildOfClass("BodyPosition"):remove()
  2367. end
  2368. if c:FindFirstChildOfClass("ParticleEmitter") then
  2369. c:FindFirstChildOfClass("ParticleEmitter"):remove()
  2370. end
  2371. c.Parent = NewCharacter
  2372. c.Name = "DeadPart"
  2373. c.Velocity = VT(MRANDOM(-45,45),MRANDOM(-45,45),MRANDOM(-45,45))/15
  2374. c.RotVelocity = VT(MRANDOM(-45,45),MRANDOM(-15,85),MRANDOM(-45,45))
  2375. end
  2376. end
  2377. Char:remove()
  2378. Debris:AddItem(NewCharacter,5)
  2379. end
  2380.  
  2381. function ApplyAoE(POSITION,RANGE,BRUTAL)
  2382. local CHILDREN = workspace:GetDescendants()
  2383. for index, CHILD in pairs(CHILDREN) do
  2384. if CHILD.ClassName == "Model" and CHILD ~= Character then
  2385. local HUM = CHILD:FindFirstChildOfClass("Humanoid")
  2386. if HUM then
  2387. local TORSO = CHILD:FindFirstChild("Torso") or CHILD:FindFirstChild("UpperTorso")
  2388. if TORSO then
  2389. if (TORSO.Position - POSITION).Magnitude <= RANGE then
  2390. if BRUTAL == true then
  2391. Kill(CHILD)
  2392. else
  2393. CHILD:BreakJoints()
  2394. end
  2395. end
  2396. end
  2397. end
  2398. end
  2399. end
  2400. end
  2401.  
  2402. --//=================================\\
  2403. --|| ATTACK FUNCTIONS AND STUFF
  2404. --\\=================================//
  2405. function Click()
  2406. ATTACK = true
  2407. Rooted = false
  2408. local HIT = nil
  2409. OFFSET = -45
  2410. for i=0, 1, 0.1 / Animation_Speed do
  2411. Swait()
  2412. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(5 - 2.5), RAD(0), RAD(45)), 0.15 / Animation_Speed)
  2413. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0.5) * ANGLES(RAD(90), RAD(0), RAD(12)) * RIGHTSHOULDERC0, 2 / Animation_Speed)
  2414. end
  2415. OFFSET = 45
  2416. local PUNCH = CreatePart(3, Effects, "Granite", 0, 1, "Really black", "Hit", VT(0.7,0.7,0.7),false)
  2417. PUNCH.CanCollide = true
  2418. CreateWeldOrSnapOrMotor("Weld", RightArm, RightArm, PUNCH, CF(0,-1,0), CF(0, 0, 0))
  2419. TAUNT = true
  2420. local TOUCH = PUNCH.Touched:Connect(function(hit)
  2421. if hit.Parent:FindFirstChildOfClass("Humanoid") then
  2422. HIT = hit.Parent
  2423. end
  2424. end)
  2425. for i=0, 0.3, 0.1 / Animation_Speed do
  2426. Swait()
  2427. RootPart.CFrame = RootPart.CFrame*CF(0,0,-0.3)
  2428. if HIT ~= nil then
  2429. break
  2430. end
  2431. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(5 - 2.5), RAD(0), RAD(-45)), 0.15 / Animation_Speed)
  2432. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.45, 0.5, -0.75) * ANGLES(RAD(90), RAD(0), RAD(35)) * RIGHTSHOULDERC0, 2 / Animation_Speed)
  2433. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(0), RAD(45), RAD(-12)) * ANGLES(RAD(-35), RAD(0), RAD(0)) * LEFTSHOULDERC0, 2 / Animation_Speed)
  2434. end
  2435. PUNCH:remove()
  2436. TOUCH:disconnect()
  2437. if HIT ~= nil then
  2438. for _, c in pairs(HIT:GetChildren()) do
  2439. if c:IsA("BasePart") then
  2440. c.Anchored = true
  2441. end
  2442. end
  2443. Rooted = true
  2444. CreateSound(649634100, Torso, 10, 0.8)
  2445. CreateSound(1368573150, RightArm, 3, 1.5)
  2446. for i=0, 0.6, 0.1 / Animation_Speed do
  2447. Swait()
  2448. WACKYEFFECT({EffectType = "Block", Size = VT(3,3,3)/3, Size2 = VT(1,1,1)/3, Transparency = 0.5, Transparency2 = 1, CFrame = RightArm.CFrame*CF(0,-1.3,0), MoveToPos = nil, RotationX = 0, RotationY = 0, RotationZ = 0, Material = "Neon", Color = C3(0,0,0), SoundID = nil, SoundPitch = 1, SoundVolume = 5})
  2449. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(5 - 2.5), RAD(25), RAD(-45)), 0.05 / Animation_Speed)
  2450. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.45, 0.5, -0.75) * ANGLES(RAD(90), RAD(0), RAD(35)) * RIGHTSHOULDERC0, 2 / Animation_Speed)
  2451. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(0), RAD(45), RAD(-12)) * ANGLES(RAD(-35), RAD(0), RAD(0)) * LEFTSHOULDERC0, 2 / Animation_Speed)
  2452. end
  2453. for _, c in pairs(HIT:GetChildren()) do
  2454. if c:IsA("BasePart") then
  2455. c.Anchored = false
  2456. end
  2457. end
  2458. KillChildren(HIT)
  2459. end
  2460. OFFSET = 0
  2461. ATTACK = false
  2462. Rooted = false
  2463. TAUNT = false
  2464. end
  2465.  
  2466. function Teleport()
  2467. ATTACK = true
  2468. Rooted = false
  2469. for i=0, 0.5, 0.1 / Animation_Speed do
  2470. Swait()
  2471. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(15 - 2.5 * SIN(SINE / 12)), RAD(0), RAD(0)), 1 / Animation_Speed)
  2472. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.6, 0.75, -0.5) * ANGLES(RAD(0), RAD(-25), RAD(12)) * ANGLES(RAD(125 - 2.5 * COS(SINE / 12) + 2.5 * SIN(SINE / 12)), RAD(0), RAD(0)) * RIGHTSHOULDERC0, 1.5 / Animation_Speed)
  2473. end
  2474. for e = 1, #BODY do
  2475. if BODY[e] ~= nil then
  2476. local STUFF = BODY[e]
  2477. local PART = STUFF[1]
  2478. if PART:IsA("BasePart") and PART ~= RootPart and PART.Name ~= "FaceGradient" and PART.Name ~= "Hair" and PART.Transparency ~= 1 then
  2479. local PRT = PART:Clone()
  2480. PRT.Anchored = true
  2481. PRT.CanCollide = false
  2482. PRT.Material = "Neon"
  2483. PRT.Color = C3(0,0,0)
  2484. PRT.Name = "WarpEffect"
  2485. PRT.Parent = Effects
  2486. PRT.CFrame = PART.CFrame
  2487. PRT:BreakJoints()
  2488. if PRT:FindFirstChildOfClass("Sound") then
  2489. PRT:FindFirstChildOfClass("Sound"):remove()
  2490. end
  2491. if PRT:FindFirstChildOfClass("Decal") then
  2492. PRT:FindFirstChildOfClass("Decal"):remove()
  2493. end
  2494. coroutine.resume(coroutine.create(function()
  2495. for i = 1, 100 do
  2496. Swait()
  2497. PRT.Transparency = PRT.Transparency + 1/100
  2498. end
  2499. PRT:remove()
  2500. end))
  2501. end
  2502. end
  2503. end
  2504. CreateSound(217767125, Torso, 10, 1)
  2505. local POS = RootPart.Orientation
  2506. RootPart.CFrame = CF(Mouse.Hit.p+VT(0,6,0))
  2507. RootPart.Orientation = POS
  2508. RootJoint.Parent = RootPart
  2509. for i=0, 0.5, 0.1 / Animation_Speed do
  2510. Swait()
  2511. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(15 - 2.5 * SIN(SINE / 12)), RAD(0), RAD(0)), 1 / Animation_Speed)
  2512. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.6, 0.75, -0.5) * ANGLES(RAD(0), RAD(-15), RAD(12)) * ANGLES(RAD(175 - 2.5 * COS(SINE / 12) + 2.5 * SIN(SINE / 12)), RAD(0), RAD(0)) * RIGHTSHOULDERC0, 2.5 / Animation_Speed)
  2513. end
  2514. for i=0, 0.1, 0.1 / Animation_Speed do
  2515. Swait()
  2516. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1, 0.5, 0.5) * ANGLES(RAD(0), RAD(-45), RAD(12)) * ANGLES(RAD(45 - 2.5 * COS(SINE / 12) + 2.5 * SIN(SINE / 12)), RAD(0), RAD(0)) * RIGHTSHOULDERC0, 0.75 / Animation_Speed)
  2517. end
  2518. ATTACK = false
  2519. Rooted = false
  2520. end
  2521.  
  2522. function SpawnSmite(POS)
  2523. local HITFLOOR,HITPOS = Raycast(POS+VT(0,1,0), (CF(POS, POS + VT(0, -1, 0))).lookVector, 100, Character)
  2524. local EMITPOS = HITPOS
  2525. if HITFLOOR ~= nil then
  2526. if HITFLOOR.Parent:FindFirstChildOfClass("Humanoid") then
  2527. HITFLOOR,HITPOS = Raycast(POS+VT(0,1,0), (CF(POS, POS + VT(0, -1, 0))).lookVector, 100, HITFLOOR.Parent)
  2528. EMITPOS = HITPOS
  2529. elseif HITFLOOR.Parent.Parent:FindFirstChildOfClass("Humanoid") then
  2530. HITFLOOR,HITPOS = Raycast(POS+VT(0,1,0), (CF(POS, POS + VT(0, -1, 0))).lookVector, 100, HITFLOOR.Parent.Parent)
  2531. EMITPOS = HITPOS
  2532. end
  2533. end
  2534. if HITFLOOR ~= nil then
  2535. ApplyAoE(EMITPOS,10)
  2536. WACKYEFFECT({EffectType = "Sphere", Size = VT(0,100000,0), Size2 = VT(10,100000,10), Transparency = 0, Transparency2 = 1, CFrame = CF(EMITPOS) * ANGLES(RAD(MRANDOM(-15,15)), RAD(0), RAD(MRANDOM(-15,15))), MoveToPos = nil, RotationX = 0, RotationY = 0, RotationZ = 0, Material = "Neon", Color = C3(0,0,0), SoundID = 419011114, SoundPitch = 1, SoundVolume = 5})
  2537. WACKYEFFECT({EffectType = "Block", Size = VT(0,0,0), Size2 = VT(10,10,10)*2, Transparency = 0, Transparency2 = 1, CFrame = CF(EMITPOS), MoveToPos = nil, RotationX = 0, RotationY = 0, RotationZ = 0, Material = "Neon", Color = C3(0,0,0), SoundID = nil, SoundPitch = 1, SoundVolume = 5})
  2538. WACKYEFFECT({EffectType = "Block", Size = VT(0,0,0), Size2 = VT(10,10,10)*1.5, Transparency = 0, Transparency2 = 1, CFrame = CF(EMITPOS), MoveToPos = nil, RotationX = 0, RotationY = 0, RotationZ = 0, Material = "Neon", Color = C3(0,0,0), SoundID = nil, SoundPitch = 1, SoundVolume = 5})
  2539. for i = 1, 5 do
  2540. local TOPOS = CF(EMITPOS)*ANGLES(RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)))*CF(0,0,12)
  2541. WACKYEFFECT({EffectType = "Slash", Size = VT(0,0,0), Size2 = VT(0.2,0,0.2), Transparency = 0, Transparency2 = 1, CFrame = CF(EMITPOS,TOPOS.p) * ANGLES(RAD(90), RAD(0), RAD(0)), MoveToPos = TOPOS.p, RotationX = 0, RotationY = 0, RotationZ = 0, Material = "Neon", Color = C3(0,0,0), SoundID = 419011114, SoundPitch = 1, SoundVolume = 5})
  2542. end
  2543. end
  2544. end
  2545.  
  2546. function SpawnMeteor(POS,SIZE,ISDEBREE,ORIPOS)
  2547. coroutine.resume(coroutine.create(function()
  2548. local METEOR = IT("Model",Effects)
  2549. METEOR.Name = "Meteorite"
  2550. local CENTER = CreatePart(3, METEOR, "Granite", 0, 0, "Really black", "MeteorCenter", VT(5,5,5)*SIZE)
  2551. METEOR.PrimaryPart = CENTER
  2552. local PRT = CreatePart(3, METEOR, "Granite", 0, 0, "Really black", "MeteorCenter", VT(5,5,5)*SIZE)
  2553. PRT.CFrame = CENTER.CFrame*ANGLES(RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)))
  2554. for i = 1, 15 do
  2555. local FIRE = CreatePart(3, METEOR, "Neon", 0, 0, "Really black", "Fire", VT(5.1,1,5.1)*SIZE)
  2556. FIRE.CFrame = CENTER.CFrame*ANGLES(RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)))
  2557. end
  2558. if ISDEBREE ~= true then
  2559. METEOR:SetPrimaryPartCFrame(CF(POS) * ANGLES(RAD(MRANDOM(-15,15)), RAD(0), RAD(MRANDOM(-15,15)))*CF(0,500,0) * ANGLES(RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360))))
  2560. else
  2561. METEOR:SetPrimaryPartCFrame(CF(ORIPOS,POS) * ANGLES(RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360))))
  2562. end
  2563. local IMPACT = false
  2564. CreateSound(463593339, CENTER, 10, 0.6)
  2565. if SIZE >= 3.5 then
  2566. for i = 1, MRANDOM(3,7) do
  2567. SpawnMeteor(CF(POS) * ANGLES(RAD(0), RAD(MRANDOM(0,360)), RAD(0))*CF(0,0,SIZE*12).p,SIZE/MRANDOM(4,5),true,CENTER.CFrame*ANGLES(RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)))*CF(0,0,SIZE*15).p)
  2568. end
  2569. end
  2570. for i = 1, 200 do
  2571. Swait()
  2572. local HITFLOOR,HITPOS = Raycast(CENTER.Position, CF(CENTER.Position,POS).lookVector, 3, Character)
  2573. if HITFLOOR == nil then
  2574. local ORI = CENTER.Orientation
  2575. METEOR:SetPrimaryPartCFrame(CF(HITPOS) * ANGLES(RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360))))
  2576. else
  2577. if HITFLOOR.Anchored == true then
  2578. CreateDebreeRing(HITFLOOR,HITPOS,30*SIZE,VT(6,6,6)*SIZE,5)
  2579. CreateFlyingDebree(HITFLOOR,CF(HITPOS),8,VT(4,4,4)*SIZE,5,175)
  2580. end
  2581. IMPACT = true
  2582. break
  2583. end
  2584. end
  2585. if IMPACT == true then
  2586. WACKYEFFECT({EffectType = "Block", Size = CENTER.Size, Size2 = VT(10,10,10)*4*SIZE, Transparency = 0, Transparency2 = 1, CFrame = CF(CENTER.Position), MoveToPos = nil, RotationX = 0, RotationY = 0, RotationZ = 0, Material = "Neon", Color = C3(0,0,0), SoundID = 130972023, SoundPitch = 1, SoundVolume = 5})
  2587. WACKYEFFECT({EffectType = "Block", Size = CENTER.Size, Size2 = VT(10,10,10)*3*SIZE, Transparency = 0, Transparency2 = 1, CFrame = CF(CENTER.Position), MoveToPos = nil, RotationX = 0, RotationY = 0, RotationZ = 0, Material = "Neon", Color = C3(0,0,0), SoundID = 201858144, SoundPitch = 1, SoundVolume = 5})
  2588. WACKYEFFECT({EffectType = "Sphere", Size = VT(SIZE*20,0,SIZE*20), Size2 = VT(0,SIZE*750,0), Transparency = 0, Transparency2 = 1, CFrame = CF(CENTER.Position), MoveToPos = nil, RotationX = 0, RotationY = 0, RotationZ = 0, Material = "Neon", Color = C3(0,0,0), SoundID = 130972023, SoundPitch = 1, SoundVolume = 5})
  2589. ApplyAoE(CENTER.Position,30*SIZE)
  2590. end
  2591. METEOR:remove()
  2592. end))
  2593. end
  2594. function Equivalent_Pain()
  2595. local HITFLOOR,HITPOS = Raycast(RootPart.Position, (CF(RootPart.Position, RootPart.Position + VT(0, -1, 0))).lookVector, 4, Character)
  2596. if HITFLOOR then
  2597. ATTACK = true
  2598. Rooted = true
  2599. FULL = true
  2600. local GYRO = IT("BodyGyro",RootPart)
  2601. GYRO.D = 25
  2602. GYRO.P = 20000
  2603. GYRO.MaxTorque = VT(0,math.huge,0)
  2604. for i=0, 0.3, 0.1 / Animation_Speed do
  2605. GYRO.cframe = CF(RootPart.Position,Mouse.Hit.p)
  2606. Swait()
  2607. RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0 + 0.05 * COS(SINE / 12)) * ANGLES(RAD(-25), RAD(0), RAD(-15)), 1 / Animation_Speed)
  2608. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(0 - 2.5 * SIN(SINE / 12)), RAD(0), RAD(0)), 1 / Animation_Speed)
  2609. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0.3) * ANGLES(RAD(90), RAD(0), RAD(12)) * RIGHTSHOULDERC0, 1 / Animation_Speed)
  2610. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(0), RAD(45), RAD(-12)) * ANGLES(RAD(-25), RAD(0), RAD(0)) * LEFTSHOULDERC0, 1 / Animation_Speed)
  2611. RightHip.C0 = Clerp(RightHip.C0, CF(1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(-35)), 1 / Animation_Speed)
  2612. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(-75), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(5)), 1 / Animation_Speed)
  2613. end
  2614. GYRO:remove()
  2615. CreateSound(12222200, RightArm, 10, 1)
  2616. for i=0, 0.4, 0.1 / Animation_Speed do
  2617. Swait()
  2618. RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, -0.3, -0.75) * ANGLES(RAD(40), RAD(0), RAD(35)), 1.5 / Animation_Speed)
  2619. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(-15 - 2.5 * SIN(SINE / 12)), RAD(0), RAD(0)), 1 / Animation_Speed)
  2620. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.45, -1.45) * ANGLES(RAD(75), RAD(0), RAD(35)) * RIGHTSHOULDERC0, 2 / Animation_Speed)
  2621. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(0), RAD(-25), RAD(-12)) * ANGLES(RAD(-35), RAD(55), RAD(0)) * LEFTSHOULDERC0, 2 / Animation_Speed)
  2622. RightHip.C0 = Clerp(RightHip.C0, CF(1, -0.3, -0.5) * ANGLES(RAD(0), RAD(55), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(65)), 1 / Animation_Speed)
  2623. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -0.6, -0.2) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(-15)), 1 / Animation_Speed)
  2624. end
  2625. CreateSound(289842971, RightArm, 10, 1)
  2626. coroutine.resume(coroutine.create(function()
  2627. local HIT,POS = Raycast(Mouse.Hit.p+VT(0,1,0), (CF(Mouse.Hit.p+VT(0,1,0), Mouse.Hit.p-VT(0,1,0))).lookVector, 45, Character)
  2628. local ECHO = POS
  2629. if HITFLOOR.Parent:FindFirstChildOfClass("Humanoid") then
  2630. HIT,POS = Raycast(ECHO+VT(0,1,0), (CF(ECHO, ECHO + VT(0, -1, 0))).lookVector, 100, HITFLOOR.Parent)
  2631. ECHO = POS
  2632. elseif HITFLOOR.Parent.Parent:FindFirstChildOfClass("Humanoid") then
  2633. HIT,POS = Raycast(ECHO+VT(0,1,0), (CF(ECHO, ECHO + VT(0, -1, 0))).lookVector, 100, HITFLOOR.Parent.Parent)
  2634. ECHO = POS
  2635. end
  2636. if ECHO.Y == HITPOS.Y then
  2637. local DISTANCE = (HITPOS - ECHO).Magnitude/3
  2638. local CFRAME = CF(HITPOS,ECHO)
  2639. local RANGE = math.ceil(DISTANCE)
  2640. for i = 1, RANGE-1 do
  2641. Swait(3)
  2642. local A = CFRAME*CF(0,0,-i*3)
  2643. ApplyAoE(A.p,4)
  2644. CreateFlyingDebree(HITFLOOR,A,2,VT(2,2,2),2,65)
  2645. end
  2646. local SIZE = 3
  2647. local POS = CFRAME*CF(0,0,-RANGE*3).p
  2648. WACKYEFFECT({Time = 75, EffectType = "Sphere", Size = VT(55,0,55)*SIZE, Size2 = VT(55,15,55)*SIZE, Transparency = 0, Transparency2 = 1, CFrame = CF(POS), MoveToPos = nil, RotationX = 0, RotationY = 0, RotationZ = 0, Material = "Neon", Color = C3(0,0,0), SoundID = 130972023, SoundPitch = 0.8, SoundVolume = 10})
  2649. WACKYEFFECT({EffectType = "Sphere", Size = VT(10,250,10)*SIZE, Size2 = VT(20,1000,20)*SIZE, Transparency = 0, Transparency2 = 1, CFrame = CF(POS), MoveToPos = nil, RotationX = 0, RotationY = 0, RotationZ = 0, Material = "Neon", Color = C3(0,0,0), SoundID = 178452241, SoundPitch = 1, SoundVolume = 10})
  2650. WACKYEFFECT({EffectType = "Sphere", Size = VT(30,150,30)*SIZE, Size2 = VT(50,300,50)*SIZE, Transparency = 0, Transparency2 = 1, CFrame = CF(POS), MoveToPos = nil, RotationX = 0, RotationY = 0, RotationZ = 0, Material = "Neon", Color = C3(0,0,0), SoundID = 178452241, SoundPitch = 1, SoundVolume = 10})
  2651. for i = 1, 9 do
  2652. WACKYEFFECT({TIME = 65, EffectType = "Sphere", Size = VT(5,5,0)*SIZE, Size2 = VT(0,0,35)*SIZE, Transparency = 0, Transparency2 = 1, CFrame = CF(POS+VT(0,15*SIZE,0))*ANGLES(RAD(0),RAD((360/9)*i),RAD(0))*ANGLES(RAD(25),RAD(0),RAD(0))*CF(0,0,-25*SIZE), MoveToPos = CF(POS+VT(0,15*SIZE,0))*ANGLES(RAD(0),RAD((360/9)*i),RAD(0))*ANGLES(RAD(25),RAD(0),RAD(0))*CF(0,0,-55*SIZE).p, RotationX = 0, RotationY = 0, RotationZ = 0, Material = "Neon", Color = C3(0,0,0), SoundID = nil, SoundPitch = 0.8, SoundVolume = 5})
  2653. end
  2654. for i = 1, 9 do
  2655. WACKYEFFECT({TIME = 65, EffectType = "Sphere", Size = VT(5,5,0)*SIZE, Size2 = VT(0,0,35)*SIZE, Transparency = 0, Transparency2 = 1, CFrame = CF(POS+VT(0,5*SIZE,0))*ANGLES(RAD(0),RAD((360/9)*i),RAD(0))*ANGLES(RAD(25),RAD(0),RAD(0))*CF(0,0,-25*SIZE), MoveToPos = CF(POS+VT(0,5*SIZE,0))*ANGLES(RAD(0),RAD((360/9)*i),RAD(0))*ANGLES(RAD(25),RAD(0),RAD(0))*CF(0,0,-55*SIZE).p, RotationX = 0, RotationY = 0, RotationZ = 0, Material = "Neon", Color = C3(0,0,0), SoundID = nil, SoundPitch = 0.8, SoundVolume = 5})
  2656. end
  2657. ApplyAoE(POS,30*SIZE)
  2658. CreateDebreeRing(HITFLOOR,POS,30*SIZE,VT(8,8,8)*SIZE,5)
  2659. CreateDebreeRing(HITFLOOR,POS,50*SIZE,VT(2,2,2)*SIZE,5)
  2660. end
  2661. end))
  2662. for i=0, 0.6, 0.1 / Animation_Speed do
  2663. Swait()
  2664. RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, -0.3, -0.75) * ANGLES(RAD(40), RAD(0), RAD(35)), 1.5 / Animation_Speed)
  2665. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(-15 - 2.5 * SIN(SINE / 12)), RAD(0), RAD(0)), 1 / Animation_Speed)
  2666. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.45, -1.45) * ANGLES(RAD(75), RAD(0), RAD(35)) * RIGHTSHOULDERC0, 2 / Animation_Speed)
  2667. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(0), RAD(-25), RAD(-12)) * ANGLES(RAD(-35), RAD(55), RAD(0)) * LEFTSHOULDERC0, 2 / Animation_Speed)
  2668. RightHip.C0 = Clerp(RightHip.C0, CF(1, -0.3, -0.5) * ANGLES(RAD(0), RAD(55), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(65)), 1 / Animation_Speed)
  2669. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -0.6, -0.2) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(-15)), 1 / Animation_Speed)
  2670. end
  2671. FULL = false
  2672. ATTACK = false
  2673. Rooted = false
  2674. end
  2675. end
  2676.  
  2677. function ReeeEEEEEE()
  2678. ATTACK = true
  2679. Rooted = false
  2680. Speed = 12
  2681. local FX = CreateSound(198165368, Head, 4, 0.5, false)
  2682. repeat
  2683. Swait()
  2684. FX.Parent = Head
  2685. local CHILDREN = workspace:GetDescendants()
  2686. for index, CHILD in pairs(CHILDREN) do
  2687. if CHILD.ClassName == "Model" and CHILD ~= Character then
  2688. local HUM = CHILD:FindFirstChildOfClass("Humanoid")
  2689. if HUM then
  2690. local TORSO = CHILD:FindFirstChild("Head")
  2691. if TORSO then
  2692. if (TORSO.Position - Head.Position).Magnitude <= 25 then
  2693. WACKYEFFECT({Time = 45, EffectType = "Sphere", Size = VT(1,1,1), Size2 = VT(5,5,5), Transparency = 0, Transparency2 = 1, CFrame = CF(TORSO.Position), MoveToPos = nil, RotationX = 0, RotationY = 0, RotationZ = 0, Material = "Neon", Color = C3(0,0,0), SoundID = nil, SoundPitch = nil, SoundVolume = nil})
  2694. TORSO:remove()
  2695. if CHILD:FindFirstChild("Torso") then
  2696. Ragdoll(CHILD,Torso,true)
  2697. elseif CHILD:FindFirstChild("UpperTorso") then
  2698. R15Ragdoll(CHILD,true)
  2699. end
  2700. end
  2701. end
  2702. end
  2703. end
  2704. end
  2705. RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0.5, 0) * ANGLES(RAD(-45), RAD(0), RAD(0)), 1 / Animation_Speed)
  2706. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(-45), RAD(0), RAD(0)), 1 / Animation_Speed)
  2707. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(-35), RAD(0), RAD(15)) * ANGLES(RAD(0), RAD(15), RAD(0)) * RIGHTSHOULDERC0, 1 / Animation_Speed)
  2708. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(-35), RAD(0), RAD(-15)) * ANGLES(RAD(0), RAD(-15), RAD(0)) * LEFTSHOULDERC0, 1 / Animation_Speed)
  2709. RightHip.C0 = Clerp(RightHip.C0, CF(1, -1, 0) * ANGLES(RAD(-45), RAD(80), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed)
  2710. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, 0) * ANGLES(RAD(-45), RAD(-80), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed)
  2711. until FX.Playing == false
  2712. Speed = 16
  2713. ATTACK = false
  2714. Rooted = false
  2715. end
  2716.  
  2717. function Charge(TIME,GYRO)
  2718. local SND = CreateSound(ENERGYSOUND,Torso,6,TIME,false)
  2719. local G = nil
  2720. if GYRO == true then
  2721. G = IT("BodyGyro",RootPart)
  2722. G.D = 250
  2723. G.P = 200000
  2724. G.MaxTorque = VT(math.huge,math.huge,math.huge)
  2725. end
  2726. for i=0, TIME, 0.1 / Animation_Speed do
  2727. Swait()
  2728. if G then
  2729. G.cframe = CF(RootPart.Position,Mouse.Hit.p)
  2730. end
  2731. WACKYEFFECT({TIME = 25, EffectType = "Sphere", Size = VT(1.2,1.2,1.2), Size2 = VT(0,0,0), Transparency = 0.5, Transparency2 = 1, CFrame = BasePart.CFrame, MoveToPos = BasePart.CFrame*ANGLES(RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)))*CF(0,0,-4).p, RotationX = 0, RotationY = 0, RotationZ = 0, Material = "Neon", Color = SKILLTEXTCOLOR, SoundID = nil, SoundPitch = nil, SoundVolume = nil})
  2732. 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)
  2733. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(15 - 2.5 * SIN(SINE / 12)), RAD(0), RAD(0)), 0.15 / Animation_Speed)
  2734. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.25, 0.5, -0.5) * ANGLES(RAD(90), RAD(0), RAD(-45)) * RIGHTSHOULDERC0, 2 / Animation_Speed)
  2735. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.25, 0.5, -0.5) * ANGLES(RAD(90), RAD(0), RAD(45)) * LEFTSHOULDERC0, 2 / Animation_Speed)
  2736. RightHip.C0 = Clerp(RightHip.C0, CF(1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), 0.15 / Animation_Speed)
  2737. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), 0.15 / Animation_Speed)
  2738. end
  2739. SND:remove()
  2740. if G then
  2741. return G
  2742. end
  2743. end
  2744.  
  2745. function Corrupted_Beam()
  2746. ATTACK = true
  2747. Rooted = false
  2748. local GRAV = IT("BodyPosition",RootPart)
  2749. GRAV.D = 75
  2750. GRAV.P = 20000
  2751. GRAV.MaxForce = VT(math.huge,math.huge,math.huge)
  2752. GRAV.Position = RootPart.Position
  2753. local GYRO = Charge(2,true)
  2754. local BEAM = CreatePart(3, Effects, "Neon", 0, 0, "Black", "Beam", VT(15,15,0))
  2755. MakeForm(BEAM,"Ball")
  2756. CreateSound(BEAMSOUND,BEAM,10,1,false)
  2757. CreateSound(BEAMSOUND,BEAM,10,0.9,false)
  2758. CreateSound(BEAMSOUND,BEAM,10,0.8,false)
  2759. for i = 1, 150 do
  2760. Swait()
  2761. BEAM.Size = BEAM.Size + VT(-0.1,-0.1,2)
  2762. ApplyAoE(BEAM.CFrame*CF(0,0,-BEAM.Size.Z/2).p,BEAM.Size.Y/2,50,200,0,false)
  2763. WACKYEFFECT({TIME = 25, EffectType = "Sphere", Size = VT(3,3,3), Size2 = VT(0,0,0), Transparency = 0.5, Transparency2 = 1, CFrame = BEAM.CFrame*CF(0,0,BEAM.Size.Z/2), MoveToPos = BEAM.CFrame*CF(0,0,BEAM.Size.Z/2)*ANGLES(RAD(90),RAD(MRANDOM(0,360)),RAD(0))*CF(0,0.3,-25).p, RotationX = 0, RotationY = 0, RotationZ = 0, Material = "Neon", Color = SKILLTEXTCOLOR, SoundID = nil, SoundPitch = nil, SoundVolume = nil})
  2764. BEAM.CFrame = CF(Torso.Position,Torso.CFrame*CF(0,0,-1).p)*CF(0,0,-2-(BEAM.Size.Z/2))
  2765. 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)
  2766. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(0 - 2.5 * SIN(SINE / 12)), RAD(0), RAD(0)), 0.15 / Animation_Speed)
  2767. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, -0.5) * ANGLES(RAD(90), RAD(0), RAD(12)) * RIGHTSHOULDERC0, 2 / Animation_Speed)
  2768. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, -0.5) * ANGLES(RAD(90), RAD(0), RAD(-12)) * LEFTSHOULDERC0, 2 / Animation_Speed)
  2769. RightHip.C0 = Clerp(RightHip.C0, CF(1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), 0.15 / Animation_Speed)
  2770. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), 0.15 / Animation_Speed)
  2771. end
  2772. GRAV:remove()
  2773. BEAM:remove()
  2774. GYRO:remove()
  2775. ATTACK = false
  2776. Rooted = false
  2777. end
  2778.  
  2779. function Corrupted_Explosion()
  2780. ATTACK = true
  2781. Rooted = true
  2782. for i=0, 1, 0.1 / Animation_Speed do
  2783. Swait()
  2784. RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, -0.3, 0) * ANGLES(RAD(0), RAD(0), RAD(-75)), 0.6 / Animation_Speed)
  2785. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(0), RAD(0), RAD(75)), 0.6 / Animation_Speed)
  2786. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(90), RAD(0), RAD(15)) * RIGHTSHOULDERC0, 0.3 / Animation_Speed)
  2787. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(0), RAD(0), RAD(-90)) * LEFTSHOULDERC0, 0.1 / Animation_Speed)
  2788. RightHip.C0 = Clerp(RightHip.C0, CF(1, -1, -0.01) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(-15), RAD(0), RAD(0)), 0.5 / Animation_Speed)
  2789. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, -0.01) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(-15), RAD(0), RAD(0)), 0.5 / Animation_Speed)
  2790. end
  2791. for i=0, 0.4, 0.1 / Animation_Speed do
  2792. Swait()
  2793. RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, -1, -0.3) * ANGLES(RAD(75), RAD(0), RAD(75)), 1 / Animation_Speed)
  2794. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(0), RAD(0), RAD(-75)), 1/ Animation_Speed)
  2795. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(0), RAD(0), RAD(90)) * RIGHTSHOULDERC0, 1 / Animation_Speed)
  2796. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(0), RAD(0), RAD(0)) * LEFTSHOULDERC0, 1 / Animation_Speed)
  2797. RightHip.C0 = Clerp(RightHip.C0, CF(1, -0.5, -0.01) * ANGLES(RAD(75), RAD(25), RAD(0)) * ANGLES(RAD(-35), RAD(0), RAD(0)), 1 / Animation_Speed)
  2798. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, -0.01) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(-15), RAD(0), RAD(0)), 1 / Animation_Speed)
  2799. end
  2800. local BEAM = CreatePart(3, Effects, "Neon", 0, 0, "Black", "Beam", VT(0,0,0))
  2801. local BEAM2 = CreatePart(3, Effects, "Neon", 0, 0, "Black", "Beam", VT(0,0,0))
  2802. MakeForm(BEAM,"Ball")
  2803. MakeForm(BEAM2,"Ball")
  2804. BEAM.CFrame = CF(RootPart.Position)
  2805. BEAM2.CFrame = CF(RootPart.Position)
  2806. CreateSound(EXPLOSIONSOUND,RootPart,10,1,false)
  2807. for i=1, 100 do
  2808. Swait()
  2809. BEAM.Size = BEAM.Size + VT(0.7,8,0.7)
  2810. BEAM2.Size = BEAM2.Size + VT(2,2,2)
  2811. ApplyAoE(BEAM2.Position,BEAM2.Size.Z/2,5,5,15,true)
  2812. BEAM.CFrame = CF(RootPart.Position)
  2813. BEAM2.CFrame = CF(RootPart.Position)
  2814. WACKYEFFECT({TIME = 5+i, EffectType = "Swirl", Size = BEAM2.Size*1.15, Size2 = VT(0,BEAM.Size.Y,0), Transparency = 0.8, Transparency2 = 1, CFrame = BEAM.CFrame * ANGLES(RAD(0), RAD(i*5), RAD(0)), MoveToPos = nil, RotationX = 0, RotationY = i/8, RotationZ = 0, Material = "Neon", Color = SKILLTEXTCOLOR, SoundID = nil, SoundPitch = nil, SoundVolume = nil})
  2815. RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, -1, -0.3) * ANGLES(RAD(75), RAD(0), RAD(75)), 1 / Animation_Speed)
  2816. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(0), RAD(0), RAD(-75)), 1/ Animation_Speed)
  2817. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(0), RAD(0), RAD(90)) * RIGHTSHOULDERC0, 1 / Animation_Speed)
  2818. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(0), RAD(0), RAD(0)) * LEFTSHOULDERC0, 1 / Animation_Speed)
  2819. RightHip.C0 = Clerp(RightHip.C0, CF(1, -0.5, -0.01) * ANGLES(RAD(75), RAD(25), RAD(0)) * ANGLES(RAD(-35), RAD(0), RAD(0)), 1 / Animation_Speed)
  2820. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, -0.01) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(-15), RAD(0), RAD(0)), 1 / Animation_Speed)
  2821. end
  2822. WACKYEFFECT({TIME = 75, EffectType = "Sphere", Size = BEAM.Size, Size2 = VT(0,BEAM.Size.Y,0), Transparency = 0, Transparency2 = 0, CFrame = BEAM.CFrame, MoveToPos = nil, RotationX = 0, RotationY = 0, RotationZ = 0, Material = "Neon", Color = SKILLTEXTCOLOR, SoundID = nil, SoundPitch = nil, SoundVolume = nil})
  2823. WACKYEFFECT({TIME = 75, EffectType = "Sphere", Size = BEAM2.Size, Size2 = VT(0,0,0), Transparency = 0, Transparency2 = 0.6, CFrame = BEAM2.CFrame, MoveToPos = nil, RotationX = 0, RotationY = 0, RotationZ = 0, Material = "Neon", Color = SKILLTEXTCOLOR, SoundID = nil, SoundPitch = nil, SoundVolume = nil})
  2824. BEAM2:remove()
  2825. BEAM:remove()
  2826. ATTACK = false
  2827. Rooted = false
  2828. end
  2829.  
  2830. function Corrupted_Immobilization()
  2831. ATTACK = true
  2832. Rooted = true
  2833. Charge(2,false)
  2834. local SND = CreateSound(EXPLOSIONSOUND,RootPart,10,1,false)
  2835. local SND2 = CreateSound(ENERGYSOUND,RootPart,10,1,false)
  2836. for i = 1, 60 do
  2837. Swait()
  2838. ApplyAoE(RootPart.Position,i*1.3,10,20,-200,true)
  2839. SND.Pitch = SND.Pitch - 1/60
  2840. SND2.Pitch = SND.Pitch
  2841. WACKYEFFECT({TIME = 4, EffectType = "Wave", Size = VT(i*2,10,i*2), Size2 = VT(i*2,10,i*2), Transparency = 0.9, Transparency2 = 1, CFrame = CF(RootPart.Position-VT(0,3,0)) * ANGLES(RAD(0), RAD(i*5), RAD(0)), MoveToPos = nil, RotationX = 0, RotationY = i/8, RotationZ = 0, Material = "Neon", Color = SKILLTEXTCOLOR, SoundID = nil, SoundPitch = nil, SoundVolume = nil})
  2842. WACKYEFFECT({TIME = math.ceil(15-(i/10)), EffectType = "Wave", Size = VT(0,10,0), Size2 = VT(i*2,6,i*2), Transparency = 0.8, Transparency2 = 1, CFrame = CF(RootPart.Position-VT(0,3,0)) * ANGLES(RAD(0), RAD(i*5), RAD(0)), MoveToPos = nil, RotationX = 0, RotationY = i/8, RotationZ = 0, Material = "Neon", Color = SKILLTEXTCOLOR, SoundID = nil, SoundPitch = nil, SoundVolume = nil})
  2843. WACKYEFFECT({TIME = math.ceil(15-(i/10)), EffectType = "Wave", Size = VT(0,6,0), Size2 = VT(i*1.6,10,i*1.6), Transparency = 0.8, Transparency2 = 1, CFrame = CF(RootPart.Position-VT(0,3,0)) * ANGLES(RAD(MRANDOM(-5,5)), RAD(i*5), RAD(MRANDOM(-5,5))), MoveToPos = nil, RotationX = 0, RotationY = i/8, RotationZ = 0, Material = "Neon", Color = SKILLTEXTCOLOR, SoundID = nil, SoundPitch = nil, SoundVolume = nil})
  2844. RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0 + 0.05 * COS(SINE / 12)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed)
  2845. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(-15 - 2.5 * SIN(SINE / 12)), RAD(0), RAD(0)), 1 / Animation_Speed)
  2846. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(-45), RAD(-45), RAD(45)) * RIGHTSHOULDERC0, 1 / Animation_Speed)
  2847. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(-45), RAD(45), RAD(-45)) * LEFTSHOULDERC0, 1 / Animation_Speed)
  2848. RightHip.C0 = Clerp(RightHip.C0, CF(1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(65), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), 1 / Animation_Speed)
  2849. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(-65), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), 1 / Animation_Speed)
  2850. end
  2851. SND:remove()
  2852. SND2:remove()
  2853. ATTACK = false
  2854. Rooted = false
  2855. end
  2856.  
  2857. --//=================================\\
  2858. --|| ASSIGN THINGS TO KEYS
  2859. --\\=================================//
  2860.  
  2861. function MouseDown(Mouse)
  2862. if ATTACK == false then
  2863. Click()
  2864. end
  2865. end
  2866.  
  2867. function MouseUp(Mouse)
  2868. HOLD = false
  2869. end
  2870.  
  2871. function KeyDown(Key)
  2872. KEYHOLD = true
  2873. if Key == "z" and ATTACK == false then
  2874. Corrupted_Beam()
  2875. end
  2876.  
  2877. if Key == "e" and ATTACK == false then
  2878. ReeeEEEEEE()
  2879. end
  2880.  
  2881. if Key == "r" and ATTACK == false then
  2882. Teleport()
  2883. end
  2884.  
  2885. if Key == "q" and ATTACK == false then
  2886. Equivalent_Pain()
  2887. end
  2888.  
  2889. if Key == "x" and ATTACK == false then
  2890. Corrupted_Explosion()
  2891. end
  2892.  
  2893. if Key == "c" and ATTACK == false then
  2894. Corrupted_Immobilization()
  2895. elseif Key == "1" and ATTACK == false then
  2896. if CHOICE ~= 1 then
  2897. CHOICE = 1
  2898. sick:Play()
  2899. end
  2900. elseif Key == "2" and ATTACK == false then
  2901. if CHOICE ~= 2 then
  2902. CHOICE = 2
  2903. sick:Play()
  2904. end
  2905. elseif Key == "3" and ATTACK == false then
  2906. if CHOICE ~= 3 then
  2907. CHOICE = 3
  2908. sick:Play()
  2909. end
  2910. elseif Key == "4" and ATTACK == false then
  2911. if CHOICE ~= 4 then
  2912. CHOICE = 4
  2913. sick:Play()
  2914. end
  2915.  
  2916. end
  2917. end
  2918.  
  2919.  
  2920.  
  2921. function KeyUp(Key)
  2922. KEYHOLD = false
  2923. end
  2924.  
  2925. Mouse.Button1Down:connect(function(NEWKEY)
  2926. MouseDown(NEWKEY)
  2927. end)
  2928. Mouse.Button1Up:connect(function(NEWKEY)
  2929. MouseUp(NEWKEY)
  2930. end)
  2931. Mouse.KeyDown:connect(function(NEWKEY)
  2932. KeyDown(NEWKEY)
  2933. end)
  2934. Mouse.KeyUp:connect(function(NEWKEY)
  2935. KeyUp(NEWKEY)
  2936. end)
  2937.  
  2938. --//=================================\\
  2939. --\\=================================//
  2940.  
  2941. function unanchor()
  2942. if UNANCHOR == true then
  2943. g = Character:GetChildren()
  2944. for i = 1, #g do
  2945. if g[i].ClassName == "Part" then
  2946. g[i].Anchored = false
  2947. end
  2948. end
  2949. end
  2950. end
  2951.  
  2952. --//=================================\\
  2953. --|| WRAP THE WHOLE SCRIPT UP
  2954. --\\=================================//
  2955.  
  2956. Humanoid.Changed:connect(function(Jump)
  2957. if Jump == "Jump" and (Disable_Jump == true) then
  2958. Humanoid.Jump = false
  2959. end
  2960. end)
  2961.  
  2962. while true do
  2963. Swait()
  2964. script.Parent = WEAPONGUI
  2965. ANIMATE.Parent = nil
  2966. if Humanoid then
  2967. local IDLEANIMATION = Humanoid:LoadAnimation(ROBLOXIDLEANIMATION)
  2968. IDLEANIMATION:Play()
  2969. end
  2970. SINE = SINE + CHANGE
  2971. local TORSOVELOCITY = (RootPart.Velocity * VT(1, 0, 1)).magnitude
  2972. local TORSOVERTICALVELOCITY = RootPart.Velocity.y
  2973. local HITFLOOR = Raycast(RootPart.Position, (CF(RootPart.Position, RootPart.Position + VT(0, -1, 0))).lookVector, 4, Character)
  2974. local WALKSPEEDVALUE = 5 / (Humanoid.WalkSpeed / 16)
  2975. if ANIM == "Walk" and TORSOVELOCITY > 1 then
  2976. RootJoint.C1 = Clerp(RootJoint.C1, ROOTC0 * CF(0, 0, -0.15 * COS(SINE / (WALKSPEEDVALUE / 2))) * ANGLES(RAD(0), RAD(0) - RootPart.RotVelocity.Y / 75, RAD(0)), 2 * (Humanoid.WalkSpeed / 16) / Animation_Speed)
  2977. Neck.C1 = Clerp(Neck.C1, CF(0, -0.5, 0) * ANGLES(RAD(-90), RAD(0), RAD(180)) * ANGLES(RAD(2.5 * SIN(SINE / (WALKSPEEDVALUE / 2))), RAD(0), RAD(0) - Head.RotVelocity.Y / 30), 0.2 * (Humanoid.WalkSpeed / 16) / Animation_Speed)
  2978. RightHip.C1 = Clerp(RightHip.C1, CF(0.5, 0.875 - 0.125 * SIN(SINE / WALKSPEEDVALUE) - 0.15 * COS(SINE / WALKSPEEDVALUE*2), -0.125 * COS(SINE / WALKSPEEDVALUE) +0.2+ 0.2 * COS(SINE / WALKSPEEDVALUE)) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0) - RightLeg.RotVelocity.Y / 75, RAD(0), RAD(45 * COS(SINE / WALKSPEEDVALUE))), 1 / Animation_Speed)
  2979. LeftHip.C1 = Clerp(LeftHip.C1, CF(-0.5, 0.875 + 0.125 * SIN(SINE / WALKSPEEDVALUE) - 0.15 * COS(SINE / WALKSPEEDVALUE*2), 0.125 * COS(SINE / WALKSPEEDVALUE) +0.2+ -0.2 * COS(SINE / WALKSPEEDVALUE)) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0) + LeftLeg.RotVelocity.Y / 75, RAD(0), RAD(45 * COS(SINE / WALKSPEEDVALUE))), 1 / Animation_Speed)
  2980. elseif (ANIM ~= "Walk") or (TORSOVELOCITY < 1) then
  2981. RootJoint.C1 = Clerp(RootJoint.C1, ROOTC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed)
  2982. Neck.C1 = Clerp(Neck.C1, CF(0, -0.5, 0) * ANGLES(RAD(-90), RAD(0), RAD(180)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed)
  2983. RightHip.C1 = Clerp(RightHip.C1, CF(0.5, 1, 0) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed)
  2984. LeftHip.C1 = Clerp(LeftHip.C1, CF(-0.5, 1, 0) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed)
  2985. end
  2986. if TORSOVERTICALVELOCITY > 1 and HITFLOOR == nil then
  2987. ANIM = "Jump"
  2988. if ATTACK == false then
  2989. RootJoint.C0 = Clerp(RootJoint.C0, ROOTC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed)
  2990. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(-20), RAD(0), RAD(0)), 0.2 / Animation_Speed)
  2991. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(-40), RAD(0), RAD(20)) * RIGHTSHOULDERC0, 0.2 / Animation_Speed)
  2992. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(-40), RAD(0), RAD(-20)) * LEFTSHOULDERC0, 0.2 / Animation_Speed)
  2993. RightHip.C0 = Clerp(RightHip.C0, CF(1, -1, -0.3) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(-5), RAD(0), RAD(-20)), 0.2 / Animation_Speed)
  2994. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, -0.3) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(-5), RAD(0), RAD(20)), 0.2 / Animation_Speed)
  2995. end
  2996. elseif TORSOVERTICALVELOCITY < -1 and HITFLOOR == nil then
  2997. ANIM = "Fall"
  2998. if ATTACK == false then
  2999. RootJoint.C0 = Clerp(RootJoint.C0, ROOTC0 * CF(0, 0, 0 ) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed)
  3000. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0 , 0 + ((1) - 1)) * ANGLES(RAD(20), RAD(0), RAD(0)), 0.2 / Animation_Speed)
  3001. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(0), RAD(0), RAD(60)) * RIGHTSHOULDERC0, 0.2 / Animation_Speed)
  3002. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(0), RAD(0), RAD(-60)) * LEFTSHOULDERC0, 0.2 / Animation_Speed)
  3003. RightHip.C0 = Clerp(RightHip.C0, CF(1, -1, 0) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(20)), 0.2 / Animation_Speed)
  3004. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, 0) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(10)), 0.2 / Animation_Speed)
  3005. end
  3006. elseif TORSOVELOCITY < 1 and HITFLOOR ~= nil then
  3007. ANIM = "Idle"
  3008. if ATTACK == false then
  3009. RootJoint.C0 = Clerp(RootJoint.C0, ROOTC0 * CF(0, 0 - 0.05 * COS(SINE / 12), 0 + 0.05 * COS(SINE / 12)) * ANGLES(RAD(-2 + 2 * COS(SINE / 12)), RAD(0), RAD(0)), 0.15 / Animation_Speed)
  3010. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0) * ANGLES(RAD(0 - 2.5 * SIN(SINE / 12)), RAD(0), RAD(0)), 0.15 / Animation_Speed)
  3011. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(0), RAD(-15), RAD(5 + 1 * COS(SINE / 12))) * RIGHTSHOULDERC0, 0.15 / Animation_Speed)
  3012. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(0), RAD(15), RAD(-5 - 1 * COS(SINE / 12))) * LEFTSHOULDERC0, 0.15 / Animation_Speed)
  3013. RightHip.C0 = Clerp(RightHip.C0, CF(1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(-2 + 2 * COS(SINE / 12)), RAD(74), RAD(0)) * ANGLES(RAD(-2), RAD(0), RAD(0)), 0.15 / Animation_Speed)
  3014. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(-2 + 2 * COS(SINE / 12)), RAD(-74), RAD(0)) * ANGLES(RAD(-2), RAD(0), RAD(0)), 0.15 / Animation_Speed)
  3015. if VALUE1 == false and MRANDOM(1,200) == 1 then
  3016. coroutine.resume(coroutine.create(function()
  3017. VALUE1 = true
  3018. for i = 1, 25 do
  3019. Swait()
  3020. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0) * ANGLES(RAD(-5), RAD((15+MRANDOM(-15,15)/15)), RAD(0)), 3 / Animation_Speed)
  3021.  
  3022. end
  3023. VALUE1 = false
  3024. end))
  3025. end
  3026. end
  3027.  
  3028. elseif TORSOVELOCITY > 1 and HITFLOOR ~= nil then
  3029. ANIM = "Walk"
  3030. if ATTACK == false then
  3031. RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, -0.1) * ANGLES(RAD(5), RAD(0), RAD(0)), 0.15 / Animation_Speed)
  3032. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(5 - 8 * SIN(SINE / (WALKSPEEDVALUE / 2))), RAD(0), RAD(0)), 0.15 / Animation_Speed)
  3033. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0.15 * SIN(SINE / WALKSPEEDVALUE)) * ANGLES(RAD(25 * COS(SINE / WALKSPEEDVALUE)), RAD(0), RAD(5)) * RIGHTSHOULDERC0, 1 / Animation_Speed)
  3034. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, -0.15 * SIN(SINE / WALKSPEEDVALUE)) * ANGLES(RAD(-25 * COS(SINE / WALKSPEEDVALUE)), RAD(0), RAD(-5)) * LEFTSHOULDERC0, 1 / Animation_Speed)
  3035. RightHip.C0 = Clerp(RightHip.C0, CF(1 , -1, 0) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(-15)), 2 / Animation_Speed)
  3036. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, 0) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(15)), 2 / Animation_Speed)
  3037. end
  3038. end
  3039.  
  3040.  
  3041. sick.Parent = Torso
  3042. sick.Playing = true
  3043.  
  3044.  
  3045. unanchor()
  3046. Humanoid.MaxHealth = "inf"
  3047. Humanoid.Health = "inf"
  3048. if Rooted == false then
  3049. Disable_Jump = false
  3050. Humanoid.WalkSpeed = Speed
  3051. elseif Rooted == true then
  3052. Disable_Jump = true
  3053. Humanoid.WalkSpeed = 0
  3054. end
  3055. end
  3056. --//=================================\\
  3057. --\\=================================//
  3058.  
  3059.  
  3060.  
  3061.  
  3062.  
  3063. --//====================================================\\--
  3064. --|| END OF SCRIPT
  3065. --\\====================================================//--
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement