Advertisement
awawawaw1212

Untitled

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