Advertisement
Kaemi

Mad noob spam knifer

Feb 23rd, 2018
159
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 22.50 KB | None | 0 0
  1. --encript
  2. sp = game.Players.LocalPlayer.Character
  3. sp.Head.face.Texture = "http://www.roblox.com/asset/?id=109676489"
  4. sp["Body Colors"].HeadColor = BrickColor.new("Bright yellow")
  5. sp["Body Colors"].TorsoColor = BrickColor.new("Bright blue")
  6. sp["Body Colors"].LeftArmColor = BrickColor.new("Bright yellow")
  7. sp["Body Colors"].RightArmColor = BrickColor.new("Bright yellow")
  8. sp["Body Colors"].LeftLegColor = BrickColor.new("Br. yellowish green")
  9. sp["Body Colors"].RightLegColor = BrickColor.new("Br. yellowish green")
  10. for _, v in pairs(sp:GetChildren()) do
  11. if v.ClassName == "Shirt" then
  12. v:remove()
  13. end
  14. end
  15. for _, v in pairs(sp:GetChildren()) do
  16. if v.ClassName == "Pants" then
  17. v:remove()
  18. end
  19. end
  20. for _, v in pairs(sp:GetChildren()) do
  21. if v.ClassName == "Accessory" then
  22. v:remove()
  23. end
  24. end
  25. function sandbox(var,func)
  26. local env = getfenv(func)
  27. local newenv = setmetatable({},{
  28. __index = function(self,k)
  29. if k=="script" then
  30. return var
  31. else
  32. return env[k]
  33. end
  34. end,
  35. })
  36. setfenv(func,newenv)
  37. return func
  38. end
  39. cors = {}
  40. mas = Instance.new("Model",game:GetService("Lighting"))
  41. Tool0 = Instance.new("Tool")
  42. BoolValue1 = Instance.new("BoolValue")
  43. BoolValue2 = Instance.new("BoolValue")
  44. BoolValue3 = Instance.new("BoolValue")
  45. BoolValue4 = Instance.new("BoolValue")
  46. Script5 = Instance.new("Script")
  47. LocalScript6 = Instance.new("LocalScript")
  48. LocalScript7 = Instance.new("LocalScript")
  49. LocalScript8 = Instance.new("LocalScript")
  50. Part9 = Instance.new("Part")
  51. Sound10 = Instance.new("Sound")
  52. Sound11 = Instance.new("Sound")
  53. Sound12 = Instance.new("Sound")
  54. SpecialMesh13 = Instance.new("SpecialMesh")
  55. Animation14 = Instance.new("Animation")
  56. Animation15 = Instance.new("Animation")
  57. Animation16 = Instance.new("Animation")
  58. Animation17 = Instance.new("Animation")
  59. Animation18 = Instance.new("Animation")
  60. Script19 = Instance.new("Script")
  61. Script20 = Instance.new("Script")
  62. Tool0.Name = "SpamKnife"
  63. Tool0.Parent = mas
  64. Tool0.TextureId = "http://www.roblox.com/asset?id=155344898"
  65. Tool0.GripPos = Vector3.new(0, -1, -0.100000001)
  66. BoolValue1.Name = "PlayDownStab"
  67. BoolValue1.Parent = Tool0
  68. BoolValue2.Name = "PlayStabPunch"
  69. BoolValue2.Parent = Tool0
  70. BoolValue3.Name = "PlayThrow"
  71. BoolValue3.Parent = Tool0
  72. BoolValue4.Name = "PlayThrowCharge"
  73. BoolValue4.Parent = Tool0
  74. Script5.Name = "SoundScript"
  75. Script5.Parent = Tool0
  76. table.insert(cors,sandbox(Script5,function()
  77. -- Waits for the child of the specified parent
  78. local function WaitForChild(parent, childName)
  79. while not parent:FindFirstChild(childName) do parent.ChildAdded:wait() end
  80. return parent[childName]
  81. end
  82.  
  83.  
  84. local Tool = script.Parent
  85. local Handle = WaitForChild(Tool, 'Handle')
  86. local Debounce = false
  87.  
  88. local TouchConnection
  89.  
  90.  
  91. function OnTouched(hit)
  92. local humanoid = hit.Parent:findFirstChild('Humanoid')
  93. if Debounce == false then
  94. Debounce = true
  95. if humanoid then
  96.  
  97. else
  98. Handle.Ting:Play()
  99. end
  100. end
  101. wait(0.5)
  102. Debounce = false
  103. end
  104.  
  105.  
  106. Tool.Equipped:connect(function()
  107. TouchConnection = Handle.Touched:connect(OnTouched)
  108. end)
  109.  
  110. Tool.Unequipped:connect(function()
  111. if TouchConnection then
  112. TouchConnection:disconnect()
  113. TouchConnection = nil
  114. end
  115. end)
  116.  
  117. end))
  118. LocalScript6.Name = "AnimationScript"
  119. LocalScript6.Parent = Tool0
  120. table.insert(cors,sandbox(LocalScript6,function()
  121. -- Waits for the child of the specified parent
  122. local function WaitForChild(parent, childName)
  123. while not parent:FindFirstChild(childName) do parent.ChildAdded:wait() end
  124. return parent[childName]
  125. end
  126.  
  127. local Tool = script.Parent
  128.  
  129. local downStabAnim
  130. local stabPunchAnim
  131. local throwAnim
  132. local throwChargeAnim
  133.  
  134. local MyHumanoid
  135.  
  136. -- This table will make sure that when we stop an animation it is
  137. -- because it is the only animation of it running
  138. local PlayCountTable = {}
  139.  
  140.  
  141. local function PlayAnimation(animation, valueToCheck, animationLength)
  142. if valueToCheck and valueToCheck.Value then
  143. if MyHumanoid then
  144. animation:Play()
  145. if PlayCountTable[animation] then
  146. PlayCountTable[animation] = PlayCountTable[animation] + 1
  147. end
  148. -- wait the duration of the animation
  149. if animationLength then
  150. wait(animationLength)
  151. if PlayCountTable[animation] then
  152. PlayCountTable[animation] = PlayCountTable[animation] - 1
  153. if PlayCountTable[animation] == 0 then
  154. animation:Stop()
  155. end
  156. end
  157. end
  158. end
  159. end
  160. end
  161.  
  162. function OnEquipped()
  163. MyHumanoid = Tool.Parent:FindFirstChild('Humanoid')
  164. downStabAnim = MyHumanoid:LoadAnimation(WaitForChild(Tool, 'DownStab'))
  165. PlayCountTable[downStabAnim] = 0
  166. stabPunchAnim = MyHumanoid:LoadAnimation(WaitForChild(Tool, 'StabPunch'))
  167. PlayCountTable[stabPunchAnim] = 0
  168. throwAnim = MyHumanoid:LoadAnimation(WaitForChild(Tool, 'Throw'))
  169. PlayCountTable[throwAnim] = 0
  170. throwChargeAnim = MyHumanoid:LoadAnimation(WaitForChild(Tool, 'ThrowCharge'))
  171. PlayCountTable[throwChargeAnim] = 0
  172.  
  173.  
  174. local playStabPunch = WaitForChild(Tool, 'PlayStabPunch')
  175. local playDownStab = WaitForChild(Tool, 'PlayDownStab')
  176. local playThrow = WaitForChild(Tool, 'PlayThrow')
  177. local playThrowCharge = WaitForChild(Tool, 'PlayThrowCharge')
  178.  
  179. playStabPunch.Changed:connect(function() PlayAnimation(stabPunchAnim, playStabPunch, 1.0) end)
  180. playDownStab.Changed:connect(function() PlayAnimation(downStabAnim, playDownStab, 1.0) end)
  181. playThrow.Changed:connect(function() PlayAnimation(throwAnim, playThrow, 1.5) end)
  182. playThrowCharge.Changed:connect(function(value)
  183. if value then
  184. PlayAnimation(throwChargeAnim, playThrowCharge, 1.0)
  185. else
  186. throwChargeAnim:Stop()
  187. end
  188. end)
  189. end
  190.  
  191. function OnUnequipped()
  192. if downStabAnim then
  193. downStabAnim:Stop()
  194. downStabAnim = nil
  195. end
  196. if stabPunchAnim then
  197. stabPunchAnim:Stop()
  198. stabPunchAnim = nil
  199. end
  200. if throwAnim then
  201. throwAnim:Stop()
  202. throwAnim = nil
  203. end
  204. if throwChargeAnim then
  205. throwChargeAnim:Stop()
  206. throwChargeAnim = nil
  207. end
  208. PlayCountTable = {}
  209. end
  210.  
  211. Tool.Equipped:connect(OnEquipped)
  212. Tool.Unequipped:connect(OnUnequipped)
  213.  
  214.  
  215. end))
  216. LocalScript7.Name = "BladeGui"
  217. LocalScript7.Parent = Tool0
  218. table.insert(cors,sandbox(LocalScript7,function()
  219. local Tool = script.Parent
  220.  
  221. function OnButton1Down(mouse)
  222. if Tool.Enabled then
  223. mouse.Icon = 'http://www.roblox.com/asset/?id=54019936'
  224. else
  225. mouse.Icon = 'http://www.roblox.com/asset/?id=54019936'
  226. end
  227. while not Tool.Enabled do
  228. Tool.Changed:wait()
  229. end
  230. if Tool.Enabled then
  231. mouse.Icon = 'http://www.roblox.com/asset/?id=54019936'
  232. end
  233. end
  234.  
  235. function OnEquipped(mouse)
  236. if mouse == nil then
  237. print("Mouse not found")
  238. return
  239. end
  240.  
  241. mouse.Icon = 'http://www.roblox.com/asset/?id=54019936'
  242. mouse.Button1Down:connect(function() OnButton1Down(mouse) end)
  243. end
  244.  
  245.  
  246. Tool.Equipped:connect(OnEquipped)
  247.  
  248. end))
  249. LocalScript8.Name = "KnifeScript"
  250. LocalScript8.Parent = Tool0
  251. table.insert(cors,sandbox(LocalScript8,function()
  252. --------------------- TEMPLATE BLADE WEAPON ---------------------------
  253. -- Waits for the child of the specified parent
  254. local function WaitForChild(parent, childName)
  255. while not parent:FindFirstChild(childName) do parent.ChildAdded:wait() end
  256. return parent[childName]
  257. end
  258.  
  259.  
  260. local SLASH_DAMAGE = 20
  261. local DOWNSTAB_DAMAGE = 35
  262. local THROWING_DAMAGE = 40
  263. local HOLD_TO_THROW_TIME = 0
  264.  
  265.  
  266. local Damage = 20
  267.  
  268. local MyHumanoid = nil
  269. local MyTorso = nil
  270. local MyCharacter = nil
  271. local MyPlayer = nil
  272.  
  273. local Tool = script.Parent
  274. local Handle = WaitForChild(Tool, 'Handle')
  275.  
  276. local BlowConnection
  277. local Button1DownConnection
  278. local Button1UpConnection
  279.  
  280. local PlayStabPunch
  281. local PlayDownStab
  282. local PlayThrow
  283. local PlayThrowCharge
  284.  
  285. local IconUrl = Tool.TextureId -- URL to the weapon knife icon asset
  286.  
  287. local DebrisService = game:GetService('Debris')
  288. local PlayersService = game:GetService('Players')
  289.  
  290. local SlashSound
  291.  
  292. local HitPlayers = {}
  293.  
  294. local LeftButtonDownTime = nil
  295.  
  296. local Attacking = false
  297.  
  298. function Blow(hit)
  299. if Attacking then
  300. BlowDamage(hit, Damage)
  301. end
  302. end
  303.  
  304. function BlowDamage(hit, damage)
  305. local humanoid = hit.Parent:FindFirstChild('Humanoid')
  306. local player = PlayersService:GetPlayerFromCharacter(hit.Parent)
  307. if humanoid ~= nil and MyHumanoid ~= nil and humanoid ~= MyHumanoid then
  308. if not MyPlayer.Neutral then
  309. -- Ignore teammates hit
  310. if player and player ~= MyPlayer and player.TeamColor == MyPlayer.TeamColor then
  311. return
  312. end
  313. end
  314. -- final check, make sure weapon is in-hand
  315. local rightArm = MyCharacter:FindFirstChild('Right Arm')
  316. if (rightArm ~= nil) then
  317. -- Check if the weld exists between the hand and the weapon
  318. local joint = rightArm:FindFirstChild('RightGrip')
  319. if (joint ~= nil and (joint.Part0 == Handle or joint.Part1 == Handle)) then
  320. -- Make sure you only hit them once per swing
  321. TagHumanoid(humanoid, MyPlayer)
  322. print("Sending " .. damage)
  323.  
  324. local checksound = humanoid.Parent:findFirstChild("Sound")
  325. if checksound == nil then
  326. local givesound = script.Parent.Sound:clone()
  327. givesound.Parent = humanoid.Parent
  328. givesound.Disabled = false
  329. else
  330. checksound:remove()
  331. local givesound = script.Parent.Sound:clone()
  332. givesound.Parent = humanoid.Parent
  333. givesound.Disabled = false
  334. end
  335. wait()
  336. humanoid.Parent:BreakJoints()
  337. if humanoid.Health == math.huge or humanoid.MaxHealth == math.huge then
  338. humanoid.Parent:BreakJoints()
  339. end
  340. end
  341. end
  342. end
  343. end
  344.  
  345. function TagHumanoid(humanoid, player)
  346. -- Add more tags here to customize what tags are available.
  347. while humanoid:FindFirstChild('creator') do
  348. humanoid:FindFirstChild('creator'):Destroy()
  349. end
  350.  
  351. local creatorTag = Instance.new('ObjectValue')
  352. creatorTag.Value = player
  353. creatorTag.Name = 'creator'
  354. creatorTag.Parent = humanoid
  355. DebrisService:AddItem(creatorTag, 1.5)
  356.  
  357. local weaponIconTag = Instance.new('StringValue')
  358. weaponIconTag.Value = IconUrl
  359. weaponIconTag.Name = 'icon'
  360. weaponIconTag.Parent = creatorTag
  361. DebrisService:AddItem(weaponIconTag, 1.5)
  362. end
  363.  
  364. function HardAttack()
  365. Damage = SLASH_DAMAGE
  366. HitSound:play()
  367. if PlayStabPunch then
  368. PlayStabPunch.Value = true
  369. wait(1.0)
  370. PlayStabPunch.Value = false
  371. end
  372. end
  373.  
  374. function NormalAttack()
  375. Damage = DOWNSTAB_DAMAGE
  376. KnifeDown()
  377. HitSound:play()
  378. if PlayDownStab then
  379. PlayDownStab.Value = true
  380. wait(1.0)
  381. PlayDownStab.Value = false
  382. end
  383. KnifeUp()
  384. end
  385.  
  386. function ThrowAttack()
  387. KnifeOut()
  388. if PlayThrow then
  389. PlayThrow.Value = true
  390. wait()
  391. if not Handle then return end
  392. local throwingHandle = Handle:Clone()
  393. DebrisService:AddItem(throwingHandle, 5)
  394. throwingHandle.Parent = game.Workspace
  395. if MyCharacter and MyHumanoid then
  396. throwingHandle.Velocity = (MyHumanoid.TargetPoint - throwingHandle.CFrame.p).unit * 100
  397. -- set the orientation to the direction it is being thrown in
  398. throwingHandle.CFrame = CFrame.new(throwingHandle.CFrame.p, throwingHandle.CFrame.p + throwingHandle.Velocity) * CFrame.Angles(0, 0, math.rad(-90))
  399. local floatingForce = Instance.new('BodyForce', throwingHandle)
  400. floatingForce.force = Vector3.new(0, 196.2 * throwingHandle:GetMass() * 0.98, 0)
  401. local spin = Instance.new('BodyAngularVelocity', throwingHandle)
  402. spin.angularvelocity = throwingHandle.CFrame:vectorToWorldSpace(Vector3.new(0, -400, 0))
  403. end
  404. Handle.Transparency = 1
  405. -- Wait so that the knife has left the thrower's general area
  406. wait()
  407. if throwingHandle then
  408. local Throwevent = script.Parent.ThrowHandleHitWeld:Clone()
  409. Throwevent.Parent = throwingHandle
  410. Throwevent.Disabled = false
  411. local touchedConn = throwingHandle.Touched:connect(function(hit) print("hit throw") BlowDamage(hit, THROWING_DAMAGE) end)
  412. end
  413. -- must check if it still exists since we waited
  414. if throwingHandle then
  415. throwingHandle.CanCollide = true
  416. end
  417. wait()
  418. if Handle and PlayThrow then
  419. Handle.Transparency = 0
  420. PlayThrow.Value = false
  421. end
  422. end
  423. KnifeUp()
  424. end
  425.  
  426. function KnifeUp()
  427. Tool.GripForward = Vector3.new(0,0,-1)
  428. Tool.GripRight = Vector3.new(1,0,0)
  429. Tool.GripUp = Vector3.new(0,1,0)
  430. end
  431.  
  432. function KnifeDown()
  433. Tool.GripForward = Vector3.new(0,0,-1)
  434. Tool.GripRight = Vector3.new(1,0,0)
  435. Tool.GripUp = Vector3.new(0,-1,0)
  436. end
  437.  
  438. function KnifeOut()
  439. Tool.GripForward = Vector3.new(0,0,-1)
  440. Tool.GripRight = Vector3.new(1,0,0)
  441. Tool.GripUp = Vector3.new(0,1,0)
  442. end
  443.  
  444. Tool.Enabled = true
  445.  
  446. function OnLeftButtonDown()
  447. LeftButtonDownTime = time()
  448. if PlayThrowCharge then
  449. PlayThrowCharge.Value = true
  450. end
  451. end
  452.  
  453. function OnLeftButtonUp()
  454. if not Tool.Enabled then return end
  455. -- Reset the list of hit players every time we start a new attack
  456. HitPlayers = {}
  457. if PlayThrowCharge then
  458. PlayThrowCharge.Value = false
  459. end
  460. if Tool.Enabled and MyHumanoid and MyHumanoid.Health > 0 then
  461. Tool.Enabled = false
  462. local currTime = time()
  463. if LeftButtonDownTime and currTime - LeftButtonDownTime > HOLD_TO_THROW_TIME and
  464. currTime - LeftButtonDownTime < 1.15 then
  465. ThrowAttack()
  466. else
  467. Attacking = true
  468. if math.random(1, 2) == 1 then
  469. HardAttack()
  470. else
  471. NormalAttack()
  472. end
  473. Attacking = false
  474. end
  475. Tool.Enabled = true
  476. end
  477. end
  478.  
  479. function OnEquipped(mouse)
  480. PlayStabPunch = WaitForChild(Tool, 'PlayStabPunch')
  481. PlayDownStab = WaitForChild(Tool, 'PlayDownStab')
  482. PlayThrow = WaitForChild(Tool, 'PlayThrow')
  483. PlayThrowCharge = WaitForChild(Tool, 'PlayThrowCharge')
  484. SlashSound = WaitForChild(Handle, 'Swoosh1')
  485. HitSound = WaitForChild(Handle, 'Ting')
  486. SlashSound:play()
  487. BlowConnection = Handle.Touched:connect(Blow)
  488. MyCharacter = Tool.Parent
  489. MyTorso = MyCharacter:FindFirstChild('Torso')
  490. MyHumanoid = MyCharacter:FindFirstChild('Humanoid')
  491. MyPlayer = PlayersService.LocalPlayer
  492. if mouse then
  493. Button1DownConnection = mouse.Button1Down:connect(OnLeftButtonDown)
  494. Button1UpConnection = mouse.Button1Up:connect(OnLeftButtonUp)
  495. end
  496. KnifeUp()
  497. end
  498.  
  499. function OnUnequipped()
  500. -- Unequip logic here
  501. if BlowConnection then
  502. BlowConnection:disconnect()
  503. BlowConnection = nil
  504. end
  505. if Button1DownConnection then
  506. Button1DownConnection:disconnect()
  507. Button1DownConnection = nil
  508. end
  509. if Button1UpConnection then
  510. Button1UpConnection:disconnect()
  511. Button1UpConnection = nil
  512. end
  513. MyHumanoid = nil
  514. end
  515.  
  516.  
  517. Tool.Equipped:connect(OnEquipped)
  518. Tool.Unequipped:connect(OnUnequipped)
  519.  
  520. end))
  521. Part9.Name = "Handle"
  522. Part9.Parent = Tool0
  523. Part9.Material = Enum.Material.DiamondPlate
  524. Part9.BrickColor = BrickColor.new("Really black")
  525. Part9.Reflectance = 0.0099999997764826
  526. Part9.Rotation = Vector3.new(-180, 0, -180)
  527. Part9.Elasticity = 0
  528. Part9.FormFactor = Enum.FormFactor.Custom
  529. Part9.Size = Vector3.new(0.400000006, 3, 0.699999988)
  530. Part9.CFrame = CFrame.new(0, 17.2999992, 22, -1, 0, 0, 0, 1, 0, 0, 0, -1)
  531. Part9.BottomSurface = Enum.SurfaceType.Smooth
  532. Part9.TopSurface = Enum.SurfaceType.Smooth
  533. Part9.Color = Color3.new(0.0666667, 0.0666667, 0.0666667)
  534. Part9.Position = Vector3.new(0, 17.2999992, 22)
  535. Part9.Orientation = Vector3.new(0, 180, 0)
  536. Part9.Color = Color3.new(0.0666667, 0.0666667, 0.0666667)
  537. Sound10.Name = "Swoosh"
  538. Sound10.Parent = Part9
  539. Sound10.SoundId = "http://www.roblox.com/asset?id=153647529"
  540. Sound10.Volume = 1
  541. Sound10.PlayOnRemove = true
  542. Sound11.Name = "Swoosh1"
  543. Sound11.Parent = Part9
  544. Sound11.SoundId = "http://www.roblox.com/asset?id=153647514"
  545. Sound11.Volume = 1
  546. Sound11.PlayOnRemove = true
  547. Sound12.Name = "Ting"
  548. Sound12.Parent = Part9
  549. Sound12.SoundId = "http://www.roblox.com/asset?id=153647529"
  550. Sound12.Volume = 0.20000000298023
  551. SpecialMesh13.Parent = Part9
  552. SpecialMesh13.MeshId = "http://www.roblox.com/asset/?id=121944778 "
  553. SpecialMesh13.TextureId = "http://www.roblox.com/asset/?id=121944805 "
  554. SpecialMesh13.MeshType = Enum.MeshType.FileMesh
  555. Animation14.Name = "DownStab"
  556. Animation14.Parent = Tool0
  557. Animation14.AnimationId = "http://www.roblox.com/Asset?ID=89133529"
  558. Animation15.Name = "KnifeIdle"
  559. Animation15.Parent = Tool0
  560. Animation16.Name = "StabPunch"
  561. Animation16.Parent = Tool0
  562. Animation16.AnimationId = "http://www.roblox.com/Asset?ID=89134792"
  563. Animation17.Name = "Throw"
  564. Animation17.Parent = Tool0
  565. Animation17.AnimationId = "http://www.roblox.com/Asset?ID=89147993"
  566. Animation18.Name = "ThrowCharge"
  567. Animation18.Parent = Tool0
  568. Animation18.AnimationId = "http://www.roblox.com/Asset?ID=93103762"
  569. Script19.Name = "ThrowHandleHitWeld"
  570. Script19.Parent = Tool0
  571. Script19.Disabled = true
  572. table.insert(cors,sandbox(Script19,function()
  573. arrow = script.Parent
  574.  
  575.  
  576. local HitSound = Instance.new("Sound")
  577. HitSound.SoundId = "http://www.roblox.com/asset?id=153647563"
  578. HitSound.Parent = arrow
  579. HitSound.Volume = .5
  580.  
  581.  
  582. function stick(hit)
  583.  
  584. local AV = arrow:findFirstChild("BodyForce")
  585. local FO = arrow:findFirstChild("BodyAngularVelocity")
  586.  
  587. if AV ~= nil then AV:remove() end
  588. if FO ~= nil then FO:remove() end
  589.  
  590. -- joint myself to the thing i hit
  591.  
  592. local weld = Instance.new("Weld")
  593.  
  594. weld.Name = "PieWeld"
  595. weld.Part0 = arrow
  596. weld.Part1 = hit
  597.  
  598. local backupweld = Instance.new("Weld")
  599.  
  600. backupweld.Name = "PieWeldBackup"
  601. backupweld.Part0 = arrow
  602. backupweld.Part1 = hit
  603.  
  604. -- correction term to account for average skew between physics update and heartbeat
  605. local HitPos = arrow.Position --+ (-arrow.Velocity * (1/60)) --+ (arrow.CFrame.lookVector * .5)
  606.  
  607. local CJ = CFrame.new(HitPos)
  608. local C0 = arrow.CFrame:inverse() *CJ
  609. local C1 = hit.CFrame:inverse() * CJ
  610.  
  611. weld.C0 = C0
  612. weld.C1 = C1
  613.  
  614. weld.Parent = arrow
  615.  
  616. backupweld.C0 = C0
  617. backupweld.C1 = C1
  618.  
  619. backupweld.Parent = arrow
  620.  
  621. end
  622.  
  623.  
  624. function onTouched(hit)
  625.  
  626. connection:disconnect()
  627.  
  628. stick(hit)
  629. HitSound:Play()
  630.  
  631.  
  632. end
  633.  
  634.  
  635.  
  636. connection = arrow.Touched:connect(onTouched)
  637.  
  638.  
  639.  
  640. wait(2)
  641.  
  642. if (arrow:FindFirstChild("PieWeld") ~= nil) then
  643. arrow.PieWeld:Remove()
  644. end
  645.  
  646. wait(8)
  647.  
  648. arrow.Parent = nil
  649. end))
  650. Script20.Name = "Sound"
  651. Script20.Parent = Tool0
  652. Script20.Disabled = true
  653. table.insert(cors,sandbox(Script20,function()
  654. -- For knife
  655.  
  656. function waitForChild(parent, childName)
  657. local child = parent:findFirstChild(childName)
  658. if child then return child end
  659. while true do
  660. child = parent.ChildAdded:wait()
  661. if child.Name==childName then return child end
  662. end
  663. end
  664.  
  665. function newSound(id)
  666. local sound = Instance.new("Sound")
  667. sound.SoundId = id
  668. sound.archivable = false
  669. sound.Parent = script.Parent.Head
  670. return sound
  671. end
  672.  
  673. -- declarations
  674.  
  675. local sDied = newSound("http://www.roblox.com/asset?id=146594640")
  676. local sFallingDown = newSound("rbxasset://sounds/splat.wav")
  677. local sFreeFalling = newSound("rbxasset://sounds/swoosh.wav")
  678. local sGettingUp = newSound("rbxasset://sounds/hit.wav")
  679. local sJumping = newSound("rbxasset://sounds/button.wav")
  680. local sRunning = newSound("rbxasset://sounds/bfsl-minifigfoots1.mp3")
  681. sRunning.Looped = true
  682.  
  683. local Figure = script.Parent
  684. local Head = waitForChild(Figure, "Head")
  685. local Humanoid = waitForChild(Figure, "Humanoid")
  686.  
  687. -- functions
  688.  
  689. function onDied()
  690. sDied:Play()
  691. end
  692.  
  693. function onState(state, sound)
  694. if state then
  695. sound:Play()
  696. else
  697. sound:Pause()
  698. end
  699. end
  700.  
  701. function onRunning(speed)
  702. if speed>0.01 then
  703. sRunning:Play()
  704. else
  705. sRunning:Pause()
  706. end
  707. end
  708.  
  709. -- connect up
  710.  
  711. Humanoid.Died:connect(onDied)
  712. Humanoid.Running:connect(onRunning)
  713. Humanoid.Jumping:connect(function(state) onState(state, sJumping) end)
  714. Humanoid.GettingUp:connect(function(state) onState(state, sGettingUp) end)
  715. Humanoid.FreeFalling:connect(function(state) onState(state, sFreeFalling) end)
  716. Humanoid.FallingDown:connect(function(state) onState(state, sFallingDown) end)
  717.  
  718. end))
  719. for i,v in pairs(mas:GetChildren()) do
  720. v.Parent = game:GetService("Players").LocalPlayer.Backpack
  721. pcall(function() v:MakeJoints() end)
  722. end
  723. mas:Destroy()
  724. for i,v in pairs(cors) do
  725. spawn(function()
  726. pcall(v)
  727. end)
  728. end
  729. function sandbox(var,func)
  730. local env = getfenv(func)
  731. local newenv = setmetatable({},{
  732. __index = function(self,k)
  733. if k=="script" then
  734. return var
  735. else
  736. return env[k]
  737. end
  738. end,
  739. })
  740. setfenv(func,newenv)
  741. return func
  742. end
  743. cors = {}
  744. mas = Instance.new("Model",game:GetService("Lighting"))
  745. Script0 = Instance.new("Script")
  746. Sound1 = Instance.new("Sound")
  747. Sound2 = Instance.new("Sound")
  748. Sound3 = Instance.new("Sound")
  749. Sound4 = Instance.new("Sound")
  750. Sound5 = Instance.new("Sound")
  751. Sound6 = Instance.new("Sound")
  752. Script0.Name = "die"
  753. Script0.Parent = mas
  754. table.insert(cors,sandbox(Script0,function()
  755. --[[
  756. Credit to minecraftbeast78 for script.
  757. Put the chat in the quotes after script.Parent.Head.
  758. To change the color, replace Blue after Enum.ChatColor. to Green or Red.
  759. Make sure the first letter of the color is capitalized.
  760. You can have mutiple chat colors.
  761. To change the wait time, change the number in parenthesis to what you want the
  762. wait time to be.
  763. The chat will disappear automatically after 6 to 7 seconds.
  764. ]]
  765.  
  766. while true do
  767. game:GetService("Chat"):Chat(script.Parent.Head, "LIKE THE FLEAS IN YOUR FUR, I KEEP COMING BACK!", Enum.ChatColor.White)
  768. script.FleasInYourFur:play()
  769. wait(3)
  770. game:GetService("Chat"):Chat(script.Parent.Head, "SLIP AND SLIDE ON THIS BANANA PEEL!", Enum.ChatColor.White)
  771. script.BananaPeel:play()
  772. wait(4)
  773. game:GetService("Chat"):Chat(script.Parent.Head, "HA HA HA!", Enum.ChatColor.White)
  774. wait(2)
  775. game:GetService("Chat"):Chat(script.Parent.Head, "WHAT ARE YOU DOING?!", Enum.ChatColor.White)
  776. script.WHATAREYOUDOING:play()
  777. wait(3)
  778. game:GetService("Chat"):Chat(script.Parent.Head, "*GASP* AHHHHHHHHHH!", Enum.ChatColor.White)
  779. script.gaspAAAHHHH:play()
  780. wait(5)
  781. game:GetService("Chat"):Chat(script.Parent.Head, "THAT'S MY PURSE! I DON'T KNOW YOU!", Enum.ChatColor.White)
  782. script.DATSMYPURSE:play()
  783. wait(3)
  784. game:GetService("Chat"):Chat(script.Parent.Head, "NO, DON'T TOUCH THAT!", Enum.ChatColor.White)
  785. script.DONTTOUCHTHAT:play()
  786. wait(3)
  787. end
  788. end))
  789. Sound1.Name = "BananaPeel"
  790. Sound1.Parent = Script0
  791. Sound1.SoundId = "rbxassetid://579837049"
  792. Sound1.Volume = 1
  793. Sound2.Name = "DATSMYPURSE"
  794. Sound2.Parent = Script0
  795. Sound2.SoundId = "rbxassetid://130760834"
  796. Sound2.Volume = 1
  797. Sound3.Name = "DONTTOUCHTHAT"
  798. Sound3.Parent = Script0
  799. Sound3.SoundId = "rbxassetid://577962209"
  800. Sound3.Volume = 1
  801. Sound4.Name = "FleasInYourFur"
  802. Sound4.Parent = Script0
  803. Sound4.SoundId = "rbxassetid://430155758"
  804. Sound4.Volume = 1
  805. Sound5.Name = "WHATAREYOUDOING"
  806. Sound5.Parent = Script0
  807. Sound5.SoundId = "rbxassetid://549200427"
  808. Sound5.Volume = 1
  809. Sound6.Name = "gaspAAAHHHH"
  810. Sound6.Parent = Script0
  811. Sound6.SoundId = "rbxassetid://633394595"
  812. Sound6.Volume = 1
  813. for i,v in pairs(mas:GetChildren()) do
  814. v.Parent = game:GetService("Players").LocalPlayer.Character
  815. pcall(function() v:MakeJoints() end)
  816. end
  817. mas:Destroy()
  818. for i,v in pairs(cors) do
  819. spawn(function()
  820. pcall(v)
  821. end)
  822. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement