Advertisement
Void_scripter0

Zombie

Apr 5th, 2019
139
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 48.84 KB | None | 0 0
  1. if game:GetService("RunService"):IsClient()then error("Please run as a server script. Use h/ instead of hl/.")end;print("FE Compatibility: by WaverlyCole");InternalData = {}
  2. do
  3. script.Parent = owner.Character
  4. local Event = Instance.new("RemoteEvent");Event.Name = "UserInput"
  5. local function NewFakeEvent()
  6. local Bind = Instance.new("BindableEvent")
  7. local Fake;Fake = {Connections = {},
  8. fakeEvent=true;
  9. Connect=function(self,Func)
  10. Bind.Event:connect(Func)
  11. self.Connections[Bind] = true
  12. return setmetatable({Connected = true},{
  13. __index = function (self,Index)
  14. if Index:lower() == "disconnect" then
  15. return function() Fake.Connections[Bind] = false;self.Connected = false end
  16. end
  17. return Fake[Index]
  18. end;
  19. __tostring = function() return "Connection" end;
  20. })
  21. end}
  22. Fake.connect = Fake.Connect;return Fake;
  23. end
  24. local Mouse = {Target=nil,Hit=CFrame.new(),KeyUp=NewFakeEvent(),KeyDown=NewFakeEvent(),Button1Up=NewFakeEvent(),Button1Down=NewFakeEvent()}
  25. local UserInputService = {InputBegan=NewFakeEvent(),InputEnded=NewFakeEvent()}
  26. local ContextActionService = {Actions={},BindAction = function(self,actionName,Func,touch,...)
  27. self.Actions[actionName] = Func and {Name=actionName,Function=Func,Keys={...}} or nil
  28. end};ContextActionService.UnBindAction = ContextActionService.BindAction
  29. local function TriggerEvent(self,Event,...)
  30. local Trigger = Mouse[Event]
  31. if Trigger and Trigger.fakeEvent and Trigger.Connections then
  32. for Connection,Active in pairs(Trigger.Connections) do if Active then Connection:Fire(...) end end
  33. end
  34. end
  35. Mouse.TrigEvent = TriggerEvent;UserInputService.TrigEvent = TriggerEvent
  36. Event.OnServerEvent:Connect(function(FiredBy,Input)
  37. if FiredBy.Name ~= owner.Name then return end
  38. if Input.MouseEvent then
  39. Mouse.Target = Input.Target;Mouse.Hit = Input.Hit
  40. else
  41. local Begin = Input.UserInputState == Enum.UserInputState.Begin
  42. if Input.UserInputType == Enum.UserInputType.MouseButton1 then return Mouse:TrigEvent(Begin and "Button1Down" or "Button1Up") end
  43. for _,Action in pairs(ContextActionService.Actions) do
  44. for _,Key in pairs(Action.Keys) do if Key==Input.KeyCode then Action.Function(Action.Name,Input.UserInputState,Input) end end
  45. end
  46. Mouse:TrigEvent(Begin and "KeyDown" or "KeyUp",Input.KeyCode.Name:lower())
  47. UserInputService:TrigEvent(Begin and "InputBegan" or "InputEnded",Input,false)
  48. end
  49. end)
  50. InternalData["Mouse"] = Mouse;InternalData["ContextActionService"] = ContextActionService;InternalData["UserInputService"] = UserInputService
  51. Event.Parent = NLS([[
  52. local Player = owner;local Event = script:WaitForChild("UserInput");local UserInputService = game:GetService("UserInputService");local Mouse = Player:GetMouse()
  53. local Input = function(Input,gameProcessedEvent)
  54. if gameProcessedEvent then return end
  55. Event:FireServer({KeyCode=Input.KeyCode,UserInputType=Input.UserInputType,UserInputState=Input.UserInputState})
  56. end
  57. UserInputService.InputBegan:Connect(Input);UserInputService.InputEnded:Connect(Input)
  58. local Hit,Target
  59. while wait(1/30) do
  60. if Hit ~= Mouse.Hit or Target ~= Mouse.Target then
  61. Hit,Target = Mouse.Hit,Mouse.Target;Event:FireServer({["MouseEvent"]=true,["Target"]=Target,["Hit"]=Hit})
  62. end
  63. end
  64. ]],owner.Character)
  65. end
  66. RealGame = game;game = setmetatable({},{
  67. __index = function (self,Index)
  68. local Sandbox = function (Thing)
  69. if Thing:IsA("Player") then
  70. local RealPlayer = Thing
  71. return setmetatable({},{
  72. __index = function (self,Index)
  73. local Type = type(RealPlayer[Index])
  74. if Type == "function" then
  75. if Index:lower() == "getmouse" or Index:lower() == "mouse" then
  76. return function (self)return InternalData["Mouse"] end
  77. end
  78. return function (self,...)return RealPlayer[Index](RealPlayer,...) end
  79. end
  80. return RealPlayer[Index]
  81. end;
  82. __tostring = function(self) return RealPlayer.Name end
  83. })
  84. end
  85. end
  86. if RealGame[Index] then
  87. local Type = type(RealGame[Index])
  88. if Type == "function" then
  89. if Index:lower() == "getservice" or Index:lower() == "service" then
  90. return function (self,Service)
  91. local FakeServices = {
  92. ["players"] = function()
  93. return setmetatable({},{
  94. __index = function (self2,Index2)
  95. local RealService = RealGame:GetService(Service)
  96. local Type2 = type(Index2)
  97. if Type2 == "function" then
  98. return function (self,...) return RealService[Index2](RealService,...)end
  99. else
  100. if Index2:lower() == "localplayer" then return Sandbox(owner) end
  101. return RealService[Index2]
  102. end
  103. end;
  104. __tostring = function(self) return RealGame:GetService(Service).Name end
  105. })
  106. end;
  107. ["contextactionservice"] = function() return InternalData["ContextActionService"] end;
  108. ["userinputservice"] = function() return InternalData["UserInputService"] end;
  109. ["runservice"] = function()
  110. return setmetatable({},{
  111. __index = function(self2,Index2)
  112. local RealService = RealGame:GetService(Service)
  113. local Type2 = type(Index2)
  114. if Type2 == "function" then
  115. return function (self,...) return RealService[Index2](RealService,...) end
  116. else
  117. local RunServices = {
  118. ["bindtorenderstep"] = function() return function (self,Name,Priority,Function) return RealGame:GetService("RunService").Stepped:Connect(Function) end end;
  119. ["renderstepped"] = function() return RealService["Stepped"] end
  120. }
  121. if RunServices[Index2:lower()] then return RunServices[Index2:lower()]() end
  122. return RealService[Index2]
  123. end
  124. end
  125. })
  126. end
  127. }
  128. if FakeServices[Service:lower()] then return FakeServices[Service:lower()]() end
  129. return RealGame:GetService(Service)
  130. end
  131. end
  132. return function (self,...) return RealGame[Index](RealGame,...) end
  133. else
  134. if game:GetService(Index) then return game:GetService(Index) end
  135. return RealGame[Index]
  136. end
  137. end
  138. return nil
  139. end
  140. });Game = game;owner = game:GetService("Players").LocalPlayer;script = Instance.new("Script");print("Complete! Running...")
  141. -----------------------------------
  142.  
  143. --Made by goodguyaiden-------------
  144. --Zombie---------------------------
  145. --its going to need to take a sec--
  146.  
  147. -----------------------------------
  148.  
  149. Char= game.Players.LocalPlayer.Character
  150.  
  151. Part0 = Instance.new("Part")
  152. Script1 = Instance.new("Script")
  153. Part2 = Instance.new("Part")
  154. Script3 = Instance.new("Script")
  155. Part0.Name = "zarm2"
  156. Part0.Parent = Char
  157. Part0.BrickColor = BrickColor.new("Medium green")
  158. Part0.Rotation = Vector3.new(0, -90, 0)
  159. Part0.RotVelocity = Vector3.new(4.07127958e-25, 3.33696291e-22, 6.94702468e-25)
  160. Part0.Velocity = Vector3.new(3.66463371e-20, 0.00686328812, 3.69331555e-20)
  161. Part0.FormFactor = Enum.FormFactor.Symmetric
  162. Part0.Size = Vector3.new(2, 1, 1)
  163. Part0.CFrame = CFrame.new(-22.1300011, 3.49999905, 24.6800003, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  164. Part0.BottomSurface = Enum.SurfaceType.Smooth
  165. Part0.TopSurface = Enum.SurfaceType.Smooth
  166. Part0.Color = Color3.new(0.631373, 0.768628, 0.54902)
  167. Part0.Position = Vector3.new(-22.1300011, 3.49999905, 24.6800003)
  168. Part0.Orientation = Vector3.new(0, -90, 0)
  169. Part0.Color = Color3.new(0.631373, 0.768628, 0.54902)
  170. Script1.Parent = Part0
  171.  
  172.  
  173. Part2.Name = "zarm"
  174. Part2.Parent = Char
  175. Part2.BrickColor = BrickColor.new("Medium green")
  176. Part2.Rotation = Vector3.new(0, -90, 0)
  177. Part2.RotVelocity = Vector3.new(4.07127958e-25, 3.33696291e-22, 6.94702468e-25)
  178. Part2.Velocity = Vector3.new(3.66463371e-20, 0.00686328812, 3.59320666e-20)
  179. Part2.FormFactor = Enum.FormFactor.Symmetric
  180. Part2.Size = Vector3.new(2, 1, 1)
  181. Part2.CFrame = CFrame.new(-19.1300011, 3.49999905, 24.6800003, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  182. Part2.BottomSurface = Enum.SurfaceType.Smooth
  183. Part2.TopSurface = Enum.SurfaceType.Smooth
  184. Part2.Color = Color3.new(0.631373, 0.768628, 0.54902)
  185. Part2.Position = Vector3.new(-19.1300011, 3.49999905, 24.6800003)
  186. Part2.Orientation = Vector3.new(0, -90, 0)
  187. Part2.Color = Color3.new(0.631373, 0.768628, 0.54902)
  188. Script3.Parent = Part2
  189.  
  190.  
  191. local parts = Char:GetChildren()
  192. for i,part in pairs(parts)do
  193. if part.ClassName == "Part" or part.Name == "Head" or part.Name == "HumanoidRootPart" then
  194.  
  195.  
  196.  
  197.  
  198.  
  199.  
  200.  
  201. function OnTouched(part2)
  202. local humanoid = part2.Parent:FindFirstChild("Humanoid")
  203. if (humanoid ~= nil) then
  204.  
  205. humanoid.Health = humanoid.Health - 0.05
  206. humanoid.AutoRotate = true
  207. humanoid.Sit = true
  208.  
  209.  
  210.  
  211. end
  212. end
  213.  
  214. part.Touched:connect(OnTouched)
  215.  
  216.  
  217.  
  218.  
  219. wait(1)
  220. owner=game.Players.LocalPlayer.Name
  221.  
  222. function onTouched(part23)
  223. if part23.Parent ~= nil then
  224. local h = part23.Parent:findFirstChild("Humanoid")
  225. if h~=nil then
  226. if cantouch~=0 then
  227. if h.Parent.Name~=owner then
  228.  
  229. if h.Parent:findFirstChild("zarm")~=nil then return end
  230.  
  231. cantouch=0
  232.  
  233. local larm=h.Parent:findFirstChild("Left Arm")
  234. local rarm=h.Parent:findFirstChild("Right Arm")
  235.  
  236. if larm~=nil then
  237. larm:remove()
  238. end
  239. if rarm~=nil then
  240. rarm:remove()
  241. end
  242. local zee= Char:FindFirstChild("zarm2")
  243. if zee~=nil then
  244. local zlarm=zee:clone()
  245. local zrarm=zee:clone()
  246. if zlarm~=nil then
  247.  
  248. local rot=CFrame.new(0, 0, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)
  249. zlarm.CFrame=h.Parent.Torso.CFrame * CFrame.new(Vector3.new(-1.5,0.5,-0.5)) * rot
  250. zrarm.CFrame=h.Parent.Torso.CFrame * CFrame.new(Vector3.new(1.5,0.5,-0.5)) * rot
  251. zlarm.Parent=h.Parent
  252. zrarm.Parent=h.Parent
  253. zlarm:makeJoints()
  254. zrarm:makeJoints()
  255. zlarm.Anchored=false
  256. zrarm.Anchored=false
  257. wait(0.1)
  258. h.Parent.Head.Color=zee.Color
  259. else print("no zee"); return end
  260. end
  261. wait(1)
  262. cantouch=1
  263. end
  264. end
  265. end
  266. end
  267. end
  268.  
  269. part.Touched:connect(onTouched)
  270.  
  271.  
  272. wait(1)
  273. owner=game.Players.LocalPlayer.Name
  274.  
  275. function onTouched2(part3)
  276. if part3.Parent ~= nil then
  277. local h = part3.Parent:findFirstChild("Humanoid")
  278. if h~=nil then
  279. if cantouch~=0 then
  280. if h.Parent.Name~=owner then
  281.  
  282. if h.Parent:findFirstChild("zarm")~=nil then return end
  283.  
  284. cantouch=0
  285.  
  286. local larm=h.Parent:findFirstChild("Left Arm")
  287. local rarm=h.Parent:findFirstChild("Right Arm")
  288.  
  289. if larm~=nil then
  290. larm:remove()
  291. end
  292. if rarm~=nil then
  293. rarm:remove()
  294. end
  295. local zee= Char:FindFirstChild("zarm")
  296. if zee~=nil then
  297. local zlarm=zee:clone()
  298. local zrarm=zee:clone()
  299. if zlarm~=nil then
  300.  
  301. local rot=CFrame.new(0, 0, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)
  302. zlarm.CFrame=h.Parent.Torso.CFrame * CFrame.new(Vector3.new(-1.5,0.5,-0.5)) * rot
  303. zrarm.CFrame=h.Parent.Torso.CFrame * CFrame.new(Vector3.new(1.5,0.5,-0.5)) * rot
  304. zlarm.Parent=h.Parent
  305. zrarm.Parent=h.Parent
  306. zlarm:makeJoints()
  307. zrarm:makeJoints()
  308. zlarm.Anchored=false
  309. zrarm.Anchored=false
  310. wait(0.1)
  311. h.Parent.Head.Color=zee.Color
  312. else print("no zee"); return end
  313. end
  314. wait(1)
  315. cantouch=1
  316. end
  317. end
  318. end
  319. end
  320. end
  321.  
  322. part.Touched:connect(onTouched2)
  323.  
  324.  
  325. end
  326. end
  327. wait(0.2)
  328. plr = game.Players.LocalPlayer
  329. repeat wait() until plr.Character
  330. char = plr.Character
  331. local mouse = plr:GetMouse()
  332. local Player = game:service'Players'.localPlayer
  333. local chara = Player.Character
  334. Player=game:GetService("Players").LocalPlayer
  335. Character=Player.Character
  336. PlayerGui=Player.PlayerGui
  337. Backpack=Player.Backpack
  338. Torso=Character.Torso
  339. Head=Character.Head
  340. Humanoid=Character.Humanoid
  341. m=Instance.new('Model',Character)
  342. LeftArm=Character["Left Arm"]
  343. LeftLeg=Character["Left Leg"]
  344. RightArm=Character["Right Arm"]
  345. RightLeg=Character["Right Leg"]
  346. LS=Torso["Left Shoulder"]
  347. LH=Torso["Left Hip"]
  348. RS=Torso["Right Shoulder"]
  349. RH=Torso["Right Hip"]
  350. Face = Head.face
  351. Neck=Torso.Neck
  352. it=Instance.new
  353. attacktype=1
  354. vt=Vector3.new
  355. cf=CFrame.new
  356. cl3=Color3.new
  357. rgb=Color3.fromRGB
  358. bcn=BrickColor.new
  359. euler=CFrame.fromEulerAnglesXYZ
  360. angles=CFrame.Angles
  361. Humanoid.WalkSpeed = 14
  362. Player = game:GetService("Players").LocalPlayer
  363. PlayerGui = Player.PlayerGui
  364. Cam = workspace.CurrentCamera
  365. Backpack = Player.Backpack
  366. Character = Player.Character
  367. Humanoid = Character.Humanoid
  368. Mouse = Player:GetMouse()
  369. RootPart = Character["HumanoidRootPart"]
  370. Torso = Character["Torso"]
  371. Head = Character["Head"]
  372. RightArm = Character["Right Arm"]
  373. LeftArm = Character["Left Arm"]
  374. RightLeg = Character["Right Leg"]
  375. LeftLeg = Character["Left Leg"]
  376. RootJoint = RootPart["RootJoint"]
  377. Neck = Torso["Neck"]
  378. RightShoulder = Torso["Right Shoulder"]
  379. LeftShoulder = Torso["Left Shoulder"]
  380. RightHip = Torso["Right Hip"]
  381. LeftHip = Torso["Left Hip"]
  382. Sound0 = Instance.new("Sound")
  383. Sound0.Volume = 6
  384. Sound0.Parent = game.Players.LocalPlayer.Character.Head
  385. Sound0.SoundId = "rbxassetid://27697743"
  386. Sound0.Looped = true
  387. Sound0:Play()
  388. IT = Instance.new
  389. CF = CFrame.new
  390. VT = Vector3.new
  391. RAD = math.rad
  392. C3 = Color3.new
  393. UD2 = UDim2.new
  394. BRICKC = BrickColor.new
  395. ANGLES = CFrame.Angles
  396. EULER = CFrame.fromEulerAnglesXYZ
  397. COS = math.cos
  398. ACOS = math.acos
  399. SIN = math.sin
  400. ASIN = math.asin
  401. ABS = math.abs
  402. MRANDOM = math.random
  403. FLOOR = math.floor
  404. Animation_Speed = 3
  405. Frame_Speed = 1 / 60 -- (1 / 30) OR (1 / 60)
  406. local Speed = 12
  407. local ROOTC0 = CF(0, 0, 0) * ANGLES(RAD(-90), RAD(0), RAD(180))
  408. local NECKC0 = CF(0, 1, 0) * ANGLES(RAD(-90), RAD(0), RAD(180))
  409. local RIGHTSHOULDERC0 = CF(-0.5, 0, 0) * ANGLES(RAD(0), RAD(90), RAD(0))
  410. local LEFTSHOULDERC0 = CF(0.5, 0, 0) * ANGLES(RAD(0), RAD(-90), RAD(0))
  411. local DAMAGEMULTIPLIER = 1
  412. local ANIM = "Idle"
  413. local ATTACK = false
  414. local EQUIPPED = false
  415. local HOLD = false
  416. local COMBO = 1
  417. local Rooted = false
  418. local SINE = 0
  419. local KEYHOLD = false
  420. local CHANGE = 2 / Animation_Speed
  421. local WALKINGANIM = false
  422. local VALUE1 = false
  423. local VALUE2 = false
  424. local ROBLOXIDLEANIMATION = IT("Animation")
  425. ROBLOXIDLEANIMATION.Name = "Roblox Idle Animation"
  426. ROBLOXIDLEANIMATION.AnimationId = "http://www.roblox.com/asset/?id=180435571"
  427. --ROBLOXIDLEANIMATION.Parent = Humanoid
  428. local WEAPONGUI = IT("ScreenGui", PlayerGui)
  429. WEAPONGUI.Name = "Weapon GUI"
  430. local Weapon = IT("Model")
  431. Weapon.Name = "Adds"
  432. local Effects = IT("Folder", Weapon)
  433. Effects.Name = "Effects"
  434. local ANIMATOR = Humanoid.Animator
  435. local ANIMATE = Character.Animate
  436. local UNANCHOR = true
  437. local PLAYANIMS = true
  438. ArtificialHB = Instance.new("BindableEvent", script)
  439. ArtificialHB.Name = "ArtificialHB"
  440.  
  441. script:WaitForChild("ArtificialHB")
  442.  
  443. frame = Frame_Speed
  444. tf = 0
  445. allowframeloss = false
  446. tossremainder = false
  447. lastframe = tick()
  448. script.ArtificialHB:Fire()
  449.  
  450. function Raycast(POSITION, DIRECTION, RANGE, IGNOREDECENDANTS)
  451. return workspace:FindPartOnRay(Ray.new(POSITION, DIRECTION.unit * RANGE), IGNOREDECENDANTS)
  452. end
  453.  
  454. function PositiveAngle(NUMBER)
  455. if NUMBER >= 0 then
  456. NUMBER = 0
  457. end
  458. return NUMBER
  459. end
  460.  
  461. function NegativeAngle(NUMBER)
  462. if NUMBER <= 0 then
  463. NUMBER = 0
  464. end
  465. return NUMBER
  466. end
  467.  
  468. function Swait(NUMBER)
  469. if NUMBER == 0 or NUMBER == nil then
  470. ArtificialHB.Event:wait()
  471. else
  472. for i = 1, NUMBER do
  473. ArtificialHB.Event:wait()
  474. end
  475. end
  476. end
  477.  
  478. function QuaternionFromCFrame(cf)
  479. local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components()
  480. local trace = m00 + m11 + m22
  481. if trace > 0 then
  482. local s = math.sqrt(1 + trace)
  483. local recip = 0.5 / s
  484. return (m21 - m12) * recip, (m02 - m20) * recip, (m10 - m01) * recip, s * 0.5
  485. else
  486. local i = 0
  487. if m11 > m00 then
  488. i = 1
  489. end
  490. if m22 > (i == 0 and m00 or m11) then
  491. i = 2
  492. end
  493. if i == 0 then
  494. local s = math.sqrt(m00 - m11 - m22 + 1)
  495. local recip = 0.5 / s
  496. return 0.5 * s, (m10 + m01) * recip, (m20 + m02) * recip, (m21 - m12) * recip
  497. elseif i == 1 then
  498. local s = math.sqrt(m11 - m22 - m00 + 1)
  499. local recip = 0.5 / s
  500. return (m01 + m10) * recip, 0.5 * s, (m21 + m12) * recip, (m02 - m20) * recip
  501. elseif i == 2 then
  502. local s = math.sqrt(m22 - m00 - m11 + 1)
  503. local recip = 0.5 / s return (m02 + m20) * recip, (m12 + m21) * recip, 0.5 * s, (m10 - m01) * recip
  504. end
  505. end
  506. end
  507.  
  508. function QuaternionToCFrame(px, py, pz, x, y, z, w)
  509. local xs, ys, zs = x + x, y + y, z + z
  510. local wx, wy, wz = w * xs, w * ys, w * zs
  511. local xx = x * xs
  512. local xy = x * ys
  513. local xz = x * zs
  514. local yy = y * ys
  515. local yz = y * zs
  516. local zz = z * zs
  517. 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))
  518. end
  519.  
  520. function QuaternionSlerp(a, b, t)
  521. local cosTheta = a[1] * b[1] + a[2] * b[2] + a[3] * b[3] + a[4] * b[4]
  522. local startInterp, finishInterp;
  523. if cosTheta >= 0.0001 then
  524. if (1 - cosTheta) > 0.0001 then
  525. local theta = ACOS(cosTheta)
  526. local invSinTheta = 1 / SIN(theta)
  527. startInterp = SIN((1 - t) * theta) * invSinTheta
  528. finishInterp = SIN(t * theta) * invSinTheta
  529. else
  530. startInterp = 1 - t
  531. finishInterp = t
  532. end
  533. else
  534. if (1 + cosTheta) > 0.0001 then
  535. local theta = ACOS(-cosTheta)
  536. local invSinTheta = 1 / SIN(theta)
  537. startInterp = SIN((t - 1) * theta) * invSinTheta
  538. finishInterp = SIN(t * theta) * invSinTheta
  539. else
  540. startInterp = t - 1
  541. finishInterp = t
  542. end
  543. end
  544. 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
  545. end
  546.  
  547. function Clerp(a, b, t)
  548. local qa = {QuaternionFromCFrame(a)}
  549. local qb = {QuaternionFromCFrame(b)}
  550. local ax, ay, az = a.x, a.y, a.z
  551. local bx, by, bz = b.x, b.y, b.z
  552. local _t = 1 - t
  553. return QuaternionToCFrame(_t * ax + t * bx, _t * ay + t * by, _t * az + t * bz, QuaternionSlerp(qa, qb, t))
  554. end
  555.  
  556. function CreateFrame(PARENT, TRANSPARENCY, BORDERSIZEPIXEL, POSITION, SIZE, COLOR, BORDERCOLOR, NAME)
  557. local frame = IT("Frame")
  558. frame.BackgroundTransparency = TRANSPARENCY
  559. frame.BorderSizePixel = BORDERSIZEPIXEL
  560. frame.Position = POSITION
  561. frame.Size = SIZE
  562. frame.BackgroundColor3 = COLOR
  563. frame.BorderColor3 = BORDERCOLOR
  564. frame.Name = NAME
  565. frame.Parent = PARENT
  566. return frame
  567. end
  568.  
  569. function CreateLabel(PARENT, TEXT, TEXTCOLOR, TEXTFONTSIZE, TEXTFONT, TRANSPARENCY, BORDERSIZEPIXEL, STROKETRANSPARENCY, NAME)
  570. local label = IT("TextLabel")
  571. label.BackgroundTransparency = 1
  572. label.Size = UD2(1, 0, 1, 0)
  573. label.Position = UD2(0, 0, 0, 0)
  574. label.TextColor3 = TEXTCOLOR
  575. label.TextStrokeTransparency = STROKETRANSPARENCY
  576. label.TextTransparency = TRANSPARENCY
  577. label.FontSize = TEXTFONTSIZE
  578. label.Font = TEXTFONT
  579. label.BorderSizePixel = BORDERSIZEPIXEL
  580. label.TextScaled = false
  581. label.Text = TEXT
  582. label.Name = NAME
  583. label.Parent = PARENT
  584. return label
  585. end
  586.  
  587. function NoOutlines(PART)
  588. PART.TopSurface, PART.BottomSurface, PART.LeftSurface, PART.RightSurface, PART.FrontSurface, PART.BackSurface = 10, 10, 10, 10, 10, 10
  589. end
  590.  
  591.  
  592. function CreateWeldOrSnapOrMotor(TYPE, PARENT, PART0, PART1, C0, C1)
  593. local NEWWELD = IT(TYPE)
  594. NEWWELD.Part0 = PART0
  595. NEWWELD.Part1 = PART1
  596. NEWWELD.C0 = C0
  597. NEWWELD.C1 = C1
  598. NEWWELD.Parent = PARENT
  599. return NEWWELD
  600. end
  601.  
  602. local S = IT("Sound")
  603.  
  604. function CreateSound(ID, PARENT, VOLUME, PITCH)
  605. local NEWSOUND = nil
  606. coroutine.resume(coroutine.create(function()
  607. NEWSOUND = S:Clone()
  608. NEWSOUND.Parent = PARENT
  609. NEWSOUND.Volume = VOLUME
  610. NEWSOUND.Pitch = PITCH
  611. NEWSOUND.SoundId = "http://www.roblox.com/asset/?id="..ID
  612. Swait()
  613. NEWSOUND:play()
  614. game:GetService("Debris"):AddItem(NEWSOUND, 10)
  615. end))
  616. return NEWSOUND
  617. end
  618.  
  619. function CFrameFromTopBack(at, top, back)
  620. local right = top:Cross(back)
  621. 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)
  622. end
  623.  
  624. function CreateWave(SIZE,WAIT,CFRAME,DOESROT,ROT,COLOR,GROW)
  625. local wave = CreatePart(3, Effects, "Neon", 0, 0.5, BRICKC(COLOR), "Effect", VT(0,0,0))
  626. local mesh = CreateMesh("SpecialMesh", wave, "FileMesh", "20329976", "", SIZE, VT(0,0,-SIZE.X/8))
  627. wave.CFrame = CFRAME
  628. coroutine.resume(coroutine.create(function(PART)
  629. for i = 1, WAIT do
  630. Swait()
  631. mesh.Scale = mesh.Scale + GROW
  632. mesh.Offset = VT(0,0,-(mesh.Scale.X/8))
  633. if DOESROT == true then
  634. wave.CFrame = wave.CFrame * CFrame.fromEulerAnglesXYZ(0,ROT,0)
  635. end
  636. wave.Transparency = wave.Transparency + (0.5/WAIT)
  637. if wave.Transparency > 0.99 then
  638. wave:remove()
  639. end
  640. end
  641. end))
  642. end
  643.  
  644. function CreateRing(SIZE,DOESROT,ROT,WAIT,CFRAME,COLOR,GROW)
  645. local wave = CreatePart(3, Effects, "Neon", 0, 0.5, BRICKC(COLOR), "Effect", VT(0,0,0))
  646. local mesh = CreateMesh("SpecialMesh", wave, "FileMesh", "559831844", "", SIZE, VT(0,0,0))
  647. wave.CFrame = CFRAME
  648. coroutine.resume(coroutine.create(function(PART)
  649. for i = 1, WAIT do
  650. Swait()
  651. mesh.Scale = mesh.Scale + GROW
  652. if DOESROT == true then
  653. wave.CFrame = wave.CFrame * CFrame.fromEulerAnglesXYZ(0,ROT,0)
  654. end
  655. wave.Transparency = wave.Transparency + (0.5/WAIT)
  656. if wave.Transparency > 0.99 then
  657. wave:remove()
  658. end
  659. end
  660. end))
  661. end
  662.  
  663. function MagicSphere(SIZE,WAIT,CFRAME,COLOR,GROW)
  664. local wave = CreatePart(3, Effects, "Neon", 0, 0, BRICKC(COLOR), "Effect", VT(1,1,1), true)
  665. local mesh = CreateMesh("SpecialMesh", wave, "Sphere", "", "", SIZE, VT(0,0,0))
  666. wave.CFrame = CFRAME
  667. coroutine.resume(coroutine.create(function(PART)
  668. for i = 1, WAIT do
  669. Swait()
  670. mesh.Scale = mesh.Scale + GROW
  671. wave.Transparency = wave.Transparency + (1/WAIT)
  672. if wave.Transparency > 0.99 then
  673. wave:remove()
  674. end
  675. end
  676. end))
  677. end
  678.  
  679. function Slice(KIND,SIZE,WAIT,CFRAME,COLOR,GROW)
  680. local wave = CreatePart(3, Effects, "Neon", 0, 0.5, BRICKC(COLOR), "Effect", VT(1,1,1), true)
  681. local mesh = nil
  682. if KIND == "Base" then
  683. mesh = CreateMesh("SpecialMesh", wave, "FileMesh", "448386996", "", VT(0,SIZE/10,SIZE/10), VT(0,0,0))
  684. elseif KIND == "Thin" then
  685. mesh = CreateMesh("SpecialMesh", wave, "FileMesh", "662586858", "", VT(SIZE/10,0,SIZE/10), VT(0,0,0))
  686. elseif KIND == "Round" then
  687. mesh = CreateMesh("SpecialMesh", wave, "FileMesh", "662585058", "", VT(SIZE/10,0,SIZE/10), VT(0,0,0))
  688. end
  689. wave.CFrame = CFRAME
  690. coroutine.resume(coroutine.create(function(PART)
  691. for i = 1, WAIT do
  692. Swait()
  693. mesh.Scale = mesh.Scale + GROW/10
  694. wave.Transparency = wave.Transparency + (0.5/WAIT)
  695. if wave.Transparency > 0.99 then
  696. wave:remove()
  697. end
  698. end
  699. end))
  700. end
  701.  
  702. function MakeForm(PART,TYPE)
  703. if TYPE == "Cyl" then
  704. local MSH = IT("CylinderMesh",PART)
  705. elseif TYPE == "Ball" then
  706. local MSH = IT("SpecialMesh",PART)
  707. MSH.MeshType = "Sphere"
  708. elseif TYPE == "Wedge" then
  709. local MSH = IT("SpecialMesh",PART)
  710. MSH.MeshType = "Wedge"
  711. end
  712. end
  713.  
  714.  
  715. function CheckTableForString(Table, String)
  716. for i, v in pairs(Table) do
  717. if string.find(string.lower(String), string.lower(v)) then
  718. return true
  719. end
  720. end
  721. return false
  722. end
  723.  
  724. function CheckIntangible(Hit)
  725. local ProjectileNames = {"Water", "Arrow", "Projectile", "Effect", "Rail", "Lightning", "Bullet"}
  726. if Hit and Hit.Parent then
  727. if ((not Hit.CanCollide or CheckTableForString(ProjectileNames, Hit.Name)) and not Hit.Parent:FindFirstChild("Humanoid")) then
  728. return true
  729. end
  730. end
  731. return false
  732. end
  733.  
  734. Debris = game:GetService("Debris")
  735.  
  736. function CastZapRay(StartPos, Vec, Length, Ignore, DelayIfHit)
  737. local Direction = CFrame.new(StartPos, Vec).lookVector
  738. local Ignore = ((type(Ignore) == "table" and Ignore) or {Ignore})
  739. local RayHit, RayPos, RayNormal = game:GetService("Workspace"):FindPartOnRayWithIgnoreList(Ray.new(StartPos, Direction * Length), Ignore)
  740. if RayHit and CheckIntangible(RayHit) then
  741. if DelayIfHit then
  742. wait()
  743. end
  744. RayHit, RayPos, RayNormal = CastZapRay((RayPos + (Vec * 0.01)), Vec, (Length - ((StartPos - RayPos).magnitude)), Ignore, DelayIfHit)
  745. end
  746. return RayHit, RayPos, RayNormal
  747. end
  748.  
  749. function turnto(position)
  750. RootPart.CFrame=CFrame.new(RootPart.CFrame.p,VT(position.X,RootPart.Position.Y,position.Z)) * CFrame.new(0, 0, 0)
  751. end
  752.  
  753.  
  754.  
  755. game:GetService("RunService").Heartbeat:connect(function(s, p)
  756. tf = tf + s
  757. if tf >= frame then
  758. if allowframeloss then
  759. script.ArtificialHB:Fire()
  760. lastframe = tick()
  761. else
  762. for i = 1, math.floor(tf / frame) do
  763. script.ArtificialHB:Fire()
  764. end
  765. lastframe = tick()
  766. end
  767. if tossremainder then
  768. tf = 0
  769. else
  770. tf = tf - frame * math.floor(tf / frame)
  771. end
  772. end
  773. end)
  774. function Raycast(POSITION, DIRECTION, RANGE, IGNOREDECENDANTS)
  775. return workspace:FindPartOnRay(Ray.new(POSITION, DIRECTION.unit * RANGE), IGNOREDECENDANTS)
  776. end
  777.  
  778. function PositiveAngle(NUMBER)
  779. if NUMBER >= 0 then
  780. NUMBER = 0
  781. end
  782. return NUMBER
  783. end
  784.  
  785. function NegativeAngle(NUMBER)
  786. if NUMBER <= 0 then
  787. NUMBER = 0
  788. end
  789. return NUMBER
  790. end
  791.  
  792. function Swait(NUMBER)
  793. if NUMBER == 0 or NUMBER == nil then
  794. ArtificialHB.Event:wait()
  795. else
  796. for i = 1, NUMBER do
  797. ArtificialHB.Event:wait()
  798. end
  799. end
  800. end
  801.  
  802. function CreateMesh(MESH, PARENT, MESHTYPE, MESHID, TEXTUREID, SCALE, OFFSET)
  803. local NEWMESH = IT(MESH)
  804. if MESH == "SpecialMesh" then
  805. NEWMESH.MeshType = MESHTYPE
  806. if MESHID ~= "nil" and MESHID ~= "" then
  807. NEWMESH.MeshId = "http://www.roblox.com/asset/?id="..MESHID
  808. end
  809. if TEXTUREID ~= "nil" and TEXTUREID ~= "" then
  810. NEWMESH.TextureId = "http://www.roblox.com/asset/?id="..TEXTUREID
  811. end
  812. end
  813. NEWMESH.Offset = OFFSET or VT(0, 0, 0)
  814. NEWMESH.Scale = SCALE
  815. NEWMESH.Parent = PARENT
  816. return NEWMESH
  817. end
  818.  
  819. function CreatePart(FORMFACTOR, PARENT, MATERIAL, REFLECTANCE, TRANSPARENCY, BRICKCOLOR, NAME, SIZE, ANCHOR)
  820. local NEWPART = IT("Part")
  821. NEWPART.formFactor = FORMFACTOR
  822. NEWPART.Reflectance = REFLECTANCE
  823. NEWPART.Transparency = TRANSPARENCY
  824. NEWPART.CanCollide = false
  825. NEWPART.Locked = true
  826. NEWPART.Anchored = true
  827. if ANCHOR == false then
  828. NEWPART.Anchored = false
  829. end
  830. NEWPART.BrickColor = BRICKC(tostring(BRICKCOLOR))
  831. NEWPART.Name = NAME
  832. NEWPART.Size = SIZE
  833. NEWPART.Position = Torso.Position
  834. NEWPART.Material = MATERIAL
  835. NEWPART:BreakJoints()
  836. NEWPART.Parent = PARENT
  837. return NEWPART
  838. end
  839.  
  840. local function weldBetween(a, b)
  841. local weldd = Instance.new("ManualWeld")
  842. weldd.Part0 = a
  843. weldd.Part1 = b
  844. weldd.C0 = CFrame.new()
  845. weldd.C1 = b.CFrame:inverse() * a.CFrame
  846. weldd.Parent = a
  847. return weldd
  848. end
  849.  
  850.  
  851. function QuaternionFromCFrame(cf)
  852. local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components()
  853. local trace = m00 + m11 + m22
  854. if trace > 0 then
  855. local s = math.sqrt(1 + trace)
  856. local recip = 0.5 / s
  857. return (m21 - m12) * recip, (m02 - m20) * recip, (m10 - m01) * recip, s * 0.5
  858. else
  859. local i = 0
  860. if m11 > m00 then
  861. i = 1
  862. end
  863. if m22 > (i == 0 and m00 or m11) then
  864. i = 2
  865. end
  866. if i == 0 then
  867. local s = math.sqrt(m00 - m11 - m22 + 1)
  868. local recip = 0.5 / s
  869. return 0.5 * s, (m10 + m01) * recip, (m20 + m02) * recip, (m21 - m12) * recip
  870. elseif i == 1 then
  871. local s = math.sqrt(m11 - m22 - m00 + 1)
  872. local recip = 0.5 / s
  873. return (m01 + m10) * recip, 0.5 * s, (m21 + m12) * recip, (m02 - m20) * recip
  874. elseif i == 2 then
  875. local s = math.sqrt(m22 - m00 - m11 + 1)
  876. local recip = 0.5 / s return (m02 + m20) * recip, (m12 + m21) * recip, 0.5 * s, (m10 - m01) * recip
  877. end
  878. end
  879. end
  880.  
  881. function QuaternionToCFrame(px, py, pz, x, y, z, w)
  882. local xs, ys, zs = x + x, y + y, z + z
  883. local wx, wy, wz = w * xs, w * ys, w * zs
  884. local xx = x * xs
  885. local xy = x * ys
  886. local xz = x * zs
  887. local yy = y * ys
  888. local yz = y * zs
  889. local zz = z * zs
  890. 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))
  891. end
  892.  
  893. function QuaternionSlerp(a, b, t)
  894. local cosTheta = a[1] * b[1] + a[2] * b[2] + a[3] * b[3] + a[4] * b[4]
  895. local startInterp, finishInterp;
  896. if cosTheta >= 0.0001 then
  897. if (1 - cosTheta) > 0.0001 then
  898. local theta = ACOS(cosTheta)
  899. local invSinTheta = 1 / SIN(theta)
  900. startInterp = SIN((1 - t) * theta) * invSinTheta
  901. finishInterp = SIN(t * theta) * invSinTheta
  902. else
  903. startInterp = 1 - t
  904. finishInterp = t
  905. end
  906. else
  907. if (1 + cosTheta) > 0.0001 then
  908. local theta = ACOS(-cosTheta)
  909. local invSinTheta = 1 / SIN(theta)
  910. startInterp = SIN((t - 1) * theta) * invSinTheta
  911. finishInterp = SIN(t * theta) * invSinTheta
  912. else
  913. startInterp = t - 1
  914. finishInterp = t
  915. end
  916. end
  917. 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
  918. end
  919.  
  920. function Clerp(a, b, t)
  921. local qa = {QuaternionFromCFrame(a)}
  922. local qb = {QuaternionFromCFrame(b)}
  923. local ax, ay, az = a.x, a.y, a.z
  924. local bx, by, bz = b.x, b.y, b.z
  925. local _t = 1 - t
  926. return QuaternionToCFrame(_t * ax + t * bx, _t * ay + t * by, _t * az + t * bz, QuaternionSlerp(qa, qb, t))
  927. end
  928.  
  929. function CreateFrame(PARENT, TRANSPARENCY, BORDERSIZEPIXEL, POSITION, SIZE, COLOR, BORDERCOLOR, NAME)
  930. local frame = IT("Frame")
  931. frame.BackgroundTransparency = TRANSPARENCY
  932. frame.BorderSizePixel = BORDERSIZEPIXEL
  933. frame.Position = POSITION
  934. frame.Size = SIZE
  935. frame.BackgroundColor3 = COLOR
  936. frame.BorderColor3 = BORDERCOLOR
  937. frame.Name = NAME
  938. frame.Parent = PARENT
  939. return frame
  940. end
  941.  
  942. function CreateLabel(PARENT, TEXT, TEXTCOLOR, TEXTFONTSIZE, TEXTFONT, TRANSPARENCY, BORDERSIZEPIXEL, STROKETRANSPARENCY, NAME)
  943. local label = IT("TextLabel")
  944. label.BackgroundTransparency = 1
  945. label.Size = UD2(1, 0, 1, 0)
  946. label.Position = UD2(0, 0, 0, 0)
  947. label.TextColor3 = TEXTCOLOR
  948. label.TextStrokeTransparency = STROKETRANSPARENCY
  949. label.TextTransparency = TRANSPARENCY
  950. label.FontSize = TEXTFONTSIZE
  951. label.Font = TEXTFONT
  952. label.BorderSizePixel = BORDERSIZEPIXEL
  953. label.TextScaled = false
  954. label.Text = TEXT
  955. label.Name = NAME
  956. label.Parent = PARENT
  957. return label
  958. end
  959.  
  960. function NoOutlines(PART)
  961. PART.TopSurface, PART.BottomSurface, PART.LeftSurface, PART.RightSurface, PART.FrontSurface, PART.BackSurface = 10, 10, 10, 10, 10, 10
  962. end
  963.  
  964. function CreateWeldOrSnapOrMotor(TYPE, PARENT, PART0, PART1, C0, C1)
  965. local NEWWELD = IT(TYPE)
  966. NEWWELD.Part0 = PART0
  967. NEWWELD.Part1 = PART1
  968. NEWWELD.C0 = C0
  969. NEWWELD.C1 = C1
  970. NEWWELD.Parent = PARENT
  971. return NEWWELD
  972. end
  973.  
  974. local S = IT("Sound")
  975. function CreateSound(ID, PARENT, VOLUME, PITCH, DOESLOOP)
  976. local NEWSOUND = nil
  977. coroutine.resume(coroutine.create(function()
  978. NEWSOUND = S:Clone()
  979. NEWSOUND.Parent = PARENT
  980. NEWSOUND.Volume = VOLUME
  981. NEWSOUND.Pitch = PITCH
  982. NEWSOUND.SoundId = "http://www.roblox.com/asset/?id="..ID
  983. NEWSOUND:play()
  984. if DOESLOOP == true then
  985. NEWSOUND.Looped = true
  986. else
  987. repeat wait(1) until NEWSOUND.Playing == false
  988. NEWSOUND:remove()
  989. end
  990. end))
  991. return NEWSOUND
  992. end
  993.  
  994. function MakeForm(PART,TYPE)
  995. if TYPE == "Cyl" then
  996. local MSH = IT("CylinderMesh",PART)
  997. elseif TYPE == "Ball" then
  998. local MSH = IT("SpecialMesh",PART)
  999. MSH.MeshType = "Sphere"
  1000. elseif TYPE == "Wedge" then
  1001. local MSH = IT("SpecialMesh",PART)
  1002. MSH.MeshType = "Wedge"
  1003. end
  1004. end
  1005.  
  1006. function CFrameFromTopBack(at, top, back)
  1007. local right = top:Cross(back)
  1008. 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)
  1009. end
  1010.  
  1011. function PuddleOfBlood(Position,MaxDrop,Model,MaxSize)
  1012. local HITFLOOR, HITPOS, NORMAL = Raycast(Position, (CF(Position, Position + VT(0, -1, 0))).lookVector, MaxDrop, Model)
  1013. if HITFLOOR ~= nil then
  1014. if HITFLOOR.Parent ~= Weapon and HITFLOOR.Parent ~= Character then
  1015. if HITFLOOR.Name == "BloodPuddle" then
  1016. local DIST = (Position - HITFLOOR.Position).Magnitude
  1017. if (HITFLOOR.Size.Z <= 5 and HITFLOOR.Size.Z < MaxSize) or (HITFLOOR.Size.Z > 5 and HITFLOOR.Size.Z < MaxSize and DIST < HITFLOOR.Size.Z/3) then
  1018. HITFLOOR.Size = HITFLOOR.Size + VT(0.1,0,0.1)
  1019. end
  1020. else
  1021. if HITFLOOR.Anchored == true then
  1022. local BLOOD = CreatePart(3, Effects, "Glass", 0, 0, "Maroon", "BloodPuddle", VT(2,0,2))
  1023. BLOOD.CFrame = CF(HITPOS,HITPOS+NORMAL)*ANGLES(RAD(90),RAD(0),RAD(0))
  1024. MakeForm(BLOOD,"Cyl")
  1025. coroutine.resume(coroutine.create(function()
  1026. Swait(75)
  1027. while true do
  1028. Swait()
  1029. BLOOD.Size = BLOOD.Size - VT(0.02,0,0.02)
  1030. if BLOOD.Size.Z < 0.051 then
  1031. BLOOD:remove()
  1032. break
  1033. end
  1034. end
  1035. end))
  1036. end
  1037. end
  1038. end
  1039. end
  1040. end
  1041.  
  1042. function SprayBlood(POSITION,DIRECTION,BloodSize)
  1043. local BLOOD = CreatePart(3, Effects, "Glass", 0, 0, "Maroon", "BloodPuddle", VT(0.3,0.3,0.3),false)
  1044. BLOOD.CFrame = CF(POSITION)
  1045. MakeForm(BLOOD,"Ball")
  1046. local bv = Instance.new("BodyVelocity",BLOOD)
  1047. bv.maxForce = Vector3.new(1e9, 1e9, 1e9)
  1048. bv.velocity = CF(POSITION,DIRECTION+VT(MRANDOM(-3,3)/30,MRANDOM(-3,3)/30,MRANDOM(-3,3)/30)).lookVector*75
  1049. bv.Name = "MOVE"
  1050. Debris:AddItem(bv,0.05)
  1051. coroutine.resume(coroutine.create(function()
  1052. local HASTOUCHEDGROUND = false
  1053. local HIT = BLOOD.Touched:Connect(function(hit)
  1054. if hit.Anchored == true then
  1055. HASTOUCHEDGROUND = true
  1056. PuddleOfBlood(BLOOD.Position+VT(0,1,0),2,BLOOD,BloodSize)
  1057. end
  1058. end)
  1059. wait(5)
  1060. if HASTOUCHEDGROUND == false then
  1061. BLOOD:remove()
  1062. end
  1063. end))
  1064. end
  1065.  
  1066. Debris = game:GetService("Debris")
  1067.  
  1068. function CastProperRay(StartPos, EndPos, Distance, Ignore)
  1069. local DIRECTION = CF(StartPos,EndPos).lookVector
  1070. return Raycast(StartPos, DIRECTION, Distance, Ignore)
  1071. end
  1072.  
  1073. function turnto(position)
  1074. RootPart.CFrame=CFrame.new(RootPart.CFrame.p,VT(position.X,RootPart.Position.Y,position.Z)) * CFrame.new(0, 0, 0)
  1075. end
  1076.  
  1077. function recurse(root,callback,i)
  1078. i= i or 0
  1079. for _,v in pairs(root:GetChildren()) do
  1080. i = i + 1
  1081. callback(i,v)
  1082.  
  1083. if #v:GetChildren() > 0 then
  1084. i = recurse(v,callback,i)
  1085. end
  1086. end
  1087.  
  1088. return i
  1089. end
  1090.  
  1091. function ragdollJoint(character, part0, part1, attachmentName, className, properties)
  1092. attachmentName = attachmentName.."RigAttachment"
  1093. local constraint = Instance.new(className.."Constraint")
  1094. constraint.Attachment0 = part0:FindFirstChild(attachmentName)
  1095. constraint.Attachment1 = part1:FindFirstChild(attachmentName)
  1096. constraint.Name = "RagdollConstraint"..part1.Name
  1097.  
  1098. for _,propertyData in next,properties or {} do
  1099. constraint[propertyData[1]] = propertyData[2]
  1100. end
  1101.  
  1102. constraint.Parent = character
  1103. end
  1104.  
  1105. function getAttachment0(character, attachmentName)
  1106. for _,child in next,character:GetChildren() do
  1107. local attachment = child:FindFirstChild(attachmentName)
  1108. if attachment then
  1109. return attachment
  1110. end
  1111. end
  1112. end
  1113.  
  1114. function R15Ragdoll(character)
  1115. recurse(character, function(_,v)
  1116. if v:IsA("Attachment") then
  1117. v.Axis = Vector3.new(0, 1, 0)
  1118. v.SecondaryAxis = Vector3.new(0, 0, 1)
  1119. v.Rotation = Vector3.new(0, 0, 0)
  1120. end
  1121. end)
  1122. for _,child in next,character:GetChildren() do
  1123. if child:IsA("Accoutrement") then
  1124. for _,part in next,child:GetChildren() do
  1125. if part:IsA("BasePart") and part.Name ~= "HumanoidRootPart" then
  1126. local attachment1 = part:FindFirstChildOfClass("Attachment")
  1127. local attachment0 = getAttachment0(character,attachment1.Name)
  1128. if attachment0 and attachment1 then
  1129. local constraint = Instance.new("HingeConstraint")
  1130. constraint.Attachment0 = attachment0
  1131. constraint.Attachment1 = attachment1
  1132. constraint.LimitsEnabled = true
  1133. constraint.UpperAngle = 0
  1134. constraint.LowerAngle = 0
  1135. constraint.Parent = character
  1136. end
  1137. elseif part.Name == "HumanoidRootPart" then
  1138. part:remove()
  1139. end
  1140. end
  1141. end
  1142. end
  1143.  
  1144. ragdollJoint(character,character.LowerTorso, character.UpperTorso, "Waist", "BallSocket", {
  1145. {"LimitsEnabled",true};
  1146. {"UpperAngle",5};
  1147. })
  1148. ragdollJoint(character,character.UpperTorso, character.Head, "Neck", "BallSocket", {
  1149. {"LimitsEnabled",true};
  1150. {"UpperAngle",15};
  1151. })
  1152.  
  1153. local handProperties = {
  1154. {"LimitsEnabled", true};
  1155. {"UpperAngle",0};
  1156. {"LowerAngle",0};
  1157. }
  1158. ragdollJoint(character,character.LeftLowerArm, character.LeftHand, "LeftWrist", "Hinge", handProperties)
  1159. ragdollJoint(character,character.RightLowerArm, character.RightHand, "RightWrist", "Hinge", handProperties)
  1160.  
  1161. local shinProperties = {
  1162. {"LimitsEnabled", true};
  1163. {"UpperAngle", 0};
  1164. {"LowerAngle", -75};
  1165. }
  1166. ragdollJoint(character,character.LeftUpperLeg, character.LeftLowerLeg, "LeftKnee", "Hinge", shinProperties)
  1167. ragdollJoint(character,character.RightUpperLeg, character.RightLowerLeg, "RightKnee", "Hinge", shinProperties)
  1168.  
  1169. local footProperties = {
  1170. {"LimitsEnabled", true};
  1171. {"UpperAngle", 15};
  1172. {"LowerAngle", -45};
  1173. }
  1174. ragdollJoint(character,character.LeftLowerLeg, character.LeftFoot, "LeftAnkle", "Hinge", footProperties)
  1175. ragdollJoint(character,character.RightLowerLeg, character.RightFoot, "RightAnkle", "Hinge", footProperties)
  1176.  
  1177. ragdollJoint(character,character.UpperTorso, character.LeftUpperArm, "LeftShoulder", "BallSocket")
  1178. ragdollJoint(character,character.LeftUpperArm, character.LeftLowerArm, "LeftElbow", "BallSocket")
  1179. ragdollJoint(character,character.UpperTorso, character.RightUpperArm, "RightShoulder", "BallSocket")
  1180. ragdollJoint(character,character.RightUpperArm, character.RightLowerArm, "RightElbow", "BallSocket")
  1181. ragdollJoint(character,character.LowerTorso, character.LeftUpperLeg, "LeftHip", "BallSocket")
  1182. ragdollJoint(character,character.LowerTorso, character.RightUpperLeg, "RightHip", "BallSocket")
  1183. end
  1184.  
  1185. function Ragdoll(Character2,CharTorso)
  1186. Character2:BreakJoints()
  1187. local hum = Character2:findFirstChild("Humanoid")
  1188. hum:remove()
  1189. local function Scan(ch)
  1190. local e
  1191. for e = 1,#ch do
  1192. Scan(ch[e]:GetChildren())
  1193. if ch[e].ClassName == "Weld" or ch[e].ClassName == "Motor6D" then
  1194. ch[e]:remove()
  1195. end
  1196. end
  1197. end
  1198. local NEWHUM = IT("Humanoid")
  1199. NEWHUM.Name = "Corpse"
  1200. NEWHUM.Health = 0
  1201. NEWHUM.MaxHealth = 0
  1202. NEWHUM.PlatformStand = true
  1203. NEWHUM.Parent = Character2
  1204. NEWHUM.DisplayDistanceType = "None"
  1205.  
  1206. local ch = Character2:GetChildren()
  1207. local i
  1208. for i = 1,#ch do
  1209. if ch[i].Name == "THandle1" or ch[i].Name == "THandle2" then
  1210. ch[i]:remove()
  1211. end
  1212. end
  1213.  
  1214. local Torso2 = Character2.Torso
  1215. local movevector = Vector3.new()
  1216.  
  1217. if Torso2 then
  1218. movevector = CFrame.new(CharTorso.Position,Torso2.Position).lookVector
  1219. local Head = Character2:FindFirstChild("Head")
  1220. if Head then
  1221. local Neck = Instance.new("Weld")
  1222. Neck.Name = "Neck"
  1223. Neck.Part0 = Torso2
  1224. Neck.Part1 = Head
  1225. Neck.C0 = CFrame.new(0, 1.5, 0)
  1226. Neck.C1 = CFrame.new()
  1227. Neck.Parent = Torso2
  1228.  
  1229. end
  1230. local Limb = Character2:FindFirstChild("Right Arm")
  1231. if Limb then
  1232.  
  1233. Limb.CFrame = Torso2.CFrame * CFrame.new(1.5, 0, 0)
  1234. local Joint = Instance.new("Glue")
  1235. Joint.Name = "RightShoulder"
  1236. Joint.Part0 = Torso2
  1237. Joint.Part1 = Limb
  1238. Joint.C0 = CFrame.new(1.5, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  1239. Joint.C1 = CFrame.new(-0, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  1240. Joint.Parent = Torso2
  1241.  
  1242. local B = Instance.new("Part")
  1243. B.TopSurface = 0
  1244. B.BottomSurface = 0
  1245. B.formFactor = "Symmetric"
  1246. B.Size = Vector3.new(1, 1, 1)
  1247. B.Transparency = 1
  1248. B.CFrame = Limb.CFrame * CFrame.new(0, -0.5, 0)
  1249. B.Parent = Character2
  1250. local W = Instance.new("Weld")
  1251. W.Part0 = Limb
  1252. W.Part1 = B
  1253. W.C0 = CFrame.new(0, -0.5, 0)
  1254. W.Parent = Limb
  1255.  
  1256. end
  1257. local Limb = Character2:FindFirstChild("Left Arm")
  1258. if Limb then
  1259.  
  1260. Limb.CFrame = Torso2.CFrame * CFrame.new(-1.5, 0, 0)
  1261. local Joint = Instance.new("Glue")
  1262. Joint.Name = "LeftShoulder"
  1263. Joint.Part0 = Torso2
  1264. Joint.Part1 = Limb
  1265. Joint.C0 = CFrame.new(-1.5, 0.5, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
  1266. Joint.C1 = CFrame.new(0, 0.5, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
  1267. Joint.Parent = Torso2
  1268.  
  1269. local B = Instance.new("Part")
  1270. B.TopSurface = 0
  1271. B.BottomSurface = 0
  1272. B.formFactor = "Symmetric"
  1273. B.Size = Vector3.new(1, 1, 1)
  1274. B.Transparency = 1
  1275. B.CFrame = Limb.CFrame * CFrame.new(0, -0.5, 0)
  1276. B.Parent = Character2
  1277. local W = Instance.new("Weld")
  1278. W.Part0 = Limb
  1279. W.Part1 = B
  1280. W.C0 = CFrame.new(0, -0.5, 0)
  1281. W.Parent = Limb
  1282.  
  1283. end
  1284. local Limb = Character2:FindFirstChild("Right Leg")
  1285. if Limb then
  1286.  
  1287. Limb.CFrame = Torso2.CFrame * CFrame.new(0.5, -2, 0)
  1288. local Joint = Instance.new("Glue")
  1289. Joint.Name = "RightHip"
  1290. Joint.Part0 = Torso2
  1291. Joint.Part1 = Limb
  1292. Joint.C0 = CFrame.new(0.5, -1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  1293. Joint.C1 = CFrame.new(0, 1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  1294. Joint.Parent = Torso2
  1295.  
  1296. local B = Instance.new("Part")
  1297. B.TopSurface = 0
  1298. B.BottomSurface = 0
  1299. B.formFactor = "Symmetric"
  1300. B.Size = Vector3.new(1, 1, 1)
  1301. B.Transparency = 1
  1302. B.CFrame = Limb.CFrame * CFrame.new(0, -0.5, 0)
  1303. B.Parent = Character2
  1304. local W = Instance.new("Weld")
  1305. W.Part0 = Limb
  1306. W.Part1 = B
  1307. W.C0 = CFrame.new(0, -0.5, 0)
  1308. W.Parent = Limb
  1309.  
  1310. end
  1311. local Limb = Character2:FindFirstChild("Left Leg")
  1312. if Limb then
  1313.  
  1314. Limb.CFrame = Torso2.CFrame * CFrame.new(-0.5, -2, 0)
  1315. local Joint = Instance.new("Glue")
  1316. Joint.Name = "LeftHip"
  1317. Joint.Part0 = Torso2
  1318. Joint.Part1 = Limb
  1319. Joint.C0 = CFrame.new(-0.5, -1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
  1320. Joint.C1 = CFrame.new(-0, 1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
  1321. Joint.Parent = Torso2
  1322.  
  1323. local B = Instance.new("Part")
  1324. B.TopSurface = 0
  1325. B.BottomSurface = 0
  1326. B.formFactor = "Symmetric"
  1327. B.Size = Vector3.new(1, 1, 1)
  1328. B.Transparency = 1
  1329. B.CFrame = Limb.CFrame * CFrame.new(0, -0.5, 0)
  1330. B.Parent = Character2
  1331. local W = Instance.new("Weld")
  1332. W.Part0 = Limb
  1333. W.Part1 = B
  1334. W.C0 = CFrame.new(0, -0.5, 0)
  1335. W.Parent = Limb
  1336.  
  1337. end
  1338. --[
  1339. local Bar = Instance.new("Part")
  1340. Bar.TopSurface = 0
  1341. Bar.BottomSurface = 0
  1342. Bar.formFactor = "Symmetric"
  1343. Bar.Size = Vector3.new(1, 1, 1)
  1344. Bar.Transparency = 1
  1345. Bar.CFrame = Torso2.CFrame * CFrame.new(0, 0.5, 0)
  1346. Bar.Parent = Character2
  1347. local Weld = Instance.new("Weld")
  1348. Weld.Part0 = Torso2
  1349. Weld.Part1 = Bar
  1350. Weld.C0 = CFrame.new(0, 0.5, 0)
  1351. Weld.Parent = Torso2
  1352. --]]
  1353. end
  1354. Character2.Parent = workspace
  1355. Debris:AddItem(Character2,5)
  1356.  
  1357. return Character2,Torso2
  1358. end
  1359.  
  1360. Character["Body Colors"].HeadColor = BrickColor.new("Bright green")
  1361. Character["Body Colors"].TorsoColor = BrickColor.new("Brown")
  1362. Character["Body Colors"].LeftArmColor = BrickColor.new("Bright green")
  1363. Character["Body Colors"].RightArmColor = BrickColor.new("Bright green")
  1364. Character["Body Colors"].LeftLegColor = BrickColor.new("Brown")
  1365. Character["Body Colors"].RightLegColor = BrickColor.new("Brown")
  1366.  
  1367.  
  1368.  
  1369.  
  1370.  
  1371. function MouseUp(Mouse)
  1372. end
  1373.  
  1374. function KeyDown(Key)
  1375. end
  1376.  
  1377. function KeyUp(Key)
  1378. end
  1379.  
  1380. Mouse.Button1Down:connect(function(NEWKEY)
  1381. MouseDown(NEWKEY)
  1382. end)
  1383. Mouse.Button1Up:connect(function(NEWKEY)
  1384. MouseUp(NEWKEY)
  1385. end)
  1386. Mouse.KeyDown:connect(function(NEWKEY)
  1387. KeyDown(NEWKEY)
  1388. end)
  1389. Mouse.KeyUp:connect(function(NEWKEY)
  1390. KeyUp(NEWKEY)
  1391. end)
  1392.  
  1393.  
  1394. Humanoid.Changed:connect(function(Jump)
  1395. if Jump == "Jump" and (Disable_Jump == true) then
  1396. Humanoid.Jump = false
  1397. end
  1398. end)
  1399.  
  1400. while true do
  1401. Swait()
  1402. script.Parent = WEAPONGUI
  1403. ANIMATE.Parent = nil
  1404. for _,v in next, Humanoid:GetPlayingAnimationTracks() do
  1405. v:Stop();
  1406. end
  1407. SINE = SINE + CHANGE
  1408. local TORSOVELOCITY = (RootPart.Velocity * VT(1, 0, 1)).magnitude
  1409. local TORSOVERTICALVELOCITY = RootPart.Velocity.y
  1410. local HITFLOOR = Raycast(RootPart.Position, (CF(RootPart.Position, RootPart.Position + VT(0, -1, 0))).lookVector, 4, Character)
  1411. local WALKSPEEDVALUE = 6 / (Humanoid.WalkSpeed / 16)
  1412. if ANIM == "Walk" and TORSOVELOCITY > 1 then
  1413. RootJoint.C1 = Clerp(RootJoint.C1, ROOTC0 * CF(0, 0, -0.15 * COS(SINE / (WALKSPEEDVALUE / 2))) * ANGLES(RAD(0), RAD(0) - RootPart.RotVelocity.Y / 75, RAD(0)), 2 * (Humanoid.WalkSpeed / 16) / Animation_Speed)
  1414. Neck.C1 = Clerp(Neck.C1, CF(0, -0.5, 0) * ANGLES(RAD(-90), RAD(0), RAD(180)) * ANGLES(RAD(2.5 * SIN(SINE / (WALKSPEEDVALUE / 2))), RAD(0), RAD(0) - Head.RotVelocity.Y / 30), 0.2 * (Humanoid.WalkSpeed / 16) / Animation_Speed)
  1415. RightHip.C1 = Clerp(RightHip.C1, CF(0.5, 0.875 - 0.125 * SIN(SINE / WALKSPEEDVALUE) - 0.15 * COS(SINE / WALKSPEEDVALUE*2), -0.125 * COS(SINE / WALKSPEEDVALUE) +0.2+ 0.2 * COS(SINE / WALKSPEEDVALUE)) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0) - RightLeg.RotVelocity.Y / 75, RAD(0), RAD(76 * COS(SINE / WALKSPEEDVALUE))), 0.3 * (Humanoid.WalkSpeed / 16) / Animation_Speed)
  1416. LeftHip.C1 = Clerp(LeftHip.C1, CF(-0.5, 0.875 + 0.125 * SIN(SINE / WALKSPEEDVALUE) - 0.15 * COS(SINE / WALKSPEEDVALUE*2), 0.125 * COS(SINE / WALKSPEEDVALUE) +0.2+ -0.2 * COS(SINE / WALKSPEEDVALUE)) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0) + LeftLeg.RotVelocity.Y / 75, RAD(0), RAD(76 * COS(SINE / WALKSPEEDVALUE))), 0.3 * (Humanoid.WalkSpeed / 16) / Animation_Speed)
  1417. elseif (ANIM ~= "Walk") or (TORSOVELOCITY < 1) then
  1418. RootJoint.C1 = Clerp(RootJoint.C1, ROOTC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed)
  1419. Neck.C1 = Clerp(Neck.C1, CF(0, -0.5, 0) * ANGLES(RAD(-90), RAD(0), RAD(180)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed)
  1420. RightHip.C1 = Clerp(RightHip.C1, CF(0.5, 1, 0) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed)
  1421. LeftHip.C1 = Clerp(LeftHip.C1, CF(-0.5, 1, 0) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed)
  1422. end
  1423. if TORSOVERTICALVELOCITY > 1 and HITFLOOR == nil then
  1424. ANIM = "Jump"
  1425. if PLAYANIMS == true then
  1426. RootJoint.C0 = Clerp(RootJoint.C0, ROOTC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed)
  1427. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(-20), RAD(0), RAD(0)), 0.2 / Animation_Speed)
  1428. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(-40), RAD(0), RAD(20)) * RIGHTSHOULDERC0, 0.2 / Animation_Speed)
  1429. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(-40), RAD(0), RAD(-20)) * LEFTSHOULDERC0, 0.2 / Animation_Speed)
  1430. RightHip.C0 = Clerp(RightHip.C0, CF(1, -1, -0.3) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(-5), RAD(0), RAD(-20)), 0.2 / Animation_Speed)
  1431. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, -0.3) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(-5), RAD(0), RAD(20)), 0.2 / Animation_Speed)
  1432. end
  1433. elseif TORSOVERTICALVELOCITY < -1 and HITFLOOR == nil then
  1434. ANIM = "Fall"
  1435. if PLAYANIMS == true then
  1436. RootJoint.C0 = Clerp(RootJoint.C0, ROOTC0 * CF(0, 0, 0 ) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed)
  1437. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, -0.5 , 0 + ((1) - 1)) * ANGLES(RAD(-25), RAD(0), RAD(0)), 0.2 / Animation_Speed)
  1438. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(100), RAD(0), RAD(0)) * RIGHTSHOULDERC0, 0.2 / Animation_Speed)
  1439. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(-100), RAD(0), RAD(0)) * LEFTSHOULDERC0, 0.2 / Animation_Speed)
  1440. RightHip.C0 = Clerp(RightHip.C0, CF(1, -1, 0) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(20)), 0.2 / Animation_Speed)
  1441. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, 0) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(10)), 0.2 / Animation_Speed)
  1442. end
  1443. elseif TORSOVELOCITY < 1 and HITFLOOR ~= nil then
  1444. ANIM = "Idle"
  1445. if PLAYANIMS == true then
  1446. RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0 + 0.05 * COS(SINE / 12)) * ANGLES(RAD(-20), RAD(0), RAD(0)), 0.15 / Animation_Speed)
  1447. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, -0, -0) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed)
  1448. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(-60), RAD(0), RAD(0)) * RIGHTSHOULDERC0, 0.15 / Animation_Speed)
  1449. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(-60), RAD(0), RAD(0)) * LEFTSHOULDERC0, 0.15 / Animation_Speed)
  1450. RightHip.C0 = Clerp(RightHip.C0, CF(1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(-20), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed)
  1451. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(-20), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed)
  1452. end
  1453. elseif TORSOVELOCITY > 1 and HITFLOOR ~= nil then
  1454. ANIM = "Walk"
  1455. if PLAYANIMS == true then
  1456. RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0 + 0.05 * COS(SINE / 12)) * ANGLES(RAD(15), RAD(0), RAD(0)), 0.15 / Animation_Speed)
  1457. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0) * ANGLES(RAD(-15), RAD(0), RAD(0)), 0.15 / Animation_Speed)
  1458. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(90), RAD(30), RAD(0)) * RIGHTSHOULDERC0, 0.35 / Animation_Speed)
  1459. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(90), RAD(-30), RAD(0)) * LEFTSHOULDERC0, 0.35 / Animation_Speed)
  1460. RightHip.C0 = Clerp(RightHip.C0, CF(1, -1, 0.2) * ANGLES(RAD(50 * COS(SINE / WALKSPEEDVALUE)), RAD(90), RAD(0)), 1)
  1461. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, 0.2) * ANGLES(RAD(-50 * COS(SINE / WALKSPEEDVALUE)), RAD(-90), RAD(0)), 1)
  1462. end
  1463. end
  1464. end
  1465. if Rooted == false then
  1466. Disable_Jump = false
  1467. Humanoid.WalkSpeed = Speed
  1468. elseif Rooted == true then
  1469. Disable_Jump = true
  1470. Humanoid.WalkSpeed = 0
  1471. end
  1472.  
  1473. Humanoid.Health = Humanoid.Health + 1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement