sIendytubble

SLENDYTUBBIES new born script or whatever

May 27th, 2020
153
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 47.04 KB | None | 0 0
  1. if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
  2. local Player,game,owner = owner,game
  3. local RealPlayer = Player
  4. do
  5. print("FE Compatibility code by Mokiros")
  6. local rp = RealPlayer
  7. script.Parent = rp.Character
  8.  
  9. --RemoteEvent for communicating
  10. local Event = Instance.new("RemoteEvent")
  11. Event.Name = "UserInput_Event"
  12.  
  13. --Fake event to make stuff like Mouse.KeyDown work
  14. local function fakeEvent()
  15. local t = {_fakeEvent=true,Functions={},Connect=function(self,f)table.insert(self.Functions,f) end}
  16. t.connect = t.Connect
  17. return t
  18. end
  19.  
  20. --Creating fake input objects with fake variables
  21. local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent(),Button2Up=fakeEvent(),Button2Down=fakeEvent()}
  22. local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
  23. local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
  24. CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
  25. end}
  26. --Merged 2 functions into one by checking amount of arguments
  27. CAS.UnbindAction = CAS.BindAction
  28.  
  29. --This function will trigger the events that have been :Connect()'ed
  30. local function te(self,ev,...)
  31. local t = m[ev]
  32. if t and t._fakeEvent then
  33. for _,f in pairs(t.Functions) do
  34. f(...)
  35. end
  36. end
  37. end
  38. m.TrigEvent = te
  39. UIS.TrigEvent = te
  40.  
  41. Event.OnServerEvent:Connect(function(plr,io)
  42. if plr~=rp then return end
  43. m.Target = io.Target
  44. m.Hit = io.Hit
  45. if not io.isMouse then
  46. local b = io.UserInputState == Enum.UserInputState.Begin
  47. if io.UserInputType == Enum.UserInputType.MouseButton1 then
  48. return m:TrigEvent(b and "Button1Down" or "Button1Up")
  49. end
  50. if io.UserInputType == Enum.UserInputType.MouseButton2 then
  51. return m:TrigEvent(b and "Button2Down" or "Button2Up")
  52. end
  53. for _,t in pairs(CAS.Actions) do
  54. for _,k in pairs(t.Keys) do
  55. if k==io.KeyCode then
  56. t.Function(t.Name,io.UserInputState,io)
  57. end
  58. end
  59. end
  60. m:TrigEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
  61. UIS:TrigEvent(b and "InputBegan" or "InputEnded",io,false)
  62. end
  63. end)
  64. Event.Parent = NLS([==[
  65. local Player = game:GetService("Players").LocalPlayer
  66. local Event = script:WaitForChild("UserInput_Event")
  67. local Mouse = Player:GetMouse()
  68. local UIS = game:GetService("UserInputService")
  69. local input = function(io,a)
  70. if a then return end
  71. --Since InputObject is a client-side instance, we create and pass table instead
  72. Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState,Hit=Mouse.Hit,Target=Mouse.Target})
  73. end
  74. UIS.InputBegan:Connect(input)
  75. UIS.InputEnded:Connect(input)
  76. local h,t
  77. --Give the server mouse data 30 times every second, but only if the values changed
  78. --If player is not moving their mouse, client won't fire events
  79. while wait(1/30) do
  80. if h~=Mouse.Hit or t~=Mouse.Target then
  81. h,t=Mouse.Hit,Mouse.Target
  82. Event:FireServer({isMouse=true,Target=t,Hit=h})
  83. end
  84. end]==],Player.Character)
  85.  
  86. ----Sandboxed game object that allows the usage of client-side methods and services
  87. --Real game object
  88. local _rg = game
  89.  
  90. --Metatable for fake service
  91. local fsmt = {
  92. __index = function(self,k)
  93. local s = rawget(self,"_RealService")
  94. if s then
  95. return typeof(s[k])=="function"
  96. and function(_,...)return s[k](s,...)end or s[k]
  97. end
  98. end,
  99. __newindex = function(self,k,v)
  100. local s = rawget(self,"_RealService")
  101. if s then s[k]=v end
  102. end
  103. }
  104. local function FakeService(t,RealService)
  105. t._RealService = typeof(RealService)=="string" and _rg:GetService(RealService) or RealService
  106. return setmetatable(t,fsmt)
  107. end
  108.  
  109. --Fake game object
  110. local g = {
  111. GetService = function(self,s)
  112. return rawget(self,s) or _rg:GetService(s)
  113. end,
  114. Players = FakeService({
  115. LocalPlayer = FakeService({GetMouse=function(self)return m end},Player)
  116. },"Players"),
  117. UserInputService = FakeService(UIS,"UserInputService"),
  118. ContextActionService = FakeService(CAS,"ContextActionService"),
  119. RunService = FakeService({
  120. _btrs = {},
  121. RenderStepped = _rg:GetService("RunService").Heartbeat,
  122. BindToRenderStep = function(self,name,_,fun)
  123. self._btrs[name] = self.Heartbeat:Connect(fun)
  124. end,
  125. UnbindFromRenderStep = function(self,name)
  126. self._btrs[name]:Disconnect()
  127. end,
  128. },"RunService")
  129. }
  130. rawset(g.Players,"localPlayer",g.Players.LocalPlayer)
  131. g.service = g.GetService
  132. FakeService(g,game)
  133. --Changing owner to fake player object to support owner:GetMouse()
  134. game,owner = g,g.Players.LocalPlayer
  135. end
  136. new = game.Players.LocalPlayer
  137. born = new.Character
  138. function splatterdecal(part,decal)
  139. local numberat = 0
  140. a = 0
  141. a01 = "Front"
  142. a02 = "Bottom"
  143. a03 = "Left"
  144. a04 = "Right"
  145. a05 = "Top"
  146. a06 = "Bottom"
  147. for i = 1,6 do
  148. okayman = Instance.new("Decal",part)
  149. okayman.Texture = decal
  150. okayman.Face = a..numberat
  151. print(a..numberat)
  152. numberat = numberat + 1
  153. end
  154. end
  155. mas = born.Head
  156. mas:ClearAllChildren()
  157. for i,v in pairs(born:GetChildren()) do
  158. if v.ClassName == "Hat" or v.ClassName == "Accessory" then
  159. v:remove()
  160. end
  161. end
  162. for i,v in pairs(born:GetChildren()) do
  163. if v.ClassName == "CharacterMesh" then
  164. v:remove()
  165. end
  166. end
  167. function lerp(weld,startpos,endpos,amntime,longatend)
  168. local waited = 0
  169. for i=1,amntime*100 do
  170. if longatend == true then
  171. startpos = weld.C0
  172. end
  173. weld.C0 = startpos:lerp(endpos,i/(amntime*100))
  174. wait(0.01)
  175. waited=waited+0.01
  176. end
  177. end
  178. function toggletransparency1(part)
  179. if part then
  180. for i,v in pairs(part:GetChildren()) do
  181. if v.ClassName == "Texture" or v.ClassName == "Decal" then
  182. v.Transparency = 1
  183. end
  184. end
  185. part.Transparency = 1
  186. end
  187. end
  188. function toggletransparency0(part)
  189. if part then
  190. for i,v in pairs(part:GetChildren()) do
  191. if v.ClassName == "Texture" or v.ClassName == "Decal" then
  192. v.Transparency = 0
  193. end
  194. end
  195. part.Transparency = 0
  196. end
  197. end
  198. headswinging = false
  199. function katanaswing()
  200. if born then
  201. headbutting = true
  202. toggletransparency1(born.Torso)
  203. toggletransparency1(born.Head)
  204. toggletransparency0(head)
  205. toggletransparency0(torso)
  206. lerp(root,root.C0,CFrame.new(0, -1.5, 0) * CFrame.Angles(math.rad(100),math.rad(0),0),0.08)
  207. wait()
  208. wait()
  209. lerp(root,root.C0,CFrame.new(0, -1.5, 0) * CFrame.Angles(-math.rad(50),math.rad(0),0),0.08)
  210. headswinging = true
  211. lerp(root,root.C0,CFrame.new(0,-1,0),0.08)
  212. wait()
  213. toggletransparency0(born.Torso)
  214. toggletransparency0(born.Head)
  215. toggletransparency1(head)
  216. toggletransparency1(torso)
  217. headbutting = false
  218. headswinging = false
  219. end
  220. end
  221. SpecialMesh0 = Instance.new("SpecialMesh")
  222. SpecialMesh0.Parent = mas
  223. SpecialMesh0.MeshType = Enum.MeshType.Head
  224. SpecialMesh0.Scale = Vector3.new(1.25, 1.25, 1.25)
  225. Decal0 = Instance.new("Decal")
  226. Decal1 = Instance.new("Decal")
  227. Decal0.Parent = mas
  228. Decal0.Texture = "http://www.roblox.com/asset/?id=1354636022"
  229. Decal1.Parent = mas
  230. Decal1.Texture = "http://www.roblox.com/asset/?id=1354589055"
  231. Decal1.Face = Enum.NormalId.Right
  232. for i,v in pairs(born:GetChildren()) do
  233. if v.ClassName == "Part" and v.Name ~= "Head" and v.Name ~= "HumanoidRootPart" and v.Name ~= "Left Arm" and v.Name ~= "Right Arm" then
  234. splatterdecal(v,"http://www.roblox.com/asset/?id=1354589055")
  235. end
  236. end
  237. born["Left Arm"].Transparency = 1
  238. born["Right Arm"].Transparency = 1
  239. mouse = new:GetMouse()
  240. Sound0 = Instance.new("Sound")
  241. Sound0.Name = "runboi"
  242. Sound0.Parent = born.Head
  243. Sound0.Pitch = 2
  244. Sound0.PlaybackSpeed = 2
  245. Sound0.SoundId = "rbxassetid://1679435417"
  246. headbutting = false
  247. mouse.Button1Down:Connect(function()
  248. if headbutting == false then
  249. katanaswing()
  250. end
  251. end)
  252. anim = Instance.new("Animation",born)
  253. anim.AnimationId = "http://www.roblox.com/asset/?id=252557606"
  254. anim.Name = "RunAnim"
  255. NLS([[
  256. born = game.Players.LocalPlayer.Character
  257. ahahaha = born.Humanoid:LoadAnimation(born.RunAnim)
  258. local UserInputService = game:GetService("UserInputService")
  259. UserInputService.InputBegan:Connect(function(key)
  260. if key.KeyCode == Enum.KeyCode.LeftShift then
  261. born.Humanoid.WalkSpeed = 45
  262. ahahaha:Play()
  263. end
  264. end)
  265. UserInputService.InputEnded:Connect(function(key)
  266. if key.KeyCode == Enum.KeyCode.LeftShift then
  267. born.Humanoid.WalkSpeed = 16
  268. ahahaha:Stop()
  269. end
  270. end)
  271. ]],born)
  272. mouse.KeyDown:Connect(function(key)
  273. if key == "e" then
  274. Sound0:Play()
  275. end
  276. end)
  277. if born.Animate then
  278. born.Animate.run.RunAnim.AnimationId = "http://www.roblox.com/asset/?id=252557606"
  279. end
  280. coroutine.resume(coroutine.create(function()
  281. local Figure = born
  282. local Torso = Figure:WaitForChild("Torso")
  283. local RightShoulder = Torso:WaitForChild("Right Shoulder")
  284. local LeftShoulder = Torso:WaitForChild("Left Shoulder")
  285. local RightHip = Torso:WaitForChild("Right Hip")
  286. local LeftHip = Torso:WaitForChild("Left Hip")
  287. local Neck = Torso:WaitForChild("Neck")
  288. local Humanoid = Figure:WaitForChild("Humanoid")
  289. local pose = "Standing"
  290.  
  291. local currentAnim = ""
  292. local currentAnimInstance = nil
  293. local currentAnimTrack = nil
  294. local currentAnimKeyframeHandler = nil
  295. local currentAnimSpeed = 1.0
  296. local animTable = {}
  297. local animNames = {
  298. idle = {
  299. { id = "http://www.roblox.com/asset/?id=180435571", weight = 9 },
  300. { id = "http://www.roblox.com/asset/?id=180435792", weight = 1 }
  301. },
  302. walk = {
  303. { id = "http://www.roblox.com/asset/?id=180426354", weight = 10 }
  304. },
  305. run = {
  306. { id = "http://www.roblox.com/asset/?id=252557606", weight = 10 }
  307. },
  308. jump = {
  309. { id = "http://www.roblox.com/asset/?id=125750702", weight = 10 }
  310. },
  311. fall = {
  312. { id = "http://www.roblox.com/asset/?id=180436148", weight = 10 }
  313. },
  314. climb = {
  315. { id = "http://www.roblox.com/asset/?id=180436334", weight = 10 }
  316. },
  317. sit = {
  318. { id = "http://www.roblox.com/asset/?id=178130996", weight = 10 }
  319. },
  320. toolnone = {
  321. { id = "http://www.roblox.com/asset/?id=182393478", weight = 10 }
  322. },
  323. toolslash = {
  324. { id = "http://www.roblox.com/asset/?id=129967390", weight = 10 }
  325. -- { id = "slash.xml", weight = 10 }
  326. },
  327. toollunge = {
  328. { id = "http://www.roblox.com/asset/?id=129967478", weight = 10 }
  329. },
  330. wave = {
  331. { id = "http://www.roblox.com/asset/?id=128777973", weight = 10 }
  332. },
  333. point = {
  334. { id = "http://www.roblox.com/asset/?id=128853357", weight = 10 }
  335. },
  336. dance1 = {
  337. { id = "http://www.roblox.com/asset/?id=182435998", weight = 10 },
  338. { id = "http://www.roblox.com/asset/?id=182491037", weight = 10 },
  339. { id = "http://www.roblox.com/asset/?id=182491065", weight = 10 }
  340. },
  341. dance2 = {
  342. { id = "http://www.roblox.com/asset/?id=182436842", weight = 10 },
  343. { id = "http://www.roblox.com/asset/?id=182491248", weight = 10 },
  344. { id = "http://www.roblox.com/asset/?id=182491277", weight = 10 }
  345. },
  346. dance3 = {
  347. { id = "http://www.roblox.com/asset/?id=182436935", weight = 10 },
  348. { id = "http://www.roblox.com/asset/?id=182491368", weight = 10 },
  349. { id = "http://www.roblox.com/asset/?id=182491423", weight = 10 }
  350. },
  351. laugh = {
  352. { id = "http://www.roblox.com/asset/?id=129423131", weight = 10 }
  353. },
  354. cheer = {
  355. { id = "http://www.roblox.com/asset/?id=129423030", weight = 10 }
  356. },
  357. }
  358. local dances = {"dance1", "dance2", "dance3"}
  359.  
  360. -- Existance in this list signifies that it is an emote, the value indicates if it is a looping emote
  361. local emoteNames = { wave = false, point = false, dance1 = true, dance2 = true, dance3 = true, laugh = false, cheer = false}
  362.  
  363. function configureAnimationSet(name, fileList)
  364. if (animTable[name] ~= nil) then
  365. for _, connection in pairs(animTable[name].connections) do
  366. connection:disconnect()
  367. end
  368. end
  369. animTable[name] = {}
  370. animTable[name].count = 0
  371. animTable[name].totalWeight = 0
  372. animTable[name].connections = {}
  373.  
  374. -- check for config values
  375. local config = script:FindFirstChild(name)
  376. if (config ~= nil) then
  377. -- print("Loading anims " .. name)
  378. table.insert(animTable[name].connections, config.ChildAdded:connect(function(child) configureAnimationSet(name, fileList) end))
  379. table.insert(animTable[name].connections, config.ChildRemoved:connect(function(child) configureAnimationSet(name, fileList) end))
  380. local idx = 1
  381. for _, childPart in pairs(config:GetChildren()) do
  382. if (childPart:IsA("Animation")) then
  383. table.insert(animTable[name].connections, childPart.Changed:connect(function(property) configureAnimationSet(name, fileList) end))
  384. animTable[name][idx] = {}
  385. animTable[name][idx].anim = childPart
  386. local weightObject = childPart:FindFirstChild("Weight")
  387. if (weightObject == nil) then
  388. animTable[name][idx].weight = 1
  389. else
  390. animTable[name][idx].weight = weightObject.Value
  391. end
  392. animTable[name].count = animTable[name].count + 1
  393. animTable[name].totalWeight = animTable[name].totalWeight + animTable[name][idx].weight
  394. -- print(name .. " [" .. idx .. "] " .. animTable[name][idx].anim.AnimationId .. " (" .. animTable[name][idx].weight .. ")")
  395. idx = idx + 1
  396. end
  397. end
  398. end
  399.  
  400. -- fallback to defaults
  401. if (animTable[name].count <= 0) then
  402. for idx, anim in pairs(fileList) do
  403. animTable[name][idx] = {}
  404. animTable[name][idx].anim = Instance.new("Animation")
  405. animTable[name][idx].anim.Name = name
  406. animTable[name][idx].anim.AnimationId = anim.id
  407. animTable[name][idx].weight = anim.weight
  408. animTable[name].count = animTable[name].count + 1
  409. animTable[name].totalWeight = animTable[name].totalWeight + anim.weight
  410. -- print(name .. " [" .. idx .. "] " .. anim.id .. " (" .. anim.weight .. ")")
  411. end
  412. end
  413. end
  414.  
  415. -- Setup animation objects
  416. function scriptChildModified(child)
  417. local fileList = animNames[child.Name]
  418. if (fileList ~= nil) then
  419. configureAnimationSet(child.Name, fileList)
  420. end
  421. end
  422.  
  423. script.ChildAdded:connect(scriptChildModified)
  424. script.ChildRemoved:connect(scriptChildModified)
  425.  
  426.  
  427. for name, fileList in pairs(animNames) do
  428. configureAnimationSet(name, fileList)
  429. end
  430.  
  431. -- ANIMATION
  432.  
  433. -- declarations
  434. local toolAnim = "None"
  435. local toolAnimTime = 0
  436.  
  437. local jumpAnimTime = 0
  438. local jumpAnimDuration = 0.3
  439.  
  440. local toolTransitionTime = 0.1
  441. local fallTransitionTime = 0.3
  442. local jumpMaxLimbVelocity = 0.75
  443.  
  444. -- functions
  445.  
  446. function stopAllAnimations()
  447. local oldAnim = currentAnim
  448.  
  449. -- return to idle if finishing an emote
  450. if (emoteNames[oldAnim] ~= nil and emoteNames[oldAnim] == false) then
  451. oldAnim = "idle"
  452. end
  453.  
  454. currentAnim = ""
  455. currentAnimInstance = nil
  456. if (currentAnimKeyframeHandler ~= nil) then
  457. currentAnimKeyframeHandler:disconnect()
  458. end
  459.  
  460. if (currentAnimTrack ~= nil) then
  461. currentAnimTrack:Stop()
  462. currentAnimTrack:Destroy()
  463. currentAnimTrack = nil
  464. end
  465. return oldAnim
  466. end
  467.  
  468. function setAnimationSpeed(speed)
  469. if speed ~= currentAnimSpeed then
  470. currentAnimSpeed = speed
  471. currentAnimTrack:AdjustSpeed(currentAnimSpeed)
  472. end
  473. end
  474.  
  475. function keyFrameReachedFunc(frameName)
  476. if (frameName == "End") then
  477.  
  478. local repeatAnim = currentAnim
  479. -- return to idle if finishing an emote
  480. if (emoteNames[repeatAnim] ~= nil and emoteNames[repeatAnim] == false) then
  481. repeatAnim = "idle"
  482. end
  483.  
  484. local animSpeed = currentAnimSpeed
  485. playAnimation(repeatAnim, 0.0, Humanoid)
  486. setAnimationSpeed(animSpeed)
  487. end
  488. end
  489.  
  490. -- Preload animations
  491. function playAnimation(animName, transitionTime, humanoid)
  492.  
  493. local roll = math.random(1, animTable[animName].totalWeight)
  494. local origRoll = roll
  495. local idx = 1
  496. while (roll > animTable[animName][idx].weight) do
  497. roll = roll - animTable[animName][idx].weight
  498. idx = idx + 1
  499. end
  500. -- print(animName .. " " .. idx .. " [" .. origRoll .. "]")
  501. local anim = animTable[animName][idx].anim
  502.  
  503. -- switch animation
  504. if (anim ~= currentAnimInstance) then
  505.  
  506. if (currentAnimTrack ~= nil) then
  507. currentAnimTrack:Stop(transitionTime)
  508. currentAnimTrack:Destroy()
  509. end
  510.  
  511. currentAnimSpeed = 1.0
  512.  
  513. -- load it to the humanoid; get AnimationTrack
  514. currentAnimTrack = humanoid:LoadAnimation(anim)
  515. currentAnimTrack.Priority = Enum.AnimationPriority.Core
  516.  
  517. -- play the animation
  518. currentAnimTrack:Play(transitionTime)
  519. currentAnim = animName
  520. currentAnimInstance = anim
  521.  
  522. -- set up keyframe name triggers
  523. if (currentAnimKeyframeHandler ~= nil) then
  524. currentAnimKeyframeHandler:disconnect()
  525. end
  526. currentAnimKeyframeHandler = currentAnimTrack.KeyframeReached:connect(keyFrameReachedFunc)
  527.  
  528. end
  529.  
  530. end
  531.  
  532. -------------------------------------------------------------------------------------------
  533. -------------------------------------------------------------------------------------------
  534.  
  535. local toolAnimName = ""
  536. local toolAnimTrack = nil
  537. local toolAnimInstance = nil
  538. local currentToolAnimKeyframeHandler = nil
  539.  
  540. function toolKeyFrameReachedFunc(frameName)
  541. if (frameName == "End") then
  542. -- print("Keyframe : ".. frameName)
  543. playToolAnimation(toolAnimName, 0.0, Humanoid)
  544. end
  545. end
  546.  
  547.  
  548. function playToolAnimation(animName, transitionTime, humanoid, priority)
  549.  
  550. local roll = math.random(1, animTable[animName].totalWeight)
  551. local origRoll = roll
  552. local idx = 1
  553. while (roll > animTable[animName][idx].weight) do
  554. roll = roll - animTable[animName][idx].weight
  555. idx = idx + 1
  556. end
  557. -- print(animName .. " * " .. idx .. " [" .. origRoll .. "]")
  558. local anim = animTable[animName][idx].anim
  559.  
  560. if (toolAnimInstance ~= anim) then
  561.  
  562. if (toolAnimTrack ~= nil) then
  563. toolAnimTrack:Stop()
  564. toolAnimTrack:Destroy()
  565. transitionTime = 0
  566. end
  567.  
  568. -- load it to the humanoid; get AnimationTrack
  569. toolAnimTrack = humanoid:LoadAnimation(anim)
  570. if priority then
  571. toolAnimTrack.Priority = priority
  572. end
  573.  
  574. -- play the animation
  575. toolAnimTrack:Play(transitionTime)
  576. toolAnimName = animName
  577. toolAnimInstance = anim
  578.  
  579. currentToolAnimKeyframeHandler = toolAnimTrack.KeyframeReached:connect(toolKeyFrameReachedFunc)
  580. end
  581. end
  582.  
  583. function stopToolAnimations()
  584. local oldAnim = toolAnimName
  585.  
  586. if (currentToolAnimKeyframeHandler ~= nil) then
  587. currentToolAnimKeyframeHandler:disconnect()
  588. end
  589.  
  590. toolAnimName = ""
  591. toolAnimInstance = nil
  592. if (toolAnimTrack ~= nil) then
  593. toolAnimTrack:Stop()
  594. toolAnimTrack:Destroy()
  595. toolAnimTrack = nil
  596. end
  597.  
  598.  
  599. return oldAnim
  600. end
  601.  
  602. -------------------------------------------------------------------------------------------
  603. -------------------------------------------------------------------------------------------
  604.  
  605.  
  606. function onRunning(speed)
  607. if speed > 0.01 then
  608. playAnimation("walk", 0.1, Humanoid)
  609. if currentAnimInstance and currentAnimInstance.AnimationId == "http://www.roblox.com/asset/?id=252557606" then
  610. setAnimationSpeed(speed / 14.5)
  611. end
  612. pose = "Running"
  613. else
  614. if emoteNames[currentAnim] == nil then
  615. playAnimation("idle", 0.1, Humanoid)
  616. pose = "Standing"
  617. end
  618. end
  619. end
  620.  
  621. function onDied()
  622. pose = "Dead"
  623. end
  624.  
  625. function onJumping()
  626. playAnimation("jump", 0.1, Humanoid)
  627. jumpAnimTime = jumpAnimDuration
  628. pose = "Jumping"
  629. end
  630.  
  631. function onClimbing(speed)
  632. playAnimation("climb", 0.1, Humanoid)
  633. setAnimationSpeed(speed / 12.0)
  634. pose = "Climbing"
  635. end
  636.  
  637. function onGettingUp()
  638. pose = "GettingUp"
  639. end
  640.  
  641. function onFreeFall()
  642. if (jumpAnimTime <= 0) then
  643. playAnimation("fall", fallTransitionTime, Humanoid)
  644. end
  645. pose = "FreeFall"
  646. end
  647.  
  648. function onFallingDown()
  649. pose = "FallingDown"
  650. end
  651.  
  652. function onSeated()
  653. pose = "Seated"
  654. end
  655.  
  656. function onPlatformStanding()
  657. pose = "PlatformStanding"
  658. end
  659.  
  660. function onSwimming(speed)
  661. if speed > 0 then
  662. pose = "Running"
  663. else
  664. pose = "Standing"
  665. end
  666. end
  667.  
  668. function getTool()
  669. for _, kid in ipairs(Figure:GetChildren()) do
  670. if kid.className == "Tool" then return kid end
  671. end
  672. return nil
  673. end
  674.  
  675. function getToolAnim(tool)
  676. for _, c in ipairs(tool:GetChildren()) do
  677. if c.Name == "toolanim" and c.className == "StringValue" then
  678. return c
  679. end
  680. end
  681. return nil
  682. end
  683.  
  684. function animateTool()
  685.  
  686. if (toolAnim == "None") then
  687. playToolAnimation("toolnone", toolTransitionTime, Humanoid, Enum.AnimationPriority.Idle)
  688. return
  689. end
  690.  
  691. if (toolAnim == "Slash") then
  692. playToolAnimation("toolslash", 0, Humanoid, Enum.AnimationPriority.Action)
  693. return
  694. end
  695.  
  696. if (toolAnim == "Lunge") then
  697. playToolAnimation("toollunge", 0, Humanoid, Enum.AnimationPriority.Action)
  698. return
  699. end
  700. end
  701.  
  702. function moveSit()
  703. RightShoulder.MaxVelocity = 0.15
  704. LeftShoulder.MaxVelocity = 0.15
  705. RightShoulder:SetDesiredAngle(3.14 /2)
  706. LeftShoulder:SetDesiredAngle(-3.14 /2)
  707. RightHip:SetDesiredAngle(3.14 /2)
  708. LeftHip:SetDesiredAngle(-3.14 /2)
  709. end
  710.  
  711. local lastTick = 0
  712.  
  713. function move(time)
  714. local amplitude = 1
  715. local frequency = 1
  716. local deltaTime = time - lastTick
  717. lastTick = time
  718.  
  719. local climbFudge = 0
  720. local setAngles = false
  721.  
  722. if (jumpAnimTime > 0) then
  723. jumpAnimTime = jumpAnimTime - deltaTime
  724. end
  725.  
  726. if (pose == "FreeFall" and jumpAnimTime <= 0) then
  727. playAnimation("fall", fallTransitionTime, Humanoid)
  728. elseif (pose == "Seated") then
  729. playAnimation("sit", 0.5, Humanoid)
  730. return
  731. elseif (pose == "Running") then
  732. playAnimation("walk", 0.1, Humanoid)
  733. elseif (pose == "Dead" or pose == "GettingUp" or pose == "FallingDown" or pose == "Seated" or pose == "PlatformStanding") then
  734. -- print("Wha " .. pose)
  735. stopAllAnimations()
  736. amplitude = 0.1
  737. frequency = 1
  738. setAngles = true
  739. end
  740.  
  741. if (setAngles) then
  742. local desiredAngle = amplitude * math.sin(time * frequency)
  743.  
  744. RightShoulder:SetDesiredAngle(desiredAngle + climbFudge)
  745. LeftShoulder:SetDesiredAngle(desiredAngle - climbFudge)
  746. RightHip:SetDesiredAngle(-desiredAngle)
  747. LeftHip:SetDesiredAngle(-desiredAngle)
  748. end
  749.  
  750. -- Tool Animation handling
  751. local tool = getTool()
  752. if tool and tool:FindFirstChild("Handle") then
  753.  
  754. local animStringValueObject = getToolAnim(tool)
  755.  
  756. if animStringValueObject then
  757. toolAnim = animStringValueObject.Value
  758. -- message recieved, delete StringValue
  759. animStringValueObject.Parent = nil
  760. toolAnimTime = time + .3
  761. end
  762.  
  763. if time > toolAnimTime then
  764. toolAnimTime = 0
  765. toolAnim = "None"
  766. end
  767.  
  768. animateTool()
  769. else
  770. stopToolAnimations()
  771. toolAnim = "None"
  772. toolAnimInstance = nil
  773. toolAnimTime = 0
  774. end
  775. end
  776.  
  777. -- connect events
  778. Humanoid.Died:connect(onDied)
  779. Humanoid.Running:connect(onRunning)
  780. Humanoid.Jumping:connect(onJumping)
  781. Humanoid.Climbing:connect(onClimbing)
  782. Humanoid.GettingUp:connect(onGettingUp)
  783. Humanoid.FreeFalling:connect(onFreeFall)
  784. Humanoid.FallingDown:connect(onFallingDown)
  785. Humanoid.Seated:connect(onSeated)
  786. Humanoid.PlatformStanding:connect(onPlatformStanding)
  787. Humanoid.Swimming:connect(onSwimming)
  788.  
  789. -- setup emote chat hook
  790. --game:GetService("Players").LocalPlayer.Chatted:connect(function(msg)
  791. -- local emote = ""
  792. -- if msg == "/e dance" then
  793. -- emote = dances[math.random(1, #dances)]
  794. -- elseif (string.sub(msg, 1, 3) == "/e ") then
  795. -- emote = string.sub(msg, 4)
  796. -- elseif (string.sub(msg, 1, 7) == "/emote ") then
  797. -- emote = string.sub(msg, 8)
  798. -- end
  799. --
  800. -- if (pose == "Standing" and emoteNames[emote] ~= nil) then
  801. -- playAnimation(emote, 0.1, Humanoid)
  802. -- end
  803. --
  804. --end)
  805.  
  806.  
  807. -- main program
  808.  
  809. -- initialize to idle
  810. playAnimation("idle", 0.1, Humanoid)
  811. pose = "Standing"
  812.  
  813. while Figure.Parent ~= nil do
  814. local _, time = wait(0.1)
  815. move(time)
  816. end
  817.  
  818.  
  819.  
  820. end))
  821. --[[
  822. born.Archivable = true
  823. fakebody = born:Clone()
  824. fakebody.Parent = born
  825. for i,v in pairs(fakebody:GetChildren()) do
  826. if v.ClassName == "Part" and v.Name ~= "Head" and v.Name ~= "Torso" then
  827. v:remove()
  828. end
  829. end
  830. fakebodyweld = Instance.new("Weld",fakebody.Torso)
  831. fakebodyweld.Part0 = born.Torso
  832. fakebodyweld.Part1 = fakebody.Torso
  833. fakebodyweld.C0 = CFrame.new(0,-1,0)
  834. fakebodyweld.C1 = CFrame.new(0,-1,0)
  835.  
  836. --]]
  837. fakebody = Instance.new("Model",born)
  838. fakebody.Name = born.Name
  839. torso = Instance.new("Part",fakebody)
  840. head = Instance.new("Part",fakebody)
  841. head.Name = "Head"
  842. torso.Name = "Torso"
  843. torso.Size = Vector3.new(2, 2, 1)
  844. head.Size = Vector3.new(2, 1, 1)
  845. Instance.new("Humanoid",fakebody)
  846. neek = born.Torso.Neck:Clone()
  847. neek.Parent = torso
  848. neek.Part0 = torso
  849. neek.Part1 = head
  850. neek.C0 = born.Torso.Neck.C0
  851. neek.C1 = born.Torso.Neck.C1
  852. fakebody.Humanoid.PlatformStand = true
  853. for i,v in pairs(born:GetChildren()) do
  854. if v.ClassName == "Part" and v.Name == "Head" or v.Name == "Torso" then
  855. really = v
  856. for i,v in pairs(v:GetChildren()) do
  857. if v.ClassName ~= "Motor6D" then
  858. d = v:Clone()
  859. d.Parent = fakebody[really.Name]
  860. end
  861. end
  862. end
  863. end
  864. fakebodyweld = Instance.new("Weld",fakebody.Torso)
  865. fakebodyweld.Part0 = born.Torso
  866. fakebodyweld.Part1 = fakebody.Torso
  867. fakebodyweld.C0 = CFrame.new(0,-1,0)
  868. fakebodyweld.C1 = CFrame.new(0,-1,0)
  869. root = fakebodyweld
  870. local f = fakebodyweld.C0
  871. toggletransparency1(head)
  872. toggletransparency1(torso)
  873. head.Touched:Connect(function(hit)
  874. if hit.Parent:FindFirstChildOfClass("Humanoid") and not hit.Parent:FindFirstChild("DEADMIDGET") and headswinging == true then
  875. coroutine.resume(coroutine.create(function()
  876. target = hit.Parent
  877. for i,v in pairs(target:GetChildren()) do
  878. if v.ClassName == "Script" then
  879. v:remove()
  880. end
  881. end
  882. target.Humanoid.BreakJointsOnDeath = false
  883. target.Humanoid.Health = 0
  884. target.Archivable = true
  885. ragdoll = target:Clone()
  886. Humanoid = ragdoll.Humanoid
  887. player = target
  888. --[[
  889. if Humanoid.RigType == Enum.HumanoidRigType.R15 then
  890. player.Character.LeftLowerArm:remove()
  891. player.Character.RightLowerArm:remove()
  892. player.Character.LeftUpperArm:remove()
  893. player.Character.RightUpperArm:remove()
  894. player.Character.LeftLowerLeg:remove()
  895. player.Character.LeftUpperLeg:remove()
  896. player.Character.RightLowerLeg:remove()
  897. player.Character.RightUpperLeg:remove()
  898. player.Character.LowerTorso:remove()
  899. else
  900. player.Character["Right Arm"]:remove()
  901. player.Character["Left Arm"]:remove()
  902. player.Character["Left Leg"]:remove()
  903. player.Character["Right Leg"]:remove()
  904. end
  905. for i,v in pairs(target:GetChildren()) do
  906. if v.Name == "Head" or v.Name == "Torso" or v.Name == "UpperTorso" then
  907. weldo = Instance.new("Weld",v)
  908. weldo.Part0 = ragdoll[v.Name]
  909. weldo.Part1 = v
  910. end
  911. end
  912.  
  913. --]]
  914. target.Humanoid.Name = "DEADMIDGET"
  915. coroutine.resume(coroutine.create(function()
  916. if target:FindFirstChild("UpperTorso") then
  917. player.LeftLowerArm:remove()
  918. player.RightLowerArm:remove()
  919. player.LeftUpperArm:remove()
  920. player.RightUpperArm:remove()
  921. player.LeftLowerLeg:remove()
  922. player.LeftUpperLeg:remove()
  923. player.RightLowerLeg:remove()
  924. player.RightUpperLeg:remove()
  925. player.LowerTorso:remove()
  926. end
  927. end))
  928. coroutine.resume(coroutine.create(function()
  929. if target:FindFirstChild("Torso") then
  930. player["Right Arm"]:remove()
  931. player["Left Arm"]:remove()
  932. player["Left Leg"]:remove()
  933. player["Right Leg"]:remove()
  934. for i,v in pairs(player:GetChildren()) do
  935. if v.Name == "Head" or v.Name == "Torso" or v.Name == "UpperTorso" or v.Name == "HumanoidRootPart" then
  936. weldo = Instance.new("Weld",v)
  937. weldo.Part0 = ragdoll[v.Name]
  938. weldo.Part1 = v
  939. end
  940. end
  941. end
  942. end))
  943. coroutine.resume(coroutine.create(function()
  944. wait(math.random(1,3))
  945. local aidsificating = Humanoid.Parent
  946. local thang = "Torso"
  947. if aidsificating:FindFirstChild('UpperTorso') then
  948. thang = "UpperTorso"
  949. end
  950. end))
  951. ragdoll.Parent = workspace
  952. for i,v in pairs(target:GetChildren()) do
  953. if v.ClassName == "Script" then
  954. v:Destroy()
  955. end
  956. end
  957. target.Parent = ragdoll
  958. ragdoll.Name = ""
  959. target:FindFirstChildOfClass("Humanoid").PlatformStand = true
  960. target:FindFirstChildOfClass("Humanoid").BreakJointsOnDeath = false
  961. coroutine.resume(coroutine.create(function()
  962. while wait() do
  963. --target:FindFirstChildOfClass("Humanoid").Health = target:FindFirstChildOfClass("Humanoid").Health - 0.4
  964. end
  965. end))
  966. target:FindFirstChildOfClass("Humanoid").Died:Connect(function()
  967. ragdoll.Name = target.Name
  968. end)
  969. if Humanoid.RigType == Enum.HumanoidRigType.R15 then
  970. ragdoll.Humanoid.BreakJointsOnDeath=false
  971. ragdoll.Humanoid.Name = "DEADMIDGET"
  972. ragdoll:FindFirstChildOfClass("Humanoid").PlatformStand = true
  973. local function makeballconnections(limb, attachementone, attachmenttwo, twistlower, twistupper)
  974. local connection = Instance.new('BallSocketConstraint', limb)
  975. connection.LimitsEnabled = true
  976. connection.Attachment0 = attachementone
  977. connection.Attachment1 = attachmenttwo
  978. connection.TwistLimitsEnabled = true
  979. connection.TwistLowerAngle = twistlower
  980. connection.TwistUpperAngle = twistupper
  981. local limbcollider = Instance.new("Part", limb)
  982. limbcollider.Size = Vector3.new(0.1,1,1)
  983. limbcollider.Shape = "Cylinder"
  984. limbcollider.Transparency = 1
  985. limbcollider:BreakJoints()
  986. local limbcolliderweld = Instance.new("Weld", limbcollider)
  987. limbcolliderweld.Part0 = limb
  988. limbcolliderweld.Part1 = limbcollider
  989. limbcolliderweld.C0 = CFrame.fromEulerAnglesXYZ(0,0,math.pi/2)
  990. end
  991. local function makehingeconnections(limb, attachementone, attachmenttwo, lower, upper)
  992. local connection = Instance.new('HingeConstraint', limb)
  993. connection.LimitsEnabled = true
  994. connection.Attachment0 = attachementone
  995. connection.Attachment1 = attachmenttwo
  996. connection.LimitsEnabled = true
  997. connection.LowerAngle = lower
  998. connection.UpperAngle = upper
  999. local limbcollider = Instance.new("Part", limb)
  1000. limbcollider.Size = Vector3.new(0.1,1,1)
  1001. limbcollider.Shape = "Cylinder"
  1002. limbcollider.Transparency = 1
  1003. limbcollider:BreakJoints()
  1004. local limbcolliderweld = Instance.new("Weld", limbcollider)
  1005. limbcolliderweld.Part0 = limb
  1006. limbcolliderweld.Part1 = limbcollider
  1007. limbcolliderweld.C0 = CFrame.fromEulerAnglesXYZ(0,0,math.pi/2)
  1008. end
  1009. local HeadAttachment = Instance.new("Attachment", Humanoid.Parent.Head)
  1010. HeadAttachment.Position = Vector3.new(0, -0.5, 0)
  1011. if ragdoll.UpperTorso:findFirstChild("NeckAttachment") then
  1012. makehingeconnections(Humanoid.Parent.Head, HeadAttachment, ragdoll.UpperTorso.NeckAttachment, -50, 50)
  1013. end
  1014. function bleed(frick,OwO)
  1015. while frick.Parent ~= nil and frick.Parent.Parent ~= nil do
  1016. local reeee = coroutine.wrap(function()
  1017. local thing = Instance.new('Part',workspace)
  1018. thing.Size = Vector3.new(0.2,0.2,0.2)
  1019. thing.CFrame = frick.CFrame
  1020. thing.Transparency = 1
  1021. thing.BrickColor = BrickColor.new('Maroon')
  1022. thing.Material = Enum.Material.SmoothPlastic
  1023. thing.Name = "Blood"
  1024. thing.CanCollide =false
  1025. thing:BreakJoints()
  1026. local rawrxd = Instance.new('BodyForce',thing)
  1027. rawrxd.Force = frick.CFrame.upVector*(math.random()*2)+Vector3.new(math.random(-5, 5)/10,1.5,0)
  1028. local coru = coroutine.wrap(function()
  1029. wait(0.01)
  1030. rawrxd:Destroy()
  1031. end)
  1032. coru()
  1033. local ree = Instance.new('ParticleEmitter',thing)
  1034. if OwO ~= true then
  1035. ree.Color = ColorSequence.new({ColorSequenceKeypoint.new(0,Color3.fromRGB(117, 0, 0)),ColorSequenceKeypoint.new(1,Color3.fromRGB(117, 0, 0))})
  1036. else
  1037. ree.Color = ColorSequence.new({ColorSequenceKeypoint.new(0,Color3.fromRGB(117, 0, 0)),ColorSequenceKeypoint.new(1,Color3.fromRGB(117, 0, 0))})
  1038. end
  1039. ree.Size = NumberSequence.new({NumberSequenceKeypoint.new(0,0.1),NumberSequenceKeypoint.new(1,0.1)})
  1040. ree.Texture = 'rbxassetid://867743272'
  1041. ree.Lifetime = NumberRange.new(0.4)
  1042. ree.Rate = 50
  1043. ree.LockedToPart = true
  1044. ree.Speed = NumberRange.new(0, 2)
  1045. thing.Touched:connect(function(tou)
  1046. if tou.Parent and tou.Parent:IsA('Tool') == false and tou.Parent.Parent:FindFirstChildOfClass('Humanoid') == nil and tou.Parent:FindFirstChildOfClass('Humanoid') == nil and tou.Name ~= "Blood" and tou.Parent.Name ~= "Projectile" and tou.Parent.Name ~= "big ass knife" and tou.Parent.ClassName ~= "Accessory" and tou.Parent.Name ~= "bitch ass knife" and tou.Parent.Name ~= 'handle' and tou.Name ~= "blade" and tou.Name ~= 'handle' and tou.Name ~= "Projectile" and tou.Parent.Name ~= "Projectile" then
  1047. local pos = Vector3.new(thing.Position.X,(tou.Position.Y+(tou.Size.Y/2))+0.02,thing.Position.Z)
  1048. local Point1 = pos-Vector3.new(0.01,0.01,0.01)
  1049. local Point2 = pos+Vector3.new(0.01,0.01,0.01)
  1050. local Region = Region3.new(Point1,Point2)
  1051. for _,Part in pairs(game.Workspace:FindPartsInRegion3(Region,nil,math.huge)) do
  1052. if Part.Name == "BloodPuddle" then
  1053. tou = Part
  1054. end
  1055. end
  1056. thing:Destroy()
  1057. if tou.Name == "BloodPuddle" then
  1058. if tou.Size.X < 1 then
  1059. pcall(function()
  1060. tou.Sound:Play()
  1061. end)
  1062. end
  1063. local reee = tou.CFrame
  1064. if tou.Transparency > -0.2 then
  1065. tou.Transparency = tou.Transparency -0.1
  1066. end
  1067. if tou.Size.X < 3 then
  1068. tou.Size = tou.Size+Vector3.new(0.1,0,0.1)
  1069. tou.CFrame = reee
  1070. end
  1071. elseif tou.CanCollide == true then
  1072. local bloodlol = Instance.new('Part',workspace)
  1073. local sound = Instance.new('Sound',bloodlol)
  1074. sound.SoundId = 'rbxassetid://685857471'
  1075. sound.Volume = 0.025
  1076. sound:Play()
  1077. bloodlol.Size=Vector3.new(0.2,0.2,0.2)
  1078. bloodlol.Name = "BloodPuddle"
  1079. bloodlol.Anchored = true
  1080. bloodlol.CanCollide = false
  1081. bloodlol.Material = Enum.Material.SmoothPlastic
  1082. if OwO ~= true then
  1083. bloodlol.Color = Color3.fromRGB(117, 0, 0)
  1084. else
  1085. bloodlol.Color = Color3.fromRGB(117, 0, 0)
  1086. end
  1087. local cyl = Instance.new('CylinderMesh',bloodlol)
  1088. cyl.Scale = Vector3.new(1,0.1,1)
  1089. bloodlol.CFrame = CFrame.new(pos)
  1090. coroutine.resume(coroutine.create(function()
  1091. local tou = bloodlol
  1092. local reee = tou.CFrame
  1093. while wait() do
  1094. if tou.Size.X < 5 then
  1095. tou.Size = tou.Size+Vector3.new(0.005,0,0.005)
  1096. tou.CFrame = reee
  1097. end
  1098. end
  1099. end))
  1100. local coru=coroutine.wrap(function()
  1101. while bloodlol.Parent ~= nil do
  1102. if bloodlol.Transparency < 1 then
  1103. bloodlol.Transparency = bloodlol.Transparency+0.05
  1104. else
  1105. bloodlol:Destroy()
  1106. end
  1107. wait(0.1)
  1108. end
  1109. end)
  1110. end
  1111. end
  1112. end)
  1113. local coru = coroutine.wrap(function()
  1114. wait(1)
  1115. thing:Destroy()
  1116. end)
  1117. coru()
  1118. end)
  1119. reeee()
  1120. wait()
  1121. end
  1122. end
  1123.  
  1124. local aidsificating = Humanoid.Parent
  1125. local thang = "Torso"
  1126. if aidsificating:FindFirstChild('UpperTorso') then
  1127. thang = "UpperTorso"
  1128. end
  1129. makehingeconnections(Humanoid.Parent.LowerTorso, Humanoid.Parent.LowerTorso.WaistRigAttachment, Humanoid.Parent.UpperTorso.WaistRigAttachment, -50, 50)
  1130. makeballconnections(Humanoid.Parent.LeftUpperArm, Humanoid.Parent.LeftUpperArm.LeftShoulderRigAttachment, Humanoid.Parent.UpperTorso.LeftShoulderRigAttachment, -200, 200, 180)
  1131. makehingeconnections(Humanoid.Parent.LeftLowerArm, Humanoid.Parent.LeftLowerArm.LeftElbowRigAttachment, Humanoid.Parent.LeftUpperArm.LeftElbowRigAttachment, 0, -60)
  1132. makehingeconnections(Humanoid.Parent.LeftHand, Humanoid.Parent.LeftHand.LeftWristRigAttachment, Humanoid.Parent.LeftLowerArm.LeftWristRigAttachment, -20, 20)
  1133. --
  1134. makeballconnections(Humanoid.Parent.RightUpperArm, Humanoid.Parent.RightUpperArm.RightShoulderRigAttachment, Humanoid.Parent.UpperTorso.RightShoulderRigAttachment, -200, 200, 180)
  1135. makehingeconnections(Humanoid.Parent.RightLowerArm, Humanoid.Parent.RightLowerArm.RightElbowRigAttachment, Humanoid.Parent.RightUpperArm.RightElbowRigAttachment, 0, -60)
  1136. makehingeconnections(Humanoid.Parent.RightHand, Humanoid.Parent.RightHand.RightWristRigAttachment, Humanoid.Parent.RightLowerArm.RightWristRigAttachment, -20, 20)
  1137. --
  1138. makeballconnections(Humanoid.Parent.RightUpperLeg, Humanoid.Parent.RightUpperLeg.RightHipRigAttachment, Humanoid.Parent.LowerTorso.RightHipRigAttachment, -80, 80, 80)
  1139. makehingeconnections(Humanoid.Parent.RightLowerLeg, Humanoid.Parent.RightLowerLeg.RightKneeRigAttachment, Humanoid.Parent.RightUpperLeg.RightKneeRigAttachment, 0, 60)
  1140. makehingeconnections(Humanoid.Parent.RightFoot, Humanoid.Parent.RightFoot.RightAnkleRigAttachment, Humanoid.Parent.RightLowerLeg.RightAnkleRigAttachment, -20, 20)
  1141. --
  1142. makeballconnections(Humanoid.Parent.LeftUpperLeg, Humanoid.Parent.LeftUpperLeg.LeftHipRigAttachment, Humanoid.Parent.LowerTorso.LeftHipRigAttachment, -80, 80, 80)
  1143. makehingeconnections(Humanoid.Parent.LeftLowerLeg, Humanoid.Parent.LeftLowerLeg.LeftKneeRigAttachment, Humanoid.Parent.LeftUpperLeg.LeftKneeRigAttachment, 0, 60)
  1144. makehingeconnections(Humanoid.Parent.LeftFoot, Humanoid.Parent.LeftFoot.LeftAnkleRigAttachment, Humanoid.Parent.LeftLowerLeg.LeftAnkleRigAttachment, -20, 20)
  1145. for i,v in pairs(Humanoid.Parent:GetChildren()) do
  1146. if v.ClassName == "Accessory" then
  1147. local attachment1 = v.Handle:findFirstChildOfClass("Attachment")
  1148. if attachment1 then
  1149. for q,w in pairs(Humanoid.Parent:GetChildren()) do
  1150. if w.ClassName == "Part" then
  1151. local attachment2 = w:findFirstChild(attachment1.Name)
  1152. if attachment2 then
  1153. local hinge = Instance.new("HingeConstraint", v.Handle)
  1154. hinge.Attachment0 = attachment1
  1155. hinge.Attachment1 = attachment2
  1156. hinge.LimitsEnabled = true
  1157. hinge.LowerAngle = 0
  1158. hinge.UpperAngle = 0
  1159. end
  1160. end
  1161. end
  1162. end
  1163. end
  1164. end
  1165. for i,v in pairs(ragdoll:GetChildren()) do
  1166. for q,w in pairs(v:GetChildren()) do
  1167. if w.ClassName == "Motor6D"--[[ and w.Name ~= "Neck"--]] and w.Name ~= "ouch_weld" then
  1168. w:destroy()
  1169. end
  1170. end
  1171. end
  1172. if ragdoll:findFirstChild("HumanoidRootPart") then
  1173. ragdoll.HumanoidRootPart:destroy()
  1174. end
  1175. if ragdoll:findFirstChildOfClass("Humanoid") then
  1176. ragdoll:findFirstChildOfClass("Humanoid").PlatformStand = true
  1177. end
  1178. for i,v in pairs(player:GetChildren()) do
  1179. if v.Name == "Head" or v.Name == "Torso" or v.Name == "UpperTorso" then
  1180. weldo = Instance.new("Weld",v)
  1181. weldo.Part0 = ragdoll[v.Name]
  1182. weldo.Part1 = v
  1183. end
  1184. end
  1185. else
  1186.  
  1187. local c = ragdoll
  1188. function bleed(frick,OwO)
  1189. while frick.Parent ~= nil and frick.Parent.Parent ~= nil do
  1190. local reeee = coroutine.wrap(function()
  1191. local thing = Instance.new('Part',workspace)
  1192. thing.Size = Vector3.new(0.2,0.2,0.2)
  1193. thing.CFrame = frick.CFrame
  1194. thing.Transparency = 1
  1195. thing.BrickColor = BrickColor.new('Maroon')
  1196. thing.Material = Enum.Material.SmoothPlastic
  1197. thing.Name = "Blood"
  1198. thing.CanCollide =false
  1199. thing:BreakJoints()
  1200. local rawrxd = Instance.new('BodyForce',thing)
  1201. rawrxd.Force = frick.CFrame.upVector*(math.random()*2)+Vector3.new(math.random(-5, 5)/10,1.5,0)
  1202. local coru = coroutine.wrap(function()
  1203. wait(0.01)
  1204. rawrxd:Destroy()
  1205. end)
  1206. coru()
  1207. local ree = Instance.new('ParticleEmitter',thing)
  1208. if OwO ~= true then
  1209. ree.Color = ColorSequence.new({ColorSequenceKeypoint.new(0,Color3.fromRGB(117, 0, 0)),ColorSequenceKeypoint.new(1,Color3.fromRGB(117, 0, 0))})
  1210. else
  1211. ree.Color = ColorSequence.new({ColorSequenceKeypoint.new(0,Color3.fromRGB(117, 0, 0)),ColorSequenceKeypoint.new(1,Color3.fromRGB(117, 0, 0))})
  1212. end
  1213. ree.Size = NumberSequence.new({NumberSequenceKeypoint.new(0,0.1),NumberSequenceKeypoint.new(1,0.1)})
  1214. ree.Texture = 'rbxassetid://867743272'
  1215. ree.Lifetime = NumberRange.new(0.4)
  1216. ree.Rate = 50
  1217. ree.LockedToPart = true
  1218. ree.Speed = NumberRange.new(0, 2)
  1219. thing.Touched:connect(function(tou)
  1220. if tou.Parent and tou.Parent:IsA('Tool') == false and tou.Parent.Parent:FindFirstChildOfClass('Humanoid') == nil and tou.Parent:FindFirstChildOfClass('Humanoid') == nil and tou.Name ~= "Blood" and tou.Parent.Name ~= "Projectile" and tou.Parent.Name ~= "big ass knife" and tou.Parent.ClassName ~= "Accessory" and tou.Parent.Name ~= "bitch ass knife" and tou.Parent.Name ~= 'handle' and tou.Name ~= "blade" and tou.Name ~= 'handle' and tou.Name ~= "Projectile" and tou.Parent.Name ~= "Projectile" then
  1221. local pos = Vector3.new(thing.Position.X,(tou.Position.Y+(tou.Size.Y/2))+0.02,thing.Position.Z)
  1222. local Point1 = pos-Vector3.new(0.01,0.01,0.01)
  1223. local Point2 = pos+Vector3.new(0.01,0.01,0.01)
  1224. local Region = Region3.new(Point1,Point2)
  1225. for _,Part in pairs(game.Workspace:FindPartsInRegion3(Region,nil,math.huge)) do
  1226. if Part.Name == "BloodPuddle" then
  1227. tou = Part
  1228. end
  1229. end
  1230. thing:Destroy()
  1231. if tou.Name == "BloodPuddle" then
  1232. if tou.Size.X < 1 then
  1233. pcall(function()
  1234. tou.Sound:Play()
  1235. end)
  1236. end
  1237. local reee = tou.CFrame
  1238. if tou.Transparency > -0.2 then
  1239. tou.Transparency = tou.Transparency -0.1
  1240. end
  1241. if tou.Size.X < 3 then
  1242. tou.Size = tou.Size+Vector3.new(0.1,0,0.1)
  1243. tou.CFrame = reee
  1244. end
  1245. elseif tou.CanCollide == true then
  1246. local bloodlol = Instance.new('Part',workspace)
  1247. local sound = Instance.new('Sound',bloodlol)
  1248. sound.SoundId = 'rbxassetid://685857471'
  1249. sound.Volume = 0.025
  1250. sound:Play()
  1251. bloodlol.Size=Vector3.new(0.2,0.2,0.2)
  1252. bloodlol.Name = "BloodPuddle"
  1253. bloodlol.Anchored = true
  1254. bloodlol.CanCollide = false
  1255. bloodlol.Material = Enum.Material.SmoothPlastic
  1256. if OwO ~= true then
  1257. bloodlol.Color = Color3.fromRGB(117, 0, 0)
  1258. else
  1259. bloodlol.Color = Color3.fromRGB(117, 0, 0)
  1260. end
  1261. local cyl = Instance.new('CylinderMesh',bloodlol)
  1262. cyl.Scale = Vector3.new(1,0.1,1)
  1263. bloodlol.CFrame = CFrame.new(pos)
  1264. coroutine.resume(coroutine.create(function()
  1265. local tou = bloodlol
  1266. local reee = tou.CFrame
  1267. while wait() do
  1268. if tou.Size.X < 5 then
  1269. tou.Size = tou.Size+Vector3.new(0.005,0,0.005)
  1270. tou.CFrame = reee
  1271. end
  1272. end
  1273. end))
  1274. local coru=coroutine.wrap(function()
  1275. while bloodlol.Parent ~= nil do
  1276. if bloodlol.Transparency < 1 then
  1277. bloodlol.Transparency = bloodlol.Transparency+0.05
  1278. else
  1279. bloodlol:Destroy()
  1280. end
  1281. wait(0.1)
  1282. end
  1283. end)
  1284. end
  1285. end
  1286. end)
  1287. local coru = coroutine.wrap(function()
  1288. wait(1)
  1289. thing:Destroy()
  1290. end)
  1291. coru()
  1292. end)
  1293. reeee()
  1294. wait()
  1295. end
  1296. end
  1297.  
  1298. local aidsificating = Humanoid.Parent
  1299. local thang = "Torso"
  1300. if aidsificating:FindFirstChild('UpperTorso') then
  1301. thang = "UpperTorso"
  1302. end
  1303. ragdoll.Humanoid.BreakJointsOnDeath=false
  1304. ragdoll.Humanoid.Name = "DEADMIDGET"
  1305. ragdoll:FindFirstChildOfClass("Humanoid").PlatformStand = true
  1306. leftleg = Instance.new("Part",c["Left Leg"])
  1307. leftleg.Shape = "Cylinder"
  1308. leftleg.Transparency = 1
  1309. leftleg.Size=Vector3.new(1.4,1,1)
  1310. leftlegweld = Instance.new("Weld",leftleg)
  1311. leftlegweld.Part0=ragdoll["Left Leg"]
  1312. leftlegweld.Part1=leftleg
  1313. leftlegweld.C0=CFrame.fromEulerAnglesXYZ(0,0,math.pi/2) * CFrame.new(-0.3,0,0)
  1314. rightleg = Instance.new("Part",ragdoll["Right Leg"])
  1315. rightleg.Shape = "Cylinder"
  1316. rightleg.Size=Vector3.new(1.4,1,1)
  1317. rightleg.Transparency = 1
  1318. rightlegweld = Instance.new("Weld",leftleg)
  1319. rightlegweld.C0=CFrame.fromEulerAnglesXYZ(0,0,math.pi/2) * CFrame.new(-0.3,0,0)
  1320. rightlegweld.Part0=c["Right Leg"]
  1321. rightlegweld.Part1=rightleg
  1322. rightarm = Instance.new("Part",c["Right Arm"])
  1323. rightarm.Shape = "Cylinder"
  1324. rightarm.Size=Vector3.new(1.4,1,1)
  1325. rightarm.Transparency = 1
  1326. rightarmweld = Instance.new("Weld",rightarm)
  1327. rightarmweld.C0=CFrame.fromEulerAnglesXYZ(0,0,math.pi/2) * CFrame.new(-0.3,0,0)
  1328. rightarmweld.Part0=c["Right Arm"]
  1329. rightarmweld.Part1=rightarm
  1330. leftarm = Instance.new("Part",c["Left Arm"])
  1331. leftarm.Shape = "Cylinder"
  1332. leftarm.Size=Vector3.new(1.4,1,1)
  1333. leftarm.Transparency = 1
  1334. leftarmweld = Instance.new("Weld",leftarm)
  1335. leftarmweld.C0=CFrame.fromEulerAnglesXYZ(0,0,math.pi/2) * CFrame.new(-0.3,0,0)
  1336. leftarmweld.Part0=c["Left Arm"]
  1337. leftarmweld.Part1=leftarm
  1338. head = Instance.new("Part",c.Head)
  1339. head.Size=Vector3.new(1.4,1,1)
  1340. head.Transparency = 1
  1341. headweld = Instance.new("Weld",head)
  1342. headweld.Part0=c.Head
  1343. headweld.Part1=head
  1344. player = ragdoll
  1345. local RealTorso = player.Torso
  1346. local RealHead = player.Head
  1347. local RealLeftleg = player["Left Leg"]
  1348. local RealRightleg = player["Right Leg"]
  1349. local RealLeftArm = player["Left Arm"]
  1350. local RealRightArm = player["Right Arm"]
  1351. local rightarmglue = Instance.new("Glue", RealTorso)
  1352. rightarmglue.Part0 = RealTorso
  1353. rightarmglue.Part1 = RealRightArm
  1354. rightarmglue.C0 = CFrame.new(1.5, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)
  1355. rightarmglue.C1 = CFrame.new(0, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)
  1356. local leftarmglue = Instance.new("Glue", RealTorso)
  1357. leftarmglue.Part0 = RealTorso
  1358. leftarmglue.Part1 = RealLeftArm
  1359. leftarmglue.C0 = CFrame.new(-1.5, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  1360. leftarmglue.C1 = CFrame.new(0, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  1361. local leftlegglue = Instance.new("Glue", RealTorso)
  1362. leftlegglue.Part0 = RealTorso
  1363. leftlegglue.Part1 = RealLeftleg
  1364. leftlegglue.C0 = CFrame.new(-0.5, -1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
  1365. leftlegglue.C1 = CFrame.new(-0, 1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
  1366. local rightlegglue = Instance.new("Glue", RealTorso)
  1367. rightlegglue.Part0 = RealTorso
  1368. rightlegglue.Part1 = RealRightleg
  1369. rightlegglue.C0 = CFrame.new(0.5, -1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  1370. rightlegglue.C1 = CFrame.new(0, 1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  1371. local headglue = Instance.new("Glue", RealTorso)
  1372. headglue.Part0 = RealTorso
  1373. headglue.Part1 = RealHead
  1374. headglue.C0 = CFrame.new(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
  1375. headglue.C1 = CFrame.new(0, -0.5, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
  1376.  
  1377. RealTorso["Left Hip"]:Destroy()
  1378. RealTorso["Right Hip"]:Destroy()
  1379. RealTorso["Left Shoulder"]:Destroy()
  1380. RealTorso["Right Shoulder"]:Destroy()
  1381. RealTorso.Neck:Destroy()
  1382. RealTorso["Left Hip"]:Destroy()
  1383. RealTorso["Right Hip"]:Destroy()
  1384. RealTorso["Left Shoulder"]:Destroy()
  1385. RealTorso["Right Shoulder"]:Destroy()
  1386. RealTorso.Neck:Destroy()
  1387. RealTorso["Left Hip"]:Destroy()
  1388. RealTorso["Right Hip"]:Destroy()
  1389. RealTorso["Left Shoulder"]:Destroy()
  1390. RealTorso["Right Shoulder"]:Destroy()
  1391. RealTorso.Neck:Destroy()
  1392. RealTorso["Left Hip"]:Destroy()
  1393. RealTorso["Right Hip"]:Destroy()
  1394. RealTorso["Left Shoulder"]:Destroy()
  1395. RealTorso["Right Shoulder"]:Destroy()
  1396. RealTorso.Neck:Destroy()
  1397. RealTorso["Left Hip"]:Destroy()
  1398. RealTorso["Right Hip"]:Destroy()
  1399. RealTorso["Left Shoulder"]:Destroy()
  1400. RealTorso["Right Shoulder"]:Destroy()
  1401. RealTorso.Neck:Destroy()
  1402. for i,v in pairs(RealTorso:GetChildren()) do
  1403. if v.ClassName == "Motor6D" then
  1404. v:remove()
  1405. end
  1406. end
  1407. player.Humanoid.BreakJointsOnDeath = false
  1408. RealTorso.CanCollide = false
  1409. end
  1410. end))
  1411. for i,v in pairs(player:GetChildren()) do
  1412. if v.Name == "Head" or v.Name == "Torso" or v.Name == "UpperTorso" then
  1413. weldo = Instance.new("Weld",v)
  1414. weldo.Part0 = ragdoll[v.Name]
  1415. weldo.Part1 = v
  1416. end
  1417. end
  1418. end
  1419. end)
Add Comment
Please, Sign In to add comment