kaualima12

basic script :D

Sep 8th, 2019
181
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 58.89 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. local h,t
  87. --Give the server mouse data every second frame, but only if the values changed
  88. --If player is not moving their mouse, client won't fire events
  89. local HB = game:GetService("RunService").Heartbeat
  90. while true do
  91. if h~=Mouse.Hit or t~=Mouse.Target then
  92. h,t=Mouse.Hit,Mouse.Target
  93. Event:FireServer({isMouse=true,Target=t,Hit=h})
  94. end
  95. --Wait 2 frames
  96. for i=1,2 do
  97. HB:Wait()
  98. end
  99. end]==],script)
  100.  
  101. ----Sandboxed game object that allows the usage of client-side methods and services
  102. --Real game object
  103. local RealGame = game
  104.  
  105. --Metatable for fake service
  106. local FakeService_Metatable = {
  107. __index = function(self,k)
  108. local s = rawget(self,"_RealService")
  109. if s then
  110. return typeof(s[k])=="function"
  111. and function(_,...)return s[k](s,...)end or s[k]
  112. end
  113. end,
  114. __newindex = function(self,k,v)
  115. local s = rawget(self,"_RealService")
  116. if s then s[k]=v end
  117. end
  118. }
  119. local function FakeService(t,RealService)
  120. t._RealService = typeof(RealService)=="string" and RealGame:GetService(RealService) or RealService
  121. return setmetatable(t,FakeService_Metatable)
  122. end
  123.  
  124. --Fake game object
  125. local FakeGame = {
  126. GetService = function(self,s)
  127. return rawget(self,s) or RealGame:GetService(s)
  128. end,
  129. Players = FakeService({
  130. LocalPlayer = FakeService({GetMouse=function(self)return FakeMouse end},Player)
  131. },"Players"),
  132. UserInputService = FakeService(UIS,"UserInputService"),
  133. ContextActionService = FakeService(CAS,"ContextActionService"),
  134. RunService = FakeService({
  135. _btrs = {},
  136. RenderStepped = RealGame:GetService("RunService").Heartbeat,
  137. BindToRenderStep = function(self,name,_,fun)
  138. self._btrs[name] = self.Heartbeat:Connect(fun)
  139. end,
  140. UnbindFromRenderStep = function(self,name)
  141. self._btrs[name]:Disconnect()
  142. end,
  143. },"RunService")
  144. }
  145. rawset(FakeGame.Players,"localPlayer",FakeGame.Players.LocalPlayer)
  146. FakeGame.service = FakeGame.GetService
  147. FakeService(FakeGame,game)
  148. --Changing owner to fake player object to support owner:GetMouse()
  149. game,owner = FakeGame,FakeGame.Players.LocalPlayer
  150. end
  151. --//====================================================\\--
  152. --|| CREATED BY SHACKLUSTER
  153. --\\====================================================//--
  154.  
  155.  
  156.  
  157. wait(0.2)
  158.  
  159.  
  160.  
  161. Player = game:GetService("Players").LocalPlayer
  162. PlayerGui = Player.PlayerGui
  163. Cam = workspace.CurrentCamera
  164. Backpack = Player.Backpack
  165. Character = Player.Character
  166. Humanoid = Character.Humanoid
  167. Mouse = Player:GetMouse()
  168. RootPart = Character["HumanoidRootPart"]
  169. Torso = Character["Torso"]
  170. Head = Character["Head"]
  171. RightArm = Character["Right Arm"]
  172. LeftArm = Character["Left Arm"]
  173. RightLeg = Character["Right Leg"]
  174. LeftLeg = Character["Left Leg"]
  175. RootJoint = RootPart["RootJoint"]
  176. Neck = Torso["Neck"]
  177. RightShoulder = Torso["Right Shoulder"]
  178. LeftShoulder = Torso["Left Shoulder"]
  179. RightHip = Torso["Right Hip"]
  180. LeftHip = Torso["Left Hip"]
  181. local chitter = Instance.new("Sound",Head)
  182. chitter.SoundId = "rbxassetid://342425836"
  183. chitter.Pitch = 1
  184. chitter.Volume = 2
  185. stab = false
  186. foodism = 1500
  187.  
  188. IT = Instance.new
  189. CF = CFrame.new
  190. VT = Vector3.new
  191. RAD = math.rad
  192. C3 = Color3.new
  193. UD2 = UDim2.new
  194. BRICKC = BrickColor.new
  195. ANGLES = CFrame.Angles
  196. EULER = CFrame.fromEulerAnglesXYZ
  197. COS = math.cos
  198. ACOS = math.acos
  199. SIN = math.sin
  200. ASIN = math.asin
  201. ABS = math.abs
  202. MRANDOM = math.random
  203. FLOOR = math.floor
  204.  
  205. function CreateMesh(MESH, PARENT, MESHTYPE, MESHID, TEXTUREID, SCALE, OFFSET)
  206. local NEWMESH = IT(MESH)
  207. if MESH == "SpecialMesh" then
  208. NEWMESH.MeshType = MESHTYPE
  209. if MESHID ~= "nil" and MESHID ~= "" then
  210. NEWMESH.MeshId = "http://www.roblox.com/asset/?id="..MESHID
  211. end
  212. if TEXTUREID ~= "nil" and TEXTUREID ~= "" then
  213. NEWMESH.TextureId = "http://www.roblox.com/asset/?id="..TEXTUREID
  214. end
  215. end
  216. NEWMESH.Offset = OFFSET or VT(0, 0, 0)
  217. NEWMESH.Scale = SCALE
  218. NEWMESH.Parent = PARENT
  219. return NEWMESH
  220. end
  221.  
  222. function CreatePart(FORMFACTOR, PARENT, MATERIAL, REFLECTANCE, TRANSPARENCY, BRICKCOLOR, NAME, SIZE)
  223. local NEWPART = IT("Part")
  224. NEWPART.formFactor = FORMFACTOR
  225. NEWPART.Reflectance = REFLECTANCE
  226. NEWPART.Transparency = TRANSPARENCY
  227. NEWPART.CanCollide = false
  228. NEWPART.Locked = true
  229. NEWPART.BrickColor = BRICKC(tostring(BRICKCOLOR))
  230. NEWPART.Name = NAME
  231. NEWPART.Size = SIZE
  232. NEWPART.Position = Torso.Position
  233. NEWPART.Material = MATERIAL
  234. NEWPART:BreakJoints()
  235. NEWPART.Parent = PARENT
  236. return NEWPART
  237. end
  238.  
  239.  
  240. --//=================================\\
  241. --|| CUSTOMIZATION
  242. --\\=================================//
  243.  
  244. Class_Name = "Template"
  245. Weapon_Name = "Add-ons"
  246.  
  247. Custom_Colors = {
  248. Custom_Color_1 = BRICKC("Institutional white"); --1st color for the weapon.
  249. Custom_Color_2 = BRICKC("Institutional white"); --2nd color for the weapon.
  250.  
  251. Custom_Color_3 = BRICKC("Institutional white"); --Color for the abilities.
  252. Custom_Color_4 = BRICKC("Institutional white"); --Color for the secondary bar.
  253. Custom_Color_5 = BRICKC("Institutional white"); --Color for the mana bar.
  254. Custom_Color_6 = BRICKC("Institutional white"); --Color for the health bar.
  255. Custom_Color_7 = BRICKC("Institutional white"); --Color for the stun bar.
  256.  
  257. Custom_Color_8 = BRICKC("Institutional white"); --Background for the mana bar.
  258. Custom_Color_9 = BRICKC("Institutional white"); --Background for the secondary mana bar.
  259. Custom_Color_10 = BRICKC("Institutional white"); --Background for the stun bar.
  260. Custom_Color_11 = BRICKC("Institutional white"); --Background for the health bar.
  261. Custom_Color_12 = BRICKC("Institutional white"); --Background for the abilities.
  262. }
  263.  
  264.  
  265. Player_Size = 1 --Size of the player.
  266. Animation_Speed = 3
  267. Frame_Speed = 1 / 60 -- (1 / 30) OR (1 / 60)
  268.  
  269. local Speed = 16
  270. local Effects2 = {}
  271.  
  272. --//=================================\\
  273. --|| END OF CUSTOMIZATION
  274. --\\=================================//
  275.  
  276. local function weldBetween(a, b)
  277. local weldd = Instance.new("ManualWeld")
  278. weldd.Part0 = a
  279. weldd.Part1 = b
  280. weldd.C0 = CFrame.new()
  281. weldd.C1 = b.CFrame:inverse() * a.CFrame
  282. weldd.Parent = a
  283. return weldd
  284. end
  285.  
  286. function createaccessory(attachmentpart,mesh,texture,scale,offset,color)
  287. local acs = Instance.new("Part")
  288. acs.CanCollide = false
  289. acs.Anchored = false
  290. acs.Size = Vector3.new(0,0,0)
  291. acs.CFrame = attachmentpart.CFrame
  292. acs.Parent = Character
  293. acs.BrickColor = color
  294. local meshs = Instance.new("SpecialMesh")
  295. meshs.MeshId = mesh
  296. meshs.TextureId = texture
  297. meshs.Parent = acs
  298. meshs.Scale = scale
  299. meshs.Offset = offset
  300. weldBetween(attachmentpart,acs)
  301. end
  302.  
  303. function createbodypart(TYPE,COLOR,PART,OFFSET,SIZE)
  304. if TYPE == "Gem" then
  305. local acs = CreatePart(3, Character, "Plastic", 0, 0, COLOR, "Part", VT(0,0,0))
  306. acs.Anchored = false
  307. acs.CanCollide = false
  308. acs.CFrame = PART.CFrame
  309. local acs2 = CreateMesh("SpecialMesh", acs, "FileMesh", "9756362", "", SIZE, OFFSET)
  310. weldBetween(PART,acs)
  311. elseif TYPE == "Skull" then
  312. local acs = CreatePart(3, Character, "Plastic", 0, 0, COLOR, "Part", VT(0,0,0))
  313. acs.Anchored = false
  314. acs.CanCollide = false
  315. acs.CFrame = PART.CFrame
  316. local acs2 = CreateMesh("SpecialMesh", acs, "FileMesh", "4770583", "", SIZE, OFFSET)
  317. weldBetween(PART,acs)
  318. elseif TYPE == "Eye" then
  319. local acs = CreatePart(3, Character, "Neon", 0, 0, COLOR, "Part", VT(0,0,0))
  320. acs.Anchored = false
  321. acs.CanCollide = false
  322. acs.CFrame = PART.CFrame
  323. local acs2 = CreateMesh("SpecialMesh", acs, "Sphere", "", "", SIZE, OFFSET)
  324. weldBetween(PART,acs)
  325. end
  326. end
  327.  
  328. createbodypart("Eye","Really red",Head,VT(0.2, -0.1, -0.55),VT(5,5,3))
  329. createbodypart("Eye","Really red",Head,VT(-0.2, -0.1, -0.55),VT(5,5,3))
  330. createbodypart("Eye","Really red",Head,VT(0.3, 0.15, -0.55),VT(3,3,2))
  331. createbodypart("Eye","Really red",Head,VT(-0.3, 0.15, -0.55),VT(3,3,2))
  332. createbodypart("Eye","Really red",Head,VT(0.1, 0.25, -0.55),VT(3,3,2))
  333. createbodypart("Eye","Really red",Head,VT(-0.1, 0.25, -0.55),VT(3,3,2))
  334. createbodypart("Eye","Really red",Head,VT(0.3, 0.3, -0.55),VT(2,2,1))
  335. createbodypart("Eye","Really red",Head,VT(-0.3, 0.3, -0.55),VT(2,2,1))
  336.  
  337. --//=================================\\
  338. --|| USEFUL VALUES
  339. --\\=================================//
  340.  
  341. local ROOTC0 = CF(0, 0, 0) * ANGLES(RAD(-90), RAD(0), RAD(180))
  342. local NECKC0 = CF(0, 1, 0) * ANGLES(RAD(-90), RAD(0), RAD(180))
  343. local RIGHTSHOULDERC0 = CF(-0.5, 0, 0) * ANGLES(RAD(0), RAD(90), RAD(0))
  344. local LEFTSHOULDERC0 = CF(0.5, 0, 0) * ANGLES(RAD(0), RAD(-90), RAD(0))
  345. local CO1 = 0
  346. local CO2 = 0
  347. local CO3 = 0
  348. local CO4 = 0
  349. local CHANGEDEFENSE = 0
  350. local CHANGEDAMAGE = 0
  351. local CHANGEMOVEMENT = 0
  352. local ANIM = "Idle"
  353. local ATTACK = false
  354. local EQUIPPED = false
  355. local HOLD = false
  356. local COMBO = 1
  357. local LASTPOINT = nil
  358. local BLCF = nil
  359. local SCFR = nil
  360. local STAGGERHITANIM = false
  361. local STAGGERANIM = false
  362. local STUNANIM = false
  363. local CRITCHANCENUMBER = 0
  364. local IDLENUMBER = 0
  365. local DONUMBER = 0
  366. local HANDIDLE = false
  367. local SINE = 0
  368. local CHANGE = 2 / Animation_Speed
  369. local WALKINGANIM = false
  370. local WALK = 0
  371. local DISABLEJUMPING = false
  372. local HASBEENBLOCKED = false
  373. local STUNDELAYNUMBER = 0
  374. local MANADELAYNUMBER = 0
  375. local SECONDARYMANADELAYNUMBER = 0
  376. local ROBLOXIDLEANIMATION = IT("Animation")
  377. ROBLOXIDLEANIMATION.Name = "Roblox Idle Animation"
  378. ROBLOXIDLEANIMATION.AnimationId = "http://www.roblox.com/asset/?id=180435571"
  379. --ROBLOXIDLEANIMATION.Parent = Humanoid
  380. local WEAPONGUI = IT("ScreenGui", nil)
  381. WEAPONGUI.Name = "Weapon GUI"
  382. local WEAPONTOOL = IT("HopperBin", nil)
  383. WEAPONTOOL.Name = Weapon_Name
  384. local Weapon = IT("Model")
  385. Weapon.Name = Weapon_Name
  386. local Effects = IT("Folder", Weapon)
  387. Effects.Name = "Effects"
  388. local ANIMATOR = Humanoid.Animator
  389. local ANIMATE = Character.Animate
  390. local HITPLAYERSOUNDS = {"199149137", "199149186", "199149221", "199149235", "199149269", "199149297"}
  391. local HITARMORSOUNDS = {"199149321", "199149338", "199149367", "199149409", "199149452"}
  392. local HITWEAPONSOUNDS = {"199148971", "199149025", "199149072", "199149109", "199149119"}
  393. local HITBLOCKSOUNDS = {"199148933", "199148947"}
  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. Swait()
  693. NEWSOUND:play()
  694. game:GetService("Debris"):AddItem(NEWSOUND, 10)
  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. --|| WEAPON CREATION
  705. --\\=================================//
  706.  
  707. --limbs--------------
  708.  
  709. local limb1a = CreatePart(3, Weapon, "SmoothPlastic", 0, 0, "Really black", "Handle", VT(0.35*Player_Size,0.35*Player_Size,3*Player_Size))
  710. local mesh = Instance.new("SpecialMesh",limb1a)
  711. mesh.MeshType = "Sphere"
  712. local limbweld1a = CreateWeldOrSnapOrMotor("Weld", limb1a, Torso, limb1a, CF(1 * Player_Size, 1.2 * Player_Size, 1 * Player_Size) * ANGLES(RAD(-45), RAD(25), RAD(0)), CF(0, 0, 0))
  713. local limb1b = CreatePart(3, Weapon, "SmoothPlastic", 0, 0, "Really black", "Handle", VT(0.35*Player_Size,0.35*Player_Size,3*Player_Size))
  714. local mesh = Instance.new("SpecialMesh",limb1b)
  715. mesh.MeshType = "Sphere"
  716. local limbweld1b = CreateWeldOrSnapOrMotor("Weld", limb1b, limb1a, limb1b, CF(0* Player_Size, 1.4 * Player_Size, 1.4 * Player_Size) * ANGLES(RAD(90), RAD(0), RAD(0)), CF(0, 0, 0))
  717. local limb1c = CreatePart(3, Weapon, "SmoothPlastic", 0, 0, "Really black", "Handle", VT(0.35*Player_Size,0.35*Player_Size,3*Player_Size))
  718. local mesh = Instance.new("SpecialMesh",limb1c)
  719. mesh.MeshType = "Sphere"
  720. local limbweld1c = CreateWeldOrSnapOrMotor("Weld", limb1c, limb1b, limb1c, CF(0 * Player_Size, -1.1 * Player_Size, -2.3 * Player_Size) * ANGLES(RAD(-50), RAD(0), RAD(0)), CF(0, 0, 0))
  721.  
  722. local limb2a = CreatePart(3, Weapon, "SmoothPlastic", 0, 0, "Really black", "Handle", VT(0.35*Player_Size,0.35*Player_Size,3*Player_Size))
  723. local mesh = Instance.new("SpecialMesh",limb2a)
  724. mesh.MeshType = "Sphere"
  725. local limbweld2a = CreateWeldOrSnapOrMotor("Weld", limb2a, Torso, limb2a, CF(-1 * Player_Size, 1.2 * Player_Size, 1 * Player_Size) * ANGLES(RAD(-45), RAD(-25), RAD(0)), CF(0, 0, 0))
  726. local limb2b = CreatePart(3, Weapon, "SmoothPlastic", 0, 0, "Really black", "Handle", VT(0.35*Player_Size,0.35*Player_Size,3*Player_Size))
  727. local mesh = Instance.new("SpecialMesh",limb2b)
  728. mesh.MeshType = "Sphere"
  729. local limbweld2b = CreateWeldOrSnapOrMotor("Weld", limb2b, limb2a, limb2b, CF(0* Player_Size, 1.4 * Player_Size, 1.4 * Player_Size) * ANGLES(RAD(90), RAD(0), RAD(0)), CF(0, 0, 0))
  730. local limb2c = CreatePart(3, Weapon, "SmoothPlastic", 0, 0, "Really black", "Handle", VT(0.35*Player_Size,0.35*Player_Size,3*Player_Size))
  731. local mesh = Instance.new("SpecialMesh",limb2c)
  732. mesh.MeshType = "Sphere"
  733. local limbweld2c = CreateWeldOrSnapOrMotor("Weld", limb2c, limb2b, limb2c, CF(0 * Player_Size, -1.1 * Player_Size, -2.3 * Player_Size) * ANGLES(RAD(-50), RAD(0), RAD(0)), CF(0, 0, 0))
  734.  
  735. local limb3a = CreatePart(3, Weapon, "SmoothPlastic", 0, 0, "Really black", "Handle", VT(0.35*Player_Size,0.35*Player_Size,3*Player_Size))
  736. local mesh = Instance.new("SpecialMesh",limb3a)
  737. mesh.MeshType = "Sphere"
  738. local limbweld3a = CreateWeldOrSnapOrMotor("Weld", limb3a, Torso, limb3a, CF(-1 * Player_Size, -0.7 * Player_Size, 1 * Player_Size) * ANGLES(RAD(25), RAD(-25), RAD(90)), CF(0, 0, 0))
  739. local limb3b = CreatePart(3, Weapon, "SmoothPlastic", 0, 0, "Really black", "Handle", VT(0.35*Player_Size,0.35*Player_Size,3*Player_Size))
  740. local mesh = Instance.new("SpecialMesh",limb3b)
  741. mesh.MeshType = "Sphere"
  742. local limbweld3b = CreateWeldOrSnapOrMotor("Weld", limb3b, limb3a, limb3b, CF(-0.6* Player_Size, 1.3 * Player_Size, 1.4 * Player_Size) * ANGLES(RAD(90), RAD(25), RAD(0)), CF(0, 0, 0))
  743. local limb3c = CreatePart(3, Weapon, "SmoothPlastic", 0, 0, "Really black", "Handle", VT(0.35*Player_Size,0.35*Player_Size,3*Player_Size))
  744. local mesh = Instance.new("SpecialMesh",limb3c)
  745. mesh.MeshType = "Sphere"
  746. local limbweld3c = CreateWeldOrSnapOrMotor("Weld", limb3c, limb3b, limb3c, CF(0 * Player_Size, -1.1 * Player_Size, -2.3 * Player_Size) * ANGLES(RAD(-50), RAD(0), RAD(0)), CF(0, 0, 0))
  747.  
  748. local limb4a = CreatePart(3, Weapon, "SmoothPlastic", 0, 0, "Really black", "Handle", VT(0.35*Player_Size,0.35*Player_Size,3*Player_Size))
  749. local mesh = Instance.new("SpecialMesh",limb4a)
  750. mesh.MeshType = "Sphere"
  751. local limbweld4a = CreateWeldOrSnapOrMotor("Weld", limb4a, Torso, limb4a, CF(1 * Player_Size, -0.7 * Player_Size, 1 * Player_Size) * ANGLES(RAD(25), RAD(25), RAD(-90)), CF(0, 0, 0))
  752. local limb4b = CreatePart(3, Weapon, "SmoothPlastic", 0, 0, "Really black", "Handle", VT(0.35*Player_Size,0.35*Player_Size,3*Player_Size))
  753. local mesh = Instance.new("SpecialMesh",limb4b)
  754. mesh.MeshType = "Sphere"
  755. local limbweld4b = CreateWeldOrSnapOrMotor("Weld", limb4b, limb4a, limb4b, CF(0.6* Player_Size, 1.3 * Player_Size, 1.4 * Player_Size) * ANGLES(RAD(90), RAD(-25), RAD(0)), CF(0, 0, 0))
  756. local limb4c = CreatePart(3, Weapon, "SmoothPlastic", 0, 0, "Really black", "Handle", VT(0.35*Player_Size,0.35*Player_Size,3*Player_Size))
  757. local mesh = Instance.new("SpecialMesh",limb4c)
  758. mesh.MeshType = "Sphere"
  759. local limbweld4c = CreateWeldOrSnapOrMotor("Weld", limb4c, limb4b, limb4c, CF(0 * Player_Size, -1.1 * Player_Size, -2.3 * Player_Size) * ANGLES(RAD(-50), RAD(0), RAD(0)), CF(0, 0, 0))
  760.  
  761. ---------------------
  762.  
  763. for _, c in pairs(Weapon:GetChildren()) do
  764. if c.ClassName == "Part" then
  765. c.CustomPhysicalProperties = PhysicalProperties.new(0, 0, 0, 0, 0)
  766. end
  767. end
  768.  
  769. Weapon.Parent = Character
  770.  
  771. Humanoid.Died:connect(function()
  772. ATTACK = true
  773. end)
  774.  
  775. print(Class_Name.." loaded.")
  776.  
  777. --//=================================\\
  778. --\\=================================//
  779.  
  780.  
  781.  
  782.  
  783.  
  784. --//=================================\\
  785. --|| DAMAGE FUNCTIONS
  786. --\\=================================//
  787.  
  788. function StatLabel(LABELTYPE, CFRAME, TEXT, COLOR)
  789. local STATPART = CreatePart(3, Effects, "SmoothPlastic", 0, 1, "Really black", "Effect", VT())
  790. STATPART.CFrame = CF(CFRAME.p + VT(0, 1.5, 0))
  791. local BODYGYRO = IT("BodyGyro", STATPART)
  792. local BODYPOSITION = IT("BodyPosition", STATPART)
  793. BODYPOSITION.P = 2000
  794. BODYPOSITION.D = 100
  795. BODYPOSITION.maxForce = VT(math.huge, math.huge, math.huge)
  796. if LABELTYPE == "Normal" then
  797. BODYPOSITION.position = STATPART.Position + VT(MRANDOM(-2, 2), 6, MRANDOM(-2, 2))
  798. elseif LABELTYPE == "Debuff" then
  799. BODYPOSITION.position = STATPART.Position + VT(MRANDOM(-2, 2), 8, MRANDOM(-2, 2))
  800. elseif LABELTYPE == "Interruption" then
  801. BODYPOSITION.position = STATPART.Position + VT(MRANDOM(-2,2), 8, MRANDOM(-2, 2))
  802. end
  803. game:GetService("Debris"):AddItem(STATPART ,5)
  804. local BILLBOARDGUI = Instance.new("BillboardGui", STATPART)
  805. BILLBOARDGUI.Adornee = STATPART
  806. BILLBOARDGUI.Size = UD2(2.5, 0, 2.5 ,0)
  807. BILLBOARDGUI.StudsOffset = VT(-2, 2, 0)
  808. BILLBOARDGUI.AlwaysOnTop = false
  809. local TEXTLABEL = Instance.new("TextLabel", BILLBOARDGUI)
  810. TEXTLABEL.BackgroundTransparency = 1
  811. TEXTLABEL.Size = UD2(2.5, 0, 2.5, 0)
  812. TEXTLABEL.Text = TEXT
  813. TEXTLABEL.Font = "Antique"
  814. TEXTLABEL.FontSize="Size42"
  815. TEXTLABEL.TextColor3 = COLOR
  816. TEXTLABEL.TextStrokeTransparency = 1
  817. TEXTLABEL.TextScaled = true
  818. TEXTLABEL.TextWrapped = true
  819. coroutine.resume(coroutine.create(function(THEPART, THEBODYPOSITION, THETEXTLABEL)
  820. wait(0.2)
  821. for i=1, 5 do
  822. wait()
  823. THEBODYPOSITION.Position = THEPART.Position - VT(0, 0.5 ,0)
  824. end
  825. wait(1.2)
  826. for i=1, 5 do
  827. wait()
  828. THETEXTLABEL.TextTransparency = THETEXTLABEL.TextTransparency + 0.2
  829. THETEXTLABEL.TextStrokeTransparency = THETEXTLABEL.TextStrokeTransparency + 0.2
  830. THEBODYPOSITION.position = THEPART.Position + VT(0, 0.5, 0)
  831. end
  832. THEPART.Parent = nil
  833. end),STATPART, BODYPOSITION, TEXTLABEL)
  834. end
  835.  
  836. local asd = Instance.new("ParticleEmitter")
  837. asd.Color = ColorSequence.new(Color3.new(1, 0, 0), Color3.new(.5, 0, 0))
  838. asd.LightEmission = .1
  839. asd.Size = NumberSequence.new(0.2)
  840. asd.Texture = "http://www.roblox.com/asset/?ID=291880914"
  841. aaa = NumberSequence.new({NumberSequenceKeypoint.new(0, 0.2),NumberSequenceKeypoint.new(1, 5)})
  842. bbb = NumberSequence.new({NumberSequenceKeypoint.new(0, 1),NumberSequenceKeypoint.new(0.0636, 0), NumberSequenceKeypoint.new(1, 1)})
  843. asd.Transparency = bbb
  844. asd.Size = aaa
  845. asd.ZOffset = .9
  846. asd.Acceleration = Vector3.new(0, -5, 0)
  847. asd.LockedToPart = false
  848. asd.EmissionDirection = "Back"
  849. asd.Lifetime = NumberRange.new(1, 2)
  850. asd.Rotation = NumberRange.new(-100, 100)
  851. asd.RotSpeed = NumberRange.new(-100, 100)
  852. asd.Speed = NumberRange.new(2)
  853. asd.Enabled = false
  854. asd.VelocitySpread = 10000
  855.  
  856. function getbloody(victim,amount)
  857. local prtcl = asd:Clone()
  858. prtcl.Parent = victim
  859. prtcl:Emit(amount)
  860. end
  861.  
  862. function dealdamage(hit,maxstrength,beserk)
  863. if hit.Parent:FindFirstChildOfClass("Humanoid") and hit.Parent:FindFirstChild("HitBy"..Player.Name) == nil then
  864. local humanoid = hit.Parent:FindFirstChildOfClass("Humanoid")
  865. if humanoid.Health == "inf" then
  866. StatLabel("Normal", hit.CFrame * CF(0, 0 + (hit.Size.z - 1), 0), "inf, skid", C3(255/255, 0, 0))
  867. humanoid.Health = 0
  868. end
  869. if humanoid.Health > 0 and humanoid.MaxHealth ~= "inf" then
  870. if beserk == true then
  871. humanoid.Health = 0
  872. else
  873. if humanoid.MaxHealth ~= "inf" then
  874. getbloody(hit,3)
  875. CreateSound(HITPLAYERSOUNDS[MRANDOM(1, #HITPLAYERSOUNDS)], hit, 1.2, MRANDOM(7, 12) / 10)
  876. hit.Velocity = CFrame.new(Torso.Position,hit.Position).lookVector*5*maxstrength
  877. local dmg = humanoid.MaxHealth/5
  878. if math.random(1,5) == 1 then
  879. humanoid.Health = humanoid.Health - dmg*3
  880. StatLabel("Normal", hit.CFrame * CF(0, 0 + (hit.Size.z - 1), 0), "CRIT/"..dmg*3, C3(255/255, 0, 0))
  881. else
  882. humanoid.Health = humanoid.Health - dmg
  883. StatLabel("Normal", hit.CFrame * CF(0, 0 + (hit.Size.z - 1), 0), dmg, C3(255/255, 0, 0))
  884. end
  885. local defence = Instance.new("BoolValue",hit.Parent)
  886. defence.Name = ("HitBy"..Player.Name)
  887. game:GetService("Debris"):AddItem(defence, 0.5)
  888. elseif humanoid.MaxHealth == "inf" then
  889. humanoid.Health = 0
  890. getbloody(hit,50)
  891. end
  892. end
  893. elseif humanoid.MaxHealth == "inf" then
  894. StatLabel("Normal", hit.CFrame * CF(0, 0 + (hit.Size.z - 1), 0), "inf, skid", C3(255/255, 0, 0))
  895. humanoid.Health = 0
  896. end
  897. end
  898. end
  899.  
  900. --//=================================\\
  901. --|| ATTACK FUNCTIONS AND STUFF
  902. --\\=================================//
  903.  
  904.  
  905. function Attack()
  906. stab = true
  907. local Animation_Speed2 = Animation_Speed/2
  908. for i=0, 1, 0.1 / Animation_Speed2 do
  909. Swait()
  910. limbweld1a.C0 = Clerp(limbweld1a.C0, CF(1 * Player_Size, 0.8 * Player_Size, 1 * Player_Size) * ANGLES(RAD(-10), RAD(25), RAD(0)), 0.4 / Animation_Speed2)
  911. limbweld1b.C0 = Clerp(limbweld1b.C0, CF(0 * Player_Size, 1.4 * Player_Size, 1.4 * Player_Size) * ANGLES(RAD(90), RAD(0), RAD(0)), 0.4 / Animation_Speed2)
  912. limbweld1c.C0 = Clerp(limbweld1c.C0, CF(0 * Player_Size, -1.1 * Player_Size, -2.3 * Player_Size) * ANGLES(RAD(-50), RAD(0), RAD(0)), 0.4 / Animation_Speed2)
  913.  
  914. limbweld2a.C0 = Clerp(limbweld2a.C0, CF(-1 * Player_Size, 0.8 * Player_Size, 1 * Player_Size) * ANGLES(RAD(-10), RAD(-25), RAD(0)), 0.4 / Animation_Speed2)
  915. limbweld2b.C0 = Clerp(limbweld2b.C0, CF(0 * Player_Size, 1.4 * Player_Size, 1.4 * Player_Size) * ANGLES(RAD(90), RAD(0), RAD(0)), 0.4 / Animation_Speed2)
  916. limbweld2c.C0 = Clerp(limbweld2c.C0, CF(0 * Player_Size, -1.1 * Player_Size, -2.3 * Player_Size) * ANGLES(RAD(-50), RAD(0), RAD(0)), 0.4 / Animation_Speed2)
  917.  
  918. limbweld3a.C0 = Clerp(limbweld3a.C0, CF(-0.6 * Player_Size, -0.65 * Player_Size, 1 * Player_Size) * ANGLES(RAD(25), RAD(0), RAD(90)), 0.4 / Animation_Speed2)
  919. limbweld3b.C0 = Clerp(limbweld3b.C0, CF(-0.6* Player_Size, 1.3 * Player_Size, 1.4 * Player_Size) * ANGLES(RAD(90), RAD(25), RAD(0)), 0.4 / Animation_Speed2)
  920. limbweld3c.C0 = Clerp(limbweld3c.C0, CF(0 * Player_Size, -1.1 * Player_Size, -2.3 * Player_Size) * ANGLES(RAD(-50), RAD(0), RAD(0)), 0.4 / Animation_Speed2)
  921.  
  922. limbweld4a.C0 = Clerp(limbweld4a.C0, CF(0.6 * Player_Size, -0.65 * Player_Size, 1 * Player_Size) * ANGLES(RAD(25), RAD(0), RAD(-90)), 0.4 / Animation_Speed2)
  923. limbweld4b.C0 = Clerp(limbweld4b.C0, CF(0.6* Player_Size, 1.3 * Player_Size, 1.4 * Player_Size) * ANGLES(RAD(90), RAD(-25), RAD(0)), 0.4 / Animation_Speed2)
  924. limbweld4c.C0 = Clerp(limbweld4c.C0, CF(0 * Player_Size, -1.1 * Player_Size, -2.3 * Player_Size) * ANGLES(RAD(-50), RAD(0), RAD(0)), 0.4 / Animation_Speed2)
  925. end
  926. CreateSound("1112042117", Torso, 1, MRANDOM(9, 11) / 10)
  927. local paw1 = limb1c.Touched:Connect(function(hit)
  928. dealdamage(hit,5)
  929. end)
  930. local paw2 = limb2c.Touched:Connect(function(hit)
  931. dealdamage(hit,5)
  932. end)
  933. local paw3 = limb3c.Touched:Connect(function(hit)
  934. dealdamage(hit,5)
  935. end)
  936. local paw4 = limb4c.Touched:Connect(function(hit)
  937. dealdamage(hit,5)
  938. end)
  939. for i=0, 1, 0.1 / Animation_Speed2 do
  940. Swait()
  941. limbweld1a.C0 = Clerp(limbweld1a.C0, CF(1 * Player_Size, 1.6 * Player_Size, 0.6 * Player_Size) * ANGLES(RAD(-75), RAD(25), RAD(0)), 0.4 / Animation_Speed2)
  942. limbweld1b.C0 = Clerp(limbweld1b.C0, CF(0.4 * Player_Size, 1.2 * Player_Size, 0.8 * Player_Size) * ANGLES(RAD(60), RAD(-15), RAD(0)), 0.4 / Animation_Speed2)
  943. limbweld1c.C0 = Clerp(limbweld1c.C0, CF(0 * Player_Size, -1.1 * Player_Size, -2.3 * Player_Size) * ANGLES(RAD(-50), RAD(0), RAD(0)), 0.4 / Animation_Speed2)
  944.  
  945. limbweld2a.C0 = Clerp(limbweld2a.C0, CF(-1 * Player_Size, 1.6 * Player_Size, 0.6 * Player_Size) * ANGLES(RAD(-75), RAD(-25), RAD(0)), 0.4 / Animation_Speed2)
  946. limbweld2b.C0 = Clerp(limbweld2b.C0, CF(-0.4 * Player_Size, 1.2 * Player_Size, 0.8 * Player_Size) * ANGLES(RAD(60), RAD(15), RAD(0)), 0.4 / Animation_Speed2)
  947. limbweld2c.C0 = Clerp(limbweld2c.C0, CF(0 * Player_Size, -1.1 * Player_Size, -2.3 * Player_Size) * ANGLES(RAD(-50), RAD(0), RAD(0)), 0.4 / Animation_Speed2)
  948.  
  949. limbweld3a.C0 = Clerp(limbweld3a.C0, CF(-1.4 * Player_Size, -0.7 * Player_Size, 1 * Player_Size) * ANGLES(RAD(25), RAD(-50), RAD(90)), 0.4 / Animation_Speed2)
  950. limbweld3b.C0 = Clerp(limbweld3b.C0, CF(-0.6* Player_Size, 1 * Player_Size, 0.6 * Player_Size) * ANGLES(RAD(50), RAD(25), RAD(0)), 0.4 / Animation_Speed2)
  951. limbweld3c.C0 = Clerp(limbweld3c.C0, CF(0 * Player_Size, -1.1 * Player_Size, -2.3 * Player_Size) * ANGLES(RAD(-50), RAD(0), RAD(0)), 0.4 / Animation_Speed2)
  952.  
  953. limbweld4a.C0 = Clerp(limbweld4a.C0, CF(1.4 * Player_Size, -0.7 * Player_Size, 1 * Player_Size) * ANGLES(RAD(25), RAD(50), RAD(-90)), 0.4 / Animation_Speed2)
  954. limbweld4b.C0 = Clerp(limbweld4b.C0, CF(0.6* Player_Size, 1 * Player_Size, 0.6 * Player_Size) * ANGLES(RAD(50), RAD(-25), RAD(0)), 0.4 / Animation_Speed2)
  955. limbweld4c.C0 = Clerp(limbweld4c.C0, CF(0 * Player_Size, -1.1 * Player_Size, -2.3 * Player_Size) * ANGLES(RAD(-50), RAD(0), RAD(0)), 0.4 / Animation_Speed2)
  956. end
  957. paw1:disconnect()
  958. paw2:disconnect()
  959. paw3:disconnect()
  960. paw4:disconnect()
  961. stab = false
  962. end
  963.  
  964. function Weld2(to, from, c1)
  965. local New_Weld = Instance.new('Motor', to)
  966. New_Weld.Part0 = from
  967. New_Weld.Part1 = to
  968. New_Weld.C1 = c1
  969. New_Weld.Name = "GrabWeld"
  970. return New_Weld
  971. end
  972.  
  973. function grabandfeed()
  974. ATTACK = true
  975. local victim = nil
  976. local tors = nil
  977. local wld = nil
  978. for i=0, 1, 0.1 / Animation_Speed do
  979. Swait()
  980. RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0 * Player_Size, 0 * Player_Size, -0.2 * Player_Size + 0.05 * COS(SINE / 12) * Player_Size) * ANGLES(RAD(0), RAD(0), RAD(-25)), 0.15 / Animation_Speed)
  981. 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(15)), 0.15 / Animation_Speed)
  982. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(90), RAD(0), RAD(90)) * RIGHTSHOULDERC0, 0.15 / Animation_Speed)
  983. 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)
  984. RightHip.C0 = Clerp(RightHip.C0, CF(1 * Player_Size, -0.8 * Player_Size - 0.05 * COS(SINE / 12) * Player_Size, -0.2 * Player_Size) * ANGLES(RAD(0), RAD(95), RAD(0)) * ANGLES(RAD(-5), RAD(0), RAD(-2.5)), 0.15 / Animation_Speed)
  985. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1 * Player_Size, -0.8 * Player_Size - 0.05 * COS(SINE / 12) * Player_Size, -0.2 * Player_Size) * ANGLES(RAD(-15), RAD(-75), RAD(0)) * ANGLES(RAD(-7.5), RAD(0), RAD(-15)), 0.15 / Animation_Speed)
  986. end
  987. local hitting = RightArm.Touched:connect(function(hit)
  988. if hit.Parent:FindFirstChild("Humanoid") then
  989. if hit.Parent.Humanoid.Health ~= 0 then
  990. UNANCHOR = false
  991. victim = hit.Parent.Humanoid
  992. RootPart.Anchored = true
  993. if hit.Parent:FindFirstChild("Torso") then
  994. wld=Weld2(RightArm,hit.Parent.Torso,CF(0,-1.5,0)*ANGLES(-RAD(90),RAD(180),0))
  995. RootPart.Anchored = true
  996. tors = hit.Parent:FindFirstChild("Torso")
  997. elseif hit.Parent:FindFirstChild("UpperTorso") then
  998. wld=Weld2(RightArm,hit.Parent.UpperTorso,CF(0,-1.5,0)*ANGLES(-RAD(90),RAD(180),0))
  999. RootPart.Anchored = true
  1000. tors = hit.Parent:FindFirstChild("UpperTorso")
  1001. end
  1002. end
  1003. end
  1004. end)
  1005. for i=0, 1, 0.1 / Animation_Speed do
  1006. Swait()
  1007. RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0 * Player_Size, 0 * Player_Size, -0.2 * Player_Size + 0.05 * COS(SINE / 12) * Player_Size) * ANGLES(RAD(0), RAD(0), RAD(55)), 0.15 / Animation_Speed)
  1008. 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(-25)), 0.45 / Animation_Speed)
  1009. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5 * Player_Size, 0.5 * Player_Size, -1 * Player_Size) * ANGLES(RAD(60), RAD(0), RAD(-25)) * RIGHTSHOULDERC0, 0.15 / Animation_Speed)
  1010. 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)
  1011. RightHip.C0 = Clerp(RightHip.C0, CF(1 * Player_Size, -0.8 * Player_Size - 0.05 * COS(SINE / 12) * Player_Size, -0.2 * Player_Size) * ANGLES(RAD(0), RAD(95), RAD(0)) * ANGLES(RAD(-5), RAD(0), RAD(-2.5)), 0.15 / Animation_Speed)
  1012. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1 * Player_Size, -0.8 * Player_Size - 0.05 * COS(SINE / 12) * Player_Size, -0.2 * Player_Size) * ANGLES(RAD(-35), RAD(-75), RAD(0)) * ANGLES(RAD(-7.5), RAD(0), RAD(-15)), 0.15 / Animation_Speed)
  1013. end
  1014. if victim ~= nil then
  1015. Rooted = true
  1016. local Animation_Speed2 = Animation_Speed*2
  1017. for i= 0, 1, 0.1 / Animation_Speed2 do
  1018. Swait()
  1019. RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0 * Player_Size, 0 * Player_Size, -0.2 * Player_Size + 0.05 * COS(SINE / 12) * Player_Size) * ANGLES(RAD(0), RAD(0), RAD(55)), 0.15 / Animation_Speed2)
  1020. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0 * Player_Size, 0 * Player_Size, 0 + ((1 * Player_Size) - 1)) * ANGLES(RAD(-45), RAD(0), RAD(-25)), 0.45 / Animation_Speed2)
  1021. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5 * Player_Size, 0.5 * Player_Size, 0.2 * Player_Size) * ANGLES(RAD(90), RAD(0), RAD(-45)) * RIGHTSHOULDERC0, 0.15 / Animation_Speed2)
  1022. 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_Speed2)
  1023. RightHip.C0 = Clerp(RightHip.C0, CF(1 * Player_Size, -0.8 * Player_Size - 0.05 * COS(SINE / 12) * Player_Size, -0.2 * Player_Size) * ANGLES(RAD(0), RAD(95), RAD(0)) * ANGLES(RAD(-5), RAD(0), RAD(-2.5)), 0.15 / Animation_Speed2)
  1024. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1 * Player_Size, -0.8 * Player_Size - 0.05 * COS(SINE / 12) * Player_Size, -0.2 * Player_Size) * ANGLES(RAD(-35), RAD(-75), RAD(0)) * ANGLES(RAD(-7.5), RAD(0), RAD(-15)), 0.15 / Animation_Speed2)
  1025. end
  1026. for i= 0, 1, 0.1 / Animation_Speed2 do
  1027. Swait()
  1028. RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0 * Player_Size, 0 * Player_Size, -0.2 * Player_Size + 0.05 * COS(SINE / 12) * Player_Size) * ANGLES(RAD(0), RAD(0), RAD(55)), 0.15 / Animation_Speed2)
  1029. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0 * Player_Size, 0 * Player_Size, 0 + ((1 * Player_Size) - 1)) * ANGLES(RAD(45), RAD(0), RAD(-25)), 0.45 / Animation_Speed2)
  1030. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5 * Player_Size, 0.5 * Player_Size, 0.2 * Player_Size) * ANGLES(RAD(90), RAD(0), RAD(-45)) * RIGHTSHOULDERC0, 0.15 / Animation_Speed2)
  1031. 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_Speed2)
  1032. RightHip.C0 = Clerp(RightHip.C0, CF(1 * Player_Size, -0.8 * Player_Size - 0.05 * COS(SINE / 12) * Player_Size, -0.2 * Player_Size) * ANGLES(RAD(0), RAD(95), RAD(0)) * ANGLES(RAD(-5), RAD(0), RAD(-2.5)), 0.15 / Animation_Speed2)
  1033. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1 * Player_Size, -0.8 * Player_Size - 0.05 * COS(SINE / 12) * Player_Size, -0.2 * Player_Size) * ANGLES(RAD(-35), RAD(-75), RAD(0)) * ANGLES(RAD(-7.5), RAD(0), RAD(-15)), 0.15 / Animation_Speed2)
  1034. end
  1035. CreateSound("264486467", tors, 1, MRANDOM(9, 11) / 10)
  1036. CreateSound("230346233", Head, 6, 0.7)
  1037. getbloody(tors,150)
  1038. Swait(40)
  1039. tors.Anchored = true
  1040. tors.Transparency = 1
  1041. game:GetService("Debris"):AddItem(tors, 5)
  1042. foodism = foodism + victim.Health
  1043. victim.Health = 0
  1044. Rooted = false
  1045. end
  1046. UNANCHOR = true
  1047. if wld ~= nil then
  1048. wld:remove()
  1049. end
  1050. hitting:disconnect()
  1051. ATTACK = false
  1052. end
  1053.  
  1054. function roar()
  1055. ATTACK = true
  1056. Rooted = true
  1057. for i=0, 1.3, 0.1 / Animation_Speed do
  1058. Swait()
  1059. RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0 * Player_Size, 0.1 * Player_Size, -0.2 * Player_Size + 0.05 * COS(SINE / 12) * Player_Size) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed)
  1060. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0 * Player_Size, 0 * Player_Size, 0 + ((1 * Player_Size) - 1)) * ANGLES(RAD(45), RAD(0), RAD(0)), 0.15 / Animation_Speed)
  1061. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5 * Player_Size, 0.5 * Player_Size, -0.3 * Player_Size) * ANGLES(RAD(120), RAD(-15), RAD(-70)) * RIGHTSHOULDERC0, 0.15 / Animation_Speed)
  1062. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5 * Player_Size, 0.5 * Player_Size, -0.3 * Player_Size) * ANGLES(RAD(120), RAD(15), RAD(70)) * LEFTSHOULDERC0, 0.15 / Animation_Speed)
  1063. RightHip.C0 = Clerp(RightHip.C0, CF(1 * Player_Size, -0.9 * 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)
  1064. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1 * Player_Size, -0.9 * 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)
  1065. end
  1066. CreateSound("180140312", Head, 6, 1)
  1067. for i=0, 3, 0.1 / Animation_Speed do
  1068. Swait()
  1069. RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0 * Player_Size, 0.1 * Player_Size, -0.2 * Player_Size + 0.05 * COS(SINE / 12) * Player_Size) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed)
  1070. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0 * Player_Size, 0 * Player_Size, 0 + ((1 * Player_Size) - 1)) * ANGLES(RAD(-45), RAD(0), RAD(0)), 0.15 / Animation_Speed)
  1071. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5 * Player_Size, 0.5 * Player_Size, -0.3 * Player_Size) * ANGLES(RAD(120), RAD(15), RAD(100)) * RIGHTSHOULDERC0, 0.15 / Animation_Speed*2)
  1072. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5 * Player_Size, 0.5 * Player_Size, -0.3 * Player_Size) * ANGLES(RAD(120), RAD(-15), RAD(-100)) * LEFTSHOULDERC0, 0.15 / Animation_Speed*2)
  1073. RightHip.C0 = Clerp(RightHip.C0, CF(1 * Player_Size, -0.9 * 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)
  1074. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1 * Player_Size, -0.9 * 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)
  1075. end
  1076. Rooted = false
  1077. ATTACK = false
  1078. end
  1079.  
  1080. --//=================================\\
  1081. --\\=================================//
  1082.  
  1083.  
  1084.  
  1085. --//=================================\\
  1086. --|| ASSIGN THINGS TO KEYS
  1087. --\\=================================//
  1088.  
  1089. Humanoid.Changed:connect(function(Jump)
  1090. if Jump == "Jump" and (Disable_Jump == true or DISABLEJUMPING == true) then
  1091. Humanoid.Jump = false
  1092. end
  1093. end)
  1094.  
  1095. function MouseDown(Mouse)
  1096. if ATTACK == false and stab == false then
  1097. Attack()
  1098. end
  1099. end
  1100.  
  1101. function MouseUp(Mouse)
  1102. HOLD = false
  1103. end
  1104.  
  1105. function KeyDown(Key)
  1106. if Key == "e" and stab == false and ATTACK == false then
  1107. grabandfeed()
  1108. end
  1109. if Key == "r" and chitter.Playing == false and stab == false and ATTACK == false then
  1110. roar()
  1111. end
  1112. if Key == "g" and chitter.Playing == false and stab == false and ATTACK == false then
  1113. CreateSound("609473931", Head, 6, 1)
  1114. end
  1115. if Key == "t" and ATTACK == false then
  1116. if chitter then
  1117. if chitter.Playing == false then
  1118. chitter:Play()
  1119. end
  1120. end
  1121. end
  1122. end
  1123.  
  1124. function KeyUp(Key)
  1125. end
  1126.  
  1127. Mouse.Button1Down:connect(function(NEWKEY)
  1128. MouseDown(NEWKEY)
  1129. end)
  1130. Mouse.Button1Up:connect(function(NEWKEY)
  1131. MouseUp(NEWKEY)
  1132. end)
  1133. Mouse.KeyDown:connect(function(NEWKEY)
  1134. KeyDown(NEWKEY)
  1135. end)
  1136. Mouse.KeyUp:connect(function(NEWKEY)
  1137. KeyUp(NEWKEY)
  1138. end)
  1139.  
  1140. --//=================================\\
  1141. --\\=================================//
  1142.  
  1143.  
  1144. function unanchor()
  1145. if UNANCHOR == true then
  1146. g = Character:GetChildren()
  1147. for i = 1, #g do
  1148. if g[i].ClassName == "Part" then
  1149. g[i].Anchored = false
  1150. end
  1151. end
  1152. end
  1153. end
  1154.  
  1155.  
  1156. --//=================================\\
  1157. --|| WRAP THE WHOLE SCRIPT UP
  1158. --\\=================================//
  1159.  
  1160. Humanoid.Changed:connect(function(Jump)
  1161. if Jump == "Jump" and (Disable_Jump == true or DISABLEJUMPING == true) then
  1162. Humanoid.Jump = false
  1163. end
  1164. end)
  1165.  
  1166. Rooted = false
  1167.  
  1168. ANIMATE.Parent = nil
  1169. local IDLEANIMATION = Humanoid:LoadAnimation(ROBLOXIDLEANIMATION)
  1170. IDLEANIMATION:Play()
  1171.  
  1172. while true do
  1173. Swait()
  1174. SINE = SINE + CHANGE
  1175. local TORSOVELOCITY = (RootPart.Velocity * VT(1, 0, 1)).magnitude
  1176. local TORSOVERTICALVELOCITY = RootPart.Velocity.y
  1177. local LV = Torso.CFrame:pointToObjectSpace(Torso.Velocity - Torso.Position)
  1178. local HITFLOOR = Raycast(RootPart.Position, (CF(RootPart.Position, RootPart.Position + VT(0, -1, 0))).lookVector, 4 * Player_Size, Character)
  1179. local WALKSPEEDVALUE = 6 / (Humanoid.WalkSpeed / 16)
  1180. if ANIM == "Walk" and TORSOVELOCITY > 1 then
  1181. 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)
  1182. 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)
  1183. 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)
  1184. 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)
  1185. elseif (ANIM ~= "Walk") or (TORSOVELOCITY < 1) then
  1186. RootJoint.C1 = Clerp(RootJoint.C1, ROOTC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed)
  1187. 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)
  1188. 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)
  1189. 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)
  1190. end
  1191. if TORSOVERTICALVELOCITY > 1 and HITFLOOR == nil then
  1192. ANIM = "Jump"
  1193. if ATTACK == false then
  1194. 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)
  1195. 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)
  1196. 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)
  1197. 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)
  1198. 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)
  1199. 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)
  1200. end
  1201. elseif TORSOVERTICALVELOCITY < -1 and HITFLOOR == nil then
  1202. ANIM = "Fall"
  1203. if ATTACK == false then
  1204. 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)
  1205. 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)
  1206. 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)
  1207. 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)
  1208. 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)
  1209. 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)
  1210. end
  1211. elseif TORSOVELOCITY < 1 and HITFLOOR ~= nil then
  1212. ANIM = "Idle"
  1213. if ATTACK == false then
  1214. RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0 * Player_Size, 0.1 * Player_Size, -0.2 * Player_Size + 0.05 * COS(SINE / 12) * Player_Size) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed)
  1215. 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)
  1216. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(0), RAD(0)) * RIGHTSHOULDERC0, 0.15 / Animation_Speed)
  1217. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(0), RAD(0)) * LEFTSHOULDERC0, 0.15 / Animation_Speed)
  1218. RightHip.C0 = Clerp(RightHip.C0, CF(1 * Player_Size, -0.9 * 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)
  1219. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1 * Player_Size, -0.9 * 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)
  1220. end
  1221. elseif TORSOVELOCITY > 1 and HITFLOOR ~= nil then
  1222. ANIM = "Walk"
  1223. WALK = WALK + 1 / Animation_Speed
  1224. if WALK >= 15 - (5 * (Humanoid.WalkSpeed / 16 / Player_Size)) then
  1225. WALK = 0
  1226. if WALKINGANIM == true then
  1227. WALKINGANIM = false
  1228. elseif WALKINGANIM == false then
  1229. WALKINGANIM = true
  1230. end
  1231. end
  1232. --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)
  1233. --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)
  1234. if ATTACK == false then
  1235. RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0 * Player_Size, -0.6 * Player_Size, 0 * Player_Size + 0.05 * COS(SINE / 12) * Player_Size) * ANGLES(RAD(25), RAD(0), RAD(0)), 0.15 / Animation_Speed)
  1236. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0 * Player_Size, 0 * Player_Size, 0 + ((1 * Player_Size) - 1)) * ANGLES(RAD(-25 - 2.5 * SIN(SINE / 12)), RAD(0), RAD(0)), 0.15 / Animation_Speed)
  1237. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(-25), RAD(0), RAD(45)) * RIGHTSHOULDERC0, 0.15 / Animation_Speed)
  1238. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1 * Player_Size, 0.5 * Player_Size, -0.5 * Player_Size) * ANGLES(RAD(90), RAD(0), RAD(50)) * ANGLES(RAD(-2.5 * SIN(SINE / (WALKSPEEDVALUE / 2))), RAD(0), RAD(0)) * LEFTSHOULDERC0, 0.2 * (Humanoid.WalkSpeed / 16) / Animation_Speed)
  1239. RightHip.C0 = Clerp(RightHip.C0, CF(1 * Player_Size, -1.1 * Player_Size, -0 * Player_Size) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed)
  1240. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1 * Player_Size, -1.1 * Player_Size, -0 * Player_Size) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed)
  1241. end
  1242. end
  1243. if stab == false then
  1244. limbweld1a.C0 = Clerp(limbweld1a.C0, CF(1 * Player_Size, 1.2 * Player_Size, 1 * Player_Size) * ANGLES(RAD(-45), RAD(25), RAD(0)), 0.4 / Animation_Speed)
  1245. limbweld1b.C0 = Clerp(limbweld1b.C0, CF(0* Player_Size, 1.4 * Player_Size, 1.4 * Player_Size) * ANGLES(RAD(90), RAD(0), RAD(0)), 0.4 / Animation_Speed)
  1246. limbweld1c.C0 = Clerp(limbweld1c.C0, CF(0 * Player_Size, -1.1 * Player_Size, -2.3 * Player_Size) * ANGLES(RAD(-50), RAD(0), RAD(0)), 0.4 / Animation_Speed)
  1247.  
  1248. limbweld2a.C0 = Clerp(limbweld2a.C0, CF(-1 * Player_Size, 1.2 * Player_Size, 1 * Player_Size) * ANGLES(RAD(-45), RAD(-25), RAD(0)), 0.4 / Animation_Speed)
  1249. limbweld2b.C0 = Clerp(limbweld2b.C0, CF(0* Player_Size, 1.4 * Player_Size, 1.4 * Player_Size) * ANGLES(RAD(90), RAD(0), RAD(0)), 0.4 / Animation_Speed)
  1250. limbweld2c.C0 = Clerp(limbweld2c.C0, CF(0 * Player_Size, -1.1 * Player_Size, -2.3 * Player_Size) * ANGLES(RAD(-50), RAD(0), RAD(0)), 0.4 / Animation_Speed)
  1251.  
  1252. limbweld3a.C0 = Clerp(limbweld3a.C0, CF(-1 * Player_Size, -0.7 * Player_Size, 1 * Player_Size) * ANGLES(RAD(25), RAD(-25), RAD(90)), 0.4 / Animation_Speed)
  1253. limbweld3b.C0 = Clerp(limbweld3b.C0, CF(-0.6* Player_Size, 1.3 * Player_Size, 1.4 * Player_Size) * ANGLES(RAD(90), RAD(25), RAD(0)), 0.4 / Animation_Speed)
  1254. limbweld3c.C0 = Clerp(limbweld3c.C0, CF(0 * Player_Size, -1.1 * Player_Size, -2.3 * Player_Size) * ANGLES(RAD(-50), RAD(0), RAD(0)), 0.4 / Animation_Speed)
  1255.  
  1256. limbweld4a.C0 = Clerp(limbweld4a.C0, CF(1 * Player_Size, -0.7 * Player_Size, 1 * Player_Size) * ANGLES(RAD(25), RAD(25), RAD(-90)), 0.4 / Animation_Speed)
  1257. limbweld4b.C0 = Clerp(limbweld4b.C0, CF(0.6* Player_Size, 1.3 * Player_Size, 1.4 * Player_Size) * ANGLES(RAD(90), RAD(-25), RAD(0)), 0.4 / Animation_Speed)
  1258. limbweld4c.C0 = Clerp(limbweld4c.C0, CF(0 * Player_Size, -1.1 * Player_Size, -2.3 * Player_Size) * ANGLES(RAD(-50), RAD(0), RAD(0)), 0.4 / Animation_Speed)
  1259. end
  1260. if #Effects2>0 then
  1261. for e=1,#Effects2 do
  1262. if Effects2[e]~=nil then
  1263. local Thing=Effects2[e]
  1264. if Thing~=nil then
  1265. local Part=Thing[1]
  1266. local Mode=Thing[2]
  1267. local Delay=Thing[3]
  1268. local IncX=Thing[4]
  1269. local IncY=Thing[5]
  1270. local IncZ=Thing[6]
  1271. local Part2=Thing[8]
  1272. if Thing[1].Transparency<=1 then
  1273. if Thing[2]=="Block1" then
  1274. Thing[1].CFrame=Part2.CFrame
  1275. Mesh=Thing[1].Mesh
  1276. Mesh.Scale=Mesh.Scale+VT(Thing[4],Thing[5],Thing[6])
  1277. Thing[1].Transparency=Thing[1].Transparency+Thing[3]
  1278. elseif Thing[2]=="Cylinder" then
  1279. Mesh=Thing[1].Mesh
  1280. Mesh.Scale=Mesh.Scale+VT(Thing[4],Thing[5],Thing[6])
  1281. Thing[1].Transparency=Thing[1].Transparency+Thing[3]
  1282. elseif Thing[2]=="Blood" then
  1283. Mesh=Thing[7]
  1284. Thing[1].CFrame=Thing[1].CFrame*CF(0,.5,0)
  1285. Mesh.Scale=Mesh.Scale+VT(Thing[4],Thing[5],Thing[6])
  1286. Thing[1].Transparency=Thing[1].Transparency+Thing[3]
  1287. elseif Thing[2]=="Elec" then
  1288. Mesh=Thing[1].Mesh
  1289. Mesh.Scale=Mesh.Scale+VT(Thing[7],Thing[8],Thing[9])
  1290. Thing[1].Transparency=Thing[1].Transparency+Thing[3]
  1291. elseif Thing[2]=="Disappear" then
  1292. Thing[1].Transparency=Thing[1].Transparency+Thing[3]
  1293. end
  1294. else
  1295. Part.Parent=nil
  1296. table.remove(Effects2,e)
  1297. end
  1298. end
  1299. end
  1300. end
  1301. end
  1302. unanchor()
  1303. Humanoid.MaxHealth = foodism
  1304. Humanoid.Health = Humanoid.Health + (foodism/50)
  1305. if Rooted == false then
  1306. Disable_Jump = false
  1307. Humanoid.WalkSpeed = Speed
  1308. elseif Rooted == true then
  1309. Disable_Jump = true
  1310. Humanoid.WalkSpeed = 0
  1311. end
  1312. if Head:FindFirstChild("face") then
  1313. Head.face:remove()
  1314. end
  1315. if Speed > 200 or foodism > (200*80) then
  1316. Speed = 200
  1317. elseif Speed < 200 and foodism < (200*80) then
  1318. Speed = (foodism/80)
  1319. end
  1320. Humanoid.JumpPower = 150
  1321. end
  1322.  
  1323. --//=================================\\
  1324. --\\=================================//
  1325.  
  1326.  
  1327.  
  1328.  
  1329.  
  1330. --//====================================================\\--
  1331. --|| END OF SCRIPT
  1332. --\\====================================================//--
Advertisement
Add Comment
Please, Sign In to add comment