Advertisement
HenloMyDude

wip fake char

Nov 1st, 2019
456
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 14.93 KB | None | 0 0
  1.  
  2. local plr = owner
  3. local char = plr.Character
  4. local FakeChar = char
  5. local Humanoid = char.Humanoid
  6. local hum = char.Humanoid
  7. local tors = char.Torso
  8. local root = char.HumanoidRootPart
  9. local ra = char["Right Arm"]
  10. local la = char["Left Arm"]
  11. local rl = char["Right Leg"]
  12. local ll = char["Left Leg"]
  13. local RightLeg = rl
  14. local LeftLeg = ll
  15. local Torso = tors
  16. local Bump = 0
  17. local Direction = "Idle"
  18. local Mid = 0.7
  19. local HP = 5
  20. local LandTimer = 4
  21. local Bla = false
  22. local Disable = false
  23. local Stuck = 25
  24. local FallTimer = 0
  25. local EmoteTimer = 0
  26.  
  27. for _,v in pairs (char:children()) do
  28. if v:IsA("Part") then
  29. v.Anchored = true
  30. end
  31. end
  32.  
  33. hum:SetStateEnabled("Dead", false)
  34. hum.WalkSpeed = 0
  35.  
  36. function NearNumber(a,b)
  37. if a + 0.375 >= b and a - 0.375 <= b then
  38. return true
  39. else
  40. return false
  41. end
  42. end
  43.  
  44. ezweld = function(p, a, b, cf)
  45. local weld = Instance.new("Weld",p)
  46. weld.Part0 = a
  47. weld.Part1 = b
  48. weld.C0 = cf
  49. return weld
  50. end
  51.  
  52. --[[
  53. local rl2 = Instance.new("Part",char)
  54. rl2.Name = "RL"
  55. rl2.Anchored = false
  56. rl2.Position = rl.Position
  57. rl2.Orientation = rl.Orientation
  58. rl2.Size = rl.Size
  59. local rl2j = ezweld(char, rl, rl2, CFrame.new())
  60.  
  61. local ll2 = Instance.new("Part",char)
  62. ll2.Name = "LL"
  63. ll2.Anchored = false
  64. ll2.Position = ll.Position
  65. ll2.Orientation = ll.Orientation
  66. ll2.Size = ll.Size
  67. local rl2j = ezweld(char, ll, ll2, CFrame.new())
  68. ]]--
  69.  
  70. local SoundA = Instance.new("Sound",script)
  71. SoundA.SoundId = "rbxasset://sounds/bass.mp3"
  72. SoundA.Volume = 0.35
  73. local SoundB = Instance.new("Sound",script)
  74. SoundB.SoundId = "rbxasset://sounds/electronicpingshort.wav"
  75. SoundB.Volume = 0.35
  76. local SoundC = Instance.new("Sound",script)
  77. SoundC.SoundId = "rbxasset://sounds/snap.mp3"
  78. SoundC.Volume = 0.35
  79.  
  80. function HitSound()
  81. for i = 1,10 do
  82. if SoundC and SoundC.Parent then
  83. SoundC.PlaybackSpeed = 1.5 - i * 0.1
  84. SoundC.TimePosition = 0.2
  85. SoundC:Play()
  86. end
  87. wait(0.04)
  88. end
  89. if SoundC and SoundC.Parent then
  90. SoundC:Stop()
  91. end
  92. end
  93. function BANG()
  94. for i = 1,2 do
  95. SoundC.PlaybackSpeed = 0.8
  96. SoundC.TimePosition = 0.2
  97. SoundC:Play()
  98. wait(0.06)
  99. end
  100. for i = 1,10 do
  101. if SoundC and SoundC.Parent then
  102. SoundC.PlaybackSpeed = 0.325 - i * 0.02
  103. SoundC.TimePosition = 0.2
  104. SoundC:Play()
  105. end
  106. wait(0.06)
  107. end
  108. if SoundC and SoundC.Parent then
  109. SoundC:Stop()
  110. end
  111. end
  112. function Kaboom()
  113. for i = 1,30 do
  114. if SoundC and SoundC.Parent then
  115. SoundC.PlaybackSpeed = 0.6 - i * 0.015
  116. SoundC.TimePosition = 0.2
  117. SoundC:Play()
  118. end
  119. wait(0.06)
  120. end
  121. if SoundC and SoundC.Parent then
  122. SoundC:Stop()
  123. end
  124. end
  125. function OW()
  126. for i = 1,3 do
  127. if SoundA then
  128. SoundA.PlaybackSpeed = 9 + i * 0.3
  129. SoundA.TimePosition = 0.2
  130. SoundA:Play()
  131. end
  132. wait(0.04)
  133. end
  134. for i = 1,4 do
  135. if SoundA then
  136. SoundA.PlaybackSpeed = 9.75 - i * 0.6
  137. SoundA.TimePosition = 0.2
  138. SoundA:Play()
  139. end
  140. wait(0.04)
  141. end
  142. if SoundA then
  143. SoundA:Stop()
  144. end
  145. end
  146. function AOW()
  147. for i = 1,40 do
  148. local P = 2.5 + (i + 38) * 0.15
  149. if i > 8 then
  150. P = 9 - (i - 4) * 0.15
  151. end
  152. if SoundA then
  153. SoundA.PlaybackSpeed = P
  154. SoundA.TimePosition = 0.2
  155. SoundA:Play()
  156. end
  157. wait(0.04)
  158. end
  159. if SoundA then
  160. SoundA:Stop()
  161. end
  162. end
  163. function Collide()
  164. for i = 1,3 do
  165. if SoundC and SoundC.Parent then
  166. SoundC.PlaybackSpeed = 1
  167. SoundC.TimePosition = 0.2
  168. SoundC:Play()
  169. end
  170. wait(0.04)
  171. end
  172. if SoundC and SoundC.Parent then
  173. SoundC:Stop()
  174. end
  175. end
  176. function FallSound()
  177. for i = 1,30 do
  178. if SoundB and SoundB.Parent then
  179. SoundB.PlaybackSpeed = 3 - i * 0.15
  180. SoundB.TimePosition = 0.2
  181. SoundB:Play()
  182. end
  183. wait(0.06)
  184. end
  185. if SoundB and SoundB.Parent then
  186. SoundB:Stop()
  187. end
  188. end
  189. function RecoverSound()
  190. for i = 1,15 do
  191. if SoundB and SoundB.Parent then
  192. SoundB.PlaybackSpeed = i * 0.3
  193. SoundB.TimePosition = 0.2
  194. SoundB:Play()
  195. end
  196. wait(0.06)
  197. end
  198. if SoundB and SoundB.Parent then
  199. SoundB:Stop()
  200. end
  201. end
  202.  
  203. function SwingSound()
  204. for i = 1,5 do
  205. if SoundC and SoundC.Parent then
  206. SoundC.PlaybackSpeed = 1 + i * 0.1
  207. SoundC.TimePosition = 0.2
  208. SoundC:Play()
  209. end
  210. wait(0.04)
  211. end
  212. if SoundC and SoundC.Parent then
  213. SoundC:Stop()
  214. end
  215. end
  216.  
  217. function jointontors()
  218. char.Head.CFrame = tors.CFrame * CFrame.new(0, 1.5, 0)
  219. ra.CFrame = tors.CFrame * CFrame.new(1.5, 0, 0)
  220. la.CFrame = tors.CFrame * CFrame.new(-1.5, 0, 0)
  221. rl.CFrame = tors.CFrame * CFrame.new(0.5, -2, 0)
  222. ll.CFrame = tors.CFrame * CFrame.new(-0.5, -2, 0)
  223. root.CFrame = tors.CFrame
  224. end
  225.  
  226. function NameMatch(a)
  227. local name = string.lower(a.Name)
  228. if name == "lava" or name == "hazard" or name == "spike" or name == "spikes" or name == "hurt" or name == "bomb" or name == "subspacetripmine" or name == "mine" or name == "damage" or name == "caltrop" or name == "acid" or name == "fire" or name == "ninjastickybomb" or name == "landmine" or name == "rocket" or name == "leftrocket" or name == "rightrocket" or name == "rocketclone" or name == "missile" or name == "hedgehog" or name == "blueblur" or name == "laser" or name == "kaboom" or name == "fusebomb" or name == "projectile" or name == "bullet" or name == "deadly" or name == "electric" or name == "electricity" or name == "flame" or name == "blade" or name == "sharp" or name == "explosion" then
  229. return true
  230. else
  231. return false
  232. end
  233. end
  234.  
  235. Head = char.Head
  236.  
  237. while true do
  238. wait()
  239. char:TranslateBy(hum.MoveDirection)
  240. tors.Orientation = Vector3.new(0, 90, 0)
  241. char.Head.CFrame = tors.CFrame * CFrame.new(0, 1.5, 0)
  242. jointontors()
  243. local Direction2 = hum.MoveDirection
  244. if HP > 0 and Humanoid.Jump and LandTimer > 0 and Bump <= 0 and (Direction == "Idle" or Disable == true) then
  245. Torso.Velocity = Vector3.new(Torso.Velocity.X,Torso.Velocity.Y + 50,Torso.Velocity.Z)
  246. LandTimer = 1
  247. FakeChar:TranslateBy(Vector3.new(0,0.2,0))
  248. local TouchLeg = false
  249. local LT = LeftLeg:GetTouchingParts()
  250. for i = 1,#LT do
  251. if LT[i] and LT[i].Parent ~= FakeChar and LT[i].CanCollide then
  252. TouchLeg = true
  253. end
  254. end
  255. local RT = RightLeg:GetTouchingParts()
  256. for i = 1,#RT do
  257. if RT[i] and RT[i].Parent ~= FakeChar and RT[i].CanCollide then
  258. TouchLeg = true
  259. end
  260. end
  261. if TouchLeg == false then
  262. delay(0,function()
  263. SwingSound()
  264. end)
  265. end
  266. end
  267. if NearNumber(Direction2.X,1) and NearNumber(Direction2.Z,0) then
  268. Direction = "Right"
  269. jointontors()
  270. elseif NearNumber(Direction2.X,Mid) and NearNumber(Direction2.Z,Mid) then
  271. Direction = "DownRight"
  272. jointontors()
  273. elseif NearNumber(Direction2.X,0) and NearNumber(Direction2.Z,1) then
  274. Direction = "Down"
  275. jointontors()
  276. elseif NearNumber(Direction2.X,-Mid) and NearNumber(Direction2.Z,Mid) then
  277. Direction = "DownLeft"
  278. jointontors()
  279. elseif NearNumber(Direction2.X,-1) and NearNumber(Direction2.Z,0) then
  280. Direction = "Left"
  281. jointontors()
  282. elseif NearNumber(Direction2.X,-Mid) and NearNumber(Direction2.Z,-Mid) then
  283. Direction = "UpLeft"
  284. jointontors()
  285. elseif NearNumber(Direction2.X,0) and NearNumber(Direction2.Z,-1) then
  286. Direction = "Up"
  287. jointontors()
  288. elseif NearNumber(Direction2.X,Mid) and NearNumber(Direction2.Z,-Mid) then
  289. Direction = "UpRight"
  290. jointontors()
  291. end
  292. if HP <= 0 then
  293. Direction = "Idle"
  294. end
  295. local Mv = 0.75
  296. local Movements = 10
  297. if LandTimer < 0 then
  298. Mv = 0.97
  299. Movements = 7
  300. end
  301. if Disable == false and Direction ~= "Idle" and Humanoid.Jump then
  302. Bla = true
  303. end
  304. Torso.Velocity = Vector3.new(Torso.Velocity.X * Mv,Torso.Velocity.Y,Torso.Velocity.Z * Mv)
  305. jointontors()
  306. if Direction == "Right" then
  307. Torso.Orientation = Vector3.new(0,270,0)
  308. if Bla == false and Bump <= 0 then
  309. Torso.Velocity = Torso.Velocity + Vector3.new(1,0,0) * Movements
  310. jointontors()
  311. end
  312. elseif Direction == "DownRight" then
  313. Torso.Orientation = Vector3.new(0,225,0)
  314. if Bla == false and Bump <= 0 then
  315. Torso.Velocity = Torso.Velocity + Vector3.new(Mid,0,Mid) * Movements
  316. jointontors()
  317. end
  318. elseif Direction == "Down" then
  319. Torso.Orientation = Vector3.new(0,180,0)
  320. if Bla == false and Bump <= 0 then
  321. Torso.Velocity = Torso.Velocity + Vector3.new(0,0,1) * Movements
  322. jointontors()
  323. end
  324. elseif Direction == "DownLeft" then
  325. Torso.Orientation = Vector3.new(0,135,0)
  326. if Bla == false and Bump <= 0 then
  327. Torso.Velocity = Torso.Velocity + Vector3.new(-Mid,0,Mid) * Movements
  328. jointontors()
  329. end
  330. elseif Direction == "Left" then
  331. Torso.Orientation = Vector3.new(0,90,0)
  332. if Bla == false and Bump <= 0 then
  333. Torso.Velocity = Torso.Velocity + Vector3.new(-1,0,0) * Movements
  334. jointontors()
  335. end
  336. elseif Direction == "UpLeft" then
  337. Torso.Orientation = Vector3.new(0,45,0)
  338. if Bla == false and Bump <= 0 then
  339. Torso.Velocity = Torso.Velocity + Vector3.new(-Mid,0,-Mid) * Movements
  340. jointontors()
  341. end
  342. elseif Direction == "Up" then
  343. Torso.Orientation = Vector3.new(0,0,0)
  344. if Bla == false and Bump <= 0 then
  345. Torso.Velocity = Torso.Velocity + Vector3.new(0,0,-1) * Movements
  346. jointontors()
  347. end
  348. elseif Direction == "UpRight" then
  349. Torso.Orientation = Vector3.new(0,315,0)
  350. if Bla == false and Bump <= 0 then
  351. Torso.Velocity = Torso.Velocity + Vector3.new(Mid,0,-Mid) * Movements
  352. jointontors()
  353. end
  354. end
  355. if LandTimer >= 0 or HP <= 0 then
  356. FallTimer = 0
  357. FallLoop = 0
  358. end
  359. LandTimer = LandTimer - 1
  360. EmoteTimer = EmoteTimer - 1
  361. local AlreadyCollided = false
  362. local HeadCollided = false
  363. local TorsoTouched = false
  364. for i = 1,20 do
  365. Torso.Velocity = Vector3.new(Torso.Velocity.X,Torso.Velocity.Y - game.Workspace.Gravity * 0.002,Torso.Velocity.Z)
  366. local T = Torso:GetTouchingParts()
  367. for i = 1,#T do
  368. if T[i] and string.lower(T[i].Name) == "heal" and HP < 5 and HP > 0 then
  369. HP = 5
  370. delay(0,function()
  371. RecoverSound()
  372. end)
  373. end
  374. if T[i] and T[i].Parent ~= FakeChar and ((T[i].CanCollide or NameMatch(T[i])) or (T[i].Size.Magnitude < 10 and T[i]:FindFirstChildWhichIsA("TouchTransmitter") and T[i].Name ~= "T")) then
  375. if T[i].CanCollide then
  376. TorsoTouched = true
  377. end
  378. if T[i].CanCollide and (T[i].Velocity - Torso.Velocity).Magnitude > 32 then
  379. Bump = 16
  380. delay(0,function()
  381. Collide()
  382. end)
  383. if HP > 0 then
  384. delay(0,function()
  385. OW()
  386. end)
  387. end
  388. end
  389. if NameMatch(T[i]) or (T[i].Size.Magnitude < 10 and T[i]:FindFirstChildWhichIsA("TouchTransmitter") and T[i].Name ~= "T") or (T[i].Velocity - Torso.Velocity).Magnitude > 160 then
  390. Hit = true
  391. if T[i].CanCollide and (T[i].Velocity - Torso.Velocity).Magnitude > 160 then
  392. Bump = 35
  393. end
  394. end
  395. if T[i].CanCollide and (T[i].Velocity - Torso.Velocity).Magnitude > 320 or string.lower(T[i].Name) == "blade" then
  396. ExtraHit = true
  397. end
  398. if T[i].CanCollide and AlreadyCollided == false then
  399. Torso.Velocity = T[i].Velocity - Torso.Velocity * 0.5
  400. if Stuck <= 19 then
  401. local MOV = (Torso.Position - T[i].Position)
  402. local mov = Vector3.new(MOV.X,0,MOV.Z).unit
  403. if MOV.Y > 0 then
  404. mov = mov + Vector3.new(0,0.5,0)
  405. end
  406. FakeChar:TranslateBy(Vector3.new(mov.X,mov.Y,mov.Z))
  407. end
  408. AlreadyCollided = true
  409. end
  410. end
  411. end
  412. if Bump < 0 and LandTimer < 0 then
  413. local HeadTouch = Head:GetTouchingParts()
  414. for i = 1,#HeadTouch do
  415. if HeadTouch[i] and HeadTouch[i].CanCollide == true and HeadTouch[i].Parent ~= FakeChar and HeadCollided == false then
  416. if (HeadTouch[i].Velocity - Torso.Velocity).Magnitude > 16 then
  417. delay(0,function()
  418. Collide()
  419. end)
  420. end
  421. if (HeadTouch[i].Velocity - Torso.Velocity).Magnitude > 32 then
  422. Bump = 16
  423. if HP > 0 then
  424. delay(0,function()
  425. OW()
  426. end)
  427. end
  428. HeadCollided = true
  429. end
  430. Torso.Velocity = Vector3.new(Torso.Velocity.X,-Torso.Velocity.Y,Torso.Velocity.Z)
  431. end
  432. end
  433. end
  434. local LT = LeftLeg:GetTouchingParts()
  435. for i = 1,#LT do
  436. if LT[i] and string.lower(LT[i].Name) == "heal" and HP < 5 and HP > 0 then
  437. HP = 5
  438. Bill3.StudsOffsetWorldSpace = Torso.Position
  439. Bill3.Size = UDim2.new(12,0,12,0)
  440. Image3.ImageColor3 = Torso.Color
  441. delay(0,function()
  442. RecoverSound()
  443. end)
  444. end
  445. if LT[i] and LT[i].Parent ~= FakeChar and ((LT[i].CanCollide or NameMatch(LT[i])) or (LT[i].Size.Magnitude < 10 and LT[i]:FindFirstChildWhichIsA("TouchTransmitter") and LT[i].Name ~= "T")) then
  446. if LT[i].CanCollide and (LT[i].Velocity - Torso.Velocity).Magnitude > 320 or string.lower(LT[i].Name) == "blade" then
  447. ExtraHit = true
  448. end
  449. if NameMatch(LT[i]) then
  450. Hit = true
  451. end
  452. if (LT[i].Velocity - Torso.Velocity).Magnitude > 160 then
  453. Hit = true
  454. if LT[i].CanCollide and AlreadyCollided == false then
  455. Torso.Velocity = LT[i].Velocity - Torso.Velocity * 0.5 + Vector3.new(0,10,0)
  456. Bump = 35
  457. if HP > 0 then
  458. delay(0,function()
  459. OW()
  460. end)
  461. end
  462. AlreadyCollided = true
  463. end
  464. elseif LT[i].CanCollide and AlreadyCollided == false then
  465. Torso.Velocity = Vector3.new(Torso.Velocity.X,Torso.Velocity.Y * 0.12,Torso.Velocity.Z) + LT[i].Velocity + Vector3.new(0,10,0)
  466. AlreadyCollided = true
  467. end
  468. if LT[i].CanCollide then
  469. LastStep = LT[i].BrickColor
  470. if LandTimer < 0 then
  471. delay(0,function()
  472. Collide()
  473. end)
  474. end
  475. LandTimer = 4
  476. end
  477. end
  478. end
  479. local RT = RightLeg:GetTouchingParts()
  480. for i = 1,#RT do
  481. if RT[i] and string.lower(RT[i].Name) == "heal" and HP < 5 and HP > 0 then
  482. HP = 5
  483. end
  484. if RT[i] and RT[i].Parent ~= FakeChar and ((RT[i].CanCollide or NameMatch(RT[i])) or (RT[i].Size.Magnitude < 10 and RT[i]:FindFirstChildWhichIsA("TouchTransmitter") and RT[i].Name ~= "T")) then
  485. if RT[i].CanCollide and (RT[i].Velocity - Torso.Velocity).Magnitude > 320 or string.lower(RT[i].Name) == "blade" then
  486. ExtraHit = true
  487. end
  488. if NameMatch(RT[i]) then
  489. Hit = true
  490. end
  491. if (RT[i].Velocity - Torso.Velocity).Magnitude > 160 then
  492. Hit = true
  493. if RT[i].CanCollide and AlreadyCollided == false then
  494. Torso.Velocity = RT[i].Velocity - Torso.Velocity * 0.5 + Vector3.new(0,10,0)
  495. Bump = 35
  496. if HP > 0 then
  497. delay(0,function()
  498. OW()
  499. end)
  500. end
  501. AlreadyCollided = true
  502. end
  503. elseif RT[i].CanCollide and AlreadyCollided == false then
  504. Torso.Velocity = Vector3.new(Torso.Velocity.X,Torso.Velocity.Y * 0.12,Torso.Velocity.Z) + RT[i].Velocity + Vector3.new(0,10,0)
  505. AlreadyCollided = true
  506. end
  507. if RT[i].CanCollide then
  508. LastStep = RT[i].BrickColor
  509. if LandTimer < 0 then
  510. delay(0,function()
  511. Collide()
  512. end)
  513. end
  514. LandTimer = 4
  515. end
  516. end
  517. end
  518. end
  519. jointontors()
  520. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement