Advertisement
Kaemi

Untitled

Mar 2nd, 2018
361
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 14.51 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. SpecialMesh2 = Instance.new("SpecialMesh")
  22. Sound3 = Instance.new("Sound")
  23. Script4 = Instance.new("Script")
  24. Tool5 = Instance.new("Tool")
  25. StringValue6 = Instance.new("StringValue")
  26. Script7 = Instance.new("Script")
  27. BoolValue8 = Instance.new("BoolValue")
  28. LocalScript9 = Instance.new("LocalScript")
  29. Animation10 = Instance.new("Animation")
  30. Animation11 = Instance.new("Animation")
  31. Animation12 = Instance.new("Animation")
  32. Animation13 = Instance.new("Animation")
  33. Animation14 = Instance.new("Animation")
  34. Animation15 = Instance.new("Animation")
  35. Part16 = Instance.new("Part")
  36. Weld17 = Instance.new("Weld")
  37. Attachment18 = Instance.new("Attachment")
  38. Attachment19 = Instance.new("Attachment")
  39. SpecialMesh20 = Instance.new("SpecialMesh")
  40. Tool0.Name = "C4"
  41. Tool0.Parent = mas
  42. Tool0.TextureId = "http://www.roblox.com/asset/?id=29784479"
  43. Tool0.GripForward = Vector3.new(1, -0, -0)
  44. Tool0.GripPos = Vector3.new(-0.100000001, 0, 0)
  45. Tool0.GripRight = Vector3.new(0, 0, 1)
  46. Part1.Name = "Handle"
  47. Part1.Parent = Tool0
  48. Part1.Rotation = Vector3.new(-180, 32.3999977, 179.949997)
  49. Part1.RotVelocity = Vector3.new(1, 1, 1)
  50. Part1.FormFactor = Enum.FormFactor.Symmetric
  51. Part1.Size = Vector3.new(1, 1, 1)
  52. Part1.CFrame = CFrame.new(201.749634, 31.4991264, 61.4766388, -0.844324708, -0.000672729395, 0.535831749, -0.000796642096, 0.999999642, 1.95097499e-07, -0.53583163, -0.000426701445, -0.844324887)
  53. Part1.BottomSurface = Enum.SurfaceType.Smooth
  54. Part1.TopSurface = Enum.SurfaceType.Smooth
  55. Part1.Position = Vector3.new(201.749634, 31.4991264, 61.4766388)
  56. Part1.Orientation = Vector3.new(0, 147.599991, -0.049999997)
  57. SpecialMesh2.Parent = Part1
  58. SpecialMesh2.MeshId = "http://www.roblox.com/asset/?id=28511792"
  59. SpecialMesh2.Scale = Vector3.new(2, 2, 2)
  60. SpecialMesh2.TextureId = "http://www.roblox.com/asset/?id=28511890"
  61. SpecialMesh2.MeshType = Enum.MeshType.FileMesh
  62. SpecialMesh2.Scale = Vector3.new(2, 2, 2)
  63. Sound3.Name = "Plant"
  64. Sound3.Parent = Part1
  65. Sound3.SoundId = "http://www.roblox.com/asset/?id=28518380"
  66. Script4.Name = "PlantBomb"
  67. Script4.Parent = Tool0
  68. table.insert(cors,sandbox(Script4,function()
  69. Tool = script.Parent
  70. local planting = true
  71. local bomb = nil
  72.  
  73. local uses = 3
  74.  
  75. local sound = Instance.new("Sound")
  76. sound.SoundId = "http://www.roblox.com/asset/?id=28517063"
  77. sound.Looped = true
  78.  
  79. local explosion = Instance.new("Sound")
  80. explosion.SoundId = "http://www.roblox.com/asset/?id=28518734"
  81. explosion.Volume = 0.01
  82. explosion:Play()
  83. explosion.Volume = 0.5
  84.  
  85. function plant(pos)
  86.  
  87. Tool.Handle.Plant:Play()
  88.  
  89. local vCharacter = Tool.Parent
  90. local vPlayer = game.Players:playerFromCharacter(vCharacter)
  91.  
  92. local spawnPos = vCharacter.PrimaryPart.Position
  93.  
  94. bomb = Instance.new("Part")
  95. bomb.Locked = true
  96. bomb.formFactor = 2
  97. bomb.Size = Vector3.new(1,0.4,1)
  98. bomb.Name = "Mine"
  99. bomb.Position = pos
  100. mesh = Instance.new("SpecialMesh")
  101. mesh.Parent = bomb
  102. mesh.MeshId = "http://www.roblox.com/asset/?id=13319240"
  103. mesh.TextureId = "http://www.roblox.com/asset/?id=23087350"
  104. mesh.Scale = Vector3.new(1.3,1.3,1.3)
  105.  
  106.  
  107. sound.Parent = bomb
  108. sound:Play()
  109.  
  110. explosion:Stop()
  111.  
  112.  
  113.  
  114. local creator_tag = Instance.new("ObjectValue")
  115. creator_tag.Value = vPlayer
  116. creator_tag.Name = "creator"
  117. creator_tag.Parent = bomb
  118.  
  119.  
  120. bomb.Parent = game.Workspace
  121. bomb.Touched:connect(function(part)
  122. if part ~= Tool.Handle and part.Parent:FindFirstChild("Humanoid") == nil then
  123. bomb.Anchored = true
  124. bomb.CanCollide = false
  125. end
  126. end)
  127.  
  128. end
  129.  
  130. function blowUp()
  131.  
  132. local e = Instance.new("Explosion")
  133. e.BlastPressure = 100
  134. e.BlastRadius = 5
  135. e.Parent = game.Workspace
  136. e.Position = bomb.Position
  137. sound:Stop()
  138. explosion.Parent = e
  139. explosion:Play()
  140. bomb:remove()
  141.  
  142. end
  143.  
  144. Tool.Enabled = true
  145. function onActivated()
  146.  
  147. if not Tool.Enabled then
  148. return
  149. end
  150.  
  151. Tool.Enabled = false
  152.  
  153. local character = Tool.Parent;
  154. local humanoid = character.Humanoid
  155. if humanoid == nil then
  156. print("Humanoid not found")
  157. return
  158. end
  159.  
  160. local targetPos = humanoid.TargetPoint
  161.  
  162. if planting then
  163. plant(Tool.Handle.Position)
  164. planting = false
  165. else
  166. blowUp()
  167. planting = true
  168. end
  169. Tool.Enabled = true
  170. end
  171.  
  172.  
  173. script.Parent.Activated:connect(onActivated)
  174. end))
  175. Tool5.Name = "Knife"
  176. Tool5.Parent = mas
  177. Tool5.GripForward = Vector3.new(-0.0954888314, -0.84233582, 0.530426502)
  178. Tool5.GripPos = Vector3.new(-0.000422431156, 0.562534153, 0.476890266)
  179. Tool5.GripRight = Vector3.new(0.995430529, -0.0808028951, 0.0508822948)
  180. Tool5.GripUp = Vector3.new(-3.47819062e-09, -0.532861292, -0.846202612)
  181. StringValue6.Name = "RunAnim"
  182. StringValue6.Parent = Tool5
  183. Script7.Name = "KnifeScript"
  184. Script7.Parent = Tool5
  185. table.insert(cors,sandbox(Script7,function()
  186. sp = script.Parent
  187.  
  188. r = game:service("RunService")
  189. debris = game:GetService("Debris")
  190.  
  191. anims = {"RightSlash","LeftSlash","OverHeadSwing","LeftSwingFast","RightSwingFast"}
  192.  
  193. Sounds = {{145180512, "Metal"}, {145180522, "Metal"}, {145180533, "Wood"}, {145180541, "Wood"}, {145180529, "Slash"}, {145180550, "Slash"}}
  194.  
  195. WoodSounds = {}
  196. MetalSounds = {}
  197. SlashSounds = {}
  198.  
  199. basedamage = 0
  200. slashdamage = 1
  201. swingdamage = 1
  202. damage = basedamage
  203.  
  204. sword = sp.Handle
  205. sp.Taunting.Value = false
  206.  
  207. local UnsheathSound = Instance.new("Sound")
  208. UnsheathSound.SoundId = "http://www.roblox.com/Asset/?id=145180523"
  209. UnsheathSound.Parent = sword
  210. UnsheathSound.Volume = 0.5
  211.  
  212. for _,Sound in pairs(Sounds) do
  213. local S = Instance.new("Sound")
  214. S.SoundId = "http://www.roblox.com/Asset/?id=" .. Sound[1]
  215. S.Parent = sword
  216. S.Volume = 1
  217. if Sound[2] == "Wood" then
  218. table.insert(WoodSounds, S)
  219. elseif Sound[2] == "Metal" then
  220. table.insert(MetalSounds, S)
  221. elseif Sound[2] == "Slash" then
  222. table.insert(SlashSounds, S)
  223. end
  224. end
  225.  
  226. function waitfor(parent,name)
  227. while true do
  228. local child = parent:FindFirstChild(name)
  229. if child ~= nil then
  230. return child
  231. end
  232. wait()
  233. end
  234. end
  235.  
  236. waitfor(sp,"Taunting")
  237. waitfor(sp,"RunAnim")
  238. local Halt = false;
  239. function blow(hit)
  240. if hit:findFirstChild("IsShield") then
  241. damage = 12
  242. pcall(function()
  243. if hit.IsShield.Value == "Wood" then
  244. WoodSounds[math.random(#WoodSounds)]:Play()
  245. elseif hit.IsShield.Value == "Metal" then
  246. MetalSounds[math.random(#MetalSounds)]:Play()
  247. else
  248. WoodSounds[math.random(#WoodSounds)]:Play()
  249. end
  250. end);
  251. return
  252. end
  253. if Halt then return end;
  254. Halt = true;
  255. if hit.Parent ~= nil then
  256. local humanoid = hit.Parent:findFirstChild("Humanoid")
  257. local vCharacter = sp.Parent
  258. if vCharacter ~= nil then
  259. local vPlayer = game.Players:playerFromCharacter(vCharacter)
  260. if vPlayer ~= nil then
  261. local hum = vCharacter:findFirstChild("Humanoid")
  262. if humanoid ~= nil then
  263. if hum ~= nil and humanoid ~= hum then
  264. local right_arm = vCharacter:FindFirstChild("Right Arm")
  265. if right_arm ~= nil then
  266. local joint = right_arm:FindFirstChild("RightGrip")
  267. if joint ~= nil and (joint.Part0 == sword or joint.Part1 == sword) then
  268. tagHumanoid(humanoid,vPlayer)
  269. humanoid:TakeDamage(damage)
  270. wait(3)
  271. humanoid.Parent:BreakJoints()
  272. end
  273. end
  274. end
  275. end
  276. end
  277. end
  278. end
  279. Halt = false;
  280. end
  281.  
  282. function tagHumanoid(humanoid,player)
  283. for i,v in ipairs(humanoid:GetChildren()) do
  284. if v.Name == "creator" then
  285. v:Destroy()
  286. end
  287. end
  288. local creator_tag = Instance.new("ObjectValue")
  289. creator_tag.Value = player
  290. creator_tag.Name = "creator"
  291. creator_tag.Parent = humanoid
  292. debris:AddItem(creator_tag,1)
  293. end
  294.  
  295. sp.Enabled = true
  296. function onActivated()
  297. if sp.Enabled and not sp.Taunting.Value then
  298. sp.Enabled = false
  299. local character = sp.Parent;
  300. local humanoid = character.Humanoid
  301. if humanoid == nil then
  302. print("Humanoid not found")
  303. return
  304. end
  305. SlashSounds[math.random(#SlashSounds)]:Play()
  306. newanim = anims[math.random(1,#anims)]
  307. while newanim == sp.RunAnim.Value do
  308. newanim = anims[math.random(1,#anims)]
  309. end
  310. sp.RunAnim.Value = newanim
  311. if newanim == "OverHeadSwing" then
  312. damage = swingdamage
  313. else
  314. damage = slashdamage
  315. end
  316. wait(.5)
  317. damage = basedamage
  318. sp.Enabled = true
  319. end
  320. end
  321.  
  322. function onEquipped()
  323. UnsheathSound:play()
  324. end
  325.  
  326. sp.Activated:connect(onActivated)
  327. sp.Equipped:connect(onEquipped)
  328.  
  329. connection = sword.Touched:connect(blow)
  330. end))
  331. BoolValue8.Name = "Taunting"
  332. BoolValue8.Parent = Tool5
  333. LocalScript9.Name = "Local Gui"
  334. LocalScript9.Parent = Tool5
  335. table.insert(cors,sandbox(LocalScript9,function()
  336. local sp = script.Parent
  337.  
  338. originalgrip = sp.Grip
  339. currentgrip = originalgrip
  340.  
  341. GripForward = sp.GripForward
  342. GripPos = sp.GripPos
  343. GripRight = sp.GripRight
  344. GripUp = sp.GripUp
  345.  
  346. enabled = true
  347. taunting = false
  348.  
  349. function waitfor(parent,name)
  350. while true do
  351. local child = parent:FindFirstChild(name)
  352. if child~=nil then
  353. return child
  354. end
  355. wait()
  356. end
  357. end
  358.  
  359. waitfor(sp,"Handle")
  360.  
  361. function onButton1Down(mouse)
  362. if not enabled then
  363. return
  364. end
  365. enabled=false
  366. mouse.Icon="http://www.roblox.com/asset/?id=1370539746"
  367. wait(.75)
  368. mouse.Icon="http://www.roblox.com/asset/?id=1371304987"
  369. enabled=true
  370. end
  371.  
  372. function swordUp()
  373. currentgrip = originalgrip
  374. end
  375.  
  376. function swordOut()
  377. currentgrip = originalgrip * CFrame.Angles(math.pi/4,.4,0)
  378. end
  379.  
  380. function spinsword(spintime)
  381. delay(0,function()
  382. local startspin=tick()
  383. local endspin=startspin+spintime
  384. while tick()<endspin do
  385. sp.Grip=currentgrip*CFrame.Angles(math.pi*2*((tick()-startspin)/spintime),0,0)
  386. wait()
  387. end
  388. sp.Grip = currentgrip
  389. end)
  390. end
  391.  
  392. function onEquippedLocal(mouse)
  393. local currentlast = lastequipped
  394. if mouse==nil then
  395. print("Mouse not found")
  396. return
  397. end
  398. mouse.Icon="http://www.roblox.com/asset/?id=1370539746"
  399. mouse.Button1Down:connect(function()
  400. onButton1Down(mouse)
  401. end)
  402. waitfor(sp,"Taunting")
  403. waitfor(sp,"Taunt")
  404. mouse.KeyDown:connect(function(key)
  405. key=string.lower(key)
  406. if key=="r" then -- :3
  407. local h=sp.Parent:FindFirstChild("Humanoid")
  408. if h~=nil then
  409. sp.Taunting.Value=true
  410. h.WalkSpeed=2
  411. tauntanim=h:LoadAnimation(sp.Taunt)
  412. tauntanim:Play()
  413. wait(1)
  414. swordOut()
  415. sp.Grip=currentgrip
  416. wait(1.4)
  417. swordUp()
  418. sp.Grip=currentgrip
  419. wait(1)
  420. h.WalkSpeed=16
  421. sp.Taunting.Value=false
  422. end
  423. end
  424. end)
  425. end
  426. sp.Equipped:connect(onEquippedLocal)
  427.  
  428. waitfor(sp,"RunAnim")
  429. sp.RunAnim.Changed:connect(function()
  430. local h=sp.Parent:FindFirstChild("Humanoid")
  431. local t=sp.Parent:FindFirstChild("Torso")
  432. local anim=sp:FindFirstChild(sp.RunAnim.Value)
  433. if anim and t and h then
  434. theanim=h:LoadAnimation(anim)
  435. if theanim and h.Health>0 then
  436. theanim:Play()
  437. if sp.RunAnim.Value=="RightSlash" or sp.RunAnim.Value=="LeftSlash" or sp.RunAnim.Value=="OverHeadSwing" then
  438. spinsword(.5)
  439. end
  440. if sp.RunAnim.Value=="OverHeadSwing" then
  441. wait(.25)
  442. swordOut()
  443. wait(.5)
  444. swordUp()
  445. sp.Grip = currentgrip
  446. sp.GripForward = GripForward
  447. sp.GripPos = GripPos
  448. sp.GripRight = GripRight
  449. sp.GripUp = GripUp
  450. elseif sp.RunAnim.Value=="OverHeadSwingFast" then
  451. wait(.125)
  452. swordOut()
  453. wait(.25)
  454. swordUp()
  455. sp.Grip = currentgrip
  456. sp.GripForward = GripForward
  457. sp.GripPos = GripPos
  458. sp.GripRight = GripRight
  459. sp.GripUp = GripUp
  460. end
  461. end
  462. end
  463. end)
  464. end))
  465. Animation10.Name = "LeftSlash"
  466. Animation10.Parent = Tool5
  467. Animation10.AnimationId = "http://www.roblox.com/Asset?ID=74894663"
  468. Animation11.Name = "LeftSwingFast"
  469. Animation11.Parent = Tool5
  470. Animation11.AnimationId = "http://www.roblox.com/Asset?ID=86313418"
  471. Animation12.Name = "OverHeadSwing"
  472. Animation12.Parent = Tool5
  473. Animation12.AnimationId = "http://www.roblox.com/Asset?ID=74897796"
  474. Animation13.Name = "RightSlash"
  475. Animation13.Parent = Tool5
  476. Animation13.AnimationId = "http://www.roblox.com/Asset?ID=74813494"
  477. Animation14.Name = "RightSwingFast"
  478. Animation14.Parent = Tool5
  479. Animation14.AnimationId = "http://www.roblox.com/Asset?ID=86313260"
  480. Animation15.Name = "Taunt"
  481. Animation15.Parent = Tool5
  482. Animation15.AnimationId = "rbxassetid://01413369796"
  483. Part16.Name = "Handle"
  484. Part16.Parent = Tool5
  485. Part16.BrickColor = BrickColor.new("Dark stone grey")
  486. Part16.Reflectance = 0.40000000596046
  487. Part16.Rotation = Vector3.new(107.079994, 2.91999984, 4.63999987)
  488. Part16.FormFactor = Enum.FormFactor.Plate
  489. Part16.Size = Vector3.new(0.200000033, 2.00000024, 2)
  490. Part16.CFrame = CFrame.new(40.112587, 5.47537613, 38.3044052, 0.995430589, -0.0808026716, 0.0508828573, 0.0247150157, -0.29669103, -0.95465368, 0.0922350511, 0.951548934, -0.293338269)
  491. Part16.BottomSurface = Enum.SurfaceType.Smooth
  492. Part16.TopSurface = Enum.SurfaceType.Smooth
  493. Part16.Color = Color3.new(0.388235, 0.372549, 0.384314)
  494. Part16.Position = Vector3.new(40.112587, 5.47537613, 38.3044052)
  495. Part16.Orientation = Vector3.new(72.6800003, 170.160004, 175.23999)
  496. Part16.Color = Color3.new(0.388235, 0.372549, 0.384314)
  497. Weld17.Name = "Handle-to-Part Weld"
  498. Weld17.Parent = Part16
  499. Weld17.C0 = CFrame.new(0.5, -3, 0.5, 1, 0, 0, 0, 0, -1, 0, 1, 0)
  500. Weld17.C1 = CFrame.new(1, 1.20000076, -13, 7.4505806e-09, 1, 3.7403327e-12, 4.14893814e-13, 3.36629596e-13, -1, -1, 1.49011612e-08, 2.15725493e-11)
  501. Attachment18.Name = "UpperBlade_Attachment"
  502. Attachment18.Parent = Part16
  503. Attachment18.CFrame = CFrame.new(-3.66789436e-06, -0.949999392, -0.982302547, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  504. Attachment18.Position = Vector3.new(-3.66789436e-06, -0.949999392, -0.982302547)
  505. Attachment19.Name = "LowerBlade_Attachment"
  506. Attachment19.Parent = Part16
  507. Attachment19.CFrame = CFrame.new(-3.27045836e-06, 0.200000033, 0.13645044, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  508. Attachment19.Position = Vector3.new(-3.27045836e-06, 0.200000033, 0.13645044)
  509. SpecialMesh20.Parent = Part16
  510. SpecialMesh20.MeshId = "rbxassetid://470094777"
  511. SpecialMesh20.Scale = Vector3.new(0.200000003, 0.200000003, 0.200000003)
  512. SpecialMesh20.TextureId = "http://www.roblox.com/asset/?id=470149026"
  513. SpecialMesh20.MeshType = Enum.MeshType.FileMesh
  514. SpecialMesh20.Scale = Vector3.new(0.200000003, 0.200000003, 0.200000003)
  515. for i,v in pairs(mas:GetChildren()) do
  516. v.Parent = game:GetService("Players").LocalPlayer.Backpack
  517. pcall(function() v:MakeJoints() end)
  518. end
  519. mas:Destroy()
  520. for i,v in pairs(cors) do
  521. spawn(function()
  522. pcall(v)
  523. end)
  524. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement