Advertisement
memberhero

test

Mar 21st, 2018
179
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 29.29 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.  
  277. function Attack2()
  278. CanCast = 0
  279. if tool.Enabled == true then return end
  280. local anim2 = tool.Animations.Slash2
  281. local example = hum:LoadAnimation(anim2)
  282. example:Play(0,1,1)
  283. tool.Handle.S1:Play()
  284. tool.Hitbox.Damage.Disabled = false
  285. wait(.45)
  286. tool.Hitbox.Damage.Disabled = true
  287. CanCast = 1
  288. end
  289.  
  290. function Attack3()
  291. CanCast = 0
  292. if tool.Enabled == true then return end
  293. local anim3 = tool.Animations.Spin
  294. local example = hum:LoadAnimation(anim3)
  295. example:Play(0,1,1)
  296.  
  297. wait(.6)
  298. tool.Handle.S2:Play()
  299. tool.Hitbox.Damage.Disabled = false
  300. wait(.15)
  301. tool.Hitbox.Damage.Disabled = true
  302. CanCast = 1
  303. end
  304.  
  305. local lastattack = 0
  306. tool.Enabled = true
  307.  
  308. function Activated()
  309.  
  310. if not tool.Enabled then
  311. return
  312. end
  313.  
  314. tool.Enabled = false
  315.  
  316. local character = tool.Parent;
  317. local humanoid = character.Humanoid
  318. if humanoid == nil then
  319. print("No humanoid!")
  320. return
  321. end
  322.  
  323. local t = r.Stepped:wait()
  324. if script.Timer.Value == 0 then
  325. Clicknumb = 1
  326. end
  327.  
  328. if Clicknumb == 1 then -- copy all this, change the functions for attacks.
  329. Clicknumb = 2
  330. Attack1()
  331. wait(0.05)
  332. script.Timer.Value = 2.5
  333. elseif Clicknumb == 2 then
  334. Clicknumb = 3
  335. Attack2()
  336. wait(0.05)
  337. script.Timer.Value = 2.5
  338. elseif Clicknumb == 3 then
  339. Clicknumb = 1
  340. Attack3()
  341. wait(0.05)
  342. script.Timer.Value = 2.5
  343. end -- thats about it.
  344.  
  345.  
  346. lastattack = t
  347.  
  348. tool.Enabled = true
  349.  
  350. end
  351.  
  352. function UnActivated()
  353.  
  354. end
  355.  
  356. -- KEY SKILLS --------------------------------------------------------------------------
  357. function KeyDown(key)
  358. key = key:lower()
  359. local casting = false
  360. if CanCast == 1 then
  361. if tool.Parent ~= plr.Backpack then
  362.  
  363. if (key == "z") then -- Z : Kick
  364. if casting == false then
  365. casting = true
  366. if script.Cooldowns.Z.Value == 0 then
  367. script.Cooldowns.Z.Value = 1.5
  368. tool.Enabled = false
  369.  
  370. local kick = tool.Animations.Kick
  371. local example = hum:LoadAnimation(kick)
  372. example:Play(0,1,2)
  373. tool.Handle.S3:Play()
  374. local dmgclone = tool.ExtraScripts.DamageFEO:Clone()
  375. dmgclone.Parent = char["Right Leg"]
  376. dmgclone.Disabled = false
  377.  
  378. hum.WalkSpeed = hum.WalkSpeed - 16
  379.  
  380. wait(.45)
  381. dmgclone:Remove()
  382. hum.WalkSpeed = hum.WalkSpeed + 16
  383.  
  384. end
  385. casting = false
  386. tool.Enabled = true
  387. end
  388. end
  389.  
  390. if (key == "x") then -- X : Lunge
  391. if casting == false then
  392. casting = true
  393. if script.Cooldowns.X.Value == 0 then
  394. script.Cooldowns.X.Value = 12
  395. tool.Enabled = false
  396.  
  397. local lunge = tool.Animations.Lunge
  398. local example2 = hum:LoadAnimation(lunge)
  399.  
  400. local charge = tool.Animations.Charge
  401. local example3 = hum:LoadAnimation(charge)
  402.  
  403. local PEClone1 = tool.ParticleEmitters.Shine:Clone()
  404. PEClone1.Parent = tool.Hitbox
  405. char.Humanoid.WalkSpeed = hum.WalkSpeed - 16
  406. char.Humanoid.JumpPower = hum.JumpPower - 50
  407.  
  408. tool.Handle.S4:Play()
  409. example3:Play(0,1,0.25)
  410. PEClone1.Enabled = true
  411. wait(2)
  412. PEClone1.Enabled = false
  413. PEClone1:Destroy()
  414. tool.Hitbox.Damage2.Disabled = false
  415. example2:Play(0,1,1)
  416. local PEClone2 = tool.ParticleEmitters.Smoke:Clone()
  417. PEClone2.Parent = tool.Handle
  418. PEClone2.Enabled = true
  419.  
  420. local motor = Instance.new("BodyVelocity", char.HumanoidRootPart)
  421.  
  422. motor.Velocity = char.HumanoidRootPart.CFrame.lookVector*60
  423. motor.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
  424.  
  425.  
  426. for i = 1,5 do
  427.  
  428. local effect = tool.Handle:Clone()
  429. effect.Parent = workspace
  430. effect.Name = "Effect"
  431. effect.Mesh.Scale = effect.Mesh.Scale * 1.25
  432. effect.S1:Destroy() ; effect.S2:Destroy() ; effect.S3:Destroy()
  433. effect.Mesh.TextureId = ""
  434. effect.BrickColor = char.Torso.BrickColor
  435. effect.Transparency = .4
  436. effect.CanCollide = false
  437. effect.Anchored = true
  438. effect.Rotation = tool.Handle.Rotation
  439. wait(.2) ; effect:Remove()
  440. end
  441.  
  442. motor:Destroy()
  443. PEClone2:Destroy()
  444. tool.Hitbox.Damage2.Disabled = true
  445. char.Humanoid.WalkSpeed = hum.WalkSpeed + 16
  446. char.Humanoid.JumpPower = hum.JumpPower + 50
  447. wait(.1)
  448.  
  449. end
  450. end
  451. casting = false
  452. tool.Enabled = true
  453. end
  454.  
  455. end
  456.  
  457. end
  458. end
  459. -- KEY SKILLS --------------------------------------------------------------------------
  460. tool.Equipped:connect(Equipped)
  461. tool.Unequipped:connect(UnEquipped)
  462. tool.Activated:connect(Activated)
  463. tool.Deactivated:connect(UnActivated)
  464. mouse.KeyDown:connect(KeyDown)
  465. end))
  466. NumberValue18.Name = "Timer"
  467. NumberValue18.Parent = LocalScript17
  468. Script19.Parent = NumberValue18
  469. table.insert(cors,sandbox(Script19,function()
  470. while true do
  471. wait(0.5)
  472. if script.Parent.Value >= 0.5 then
  473. script.Parent.Value = script.Parent.Value - 0.5
  474. end
  475. end
  476. end))
  477. Folder20.Name = "Cooldowns"
  478. Folder20.Parent = LocalScript17
  479. NumberValue21.Name = "Z"
  480. NumberValue21.Parent = Folder20
  481. Script22.Parent = NumberValue21
  482. table.insert(cors,sandbox(Script22,function()
  483. while true do
  484. wait(0.5)
  485. if script.Parent.Value >= 0.5 then
  486. script.Parent.Value = script.Parent.Value - 0.5
  487. end
  488. end
  489. end))
  490. NumberValue23.Name = "X"
  491. NumberValue23.Parent = Folder20
  492. Script24.Parent = NumberValue23
  493. table.insert(cors,sandbox(Script24,function()
  494. while true do
  495. wait(0.5)
  496. if script.Parent.Value >= 0.5 then
  497. script.Parent.Value = script.Parent.Value - 0.5
  498. end
  499. end
  500. end))
  501. Folder25.Name = "Animations"
  502. Folder25.Parent = Tool0
  503. Animation26.Name = "Slash1"
  504. Animation26.Parent = Folder25
  505. Animation26.AnimationId = "rbxassetid://186934753"
  506. Animation27.Name = "Slash2"
  507. Animation27.Parent = Folder25
  508. Animation27.AnimationId = "rbxassetid://186934753"
  509. Animation28.Name = "Spin"
  510. Animation28.Parent = Folder25
  511. Animation28.AnimationId = "https://www.roblox.com/item.aspx?id=452321869"
  512. Animation29.Name = "Kick"
  513. Animation29.Parent = Folder25
  514. Animation29.AnimationId = "https://www.roblox.com/item.aspx?id=428420299"
  515. Animation30.Name = "Charge"
  516. Animation30.Parent = Folder25
  517. Animation30.AnimationId = "https://www.roblox.com/item.aspx?id=437820400"
  518. Animation31.Name = "Lunge"
  519. Animation31.Parent = Folder25
  520. Animation31.AnimationId = "rbxassetid://186934753"
  521. Folder32.Name = "ParticleEmitters"
  522. Folder32.Parent = Tool0
  523. ParticleEmitter33.Name = "Shine"
  524. ParticleEmitter33.Parent = Folder32
  525. ParticleEmitter33.Transparency = NumberSequence.new(1,1,0.31874996423721,0.5,0)
  526. ParticleEmitter33.Rotation = NumberRange.new(-360, 360)
  527. ParticleEmitter33.Size = NumberSequence.new(3,3,0)
  528. ParticleEmitter33.Color = ColorSequence.new(Color3.new(1, 1, 0.498039),Color3.new(1, 0.803922, 0.482353))
  529. ParticleEmitter33.Enabled = false
  530. ParticleEmitter33.LightEmission = 0.44999998807907
  531. ParticleEmitter33.Texture = "http://www.roblox.com/asset/?id=244221535"
  532. ParticleEmitter33.Lifetime = NumberRange.new(0.40000000596046, 0.40000000596046)
  533. ParticleEmitter33.Rate = 40
  534. ParticleEmitter33.RotSpeed = NumberRange.new(-300, 300)
  535. ParticleEmitter33.Speed = NumberRange.new(0, 0)
  536. ParticleEmitter33.Color = ColorSequence.new(Color3.new(1, 1, 0.498039),Color3.new(1, 0.803922, 0.482353))
  537. ParticleEmitter34.Name = "Smoke"
  538. ParticleEmitter34.Parent = Folder32
  539. ParticleEmitter34.Transparency = NumberSequence.new(0,1)
  540. ParticleEmitter34.Rotation = NumberRange.new(-360, 360)
  541. 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))
  542. ParticleEmitter34.Enabled = false
  543. ParticleEmitter34.Texture = "http://www.roblox.com/asset/?id=290833005"
  544. ParticleEmitter34.Acceleration = Vector3.new(0, 3, 0)
  545. ParticleEmitter34.Lifetime = NumberRange.new(2, 2)
  546. ParticleEmitter34.Rate = 30
  547. ParticleEmitter34.RotSpeed = NumberRange.new(-300, 300)
  548. ParticleEmitter34.Speed = NumberRange.new(2, 2)
  549. ParticleEmitter34.VelocitySpread = 180
  550. 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))
  551. Script35.Name = "UltimateWeld"
  552. Script35.Parent = Tool0
  553. table.insert(cors,sandbox(Script35,function()
  554. --DO NOT USE BOTH WELDING SCRIPTS PROVIDED BY THIS MODEL
  555. --The regular script is recommended
  556.  
  557.  
  558.  
  559. --[[
  560. Prevents welds from breaking/transforming when player uses the tool
  561. This recreates the EXACT weld every time
  562. This also prevents lag build up by clearing old welds, the tradition weld script just keeps making new
  563. ones, which can lead to weapons have crazy amounts of welds that dont work (I saw 6000 in a weapon once)
  564. ]]
  565.  
  566. --[[Usage
  567. 1. Remove Old welding script (optional, only if updating a weapon and that weapon does not rely on that script)
  568. 2. Anchor all parts of tool and put inside of a tool object
  569. 3. Place this script in that tool (make sure you do this AFTER step 2, otherwise it may fail)
  570. 4. Treat like normal tool, nothing special has to be done with it
  571. ]]
  572.  
  573. --[[The local script included in this model can only be used if
  574. 1. The weapon is being placed in the players backpack first (i.e. the weapon is in starterpack and moves to player backpack)
  575. OR
  576. 2. The weapon is previously welded (weapon can be placed in workspace and picked up then)
  577. ]]
  578. repeat wait() until script.Parent:FindFirstChild("Handle")
  579. local welds={}
  580. function ClearOldWelds(tbl)
  581. for _,v in pairs(tbl) do
  582. if v:IsA('Weld') then
  583. v:Destroy()
  584. end
  585. end
  586. end
  587.  
  588. function Equipped()
  589. local handle=script.Parent:FindFirstChild('Handle')
  590. if not handle then return end
  591. local tble=handle:GetChildren()
  592. for _,v in pairs(script.Parent:GetChildren()) do
  593. if v:IsA('BasePart') and v~=handle then
  594. local c1
  595. for _1,v1 in pairs(welds) do
  596. if _1==v then
  597. c1=v1
  598. break
  599. end
  600. end
  601. if not c1 then
  602. welds[v]=v.CFrame:inverse()*handle.CFrame
  603. v.Anchored=false
  604. c1=welds[v]
  605. end
  606. local weld=Instance.new('Weld')
  607. weld.Part0=handle
  608. weld.Part1=v
  609. weld.C0=CFrame.new()
  610. weld.C1=c1
  611. weld.Parent=handle
  612. end
  613. end
  614. ClearOldWelds(tble)
  615. handle.Anchored=false
  616. end
  617. Equipped()
  618. script.Parent.Equipped:connect(Equipped)
  619.  
  620. --Made by DonnyTheDemented
  621.  
  622. end))
  623. Part36.Name = "Hitbox"
  624. Part36.Parent = Tool0
  625. Part36.Transparency = 1
  626. Part36.Rotation = Vector3.new(0, 90, 0)
  627. Part36.Anchored = true
  628. Part36.CanCollide = false
  629. Part36.Size = Vector3.new(1, 4.29999971, 1)
  630. 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)
  631. Part36.Position = Vector3.new(-20.0999966, 24.1000004, -3.899997)
  632. Part36.Orientation = Vector3.new(0, 90, 0)
  633. Script37.Name = "Damage"
  634. Script37.Parent = Part36
  635. Script37.Disabled = true
  636. table.insert(cors,sandbox(Script37,function()
  637. ---local examp = require(game.Workspace.DamageFunc)
  638. local tool = script.Parent.Parent
  639. local debounce = false
  640.  
  641. function OnTouch(hit)
  642. local i = math.random(10,26)
  643. local human = hit.Parent:FindFirstChild("Monster")
  644. if (human ~= nil ) then
  645. if debounce == false then
  646. debounce = true
  647. examp.SubtractionHealth(human,i,human.Parent.Defense.Value,tool.Stats.Power.Value,tool.Parent)
  648. script.Disabled = true
  649. end
  650. end
  651. end
  652.  
  653. script.Parent.Touched:connect(OnTouch)
  654. end))
  655. Script38.Name = "Damage2"
  656. Script38.Parent = Part36
  657. Script38.Disabled = true
  658. table.insert(cors,sandbox(Script38,function()
  659. ---local examp = require(game.Workspace.DamageFunc)
  660. local tool = script.Parent.Parent
  661. local debounce = false
  662.  
  663. function OnTouch(hit)
  664. local i = math.random(20,50)
  665. local human = hit.Parent:FindFirstChild("Monster")
  666. if (human ~= nil ) then
  667. if debounce == false then
  668. debounce = true
  669. examp.SubtractionHealth(human,i,human.Parent.Defense.Value,tool.Stats.Power.Value,tool.Parent)
  670. end
  671. end
  672. end
  673.  
  674. script.Parent.Touched:connect(OnTouch)
  675. end))
  676. Part39.Name = "Handle"
  677. Part39.Parent = Tool0
  678. Part39.BrickColor = BrickColor.new("Smoky grey")
  679. Part39.Rotation = Vector3.new(0, 90, 0)
  680. Part39.CanCollide = false
  681. Part39.Size = Vector3.new(0.5, 4.4000001, 0.5)
  682. 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)
  683. Part39.BackSurface = Enum.SurfaceType.SmoothNoOutlines
  684. Part39.BottomSurface = Enum.SurfaceType.SmoothNoOutlines
  685. Part39.FrontSurface = Enum.SurfaceType.SmoothNoOutlines
  686. Part39.LeftSurface = Enum.SurfaceType.SmoothNoOutlines
  687. Part39.RightSurface = Enum.SurfaceType.SmoothNoOutlines
  688. Part39.TopSurface = Enum.SurfaceType.SmoothNoOutlines
  689. Part39.Color = Color3.new(0.356863, 0.364706, 0.411765)
  690. Part39.Position = Vector3.new(-20.0999279, 24.2000103, -3.89998746)
  691. Part39.Orientation = Vector3.new(0, 90, 0)
  692. Part39.Color = Color3.new(0.356863, 0.364706, 0.411765)
  693. Sound40.Name = "S1"
  694. Sound40.Parent = Part39
  695. Sound40.Pitch = 1.1000000238419
  696. Sound40.SoundId = "rbxasset://sounds//swordslash.wav"
  697. Sound40.Volume = 0.25
  698. Sound41.Name = "S2"
  699. Sound41.Parent = Part39
  700. Sound41.Pitch = 1.1000000238419
  701. Sound41.SoundId = "rbxasset://sounds//swordlunge.wav"
  702. Sound41.Volume = 0.25
  703. SpecialMesh42.Parent = Part39
  704. SpecialMesh42.MeshId = "http://www.roblox.com/asset/?id=94746028"
  705. SpecialMesh42.Scale = Vector3.new(1.20000005, 1.20000005, 1.20000005)
  706. SpecialMesh42.TextureId = "http://www.roblox.com/asset/?ID=94746105"
  707. SpecialMesh42.MeshType = Enum.MeshType.FileMesh
  708. SpecialMesh42.Scale = Vector3.new(1.20000005, 1.20000005, 1.20000005)
  709. Sound43.Name = "S4"
  710. Sound43.Parent = Part39
  711. Sound43.Pitch = 0.55000001192093
  712. Sound43.SoundId = "http://www.roblox.com/asset/?id=2101137"
  713. Sound43.Volume = 0.25
  714. Sound44.Name = "S3"
  715. Sound44.Parent = Part39
  716. Sound44.Pitch = 0.89999997615814
  717. Sound44.SoundId = "rbxasset://sounds/swoosh.wav"
  718. Sound44.Volume = 0.25
  719. Folder45.Name = "ExtraScripts"
  720. Folder45.Parent = Tool0
  721. Script46.Name = "DamageFEO"
  722. Script46.Parent = Folder45
  723. Script46.Disabled = true
  724. table.insert(cors,sandbox(Script46,function()
  725. -- Damage script F.E.O( For External Object )
  726. -- Basically if you want to make damage on a arm, leg, head, etc.
  727. ---local examp = require(game.Workspace.DamageFunc)
  728. local tool = script.Parent.Parent
  729. local debounce = false
  730.  
  731. function OnTouch(hit)
  732. local i = math.random(5,20)
  733. local human = hit.Parent:FindFirstChild("Monster")
  734. if (human ~= nil ) then
  735. if debounce == false then
  736. debounce = true
  737. human.PlatformStand = true
  738. examp.SubtractionHealth(human,i,human.Parent.Defense.Value,script.Parent.Parent.Sword.Stats.Power.Value,script.Parent.Parent)
  739. script.Disabled = true
  740. end
  741. end
  742. end
  743.  
  744. script.Parent.Touched:connect(OnTouch)
  745. end))
  746. ScreenGui47.Name = "SkillGui"
  747. ScreenGui47.Parent = Tool0
  748. Frame48.Name = "Skills"
  749. Frame48.Parent = ScreenGui47
  750. Frame48.Size = UDim2.new(0.150000006, 1, 0.125, 1)
  751. Frame48.Style = Enum.FrameStyle.RobloxRound
  752. Frame48.Position = UDim2.new(0.845000029, 0, 0.625, 0)
  753. Frame48.BackgroundColor3 = Color3.new(1, 1, 1)
  754. Frame48.BorderSizePixel = 0
  755. TextLabel49.Name = "ZSkill"
  756. TextLabel49.Parent = Frame48
  757. TextLabel49.Size = UDim2.new(0.5, 0, 1, 1)
  758. TextLabel49.Text = ""
  759. TextLabel49.BackgroundColor3 = Color3.new(0.333333, 1, 0)
  760. TextLabel49.BorderSizePixel = 0
  761. TextLabel49.Font = Enum.Font.ArialBold
  762. TextLabel49.FontSize = Enum.FontSize.Size14
  763. TextLabel49.TextColor3 = Color3.new(1, 1, 1)
  764. TextLabel49.TextScaled = true
  765. TextLabel49.TextStrokeTransparency = 0
  766. TextLabel49.TextWrapped = true
  767. LocalScript50.Parent = TextLabel49
  768. LocalScript50.Disabled = true
  769. table.insert(cors,sandbox(LocalScript50,function()
  770. max = 1
  771. cd = 1
  772. local tg = script.Parent
  773. local plr = game.Players.LocalPlayer
  774. local char = workspace:WaitForChild(plr.Name)
  775. local hum = char:WaitForChild("Humanoid")
  776. wait()
  777. for _, child in pairs(char:GetChildren()) do
  778. if child.ClassName == 'Tool' then
  779. tool = child
  780. end
  781. end
  782.  
  783. while true do
  784. if tool.ToolScript.Cooldowns.Z.Value > max then max = tool.ToolScript.Cooldowns.Z.Value
  785. end
  786. tg.Size = UDim2.new((( 0.5 / max ) * ( max - tool.ToolScript.Cooldowns.Z.Value)),0,1,1)
  787. if tool.ToolScript.Cooldowns.Z.Value == 0 and cd == 0 then
  788. cd = 1
  789. script.Parent.Parent.ZF.BackgroundTransparency = 0.8
  790. wait()
  791. script.Parent.Parent.ZF.BackgroundTransparency = 0.6
  792. wait()
  793. script.Parent.Parent.ZF.BackgroundTransparency = 0.4
  794. wait()
  795. script.Parent.Parent.ZF.BackgroundTransparency = 0.2
  796. wait()
  797. script.Parent.Parent.ZF.BackgroundTransparency = 0.0
  798. wait()
  799. script.Parent.Parent.ZF.BackgroundTransparency = 0.2
  800. wait()
  801. script.Parent.Parent.ZF.BackgroundTransparency = 0.4
  802. wait()
  803. script.Parent.Parent.ZF.BackgroundTransparency = 0.6
  804. wait()
  805. script.Parent.Parent.ZF.BackgroundTransparency = 0.8
  806. wait()
  807. script.Parent.Parent.ZF.BackgroundTransparency = 1
  808. else if tool.ToolScript.Cooldowns.Z.Value ~= 0 then
  809. cd = 0
  810. end
  811. end
  812. wait()
  813. end
  814.  
  815.  
  816. end))
  817. TextLabel51.Name = "XSkill"
  818. TextLabel51.Parent = Frame48
  819. TextLabel51.Size = UDim2.new(0.5, 0, 1, 1)
  820. TextLabel51.Text = ""
  821. TextLabel51.Position = UDim2.new(0.5, 0, 0, 0)
  822. TextLabel51.BackgroundColor3 = Color3.new(0, 0.666667, 1)
  823. TextLabel51.BorderSizePixel = 0
  824. TextLabel51.Font = Enum.Font.ArialBold
  825. TextLabel51.FontSize = Enum.FontSize.Size14
  826. TextLabel51.TextColor3 = Color3.new(1, 1, 1)
  827. TextLabel51.TextScaled = true
  828. TextLabel51.TextStrokeTransparency = 0
  829. TextLabel51.TextWrapped = true
  830. LocalScript52.Parent = TextLabel51
  831. LocalScript52.Disabled = true
  832. table.insert(cors,sandbox(LocalScript52,function()
  833. max = 1
  834. cd = 1
  835. local tg = script.Parent
  836. local plr = game.Players.LocalPlayer
  837. local char = workspace:WaitForChild(plr.Name)
  838. local hum = char:WaitForChild("Humanoid")
  839. wait()
  840. for _, child in pairs(char:GetChildren()) do
  841. if child.ClassName == 'Tool' then
  842. tool = child
  843. end
  844. end
  845.  
  846. while true do
  847. if tool.ToolScript.Cooldowns.X.Value > max then max = tool.ToolScript.Cooldowns.X.Value
  848. end
  849. tg.Size = UDim2.new((( 0.5 / max ) * ( max - tool.ToolScript.Cooldowns.X.Value)),0,1,1)
  850. if tool.ToolScript.Cooldowns.X.Value == 0 and cd == 0 then
  851. cd = 1
  852. script.Parent.Parent.XF.BackgroundTransparency = 0.8
  853. wait()
  854. script.Parent.Parent.XF.BackgroundTransparency = 0.6
  855. wait()
  856. script.Parent.Parent.XF.BackgroundTransparency = 0.4
  857. wait()
  858. script.Parent.Parent.XF.BackgroundTransparency = 0.2
  859. wait()
  860. script.Parent.Parent.XF.BackgroundTransparency = 0.0
  861. wait()
  862. script.Parent.Parent.XF.BackgroundTransparency = 0.2
  863. wait()
  864. script.Parent.Parent.XF.BackgroundTransparency = 0.4
  865. wait()
  866. script.Parent.Parent.XF.BackgroundTransparency = 0.6
  867. wait()
  868. script.Parent.Parent.XF.BackgroundTransparency = 0.8
  869. wait()
  870. script.Parent.Parent.XF.BackgroundTransparency = 1
  871. else if tool.ToolScript.Cooldowns.X.Value ~= 0 then
  872. cd = 0
  873. end
  874. end
  875. wait()
  876. end
  877.  
  878.  
  879. end))
  880. TextLabel53.Name = "X"
  881. TextLabel53.Parent = Frame48
  882. TextLabel53.Transparency = 1
  883. TextLabel53.Size = UDim2.new(0.5, 0, 1, 1)
  884. TextLabel53.Text = "X"
  885. TextLabel53.Position = UDim2.new(0.5, 0, 0, 0)
  886. TextLabel53.BackgroundColor3 = Color3.new(0, 0.666667, 1)
  887. TextLabel53.BackgroundTransparency = 1
  888. TextLabel53.BorderSizePixel = 0
  889. TextLabel53.Font = Enum.Font.ArialBold
  890. TextLabel53.FontSize = Enum.FontSize.Size14
  891. TextLabel53.TextColor3 = Color3.new(1, 1, 1)
  892. TextLabel53.TextScaled = true
  893. TextLabel53.TextStrokeTransparency = 0
  894. TextLabel53.TextWrapped = true
  895. TextLabel54.Name = "Z"
  896. TextLabel54.Parent = Frame48
  897. TextLabel54.Transparency = 1
  898. TextLabel54.Size = UDim2.new(0.5, 0, 1, 1)
  899. TextLabel54.Text = "Z"
  900. TextLabel54.BackgroundColor3 = Color3.new(0.333333, 1, 0)
  901. TextLabel54.BackgroundTransparency = 1
  902. TextLabel54.BorderSizePixel = 0
  903. TextLabel54.Font = Enum.Font.ArialBold
  904. TextLabel54.FontSize = Enum.FontSize.Size14
  905. TextLabel54.TextColor3 = Color3.new(1, 1, 1)
  906. TextLabel54.TextScaled = true
  907. TextLabel54.TextStrokeTransparency = 0
  908. TextLabel54.TextWrapped = true
  909. TextLabel55.Name = "ZF"
  910. TextLabel55.Parent = Frame48
  911. TextLabel55.Transparency = 1
  912. TextLabel55.Size = UDim2.new(0.5, 0, 1, 1)
  913. TextLabel55.Text = ""
  914. TextLabel55.BackgroundColor3 = Color3.new(1, 1, 1)
  915. TextLabel55.BackgroundTransparency = 1
  916. TextLabel55.BorderSizePixel = 0
  917. TextLabel55.Font = Enum.Font.ArialBold
  918. TextLabel55.FontSize = Enum.FontSize.Size14
  919. TextLabel55.TextColor3 = Color3.new(1, 1, 1)
  920. TextLabel55.TextScaled = true
  921. TextLabel55.TextStrokeTransparency = 0
  922. TextLabel55.TextWrapped = true
  923. TextLabel56.Name = "XF"
  924. TextLabel56.Parent = Frame48
  925. TextLabel56.Transparency = 1
  926. TextLabel56.Size = UDim2.new(0.5, 0, 1, 1)
  927. TextLabel56.Text = ""
  928. TextLabel56.Position = UDim2.new(0.5, 0, 0, 0)
  929. TextLabel56.BackgroundColor3 = Color3.new(1, 1, 1)
  930. TextLabel56.BackgroundTransparency = 1
  931. TextLabel56.BorderSizePixel = 0
  932. TextLabel56.ZIndex = 4
  933. TextLabel56.Font = Enum.Font.ArialBold
  934. TextLabel56.FontSize = Enum.FontSize.Size14
  935. TextLabel56.TextColor3 = Color3.new(1, 1, 1)
  936. TextLabel56.TextScaled = true
  937. TextLabel56.TextStrokeTransparency = 0
  938. TextLabel56.TextWrapped = true
  939. for i,v in pairs(mas:GetChildren()) do
  940. v.Parent = game:GetService("Players").LocalPlayer.Backpack
  941. pcall(function() v:MakeJoints() end)
  942. end
  943. mas:Destroy()
  944. for i,v in pairs(cors) do
  945. spawn(function()
  946. pcall(v)
  947. end)
  948. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement