Advertisement
memberhero

test2

Mar 21st, 2018
186
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 29.42 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. StringValue1 = Instance.new("StringValue")
  21. Folder2 = Instance.new("Folder")
  22. NumberValue3 = Instance.new("NumberValue")
  23. LocalScript4 = Instance.new("LocalScript")
  24. NumberValue5 = Instance.new("NumberValue")
  25. LocalScript6 = Instance.new("LocalScript")
  26. NumberValue7 = Instance.new("NumberValue")
  27. LocalScript8 = Instance.new("LocalScript")
  28. ScreenGui9 = Instance.new("ScreenGui")
  29. Frame10 = Instance.new("Frame")
  30. TextLabel11 = Instance.new("TextLabel")
  31. LocalScript12 = Instance.new("LocalScript")
  32. TextLabel13 = Instance.new("TextLabel")
  33. LocalScript14 = Instance.new("LocalScript")
  34. TextLabel15 = Instance.new("TextLabel")
  35. LocalScript16 = Instance.new("LocalScript")
  36. LocalScript17 = Instance.new("LocalScript")
  37. NumberValue18 = Instance.new("NumberValue")
  38. Script19 = Instance.new("Script")
  39. Folder20 = Instance.new("Folder")
  40. NumberValue21 = Instance.new("NumberValue")
  41. Script22 = Instance.new("Script")
  42. NumberValue23 = Instance.new("NumberValue")
  43. Script24 = Instance.new("Script")
  44. Folder25 = Instance.new("Folder")
  45. Animation26 = Instance.new("Animation")
  46. Animation27 = Instance.new("Animation")
  47. Animation28 = Instance.new("Animation")
  48. Animation29 = Instance.new("Animation")
  49. Animation30 = Instance.new("Animation")
  50. Animation31 = Instance.new("Animation")
  51. Folder32 = Instance.new("Folder")
  52. ParticleEmitter33 = Instance.new("ParticleEmitter")
  53. ParticleEmitter34 = Instance.new("ParticleEmitter")
  54. Script35 = Instance.new("Script")
  55. Part36 = Instance.new("Part")
  56. Script37 = Instance.new("Script")
  57. Script38 = Instance.new("Script")
  58. Part39 = Instance.new("Part")
  59. Sound40 = Instance.new("Sound")
  60. Sound41 = Instance.new("Sound")
  61. SpecialMesh42 = Instance.new("SpecialMesh")
  62. Sound43 = Instance.new("Sound")
  63. Sound44 = Instance.new("Sound")
  64. Folder45 = Instance.new("Folder")
  65. Script46 = Instance.new("Script")
  66. ScreenGui47 = Instance.new("ScreenGui")
  67. Frame48 = Instance.new("Frame")
  68. TextLabel49 = Instance.new("TextLabel")
  69. LocalScript50 = Instance.new("LocalScript")
  70. TextLabel51 = Instance.new("TextLabel")
  71. LocalScript52 = Instance.new("LocalScript")
  72. TextLabel53 = Instance.new("TextLabel")
  73. TextLabel54 = Instance.new("TextLabel")
  74. TextLabel55 = Instance.new("TextLabel")
  75. TextLabel56 = Instance.new("TextLabel")
  76. Tool0.Name = "Sword"
  77. Tool0.Parent = mas
  78. Tool0.TextureId = "rbxgameasset://Images/meleeicon"
  79. Tool0.GripForward = Vector3.new(0.999995828, -3.05171125e-05, 0.00287951133)
  80. Tool0.GripPos = Vector3.new(-3.63797881e-11, -1.44320107, 3.99325017e-12)
  81. Tool0.GripRight = Vector3.new(-0.00287950388, 3.05180438e-05, 0.999995828)
  82. Tool0.GripUp = Vector3.new(3.06048642e-05, 1, -3.04300429e-05)
  83. Tool0.ToolTip = "[Sword]"
  84.  
  85. Tool0.CanBeDropped = false
  86. StringValue1.Name = "WeaponType"
  87. StringValue1.Parent = Tool0
  88. StringValue1.Value = "Melee"
  89. Folder2.Name = "Stats"
  90. Folder2.Parent = Tool0
  91. NumberValue3.Name = "Defense"
  92. NumberValue3.Parent = Folder2
  93. NumberValue3.Value = 1
  94. LocalScript4.Parent = NumberValue3
  95. LocalScript4.Disabled = true
  96. table.insert(cors,sandbox(LocalScript4,function()
  97. local val = script.Parent
  98. local plr = game.Players.LocalPlayer
  99. local char = workspace:WaitForChild(plr.Name)
  100. local hum = char:WaitForChild("Humanoid")
  101.  
  102. while true do
  103. val.Value = char.Defense.Value
  104. wait()
  105. end
  106. end))
  107. NumberValue5.Name = "Power"
  108. NumberValue5.Parent = Folder2
  109. LocalScript6.Parent = NumberValue5
  110. LocalScript6.Disabled = true
  111. table.insert(cors,sandbox(LocalScript6,function()
  112. local val = script.Parent
  113. local plr = game.Players.LocalPlayer
  114. local char = workspace:WaitForChild(plr.Name)
  115. local hum = char:WaitForChild("Humanoid")
  116.  
  117. while true do
  118. val.Value = char.Power.Value
  119. wait()
  120. end
  121. end))
  122. NumberValue7.Name = "Speed"
  123. NumberValue7.Parent = Folder2
  124. LocalScript8.Parent = NumberValue7
  125. LocalScript8.Disabled = true
  126. table.insert(cors,sandbox(LocalScript8,function()
  127. local val = script.Parent
  128. local plr = game.Players.LocalPlayer
  129. local char = workspace:WaitForChild(plr.Name)
  130. local hum = char:WaitForChild("Humanoid")
  131.  
  132. while true do
  133. val.Value = math.floor(hum.WalkSpeed/16*10)/10
  134. wait()
  135. end
  136. end))
  137. ScreenGui9.Name = "StatGui"
  138. ScreenGui9.Parent = Tool0
  139. Frame10.Name = "Stats"
  140. Frame10.Parent = ScreenGui9
  141. Frame10.Size = UDim2.new(0.150000006, 1, 0.150000006, 1)
  142. Frame10.Style = Enum.FrameStyle.RobloxRound
  143. Frame10.Position = UDim2.new(0.845000029, 0, 0.845000029, 0)
  144. Frame10.BackgroundColor3 = Color3.new(1, 1, 1)
  145. Frame10.BorderSizePixel = 0
  146. TextLabel11.Name = "Power"
  147. TextLabel11.Parent = Frame10
  148. TextLabel11.Size = UDim2.new(0.333000004, 1, 1, 1)
  149. TextLabel11.Text = "Pow:(#)"
  150. TextLabel11.BackgroundColor3 = Color3.new(1, 0.333333, 0)
  151. TextLabel11.BorderSizePixel = 0
  152. TextLabel11.Font = Enum.Font.ArialBold
  153. TextLabel11.FontSize = Enum.FontSize.Size14
  154. TextLabel11.TextColor3 = Color3.new(1, 1, 1)
  155. TextLabel11.TextScaled = true
  156. TextLabel11.TextStrokeTransparency = 0
  157. TextLabel11.TextWrapped = true
  158. LocalScript12.Parent = TextLabel11
  159. table.insert(cors,sandbox(LocalScript12,function()
  160. local tg = script.Parent
  161. local plr = game.Players.LocalPlayer
  162. local char = workspace:WaitForChild(plr.Name)
  163. local hum = char:WaitForChild("Humanoid")
  164.  
  165. while true do
  166. tg.Text = ("Pow:("..tostring(char:WaitForChild("Sword").Stats.Power.Value)..")")
  167. wait()
  168. end
  169.  
  170. end))
  171. TextLabel13.Name = "Defense"
  172. TextLabel13.Parent = Frame10
  173. TextLabel13.Size = UDim2.new(0.333000004, 1, 1, 1)
  174. TextLabel13.Text = "Def:(#)"
  175. TextLabel13.Position = UDim2.new(0.333000004, 0, 0, 0)
  176. TextLabel13.BackgroundColor3 = Color3.new(0, 0.666667, 1)
  177. TextLabel13.BorderSizePixel = 0
  178. TextLabel13.Font = Enum.Font.ArialBold
  179. TextLabel13.FontSize = Enum.FontSize.Size14
  180. TextLabel13.TextColor3 = Color3.new(1, 1, 1)
  181. TextLabel13.TextScaled = true
  182. TextLabel13.TextStrokeTransparency = 0
  183. TextLabel13.TextWrapped = true
  184. LocalScript14.Parent = TextLabel13
  185. table.insert(cors,sandbox(LocalScript14,function()
  186. local tg = script.Parent
  187. local plr = game.Players.LocalPlayer
  188. local char = workspace:WaitForChild(plr.Name)
  189. local hum = char:WaitForChild("Humanoid")
  190.  
  191. while true do
  192. tg.Text = ("Def:("..tostring(char:WaitForChild("Sword").Stats.Defense.Value)..")")
  193. wait()
  194. end
  195.  
  196. end))
  197. TextLabel15.Name = "Speed"
  198. TextLabel15.Parent = Frame10
  199. TextLabel15.Size = UDim2.new(0.333000004, 1, 1, 1)
  200. TextLabel15.Text = "Spd:(#)"
  201. TextLabel15.Position = UDim2.new(0.666000009, 0, 0, 0)
  202. TextLabel15.BackgroundColor3 = Color3.new(1, 1, 0)
  203. TextLabel15.BorderSizePixel = 0
  204. TextLabel15.Font = Enum.Font.ArialBold
  205. TextLabel15.FontSize = Enum.FontSize.Size14
  206. TextLabel15.TextColor3 = Color3.new(1, 1, 1)
  207. TextLabel15.TextScaled = true
  208. TextLabel15.TextStrokeTransparency = 0
  209. TextLabel15.TextWrapped = true
  210. LocalScript16.Parent = TextLabel15
  211. table.insert(cors,sandbox(LocalScript16,function()
  212. local tg = script.Parent
  213. local plr = game.Players.LocalPlayer
  214. local char = workspace:WaitForChild(plr.Name)
  215. local hum = char:WaitForChild("Humanoid")
  216.  
  217. while true do
  218. tg.Text = ("Spd:("..tostring(char:WaitForChild("Sword").Stats.Speed.Value)..")")
  219. wait()
  220. end
  221.  
  222.  
  223. end))
  224. LocalScript17.Name = "ToolScript"
  225. LocalScript17.Parent = Tool0
  226. table.insert(cors,sandbox(LocalScript17,function()
  227. local tool = script.Parent
  228. local plr = game.Players.LocalPlayer
  229. local char = workspace:WaitForChild(plr.Name)
  230. local hum = char:WaitForChild("Humanoid")
  231. local r = game:service("RunService")
  232. local isclicking = false
  233. local Clicknumb = 1 -- this needs to be here
  234. local mouse = plr:GetMouse()
  235. local CanCast = 1
  236.  
  237. function Equipped()
  238. print('Equipped')
  239. local gooey = tool.StatGui:Clone()
  240. gooey.Parent = plr.PlayerGui
  241.  
  242. tool.Stats.Power.LocalScript.Disabled = false
  243. tool.Stats.Defense.LocalScript.Disabled = false
  244. tool.Stats.Speed.LocalScript.Disabled = false
  245.  
  246. local gooey2 = tool.SkillGui:Clone()
  247. gooey2.Parent = plr.PlayerGui
  248. gooey2.Skills.XSkill.LocalScript.Disabled = false
  249. gooey2.Skills.ZSkill.LocalScript.Disabled = false
  250.  
  251. end
  252.  
  253. function UnEquipped()
  254. print('UnEquipped')
  255.  
  256. plr.PlayerGui.StatGui:Destroy()
  257. plr.PlayerGui.SkillGui:Destroy()
  258. tool.Stats.Power.LocalScript.Disabled = true
  259. tool.Stats.Defense.LocalScript.Disabled = true
  260. tool.Stats.Speed.LocalScript.Disabled = true
  261.  
  262. end
  263.  
  264. function Attack1()
  265. CanCast = 0
  266. if tool.Enabled == true then return end
  267. local anim1 = tool.Animations.Slash1
  268. local example = hum:LoadAnimation(anim1)
  269. example:Play(0,1,1)
  270. tool.Handle.S1:Play()
  271. tool.Hitbox.Damage.Disabled = false
  272. wait(.45)
  273. tool.Hitbox.Damage.Disabled = true
  274. CanCast = 1
  275. end
  276. tool.Handle.Touched:connect(function(hit)
  277. if hit.Parent:FindFirstChild("Humanoid") then
  278. hit.Parent.Humanoid:TakeDamage(5)
  279. end
  280. end)
  281.  
  282. function Attack2()
  283. CanCast = 0
  284. if tool.Enabled == true then return end
  285. local anim2 = tool.Animations.Slash2
  286. local example = hum:LoadAnimation(anim2)
  287. example:Play(0,1,1)
  288. tool.Handle.S1:Play()
  289. tool.Hitbox.Damage.Disabled = false
  290. wait(.45)
  291. tool.Hitbox.Damage.Disabled = true
  292. CanCast = 1
  293. end
  294.  
  295. function Attack3()
  296. CanCast = 0
  297. if tool.Enabled == true then return end
  298. local anim3 = tool.Animations.Spin
  299. local example = hum:LoadAnimation(anim3)
  300. example:Play(0,1,1)
  301.  
  302. wait(.6)
  303. tool.Handle.S2:Play()
  304. tool.Hitbox.Damage.Disabled = false
  305. wait(.15)
  306. tool.Hitbox.Damage.Disabled = true
  307. CanCast = 1
  308. end
  309.  
  310. local lastattack = 0
  311. tool.Enabled = true
  312.  
  313. function Activated()
  314.  
  315. if not tool.Enabled then
  316. return
  317. end
  318.  
  319. tool.Enabled = false
  320.  
  321. local character = tool.Parent;
  322. local humanoid = character.Humanoid
  323. if humanoid == nil then
  324. print("No humanoid!")
  325. return
  326. end
  327.  
  328. local t = r.Stepped:wait()
  329. if script.Timer.Value == 0 then
  330. Clicknumb = 1
  331. end
  332.  
  333. if Clicknumb == 1 then -- copy all this, change the functions for attacks.
  334. Clicknumb = 2
  335. Attack1()
  336. wait(0.05)
  337. script.Timer.Value = 2.5
  338. elseif Clicknumb == 2 then
  339. Clicknumb = 3
  340. Attack2()
  341. wait(0.05)
  342. script.Timer.Value = 2.5
  343. elseif Clicknumb == 3 then
  344. Clicknumb = 1
  345. Attack3()
  346. wait(0.05)
  347. script.Timer.Value = 2.5
  348. end -- thats about it.
  349.  
  350.  
  351. lastattack = t
  352.  
  353. tool.Enabled = true
  354.  
  355. end
  356.  
  357. function UnActivated()
  358.  
  359. end
  360.  
  361. -- KEY SKILLS --------------------------------------------------------------------------
  362. function KeyDown(key)
  363. key = key:lower()
  364. local casting = false
  365. if CanCast == 1 then
  366. if tool.Parent ~= plr.Backpack then
  367.  
  368. if (key == "z") then -- Z : Kick
  369. if casting == false then
  370. casting = true
  371. if script.Cooldowns.Z.Value == 0 then
  372. script.Cooldowns.Z.Value = 1.5
  373. tool.Enabled = false
  374.  
  375. local kick = tool.Animations.Kick
  376. local example = hum:LoadAnimation(kick)
  377. example:Play(0,1,2)
  378. tool.Handle.S3:Play()
  379. local dmgclone = tool.ExtraScripts.DamageFEO:Clone()
  380. dmgclone.Parent = char["Right Leg"]
  381. dmgclone.Disabled = false
  382.  
  383. hum.WalkSpeed = hum.WalkSpeed - 16
  384.  
  385. wait(.45)
  386. dmgclone:Remove()
  387. hum.WalkSpeed = hum.WalkSpeed + 16
  388.  
  389. end
  390. casting = false
  391. tool.Enabled = true
  392. end
  393. end
  394.  
  395. if (key == "x") then -- X : Lunge
  396. if casting == false then
  397. casting = true
  398. if script.Cooldowns.X.Value == 0 then
  399. script.Cooldowns.X.Value = 12
  400. tool.Enabled = false
  401.  
  402. local lunge = tool.Animations.Lunge
  403. local example2 = hum:LoadAnimation(lunge)
  404.  
  405. local charge = tool.Animations.Charge
  406. local example3 = hum:LoadAnimation(charge)
  407.  
  408. local PEClone1 = tool.ParticleEmitters.Shine:Clone()
  409. PEClone1.Parent = tool.Hitbox
  410. char.Humanoid.WalkSpeed = hum.WalkSpeed - 16
  411. char.Humanoid.JumpPower = hum.JumpPower - 50
  412.  
  413. tool.Handle.S4:Play()
  414. example3:Play(0,1,0.25)
  415. PEClone1.Enabled = true
  416. wait(2)
  417. PEClone1.Enabled = false
  418. PEClone1:Destroy()
  419. tool.Hitbox.Damage2.Disabled = false
  420. example2:Play(0,1,1)
  421. local PEClone2 = tool.ParticleEmitters.Smoke:Clone()
  422. PEClone2.Parent = tool.Handle
  423. PEClone2.Enabled = true
  424.  
  425. local motor = Instance.new("BodyVelocity", char.HumanoidRootPart)
  426.  
  427. motor.Velocity = char.HumanoidRootPart.CFrame.lookVector*60
  428. motor.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
  429.  
  430.  
  431. for i = 1,5 do
  432.  
  433. local effect = tool.Handle:Clone()
  434. effect.Parent = workspace
  435. effect.Name = "Effect"
  436. effect.Mesh.Scale = effect.Mesh.Scale * 1.25
  437. effect.S1:Destroy() ; effect.S2:Destroy() ; effect.S3:Destroy()
  438. effect.Mesh.TextureId = ""
  439. effect.BrickColor = char.Torso.BrickColor
  440. effect.Transparency = .4
  441. effect.CanCollide = false
  442. effect.Anchored = true
  443. effect.Rotation = tool.Handle.Rotation
  444. wait(.2) ; effect:Remove()
  445. end
  446.  
  447. motor:Destroy()
  448. PEClone2:Destroy()
  449. tool.Hitbox.Damage2.Disabled = true
  450. char.Humanoid.WalkSpeed = hum.WalkSpeed + 16
  451. char.Humanoid.JumpPower = hum.JumpPower + 50
  452. wait(.1)
  453.  
  454. end
  455. end
  456. casting = false
  457. tool.Enabled = true
  458. end
  459.  
  460. end
  461.  
  462. end
  463. end
  464. -- KEY SKILLS --------------------------------------------------------------------------
  465. tool.Equipped:connect(Equipped)
  466. tool.Unequipped:connect(UnEquipped)
  467. tool.Activated:connect(Activated)
  468. tool.Deactivated:connect(UnActivated)
  469. mouse.KeyDown:connect(KeyDown)
  470. end))
  471. NumberValue18.Name = "Timer"
  472. NumberValue18.Parent = LocalScript17
  473. Script19.Parent = NumberValue18
  474. table.insert(cors,sandbox(Script19,function()
  475. while true do
  476. wait(0.5)
  477. if script.Parent.Value >= 0.5 then
  478. script.Parent.Value = script.Parent.Value - 0.5
  479. end
  480. end
  481. end))
  482. Folder20.Name = "Cooldowns"
  483. Folder20.Parent = LocalScript17
  484. NumberValue21.Name = "Z"
  485. NumberValue21.Parent = Folder20
  486. Script22.Parent = NumberValue21
  487. table.insert(cors,sandbox(Script22,function()
  488. while true do
  489. wait(0.5)
  490. if script.Parent.Value >= 0.5 then
  491. script.Parent.Value = script.Parent.Value - 0.5
  492. end
  493. end
  494. end))
  495. NumberValue23.Name = "X"
  496. NumberValue23.Parent = Folder20
  497. Script24.Parent = NumberValue23
  498. table.insert(cors,sandbox(Script24,function()
  499. while true do
  500. wait(0.5)
  501. if script.Parent.Value >= 0.5 then
  502. script.Parent.Value = script.Parent.Value - 0.5
  503. end
  504. end
  505. end))
  506. Folder25.Name = "Animations"
  507. Folder25.Parent = Tool0
  508. Animation26.Name = "Slash1"
  509. Animation26.Parent = Folder25
  510. Animation26.AnimationId = "rbxassetid://186934753"
  511. Animation27.Name = "Slash2"
  512. Animation27.Parent = Folder25
  513. Animation27.AnimationId = "rbxassetid://186934753"
  514. Animation28.Name = "Spin"
  515. Animation28.Parent = Folder25
  516. Animation28.AnimationId = "https://www.roblox.com/item.aspx?id=452321869"
  517. Animation29.Name = "Kick"
  518. Animation29.Parent = Folder25
  519. Animation29.AnimationId = "https://www.roblox.com/item.aspx?id=428420299"
  520. Animation30.Name = "Charge"
  521. Animation30.Parent = Folder25
  522. Animation30.AnimationId = "https://www.roblox.com/item.aspx?id=437820400"
  523. Animation31.Name = "Lunge"
  524. Animation31.Parent = Folder25
  525. Animation31.AnimationId = "rbxassetid://186934753"
  526. Folder32.Name = "ParticleEmitters"
  527. Folder32.Parent = Tool0
  528. ParticleEmitter33.Name = "Shine"
  529. ParticleEmitter33.Parent = Folder32
  530. ParticleEmitter33.Transparency = NumberSequence.new(1,1,0.31874996423721,0.5,0)
  531. ParticleEmitter33.Rotation = NumberRange.new(-360, 360)
  532. ParticleEmitter33.Size = NumberSequence.new(3,3,0)
  533. ParticleEmitter33.Color = ColorSequence.new(Color3.new(1, 1, 0.498039),Color3.new(1, 0.803922, 0.482353))
  534. ParticleEmitter33.Enabled = false
  535. ParticleEmitter33.LightEmission = 0.44999998807907
  536. ParticleEmitter33.Texture = "http://www.roblox.com/asset/?id=244221535"
  537. ParticleEmitter33.Lifetime = NumberRange.new(0.40000000596046, 0.40000000596046)
  538. ParticleEmitter33.Rate = 40
  539. ParticleEmitter33.RotSpeed = NumberRange.new(-300, 300)
  540. ParticleEmitter33.Speed = NumberRange.new(0, 0)
  541. ParticleEmitter33.Color = ColorSequence.new(Color3.new(1, 1, 0.498039),Color3.new(1, 0.803922, 0.482353))
  542. ParticleEmitter34.Name = "Smoke"
  543. ParticleEmitter34.Parent = Folder32
  544. ParticleEmitter34.Transparency = NumberSequence.new(0,1)
  545. ParticleEmitter34.Rotation = NumberRange.new(-360, 360)
  546. ParticleEmitter34.Color = ColorSequence.new(Color3.new(0.184314, 0.184314, 0.184314),Color3.new(0.368627, 0.368627, 0.368627),Color3.new(0.207843, 0.207843, 0.207843),Color3.new(0.262745, 0.262745, 0.262745),Color3.new(0.454902, 0.454902, 0.454902))
  547. ParticleEmitter34.Enabled = false
  548. ParticleEmitter34.Texture = "http://www.roblox.com/asset/?id=290833005"
  549. ParticleEmitter34.Acceleration = Vector3.new(0, 3, 0)
  550. ParticleEmitter34.Lifetime = NumberRange.new(2, 2)
  551. ParticleEmitter34.Rate = 30
  552. ParticleEmitter34.RotSpeed = NumberRange.new(-300, 300)
  553. ParticleEmitter34.Speed = NumberRange.new(2, 2)
  554. ParticleEmitter34.VelocitySpread = 180
  555. ParticleEmitter34.Color = ColorSequence.new(Color3.new(0.184314, 0.184314, 0.184314),Color3.new(0.368627, 0.368627, 0.368627),Color3.new(0.207843, 0.207843, 0.207843),Color3.new(0.262745, 0.262745, 0.262745),Color3.new(0.454902, 0.454902, 0.454902))
  556. Script35.Name = "UltimateWeld"
  557. Script35.Parent = Tool0
  558. table.insert(cors,sandbox(Script35,function()
  559. --DO NOT USE BOTH WELDING SCRIPTS PROVIDED BY THIS MODEL
  560. --The regular script is recommended
  561.  
  562.  
  563.  
  564. --[[
  565. Prevents welds from breaking/transforming when player uses the tool
  566. This recreates the EXACT weld every time
  567. This also prevents lag build up by clearing old welds, the tradition weld script just keeps making new
  568. ones, which can lead to weapons have crazy amounts of welds that dont work (I saw 6000 in a weapon once)
  569. ]]
  570.  
  571. --[[Usage
  572. 1. Remove Old welding script (optional, only if updating a weapon and that weapon does not rely on that script)
  573. 2. Anchor all parts of tool and put inside of a tool object
  574. 3. Place this script in that tool (make sure you do this AFTER step 2, otherwise it may fail)
  575. 4. Treat like normal tool, nothing special has to be done with it
  576. ]]
  577.  
  578. --[[The local script included in this model can only be used if
  579. 1. The weapon is being placed in the players backpack first (i.e. the weapon is in starterpack and moves to player backpack)
  580. OR
  581. 2. The weapon is previously welded (weapon can be placed in workspace and picked up then)
  582. ]]
  583. repeat wait() until script.Parent:FindFirstChild("Handle")
  584. local welds={}
  585. function ClearOldWelds(tbl)
  586. for _,v in pairs(tbl) do
  587. if v:IsA('Weld') then
  588. v:Destroy()
  589. end
  590. end
  591. end
  592.  
  593. function Equipped()
  594. local handle=script.Parent:FindFirstChild('Handle')
  595. if not handle then return end
  596. local tble=handle:GetChildren()
  597. for _,v in pairs(script.Parent:GetChildren()) do
  598. if v:IsA('BasePart') and v~=handle then
  599. local c1
  600. for _1,v1 in pairs(welds) do
  601. if _1==v then
  602. c1=v1
  603. break
  604. end
  605. end
  606. if not c1 then
  607. welds[v]=v.CFrame:inverse()*handle.CFrame
  608. v.Anchored=false
  609. c1=welds[v]
  610. end
  611. local weld=Instance.new('Weld')
  612. weld.Part0=handle
  613. weld.Part1=v
  614. weld.C0=CFrame.new()
  615. weld.C1=c1
  616. weld.Parent=handle
  617. end
  618. end
  619. ClearOldWelds(tble)
  620. handle.Anchored=false
  621. end
  622. Equipped()
  623. script.Parent.Equipped:connect(Equipped)
  624.  
  625. --Made by DonnyTheDemented
  626.  
  627. end))
  628. Part36.Name = "Hitbox"
  629. Part36.Parent = Tool0
  630. Part36.Transparency = 1
  631. Part36.Rotation = Vector3.new(0, 90, 0)
  632. Part36.Anchored = true
  633. Part36.CanCollide = false
  634. Part36.Size = Vector3.new(1, 4.29999971, 1)
  635. Part36.CFrame = CFrame.new(-20.0999966, 24.1000004, -3.899997, 3.05180438e-05, -3.05171161e-05, 1, -3.05171106e-05, 1, 3.05180438e-05, -1, -3.05180438e-05, 3.05171125e-05)
  636. Part36.Position = Vector3.new(-20.0999966, 24.1000004, -3.899997)
  637. Part36.Orientation = Vector3.new(0, 90, 0)
  638. Script37.Name = "Damage"
  639. Script37.Parent = Part36
  640. Script37.Disabled = true
  641. table.insert(cors,sandbox(Script37,function()
  642. ---local examp = require(game.Workspace.DamageFunc)
  643. local tool = script.Parent.Parent
  644. local debounce = false
  645.  
  646. function OnTouch(hit)
  647. local i = math.random(10,26)
  648. local human = hit.Parent:FindFirstChild("Monster")
  649. if (human ~= nil ) then
  650. if debounce == false then
  651. debounce = true
  652. examp.SubtractionHealth(human,i,human.Parent.Defense.Value,tool.Stats.Power.Value,tool.Parent)
  653. script.Disabled = true
  654. end
  655. end
  656. end
  657.  
  658. script.Parent.Touched:connect(OnTouch)
  659. end))
  660. Script38.Name = "Damage2"
  661. Script38.Parent = Part36
  662. Script38.Disabled = true
  663. table.insert(cors,sandbox(Script38,function()
  664. ---local examp = require(game.Workspace.DamageFunc)
  665. local tool = script.Parent.Parent
  666. local debounce = false
  667.  
  668. function OnTouch(hit)
  669. local i = math.random(20,50)
  670. local human = hit.Parent:FindFirstChild("Monster")
  671. if (human ~= nil ) then
  672. if debounce == false then
  673. debounce = true
  674. examp.SubtractionHealth(human,i,human.Parent.Defense.Value,tool.Stats.Power.Value,tool.Parent)
  675. end
  676. end
  677. end
  678.  
  679. script.Parent.Touched:connect(OnTouch)
  680. end))
  681. Part39.Name = "Handle"
  682. Part39.Parent = Tool0
  683. Part39.BrickColor = BrickColor.new("Smoky grey")
  684. Part39.Rotation = Vector3.new(0, 90, 0)
  685. Part39.CanCollide = false
  686. Part39.Size = Vector3.new(0.5, 4.4000001, 0.5)
  687. Part39.CFrame = CFrame.new(-20.0999279, 24.2000103, -3.89998746, 3.92483344e-08, -9.88477041e-07, 1, -1.4239723e-05, 1, 9.88477609e-07, -1, -1.4239723e-05, 3.92342585e-08)
  688. Part39.BackSurface = Enum.SurfaceType.SmoothNoOutlines
  689. Part39.BottomSurface = Enum.SurfaceType.SmoothNoOutlines
  690. Part39.FrontSurface = Enum.SurfaceType.SmoothNoOutlines
  691. Part39.LeftSurface = Enum.SurfaceType.SmoothNoOutlines
  692. Part39.RightSurface = Enum.SurfaceType.SmoothNoOutlines
  693. Part39.TopSurface = Enum.SurfaceType.SmoothNoOutlines
  694. Part39.Color = Color3.new(0.356863, 0.364706, 0.411765)
  695. Part39.Position = Vector3.new(-20.0999279, 24.2000103, -3.89998746)
  696. Part39.Orientation = Vector3.new(0, 90, 0)
  697. Part39.Color = Color3.new(0.356863, 0.364706, 0.411765)
  698. Sound40.Name = "S1"
  699. Sound40.Parent = Part39
  700. Sound40.Pitch = 1.1000000238419
  701. Sound40.SoundId = "rbxasset://sounds//swordslash.wav"
  702. Sound40.Volume = 0.25
  703. Sound41.Name = "S2"
  704. Sound41.Parent = Part39
  705. Sound41.Pitch = 1.1000000238419
  706. Sound41.SoundId = "rbxasset://sounds//swordlunge.wav"
  707. Sound41.Volume = 0.25
  708. SpecialMesh42.Parent = Part39
  709. SpecialMesh42.MeshId = "http://www.roblox.com/asset/?id=94746028"
  710. SpecialMesh42.Scale = Vector3.new(1.20000005, 1.20000005, 1.20000005)
  711. SpecialMesh42.TextureId = "http://www.roblox.com/asset/?ID=94746105"
  712. SpecialMesh42.MeshType = Enum.MeshType.FileMesh
  713. SpecialMesh42.Scale = Vector3.new(1.20000005, 1.20000005, 1.20000005)
  714. Sound43.Name = "S4"
  715. Sound43.Parent = Part39
  716. Sound43.Pitch = 0.55000001192093
  717. Sound43.SoundId = "http://www.roblox.com/asset/?id=2101137"
  718. Sound43.Volume = 0.25
  719. Sound44.Name = "S3"
  720. Sound44.Parent = Part39
  721. Sound44.Pitch = 0.89999997615814
  722. Sound44.SoundId = "rbxasset://sounds/swoosh.wav"
  723. Sound44.Volume = 0.25
  724. Folder45.Name = "ExtraScripts"
  725. Folder45.Parent = Tool0
  726. Script46.Name = "DamageFEO"
  727. Script46.Parent = Folder45
  728. Script46.Disabled = true
  729. table.insert(cors,sandbox(Script46,function()
  730. -- Damage script F.E.O( For External Object )
  731. -- Basically if you want to make damage on a arm, leg, head, etc.
  732. ---local examp = require(game.Workspace.DamageFunc)
  733. local tool = script.Parent.Parent
  734. local debounce = false
  735.  
  736. function OnTouch(hit)
  737. local i = math.random(5,20)
  738. local human = hit.Parent:FindFirstChild("Monster")
  739. if (human ~= nil ) then
  740. if debounce == false then
  741. debounce = true
  742. human.PlatformStand = true
  743. examp.SubtractionHealth(human,i,human.Parent.Defense.Value,script.Parent.Parent.Sword.Stats.Power.Value,script.Parent.Parent)
  744. script.Disabled = true
  745. end
  746. end
  747. end
  748.  
  749. script.Parent.Touched:connect(OnTouch)
  750. end))
  751. ScreenGui47.Name = "SkillGui"
  752. ScreenGui47.Parent = Tool0
  753. Frame48.Name = "Skills"
  754. Frame48.Parent = ScreenGui47
  755. Frame48.Size = UDim2.new(0.150000006, 1, 0.125, 1)
  756. Frame48.Style = Enum.FrameStyle.RobloxRound
  757. Frame48.Position = UDim2.new(0.845000029, 0, 0.625, 0)
  758. Frame48.BackgroundColor3 = Color3.new(1, 1, 1)
  759. Frame48.BorderSizePixel = 0
  760. TextLabel49.Name = "ZSkill"
  761. TextLabel49.Parent = Frame48
  762. TextLabel49.Size = UDim2.new(0.5, 0, 1, 1)
  763. TextLabel49.Text = ""
  764. TextLabel49.BackgroundColor3 = Color3.new(0.333333, 1, 0)
  765. TextLabel49.BorderSizePixel = 0
  766. TextLabel49.Font = Enum.Font.ArialBold
  767. TextLabel49.FontSize = Enum.FontSize.Size14
  768. TextLabel49.TextColor3 = Color3.new(1, 1, 1)
  769. TextLabel49.TextScaled = true
  770. TextLabel49.TextStrokeTransparency = 0
  771. TextLabel49.TextWrapped = true
  772. LocalScript50.Parent = TextLabel49
  773. LocalScript50.Disabled = true
  774. table.insert(cors,sandbox(LocalScript50,function()
  775. max = 1
  776. cd = 1
  777. local tg = script.Parent
  778. local plr = game.Players.LocalPlayer
  779. local char = workspace:WaitForChild(plr.Name)
  780. local hum = char:WaitForChild("Humanoid")
  781. wait()
  782. for _, child in pairs(char:GetChildren()) do
  783. if child.ClassName == 'Tool' then
  784. tool = child
  785. end
  786. end
  787.  
  788. while true do
  789. if tool.ToolScript.Cooldowns.Z.Value > max then max = tool.ToolScript.Cooldowns.Z.Value
  790. end
  791. tg.Size = UDim2.new((( 0.5 / max ) * ( max - tool.ToolScript.Cooldowns.Z.Value)),0,1,1)
  792. if tool.ToolScript.Cooldowns.Z.Value == 0 and cd == 0 then
  793. cd = 1
  794. script.Parent.Parent.ZF.BackgroundTransparency = 0.8
  795. wait()
  796. script.Parent.Parent.ZF.BackgroundTransparency = 0.6
  797. wait()
  798. script.Parent.Parent.ZF.BackgroundTransparency = 0.4
  799. wait()
  800. script.Parent.Parent.ZF.BackgroundTransparency = 0.2
  801. wait()
  802. script.Parent.Parent.ZF.BackgroundTransparency = 0.0
  803. wait()
  804. script.Parent.Parent.ZF.BackgroundTransparency = 0.2
  805. wait()
  806. script.Parent.Parent.ZF.BackgroundTransparency = 0.4
  807. wait()
  808. script.Parent.Parent.ZF.BackgroundTransparency = 0.6
  809. wait()
  810. script.Parent.Parent.ZF.BackgroundTransparency = 0.8
  811. wait()
  812. script.Parent.Parent.ZF.BackgroundTransparency = 1
  813. else if tool.ToolScript.Cooldowns.Z.Value ~= 0 then
  814. cd = 0
  815. end
  816. end
  817. wait()
  818. end
  819.  
  820.  
  821. end))
  822. TextLabel51.Name = "XSkill"
  823. TextLabel51.Parent = Frame48
  824. TextLabel51.Size = UDim2.new(0.5, 0, 1, 1)
  825. TextLabel51.Text = ""
  826. TextLabel51.Position = UDim2.new(0.5, 0, 0, 0)
  827. TextLabel51.BackgroundColor3 = Color3.new(0, 0.666667, 1)
  828. TextLabel51.BorderSizePixel = 0
  829. TextLabel51.Font = Enum.Font.ArialBold
  830. TextLabel51.FontSize = Enum.FontSize.Size14
  831. TextLabel51.TextColor3 = Color3.new(1, 1, 1)
  832. TextLabel51.TextScaled = true
  833. TextLabel51.TextStrokeTransparency = 0
  834. TextLabel51.TextWrapped = true
  835. LocalScript52.Parent = TextLabel51
  836. LocalScript52.Disabled = true
  837. table.insert(cors,sandbox(LocalScript52,function()
  838. max = 1
  839. cd = 1
  840. local tg = script.Parent
  841. local plr = game.Players.LocalPlayer
  842. local char = workspace:WaitForChild(plr.Name)
  843. local hum = char:WaitForChild("Humanoid")
  844. wait()
  845. for _, child in pairs(char:GetChildren()) do
  846. if child.ClassName == 'Tool' then
  847. tool = child
  848. end
  849. end
  850.  
  851. while true do
  852. if tool.ToolScript.Cooldowns.X.Value > max then max = tool.ToolScript.Cooldowns.X.Value
  853. end
  854. tg.Size = UDim2.new((( 0.5 / max ) * ( max - tool.ToolScript.Cooldowns.X.Value)),0,1,1)
  855. if tool.ToolScript.Cooldowns.X.Value == 0 and cd == 0 then
  856. cd = 1
  857. script.Parent.Parent.XF.BackgroundTransparency = 0.8
  858. wait()
  859. script.Parent.Parent.XF.BackgroundTransparency = 0.6
  860. wait()
  861. script.Parent.Parent.XF.BackgroundTransparency = 0.4
  862. wait()
  863. script.Parent.Parent.XF.BackgroundTransparency = 0.2
  864. wait()
  865. script.Parent.Parent.XF.BackgroundTransparency = 0.0
  866. wait()
  867. script.Parent.Parent.XF.BackgroundTransparency = 0.2
  868. wait()
  869. script.Parent.Parent.XF.BackgroundTransparency = 0.4
  870. wait()
  871. script.Parent.Parent.XF.BackgroundTransparency = 0.6
  872. wait()
  873. script.Parent.Parent.XF.BackgroundTransparency = 0.8
  874. wait()
  875. script.Parent.Parent.XF.BackgroundTransparency = 1
  876. else if tool.ToolScript.Cooldowns.X.Value ~= 0 then
  877. cd = 0
  878. end
  879. end
  880. wait()
  881. end
  882.  
  883.  
  884. end))
  885. TextLabel53.Name = "X"
  886. TextLabel53.Parent = Frame48
  887. TextLabel53.Transparency = 1
  888. TextLabel53.Size = UDim2.new(0.5, 0, 1, 1)
  889. TextLabel53.Text = "X"
  890. TextLabel53.Position = UDim2.new(0.5, 0, 0, 0)
  891. TextLabel53.BackgroundColor3 = Color3.new(0, 0.666667, 1)
  892. TextLabel53.BackgroundTransparency = 1
  893. TextLabel53.BorderSizePixel = 0
  894. TextLabel53.Font = Enum.Font.ArialBold
  895. TextLabel53.FontSize = Enum.FontSize.Size14
  896. TextLabel53.TextColor3 = Color3.new(1, 1, 1)
  897. TextLabel53.TextScaled = true
  898. TextLabel53.TextStrokeTransparency = 0
  899. TextLabel53.TextWrapped = true
  900. TextLabel54.Name = "Z"
  901. TextLabel54.Parent = Frame48
  902. TextLabel54.Transparency = 1
  903. TextLabel54.Size = UDim2.new(0.5, 0, 1, 1)
  904. TextLabel54.Text = "Z"
  905. TextLabel54.BackgroundColor3 = Color3.new(0.333333, 1, 0)
  906. TextLabel54.BackgroundTransparency = 1
  907. TextLabel54.BorderSizePixel = 0
  908. TextLabel54.Font = Enum.Font.ArialBold
  909. TextLabel54.FontSize = Enum.FontSize.Size14
  910. TextLabel54.TextColor3 = Color3.new(1, 1, 1)
  911. TextLabel54.TextScaled = true
  912. TextLabel54.TextStrokeTransparency = 0
  913. TextLabel54.TextWrapped = true
  914. TextLabel55.Name = "ZF"
  915. TextLabel55.Parent = Frame48
  916. TextLabel55.Transparency = 1
  917. TextLabel55.Size = UDim2.new(0.5, 0, 1, 1)
  918. TextLabel55.Text = ""
  919. TextLabel55.BackgroundColor3 = Color3.new(1, 1, 1)
  920. TextLabel55.BackgroundTransparency = 1
  921. TextLabel55.BorderSizePixel = 0
  922. TextLabel55.Font = Enum.Font.ArialBold
  923. TextLabel55.FontSize = Enum.FontSize.Size14
  924. TextLabel55.TextColor3 = Color3.new(1, 1, 1)
  925. TextLabel55.TextScaled = true
  926. TextLabel55.TextStrokeTransparency = 0
  927. TextLabel55.TextWrapped = true
  928. TextLabel56.Name = "XF"
  929. TextLabel56.Parent = Frame48
  930. TextLabel56.Transparency = 1
  931. TextLabel56.Size = UDim2.new(0.5, 0, 1, 1)
  932. TextLabel56.Text = ""
  933. TextLabel56.Position = UDim2.new(0.5, 0, 0, 0)
  934. TextLabel56.BackgroundColor3 = Color3.new(1, 1, 1)
  935. TextLabel56.BackgroundTransparency = 1
  936. TextLabel56.BorderSizePixel = 0
  937. TextLabel56.ZIndex = 4
  938. TextLabel56.Font = Enum.Font.ArialBold
  939. TextLabel56.FontSize = Enum.FontSize.Size14
  940. TextLabel56.TextColor3 = Color3.new(1, 1, 1)
  941. TextLabel56.TextScaled = true
  942. TextLabel56.TextStrokeTransparency = 0
  943. TextLabel56.TextWrapped = true
  944. for i,v in pairs(mas:GetChildren()) do
  945. v.Parent = game:GetService("Players").LocalPlayer.Backpack
  946. pcall(function() v:MakeJoints() end)
  947. end
  948. mas:Destroy()
  949. for i,v in pairs(cors) do
  950. spawn(function()
  951. pcall(v)
  952. end)
  953. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement