kaualima12

dshgah

Oct 2nd, 2019
271
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 46.12 KB | None | 0 0
  1. --https://github.com/Mokiros/roblox-FE-compatibility
  2. if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
  3. local Player,game,owner = owner,game
  4. local RealPlayer = Player
  5. do
  6. print("FE Compatibility code V2 by Mokiros")
  7. local RealPlayer = RealPlayer
  8. script.Parent = RealPlayer.Character
  9.  
  10. --Fake event to make stuff like Mouse.KeyDown work
  11. local Disconnect_Function = function(this)
  12. this[1].Functions[this[2]] = nil
  13. end
  14. local Disconnect_Metatable = {__index={disconnect=Disconnect_Function,Disconnect=Disconnect_Function}}
  15. local FakeEvent_Metatable = {__index={
  16. Connect = function(this,f)
  17. local i = tostring(math.random(0,10000))
  18. while this.Functions[i] do
  19. i = tostring(math.random(0,10000))
  20. end
  21. this.Functions[i] = f
  22. return setmetatable({this,i},Disconnect_Metatable)
  23. end
  24. }}
  25. FakeEvent_Metatable.__index.connect = FakeEvent_Metatable.__index.Connect
  26. local function fakeEvent()
  27. return setmetatable({Functions={}},FakeEvent_Metatable)
  28. end
  29.  
  30. --Creating fake input objects with fake variables
  31. local FakeMouse = {Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent(),Button2Up=fakeEvent(),Button2Down=fakeEvent()}
  32. FakeMouse.keyUp = FakeMouse.KeyUp
  33. FakeMouse.keyDown = FakeMouse.KeyDown
  34. local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
  35. local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
  36. CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
  37. end}
  38. --Merged 2 functions into one by checking amount of arguments
  39. CAS.UnbindAction = CAS.BindAction
  40.  
  41. --This function will trigger the events that have been :Connect()'ed
  42. local function TriggerEvent(self,ev,...)
  43. for _,f in pairs(self[ev].Functions) do
  44. f(...)
  45. end
  46. end
  47. FakeMouse.TriggerEvent = TriggerEvent
  48. UIS.TriggerEvent = TriggerEvent
  49.  
  50. --Client communication
  51. local Event = Instance.new("RemoteEvent")
  52. Event.Name = "UserInput_Event"
  53. Event.OnServerEvent:Connect(function(plr,io)
  54. if plr~=RealPlayer then return end
  55. FakeMouse.Target = io.Target
  56. FakeMouse.Hit = io.Hit
  57. if not io.isMouse then
  58. local b = io.UserInputState == Enum.UserInputState.Begin
  59. if io.UserInputType == Enum.UserInputType.MouseButton1 then
  60. return FakeMouse:TriggerEvent(b and "Button1Down" or "Button1Up")
  61. end
  62. if io.UserInputType == Enum.UserInputType.MouseButton2 then
  63. return FakeMouse:TriggerEvent(b and "Button2Down" or "Button2Up")
  64. end
  65. for _,t in pairs(CAS.Actions) do
  66. for _,k in pairs(t.Keys) do
  67. if k==io.KeyCode then
  68. t.Function(t.Name,io.UserInputState,io)
  69. end
  70. end
  71. end
  72. FakeMouse:TriggerEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
  73. UIS:TriggerEvent(b and "InputBegan" or "InputEnded",io,false)
  74. end
  75. end)
  76. Event.Parent = NLS([==[local Event = script:WaitForChild("UserInput_Event")
  77. local Mouse = owner:GetMouse()
  78. local UIS = game:GetService("UserInputService")
  79. local input = function(io,RobloxHandled)
  80. if RobloxHandled then return end
  81. --Since InputObject is a client-side instance, we create and pass table instead
  82. Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState,Hit=Mouse.Hit,Target=Mouse.Target})
  83. end
  84. UIS.InputBegan:Connect(input)
  85. UIS.InputEnded:Connect(input)
  86.  
  87. local h,t
  88. --Give the server mouse data every second frame, but only if the values changed
  89. --If player is not moving their mouse, client won't fire events
  90. local HB = game:GetService("RunService").Heartbeat
  91. while true do
  92. if h~=Mouse.Hit or t~=Mouse.Target then
  93. h,t=Mouse.Hit,Mouse.Target
  94. Event:FireServer({isMouse=true,Target=t,Hit=h})
  95. end
  96. --Wait 2 frames
  97. for i=1,2 do
  98. HB:Wait()
  99. end
  100. end]==],script)
  101.  
  102. ----Sandboxed game object that allows the usage of client-side methods and services
  103. --Real game object
  104. local RealGame = game
  105.  
  106. --Metatable for fake service
  107. local FakeService_Metatable = {
  108. __index = function(self,k)
  109. local s = rawget(self,"_RealService")
  110. if s then
  111. return typeof(s[k])=="function"
  112. and function(_,...)return s[k](s,...)end or s[k]
  113. end
  114. end,
  115. __newindex = function(self,k,v)
  116. local s = rawget(self,"_RealService")
  117. if s then s[k]=v end
  118. end
  119. }
  120. local function FakeService(t,RealService)
  121. t._RealService = typeof(RealService)=="string" and RealGame:GetService(RealService) or RealService
  122. return setmetatable(t,FakeService_Metatable)
  123. end
  124.  
  125. --Fake game object
  126. local FakeGame = {
  127. GetService = function(self,s)
  128. return rawget(self,s) or RealGame:GetService(s)
  129. end,
  130. Players = FakeService({
  131. LocalPlayer = FakeService({GetMouse=function(self)return FakeMouse end},Player)
  132. },"Players"),
  133. UserInputService = FakeService(UIS,"UserInputService"),
  134. ContextActionService = FakeService(CAS,"ContextActionService"),
  135. RunService = FakeService({
  136. _btrs = {},
  137. RenderStepped = RealGame:GetService("RunService").Heartbeat,
  138. BindToRenderStep = function(self,name,_,fun)
  139. self._btrs[name] = self.Heartbeat:Connect(fun)
  140. end,
  141. UnbindFromRenderStep = function(self,name)
  142. self._btrs[name]:Disconnect()
  143. end,
  144. },"RunService")
  145. }
  146. rawset(FakeGame.Players,"localPlayer",FakeGame.Players.LocalPlayer)
  147. FakeGame.service = FakeGame.GetService
  148. FakeService(FakeGame,game)
  149. --Changing owner to fake player object to support owner:GetMouse()
  150. game,owner = FakeGame,FakeGame.Players.LocalPlayer
  151. end
  152.  
  153. wait(0.2)
  154.  
  155. --//====================================================\\--
  156. --|| CREATED BY SHACKLUSTER
  157. --\\====================================================//--
  158.  
  159.  
  160.  
  161. wait(0.2)
  162.  
  163.  
  164.  
  165. Player = game:GetService("Players").LocalPlayer
  166. PlayerGui = Player.PlayerGui
  167. Cam = workspace.CurrentCamera
  168. Backpack = Player.Backpack
  169. Character = Player.Character
  170. Humanoid = Character.Humanoid
  171. Mouse = Player:GetMouse()
  172. RootPart = Character["HumanoidRootPart"]
  173. Torso = Character["Torso"]
  174. Head = Character["Head"]
  175. RightArm = Character["Right Arm"]
  176. LeftArm = Character["Left Arm"]
  177. RightLeg = Character["Right Leg"]
  178. LeftLeg = Character["Left Leg"]
  179. RootJoint = RootPart["RootJoint"]
  180. Neck = Torso["Neck"]
  181. RightShoulder = Torso["Right Shoulder"]
  182. LeftShoulder = Torso["Left Shoulder"]
  183. RightHip = Torso["Right Hip"]
  184. LeftHip = Torso["Left Hip"]
  185. local sick = Instance.new("Sound",Character)
  186. sick.SoundId = "rbxassetid://500369513"
  187. sick.Looped = true
  188. sick.Pitch = 1
  189. sick.Volume = 1
  190. sick:Play()
  191.  
  192. IT = Instance.new
  193. CF = CFrame.new
  194. VT = Vector3.new
  195. RAD = math.rad
  196. C3 = Color3.new
  197. UD2 = UDim2.new
  198. BRICKC = BrickColor.new
  199. ANGLES = CFrame.Angles
  200. EULER = CFrame.fromEulerAnglesXYZ
  201. COS = math.cos
  202. ACOS = math.acos
  203. SIN = math.sin
  204. ASIN = math.asin
  205. ABS = math.abs
  206. MRANDOM = math.random
  207. FLOOR = math.floor
  208.  
  209. function CreateMesh(MESH, PARENT, MESHTYPE, MESHID, TEXTUREID, SCALE, OFFSET)
  210. local NEWMESH = IT(MESH)
  211. if MESH == "SpecialMesh" then
  212. NEWMESH.MeshType = MESHTYPE
  213. if MESHID ~= "nil" and MESHID ~= "" then
  214. NEWMESH.MeshId = "http://www.roblox.com/asset/?id="..MESHID
  215. end
  216. if TEXTUREID ~= "nil" and TEXTUREID ~= "" then
  217. NEWMESH.TextureId = "http://www.roblox.com/asset/?id="..TEXTUREID
  218. end
  219. end
  220. NEWMESH.Offset = OFFSET or VT(0, 0, 0)
  221. NEWMESH.Scale = SCALE
  222. NEWMESH.Parent = PARENT
  223. return NEWMESH
  224. end
  225.  
  226. function CreatePart(FORMFACTOR, PARENT, MATERIAL, REFLECTANCE, TRANSPARENCY, BRICKCOLOR, NAME, SIZE)
  227. local NEWPART = IT("Part")
  228. NEWPART.formFactor = FORMFACTOR
  229. NEWPART.Reflectance = REFLECTANCE
  230. NEWPART.Transparency = TRANSPARENCY
  231. NEWPART.CanCollide = false
  232. NEWPART.Locked = true
  233. NEWPART.BrickColor = BRICKC(tostring(BRICKCOLOR))
  234. NEWPART.Name = NAME
  235. NEWPART.Size = SIZE
  236. NEWPART.Position = Torso.Position
  237. NEWPART.Material = MATERIAL
  238. NEWPART:BreakJoints()
  239. NEWPART.Parent = PARENT
  240. return NEWPART
  241. end
  242.  
  243.  
  244. --//=================================\\
  245. --|| CUSTOMIZATION
  246. --\\=================================//
  247.  
  248. Class_Name = "Memelord"
  249. Weapon_Name = "Add-ons"
  250.  
  251. Custom_Colors = {
  252. Custom_Color_1 = BRICKC("Institutional white"); --1st color for the weapon.
  253. Custom_Color_2 = BRICKC("Institutional white"); --2nd color for the weapon.
  254.  
  255. Custom_Color_3 = BRICKC("Institutional white"); --Color for the abilities.
  256. Custom_Color_4 = BRICKC("Institutional white"); --Color for the secondary bar.
  257. Custom_Color_5 = BRICKC("Institutional white"); --Color for the mana bar.
  258. Custom_Color_6 = BRICKC("Institutional white"); --Color for the health bar.
  259. Custom_Color_7 = BRICKC("Institutional white"); --Color for the stun bar.
  260.  
  261. Custom_Color_8 = BRICKC("Institutional white"); --Background for the mana bar.
  262. Custom_Color_9 = BRICKC("Institutional white"); --Background for the secondary mana bar.
  263. Custom_Color_10 = BRICKC("Institutional white"); --Background for the stun bar.
  264. Custom_Color_11 = BRICKC("Institutional white"); --Background for the health bar.
  265. Custom_Color_12 = BRICKC("Institutional white"); --Background for the abilities.
  266. }
  267.  
  268.  
  269. Player_Size = 1 --Size of the player.
  270. Animation_Speed = 2
  271. Frame_Speed = 1 / 60 -- (1 / 30) OR (1 / 60)
  272.  
  273. local Speed = 16
  274. local Effects2 = {}
  275.  
  276. --//=================================\\
  277. --|| END OF CUSTOMIZATION
  278. --\\=================================//
  279.  
  280. local function weldBetween(a, b)
  281. local weldd = Instance.new("ManualWeld")
  282. weldd.Part0 = a
  283. weldd.Part1 = b
  284. weldd.C0 = CFrame.new()
  285. weldd.C1 = b.CFrame:inverse() * a.CFrame
  286. weldd.Parent = a
  287. return weldd
  288. end
  289.  
  290. function createaccessory(attachmentpart,mesh,texture,scale,offset,color)
  291. local acs = Instance.new("Part")
  292. acs.CanCollide = false
  293. acs.Anchored = false
  294. acs.Size = Vector3.new(0,0,0)
  295. acs.CFrame = attachmentpart.CFrame
  296. acs.Parent = Character
  297. acs.BrickColor = color
  298. local meshs = Instance.new("SpecialMesh")
  299. meshs.MeshId = mesh
  300. meshs.TextureId = texture
  301. meshs.Parent = acs
  302. meshs.Scale = scale
  303. meshs.Offset = offset
  304. weldBetween(attachmentpart,acs)
  305. end
  306.  
  307. function createbodypart(TYPE,COLOR,PART,OFFSET,SIZE)
  308. if TYPE == "Gem" then
  309. local acs = CreatePart(3, Character, "Plastic", 0, 0, COLOR, "Part", VT(0,0,0))
  310. acs.Anchored = false
  311. acs.CanCollide = false
  312. acs.CFrame = PART.CFrame
  313. local acs2 = CreateMesh("SpecialMesh", acs, "FileMesh", "9756362", "", SIZE, OFFSET)
  314. weldBetween(PART,acs)
  315. elseif TYPE == "Skull" then
  316. local acs = CreatePart(3, Character, "Plastic", 0, 0, COLOR, "Part", VT(0,0,0))
  317. acs.Anchored = false
  318. acs.CanCollide = false
  319. acs.CFrame = PART.CFrame
  320. local acs2 = CreateMesh("SpecialMesh", acs, "FileMesh", "4770583", "", SIZE, OFFSET)
  321. weldBetween(PART,acs)
  322. elseif TYPE == "Eye" then
  323. local acs = CreatePart(3, Character, "Neon", 0, 0, COLOR, "Part", VT(0,0,0))
  324. acs.Anchored = false
  325. acs.CanCollide = false
  326. acs.CFrame = PART.CFrame
  327. local acs2 = CreateMesh("SpecialMesh", acs, "Sphere", "", "", SIZE, OFFSET)
  328. weldBetween(PART,acs)
  329. end
  330. end
  331.  
  332. createaccessory(Head,"http://www.roblox.com/asset/?id=121910245","http://www.roblox.com/asset/?id=121947422",VT(0.7,0.6,0.7),VT(0,0.1,-0.05),BrickColor.new("Pearl"))
  333.  
  334. --//=================================\\
  335. --|| USEFUL VALUES
  336. --\\=================================//
  337.  
  338. local ROOTC0 = CF(0, 0, 0) * ANGLES(RAD(-90), RAD(0), RAD(180))
  339. local NECKC0 = CF(0, 1, 0) * ANGLES(RAD(-90), RAD(0), RAD(180))
  340. local RIGHTSHOULDERC0 = CF(-0.5, 0, 0) * ANGLES(RAD(0), RAD(90), RAD(0))
  341. local LEFTSHOULDERC0 = CF(0.5, 0, 0) * ANGLES(RAD(0), RAD(-90), RAD(0))
  342. local CO1 = 0
  343. local CO2 = 0
  344. local CO3 = 0
  345. local CO4 = 0
  346. local CHANGEDEFENSE = 0
  347. local CHANGEDAMAGE = 0
  348. local CHANGEMOVEMENT = 0
  349. local ANIM = "Idle"
  350. local ATTACK = false
  351. local EQUIPPED = false
  352. local HOLD = false
  353. local COMBO = 1
  354. local LASTPOINT = nil
  355. local BLCF = nil
  356. local SCFR = nil
  357. local STAGGERHITANIM = false
  358. local STAGGERANIM = false
  359. local STUNANIM = false
  360. local CRITCHANCENUMBER = 0
  361. local IDLENUMBER = 0
  362. local DONUMBER = 0
  363. local HANDIDLE = false
  364. local SINE = 0
  365. local CHANGE = 2 / Animation_Speed
  366. local WALKINGANIM = false
  367. local WALK = 0
  368. local SHIELD = false
  369. local DISABLEJUMPING = false
  370. local HASBEENBLOCKED = false
  371. local STUNDELAYNUMBER = 0
  372. local MANADELAYNUMBER = 0
  373. local SECONDARYMANADELAYNUMBER = 0
  374. local ROBLOXIDLEANIMATION = IT("Animation")
  375. ROBLOXIDLEANIMATION.Name = "Roblox Idle Animation"
  376. ROBLOXIDLEANIMATION.AnimationId = "http://www.roblox.com/asset/?id=180435571"
  377. --ROBLOXIDLEANIMATION.Parent = Humanoid
  378. local WEAPONGUI = IT("ScreenGui", nil)
  379. WEAPONGUI.Name = "Weapon GUI"
  380. local WEAPONTOOL = IT("HopperBin", nil)
  381. WEAPONTOOL.Name = Weapon_Name
  382. local Weapon = IT("Model")
  383. Weapon.Name = Weapon_Name
  384. local Effects = IT("Folder", Weapon)
  385. Effects.Name = "Effects"
  386. local ANIMATOR = Humanoid.Animator
  387. local ANIMATE = Character.Animate
  388. local HITPLAYERSOUNDS = {--[["199149137", "199149186", "199149221", "199149235", "199149269", "199149297"--]]"263032172", "263032182", "263032200", "263032221", "263032252", "263033191"}
  389. local HITARMORSOUNDS = {"199149321", "199149338", "199149367", "199149409", "199149452"}
  390. local HITWEAPONSOUNDS = {"199148971", "199149025", "199149072", "199149109", "199149119"}
  391. local HITBLOCKSOUNDS = {"199148933", "199148947"}
  392. local HURTSOUND = "1080625252"
  393. local DEATHSOUNDS = {"340963282", "340963317"}
  394. local UNANCHOR = true
  395.  
  396. --//=================================\\
  397. --\\=================================//
  398.  
  399. --//=================================\\
  400. --|| STATS
  401. --\\=================================//
  402.  
  403. if Character:FindFirstChild("Stats") ~= nil then
  404. Character:FindFirstChild("Stats").Parent = nil
  405. end
  406.  
  407. local Stats = IT("Folder", nil)
  408. Stats.Name = "Stats"
  409. local ChangeStat = IT("Folder", Stats)
  410. ChangeStat.Name = "ChangeStat"
  411. local Defense = IT("NumberValue", Stats)
  412. Defense.Name = "Defense"
  413. Defense.Value = 1
  414. local Movement = IT("NumberValue", Stats)
  415. Movement.Name = "Movement"
  416. Movement.Value = 1
  417. local Damage = IT("NumberValue", Stats)
  418. Damage.Name = "Damage"
  419. Damage.Value = 1
  420. local Mana = IT("NumberValue", Stats)
  421. Mana.Name = "Mana"
  422. Mana.Value = 0
  423. local SecondaryMana = IT("NumberValue", Stats)
  424. SecondaryMana.Name = "SecondaryMana"
  425. SecondaryMana.Value = 0
  426. local CanCrit = IT("BoolValue", Stats)
  427. CanCrit.Name = "CanCrit"
  428. CanCrit.Value = false
  429. local CritChance = IT("NumberValue", Stats)
  430. CritChance.Name = "CritChance"
  431. CritChance.Value = 20
  432. local CanPenetrateArmor = IT("BoolValue", Stats)
  433. CanPenetrateArmor.Name = "CanPenetrateArmor"
  434. CanPenetrateArmor.Value = false
  435. local AntiTeamKill = IT("BoolValue", Stats)
  436. AntiTeamKill.Name = "AntiTeamKill"
  437. AntiTeamKill.Value = false
  438. local Rooted = IT("BoolValue", Stats)
  439. Rooted.Name = "Rooted"
  440. Rooted.Value = false
  441. local Block = IT("BoolValue", Stats)
  442. Block.Name = "Block"
  443. Block.Value = false
  444. local RecentEnemy = IT("ObjectValue", Stats)
  445. RecentEnemy.Name = "RecentEnemy"
  446. RecentEnemy.Value = nil
  447. local StaggerHit = IT("BoolValue", Stats)
  448. StaggerHit.Name = "StaggerHit"
  449. StaggerHit.Value = false
  450. local Stagger = IT("BoolValue", Stats)
  451. Stagger.Name = "Stagger"
  452. Stagger.Value = false
  453. local Stun = IT("BoolValue", Stats)
  454. Stun.Name = "Stun"
  455. Stun.Value = false
  456. local StunValue = IT("NumberValue", Stats)
  457. StunValue.Name = "StunValue"
  458. StunValue.Value = 0
  459.  
  460.  
  461. --//=================================\\
  462. --\\=================================//
  463.  
  464.  
  465.  
  466.  
  467.  
  468. --//=================================\\
  469. --|| DEBUFFS / BUFFS
  470. --\\=================================//
  471.  
  472. local DEFENSECHANGE1 = IT("NumberValue", ChangeStat)
  473. DEFENSECHANGE1.Name = "ChangeDefense"
  474. DEFENSECHANGE1.Value = 0
  475.  
  476. local MOVEMENTCHANGE1 = IT("NumberValue", nil)
  477. MOVEMENTCHANGE1.Name = "ChangeMovement"
  478. MOVEMENTCHANGE1.Value = 0
  479.  
  480. --//=================================\\
  481. --\\=================================//
  482.  
  483.  
  484.  
  485.  
  486.  
  487. --//=================================\\
  488. --|| SAZERENOS' ARTIFICIAL HEARTBEAT
  489. --\\=================================//
  490.  
  491. ArtificialHB = Instance.new("BindableEvent", script)
  492. ArtificialHB.Name = "ArtificialHB"
  493.  
  494. script:WaitForChild("ArtificialHB")
  495.  
  496. frame = Frame_Speed
  497. tf = 0
  498. allowframeloss = false
  499. tossremainder = false
  500. lastframe = tick()
  501. script.ArtificialHB:Fire()
  502.  
  503. game:GetService("RunService").Heartbeat:connect(function(s, p)
  504. tf = tf + s
  505. if tf >= frame then
  506. if allowframeloss then
  507. script.ArtificialHB:Fire()
  508. lastframe = tick()
  509. else
  510. for i = 1, math.floor(tf / frame) do
  511. script.ArtificialHB:Fire()
  512. end
  513. lastframe = tick()
  514. end
  515. if tossremainder then
  516. tf = 0
  517. else
  518. tf = tf - frame * math.floor(tf / frame)
  519. end
  520. end
  521. end)
  522.  
  523. --//=================================\\
  524. --\\=================================//
  525.  
  526.  
  527.  
  528.  
  529.  
  530. --//=================================\\
  531. --|| SOME FUNCTIONS
  532. --\\=================================//
  533.  
  534. function Raycast(POSITION, DIRECTION, RANGE, IGNOREDECENDANTS)
  535. return workspace:FindPartOnRay(Ray.new(POSITION, DIRECTION.unit * RANGE), IGNOREDECENDANTS)
  536. end
  537.  
  538. function PositiveAngle(NUMBER)
  539. if NUMBER >= 0 then
  540. NUMBER = 0
  541. end
  542. return NUMBER
  543. end
  544.  
  545. function NegativeAngle(NUMBER)
  546. if NUMBER <= 0 then
  547. NUMBER = 0
  548. end
  549. return NUMBER
  550. end
  551.  
  552. function Swait(NUMBER)
  553. if NUMBER == 0 or NUMBER == nil then
  554. ArtificialHB.Event:wait()
  555. else
  556. for i = 1, NUMBER do
  557. ArtificialHB.Event:wait()
  558. end
  559. end
  560. end
  561.  
  562. function QuaternionFromCFrame(cf)
  563. local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components()
  564. local trace = m00 + m11 + m22
  565. if trace > 0 then
  566. local s = math.sqrt(1 + trace)
  567. local recip = 0.5 / s
  568. return (m21 - m12) * recip, (m02 - m20) * recip, (m10 - m01) * recip, s * 0.5
  569. else
  570. local i = 0
  571. if m11 > m00 then
  572. i = 1
  573. end
  574. if m22 > (i == 0 and m00 or m11) then
  575. i = 2
  576. end
  577. if i == 0 then
  578. local s = math.sqrt(m00 - m11 - m22 + 1)
  579. local recip = 0.5 / s
  580. return 0.5 * s, (m10 + m01) * recip, (m20 + m02) * recip, (m21 - m12) * recip
  581. elseif i == 1 then
  582. local s = math.sqrt(m11 - m22 - m00 + 1)
  583. local recip = 0.5 / s
  584. return (m01 + m10) * recip, 0.5 * s, (m21 + m12) * recip, (m02 - m20) * recip
  585. elseif i == 2 then
  586. local s = math.sqrt(m22 - m00 - m11 + 1)
  587. local recip = 0.5 / s return (m02 + m20) * recip, (m12 + m21) * recip, 0.5 * s, (m10 - m01) * recip
  588. end
  589. end
  590. end
  591.  
  592. function QuaternionToCFrame(px, py, pz, x, y, z, w)
  593. local xs, ys, zs = x + x, y + y, z + z
  594. local wx, wy, wz = w * xs, w * ys, w * zs
  595. local xx = x * xs
  596. local xy = x * ys
  597. local xz = x * zs
  598. local yy = y * ys
  599. local yz = y * zs
  600. local zz = z * zs
  601. 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))
  602. end
  603.  
  604. function QuaternionSlerp(a, b, t)
  605. local cosTheta = a[1] * b[1] + a[2] * b[2] + a[3] * b[3] + a[4] * b[4]
  606. local startInterp, finishInterp;
  607. if cosTheta >= 0.0001 then
  608. if (1 - cosTheta) > 0.0001 then
  609. local theta = ACOS(cosTheta)
  610. local invSinTheta = 1 / SIN(theta)
  611. startInterp = SIN((1 - t) * theta) * invSinTheta
  612. finishInterp = SIN(t * theta) * invSinTheta
  613. else
  614. startInterp = 1 - t
  615. finishInterp = t
  616. end
  617. else
  618. if (1 + cosTheta) > 0.0001 then
  619. local theta = ACOS(-cosTheta)
  620. local invSinTheta = 1 / SIN(theta)
  621. startInterp = SIN((t - 1) * theta) * invSinTheta
  622. finishInterp = SIN(t * theta) * invSinTheta
  623. else
  624. startInterp = t - 1
  625. finishInterp = t
  626. end
  627. end
  628. 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
  629. end
  630.  
  631. function Clerp(a, b, t)
  632. local qa = {QuaternionFromCFrame(a)}
  633. local qb = {QuaternionFromCFrame(b)}
  634. local ax, ay, az = a.x, a.y, a.z
  635. local bx, by, bz = b.x, b.y, b.z
  636. local _t = 1 - t
  637. return QuaternionToCFrame(_t * ax + t * bx, _t * ay + t * by, _t * az + t * bz, QuaternionSlerp(qa, qb, t))
  638. end
  639.  
  640. function CreateFrame(PARENT, TRANSPARENCY, BORDERSIZEPIXEL, POSITION, SIZE, COLOR, BORDERCOLOR, NAME)
  641. local frame = IT("Frame")
  642. frame.BackgroundTransparency = TRANSPARENCY
  643. frame.BorderSizePixel = BORDERSIZEPIXEL
  644. frame.Position = POSITION
  645. frame.Size = SIZE
  646. frame.BackgroundColor3 = COLOR
  647. frame.BorderColor3 = BORDERCOLOR
  648. frame.Name = NAME
  649. frame.Parent = PARENT
  650. return frame
  651. end
  652.  
  653. function CreateLabel(PARENT, TEXT, TEXTCOLOR, TEXTFONTSIZE, TEXTFONT, TRANSPARENCY, BORDERSIZEPIXEL, STROKETRANSPARENCY, NAME)
  654. local label = IT("TextLabel")
  655. label.BackgroundTransparency = 1
  656. label.Size = UD2(1, 0, 1, 0)
  657. label.Position = UD2(0, 0, 0, 0)
  658. label.TextColor3 = C3(255, 255, 255)
  659. label.TextStrokeTransparency = STROKETRANSPARENCY
  660. label.TextTransparency = TRANSPARENCY
  661. label.FontSize = TEXTFONTSIZE
  662. label.Font = TEXTFONT
  663. label.BorderSizePixel = BORDERSIZEPIXEL
  664. label.TextScaled = true
  665. label.Text = TEXT
  666. label.Name = NAME
  667. label.Parent = PARENT
  668. return label
  669. end
  670.  
  671. function NoOutlines(PART)
  672. PART.TopSurface, PART.BottomSurface, PART.LeftSurface, PART.RightSurface, PART.FrontSurface, PART.BackSurface = 10, 10, 10, 10, 10, 10
  673. end
  674.  
  675.  
  676. function CreateWeldOrSnapOrMotor(TYPE, PARENT, PART0, PART1, C0, C1)
  677. local NEWWELD = IT(TYPE)
  678. NEWWELD.Part0 = PART0
  679. NEWWELD.Part1 = PART1
  680. NEWWELD.C0 = C0
  681. NEWWELD.C1 = C1
  682. NEWWELD.Parent = PARENT
  683. return NEWWELD
  684. end
  685.  
  686. function CreateSound(ID, PARENT, VOLUME, PITCH)
  687. --coroutine.resume(coroutine.create(function()
  688. local NEWSOUND = IT("Sound", PARENT)
  689. NEWSOUND.Volume = VOLUME
  690. NEWSOUND.Pitch = PITCH
  691. NEWSOUND.SoundId = "http://www.roblox.com/asset/?id="..ID
  692. NEWSOUND:play()
  693. game:GetService("Debris"):AddItem(NEWSOUND, 100)
  694. return NEWSOUND
  695. --end))
  696. end
  697.  
  698. function CFrameFromTopBack(at, top, back)
  699. local right = top:Cross(back)
  700. 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)
  701. end
  702.  
  703. --//=================================\\
  704. --\\=================================//
  705.  
  706.  
  707.  
  708.  
  709. --//=================================\\
  710. --|| WEAPON CREATION
  711. --\\=================================//
  712.  
  713. if Player_Size ~= 1 then
  714. for _, v in pairs (Weapon:GetChildren()) do
  715. if v.ClassName == "Motor" or v.ClassName == "Weld" or v.ClassName == "Snap" then
  716. local p1 = v.Part1
  717. v.Part1 = nil
  718. local cf1, cf2, cf3, cf4, cf5, cf6, cf7, cf8, cf9, cf10, cf11, cf12 = v.C1:components()
  719. v.C1 = CF(cf1 * Player_Size, cf2 * Player_Size, cf3 * Player_Size, cf4, cf5, cf6, cf7, cf8, cf9, cf10, cf11, cf12)
  720. v.Part1 = p1
  721. elseif v.ClassName == "Part" then
  722. for _, b in pairs (v:GetChildren()) do
  723. if b.ClassName == "SpecialMesh" or b.ClassName == "BlockMesh" then
  724. b.Scale = VT(b.Scale.x * Player_Size, b.Scale.y * Player_Size, b.Scale.z * Player_Size)
  725. end
  726. end
  727. end
  728. end
  729. end
  730.  
  731. for _, c in pairs(Weapon:GetChildren()) do
  732. if c.ClassName == "Part" then
  733. c.CustomPhysicalProperties = PhysicalProperties.new(0, 0, 0, 0, 0)
  734. end
  735. end
  736.  
  737. Weapon.Parent = Character
  738.  
  739. Humanoid.Died:connect(function()
  740. sick:Stop()
  741. CreateSound("744744924", Head, 50, 1)
  742. ATTACK = true
  743. end)
  744.  
  745. print(Class_Name.." loaded.")
  746.  
  747. --//=================================\\
  748. --|| ATTACK FUNCTIONS AND STUFF
  749. --\\=================================//
  750.  
  751. function killnearest(position,range,maxstrength)
  752. for i,v in ipairs(workspace:GetChildren()) do
  753. local body = v:GetChildren()
  754. for part = 1, #body do
  755. if((body[part].ClassName == "Part" or body[part].ClassName == "MeshPart") and v ~= Character) then
  756. if(body[part].Position - position).Magnitude < range then
  757. if v.ClassName == "Model" then
  758. v:BreakJoints()
  759. end
  760. table.insert(Effects2,{body[part],"Disappear",0.02,2,2,2,2})
  761. body[part].Velocity = CFrame.new(position,body[part].Position).lookVector*5*maxstrength
  762. end
  763. end
  764. end
  765. if v.ClassName == "Part" then
  766. if v.Anchored == false and (v.Position - position).Magnitude < range then
  767. table.insert(Effects2,{v,"Disappear",0.02,2,2,2,2})
  768. v.Velocity = CFrame.new(position,v.Position).lookVector*5*maxstrength
  769. end
  770. end
  771. end
  772. end
  773.  
  774. function CastRay(StartPos, Vec, Length, Ignore)
  775. local Ignore = ((type(Ignore) == "table" and Ignore) or {Ignore})
  776. local RayHit, RayPos, RayNormal = game:GetService("Workspace"):FindPartOnRayWithIgnoreList(Ray.new(StartPos, Vec * Length), Ignore)
  777. return RayHit, RayPos
  778. end
  779.  
  780. function omaewamou()
  781. ATTACK = true
  782. Rooted = true
  783. local target = nil
  784. local targettorso = nil
  785. if Mouse.Target.Parent ~= Character and Mouse.Target.Parent.Parent ~= Character and Mouse.Target.Parent:FindFirstChild("Humanoid") ~= nil then
  786. target = Mouse.Target.Parent.Humanoid
  787. targettorso = Mouse.Target.Parent:FindFirstChild("Torso") or Mouse.Target.Parent:FindFirstChild("UpperTorso")
  788. end
  789. if target ~= nil then
  790. targettorso.Anchored = true
  791. for i=0, 1, 0.1 / Animation_Speed do
  792. Swait()
  793. RootPart.CFrame = CFrame.new(RootPart.Position,targettorso.Position) * CFrame.new(0, 0, 0)
  794. targettorso.CFrame = CFrame.new(targettorso.Position,RootPart.Position) * CFrame.new(0, 0, 0)
  795. RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0 * Player_Size, -0.2 * Player_Size, -0.2 * Player_Size + 0.05 * COS(SINE / 12) * Player_Size) * ANGLES(RAD(-15), RAD(0), RAD(0)), 0.15 / Animation_Speed)
  796. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0 * Player_Size, 0 * Player_Size, 0 + ((1 * Player_Size) - 1)) * ANGLES(RAD(-15 - 2.5 * SIN(SINE / 12)), RAD(0), RAD(0)), 0.15 / Animation_Speed)
  797. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(-15), RAD(0), RAD(0)) * RIGHTSHOULDERC0, 0.15 / Animation_Speed)
  798. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(-15), RAD(0), RAD(0)) * LEFTSHOULDERC0, 0.15 / Animation_Speed)
  799. RightHip.C0 = Clerp(RightHip.C0, CF(1 * Player_Size, -0.8 * Player_Size - 0.05 * COS(SINE / 12) * Player_Size, -0.01 * Player_Size) * ANGLES(RAD(-15), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed)
  800. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1 * Player_Size, -0.8 * Player_Size - 0.05 * COS(SINE / 12) * Player_Size, -0.01 * Player_Size) * ANGLES(RAD(-15), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed)
  801. end
  802. local omae = CreateSound("940337206", Head, 50, 1)
  803. repeat
  804. Swait()
  805. RootPart.CFrame = CFrame.new(RootPart.Position,targettorso.Position) * CFrame.new(0, 0, 0)
  806. if target then
  807. targettorso.CFrame = CFrame.new(targettorso.Position,RootPart.Position) * CFrame.new(0, 0, 0)
  808. end
  809. until omae.Playing == false
  810. if target then
  811. local nani = CreateSound("948494432", targettorso, 50, 1)
  812. repeat
  813. Swait()
  814. RootPart.CFrame = CFrame.new(RootPart.Position,targettorso.Position) * CFrame.new(0, 0, 0)
  815. if target then
  816. targettorso.CFrame = CFrame.new(targettorso.Position,RootPart.Position) * CFrame.new(0, 0, 0)
  817. end
  818. until nani.Playing == false
  819. target.Parent:BreakJoints()
  820. targettorso.Anchored = false
  821. local boom = Instance.new("Explosion",workspace)
  822. boom.Position = targettorso.Position
  823. CreateSound("691216625", targettorso, 50, 1)
  824. end
  825. end
  826. Rooted = false
  827. ATTACK = false
  828. end
  829.  
  830. function dab()
  831. ATTACK = true
  832. Rooted = true
  833. local lookatmydab = CreateSound("420701460", Head, 50, 1)
  834. sick.Volume = 10
  835. for i=0, 1, 0.1 / Animation_Speed do
  836. killnearest(RootPart.Position,25,150)
  837. Swait()
  838. RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0 * Player_Size, 0.2 * Player_Size, -0.2 * Player_Size + 0.05 * COS(SINE / 12) * Player_Size) * ANGLES(RAD(15), RAD(0), RAD(0)), 0.15 / Animation_Speed*4)
  839. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0 * Player_Size, 0 * Player_Size, 0 + ((1 * Player_Size) - 1)) * ANGLES(RAD(15 - 2.5 * SIN(SINE / 12)), RAD(0), RAD(0)), 0.15 / Animation_Speed*4)
  840. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1 * Player_Size, 0.5 * Player_Size, -0.3 * Player_Size) * ANGLES(RAD(15), RAD(-35), RAD(-100)) * RIGHTSHOULDERC0, 0.15 / Animation_Speed*4)
  841. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(15), RAD(0), RAD(-110)) * LEFTSHOULDERC0, 0.15 / Animation_Speed*4)
  842. RightHip.C0 = Clerp(RightHip.C0, CF(1 * Player_Size, -0.8 * Player_Size - 0.05 * COS(SINE / 12) * Player_Size, -0.01 * Player_Size) * ANGLES(RAD(15), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed*4)
  843. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1 * Player_Size, -0.8 * Player_Size - 0.05 * COS(SINE / 12) * Player_Size, -0.01 * Player_Size) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed*4)
  844. end
  845. repeat
  846. killnearest(RootPart.Position,25,150)
  847. Swait()
  848. until lookatmydab.Playing == false
  849. sick.Volume = 1
  850. ATTACK = false
  851. Rooted = false
  852. end
  853.  
  854. function Taunt()
  855. ATTACK = true
  856. --Rooted = true
  857. for i=0, 2, 0.1 / Animation_Speed do
  858. Swait()
  859. RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0 * Player_Size, 0 * Player_Size, 0 * Player_Size + 0.05 * COS(SINE / 12) * Player_Size) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed)
  860. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0 * Player_Size, 0 * Player_Size, 0 + ((1 * Player_Size) - 1)) * ANGLES(RAD(5 - 2.5 * SIN(SINE / 12)), RAD(0), RAD(0)), 0.15 / Animation_Speed)
  861. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(145), RAD(0), RAD(0)) * RIGHTSHOULDERC0, 0.15 / Animation_Speed)
  862. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(145), RAD(0), RAD(0)) * LEFTSHOULDERC0, 0.15 / Animation_Speed)
  863. RightHip.C0 = Clerp(RightHip.C0, CF(1 * Player_Size, -1 * Player_Size, -0 * Player_Size) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed)
  864. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1 * Player_Size, -1 * Player_Size, -0 * Player_Size) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed)
  865. end
  866. local winz = CreateSound("958211048", Head, 50, 1)
  867. local loop = 0
  868. repeat
  869. Swait()
  870. loop = loop + 1
  871. if loop == 25 then
  872. loop = 0
  873. Humanoid.Jump = true
  874. end
  875. until winz.Playing == false
  876. ATTACK = false
  877. --Rooted = false
  878. end
  879.  
  880. function shield()
  881. if SHIELD == false then
  882. SHIELD = true
  883. print("WOA!")
  884. coroutine.resume(coroutine.create(function()
  885. local woa = IT("Part",Effects)
  886. woa.Size = VT(5,12,0)
  887. woa.CFrame = RootPart.CFrame * CF(0,3,-7)
  888. woa.Anchored = true
  889. local mesh = IT("SpecialMesh",woa)
  890. mesh.MeshType = "FileMesh"
  891. mesh.MeshId = "rbxassetid://1044207043"
  892. mesh.TextureId = "rbxassetid://1044207051"
  893. mesh.Scale = VT(3,3,3)
  894. CreateSound("638062404", woa, 50, 1)
  895. local woosh = woa.Touched:Connect(function(hit)
  896. if hit.Parent.ClassName == "Model" then
  897. hit.Parent:BreakJoints()
  898. CreateSound("978878312", hit, 2, 1)
  899. elseif hit.ClassName == "Part" and hit.Anchored == false then
  900. hit:remove()
  901. end
  902. end)
  903. repeat
  904. Swait()
  905. woa.CFrame = RootPart.CFrame * CF(0,3,-7)
  906. until SHIELD == false
  907. woosh:disconnect()
  908. CreateSound("638062404", woa, 50, 1)
  909. woa.Anchored = false
  910. local bv = Instance.new("BodyVelocity")
  911. bv.maxForce = Vector3.new(1e9, 1e9, 1e9)
  912. bv.velocity = RootPart.CFrame.lookVector*150
  913. bv.Parent = woa
  914. bv.Name = "DASH"
  915. local paw = woa.Touched:Connect(function(hit)
  916. if hit.Parent.ClassName == "Model" then
  917. woa:remove()
  918. hit.Parent:BreakJoints()
  919. CreateSound("978878312", hit, 2, 1)
  920. end
  921. end)
  922. end))
  923. elseif SHIELD == true then
  924. SHIELD = false
  925. end
  926. end
  927.  
  928. function gonuts()
  929. ATTACK = true
  930. Rooted = true
  931. sick:Stop()
  932. local ohno = CreateSound("254418283", Effects, 5, 1)
  933. coroutine.resume(coroutine.create(function()
  934. repeat
  935. for i=0, 1.3, 0.1 / Animation_Speed do
  936. Swait()
  937. RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0 * Player_Size, 0 * Player_Size, -0.2 * Player_Size) * ANGLES(RAD(-25), RAD(0), RAD(-15)), 0.15 / Animation_Speed)
  938. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0 * Player_Size, 0 * Player_Size, 0 + ((1 * Player_Size) - 1)) * ANGLES(RAD(-25), RAD(0), RAD(0)), 0.15 / Animation_Speed)
  939. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(0), RAD(70)) * RIGHTSHOULDERC0, 0.15 / Animation_Speed)
  940. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(0), RAD(-120)) * LEFTSHOULDERC0, 0.15 / Animation_Speed)
  941. RightHip.C0 = Clerp(RightHip.C0, CF(1 * Player_Size, -1 * Player_Size, -0 * Player_Size) * ANGLES(RAD(0), RAD(120), RAD(-35)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed)
  942. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1 * Player_Size, -1 * Player_Size, -0 * Player_Size) * ANGLES(RAD(0), RAD(-90), RAD(35)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed)
  943. end
  944. if ohno.Playing == true then
  945. for i=0, 1.3, 0.1 / Animation_Speed do
  946. Swait()
  947. RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0 * Player_Size, 0 * Player_Size, -0.2 * Player_Size) * ANGLES(RAD(-25), RAD(0), RAD(15)), 0.15 / Animation_Speed)
  948. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0 * Player_Size, 0 * Player_Size, 0 + ((1 * Player_Size) - 1)) * ANGLES(RAD(-25), RAD(0), RAD(0)), 0.15 / Animation_Speed)
  949. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(0), RAD(120)) * RIGHTSHOULDERC0, 0.15 / Animation_Speed)
  950. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(0), RAD(-70)) * LEFTSHOULDERC0, 0.15 / Animation_Speed)
  951. RightHip.C0 = Clerp(RightHip.C0, CF(1 * Player_Size, -1 * Player_Size, -0 * Player_Size) * ANGLES(RAD(0), RAD(90), RAD(-35)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed)
  952. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1 * Player_Size, -1 * Player_Size, -0 * Player_Size) * ANGLES(RAD(0), RAD(-120), RAD(35)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed)
  953. end
  954. end
  955. until ohno.Playing == false
  956. end))
  957. repeat
  958. Swait()
  959. q = workspace:GetChildren()
  960. for i = 1, #q do
  961. local child = q[i]
  962. if child.ClassName == "Model" and child:FindFirstChild("Humanoid") and child ~= Character then
  963. if child:FindFirstChild("MYEARS") == nil then
  964. local MYEARS = IT("NumberValue",child)
  965. MYEARS.Name = "MYEARS"
  966. else
  967. child.MYEARS.Value = child.MYEARS.Value + 1
  968. if child.MYEARS.Value >= 450 then
  969. if child:FindFirstChild("Head") then
  970. child.Head:remove()
  971. local tors = child:FindFirstChild("Torso") or child:FindFirstChild("UpperTorso")
  972. CreateSound(DEATHSOUNDS[MRANDOM(1,#DEATHSOUNDS)], tors, 5, 1)
  973. end
  974. else
  975. if child.Head:FindFirstChild("AAAGH") == nil then
  976. local nu = CreateSound(HURTSOUND, child.Head, 5, 1)
  977. nu.Name = "AAAGH"
  978. end
  979. end
  980. end
  981. end
  982. end
  983. until ohno.Playing == false
  984. sick:Play()
  985. ATTACK = false
  986. Rooted = false
  987. end
  988.  
  989. --//=================================\\
  990. --|| ASSIGN THINGS TO KEYS
  991. --\\=================================//
  992.  
  993. Humanoid.Changed:connect(function(Jump)
  994. if Jump == "Jump" and (Disable_Jump == true or DISABLEJUMPING == true) then
  995. Humanoid.Jump = false
  996. end
  997. end)
  998.  
  999. function MouseDown(Mouse)
  1000. if ATTACK == false then
  1001. omaewamou()
  1002. end
  1003. end
  1004.  
  1005. function MouseUp(Mouse)
  1006. HOLD = false
  1007. end
  1008.  
  1009. function KeyDown(Key)
  1010. if Key == "e" and ATTACK == false then
  1011. dab()
  1012. end
  1013. if Key == "t" and ATTACK == false then
  1014. Taunt()
  1015. end
  1016. if Key == "g" and ATTACK == false then
  1017. shield()
  1018. end
  1019. if Key == "x" and ATTACK == false then
  1020. gonuts()
  1021. end
  1022. end
  1023.  
  1024. function KeyUp(Key)
  1025. end
  1026.  
  1027. Mouse.Button1Down:connect(function(NEWKEY)
  1028. MouseDown(NEWKEY)
  1029. end)
  1030. Mouse.Button1Up:connect(function(NEWKEY)
  1031. MouseUp(NEWKEY)
  1032. end)
  1033. Mouse.KeyDown:connect(function(NEWKEY)
  1034. KeyDown(NEWKEY)
  1035. end)
  1036. Mouse.KeyUp:connect(function(NEWKEY)
  1037. KeyUp(NEWKEY)
  1038. end)
  1039.  
  1040. --//=================================\\
  1041. --\\=================================//
  1042.  
  1043.  
  1044. function unanchor()
  1045. if UNANCHOR == true then
  1046. g = Character:GetChildren()
  1047. for i = 1, #g do
  1048. if g[i].ClassName == "Part" then
  1049. g[i].Anchored = false
  1050. end
  1051. end
  1052. end
  1053. end
  1054.  
  1055.  
  1056. --//=================================\\
  1057. --|| WRAP THE WHOLE SCRIPT UP
  1058. --\\=================================//
  1059.  
  1060. Humanoid.Changed:connect(function(Jump)
  1061. if Jump == "Jump" and (Disable_Jump == true or DISABLEJUMPING == true) then
  1062. Humanoid.Jump = false
  1063. end
  1064. end)
  1065.  
  1066. local ff = Instance.new("ForceField",Character)
  1067. ff.Visible = false
  1068.  
  1069. ANIMATE.Parent = nil
  1070. local IDLEANIMATION = Humanoid:LoadAnimation(ROBLOXIDLEANIMATION)
  1071. IDLEANIMATION:Play()
  1072.  
  1073. while true do
  1074. Swait()
  1075. SINE = SINE + CHANGE
  1076. local TORSOVELOCITY = (RootPart.Velocity * VT(1, 0, 1)).magnitude
  1077. local TORSOVERTICALVELOCITY = RootPart.Velocity.y
  1078. local LV = Torso.CFrame:pointToObjectSpace(Torso.Velocity - Torso.Position)
  1079. local HITFLOOR = Raycast(RootPart.Position, (CF(RootPart.Position, RootPart.Position + VT(0, -1, 0))).lookVector, 4 * Player_Size, Character)
  1080. local WALKSPEEDVALUE = 6 / (Humanoid.WalkSpeed / 16)
  1081. if ANIM == "Walk" and TORSOVELOCITY > 1 then
  1082. RootJoint.C1 = Clerp(RootJoint.C1, ROOTC0 * CF(0, 0, -0.1 * COS(SINE / (WALKSPEEDVALUE / 2)) * Player_Size) * ANGLES(RAD(0), RAD(0) - RootPart.RotVelocity.Y / 75, RAD(0)), 0.2 * (Humanoid.WalkSpeed / 16) / Animation_Speed)
  1083. Neck.C1 = Clerp(Neck.C1, CF(0 * Player_Size, -0.5 * Player_Size, 0 * Player_Size) * 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)
  1084. RightHip.C1 = Clerp(RightHip.C1, CF(0.5 * Player_Size, 0.875 * Player_Size - 0.125 * SIN(SINE / WALKSPEEDVALUE) * Player_Size, -0.125 * COS(SINE / WALKSPEEDVALUE) * Player_Size) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0) - RightLeg.RotVelocity.Y / 75, RAD(0), RAD(60 * COS(SINE / WALKSPEEDVALUE))), 0.2 * (Humanoid.WalkSpeed / 16) / Animation_Speed)
  1085. LeftHip.C1 = Clerp(LeftHip.C1, CF(-0.5 * Player_Size, 0.875 * Player_Size + 0.125 * SIN(SINE / WALKSPEEDVALUE) * Player_Size, 0.125 * COS(SINE / WALKSPEEDVALUE) * Player_Size) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0) + LeftLeg.RotVelocity.Y / 75, RAD(0), RAD(60 * COS(SINE / WALKSPEEDVALUE))), 0.2 * (Humanoid.WalkSpeed / 16) / Animation_Speed)
  1086. elseif (ANIM ~= "Walk") or (TORSOVELOCITY < 1) then
  1087. RootJoint.C1 = Clerp(RootJoint.C1, ROOTC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed)
  1088. Neck.C1 = Clerp(Neck.C1, CF(0 * Player_Size, -0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(-90), RAD(0), RAD(180)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed)
  1089. RightHip.C1 = Clerp(RightHip.C1, CF(0.5 * Player_Size, 1 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed)
  1090. LeftHip.C1 = Clerp(LeftHip.C1, CF(-0.5 * Player_Size, 1 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed)
  1091. end
  1092. if TORSOVERTICALVELOCITY > 1 and HITFLOOR == nil then
  1093. ANIM = "Jump"
  1094. if ATTACK == false then
  1095. RootJoint.C0 = Clerp(RootJoint.C0, ROOTC0 * CF(0 * Player_Size, 0 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed)
  1096. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0 * Player_Size, 0 * Player_Size, 0 + ((1 * Player_Size) - 1)) * ANGLES(RAD(-20), RAD(0), RAD(0)), 0.2 / Animation_Speed)
  1097. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(-40), RAD(0), RAD(20)) * RIGHTSHOULDERC0, 0.2 / Animation_Speed)
  1098. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(-40), RAD(0), RAD(-20)) * LEFTSHOULDERC0, 0.2 / Animation_Speed)
  1099. RightHip.C0 = Clerp(RightHip.C0, CF(1 * Player_Size, -1 * Player_Size, -0.3 * Player_Size) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(-5), RAD(0), RAD(-20)), 0.2 / Animation_Speed)
  1100. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1 * Player_Size, -1 * Player_Size, -0.3 * Player_Size) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(-5), RAD(0), RAD(20)), 0.2 / Animation_Speed)
  1101. end
  1102. elseif TORSOVERTICALVELOCITY < -1 and HITFLOOR == nil then
  1103. ANIM = "Fall"
  1104. if ATTACK == false then
  1105. RootJoint.C0 = Clerp(RootJoint.C0, ROOTC0 * CF(0 * Player_Size, 0 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed)
  1106. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0 * Player_Size, 0 * Player_Size, 0 + ((1 * Player_Size) - 1)) * ANGLES(RAD(20), RAD(0), RAD(0)), 0.2 / Animation_Speed)
  1107. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(0), RAD(60)) * RIGHTSHOULDERC0, 0.2 / Animation_Speed)
  1108. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(0), RAD(-60)) * LEFTSHOULDERC0, 0.2 / Animation_Speed)
  1109. RightHip.C0 = Clerp(RightHip.C0, CF(1 * Player_Size, -1 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(20)), 0.2 / Animation_Speed)
  1110. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1 * Player_Size, -1 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(10)), 0.2 / Animation_Speed)
  1111. end
  1112. elseif TORSOVELOCITY < 1 and HITFLOOR ~= nil then
  1113. ANIM = "Idle"
  1114. if ATTACK == false then
  1115. RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0 * Player_Size, -0.2 * Player_Size, -0.2 * Player_Size + 0.05 * COS(SINE / 12) * Player_Size) * ANGLES(RAD(-15), RAD(0), RAD(0)), 0.15 / Animation_Speed)
  1116. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0 * Player_Size, 0 * Player_Size, 0 + ((1 * Player_Size) - 1)) * ANGLES(RAD(-15 - 2.5 * SIN(SINE / 12)), RAD(0), RAD(0)), 0.15 / Animation_Speed)
  1117. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(-15), RAD(0), RAD(0)) * RIGHTSHOULDERC0, 0.15 / Animation_Speed)
  1118. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(-15), RAD(0), RAD(0)) * LEFTSHOULDERC0, 0.15 / Animation_Speed)
  1119. RightHip.C0 = Clerp(RightHip.C0, CF(1 * Player_Size, -0.8 * Player_Size - 0.05 * COS(SINE / 12) * Player_Size, -0.01 * Player_Size) * ANGLES(RAD(-15), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed)
  1120. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1 * Player_Size, -0.8 * Player_Size - 0.05 * COS(SINE / 12) * Player_Size, -0.01 * Player_Size) * ANGLES(RAD(-15), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed)
  1121. end
  1122. elseif TORSOVELOCITY > 1 and HITFLOOR ~= nil then
  1123. ANIM = "Walk"
  1124. WALK = WALK + 1 / Animation_Speed
  1125. if WALK >= 15 - (5 * (Humanoid.WalkSpeed / 16 / Player_Size)) then
  1126. WALK = 0
  1127. if WALKINGANIM == true then
  1128. WALKINGANIM = false
  1129. elseif WALKINGANIM == false then
  1130. WALKINGANIM = true
  1131. end
  1132. end
  1133. --RightHip.C1 = Clerp(RightHip.C1, CF(0.5 * Player_Size, 0.875 * Player_Size - 0.125 * SIN(SINE / WALKSPEEDVALUE) * Player_Size, -0.125 * COS(SINE / WALKSPEEDVALUE) * Player_Size) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0) - RightLeg.RotVelocity.Y / 75, RAD(0), RAD(60 * COS(SINE / WALKSPEEDVALUE))), 0.2 * (Humanoid.WalkSpeed / 16) / Animation_Speed)
  1134. --LeftHip.C1 = Clerp(LeftHip.C1, CF(-0.5 * Player_Size, 0.875 * Player_Size + 0.125 * SIN(SINE / WALKSPEEDVALUE) * Player_Size, 0.125 * COS(SINE / WALKSPEEDVALUE) * Player_Size) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0) + LeftLeg.RotVelocity.Y / 75, RAD(0), RAD(60 * COS(SINE / WALKSPEEDVALUE))), 0.2 * (Humanoid.WalkSpeed / 16) / Animation_Speed)
  1135. if ATTACK == false then
  1136. RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0 * Player_Size, -0.3 * Player_Size, -0.2 * Player_Size + 0.05 * COS(SINE / 12) * Player_Size) * ANGLES(RAD(-35), RAD(0), RAD(0)), 0.15 / Animation_Speed)
  1137. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0 * Player_Size, 0 * Player_Size, 0 + ((1 * Player_Size) - 1)) * ANGLES(RAD(-35 - 2.5 * SIN(SINE / 12)), RAD(0), RAD(0)), 0.15 / Animation_Speed)
  1138. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(-100), RAD(0), RAD(0)) * RIGHTSHOULDERC0, 0.15 / Animation_Speed)
  1139. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(-100), RAD(0), RAD(0)) * LEFTSHOULDERC0, 0.15 / Animation_Speed)
  1140. RightHip.C0 = Clerp(RightHip.C0, CF(1 * Player_Size, -1 * Player_Size, -0 * Player_Size) * ANGLES(RAD(-35), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed)
  1141. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1 * Player_Size, -1 * Player_Size, -0 * Player_Size) * ANGLES(RAD(-35), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed)
  1142. end
  1143. end
  1144. if #Effects2>0 then
  1145. for e=1,#Effects2 do
  1146. if Effects2[e]~=nil then
  1147. local Thing=Effects2[e]
  1148. if Thing~=nil then
  1149. local Part=Thing[1]
  1150. local Mode=Thing[2]
  1151. local Delay=Thing[3]
  1152. local IncX=Thing[4]
  1153. local IncY=Thing[5]
  1154. local IncZ=Thing[6]
  1155. local Part2=Thing[8]
  1156. if Thing[1].Transparency<=1 then
  1157. if Thing[2]=="Block1" then
  1158. Thing[1].CFrame=Part2.CFrame
  1159. Mesh=Thing[1].Mesh
  1160. Mesh.Scale=Mesh.Scale+VT(Thing[4],Thing[5],Thing[6])
  1161. Thing[1].Transparency=Thing[1].Transparency+Thing[3]
  1162. elseif Thing[2]=="Cylinder" then
  1163. Mesh=Thing[1].Mesh
  1164. Mesh.Scale=Mesh.Scale+VT(Thing[4],Thing[5],Thing[6])
  1165. Thing[1].Transparency=Thing[1].Transparency+Thing[3]
  1166. elseif Thing[2]=="Blood" then
  1167. Mesh=Thing[7]
  1168. Thing[1].CFrame=Thing[1].CFrame*CF(0,.5,0)
  1169. Mesh.Scale=Mesh.Scale+VT(Thing[4],Thing[5],Thing[6])
  1170. Thing[1].Transparency=Thing[1].Transparency+Thing[3]
  1171. elseif Thing[2]=="Elec" then
  1172. Mesh=Thing[1].Mesh
  1173. Mesh.Scale=Mesh.Scale+VT(Thing[7],Thing[8],Thing[9])
  1174. Thing[1].Transparency=Thing[1].Transparency+Thing[3]
  1175. elseif Thing[2]=="Disappear" then
  1176. Thing[1].Transparency=Thing[1].Transparency+Thing[3]
  1177. end
  1178. else
  1179. Part.Parent=nil
  1180. table.remove(Effects2,e)
  1181. end
  1182. end
  1183. end
  1184. end
  1185. end
  1186. unanchor()
  1187. Humanoid.MaxHealth = "inf"
  1188. Humanoid.Health = "inf"
  1189. if Rooted == false then
  1190. Disable_Jump = false
  1191. Humanoid.WalkSpeed = Speed
  1192. elseif Rooted == true then
  1193. Disable_Jump = true
  1194. Humanoid.WalkSpeed = 0
  1195. end
  1196. q = Character:GetChildren()
  1197. for u = 1, #q do
  1198. if q[u].ClassName == "Accessory" or q[u].ClassName == "Hat" then
  1199. if q[u].Handle:FindFirstChild("FaceFrontAttachment") then
  1200. q[u]:remove()
  1201. end
  1202. end
  1203. end
  1204. end
  1205.  
  1206. --//=================================\\
  1207. --\\=================================//
  1208.  
  1209.  
  1210.  
  1211.  
  1212.  
  1213. --//====================================================\\--
  1214. --|| END OF SCRIPT
  1215. --\\====================================================//--
Advertisement
Add Comment
Please, Sign In to add comment