Advertisement
filipaopastebins2134

Sunny Bunnies runner v1.1 made by filipaogamer345

Jan 18th, 2019
214
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 29.84 KB | None | 0 0
  1. ---[Sunny bunnies made by filipaogamer345]---
  2. print("Controls")
  3. print("-------------------------------------")
  4. print("WSAD or L Stick to run")
  5. print("Space or (A) for jump")
  6. print("Press T for Taunt")
  7. print("Press Z for Here we Go!")
  8. print("-------------------------------------")
  9. print("If you give Credits to me, i get you a gift")
  10. print("Created by filipaogamer345")
  11. print("--------------v1.1--------------------")
  12.  
  13. ------------------------
  14. game.Players.LocalPlayer.Character.Humanoid.JumpPower = 100
  15.  
  16. --Made by goodguyaiden--
  17. --Sonic-----------------
  18.  
  19. ------------------------
  20.  
  21. wait(0.8)
  22. Player=game:GetService("Players").LocalPlayer
  23. Character=Player.Character
  24. PlayerGui=Player.PlayerGui
  25. Backpack=Player.Backpack
  26. Torso=Character.Torso
  27. Head=Character.Head
  28. Humanoid=Character.Humanoid
  29. m=Instance.new('Model',Character)
  30. LeftArm=Character["Left Arm"]
  31. LeftLeg=Character["Left Leg"]
  32. RightArm=Character["Right Arm"]
  33. RightLeg=Character["Right Leg"]
  34. LS=Torso["Left Shoulder"]
  35. LH=Torso["Left Hip"]
  36. RS=Torso["Right Shoulder"]
  37. RH=Torso["Right Hip"]
  38. Face = Head.face
  39. Neck=Torso.Neck
  40. it=Instance.new
  41. attacktype=1
  42. vt=Vector3.new
  43. cf=CFrame.new
  44. cl3=Color3.new
  45. rgb=Color3.fromRGB
  46. bcn=BrickColor.new
  47. euler=CFrame.fromEulerAnglesXYZ
  48. angles=CFrame.Angles
  49. Humanoid.WalkSpeed = 30
  50. Player = game:GetService("Players").LocalPlayer
  51. PlayerGui = Player.PlayerGui
  52. Cam = workspace.CurrentCamera
  53. Backpack = Player.Backpack
  54. Character = Player.Character
  55. Humanoid = Character.Humanoid
  56. Mouse = Player:GetMouse()
  57. RootPart = Character["HumanoidRootPart"]
  58. Torso = Character["Torso"]
  59. Head = Character["Head"]
  60. RightArm = Character["Right Arm"]
  61. LeftArm = Character["Left Arm"]
  62. RightLeg = Character["Right Leg"]
  63. LeftLeg = Character["Left Leg"]
  64. RootJoint = RootPart["RootJoint"]
  65. Neck = Torso["Neck"]
  66. RightShoulder = Torso["Right Shoulder"]
  67. LeftShoulder = Torso["Left Shoulder"]
  68. RightHip = Torso["Right Hip"]
  69. LeftHip = Torso["Left Hip"]
  70. IT = Instance.new
  71. CF = CFrame.new
  72. VT = Vector3.new
  73. RAD = math.rad
  74. C3 = Color3.new
  75. UD2 = UDim2.new
  76. BRICKC = BrickColor.new
  77. ANGLES = CFrame.Angles
  78. EULER = CFrame.fromEulerAnglesXYZ
  79. COS = math.cos
  80. ACOS = math.acos
  81. SIN = math.sin
  82. ASIN = math.asin
  83. ABS = math.abs
  84. MRANDOM = math.random
  85. FLOOR = math.floor
  86. Animation_Speed = 3
  87. Frame_Speed = 1 / 60 -- (1 / 30) OR (1 / 60)
  88. local Speed = 12
  89. local ROOTC0 = CF(0, 0, 0) * ANGLES(RAD(-90), RAD(0), RAD(180))
  90. local NECKC0 = CF(0, 1, 0) * ANGLES(RAD(-90), RAD(0), RAD(180))
  91. local RIGHTSHOULDERC0 = CF(-0.5, 0, 0) * ANGLES(RAD(0), RAD(90), RAD(0))
  92. local LEFTSHOULDERC0 = CF(0.5, 0, 0) * ANGLES(RAD(0), RAD(-90), RAD(0))
  93. local DAMAGEMULTIPLIER = 1
  94. local ANIM = "Idle"
  95. local ATTACK = false
  96. local EQUIPPED = false
  97. local HOLD = false
  98. local COMBO = 1
  99. local Rooted = false
  100. local SINE = 0
  101. local KEYHOLD = false
  102. local CHANGE = 2 / Animation_Speed
  103. local WALKINGANIM = false
  104. local VALUE1 = false
  105. local VALUE2 = false
  106. local ROBLOXIDLEANIMATION = IT("Animation")
  107. ROBLOXIDLEANIMATION.Name = "Roblox Idle Animation"
  108. ROBLOXIDLEANIMATION.AnimationId = "http://www.roblox.com/asset/?id=180435571"
  109. --ROBLOXIDLEANIMATION.Parent = Humanoid
  110. local WEAPONGUI = IT("ScreenGui", PlayerGui)
  111. WEAPONGUI.Name = "Weapon GUI"
  112. local Weapon = IT("Model")
  113. Weapon.Name = "Adds"
  114. local Effects = IT("Folder", Weapon)
  115. Effects.Name = "Effects"
  116. local ANIMATOR = Humanoid.Animator
  117. local ANIMATE = Character.Animate
  118. local UNANCHOR = true
  119. local PLAYANIMS = true
  120. ArtificialHB = Instance.new("BindableEvent", script)
  121. ArtificialHB.Name = "ArtificialHB"
  122.  
  123. script:WaitForChild("ArtificialHB")
  124.  
  125. frame = Frame_Speed
  126. tf = 0
  127. allowframeloss = false
  128. tossremainder = false
  129. lastframe = tick()
  130. script.ArtificialHB:Fire()
  131.  
  132. game:GetService("RunService").Heartbeat:connect(function(s, p)
  133. tf = tf + s
  134. if tf >= frame then
  135. if allowframeloss then
  136. script.ArtificialHB:Fire()
  137. lastframe = tick()
  138. else
  139. for i = 1, math.floor(tf / frame) do
  140. script.ArtificialHB:Fire()
  141. end
  142. lastframe = tick()
  143. end
  144. if tossremainder then
  145. tf = 0
  146. else
  147. tf = tf - frame * math.floor(tf / frame)
  148. end
  149. end
  150. end)
  151. function Raycast(POSITION, DIRECTION, RANGE, IGNOREDECENDANTS)
  152. return workspace:FindPartOnRay(Ray.new(POSITION, DIRECTION.unit * RANGE), IGNOREDECENDANTS)
  153. end
  154.  
  155. function PositiveAngle(NUMBER)
  156. if NUMBER >= 0 then
  157. NUMBER = 0
  158. end
  159. return NUMBER
  160. end
  161.  
  162. function NegativeAngle(NUMBER)
  163. if NUMBER <= 0 then
  164. NUMBER = 0
  165. end
  166. return NUMBER
  167. end
  168.  
  169. function Swait(NUMBER)
  170. if NUMBER == 0 or NUMBER == nil then
  171. ArtificialHB.Event:wait()
  172. else
  173. for i = 1, NUMBER do
  174. ArtificialHB.Event:wait()
  175. end
  176. end
  177. end
  178.  
  179. function CreateMesh(MESH, PARENT, MESHTYPE, MESHID, TEXTUREID, SCALE, OFFSET)
  180. local NEWMESH = IT(MESH)
  181. if MESH == "SpecialMesh" then
  182. NEWMESH.MeshType = MESHTYPE
  183. if MESHID ~= "nil" and MESHID ~= "" then
  184. NEWMESH.MeshId = "http://www.roblox.com/asset/?id="..MESHID
  185. end
  186. if TEXTUREID ~= "nil" and TEXTUREID ~= "" then
  187. NEWMESH.TextureId = "http://www.roblox.com/asset/?id="..TEXTUREID
  188. end
  189. end
  190. NEWMESH.Offset = OFFSET or VT(0, 0, 0)
  191. NEWMESH.Scale = SCALE
  192. NEWMESH.Parent = PARENT
  193. return NEWMESH
  194. end
  195.  
  196. function CreatePart(FORMFACTOR, PARENT, MATERIAL, REFLECTANCE, TRANSPARENCY, BRICKCOLOR, NAME, SIZE, ANCHOR)
  197. local NEWPART = IT("Part")
  198. NEWPART.formFactor = FORMFACTOR
  199. NEWPART.Reflectance = REFLECTANCE
  200. NEWPART.Transparency = TRANSPARENCY
  201. NEWPART.CanCollide = false
  202. NEWPART.Locked = true
  203. NEWPART.Anchored = true
  204. if ANCHOR == false then
  205. NEWPART.Anchored = false
  206. end
  207. NEWPART.BrickColor = BRICKC(tostring(BRICKCOLOR))
  208. NEWPART.Name = NAME
  209. NEWPART.Size = SIZE
  210. NEWPART.Position = Torso.Position
  211. NEWPART.Material = MATERIAL
  212. NEWPART:BreakJoints()
  213. NEWPART.Parent = PARENT
  214. return NEWPART
  215. end
  216.  
  217. local function weldBetween(a, b)
  218. local weldd = Instance.new("ManualWeld")
  219. weldd.Part0 = a
  220. weldd.Part1 = b
  221. weldd.C0 = CFrame.new()
  222. weldd.C1 = b.CFrame:inverse() * a.CFrame
  223. weldd.Parent = a
  224. return weldd
  225. end
  226.  
  227.  
  228. function QuaternionFromCFrame(cf)
  229. local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components()
  230. local trace = m00 + m11 + m22
  231. if trace > 0 then
  232. local s = math.sqrt(1 + trace)
  233. local recip = 0.5 / s
  234. return (m21 - m12) * recip, (m02 - m20) * recip, (m10 - m01) * recip, s * 0.5
  235. else
  236. local i = 0
  237. if m11 > m00 then
  238. i = 1
  239. end
  240. if m22 > (i == 0 and m00 or m11) then
  241. i = 2
  242. end
  243. if i == 0 then
  244. local s = math.sqrt(m00 - m11 - m22 + 1)
  245. local recip = 0.5 / s
  246. return 0.5 * s, (m10 + m01) * recip, (m20 + m02) * recip, (m21 - m12) * recip
  247. elseif i == 1 then
  248. local s = math.sqrt(m11 - m22 - m00 + 1)
  249. local recip = 0.5 / s
  250. return (m01 + m10) * recip, 0.5 * s, (m21 + m12) * recip, (m02 - m20) * recip
  251. elseif i == 2 then
  252. local s = math.sqrt(m22 - m00 - m11 + 1)
  253. local recip = 0.5 / s return (m02 + m20) * recip, (m12 + m21) * recip, 0.5 * s, (m10 - m01) * recip
  254. end
  255. end
  256. end
  257.  
  258. function QuaternionToCFrame(px, py, pz, x, y, z, w)
  259. local xs, ys, zs = x + x, y + y, z + z
  260. local wx, wy, wz = w * xs, w * ys, w * zs
  261. local xx = x * xs
  262. local xy = x * ys
  263. local xz = x * zs
  264. local yy = y * ys
  265. local yz = y * zs
  266. local zz = z * zs
  267. 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))
  268. end
  269.  
  270. function QuaternionSlerp(a, b, t)
  271. local cosTheta = a[1] * b[1] + a[2] * b[2] + a[3] * b[3] + a[4] * b[4]
  272. local startInterp, finishInterp;
  273. if cosTheta >= 0.0001 then
  274. if (1 - cosTheta) > 0.0001 then
  275. local theta = ACOS(cosTheta)
  276. local invSinTheta = 1 / SIN(theta)
  277. startInterp = SIN((1 - t) * theta) * invSinTheta
  278. finishInterp = SIN(t * theta) * invSinTheta
  279. else
  280. startInterp = 1 - t
  281. finishInterp = t
  282. end
  283. else
  284. if (1 + cosTheta) > 0.0001 then
  285. local theta = ACOS(-cosTheta)
  286. local invSinTheta = 1 / SIN(theta)
  287. startInterp = SIN((t - 1) * theta) * invSinTheta
  288. finishInterp = SIN(t * theta) * invSinTheta
  289. else
  290. startInterp = t - 1
  291. finishInterp = t
  292. end
  293. end
  294. 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
  295. end
  296.  
  297. function Clerp(a, b, t)
  298. local qa = {QuaternionFromCFrame(a)}
  299. local qb = {QuaternionFromCFrame(b)}
  300. local ax, ay, az = a.x, a.y, a.z
  301. local bx, by, bz = b.x, b.y, b.z
  302. local _t = 1 - t
  303. return QuaternionToCFrame(_t * ax + t * bx, _t * ay + t * by, _t * az + t * bz, QuaternionSlerp(qa, qb, t))
  304. end
  305.  
  306. function CreateFrame(PARENT, TRANSPARENCY, BORDERSIZEPIXEL, POSITION, SIZE, COLOR, BORDERCOLOR, NAME)
  307. local frame = IT("Frame")
  308. frame.BackgroundTransparency = TRANSPARENCY
  309. frame.BorderSizePixel = BORDERSIZEPIXEL
  310. frame.Position = POSITION
  311. frame.Size = SIZE
  312. frame.BackgroundColor3 = COLOR
  313. frame.BorderColor3 = BORDERCOLOR
  314. frame.Name = NAME
  315. frame.Parent = PARENT
  316. return frame
  317. end
  318.  
  319. function CreateLabel(PARENT, TEXT, TEXTCOLOR, TEXTFONTSIZE, TEXTFONT, TRANSPARENCY, BORDERSIZEPIXEL, STROKETRANSPARENCY, NAME)
  320. local label = IT("TextLabel")
  321. label.BackgroundTransparency = 1
  322. label.Size = UD2(1, 0, 1, 0)
  323. label.Position = UD2(0, 0, 0, 0)
  324. label.TextColor3 = TEXTCOLOR
  325. label.TextStrokeTransparency = STROKETRANSPARENCY
  326. label.TextTransparency = TRANSPARENCY
  327. label.FontSize = TEXTFONTSIZE
  328. label.Font = TEXTFONT
  329. label.BorderSizePixel = BORDERSIZEPIXEL
  330. label.TextScaled = false
  331. label.Text = TEXT
  332. label.Name = NAME
  333. label.Parent = PARENT
  334. return label
  335. end
  336.  
  337. function NoOutlines(PART)
  338. PART.TopSurface, PART.BottomSurface, PART.LeftSurface, PART.RightSurface, PART.FrontSurface, PART.BackSurface = 10, 10, 10, 10, 10, 10
  339. end
  340.  
  341. function CreateWeldOrSnapOrMotor(TYPE, PARENT, PART0, PART1, C0, C1)
  342. local NEWWELD = IT(TYPE)
  343. NEWWELD.Part0 = PART0
  344. NEWWELD.Part1 = PART1
  345. NEWWELD.C0 = C0
  346. NEWWELD.C1 = C1
  347. NEWWELD.Parent = PARENT
  348. return NEWWELD
  349. end
  350.  
  351. local S = IT("Sound")
  352. function CreateSound(ID, PARENT, VOLUME, PITCH, DOESLOOP)
  353. local NEWSOUND = nil
  354. coroutine.resume(coroutine.create(function()
  355. NEWSOUND = S:Clone()
  356. NEWSOUND.Parent = PARENT
  357. NEWSOUND.Volume = VOLUME
  358. NEWSOUND.Pitch = PITCH
  359. NEWSOUND.SoundId = "http://www.roblox.com/asset/?id="..ID
  360. NEWSOUND:play()
  361. if DOESLOOP == true then
  362. NEWSOUND.Looped = true
  363. else
  364. repeat wait(1) until NEWSOUND.Playing == false
  365. NEWSOUND:remove()
  366. end
  367. end))
  368. return NEWSOUND
  369. end
  370.  
  371. function MakeForm(PART,TYPE)
  372. if TYPE == "Cyl" then
  373. local MSH = IT("CylinderMesh",PART)
  374. elseif TYPE == "Ball" then
  375. local MSH = IT("SpecialMesh",PART)
  376. MSH.MeshType = "Sphere"
  377. elseif TYPE == "Wedge" then
  378. local MSH = IT("SpecialMesh",PART)
  379. MSH.MeshType = "Wedge"
  380. end
  381. end
  382.  
  383. function CFrameFromTopBack(at, top, back)
  384. local right = top:Cross(back)
  385. 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)
  386. end
  387.  
  388. function PuddleOfBlood(Position,MaxDrop,Model,MaxSize)
  389. local HITFLOOR, HITPOS, NORMAL = Raycast(Position, (CF(Position, Position + VT(0, -1, 0))).lookVector, MaxDrop, Model)
  390. if HITFLOOR ~= nil then
  391. if HITFLOOR.Parent ~= Weapon and HITFLOOR.Parent ~= Character then
  392. if HITFLOOR.Name == "BloodPuddle" then
  393. local DIST = (Position - HITFLOOR.Position).Magnitude
  394. 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
  395. HITFLOOR.Size = HITFLOOR.Size + VT(0.1,0,0.1)
  396. end
  397. else
  398. if HITFLOOR.Anchored == true then
  399. local BLOOD = CreatePart(3, Effects, "Glass", 0, 0, "Maroon", "BloodPuddle", VT(2,0,2))
  400. BLOOD.CFrame = CF(HITPOS,HITPOS+NORMAL)*ANGLES(RAD(90),RAD(0),RAD(0))
  401. MakeForm(BLOOD,"Cyl")
  402. coroutine.resume(coroutine.create(function()
  403. Swait(75)
  404. while true do
  405. Swait()
  406. BLOOD.Size = BLOOD.Size - VT(0.02,0,0.02)
  407. if BLOOD.Size.Z < 0.051 then
  408. BLOOD:remove()
  409. break
  410. end
  411. end
  412. end))
  413. end
  414. end
  415. end
  416. end
  417. end
  418.  
  419. function SprayBlood(POSITION,DIRECTION,BloodSize)
  420. local BLOOD = CreatePart(3, Effects, "Glass", 0, 0, "Maroon", "BloodPuddle", VT(0.3,0.3,0.3),false)
  421. BLOOD.CFrame = CF(POSITION)
  422. MakeForm(BLOOD,"Ball")
  423. local bv = Instance.new("BodyVelocity",BLOOD)
  424. bv.maxForce = Vector3.new(1e9, 1e9, 1e9)
  425. bv.velocity = CF(POSITION,DIRECTION+VT(MRANDOM(-3,3)/30,MRANDOM(-3,3)/30,MRANDOM(-3,3)/30)).lookVector*75
  426. bv.Name = "MOVE"
  427. Debris:AddItem(bv,0.05)
  428. coroutine.resume(coroutine.create(function()
  429. local HASTOUCHEDGROUND = false
  430. local HIT = BLOOD.Touched:Connect(function(hit)
  431. if hit.Anchored == true then
  432. HASTOUCHEDGROUND = true
  433. PuddleOfBlood(BLOOD.Position+VT(0,1,0),2,BLOOD,BloodSize)
  434. end
  435. end)
  436. wait(5)
  437. if HASTOUCHEDGROUND == false then
  438. BLOOD:remove()
  439. end
  440. end))
  441. end
  442.  
  443. Debris = game:GetService("Debris")
  444.  
  445. function CastProperRay(StartPos, EndPos, Distance, Ignore)
  446. local DIRECTION = CF(StartPos,EndPos).lookVector
  447. return Raycast(StartPos, DIRECTION, Distance, Ignore)
  448. end
  449.  
  450. function turnto(position)
  451. RootPart.CFrame=CFrame.new(RootPart.CFrame.p,VT(position.X,RootPart.Position.Y,position.Z)) * CFrame.new(0, 0, 0)
  452. end
  453.  
  454. function recurse(root,callback,i)
  455. i= i or 0
  456. for _,v in pairs(root:GetChildren()) do
  457. i = i + 1
  458. callback(i,v)
  459.  
  460. if #v:GetChildren() > 0 then
  461. i = recurse(v,callback,i)
  462. end
  463. end
  464.  
  465. return i
  466. end
  467.  
  468. function ragdollJoint(character, part0, part1, attachmentName, className, properties)
  469. attachmentName = attachmentName.."RigAttachment"
  470. local constraint = Instance.new(className.."Constraint")
  471. constraint.Attachment0 = part0:FindFirstChild(attachmentName)
  472. constraint.Attachment1 = part1:FindFirstChild(attachmentName)
  473. constraint.Name = "RagdollConstraint"..part1.Name
  474.  
  475. for _,propertyData in next,properties or {} do
  476. constraint[propertyData[1]] = propertyData[2]
  477. end
  478.  
  479. constraint.Parent = character
  480. end
  481.  
  482. function getAttachment0(character, attachmentName)
  483. for _,child in next,character:GetChildren() do
  484. local attachment = child:FindFirstChild(attachmentName)
  485. if attachment then
  486. return attachment
  487. end
  488. end
  489. end
  490.  
  491. function R15Ragdoll(character)
  492. recurse(character, function(_,v)
  493. if v:IsA("Attachment") then
  494. v.Axis = Vector3.new(0, 1, 0)
  495. v.SecondaryAxis = Vector3.new(0, 0, 1)
  496. v.Rotation = Vector3.new(0, 0, 0)
  497. end
  498. end)
  499. for _,child in next,character:GetChildren() do
  500. if child:IsA("Accoutrement") then
  501. for _,part in next,child:GetChildren() do
  502. if part:IsA("BasePart") and part.Name ~= "HumanoidRootPart" then
  503. local attachment1 = part:FindFirstChildOfClass("Attachment")
  504. local attachment0 = getAttachment0(character,attachment1.Name)
  505. if attachment0 and attachment1 then
  506. local constraint = Instance.new("HingeConstraint")
  507. constraint.Attachment0 = attachment0
  508. constraint.Attachment1 = attachment1
  509. constraint.LimitsEnabled = true
  510. constraint.UpperAngle = 0
  511. constraint.LowerAngle = 0
  512. constraint.Parent = character
  513. end
  514. elseif part.Name == "HumanoidRootPart" then
  515. part:remove()
  516. end
  517. end
  518. end
  519. end
  520.  
  521. ragdollJoint(character,character.LowerTorso, character.UpperTorso, "Waist", "BallSocket", {
  522. {"LimitsEnabled",true};
  523. {"UpperAngle",5};
  524. })
  525. ragdollJoint(character,character.UpperTorso, character.Head, "Neck", "BallSocket", {
  526. {"LimitsEnabled",true};
  527. {"UpperAngle",15};
  528. })
  529.  
  530. local handProperties = {
  531. {"LimitsEnabled", true};
  532. {"UpperAngle",0};
  533. {"LowerAngle",0};
  534. }
  535. ragdollJoint(character,character.LeftLowerArm, character.LeftHand, "LeftWrist", "Hinge", handProperties)
  536. ragdollJoint(character,character.RightLowerArm, character.RightHand, "RightWrist", "Hinge", handProperties)
  537.  
  538. local shinProperties = {
  539. {"LimitsEnabled", true};
  540. {"UpperAngle", 0};
  541. {"LowerAngle", -75};
  542. }
  543. ragdollJoint(character,character.LeftUpperLeg, character.LeftLowerLeg, "LeftKnee", "Hinge", shinProperties)
  544. ragdollJoint(character,character.RightUpperLeg, character.RightLowerLeg, "RightKnee", "Hinge", shinProperties)
  545.  
  546. local footProperties = {
  547. {"LimitsEnabled", true};
  548. {"UpperAngle", 15};
  549. {"LowerAngle", -45};
  550. }
  551. ragdollJoint(character,character.LeftLowerLeg, character.LeftFoot, "LeftAnkle", "Hinge", footProperties)
  552. ragdollJoint(character,character.RightLowerLeg, character.RightFoot, "RightAnkle", "Hinge", footProperties)
  553.  
  554. ragdollJoint(character,character.UpperTorso, character.LeftUpperArm, "LeftShoulder", "BallSocket")
  555. ragdollJoint(character,character.LeftUpperArm, character.LeftLowerArm, "LeftElbow", "BallSocket")
  556. ragdollJoint(character,character.UpperTorso, character.RightUpperArm, "RightShoulder", "BallSocket")
  557. ragdollJoint(character,character.RightUpperArm, character.RightLowerArm, "RightElbow", "BallSocket")
  558. ragdollJoint(character,character.LowerTorso, character.LeftUpperLeg, "LeftHip", "BallSocket")
  559. ragdollJoint(character,character.LowerTorso, character.RightUpperLeg, "RightHip", "BallSocket")
  560. end
  561.  
  562. function Ragdoll(Character2,CharTorso)
  563. Character2:BreakJoints()
  564. local hum = Character2:findFirstChild("Humanoid")
  565. hum:remove()
  566. local function Scan(ch)
  567. local e
  568. for e = 1,#ch do
  569. Scan(ch[e]:GetChildren())
  570. if ch[e].ClassName == "Weld" or ch[e].ClassName == "Motor6D" then
  571. ch[e]:remove()
  572. end
  573. end
  574. end
  575. local NEWHUM = IT("Humanoid")
  576. NEWHUM.Name = "Corpse"
  577. NEWHUM.Health = 0
  578. NEWHUM.MaxHealth = 0
  579. NEWHUM.PlatformStand = true
  580. NEWHUM.Parent = Character2
  581. NEWHUM.DisplayDistanceType = "None"
  582.  
  583. local ch = Character2:GetChildren()
  584. local i
  585. for i = 1,#ch do
  586. if ch[i].Name == "THandle1" or ch[i].Name == "THandle2" then
  587. ch[i]:remove()
  588. end
  589. end
  590.  
  591. local Torso2 = Character2.Torso
  592. local movevector = Vector3.new()
  593.  
  594. if Torso2 then
  595. movevector = CFrame.new(CharTorso.Position,Torso2.Position).lookVector
  596. local Head = Character2:FindFirstChild("Head")
  597. if Head then
  598. local Neck = Instance.new("Weld")
  599. Neck.Name = "Neck"
  600. Neck.Part0 = Torso2
  601. Neck.Part1 = Head
  602. Neck.C0 = CFrame.new(0, 1.5, 0)
  603. Neck.C1 = CFrame.new()
  604. Neck.Parent = Torso2
  605.  
  606. end
  607. local Limb = Character2:FindFirstChild("Right Arm")
  608. if Limb then
  609.  
  610. Limb.CFrame = Torso2.CFrame * CFrame.new(1.5, 0, 0)
  611. local Joint = Instance.new("Glue")
  612. Joint.Name = "RightShoulder"
  613. Joint.Part0 = Torso2
  614. Joint.Part1 = Limb
  615. Joint.C0 = CFrame.new(1.5, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  616. Joint.C1 = CFrame.new(-0, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  617. Joint.Parent = Torso2
  618.  
  619. local B = Instance.new("Part")
  620. B.TopSurface = 0
  621. B.BottomSurface = 0
  622. B.formFactor = "Symmetric"
  623. B.Size = Vector3.new(1, 1, 1)
  624. B.Transparency = 1
  625. B.CFrame = Limb.CFrame * CFrame.new(0, -0.5, 0)
  626. B.Parent = Character2
  627. local W = Instance.new("Weld")
  628. W.Part0 = Limb
  629. W.Part1 = B
  630. W.C0 = CFrame.new(0, -0.5, 0)
  631. W.Parent = Limb
  632.  
  633. end
  634. local Limb = Character2:FindFirstChild("Left Arm")
  635. if Limb then
  636.  
  637. Limb.CFrame = Torso2.CFrame * CFrame.new(-1.5, 0, 0)
  638. local Joint = Instance.new("Glue")
  639. Joint.Name = "LeftShoulder"
  640. Joint.Part0 = Torso2
  641. Joint.Part1 = Limb
  642. Joint.C0 = CFrame.new(-1.5, 0.5, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
  643. Joint.C1 = CFrame.new(0, 0.5, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
  644. Joint.Parent = Torso2
  645.  
  646. local B = Instance.new("Part")
  647. B.TopSurface = 0
  648. B.BottomSurface = 0
  649. B.formFactor = "Symmetric"
  650. B.Size = Vector3.new(1, 1, 1)
  651. B.Transparency = 1
  652. B.CFrame = Limb.CFrame * CFrame.new(0, -0.5, 0)
  653. B.Parent = Character2
  654. local W = Instance.new("Weld")
  655. W.Part0 = Limb
  656. W.Part1 = B
  657. W.C0 = CFrame.new(0, -0.5, 0)
  658. W.Parent = Limb
  659.  
  660. end
  661. local Limb = Character2:FindFirstChild("Right Leg")
  662. if Limb then
  663.  
  664. Limb.CFrame = Torso2.CFrame * CFrame.new(0.5, -2, 0)
  665. local Joint = Instance.new("Glue")
  666. Joint.Name = "RightHip"
  667. Joint.Part0 = Torso2
  668. Joint.Part1 = Limb
  669. Joint.C0 = CFrame.new(0.5, -1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  670. Joint.C1 = CFrame.new(0, 1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  671. Joint.Parent = Torso2
  672.  
  673. local B = Instance.new("Part")
  674. B.TopSurface = 0
  675. B.BottomSurface = 0
  676. B.formFactor = "Symmetric"
  677. B.Size = Vector3.new(1, 1, 1)
  678. B.Transparency = 1
  679. B.CFrame = Limb.CFrame * CFrame.new(0, -0.5, 0)
  680. B.Parent = Character2
  681. local W = Instance.new("Weld")
  682. W.Part0 = Limb
  683. W.Part1 = B
  684. W.C0 = CFrame.new(0, -0.5, 0)
  685. W.Parent = Limb
  686.  
  687. end
  688. local Limb = Character2:FindFirstChild("Left Leg")
  689. if Limb then
  690.  
  691. Limb.CFrame = Torso2.CFrame * CFrame.new(-0.5, -2, 0)
  692. local Joint = Instance.new("Glue")
  693. Joint.Name = "LeftHip"
  694. Joint.Part0 = Torso2
  695. Joint.Part1 = Limb
  696. Joint.C0 = CFrame.new(-0.5, -1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
  697. Joint.C1 = CFrame.new(-0, 1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
  698. Joint.Parent = Torso2
  699.  
  700. local B = Instance.new("Part")
  701. B.TopSurface = 0
  702. B.BottomSurface = 0
  703. B.formFactor = "Symmetric"
  704. B.Size = Vector3.new(1, 1, 1)
  705. B.Transparency = 1
  706. B.CFrame = Limb.CFrame * CFrame.new(0, -0.5, 0)
  707. B.Parent = Character2
  708. local W = Instance.new("Weld")
  709. W.Part0 = Limb
  710. W.Part1 = B
  711. W.C0 = CFrame.new(0, -0.5, 0)
  712. W.Parent = Limb
  713.  
  714. end
  715. --[
  716. local Bar = Instance.new("Part")
  717. Bar.TopSurface = 0
  718. Bar.BottomSurface = 0
  719. Bar.formFactor = "Symmetric"
  720. Bar.Size = Vector3.new(1, 1, 1)
  721. Bar.Transparency = 1
  722. Bar.CFrame = Torso2.CFrame * CFrame.new(0, 0.5, 0)
  723. Bar.Parent = Character2
  724. local Weld = Instance.new("Weld")
  725. Weld.Part0 = Torso2
  726. Weld.Part1 = Bar
  727. Weld.C0 = CFrame.new(0, 0.5, 0)
  728. Weld.Parent = Torso2
  729. --]]
  730. end
  731. Character2.Parent = workspace
  732. Debris:AddItem(Character2,5)
  733.  
  734. return Character2,Torso2
  735. end
  736.  
  737. function Taunt()
  738. ATTACK = true
  739. Rooted = true
  740. CreateSound("135557803", Head, 10, 1)
  741. for i=0, 1, 0.1 / Animation_Speed do
  742. Swait()
  743. RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.5 / Animation_Speed)
  744. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.5 / Animation_Speed)
  745. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.55, 0) * ANGLES(RAD(170), RAD(0), RAD(30)) * RIGHTSHOULDERC0, 0.5 / Animation_Speed)
  746. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.55, 0) * ANGLES(RAD(170), RAD(0), RAD(-30)) * LEFTSHOULDERC0, 0.5 / Animation_Speed)
  747. RightHip.C0 = Clerp(RightHip.C0, CF(1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), 0.5 / Animation_Speed)
  748. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), 0.5 / Animation_Speed)
  749. end
  750. wait(1)
  751. ATTACK = false
  752. Rooted = false
  753. end
  754.  
  755.  
  756. function Gottagofaster()
  757. CreateSound("537371462", Head, 10, 1)
  758. Humanoid.WalkSpeed = 46
  759. wait(8)
  760. Humanoid.WalkSpeed = 30
  761. end
  762.  
  763. function MouseDown(Mouse)
  764. HOLD = true
  765. if ATTACK == false then
  766. end
  767. end
  768.  
  769. function MouseUp(Mouse)
  770. HOLD = false
  771. end
  772.  
  773. function KeyDown(Key)
  774. KEYHOLD = true
  775. if Key == "t" and ATTACK == false then
  776. Taunt()
  777. end
  778.  
  779. if Key == "z" and ATTACK == false then
  780. Gottagofaster()
  781. end
  782. end
  783.  
  784. function KeyUp(Key)
  785. KEYHOLD = false
  786. end
  787.  
  788. Mouse.Button1Down:connect(function(NEWKEY)
  789. MouseDown(NEWKEY)
  790. end)
  791. Mouse.Button1Up:connect(function(NEWKEY)
  792. MouseUp(NEWKEY)
  793. end)
  794. Mouse.KeyDown:connect(function(NEWKEY)
  795. KeyDown(NEWKEY)
  796. end)
  797. Mouse.KeyUp:connect(function(NEWKEY)
  798. KeyUp(NEWKEY)
  799. end)
  800.  
  801.  
  802. Humanoid.Changed:connect(function(Jump)
  803. if Jump == "Jump" and (Disable_Jump == true) then
  804. Humanoid.Jump = false
  805. end
  806. end)
  807.  
  808. while true do
  809. Swait()
  810. script.Parent = WEAPONGUI
  811. ANIMATE.Parent = nil
  812. for _,v in next, Humanoid:GetPlayingAnimationTracks() do
  813. v:Stop();
  814. end
  815. SINE = SINE + CHANGE
  816. local TORSOVELOCITY = (RootPart.Velocity * VT(1, 0, 1)).magnitude
  817. local TORSOVERTICALVELOCITY = RootPart.Velocity.y
  818. local HITFLOOR = Raycast(RootPart.Position, (CF(RootPart.Position, RootPart.Position + VT(0, -1, 0))).lookVector, 4, Character)
  819. local WALKSPEEDVALUE = 6 / (Humanoid.WalkSpeed / 16)
  820. if ANIM == "Walk" and TORSOVELOCITY > 1 then
  821. 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)
  822. 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)
  823. 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)
  824. 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)
  825. elseif (ANIM ~= "Walk") or (TORSOVELOCITY < 1) then
  826. RootJoint.C1 = Clerp(RootJoint.C1, ROOTC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed)
  827. 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)
  828. 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)
  829. 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)
  830. end
  831. if TORSOVERTICALVELOCITY > 1 and HITFLOOR == nil then
  832. ANIM = "Jump"
  833. if PLAYANIMS == true then
  834. RootJoint.C0 = Clerp(RootJoint.C0, ROOTC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed)
  835. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(-20), RAD(0), RAD(0)), 0.2 / Animation_Speed)
  836. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(-40), RAD(0), RAD(20)) * RIGHTSHOULDERC0, 0.2 / Animation_Speed)
  837. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(-40), RAD(0), RAD(-20)) * LEFTSHOULDERC0, 0.2 / Animation_Speed)
  838. 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)
  839. 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)
  840. end
  841. elseif TORSOVERTICALVELOCITY < -1 and HITFLOOR == nil then
  842. ANIM = "Fall"
  843. if PLAYANIMS == true then
  844. RootJoint.C0 = Clerp(RootJoint.C0, ROOTC0 * CF(0, 0, 0 ) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed)
  845. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0 , 0 + ((1) - 1)) * ANGLES(RAD(20), RAD(0), RAD(0)), 0.2 / Animation_Speed)
  846. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(0), RAD(0), RAD(60)) * RIGHTSHOULDERC0, 0.2 / Animation_Speed)
  847. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(0), RAD(0), RAD(-60)) * LEFTSHOULDERC0, 0.2 / Animation_Speed)
  848. 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)
  849. 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)
  850. end
  851. elseif TORSOVELOCITY < 1 and HITFLOOR ~= nil then
  852. ANIM = "Idle"
  853. if PLAYANIMS == true then
  854. RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0 + 0.05 * COS(SINE / 12)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed)
  855. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(0 - 2.5 * SIN(SINE / 12)), RAD(0), RAD(0)), 0.15 / Animation_Speed)
  856. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(0), RAD(0), RAD(0)) * RIGHTSHOULDERC0, 0.15 / Animation_Speed)
  857. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(0), RAD(0), RAD(0)) * LEFTSHOULDERC0, 0.15 / Animation_Speed)
  858. RightHip.C0 = Clerp(RightHip.C0, CF(1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(80), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed)
  859. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(-80), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed)
  860. end
  861. elseif TORSOVELOCITY > 1 and HITFLOOR ~= nil then
  862. ANIM = "Walk"
  863. if PLAYANIMS == true then
  864. RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, -0.1) * ANGLES(RAD(35), RAD(0), RAD(5 * SIN(SINE / (WALKSPEEDVALUE / 2)))), 0.15 / Animation_Speed)
  865. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(-25 - 1 * SIN(SINE / (WALKSPEEDVALUE / 2))), RAD(0), RAD(-5 * SIN(SINE / (WALKSPEEDVALUE / 2)))), 0.15 / Animation_Speed)
  866. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, -0.2) * ANGLES(RAD(0), RAD(0), RAD(0)) * ANGLES(RAD(35+60 * COS(SINE / WALKSPEEDVALUE)), RAD(0), RAD(5)) * RIGHTSHOULDERC0,1/Animation_Speed)
  867. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, -0.2) * ANGLES(RAD(0), RAD(0), RAD(0)) * ANGLES(RAD(35-60 * COS(SINE / WALKSPEEDVALUE)), RAD(0), RAD(-5)) * LEFTSHOULDERC0, 1 / Animation_Speed)
  868. RightHip.C0 = Clerp(RightHip.C0, CF(1 , -1, 0) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(5)), 2 / Animation_Speed)
  869. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, 0) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(-5)), 2 / Animation_Speed)
  870. end
  871. end
  872. end
  873. unanchor()
  874. if Rooted == false then
  875. Disable_Jump = false
  876. Humanoid.WalkSpeed = Speed
  877. elseif Rooted == true then
  878. Disable_Jump = true
  879. Humanoid.WalkSpeed = 0
  880. end
  881. Character.Head.face.Texture = "rbxassetid://104824599"
  882. Humanoid.Health = Humanoid.Health + 1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement